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

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

Issue 15120009: Pass the sctp command-line flag to Libjingle as an internal-only constraint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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..a54825dfdb6c6b0180923641ee51acd175566f56 100644
--- a/content/renderer/media/rtc_media_constraints.cc
+++ b/content/renderer/media/rtc_media_constraints.cc
@@ -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 (new_constraint.key.find("internal") == 0)
tommi (sloooow) - chröme 2013/05/21 08:03:24 if "internal" is a prefix, should we use StartsWit
jiayl 2013/05/21 16:57:15 Done.
+ continue;
+
DVLOG(3) << "MediaStreamConstraints:" << new_constraint.key
<< " : " << new_constraint.value;
native_constraints->push_back(new_constraint);
@@ -58,4 +66,10 @@ RTCMediaConstraints::GetOptional() const {
return optional_;
}
+void RTCMediaConstraints::AddOptional(
+ const std::string& key, const std::string& value) {
+ webrtc::MediaConstraintsInterface::Constraint new_constraint(key, value);
+ optional_.push_back(new_constraint);
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698