Bug 1214932 - Add exclusion guards for platform specific media pref caches. r=jya

This commit is contained in:
Chris Pearce 2015-10-15 14:51:31 +13:00
parent 7ef031ca11
commit a45926bb25
2 changed files with 15 additions and 1 deletions

View File

@ -45,11 +45,17 @@ extern already_AddRefed<PlatformDecoderModule> CreateAgnosticDecoderModule();
extern already_AddRefed<PlatformDecoderModule> CreateBlankDecoderModule();
bool PDMFactory::sUseBlankDecoder = false;
#ifdef MOZ_GONK_MEDIACODEC
bool PDMFactory::sGonkDecoderEnabled = false;
#endif
#ifdef MOZ_WIDGET_ANDROID
bool PDMFactory::sAndroidMCDecoderEnabled = false;
bool PDMFactory::sAndroidMCDecoderPreferred = false;
#endif
bool PDMFactory::sGMPDecoderEnabled = false;
#ifdef MOZ_FFMPEG
bool PDMFactory::sFFmpegDecoderEnabled = false;
#endif
bool PDMFactory::sEnableFuzzingWrapper = false;
uint32_t PDMFactory::sVideoOutputMinimumInterval_ms = 0;
@ -81,8 +87,10 @@ PDMFactory::Init()
Preferences::AddBoolVarCache(&sGMPDecoderEnabled,
"media.gmp.decoder.enabled", false);
#ifdef MOZ_FFMPEG
Preferences::AddBoolVarCache(&sFFmpegDecoderEnabled,
"media.ffmpeg.enabled", false);
#endif
Preferences::AddBoolVarCache(&sEnableFuzzingWrapper,
"media.decoder.fuzzing.enabled", false);

View File

@ -54,13 +54,19 @@ private:
// Returns the first PDM in our list supporting the mimetype.
already_AddRefed<PlatformDecoderModule> GetDecoder(const nsACString& aMimeType);
// Caches pref media.fragmented-mp4.use-blank-decoder
// PDM pref caches...
static bool sUseBlankDecoder;
#ifdef MOZ_GONK_MEDIACODEC
static bool sGonkDecoderEnabled;
#endif
#ifdef MOZ_WIDGET_ANDROID
static bool sAndroidMCDecoderPreferred;
static bool sAndroidMCDecoderEnabled;
#endif
static bool sGMPDecoderEnabled;
#ifdef MOZ_FFMPEG
static bool sFFmpegDecoderEnabled;
#endif
static bool sEnableFuzzingWrapper;
static uint32_t sVideoOutputMinimumInterval_ms;
static bool sDontDelayInputExhausted;