зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1214932 - Remove fragmented-mp4 from media prefs. r=jya
This commit is contained in:
Родитель
26afff5658
Коммит
83fed249a0
|
@ -319,7 +319,7 @@ pref("media.cache_readahead_limit", 30);
|
|||
|
||||
#ifdef MOZ_FMP4
|
||||
// Enable/Disable Gonk Decoder Module
|
||||
pref("media.fragmented-mp4.gonk.enabled", true);
|
||||
pref("media.gonk.enabled", true);
|
||||
#endif
|
||||
|
||||
//Encrypted media extensions.
|
||||
|
|
|
@ -1835,8 +1835,8 @@ pref("media.eme.apiVisible", true);
|
|||
|
||||
// If decoding-via-gmp is turned on for <video>, default to using
|
||||
// Adobe's GMP for decoding.
|
||||
pref("media.fragmented-mp4.gmp.aac", 2);
|
||||
pref("media.fragmented-mp4.gmp.h264", 2);
|
||||
pref("media.gmp.decoder.aac", 2);
|
||||
pref("media.gmp.decoder.h264", 2);
|
||||
|
||||
// Whether we should run a test-pattern through EME GMPs before assuming they'll
|
||||
// decode H.264.
|
||||
|
|
|
@ -176,7 +176,7 @@ MP4Decoder::CanHandleMediaType(const nsAString& aContentType)
|
|||
bool
|
||||
MP4Decoder::IsEnabled()
|
||||
{
|
||||
return Preferences::GetBool("media.fragmented-mp4.enabled");
|
||||
return Preferences::GetBool("media.mp4.enabled");
|
||||
}
|
||||
|
||||
static const uint8_t sTestH264ExtraData[] = {
|
||||
|
|
|
@ -30,7 +30,7 @@ public:
|
|||
, reader(new MP4Reader(decoder))
|
||||
{
|
||||
EXPECT_EQ(NS_OK, Preferences::SetBool(
|
||||
"media.fragmented-mp4.use-blank-decoder", true));
|
||||
"media.use-blank-decoder", true));
|
||||
|
||||
EXPECT_EQ(NS_OK, resource->Open(nullptr));
|
||||
decoder->SetResource(resource);
|
||||
|
|
|
@ -67,22 +67,22 @@ PDMFactory::Init()
|
|||
alreadyInitialized = true;
|
||||
|
||||
Preferences::AddBoolVarCache(&sUseBlankDecoder,
|
||||
"media.fragmented-mp4.use-blank-decoder");
|
||||
"media.use-blank-decoder");
|
||||
#ifdef MOZ_GONK_MEDIACODEC
|
||||
Preferences::AddBoolVarCache(&sGonkDecoderEnabled,
|
||||
"media.fragmented-mp4.gonk.enabled", false);
|
||||
"media.gonk.enabled", false);
|
||||
#endif
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
Preferences::AddBoolVarCache(&sAndroidMCDecoderEnabled,
|
||||
"media.fragmented-mp4.android-media-codec.enabled", false);
|
||||
"media.android-media-codec.enabled", false);
|
||||
Preferences::AddBoolVarCache(&sAndroidMCDecoderPreferred,
|
||||
"media.fragmented-mp4.android-media-codec.preferred", false);
|
||||
"media.android-media-codec.preferred", false);
|
||||
#endif
|
||||
|
||||
Preferences::AddBoolVarCache(&sGMPDecoderEnabled,
|
||||
"media.fragmented-mp4.gmp.enabled", false);
|
||||
"media.gmp.decoder.enabled", false);
|
||||
Preferences::AddBoolVarCache(&sFFmpegDecoderEnabled,
|
||||
"media.fragmented-mp4.ffmpeg.enabled", false);
|
||||
"media.ffmpeg.enabled", false);
|
||||
|
||||
Preferences::AddBoolVarCache(&sEnableFuzzingWrapper,
|
||||
"media.decoder.fuzzing.enabled", false);
|
||||
|
|
|
@ -42,7 +42,7 @@ class CDMProxy;
|
|||
//
|
||||
// A cross-platform decoder module that discards input and produces "blank"
|
||||
// output samples exists for testing, and is created when the pref
|
||||
// "media.fragmented-mp4.use-blank-decoder" is true.
|
||||
// "media.use-blank-decoder" is true.
|
||||
|
||||
class PlatformDecoderModule {
|
||||
public:
|
||||
|
|
|
@ -97,9 +97,9 @@ void
|
|||
GMPDecoderModule::Init()
|
||||
{
|
||||
Preferences::AddUintVarCache(&sPreferredAacGmp,
|
||||
"media.fragmented-mp4.gmp.aac", 0);
|
||||
"media.gmp.decoder.aac", 0);
|
||||
Preferences::AddUintVarCache(&sPreferredH264Gmp,
|
||||
"media.fragmented-mp4.gmp.h264", 0);
|
||||
"media.gmp.decoder.h264", 0);
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
|
|
@ -424,7 +424,7 @@ function SetupEMEPref(callback) {
|
|||
if (SpecialPowers.Services.appinfo.name == "B2G" ||
|
||||
!manifestVideo().canPlayType("video/mp4")) {
|
||||
// XXX remove once we have mp4 PlatformDecoderModules on all platforms.
|
||||
prefs.push([ "media.fragmented-mp4.use-blank-decoder", true ]);
|
||||
prefs.push([ "media.use-blank-decoder", true ]);
|
||||
}
|
||||
|
||||
SpecialPowers.pushPrefEnv({ "set" : prefs }, callback);
|
||||
|
|
|
@ -124,24 +124,20 @@ function IsJellyBeanOrLater() {
|
|||
return androidVersion >= 16;
|
||||
}
|
||||
|
||||
// Check whether we should expect the new MP4Reader-based support to work.
|
||||
function IsMP4ReaderAvailable() {
|
||||
var prefs = getPref("media.fragmented-mp4.enabled");
|
||||
return prefs && (IsWindowsVistaOrLater() || IsMacOSSnowLeopardOrLater() || IsJellyBeanOrLater());
|
||||
}
|
||||
|
||||
var haveMp4 = IsWindowsVistaOrLater() ||
|
||||
var haveMp4 = (getPref("media.wmf.enabled") && IsWindowsVistaOrLater()) ||
|
||||
IsMacOSSnowLeopardOrLater() ||
|
||||
IsJellyBeanOrLater() ||
|
||||
getPref("media.omx.enabled") ||
|
||||
getPref("media.gstreamer.enabled") ||
|
||||
IsMP4ReaderAvailable();
|
||||
// TODO: Add "getPref("media.plugins.enabled")" once MP4 works on Gingerbread.
|
||||
getPref("media.ffmpeg.enabled");
|
||||
|
||||
check_mp4(document.getElementById('v'), haveMp4);
|
||||
|
||||
var haveMp3 = getPref("media.directshow.enabled") ||
|
||||
(getPref("media.windows-media-foundation.enabled") && IsWindowsVistaOrLater()) ||
|
||||
getPref("media.gstreamer.enabled") ||
|
||||
getPref("media.apple.mp3.enabled");
|
||||
(getPref("media.wmf.enabled") && IsWindowsVistaOrLater()) ||
|
||||
getPref("media.gstreamer.enabled") ||
|
||||
getPref("media.ffmpeg.enabled") ||
|
||||
getPref("media.apple.mp3.enabled");
|
||||
check_mp3(document.getElementById('v'), haveMp3);
|
||||
|
||||
mediaTestCleanup();
|
||||
|
|
|
@ -27,9 +27,9 @@ function startTest() {
|
|||
}
|
||||
|
||||
var testPrefs = [
|
||||
['media.fragmented-mp4.gmp.aac', 1], // gmp-clearkey
|
||||
['media.fragmented-mp4.gmp.h264', 1], // gmp-clearkey
|
||||
['media.fragmented-mp4.gmp.enabled', true]
|
||||
['media.gmp.decoder.aac', 1], // gmp-clearkey
|
||||
['media.gmp.decoder.h264', 1], // gmp-clearkey
|
||||
['media.gmp.decoder.enabled', true]
|
||||
];
|
||||
|
||||
SpecialPowers.pushPrefEnv({'set': testPrefs}, startTest);
|
||||
|
|
|
@ -589,9 +589,8 @@ pref("media.cache_readahead_limit", 30);
|
|||
pref("media.video-queue.default-size", 3);
|
||||
|
||||
// Enable the MediaCodec PlatformDecoderModule by default.
|
||||
pref("media.fragmented-mp4.enabled", true);
|
||||
pref("media.fragmented-mp4.android-media-codec.enabled", true);
|
||||
pref("media.fragmented-mp4.android-media-codec.preferred", true);
|
||||
pref("media.android-media-codec.enabled", true);
|
||||
pref("media.android-media-codec.preferred", true);
|
||||
|
||||
// Enable MSE
|
||||
pref("media.mediasource.enabled", true);
|
||||
|
|
|
@ -581,10 +581,8 @@ pref("media.cache_readahead_limit", 30);
|
|||
pref("media.video-queue.default-size", 3);
|
||||
|
||||
// Enable the MediaCodec PlatformDecoderModule by default.
|
||||
pref("media.fragmented-mp4.exposed", true);
|
||||
pref("media.fragmented-mp4.enabled", true);
|
||||
pref("media.fragmented-mp4.android-media-codec.enabled", true);
|
||||
pref("media.fragmented-mp4.android-media-codec.preferred", true);
|
||||
pref("media.android-media-codec.enabled", true);
|
||||
pref("media.android-media-codec.preferred", true);
|
||||
|
||||
// Enable MSE
|
||||
pref("media.mediasource.enabled", true);
|
||||
|
|
|
@ -310,23 +310,26 @@ pref("media.hardware-video-decoding.enabled", true);
|
|||
pref("media.decoder.heuristic.dormant.enabled", true);
|
||||
pref("media.decoder.heuristic.dormant.timeout", 60000);
|
||||
|
||||
#ifdef MOZ_WMF
|
||||
pref("media.wmf.decoder.thread-count", -1);
|
||||
#endif
|
||||
#ifdef MOZ_DIRECTSHOW
|
||||
pref("media.directshow.enabled", true);
|
||||
#endif
|
||||
#ifdef MOZ_FMP4
|
||||
pref("media.fragmented-mp4.enabled", true);
|
||||
pref("media.fragmented-mp4.ffmpeg.enabled", true);
|
||||
pref("media.fragmented-mp4.gmp.enabled", false);
|
||||
pref("media.fragmented-mp4.gmp.aac", 0);
|
||||
pref("media.fragmented-mp4.gmp.h264", 0);
|
||||
// Specifies whether the fragmented MP4 parser uses a test decoder that
|
||||
pref("media.mp4.enabled", true);
|
||||
// Specifies whether the PDMFactory can create a test decoder that
|
||||
#endif
|
||||
// just outputs blank frames/audio instead of actually decoding. The blank
|
||||
// decoder works on all platforms.
|
||||
pref("media.fragmented-mp4.use-blank-decoder", false);
|
||||
pref("media.use-blank-decoder", false);
|
||||
#ifdef MOZ_WMF
|
||||
pref("media.wmf.enabled", true);
|
||||
pref("media.wmf.decoder.thread-count", -1);
|
||||
#endif
|
||||
#if defined(MOZ_FFMPEG)
|
||||
pref("media.ffmpeg.enabled", true);
|
||||
#endif
|
||||
pref("media.gmp.decoder.enabled", false);
|
||||
pref("media.gmp.decoder.aac", 0);
|
||||
pref("media.gmp.decoder.h264", 0);
|
||||
#ifdef MOZ_RAW
|
||||
pref("media.raw.enabled", true);
|
||||
#endif
|
||||
|
|
|
@ -171,13 +171,6 @@ user_pref("layout.spammy_warnings.enabled", false);
|
|||
user_pref("media.mediasource.mp4.enabled", true);
|
||||
user_pref("media.mediasource.webm.enabled", true);
|
||||
|
||||
// Enable fragmented MP4 parser for testing
|
||||
user_pref("media.fragmented-mp4.exposed", true);
|
||||
|
||||
#if defined(LINUX)
|
||||
user_pref("media.fragmented-mp4.ffmpeg.enabled", true);
|
||||
#endif
|
||||
|
||||
// Enable mozContacts
|
||||
user_pref("dom.mozContacts.enabled", true);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче