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

Unified Diff: content/renderer/media/webrtc_audio_capturer.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 the 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/webrtc_audio_capturer.cc
diff --git a/content/renderer/media/webrtc_audio_capturer.cc b/content/renderer/media/webrtc_audio_capturer.cc
index 7318cba1ba5e32b5c89f6aacfc41fa94f2106f9e..0f3f52605cdfb1b854ccb02f0e6066b7149b2952 100644
--- a/content/renderer/media/webrtc_audio_capturer.cc
+++ b/content/renderer/media/webrtc_audio_capturer.cc
@@ -156,6 +156,11 @@ bool WebRtcAudioCapturer::Initialize() {
return true;
}
+ if (!IsValid(constraints_)) {
+ DLOG(ERROR) << "Constraints contain invalid mandatory keys";
+ return false;
+ }
+
media::ChannelLayout channel_layout = static_cast<media::ChannelLayout>(
device_info_.device.input.channel_layout);
DVLOG(1) << "Audio input hardware channel layout: " << channel_layout;
@@ -213,8 +218,7 @@ WebRtcAudioCapturer::WebRtcAudioCapturer(
: constraints_(constraints),
audio_processor_(
new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
- constraints, device_info.device.input.effects,
- device_info.device.type, audio_device)),
+ constraints, device_info.device.input.effects, audio_device)),
running_(false),
render_view_id_(render_view_id),
device_info_(device_info),

Powered by Google App Engine
This is Rietveld 408576698