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

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: addressed Per's comments. Created 6 years, 8 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 bool MediaStreamDependencyFactory::InitializeMediaStreamAudioSource( 190 bool MediaStreamDependencyFactory::InitializeMediaStreamAudioSource(
191 int render_view_id, 191 int render_view_id,
192 const blink::WebMediaConstraints& audio_constraints, 192 const blink::WebMediaConstraints& audio_constraints,
193 MediaStreamAudioSource* source_data) { 193 MediaStreamAudioSource* source_data) {
194 DVLOG(1) << "InitializeMediaStreamAudioSources()"; 194 DVLOG(1) << "InitializeMediaStreamAudioSources()";
195 195
196 // Do additional source initialization if the audio source is a valid 196 // Do additional source initialization if the audio source is a valid
197 // microphone or tab audio. 197 // microphone or tab audio.
198 RTCMediaConstraints native_audio_constraints(audio_constraints); 198 RTCMediaConstraints native_audio_constraints(audio_constraints);
199 ApplyFixedAudioConstraints(&native_audio_constraints); 199 MediaAudioConstraints::ApplyFixedAudioConstraints(&native_audio_constraints);
200 200
201 StreamDeviceInfo device_info = source_data->device_info(); 201 StreamDeviceInfo device_info = source_data->device_info();
202 RTCMediaConstraints constraints = native_audio_constraints; 202 RTCMediaConstraints constraints = native_audio_constraints;
203 // May modify both |constraints| and |effects|. 203 // May modify both |constraints| and |effects|.
204 HarmonizeConstraintsAndEffects(&constraints, 204 HarmonizeConstraintsAndEffects(&constraints,
205 &device_info.device.input.effects); 205 &device_info.device.input.effects);
206 206
207 scoped_refptr<WebRtcAudioCapturer> capturer( 207 scoped_refptr<WebRtcAudioCapturer> capturer(
208 CreateAudioCapturer(render_view_id, device_info, audio_constraints)); 208 CreateAudioCapturer(render_view_id, device_info, audio_constraints));
209 if (!capturer.get()) { 209 if (!capturer.get()) {
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 } 750 }
751 751
752 void MediaStreamDependencyFactory::EnsureWebRtcAudioDeviceImpl() { 752 void MediaStreamDependencyFactory::EnsureWebRtcAudioDeviceImpl() {
753 if (audio_device_) 753 if (audio_device_)
754 return; 754 return;
755 755
756 audio_device_ = new WebRtcAudioDeviceImpl(); 756 audio_device_ = new WebRtcAudioDeviceImpl();
757 } 757 }
758 758
759 } // namespace content 759 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698