Reopens the MediaSource when SourceBuffer::Remove is called on an Ended
MediaSource. Only run the Range Removal algorithm when MediaSource
duration is changed instead of calling Remove on SourceBuffers.
Updates tests for the fact that update{start,end} can now be called
more than once due to DurationChange.
--HG--
extra : rebase_source : d4c96b982ffa9f5cd0b24e6e3a4ef5dffe9be6f6
Reopens the MediaSource when SourceBuffer::Remove is called on an Ended
MediaSource. Only run the Range Removal algorithm when MediaSource duration
is changed instead of calling Remove on SourceBuffers. Updates tests for the
fact that update{start,end} can now be called more than once due to DurationChange.
--HG--
extra : rebase_source : e718144ba2c36b4fa0194719e7f06fe6e931e292
Reopens the MediaSource when SourceBuffer::Remove is called on an Ended
MediaSource.
Only run the Range Removal algorithm when MediaSource duration is changed
instead of calling Remove on SourceBuffers.
Updates tests for the fact that update{start,end} can now be called
more than once due to DurationChange.
--HG--
extra : rebase_source : efe01de2f7c6be09b29e2e19d69d9943c9ab5e52
Duplicating state is never great, but this lets the reader make calculations
using this immutable state variable without involving the state machine. We
could alternatively punch a hole from MediaDecoderReader to
MediaDecoderStateMachine and access it there, but that would create tighter
coupling, and weird relationships for MSE.
Reopens the MediaSource when SourceBuffer::Remove is called on an Ended
MediaSource. Only run the Range Removal algorithm when MediaSource
duration is changed instead of calling Remove on SourceBuffers.
Updates tests for the fact that update{start,end} can now be called more than once due to DurationChange.
2014-11-12 15:53:43 +13:00
Chris Double ext:(%20with%20tweaks%20by%20Karl%20Tomlinson%20%3Ckarlt%2B%40karlt.net%3E)
mLast{Audio,Video}Time differs from the actual end time because of
Bug 1065207 - the duration of a WebM fragment is an estimate not the
actual duration. In the case of audio time an example of where they
differ would be the actual sample duration being small but the
previous sample being large. The buffered end time uses that last
sample duration as an estimate of the end time duration giving an end
time that is greater than mLastAudioTime, which is the actual sample
end time.
Reader switching is based on the buffered end time though so we can't use
the actual sample end time for switching comparison.
For this reason we use the end time from the buffers to compare if we
should switch readers in this patch. We also add an EOS_FUZZ_US to allow
for the fact that it is an estimate and can differ slightly from actual times.
--HG--
extra : rebase_source : 47149609119c5dcd1ca7374501dd7c1e285469ef