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

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

Issue 155863003: Add basic support for "googDucking" to getUserMedia on Windows. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 10 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
11 const char kMediaStreamSource[] = "chromeMediaSource"; 11 const char kMediaStreamSource[] = "chromeMediaSource";
12 const char kMediaStreamSourceId[] = "chromeMediaSourceId"; 12 const char kMediaStreamSourceId[] = "chromeMediaSourceId";
13 const char kMediaStreamSourceInfoId[] = "sourceId"; 13 const char kMediaStreamSourceInfoId[] = "sourceId";
14 const char kMediaStreamSourceTab[] = "tab"; 14 const char kMediaStreamSourceTab[] = "tab";
15 const char kMediaStreamSourceScreen[] = "screen"; 15 const char kMediaStreamSourceScreen[] = "screen";
16 const char kMediaStreamSourceDesktop[] = "desktop"; 16 const char kMediaStreamSourceDesktop[] = "desktop";
17 const char kMediaStreamSourceSystem[] = "system"; 17 const char kMediaStreamSourceSystem[] = "system";
18 const char kMediaStreamRenderToAssociatedSink[] = 18 const char kMediaStreamRenderToAssociatedSink[] =
19 "chromeRenderToAssociatedSink"; 19 "chromeRenderToAssociatedSink";
20 // The prefix of this constant is 'goog' to match with other getUserMedia
21 // constraints for audio.
22 const char kMediaStreamAudioDucking[] = "googDucking";
DaleCurtis 2014/02/05 22:15:43 Is this a web facing attribute? I'm not familiar
tommi (sloooow) - chröme 2014/02/06 11:50:34 Yes, these are constraints that can be passed to g
DaleCurtis 2014/02/06 19:19:59 Do you need to make any FYI / PSA announcements on
20 23
21 namespace { 24 namespace {
22 25
23 bool GetFirstConstraintByName(const StreamOptions::Constraints& constraints, 26 bool GetFirstConstraintByName(const StreamOptions::Constraints& constraints,
24 const std::string& name, 27 const std::string& name,
25 std::string* value) { 28 std::string* value) {
26 for (StreamOptions::Constraints::const_iterator it = constraints.begin(); 29 for (StreamOptions::Constraints::const_iterator it = constraints.begin();
27 it != constraints.end(); ++it ) { 30 it != constraints.end(); ++it ) {
28 if (it->name == name) { 31 if (it->name == name) {
29 *value = it->value; 32 *value = it->value;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 121 }
119 122
120 // static 123 // static
121 bool StreamDeviceInfo::IsEqual(const StreamDeviceInfo& first, 124 bool StreamDeviceInfo::IsEqual(const StreamDeviceInfo& first,
122 const StreamDeviceInfo& second) { 125 const StreamDeviceInfo& second) {
123 return first.device.IsEqual(second.device) && 126 return first.device.IsEqual(second.device) &&
124 first.session_id == second.session_id; 127 first.session_id == second.session_id;
125 } 128 }
126 129
127 } // namespace content 130 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698