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

Unified Diff: content/renderer/media/mock_media_constraint_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: moved some of the constraints code to MediaAudioConstraints class, and hope it makes the code more … 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/mock_media_constraint_factory.cc
diff --git a/content/renderer/media/mock_media_constraint_factory.cc b/content/renderer/media/mock_media_constraint_factory.cc
index 99d9f56244b49030173e76e88303b1c6eb246355..5d5e7d3998170d04c6e9a06f7c2fe5c745831bfb 100644
--- a/content/renderer/media/mock_media_constraint_factory.cc
+++ b/content/renderer/media/mock_media_constraint_factory.cc
@@ -37,6 +37,12 @@ void MockMediaConstraintFactory::AddMandatory(const std::string& key,
base::UTF8ToUTF16(base::DoubleToString(value))));
}
+void MockMediaConstraintFactory::AddMandatory(const std::string& key,
+ const std::string& value) {
+ mandatory_.push_back(blink::WebMediaConstraint(
+ base::UTF8ToUTF16(key), base::UTF8ToUTF16(value)));
+}
+
void MockMediaConstraintFactory::AddOptional(const std::string& key,
int value) {
optional_.push_back(blink::WebMediaConstraint(base::UTF8ToUTF16(key),
@@ -50,6 +56,12 @@ void MockMediaConstraintFactory::AddOptional(const std::string& key,
base::UTF8ToUTF16(base::DoubleToString(value))));
}
+void MockMediaConstraintFactory::AddOptional(const std::string& key,
+ const std::string& value) {
+ optional_.push_back(blink::WebMediaConstraint(
+ base::UTF8ToUTF16(key), base::UTF8ToUTF16(value)));
+}
+
void MockMediaConstraintFactory::DisableDefaultAudioConstraints() {
static const char* kDefaultAudioConstraints[] = {
webrtc::MediaConstraintsInterface::kEchoCancellation,

Powered by Google App Engine
This is Rietveld 408576698