Mozilla Home
Privacy
Cookies
Legal
Bugzilla
Browse
Advanced Search
New Bug
Reports
Documentation
Log In
Log In with GitHub
or
Remember me
Browse
Advanced Search
New Bug
Reports
Documentation
Attachment 8692331 Details for
Bug 1169212
[patch]
Part 2: Advertise support for ADTS via DecoderTraits.
Bug-1169212---Part-2-Advertise-support-for-ADTS-vi.patch (text/plain), 2.89 KB, created by
u480271
(
hide
)
Description:
Part 2: Advertise support for ADTS via DecoderTraits.
Filename:
MIME Type:
Creator:
u480271
Size:
2.89 KB
patch
obsolete
># HG changeset patch ># User Dan Glastonbury <dglastonbury@mozilla.com> > >Bug 1169212 - Part 2: Advertise support for ADTS via DecoderTraits. r=jya > >for mimetype audio/aacp > >diff --git a/dom/media/DecoderTraits.cpp b/dom/media/DecoderTraits.cpp >index ad235cc..eeeb591 100644 >--- a/dom/media/DecoderTraits.cpp >+++ b/dom/media/DecoderTraits.cpp >@@ -60,16 +60,19 @@ > #include "MP4Decoder.h" > #include "MP4Demuxer.h" > #endif > #include "MediaFormatReader.h" > > #include "MP3Decoder.h" > #include "MP3Demuxer.h" > >+#include "ADTSDecoder.h" >+#include "ADTSDemuxer.h" >+ > namespace mozilla > { > > template <class String> > static bool > CodecListContains(char const *const * aCodecs, const String& aCodec) > { > for (int32_t i = 0; aCodecs[i]; ++i) { >@@ -361,16 +364,26 @@ IsMP3SupportedType(const nsACString& aType, > const nsAString& aCodecs = EmptyString()) > { > #ifdef MOZ_OMX_DECODER > return false; > #endif > return MP3Decoder::CanHandleMediaType(aType, aCodecs); > } > >+static bool >+IsAACSupportedType(const nsACString& aType, >+ const nsAString& aCodecs = EmptyString()) >+{ >+#ifdef MOZ_OMX_DECODER >+ return false; >+#endif >+ return ADTSDecoder::CanHandleMediaType(aType, aCodecs); >+} >+ > /* static */ > bool DecoderTraits::ShouldHandleMediaType(const char* aMIMEType) > { > #ifdef MOZ_WAVE > if (IsWaveType(nsDependentCString(aMIMEType))) { > // We should not return true for Wave types, since there are some > // Wave codecs actually in use in the wild that we don't support, and > // we should allow those to be handled by plugins or helper apps. >@@ -548,16 +561,20 @@ InstantiateDecoder(const nsACString& aType, MediaDecoderOwner* aOwner) > decoder = new MP4Decoder(aOwner); > return decoder.forget(); > } > #endif > if (IsMP3SupportedType(aType)) { > decoder = new MP3Decoder(aOwner); > return decoder.forget(); > } >+ if (IsAACSupportedType(aType)) { >+ decoder = new ADTSDecoder(aOwner); >+ return decoder.forget(); >+ } > #ifdef MOZ_GSTREAMER > if (IsGStreamerSupportedType(aType)) { > decoder = new GStreamerDecoder(aOwner); > return decoder.forget(); > } > #endif > #ifdef MOZ_RAW > if (IsRawType(aType)) { >@@ -657,16 +674,19 @@ MediaDecoderReader* DecoderTraits::CreateReader(const nsACString& aType, Abstrac > #ifdef MOZ_FMP4 > if (IsMP4SupportedType(aType)) { > decoderReader = new MediaFormatReader(aDecoder, new MP4Demuxer(aDecoder->GetResource())); > } else > #endif > if (IsMP3SupportedType(aType)) { > decoderReader = new MediaFormatReader(aDecoder, new mp3::MP3Demuxer(aDecoder->GetResource())); > } else >+ if (IsAACSupportedType(aType)) { >+ decoderReader = new MediaFormatReader(aDecoder, new adts::ADTSDemuxer(aDecoder->GetResource())); >+ } else > #ifdef MOZ_GSTREAMER > if (IsGStreamerSupportedType(aType)) { > decoderReader = new GStreamerReader(aDecoder); > } else > #endif > #ifdef MOZ_RAW > if (IsRawType(aType)) { > decoderReader = new RawReader(aDecoder); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Flags:
jya
: review-
Actions:
View
|
Diff
|
Review
Attachments on
bug 1169212
:
8692315
|
8692330
|
8692331
|
8692332
|
8692809
|
8693382
|
8693424
|
8693433
|
8695031
|
8695032
|
8695117
|
8707268
|
8707269
|
8714158
|
8715727
|
8715737