Always use MP4Reader/PDM in MediaSourceDecoder

RESOLVED FIXED in mozilla34

Status

()

Core
Audio/Video
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: kinetik, Assigned: kinetik)

Tracking

(Blocks: 1 bug)

Trunk
mozilla34
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
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.
(Assignee)

Comment 1

3 years ago
Created attachment 8460717 [details] [diff] [review]
Always use MP4Reader/PDM in MediaSourceDecoder.

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)
(Assignee)

Updated

3 years ago
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+
(Assignee)

Comment 3

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/4493663d7cfe
https://hg.mozilla.org/mozilla-central/rev/4493663d7cfe
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.