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

Side by Side Diff: content/renderer/media/media_stream_dependency_factory.cc

Issue 227743004: Added a kEchoCancellation constraint to turn off the audio processing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: when kEchoCancellation is false, default values of all goog* constraints are false, added unittests Created 6 years, 7 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/renderer/media/media_stream_dependency_factory.h" 5 #include "content/renderer/media/media_stream_dependency_factory.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 bool MediaStreamDependencyFactory::InitializeMediaStreamAudioSource( 187 bool MediaStreamDependencyFactory::InitializeMediaStreamAudioSource(
188 int render_view_id, 188 int render_view_id,
189 const blink::WebMediaConstraints& audio_constraints, 189 const blink::WebMediaConstraints& audio_constraints,
190 MediaStreamAudioSource* source_data) { 190 MediaStreamAudioSource* source_data) {
191 DVLOG(1) << "InitializeMediaStreamAudioSources()"; 191 DVLOG(1) << "InitializeMediaStreamAudioSources()";
192 192
193 // Do additional source initialization if the audio source is a valid 193 // Do additional source initialization if the audio source is a valid
194 // microphone or tab audio. 194 // microphone or tab audio.
195 RTCMediaConstraints native_audio_constraints(audio_constraints); 195 RTCMediaConstraints native_audio_constraints(audio_constraints);
196 ApplyFixedAudioConstraints(&native_audio_constraints); 196 MediaAudioConstraints::ApplyFixedAudioConstraints(&native_audio_constraints);
197 197
198 StreamDeviceInfo device_info = source_data->device_info(); 198 StreamDeviceInfo device_info = source_data->device_info();
199 RTCMediaConstraints constraints = native_audio_constraints; 199 RTCMediaConstraints constraints = native_audio_constraints;
200 // May modify both |constraints| and |effects|. 200 // May modify both |constraints| and |effects|.
201 HarmonizeConstraintsAndEffects(&constraints, 201 HarmonizeConstraintsAndEffects(&constraints,
202 &device_info.device.input.effects); 202 &device_info.device.input.effects);
203 203
204 scoped_refptr<WebRtcAudioCapturer> capturer( 204 scoped_refptr<WebRtcAudioCapturer> capturer(
205 CreateAudioCapturer(render_view_id, device_info, audio_constraints, 205 CreateAudioCapturer(render_view_id, device_info, audio_constraints,
206 source_data)); 206 source_data));
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 } 654 }
655 655
656 void MediaStreamDependencyFactory::EnsureWebRtcAudioDeviceImpl() { 656 void MediaStreamDependencyFactory::EnsureWebRtcAudioDeviceImpl() {
657 if (audio_device_) 657 if (audio_device_)
658 return; 658 return;
659 659
660 audio_device_ = new WebRtcAudioDeviceImpl(); 660 audio_device_ = new WebRtcAudioDeviceImpl();
661 } 661 }
662 662
663 } // namespace content 663 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698