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

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

Issue 14893006: Add flag for enabling WebRTC AEC debug recordings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Hard coded string in wait for libjingle roll. Created 7 years, 7 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
« no previous file with comments | « content/renderer/media/rtc_media_constraints.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_media_constraints.cc
diff --git a/content/renderer/media/rtc_media_constraints.cc b/content/renderer/media/rtc_media_constraints.cc
index 9118152f0bc9230272dacbec4efdb5d26999bc4e..029e82f94612928ef156b00dd0427f81df2f1928 100644
--- a/content/renderer/media/rtc_media_constraints.cc
+++ b/content/renderer/media/rtc_media_constraints.cc
@@ -4,7 +4,7 @@
#include "content/renderer/media/rtc_media_constraints.h"
#include "base/logging.h"
-
+#include "base/string_util.h"
#include "content/common/media/media_stream_options.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebMediaConstraints.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebCString.h"
@@ -26,6 +26,14 @@ void GetNativeMediaConstraints(
if (new_constraint.key == kMediaStreamSource ||
new_constraint.key == kMediaStreamSourceId)
continue;
+
+ // Ignore internal constraints set by JS.
+ // TODO(jiayl): replace the hard coded string with
+ // webrtc::MediaConstraintsInterface::kInternalConstraintPrefix when
+ // the Libjingle change is rolled.
+ if (StartsWithASCII(new_constraint.key, "internal", true))
+ continue;
+
DVLOG(3) << "MediaStreamConstraints:" << new_constraint.key
<< " : " << new_constraint.value;
native_constraints->push_back(new_constraint);
@@ -58,4 +66,9 @@ RTCMediaConstraints::GetOptional() const {
return optional_;
}
+void RTCMediaConstraints::AddOptional(const std::string& key,
+ const std::string& value) {
+ optional_.push_back(Constraint(key, value));
+}
+
} // namespace content
« no previous file with comments | « content/renderer/media/rtc_media_constraints.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698