Open Bug 1314794 Opened 9 years ago Updated 3 years ago

Only use AndroidDecoderModule for particular codecs

Categories

(Core :: Audio/Video: Playback, defect, P3)

defect

Tracking

()

People

(Reporter: rillian, Unassigned)

References

Details

Attachments

(2 files, 1 obsolete file)

We prefer to use generic software decoders where the platform decoder doesn't have a specific advantage. This bug is a follow up to implement Jean-Yves review comment in https://bugzilla.mozilla.org/show_bug.cgi?id=1266792#c34 > I think it would be preferable to only call FindDecodercodecInfoForMimeType > for type we do want: e.g: h264, aac, mp3, vp9, vp8
Assignee: nobody → giles
Probably we need an equivalent of VPXDecoder::IsVPX(aMimeType) for the other codecs we want to support.
Comment on attachment 8806970 [details] Bug 1314794 - Add ADTSDecoder::IsAAC() call. https://reviewboard.mozilla.org/r/90206/#review89922 ::: dom/media/ADTSDecoder.cpp:46 (Diff revision 1) > +ADTSDecoder::IsAAC(const nsACString& aType) > +{ > + return aType.EqualsASCII("audio/aac") > + || aType.EqualsASCII("audio/aacp") > + || aType.EqualsASCII("audio/x-aac"); > +} Do I need to worry about "audio/mp4a-latm" here?
Attachment #8806969 - Flags: review?(jyavenard) → review+
Comment on attachment 8806969 [details] Bug 1314794 - Add MP3Decoder::IsMP3() call. https://reviewboard.mozilla.org/r/90204/#review90564 OOPS my bad... all those are the mimetype for the container, not the codec.
Attachment #8806969 - Flags: review+ → review-
Comment on attachment 8806970 [details] Bug 1314794 - Add ADTSDecoder::IsAAC() call. https://reviewboard.mozilla.org/r/90206/#review90566 those methods cant belong in the MediaDecoders really. Gerald has started to add new classes to help distinguish the mimetypes (container vs codec). Maybe it could belong there as statics ::: dom/media/ADTSDecoder.cpp:46 (Diff revision 1) > +ADTSDecoder::IsAAC(const nsACString& aType) > +{ > + return aType.EqualsASCII("audio/aac") > + || aType.EqualsASCII("audio/aacp") > + || aType.EqualsASCII("audio/x-aac"); > +} audio/mp4a-latm is the mimetype for the codec. audio/mpeg or audio/mp3 is the mimetype for the container. the mimetype used in the MediaDecoder have nothing to do with the mimetypes used by the MediaDataDecoder.
Attachment #8806970 - Flags: review?(jyavenard) → review-
Comment on attachment 8806971 [details] Bug 1314794 - Only use AndroidDecoderModule for particular codecs. https://reviewboard.mozilla.org/r/90208/#review90568 ::: dom/media/platforms/android/AndroidDecoderModule.cpp:164 (Diff revision 1) > - if (aMimeType.EqualsLiteral("audio/opus")) { > - LOG("Rejecting audio of type %s", aMimeType.Data()); > - return false; > - } > - > + // should use a platform-independent module. > + if (VPXDecoder::IsVP8(aMimeType) || > + VPXDecoder::IsVP9(aMimeType) || > + MP4Decoder::IsH264(aMimeType) || > + MP3Decoder::IsMP3(aMimeType) || > + ADTSDecoder::IsAAC(aMimeType)) { different mimetype, different decoder (MediaDataDecoder vs MediaDecoder)
Comment on attachment 8806970 [details] Bug 1314794 - Add ADTSDecoder::IsAAC() call. Bug 1314858 added MP4Decoder::IsAAC which we can use instead.
Attachment #8806970 - Attachment is obsolete: true
Comment on attachment 8806971 [details] Bug 1314794 - Only use AndroidDecoderModule for particular codecs. https://reviewboard.mozilla.org/r/90208/#review91896 I was only waiting for the new version, but it's making noise in my pending list of review... so for now...
Attachment #8806971 - Flags: review?(jyavenard) → review-
Yeah, sorry I haven't gotten back to it yet.
I never followed up on this and won't be able to complete it. Free for anyone else to take over.
Assignee: giles → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: