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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.cpp

Issue 2291893002: Let Contraints Controll Mute/Unmute Audio Local Playback For Desktop Sharing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 2 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 const char kMediaStreamSourceId[] = 78 const char kMediaStreamSourceId[] =
79 "chromeMediaSourceId"; // mapped to deviceId 79 "chromeMediaSourceId"; // mapped to deviceId
80 const char kMediaStreamSourceInfoId[] = "sourceId"; // mapped to deviceId 80 const char kMediaStreamSourceInfoId[] = "sourceId"; // mapped to deviceId
81 const char kMediaStreamRenderToAssociatedSink[] = 81 const char kMediaStreamRenderToAssociatedSink[] =
82 "chromeRenderToAssociatedSink"; 82 "chromeRenderToAssociatedSink";
83 // RenderToAssociatedSink will be going away in M50-M60 some time. 83 // RenderToAssociatedSink will be going away in M50-M60 some time.
84 const char kMediaStreamAudioHotword[] = "googHotword"; 84 const char kMediaStreamAudioHotword[] = "googHotword";
85 // TODO(hta): googHotword should go away. https://crbug.com/577627 85 // TODO(hta): googHotword should go away. https://crbug.com/577627
86 // From content/renderer/media/media_stream_audio_processor_options.cc 86 // From content/renderer/media/media_stream_audio_processor_options.cc
87 const char kEchoCancellation[] = "echoCancellation"; 87 const char kEchoCancellation[] = "echoCancellation";
88 const char kDisableLocalEcho[] = "disableLocalEcho";
88 const char kGoogEchoCancellation[] = "googEchoCancellation"; 89 const char kGoogEchoCancellation[] = "googEchoCancellation";
89 const char kGoogExperimentalEchoCancellation[] = "googEchoCancellation2"; 90 const char kGoogExperimentalEchoCancellation[] = "googEchoCancellation2";
90 const char kGoogAutoGainControl[] = "googAutoGainControl"; 91 const char kGoogAutoGainControl[] = "googAutoGainControl";
91 const char kGoogExperimentalAutoGainControl[] = "googAutoGainControl2"; 92 const char kGoogExperimentalAutoGainControl[] = "googAutoGainControl2";
92 const char kGoogNoiseSuppression[] = "googNoiseSuppression"; 93 const char kGoogNoiseSuppression[] = "googNoiseSuppression";
93 const char kGoogExperimentalNoiseSuppression[] = "googNoiseSuppression2"; 94 const char kGoogExperimentalNoiseSuppression[] = "googNoiseSuppression2";
94 const char kGoogBeamforming[] = "googBeamforming"; 95 const char kGoogBeamforming[] = "googBeamforming";
95 const char kGoogArrayGeometry[] = "googArrayGeometry"; 96 const char kGoogArrayGeometry[] = "googArrayGeometry";
96 const char kGoogHighpassFilter[] = "googHighpassFilter"; 97 const char kGoogHighpassFilter[] = "googHighpassFilter";
97 const char kGoogTypingNoiseDetection[] = "googTypingNoiseDetection"; 98 const char kGoogTypingNoiseDetection[] = "googTypingNoiseDetection";
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 result.frameRate.setMin(atof(constraint.m_value.utf8().c_str())); 292 result.frameRate.setMin(atof(constraint.m_value.utf8().c_str()));
292 } else if (constraint.m_name.equals(kMaxFrameRate)) { 293 } else if (constraint.m_name.equals(kMaxFrameRate)) {
293 result.frameRate.setMax(atof(constraint.m_value.utf8().c_str())); 294 result.frameRate.setMax(atof(constraint.m_value.utf8().c_str()));
294 } else if (constraint.m_name.equals(kEchoCancellation)) { 295 } else if (constraint.m_name.equals(kEchoCancellation)) {
295 result.echoCancellation.setExact(toBoolean(constraint.m_value)); 296 result.echoCancellation.setExact(toBoolean(constraint.m_value));
296 } else if (constraint.m_name.equals(kMediaStreamSource)) { 297 } else if (constraint.m_name.equals(kMediaStreamSource)) {
297 // TODO(hta): This has only a few legal values. Should be 298 // TODO(hta): This has only a few legal values. Should be
298 // represented as an enum, and cause type errors. 299 // represented as an enum, and cause type errors.
299 // https://crbug.com/576582 300 // https://crbug.com/576582
300 result.mediaStreamSource.setExact(constraint.m_value); 301 result.mediaStreamSource.setExact(constraint.m_value);
302 } else if (constraint.m_name.equals(kDisableLocalEcho) &&
303 RuntimeEnabledFeatures::
304 desktopCaptureDisableLocalEchoControlEnabled()) {
305 result.disableLocalEcho.setExact(toBoolean(constraint.m_value));
301 } else if (constraint.m_name.equals(kMediaStreamSourceId) || 306 } else if (constraint.m_name.equals(kMediaStreamSourceId) ||
302 constraint.m_name.equals(kMediaStreamSourceInfoId)) { 307 constraint.m_name.equals(kMediaStreamSourceInfoId)) {
303 result.deviceId.setExact(constraint.m_value); 308 result.deviceId.setExact(constraint.m_value);
304 } else if (constraint.m_name.equals(kMediaStreamRenderToAssociatedSink)) { 309 } else if (constraint.m_name.equals(kMediaStreamRenderToAssociatedSink)) {
305 // TODO(hta): This is a boolean represented as string. 310 // TODO(hta): This is a boolean represented as string.
306 // Should give TypeError when it's not parseable. 311 // Should give TypeError when it's not parseable.
307 // https://crbug.com/576582 312 // https://crbug.com/576582
308 result.renderToAssociatedSink.setExact(toBoolean(constraint.m_value)); 313 result.renderToAssociatedSink.setExact(toBoolean(constraint.m_value));
309 } else if (constraint.m_name.equals(kMediaStreamAudioHotword)) { 314 } else if (constraint.m_name.equals(kMediaStreamAudioHotword)) {
310 result.hotwordEnabled.setExact(toBoolean(constraint.m_value)); 315 result.hotwordEnabled.setExact(toBoolean(constraint.m_value));
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 MediaTrackConstraintSet element; 800 MediaTrackConstraintSet element;
796 convertConstraintSet(it, element); 801 convertConstraintSet(it, element);
797 advancedVector.append(element); 802 advancedVector.append(element);
798 } 803 }
799 if (!advancedVector.isEmpty()) 804 if (!advancedVector.isEmpty())
800 output.setAdvanced(advancedVector); 805 output.setAdvanced(advancedVector);
801 } 806 }
802 807
803 } // namespace MediaConstraintsImpl 808 } // namespace MediaConstraintsImpl
804 } // namespace blink 809 } // namespace blink
OLDNEW
« no previous file with comments | « content/test/data/media/getusermedia.html ('k') | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698