Bug 794282 - Enable gstreamer by default in builds, but pref off r=cpearce,khuey
☠☠ backed out by 2e1acd3b9ce8 ☠ ☠
authorEdwin Flores <eflores@mozilla.com>
Wed, 19 Jun 2013 10:22:30 +1200
changeset 147021 a73bc11da47154d10a70f9efc7320d02231f07e7
parent 147020 9173dcf026eeea673ee03428702a3f52e4d1c17d
child 147022 2f6babcfa00e7c335119ba4a069bc0d4436fc9e1
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, khuey
bugs794282
milestone24.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 794282 - Enable gstreamer by default in builds, but pref off r=cpearce,khuey
configure.in
content/media/gstreamer/GStreamerDecoder.cpp
content/media/test/manifest.js
modules/libpref/src/init/all.js
--- a/configure.in
+++ b/configure.in
@@ -5750,16 +5750,20 @@ fi
 
 AC_SUBST(MOZ_PULSEAUDIO)
 AC_SUBST(MOZ_PULSEAUDIO_CFLAGS)
 AC_SUBST(MOZ_PULSEAUDIO_LIBS)
 
 dnl ========================================================
 dnl = Enable GStreamer
 dnl ========================================================
+if test "$OS_TARGET" = "Linux"; then
+  MOZ_GSTREAMER=1
+fi
+
 MOZ_ARG_ENABLE_BOOL(gstreamer,
 [  --enable-gstreamer           Enable GStreamer support],
 MOZ_GSTREAMER=1,
 MOZ_GSTREAMER=)
 
 if test "$MOZ_GSTREAMER"; then
     # API version, eg 0.10, 1.0 etc
     GST_API_VERSION=0.10
--- a/content/media/gstreamer/GStreamerDecoder.cpp
+++ b/content/media/gstreamer/GStreamerDecoder.cpp
@@ -15,13 +15,14 @@ MediaDecoderStateMachine* GStreamerDecod
 {
   return new MediaDecoderStateMachine(this, new GStreamerReader(this));
 }
 
 bool
 GStreamerDecoder::CanHandleMediaType(const nsACString& aMIMEType,
                                      const nsAString* aCodecs)
 {
-  return GStreamerFormatHelper::Instance()->CanHandleMediaType(aMIMEType, aCodecs);
+  return MediaDecoder::IsGStreamerEnabled() &&
+    GStreamerFormatHelper::Instance()->CanHandleMediaType(aMIMEType, aCodecs);
 }
 
 } // namespace mozilla
 
--- a/content/media/test/manifest.js
+++ b/content/media/test/manifest.js
@@ -690,27 +690,33 @@ function mediaTestCleanup() {
 (function() {
   // Ensure that preload preferences are comsistent
   var prefService = SpecialPowers.wrap(SpecialPowers.Components)
                                  .classes["@mozilla.org/preferences-service;1"]
                                  .getService(SpecialPowers.Ci.nsIPrefService);
   var branch = prefService.getBranch("media.");
   var oldDefault = 2;
   var oldAuto = 3;
+  var oldGStreamer = undefined;
   var oldOpus = undefined;
-  try {
-    oldDefault = branch.getIntPref("preload.default");
-    oldAuto    = branch.getIntPref("preload.auto");
-    oldOpus    = branch.getBoolPref("opus.enabled");
-  } catch(ex) { }
+
+  try { oldGStreamer = branch.getBoolPref("gstreamer.enabled"); } catch(ex) { }
+  try { oldDefault   = branch.getIntPref("preload.default"); } catch(ex) { }
+  try { oldAuto      = branch.getIntPref("preload.auto"); } catch(ex) { }
+  try { oldOpus      = branch.getBoolPref("opus.enabled"); } catch(ex) { }
+
   branch.setIntPref("preload.default", 2); // preload_metadata
   branch.setIntPref("preload.auto", 3); // preload_enough
   // test opus playback iff the pref exists
   if (oldOpus !== undefined)
     branch.setBoolPref("opus.enabled", true);
+  if (oldGStreamer !== undefined)
+    branch.setBoolPref("gstreamer.enabled", true);
 
   window.addEventListener("unload", function() {
+    if (oldGStreamer !== undefined)
+      branch.setBoolPref("gstreamer.enabled", oldGStreamer);
     branch.setIntPref("preload.default", oldDefault);
     branch.setIntPref("preload.auto", oldAuto);
     if (oldOpus !== undefined)
       branch.setBoolPref("opus.enabled", oldOpus);
   }, false);
  })();
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -173,17 +173,17 @@ pref("media.wave.enabled", true);
 #endif
 #ifdef MOZ_WEBM
 pref("media.webm.enabled", true);
 #endif
 #ifdef MOZ_DASH
 pref("media.dash.enabled", false);
 #endif
 #ifdef MOZ_GSTREAMER
-pref("media.gstreamer.enabled", true);
+pref("media.gstreamer.enabled", false);
 #endif
 #ifdef MOZ_WEBRTC
 pref("media.navigator.enabled", true);
 pref("media.navigator.video.default_width",640);
 pref("media.navigator.video.default_height",480);
 pref("media.navigator.video.default_fps",30);
 pref("media.navigator.video.default_minfps",10);
 pref("media.peerconnection.enabled", true);