Bug 861090 - Add pref to disable playback of MPEG files in nsVideoDocument using WMF. r=?padenot
authorChris Pearce <cpearce@mozilla.com>
Fri, 21 Jun 2013 11:16:55 +1200
changeset 147410 0d4b46a6de4c542f41b1960f2afd1ef124a53c95
parent 147409 8066ebe02e0bb809eeead2aef7dfec20b2c163d4
child 147411 e5545791f9c2ddcf6397bc53f90a2b9cdf541afe
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)
bugs861090
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 861090 - Add pref to disable playback of MPEG files in nsVideoDocument using WMF. r=?padenot
content/media/DecoderTraits.cpp
modules/libpref/src/init/all.js
--- a/content/media/DecoderTraits.cpp
+++ b/content/media/DecoderTraits.cpp
@@ -2,16 +2,17 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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 "DecoderTraits.h"
 #include "MediaDecoder.h"
 #include "nsCharSeparatedTokenizer.h"
+#include "mozilla/Preferences.h"
 
 #ifdef MOZ_MEDIA_PLUGINS
 #include "MediaPluginHost.h"
 #endif
 
 #ifdef MOZ_OGG
 #include "OggDecoder.h"
 #include "OggReader.h"
@@ -24,17 +25,16 @@
 #include "WebMDecoder.h"
 #include "WebMReader.h"
 #endif
 #ifdef MOZ_RAW
 #include "RawDecoder.h"
 #include "RawReader.h"
 #endif
 #ifdef MOZ_GSTREAMER
-#include "mozilla/Preferences.h"
 #include "GStreamerDecoder.h"
 #include "GStreamerReader.h"
 #endif
 #ifdef MOZ_MEDIA_PLUGINS
 #include "MediaPluginHost.h"
 #include "MediaPluginDecoder.h"
 #include "MediaPluginReader.h"
 #include "MediaPluginHost.h"
@@ -528,14 +528,15 @@ bool DecoderTraits::IsSupportedInVideoDo
 #endif
 #ifdef MOZ_GSTREAMER
     IsGStreamerSupportedType(aType) ||
 #endif
 #ifdef MOZ_MEDIA_PLUGINS
     (MediaDecoder::IsMediaPluginsEnabled() && IsMediaPluginsType(aType)) ||
 #endif
 #ifdef MOZ_WMF
-    IsWMFSupportedType(aType) ||
+    (IsWMFSupportedType(aType) &&
+     Preferences::GetBool("media.windows-media-foundation.play-stand-alone", true)) ||
 #endif
     false;
 }
 
 }
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -162,16 +162,17 @@ pref("media.cache_size", 512000);
 pref("media.volume_scale", "1.0");
 
 // Timeout for wakelock release
 pref("media.wakelock_timeout", 2000);
 
 #ifdef MOZ_WMF
 pref("media.windows-media-foundation.enabled", true);
 pref("media.windows-media-foundation.use-dxva", true);
+pref("media.windows-media-foundation.play-stand-alone", true);
 #endif
 #ifdef MOZ_RAW
 pref("media.raw.enabled", true);
 #endif
 #ifdef MOZ_OGG
 pref("media.ogg.enabled", true);
 #endif
 #ifdef MOZ_OPUS