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

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

Issue 11783059: Ensures that WebRTC works for device selection using a different sample rate than default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix after review from Chris Created 7 years, 11 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 | Annotate | Revision Log
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 18 matching lines...) Expand all
29 StreamDeviceInfo::StreamDeviceInfo() 29 StreamDeviceInfo::StreamDeviceInfo()
30 : in_use(false), 30 : in_use(false),
31 session_id(kNoId) {} 31 session_id(kNoId) {}
32 32
33 StreamDeviceInfo::StreamDeviceInfo(MediaStreamType service_param, 33 StreamDeviceInfo::StreamDeviceInfo(MediaStreamType service_param,
34 const std::string& name_param, 34 const std::string& name_param,
35 const std::string& device_param, 35 const std::string& device_param,
36 bool opened) 36 bool opened)
37 : device(service_param, device_param, name_param), 37 : device(service_param, device_param, name_param),
38 in_use(opened), 38 in_use(opened),
39 session_id(kNoId) {} 39 session_id(kNoId) {
40 }
41
42 StreamDeviceInfo::StreamDeviceInfo(MediaStreamType service_param,
43 const std::string& name_param,
44 const std::string& device_param,
45 int sample_rate,
46 int channel_layout,
47 bool opened)
48 : device(service_param, device_param, name_param, sample_rate,
49 channel_layout),
50 in_use(opened),
51 session_id(kNoId) {
52 }
40 53
41 // static 54 // static
42 bool StreamDeviceInfo::IsEqual(const StreamDeviceInfo& first, 55 bool StreamDeviceInfo::IsEqual(const StreamDeviceInfo& first,
43 const StreamDeviceInfo& second) { 56 const StreamDeviceInfo& second) {
44 return first.device.type == second.device.type && 57 return first.device.type == second.device.type &&
45 first.device.name == second.device.name && 58 first.device.name == second.device.name &&
46 first.device.id == second.device.id && 59 first.device.id == second.device.id &&
60 first.device.sample_rate == second.device.sample_rate &&
61 first.device.channel_layout == second.device.channel_layout &&
47 first.in_use == second.in_use && 62 first.in_use == second.in_use &&
48 first.session_id == second.session_id; 63 first.session_id == second.session_id;
49 } 64 }
50 65
51 } // namespace content 66 } // 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