Closed Bug 1041919 Opened 11 years ago Closed 11 years ago

Always use MP4Reader/PDM in MediaSourceDecoder

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: kinetik, Assigned: kinetik)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

MP4Reader is hidden behind the prefs media.fragmented-mp4.exposed and media.fragmented-mp4.enabled. MSE always needs fragmented MP4 support, so change the code that instantiates Readers inside MSE to ignore those prefs and always use MP4Reader. Note that, on Linux at least, media.fragmented-mp4.ffmpeg.enabled will still need to be set before MP4 decoding will work.
the alternative was to pass an "is-this-for-MSE/ignore-pref" flag all the way down into the places where the fmp4 prefs are checked, which seemed uglier.
Attachment #8460717 - Flags: review?(cpearce)
Attachment #8460717 - Attachment description: Always use MP4Reader/PDM in MediaSourceDecoder. This is slightly gross, but → Always use MP4Reader/PDM in MediaSourceDecoder.
Comment on attachment 8460717 [details] [diff] [review] Always use MP4Reader/PDM in MediaSourceDecoder. Review of attachment 8460717 [details] [diff] [review]: ----------------------------------------------------------------- We will at some stage have to signal some (maybe via a parameter to MP4Reader's constructor?) that the MP4Reader needs to enforce the MP4 bitstream constraints required by MSE. ::: content/media/mediasource/MediaSourceDecoder.cpp @@ +431,5 @@ > + // PlatformDecoderModules is hidden behind prefs for regular video > + // elements, but we always want to use it for MSE, so instantiate it > + // directly here. > + if (aType.LowerCaseEqualsLiteral("video/mp4") || aType.LowerCaseEqualsLiteral("audio/mp4")) { > + MP4Decoder::IsEnabled(); // Ignore result, just forces PDM to initialize. Include the check for MP4Decoder::IsEnabled() in this if statement, otherwise you'll create the MP4Reader on WinXP when it can't actually decode.
Attachment #8460717 - Flags: review?(cpearce) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: