Bug 1213173: Always use FFmpeg regardless of version. r=kentuckyfriedtakahe

We don't need to prevent using FFmpegDecoderModule on older version anymore
This commit is contained in:
Jean-Yves Avenard 2015-10-12 10:00:04 +11:00
parent 6c3bd3d921
commit d8a8bf0881
6 changed files with 10 additions and 16 deletions

View File

@ -49,6 +49,8 @@ bool PDMFactory::sGonkDecoderEnabled = false;
bool PDMFactory::sAndroidMCDecoderEnabled = false;
bool PDMFactory::sAndroidMCDecoderPreferred = false;
bool PDMFactory::sGMPDecoderEnabled = false;
bool PDMFactory::sFFmpegDecoderEnabled = false;
bool PDMFactory::sEnableFuzzingWrapper = false;
uint32_t PDMFactory::sVideoOutputMinimumInterval_ms = 0;
bool PDMFactory::sDontDelayInputExhausted = false;
@ -79,6 +81,8 @@ PDMFactory::Init()
Preferences::AddBoolVarCache(&sGMPDecoderEnabled,
"media.fragmented-mp4.gmp.enabled", false);
Preferences::AddBoolVarCache(&sFFmpegDecoderEnabled,
"media.fragmented-mp4.ffmpeg.enabled", false);
Preferences::AddBoolVarCache(&sEnableFuzzingWrapper,
"media.decoder.fuzzing.enabled", false);
@ -204,8 +208,10 @@ PDMFactory::CreatePDMs()
StartupPDM(m);
#endif
#ifdef MOZ_FFMPEG
m = FFmpegRuntimeLinker::CreateDecoderModule();
StartupPDM(m);
if (sFFmpegDecoderEnabled) {
m = FFmpegRuntimeLinker::CreateDecoderModule();
StartupPDM(m);
}
#endif
#ifdef MOZ_APPLEMEDIA
m = new AppleDecoderModule();

View File

@ -60,6 +60,7 @@ private:
static bool sAndroidMCDecoderPreferred;
static bool sAndroidMCDecoderEnabled;
static bool sGMPDecoderEnabled;
static bool sFFmpegDecoderEnabled;
static bool sEnableFuzzingWrapper;
static uint32_t sVideoOutputMinimumInterval_ms;
static bool sDontDelayInputExhausted;

View File

@ -10,7 +10,6 @@
#include "PlatformDecoderModule.h"
#include "FFmpegAudioDecoder.h"
#include "FFmpegH264Decoder.h"
#include "FFmpegRuntimeLinker.h"
namespace mozilla
{
@ -22,11 +21,6 @@ public:
static already_AddRefed<PlatformDecoderModule>
Create()
{
uint32_t major, minor;
GetVersion(major, minor);
if (major < 54 && !FFmpegRuntimeLinker::sFFmpegDecoderEnabled) {
return nullptr;
}
nsRefPtr<PlatformDecoderModule> pdm = new FFmpegDecoderModule();
return pdm.forget();

View File

@ -16,8 +16,6 @@
namespace mozilla
{
bool FFmpegRuntimeLinker::sFFmpegDecoderEnabled = false;
FFmpegRuntimeLinker::LinkStatus FFmpegRuntimeLinker::sLinkStatus =
LinkStatus_INIT;
@ -62,9 +60,6 @@ FFmpegRuntimeLinker::Link()
return sLinkStatus == LinkStatus_SUCCEEDED;
}
Preferences::AddBoolVarCache(&sFFmpegDecoderEnabled,
"media.fragmented-mp4.ffmpeg.enabled", false);
MOZ_ASSERT(NS_IsMainThread());
for (size_t i = 0; i < ArrayLength(sLibs); i++) {

View File

@ -22,8 +22,6 @@ public:
static void Unlink();
static already_AddRefed<PlatformDecoderModule> CreateDecoderModule();
static bool sFFmpegDecoderEnabled;
private:
static void* sLinkedLib;
static const AvCodecLib* sLib;

View File

@ -320,7 +320,7 @@ pref("media.directshow.enabled", true);
#endif
#ifdef MOZ_FMP4
pref("media.fragmented-mp4.enabled", true);
pref("media.fragmented-mp4.ffmpeg.enabled", false);
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);