Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: content/common/media/media_stream_options.cc

Issue 23731007: Implicit audio output device selection for getUserMedia. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/media/media_stream_options.h" 5 #include "content/common/media/media_stream_options.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 30 matching lines...) Expand all
41 : device(service_param, device_param, name_param), 41 : device(service_param, device_param, name_param),
42 in_use(opened), 42 in_use(opened),
43 session_id(kNoId) { 43 session_id(kNoId) {
44 } 44 }
45 45
46 StreamDeviceInfo::StreamDeviceInfo(MediaStreamType service_param, 46 StreamDeviceInfo::StreamDeviceInfo(MediaStreamType service_param,
47 const std::string& name_param, 47 const std::string& name_param,
48 const std::string& device_param, 48 const std::string& device_param,
49 int sample_rate, 49 int sample_rate,
50 int channel_layout, 50 int channel_layout,
51 int frames_per_buffer,
51 bool opened) 52 bool opened)
52 : device(service_param, device_param, name_param, sample_rate, 53 : device(service_param, device_param, name_param, sample_rate,
53 channel_layout), 54 channel_layout, frames_per_buffer),
54 in_use(opened), 55 in_use(opened),
55 session_id(kNoId) { 56 session_id(kNoId) {
56 } 57 }
57 58
58 // static 59 // static
59 bool StreamDeviceInfo::IsEqual(const StreamDeviceInfo& first, 60 bool StreamDeviceInfo::IsEqual(const StreamDeviceInfo& first,
60 const StreamDeviceInfo& second) { 61 const StreamDeviceInfo& second) {
62 const MediaStreamDevice::AudioDeviceParameters& input_first =
63 first.device.input;
64 const MediaStreamDevice::AudioDeviceParameters& input_second =
65 second.device.input;
61 return first.device.type == second.device.type && 66 return first.device.type == second.device.type &&
62 first.device.name == second.device.name && 67 first.device.name == second.device.name &&
63 first.device.id == second.device.id && 68 first.device.id == second.device.id &&
64 first.device.sample_rate == second.device.sample_rate && 69 input_first.sample_rate == input_second.sample_rate &&
65 first.device.channel_layout == second.device.channel_layout && 70 input_first.channel_layout == input_second.channel_layout &&
66 first.in_use == second.in_use && 71 first.in_use == second.in_use &&
67 first.session_id == second.session_id; 72 first.session_id == second.session_id;
68 } 73 }
69 74
70 } // namespace content 75 } // namespace content
OLDNEW
« no previous file with comments | « content/common/media/media_stream_options.h ('k') | content/public/common/media_stream_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698