Backed out changeset 221ca54f4df0 (bug 1092096) for m2 test failures
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 04 Nov 2014 10:32:32 +0100
changeset 213909 a27e38c36cb0832a5d0e51ab6cf341bae5159032
parent 213908 954632f3b2d65bd82a1d8257557c4a81b4d1a570
child 213910 3d49b89181705eddc9d36b8a46fc73ed81c0469c
push id27768
push userkwierso@gmail.com
push dateWed, 05 Nov 2014 02:19:03 +0000
treeherdermozilla-central@a1823d3c7365 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1092096
milestone36.0a1
backs out221ca54f4df091b39f197f6805f4bfbd2d7af893
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 221ca54f4df0 (bug 1092096) for m2 test failures
dom/media/mediasource/MediaSource.cpp
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/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -408,24 +408,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