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

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

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/media_stream_audio_processor_options.h
diff --git a/content/renderer/media/media_stream_audio_processor_options.h b/content/renderer/media/media_stream_audio_processor_options.h
index 3ad41100b4c78f1157519b2598df4435fd692f1b..bac643ee2170e72ddf779ac94e641655e474c612 100644
--- a/content/renderer/media/media_stream_audio_processor_options.h
+++ b/content/renderer/media/media_stream_audio_processor_options.h
@@ -30,6 +30,18 @@ class RTCMediaConstraints;
using webrtc::AudioProcessing;
using webrtc::MediaConstraintsInterface;
+// Constraint keys used by audio processing.
+extern const char kEchoCancellation[];
+extern const char kGoogEchoCancellation[];
+extern const char kGoogExperimentalEchoCancellation[];
+extern const char kGoogAutoGainControl[];
+extern const char kGoogExperimentalAutoGainControl[];
+extern const char kGoogNoiseSuppression[];
+extern const char kGoogExperimentalNoiseSuppression[];
+extern const char kGoogHighpassFilter[];
+extern const char kGoogTypingNoiseDetection[];
+extern const char kGoogAudioMirroring[];
+
// Merge |constraints| with |kDefaultAudioConstraints|. For any key which exists
// in both, the value from |constraints| is maintained, including its
// mandatory/optional status. New values from |kDefaultAudioConstraints| will
@@ -48,8 +60,13 @@ bool NeedsAudioProcessing(const blink::WebMediaConstraints& constraints,
// Returns true if the key is found and has a valid boolean value; Otherwise
perkj_chrome 2014/04/11 11:45:04 "and has a valid boolean value that is true." I t
no longer working on chromium 2014/04/11 16:47:05 Returning two values might not be the best. The u
// false.
perkj_chrome 2014/04/11 11:45:04 document |effects|
no longer working on chromium 2014/04/11 16:47:05 Added comment to the constructor of the new MediaA
bool GetPropertyFromConstraints(
perkj_chrome 2014/04/11 11:45:04 I think you have to but these functions in class s
no longer working on chromium 2014/04/11 16:47:05 Done.
- const MediaConstraintsInterface* constraints,
- const std::string& key);
+ const blink::WebMediaConstraints& constraints,
+ const std::string& key,
+ int effects);
+
+// Returns true if all the mandatory constraints in |constraints| are valid;
+// Otherwise return false.
+bool IsValid(const blink::WebMediaConstraints& constraints);
perkj_chrome 2014/04/11 11:45:04 dito - this is audio specific.
no longer working on chromium 2014/04/11 16:47:05 Done.
// Enables the echo cancellation in |audio_processing|.
void EnableEchoCancellation(AudioProcessing* audio_processing);

Powered by Google App Engine
This is Rietveld 408576698