Closed Bug 928765 Opened 7 years ago Closed 7 years ago

Create MediaDecoderReader::GetBuffered() base implementation that estimates buffered ranges

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: cpearce, Assigned: cpearce)

Details

Attachments

(1 file)

Every MediaDecoderReader backend that has to estimate the buffered ranges using GetEstimatedBufferedTimeRanges() ends up reimplementing the same stub to call GetEstimatedBufferedTimeRanges().

We can instead implement this stub in MediaDecoderReader::GetBuffered(). Backends that can make a more accurate buffered ranges calculation override GetBuffered() as usual, and those that can't don't need to re-implement the code that calls GetEstimatedBufferedTimeRanges().
Attached patch PatchSplinter Review
Patch.

The only behaviour change here is in MediaPluginReader::GetBuffered(), where we use the duration as per the MediaDecoder rather than as per the plugin, but I think that that's not actually a behaviour change, since the decoder should have received the duration from the plugin anyway?
Attachment #819509 - Flags: review?(chris.double)
Attachment #819509 - Flags: review?(chris.double) → review+
https://hg.mozilla.org/mozilla-central/rev/23c23b472a4f
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.