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

RESOLVED FIXED in mozilla27

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: cpearce, Assigned: cpearce)

Tracking

Trunk
mozilla27
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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().
Posted 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: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.