From 973a02af33613bd3af9bd11e08ddd04ac655daae Mon Sep 17 00:00:00 2001 From: Blake Wu Date: Thu, 9 Apr 2015 14:02:41 +0800 Subject: [PATCH] Bug 1146729 - [FFOS] Enable MP4Reader for MSE and local playback. r=cpearce. --- dom/media/DecoderTraits.cpp | 8 +------- dom/media/fmp4/MP4Decoder.cpp | 4 ++++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dom/media/DecoderTraits.cpp b/dom/media/DecoderTraits.cpp index 93c0b6caad9..71dde82879d 100644 --- a/dom/media/DecoderTraits.cpp +++ b/dom/media/DecoderTraits.cpp @@ -350,16 +350,10 @@ static bool IsMP4SupportedType(const nsACString& aType, const nsAString& aCodecs = EmptyString()) { -// Currently on B2G, FMP4 is only working for MSE playback. -// For other normal MP4, it still uses current omx decoder. -// Bug 1061034 is a follow-up bug to enable all MP4s with MOZ_FMP4 -#ifdef MOZ_OMX_DECODER - return false; -#else + // MP4Decoder/Reader is currently used for MSE and mp4 files local playback. bool haveAAC, haveMP3, haveH264; return Preferences::GetBool("media.fragmented-mp4.exposed", false) && MP4Decoder::CanHandleMediaType(aType, aCodecs, haveAAC, haveH264, haveMP3); -#endif } #endif diff --git a/dom/media/fmp4/MP4Decoder.cpp b/dom/media/fmp4/MP4Decoder.cpp index e3abc08bcd7..90b9fd7e2bb 100644 --- a/dom/media/fmp4/MP4Decoder.cpp +++ b/dom/media/fmp4/MP4Decoder.cpp @@ -209,7 +209,11 @@ IsAndroidAvailable() static bool IsGonkMP4DecoderAvailable() { +#ifndef MOZ_GONK_MEDIACODEC + return false; +#else return Preferences::GetBool("media.fragmented-mp4.gonk.enabled", false); +#endif } static bool