Bug 1026704 - Prefer FMP4 over GStreamer. r=rillian

This change has to be made because FMP4 is meant to take over GStreamer for MP4 file format. This way, FMP4 will be instantiated by default over GStreamer if both tools work (on a certain Linux platform).
This commit is contained in:
Corentin Cos 2014-06-17 00:32:18 +02:00
parent 82d06dcba1
commit 27b5e982a8

View File

@ -487,6 +487,12 @@ InstantiateDecoder(const nsACString& aType, MediaDecoderOwner* aOwner)
{
nsRefPtr<MediaDecoder> decoder;
#ifdef MOZ_FMP4
if (IsMP4SupportedType(aType)) {
decoder = new MP4Decoder();
return decoder.forget();
}
#endif
#ifdef MOZ_GSTREAMER
if (IsGStreamerSupportedType(aType)) {
decoder = new GStreamerDecoder();
@ -557,12 +563,6 @@ InstantiateDecoder(const nsACString& aType, MediaDecoderOwner* aOwner)
return decoder.forget();
}
#endif
#ifdef MOZ_FMP4
if (IsMP4SupportedType(aType)) {
decoder = new MP4Decoder();
return decoder.forget();
}
#endif
#ifdef MOZ_WMF
if (IsWMFSupportedType(aType)) {
decoder = new WMFDecoder();
@ -597,6 +597,11 @@ MediaDecoderReader* DecoderTraits::CreateReader(const nsACString& aType, Abstrac
{
MediaDecoderReader* decoderReader = nullptr;
#ifdef MOZ_FMP4
if (IsMP4SupportedType(aType)) {
decoderReader = new MP4Reader(aDecoder);
} else
#endif
#ifdef MOZ_GSTREAMER
if (IsGStreamerSupportedType(aType)) {
decoderReader = new GStreamerReader(aDecoder);
@ -638,11 +643,6 @@ MediaDecoderReader* DecoderTraits::CreateReader(const nsACString& aType, Abstrac
decoderReader = new DirectShowReader(aDecoder);
} else
#endif
#ifdef MOZ_FMP4
if (IsMP4SupportedType(aType)) {
decoderReader = new MP4Reader(aDecoder);
} else
#endif
#ifdef MOZ_WMF
if (IsWMFSupportedType(aType)) {
decoderReader = new WMFReader(aDecoder);