Backed out changeset 1d058cefd04f (bug 1092096) for m2 test failures
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 06 Nov 2014 13:19:59 +0100
changeset 214387 b24744aa87da29de3cb944720c5931a5ba4e9ed0
parent 214386 1335f11d11ef0947e68c742097fd074f01fdfd3e
child 214388 7ebb820f3cca0d8c11c56f54c9e5e4a26b55cdec
push id27780
push userkwierso@gmail.com
push dateFri, 07 Nov 2014 02:25:05 +0000
treeherdermozilla-central@e6d47abb6a7b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1092096
milestone36.0a1
backs out1d058cefd04fa318209dfdac32a37ba36a25992f
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 1d058cefd04f (bug 1092096) for m2 test failures
dom/media/mediasource/MediaSource.cpp
dom/media/test/test_eme_canvas_blocked.html
dom/media/test/test_eme_playback.html
dom/media/test/test_eme_stream_capture_blocked.html
modules/libpref/init/all.js
--- a/dom/media/mediasource/MediaSource.cpp
+++ b/dom/media/mediasource/MediaSource.cpp
@@ -58,48 +58,53 @@ PRLogModuleInfo* GetMediaSourceAPILog()
 #endif
 
 // Arbitrary limit.
 static const unsigned int MAX_SOURCE_BUFFERS = 16;
 
 namespace mozilla {
 
 static const char* const gMediaSourceTypes[6] = {
+// XXX: Disabled other temporarily on desktop to allow WebM testing.  For now,
+// set the developer-only media.mediasource.ignore_codecs pref to true to test
+// other codecs, and expect things to be broken.
+//
+// Disabled WebM in favour of MP4 on Firefox OS.
+#ifdef MOZ_GONK_MEDIACODEC
   "video/mp4",
   "audio/mp4",
+#else
   "video/webm",
   "audio/webm",
+#endif
+#if 0
+  "audio/mpeg",
+#endif
   nullptr
 };
 
 static nsresult
 IsTypeSupported(const nsAString& aType)
 {
   if (aType.IsEmpty()) {
     return NS_ERROR_DOM_INVALID_ACCESS_ERR;
   }
+  if (Preferences::GetBool("media.mediasource.ignore_codecs", false)) {
+    return NS_OK;
+  }
+  // TODO: Further restrict this to formats in the spec.
   nsContentTypeParser parser(aType);
   nsAutoString mimeType;
   nsresult rv = parser.GetType(mimeType);
   if (NS_FAILED(rv)) {
     return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
   }
   bool found = false;
   for (uint32_t i = 0; gMediaSourceTypes[i]; ++i) {
     if (mimeType.EqualsASCII(gMediaSourceTypes[i])) {
-      if ((mimeType.EqualsASCII("video/mp4") ||
-           mimeType.EqualsASCII("audio/mp4")) &&
-          !Preferences::GetBool("media.mediasource.mp4.enabled", false)) {
-        break;
-      }
-      if ((mimeType.EqualsASCII("video/webm") ||
-           mimeType.EqualsASCII("audio/webm")) &&
-          !Preferences::GetBool("media.mediasource.webm.enabled", false)) {
-        break;
-      }
       found = true;
       break;
     }
   }
   if (!found) {
     return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
   }
   // Check aType against HTMLMediaElement list of MIME types.  Since we've
--- a/dom/media/test/test_eme_canvas_blocked.html
+++ b/dom/media/test/test_eme_canvas_blocked.html
@@ -44,17 +44,17 @@ function startTest(test, token)
 }
 
 function beginTest() {
   manager.runTests(gEMETests, startTest);
 }
 
 var prefs = [
   [ "media.mediasource.enabled", true ],
-  [ "media.mediasource.mp4.enabled", true ],
+  [ "media.mediasource.ignore_codecs", true ],
 ];
 
 if (/Linux/.test(navigator.userAgent) ||
     !document.createElement('video').canPlayType("video/mp4")) {
   // XXX remove once we have mp4 PlatformDecoderModules on all platforms.
   prefs.push([ "media.fragmented-mp4.exposed", true ]);
   prefs.push([ "media.fragmented-mp4.use-blank-decoder", true ]);
 }
--- a/dom/media/test/test_eme_playback.html
+++ b/dom/media/test/test_eme_playback.html
@@ -105,17 +105,17 @@ function testIsTypeSupported()
 
 function beginTest() {
   testIsTypeSupported();
   manager.runTests(gEMETests, startTest);
 }
 
 var prefs = [
   [ "media.mediasource.enabled", true ],
-  [ "media.mediasource.mp4.enabled", true ],
+  [ "media.mediasource.ignore_codecs", true ],
 ];
 
 if (/Linux/.test(navigator.userAgent) ||
     !document.createElement('video').canPlayType("video/mp4")) {
   // XXX remove once we have mp4 PlatformDecoderModules on all platforms.
   prefs.push([ "media.fragmented-mp4.exposed", true ]);
   prefs.push([ "media.fragmented-mp4.use-blank-decoder", true ]);
 }
--- a/dom/media/test/test_eme_stream_capture_blocked.html
+++ b/dom/media/test/test_eme_stream_capture_blocked.html
@@ -79,17 +79,17 @@ function startTest(test, token)
 }
 
 function beginTest() {
   manager.runTests(gEMETests, startTest);
 }
 
 var prefs = [
   [ "media.mediasource.enabled", true ],
-  [ "media.mediasource.mp4.enabled", true ],
+  [ "media.mediasource.ignore_codecs", true ],
 ];
 
 if (/Linux/.test(navigator.userAgent) ||
     !document.createElement('video').canPlayType("video/mp4")) {
   // XXX remove once we have mp4 PlatformDecoderModules on all platforms.
   prefs.push([ "media.fragmented-mp4.exposed", true ]);
   prefs.push([ "media.fragmented-mp4.use-blank-decoder", true ]);
 }
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -415,24 +415,16 @@ pref("media.track.enabled", false);
 
 // Whether to enable MediaSource support
 #ifdef RELEASE_BUILD
 pref("media.mediasource.enabled", false);
 #else
 pref("media.mediasource.enabled", true);
 #endif
 
-#ifdef MOZ_WIDGET_GONK
-pref("media.mediasource.mp4.enabled", false);
-pref("media.mediasource.webm.enabled", false);
-#else
-pref("media.mediasource.mp4.enabled", false);
-pref("media.mediasource.webm.enabled", true);
-#endif
-
 #ifdef MOZ_WEBSPEECH
 pref("media.webspeech.recognition.enable", false);
 pref("media.webspeech.synth.enabled", false);
 #endif
 #ifdef MOZ_WEBM_ENCODER
 pref("media.encoder.webm.enabled", true);
 #endif
 #ifdef MOZ_OMX_ENCODER