Bug 1289857 - Fix MediaTrackConstraints.cpp to compile with --disable-webrtc again. r=mjf
authorJan-Ivar Bruaroey <jib@mozilla.com>
Thu, 28 Jul 2016 12:03:40 -0400
changeset 347087 4c84eea22241b1ab95b64fee3596484ebdf78d24
parent 347086 26085bd0d4289dd674d2da6cb52ec6a8fe37eef6
child 347088 fc0cdec774074ca00e388c1ecd68cef0b1b7e3ce
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjf
bugs1289857
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1289857 - Fix MediaTrackConstraints.cpp to compile with --disable-webrtc again. r=mjf MozReview-Commit-ID: GgVNQSbPCwf
dom/media/webrtc/MediaTrackConstraints.cpp
dom/media/webrtc/moz.build
--- a/dom/media/webrtc/MediaTrackConstraints.cpp
+++ b/dom/media/webrtc/MediaTrackConstraints.cpp
@@ -1,14 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "MediaTrackConstraints.h"
+#include "mozilla/dom/MediaStreamTrackBinding.h"
 
 #include <limits>
 #include <algorithm>
 #include <iterator>
 
 namespace mozilla {
 
 template<class ValueType>
@@ -139,17 +140,17 @@ NormalizedConstraintSet::BooleanRange::B
 {
   if (aOther.IsBoolean()) {
     if (advanced) {
       mMin = mMax = aOther.GetAsBoolean();
     } else {
       mIdeal.emplace(aOther.GetAsBoolean());
     }
   } else {
-    const ConstrainBooleanParameters& r = aOther.GetAsConstrainBooleanParameters();
+    const dom::ConstrainBooleanParameters& r = aOther.GetAsConstrainBooleanParameters();
     if (r.mIdeal.WasPassed()) {
       mIdeal.emplace(r.mIdeal.Value());
     }
     if (r.mExact.WasPassed()) {
       mMin = r.mExact.Value();
       mMax = r.mExact.Value();
     }
   }
@@ -183,17 +184,17 @@ NormalizedConstraintSet::StringRange::St
     }
   } else {
     SetFrom(aOther.GetAsConstrainDOMStringParameters());
   }
 }
 
 void
 NormalizedConstraintSet::StringRange::SetFrom(
-    const ConstrainDOMStringParameters& aOther)
+    const dom::ConstrainDOMStringParameters& aOther)
 {
   if (aOther.mIdeal.WasPassed()) {
     mIdeal.clear();
     if (aOther.mIdeal.Value().IsString()) {
       mIdeal.insert(aOther.mIdeal.Value().GetAsString());
     } else {
       for (auto& str : aOther.mIdeal.Value().GetAsStringSequence()) {
         mIdeal.insert(str);
@@ -290,17 +291,17 @@ NormalizedConstraints::NormalizedConstra
 
 NormalizedConstraints::NormalizedConstraints(
     const nsTArray<const NormalizedConstraints*>& aOthers)
   : NormalizedConstraintSet(*aOthers[0])
   , mBadConstraint(nullptr)
 {
   // Create a list of member pointers.
   nsTArray<MemberPtrType> list;
-  NormalizedConstraints dummy(MediaTrackConstraints(), &list);
+  NormalizedConstraints dummy(dom::MediaTrackConstraints(), &list);
 
   // Do intersection of all required constraints, and average of ideals,
 
   for (uint32_t i = 1; i < aOthers.Length(); i++) {
     auto& other = *aOthers[i];
 
     for (auto& memberPtr : list) {
       auto& member = this->*memberPtr;
--- a/dom/media/webrtc/moz.build
+++ b/dom/media/webrtc/moz.build
@@ -28,17 +28,16 @@ if CONFIG['MOZ_WEBRTC']:
                 'MediaEngineRemoteVideoSource.h',
                 'MediaEngineWebRTC.h']
     EXPORTS.mozilla.dom += [ 'RTCIdentityProviderRegistrar.h' ]
     UNIFIED_SOURCES += [
         'MediaEngineCameraVideoSource.cpp',
         'MediaEngineRemoteVideoSource.cpp',
         'MediaEngineTabVideoSource.cpp',
         'MediaEngineWebRTCAudio.cpp',
-        'MediaTrackConstraints.cpp',
         'RTCCertificate.cpp',
         'RTCIdentityProviderRegistrar.cpp',
     ]
     # MediaEngineWebRTC.cpp needs to be built separately.
     SOURCES += [
         'MediaEngineWebRTC.cpp',
     ]
     LOCAL_INCLUDES += [
@@ -61,16 +60,17 @@ if CONFIG['MOZ_WEBRTC']:
         ]
 
 XPIDL_SOURCES += [
     'nsITabSource.idl'
 ]
 
 UNIFIED_SOURCES += [
     'MediaEngineDefault.cpp',
+    'MediaTrackConstraints.cpp',
     'PeerIdentity.cpp',
 ]
 
 EXPORTS.mozilla += [
     'PeerIdentity.h',
 ]
 EXPORTS.mozilla.dom += [
     'RTCCertificate.h',