Commit Graph

66 Commits

Author SHA1 Message Date
Karl Tomlinson
e1817de7e7 bug 1132328 make ReleaseDecoderTask conversion constructor explicit r=fix 2015-02-16 18:20:56 +13:00
Karl Tomlinson
a93e73597b bug 1095251 clear mDecoder on reader during Shutdown() r=cpearce 2015-02-10 15:50:02 +13:00
Karl Tomlinson
20f940df5a bug 1132328 remove mCurrentDecoder handling from RemoveDecoder() r=jya 2015-02-12 15:57:40 +13:00
Jean-Yves Avenard
51ab550327 Bug 1131433: Show codec/container type in MSE logs. r=cajbir
Also rationalize MSE debugging logs, so they all follow the same format.
2015-02-12 18:52:13 +11:00
Karl Tomlinson
02b83abea2 bug 1092915 document that mCurrentDecoder is modified on main thread only r=mattwoodrow 2015-02-11 11:30:39 +13:00
Matt Woodrow
8b5adf9f15 bug 1092915 modify mCurrentDecoder on main thread after RemoveDecoder r=karlt 2015-02-11 11:12:39 +13:00
Jean-Yves Avenard
372665c876 Bug 1130913: Only create a new decoder if we have a new media segment. r=mattwoodrow 2015-02-11 17:40:10 +11:00
Jean-Yves Avenard
e07694adb0 Bug 1131487: Adjust negative start time near 0 to 0. r=mattwoodrow 2015-02-11 17:40:06 +11:00
Jean-Yves Avenard
b7b65d5bb8 Bug 1131487: Fix time calculations when segment doesn't start at 0. r=mattwoodrow 2015-02-11 17:40:03 +11:00
Jean-Yves Avenard
25805626b7 Bug 1129732: Part3. Assume buffered range starting close enough to 0 to be 0. r=mattwoodrow 2015-02-09 23:29:00 +11:00
Jean-Yves Avenard
fb71392d00 Bug 1129732: Part1. Dynamically adjust calculations using timestampoffset. r=mattwoodrow
Timestamp Offset calculations are now done exclusively by the Media Source
components which allow to recalculate them on the fly. By abstracting those
offsets it remove the need for the sub-decoders to handle them (which allows
to add WebM support).
2015-02-09 23:28:59 +11:00
Jean-Yves Avenard
616049ba2a Bug 1125776: Part11. Fix potential crash. r=mattwoodrow.
Under some circumstances, it was possible for shutdown to have completed
right before the initialization task got to run. Resulting in a null
dereference.
2015-02-04 20:20:16 +11:00
Jean-Yves Avenard
00bc1aec0d Bug 1125776: Part10. Handle concurrent aborts. r=mattwoodrow
Under some circumstances, it was possible for a cancelled queued task to run
and the following one would have been cancelled.
Also add more robust handling in cancelling the trackbuffer initialization
task.
2015-02-04 20:20:16 +11:00
Jean-Yves Avenard
882199f026 Bug 1125776: Part9. Always attempt to create a new decoder if we don't have one. r=mattwoodrow
YouTube continues to call appendBuffer even when the previous call failed.
So we attempt to re-create a decoder where we can should it be a temporary
failure.
2015-02-04 20:20:16 +11:00
Jean-Yves Avenard
301b46619a Bug 1125776: Part8. We don't always need an init segment to be ready. r=mattwoodrow
If abort was called on the source buffer, the parser would have been reset.
The content in the Track Buffer is still valid for playback.
2015-02-04 20:20:16 +11:00
Jean-Yves Avenard
fdf83c97db Bug 1125776: Part7. Only notify reader we have data, when we actually do. r=mattwoodrow 2015-02-04 20:20:16 +11:00
Jean-Yves Avenard
04f33309e6 Bug 1122358: Implement partial reset parser. r=cajbir
Only handles resetting parser and incomplete init segments at this stage.
2015-02-04 20:20:16 +11:00
Jean-Yves Avenard
9a54b12b7a Bug 1125776: Part3. Add support for partial init segment. r=cajbir
Now that we rely on appendBuffer to scan the init segment, it has become
imperative to handle partial segments as it could otherwise lead to
appendBuffer never firing update/updateend
2015-02-02 11:41:43 +11:00
Jean-Yves Avenard
5a8ea7fce0 Bug 1125776: Part2. appendBuffer scanning the data before firing updateend. r=mattwoodrow 2015-02-04 20:20:15 +11:00
Jean-Yves Avenard
9264bf02f5 Bug 1125776: Part1. Fix initialization of variables. r=cajbir
They could be used when non-initialized.
2015-02-04 20:20:14 +11:00
Matt Woodrow
93e9b6aa5f Bug 1128179 - Avoiding crash when appending data after decoder initialization failed. r=jya 2015-02-03 09:44:46 +13:00
Bobby Holley
b8cefec2b4 Bug 1127203 - Use the tolerance value in TrackBuffersContainTime so that seeking operates with tolerance too. r=mattwoodrow 2015-01-30 17:45:49 -08:00
Jean-Yves Avenard
0917d55236 Backed out changeset 0e9b37fd47c6. Breaks w4 test on a CLOSED TREE r=me 2015-01-27 18:25:44 +11:00
Jean-Yves Avenard
884f338af9 Bug 1125581: Cache buffered TimeRanges and only recalculate as necessary. r=mattwoodrow
Also change the relationship between SourceBufferResource object and its callee.
Data is now required to be removed or added via the SourceBufferDecoder.
This fixes a potential race between the time we add data to the resource and
the time we retrieve the buffered time ranges.
2015-01-26 11:26:20 +11:00
Jean-Yves Avenard
4468d96bb0 Bug 1102642: Use ref counted compressed data within mediasource. r=mattwoodrow 2015-01-27 02:01:09 +11:00
Jean-Yves Avenard
4951ddb0cc Bug 1096089: MSE: Partially implement Range Removal algorithm. r=mattwoodrow, r=cajbir
Data is only properly evicted when we remove the entire buffered range.
Otherwise, only the buffered times are updated.
2015-01-24 21:45:58 +11:00
Ryan VanderMeulen
acfa9f385b Bug 1055904 - Fix non-unified bustage in TrackBuffer.cpp. 2015-01-20 22:17:49 -05:00
Jean-Yves Avenard
a9e0844336 Bug 1120086: Re-open SourceBuffer after call to appendBuffer if in ended state. r=cajbir 2015-01-16 23:48:25 +11:00
Jean-Yves Avenard
ceae6aafb0 Bug 1120084: Implement MSE's AppendErrorAlgorithm 2015-01-16 23:48:25 +11:00
Chris Double
feac1a10b3 Bug 1055904 - Improve MSE eviction calculation - r=jya
Fixes a bug in the SourceBufferResource eviction code where it was
using the mOffset of the resource as the min bound for what to evict.
This offset is almost always zero though due to ReadFromCache being
used which never updates the offset. This prevented eviction from
happening in most cases.

Moves the code to remove old decoders so that it does this during
the same loop as that which remove data from existing decoders.
This more aggressively prunes old decoders and is more likely to
keep data in the current playing decoder around for seeking, etc.

Prevent removing any decoder that the MediaSourceReader is
currently using for playback to prevent RemoveDecoder crashes.

Add a threshold to subtract from the current time when working out
the time bound to evict before to make it less likely to evict
current data that is needed for current playback.

Remove all data from evicted decoders in the initial iteration then
iterate after to remove empty decoders to put the RemoveDecoder
logic in one place.

Iterate decoders in order that they were added rather than sorted
by time so the logic that removes entire decoders can do it only
to those old decoders that existed before the existing one was
created.

Keeps track of the time that was evicted from the current decoder
and uses that as the time to EvictBefore for all decoders in the
track buffer when doing MediaSource::NotifyEvict.
2015-01-16 16:14:56 +13:00
Matt Woodrow
62bf7a89ee Bug 1119033 - Don't try to evict when we don't have any initialized decoders. r=ajones 2015-01-12 15:35:35 +13:00
Bobby Holley
3a84da82a8 Bug 1064128 - Implement support for timestampOffset in segments mode. r=k17e,r=cajbir 2015-01-07 15:58:55 -08:00
Bobby Holley
e068da71f1 Bug 1109437 - Implement non-polling buffering. r=cpearce 2014-12-22 00:20:31 -08:00
Bobby Holley
f61feaf2d2 Bug 1113282 - Check during async TrackBuffer decoder initialization to make sure we haven't been shut down. r=cajbir 2014-12-18 13:59:00 +01:00
Carsten "Tomcat" Book
8ad1c2cafd Backed out changeset 4757a1d4a23e (bug 1113282) for e10s M1 test failures 2014-12-19 09:00:07 +01:00
Bobby Holley
0ea6f6548c Bug 1113282 - Check during async TrackBuffer decoder initialization to make sure we haven't been shut down. r=cajbir 2014-12-18 22:26:52 -08:00
Matt Woodrow
b6daf653bc Bug 1112444 - Add a pref to force each appended MSE segment to be in its own decoder. r=ajones 2014-12-18 12:39:34 +13:00
Chris Pearce
996595bd74 Bug 1111387 - Nullcheck mTaskQueue in TrackBuffer::QueueInitializeDecoder, as we can shutdown in between dispatching and running the task that calls QueueInitializeDecoder. r=cajbir 2014-12-15 15:30:20 +13:00
Bobby Holley
2963d4eccb Bug 1109954 - Make resolve/reject values optional in callback signatures. r=cpearce 2014-12-12 14:22:23 -08:00
Bobby Holley
f9be8aa27b Backed out changeset 89c9d42ef78e (bug 1109954) for colliding with bug 1108701 on a CLOSED TREE. 2014-12-10 22:56:09 -08:00
Bobby Holley
6fb40adfa1 Bug 1109954 - Make resolve/reject values optional in callback signatures. r=cpearce 2014-12-10 22:38:33 -08:00
Matt Woodrow
f9fe8eb6e8 Bug 1108917 - Part 2: Allow eviction of entire decoders that are ahead of the current play position. r=ajones 2014-12-11 10:50:41 +13:00
Matt Woodrow
d8dde6710c Bug 1109431 - Apply TimestampsFuzzyEqual rounding to the buffered ranges returned from multiple decoders. r=ajones 2014-12-11 10:52:57 +13:00
Matt Woodrow
73a8fd2d78 Bug 1108917 - Part 1: Attempt to evict data from decoders in start-time order. r=ajones 2014-12-11 10:49:54 +13:00
Wes Kocher
0c67dbcd5e Backed out 2 changesets (bug 1108917) for mochitest-2 bustage on a CLOSED TREE
Backed out changeset e278ad9face8 (bug 1108917)
Backed out changeset 5c24dfe0cf87 (bug 1108917)
2014-12-10 15:53:21 -08:00
Wes Kocher
2edcfc5b3a Backed out changeset 0b71e08f9d34 (bug 1109431) for mochitest-2 bustage on a CLOSED TREE 2014-12-10 15:52:47 -08:00
Matt Woodrow
281e4e81e1 Bug 1109431 - Apply TimestampsFuzzyEqual rounding to the buffered ranges returned from multiple decoders. r=ajones
--HG--
extra : rebase_source : 1ca8f7910db619b90fdc9478bb0dc52a5d16693b
2014-12-11 10:52:57 +13:00
Matt Woodrow
34f332faca Bug 1108917 - Part 2: Allow eviction of entire decoders that are ahead of the current play position. r=ajones
--HG--
extra : rebase_source : fc7fbd06e9c0c65de1c5ecb07a7a355fe1f6fbe8
2014-12-11 10:50:41 +13:00
Matt Woodrow
57522ba383 Bug 1108917 - Part 1: Attempt to evict data from decoders in start-time order. r=ajones
--HG--
extra : rebase_source : c906ca08b4a984a7b3e2ef1cdcaea810b5f5777d
2014-12-11 10:49:54 +13:00
Karl Tomlinson
a2c5292fae bug 1108846 notify MediaSourceDecoder of bytes downloaded to trigger progress events r=kinetik
--HG--
extra : rebase_source : d13f3a9c46cce745cffc86a179875f34e7a52428
2014-12-10 10:45:06 +13:00