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

Unified Diff: content/renderer/media/media_stream_audio_processor_options.cc

Issue 1893363002: Fix selection of "no audio processing" mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 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/media_stream_audio_processor_options.cc
diff --git a/content/renderer/media/media_stream_audio_processor_options.cc b/content/renderer/media/media_stream_audio_processor_options.cc
index 9020be04a76fe315bb973bbdc18c23fbe8d15c93..ac8c9c23a4047800a59ea64e6cc489da1fc3d44a 100644
--- a/content/renderer/media/media_stream_audio_processor_options.cc
+++ b/content/renderer/media/media_stream_audio_processor_options.cc
@@ -18,6 +18,7 @@
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "content/common/media/media_stream_options.h"
+#include "content/renderer/media/media_stream_constraints_util.h"
#include "content/renderer/media/media_stream_source.h"
#include "media/audio/audio_parameters.h"
#include "third_party/webrtc/modules/audio_processing/include/audio_processing.h"
@@ -171,9 +172,12 @@ MediaAudioConstraints::MediaAudioConstraints(
// - gUM has a specific kMediaStreamSource, which is used by tab capture
// and screen capture.
// - |kEchoCancellation| is explicitly set to false.
- std::string value_str;
+ bool echo_constraint;
if (!constraints.basic().mediaStreamSource.isEmpty() ||
- !constraints.basic().echoCancellation.matches(true)) {
+ (GetConstraintValueAsBoolean(
+ constraints, &blink::WebMediaTrackConstraintSet::echoCancellation,
+ &echo_constraint) &&
+ echo_constraint == false)) {
default_audio_processing_constraint_value_ = false;
}
}

Powered by Google App Engine
This is Rietveld 408576698