Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / content / renderer / media / rtc_media_constraints.cc
index a476be3..7f8b79d 100644 (file)
@@ -8,6 +8,7 @@
 #include "base/logging.h"
 #include "base/strings/string_util.h"
 #include "content/common/media/media_stream_options.h"
+#include "content/renderer/media/media_stream_video_source.h"
 #include "third_party/WebKit/public/platform/WebMediaConstraints.h"
 #include "third_party/WebKit/public/platform/WebCString.h"
 #include "third_party/WebKit/public/platform/WebString.h"
@@ -33,6 +34,10 @@ void GetNativeMediaConstraints(
     if (new_constraint.key == kMediaStreamSourceInfoId)
       continue;
 
+    // Ignore constraints that are handled by Chrome in MediaStreamVideoSource.
+    if (MediaStreamVideoSource::IsConstraintSupported(new_constraint.key))
+      continue;
+
     DVLOG(3) << "MediaStreamConstraints:" << new_constraint.key
              << " : " <<  new_constraint.value;
     native_constraints->push_back(new_constraint);