Backed out changeset d0a586d4d64a (bug 1494498) for Windows MinGW bustages on MediaTrackConstraints.cpp
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Tue, 02 Oct 2018 04:43:30 +0300
changeset 494814 08125cd5d357b9da68af7a4b22122f07fc35243c
parent 494813 2c0daf489bc94c5cfb0e64cbaa193c110ae67289
child 494832 56b988a937689d5599400afa59b72c390b40abf2
child 494835 7c0eb6f58c1cf996836905df9696528a63b78d09
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1494498
milestone64.0a1
backs outd0a586d4d64a5bc6ae2679943621c05473d92ae3
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
Backed out changeset d0a586d4d64a (bug 1494498) for Windows MinGW bustages on MediaTrackConstraints.cpp
dom/media/webrtc/MediaEngineRemoteVideoSource.cpp
dom/media/webrtc/MediaTrackConstraints.cpp
--- a/dom/media/webrtc/MediaEngineRemoteVideoSource.cpp
+++ b/dom/media/webrtc/MediaEngineRemoteVideoSource.cpp
@@ -792,80 +792,43 @@ MediaEngineRemoteVideoSource::GetBestFit
   if (!candidateSet.Length()) {
     return UINT32_MAX;
   }
   TrimLessFitCandidates(candidateSet);
   return candidateSet[0].mDistance;
 }
 
 static void
-LogConstraintStringRange(const NormalizedConstraintSet::StringRange& aRange)
-{
-  if (aRange.mExact.size() <= 1 && aRange.mIdeal.size() <= 1) {
-    LOG(("  %s: { exact: [%s], ideal: [%s] }",
-         aRange.mName,
-         (aRange.mExact.size()? NS_ConvertUTF16toUTF8(*aRange.mExact.begin()).get() : ""),
-         (aRange.mIdeal.size()? NS_ConvertUTF16toUTF8(*aRange.mIdeal.begin()).get() : "")));
-  } else {
-    LOG(("  %s: { exact: [", aRange.mName));
-    for (auto& entry : aRange.mExact) {
-      LOG(("      %s,", NS_ConvertUTF16toUTF8(entry).get()));
-    }
-    LOG(("    ], ideal: ["));
-    for (auto& entry : aRange.mIdeal) {
-      LOG(("      %s,", NS_ConvertUTF16toUTF8(entry).get()));
-    }
-    LOG(("    ]}"));
-  }
-}
-
-template<typename T>
-static void
-LogConstraintRange(const NormalizedConstraintSet::Range<T>& aRange)
-{
-  if (aRange.mIdeal.isSome()) {
-    LOG(("  %s: { min: %d, max: %d, ideal: %d }",
-         aRange.mName, aRange.mMin, aRange.mMax, aRange.mIdeal.valueOr(0)));
-  } else {
-    LOG(("  %s: { min: %d, max: %d }",
-         aRange.mName, aRange.mMin, aRange.mMax));
-  }
-}
-
-template<>
-void
-LogConstraintRange(const NormalizedConstraintSet::Range<double>& aRange)
-{
-  if (aRange.mIdeal.isSome()) {
-    LOG(("  %s: { min: %f, max: %f, ideal: %f }",
-         aRange.mName, aRange.mMin, aRange.mMax, aRange.mIdeal.valueOr(0)));
-  } else {
-    LOG(("  %s: { min: %f, max: %f }",
-         aRange.mName, aRange.mMin, aRange.mMax));
-  }
-}
-
-static void
 LogConstraints(const NormalizedConstraintSet& aConstraints)
 {
   auto& c = aConstraints;
-  LOG(("Constraints: {"));
-  LOG(("%s", [&]() {
-    LogConstraintRange(c.mWidth);
-    LogConstraintRange(c.mHeight);
-    LogConstraintRange(c.mFrameRate);
-    LogConstraintStringRange(c.mMediaSource);
-    LogConstraintStringRange(c.mFacingMode);
-    LogConstraintStringRange(c.mDeviceId);
-    LogConstraintRange(c.mEchoCancellation);
-    LogConstraintRange(c.mAutoGainControl);
-    LogConstraintRange(c.mNoiseSuppression);
-    LogConstraintRange(c.mChannelCount);
-    return "}";
-  }()));
+  if (c.mWidth.mIdeal.isSome()) {
+    LOG(("Constraints: width: { min: %d, max: %d, ideal: %d }",
+         c.mWidth.mMin, c.mWidth.mMax,
+         c.mWidth.mIdeal.valueOr(0)));
+  } else {
+    LOG(("Constraints: width: { min: %d, max: %d }",
+         c.mWidth.mMin, c.mWidth.mMax));
+  }
+  if (c.mHeight.mIdeal.isSome()) {
+    LOG(("             height: { min: %d, max: %d, ideal: %d }",
+         c.mHeight.mMin, c.mHeight.mMax,
+         c.mHeight.mIdeal.valueOr(0)));
+  } else {
+    LOG(("             height: { min: %d, max: %d }",
+         c.mHeight.mMin, c.mHeight.mMax));
+  }
+  if (c.mFrameRate.mIdeal.isSome()) {
+    LOG(("             frameRate: { min: %f, max: %f, ideal: %f }",
+         c.mFrameRate.mMin, c.mFrameRate.mMax,
+         c.mFrameRate.mIdeal.valueOr(0)));
+  } else {
+    LOG(("             frameRate: { min: %f, max: %f }",
+         c.mFrameRate.mMin, c.mFrameRate.mMax));
+  }
 }
 
 static void
 LogCapability(const char* aHeader,
               const webrtc::CaptureCapability &aCapability,
               uint32_t aDistance)
 {
   // RawVideoType and VideoCodecType media/webrtc/trunk/webrtc/common_types.h
--- a/dom/media/webrtc/MediaTrackConstraints.cpp
+++ b/dom/media/webrtc/MediaTrackConstraints.cpp
@@ -476,17 +476,16 @@ MediaConstraintsHelper::FitnessDistance(
 
 /* static */ const char*
 MediaConstraintsHelper::SelectSettings(
     const NormalizedConstraints& aConstraints,
     nsTArray<RefPtr<MediaDevice>>& aDevices,
     bool aIsChrome)
 {
   auto& c = aConstraints;
-  LogConstraints(c);
 
   // First apply top-level constraints.
 
   // Stack constraintSets that pass, starting with the required one, because the
   // whole stack must be re-satisfied each time a capability-set is ruled out
   // (this avoids storing state or pushing algorithm into the lower-level code).
   nsTArray<RefPtr<MediaDevice>> unsatisfactory;
   nsTArray<const NormalizedConstraintSet*> aggregateConstraints;