Commit Graph

103 Commits

Author SHA1 Message Date
Jean-Yves Avenard
1e96adcc55 Bug 1125469: Part3. Make sure we stop dropping frames from previous operation after seeking. r=mattwoodrow 2015-02-09 23:29:01 +11:00
Jean-Yves Avenard
0727bfba77 Bug 1125469: Part2. Ensure discontinuity flag is set after seeking. r=mattwoodrow
Under some circumstances, the discontinuity flag value would be lost, leading
the state machine to drop all frames being decoded.
2015-02-09 23:29:01 +11:00
Jean-Yves Avenard
4edcc1c24b Bug 1125469: Part1. Don't attempt to seek on time found with fuzz search. r=mattwoodrow
Instead seek to the actual time available.
2015-02-06 23:51:46 +11:00
Jean-Yves Avenard
875b221058 Bug 1129732: Part4. Use sourcebufferdecoder's end time. 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
Bobby Holley
9388e420b4 Bug 1128811 - Reject data wait promises when we seek. r=cpearce 2015-02-04 17:33:40 -08:00
Bobby Holley
16acf82831 Bug 1129247 - Use MOZ_DIAGNOSTIC_ASSERT instead of MOZ_RELEASE_ASSERT in media code. r=mattwoodrow 2015-02-04 13:13:59 -08: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
Naoki Hirata
4ea46eb077 Bug 1128113 - Skip mSharedDecoderManager which is part of MozMP4. r=jya, a=bustage 2015-01-31 02:22:38 -08: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
Bobby Holley
f9cd69df6e Bug 1127203 - Be more consistent about when and how we apply the fuzz factor. r=mattwoodrow 2015-01-30 17:45:49 -08:00
Bobby Holley
bc10ba2ce6 Bug 1127203 - Rename aError to aTolerance. r=mattwoodrow
aError is a really misleading name.
2015-01-30 17:45:49 -08:00
Bobby Holley
05a5c1facc Bug 1126465 - Use a MediaPromiseConsumerHolders to track subdecoder seeks. r=mattwoodrow
This combines part 10 and part 10.5 in the bug.
2015-01-29 22:11:12 -08:00
Bobby Holley
4266f6aab4 Bug 1126465 - Factor out the seeking phases into helper methods. r=mattwoodrow 2015-01-29 22:11:11 -08:00
Bobby Holley
caff9d581b Bug 1126465 - Factor out calls to Request{Audio,Video}Data into a helper method. r=mattwoodrow 2015-01-29 22:11:11 -08:00
Bobby Holley
5d7499a6e3 Bug 1126465 - Pass consistent arguments to RequestVideoData invocations on subdecoders. r=mattwoodrow 2015-01-29 22:11:11 -08:00
Bobby Holley
c278929f00 Bug 1126465 - Cancel sample requests when seeks start, disallow them while seeks are happening, and assert against seeks when samples arrive. r=mattwoodrow
The duplication of the IsSeeking() checks before all the Request{Audio,Video}Data
callsites is ugly. We'll fix this in the next patch by applying the same disconnect
treatment to the seek promise.
2015-01-29 22:11:11 -08:00
Bobby Holley
26025b8ba0 Bug 1126465 - Introduce machinery to hold onto MediaPromise::Consumer references, and use it for MediaSourceReader subdecoders. r=mattwoodrow 2015-01-29 22:11:11 -08:00
Bobby Holley
0caec3f16d Bug 1126465 - Don't leave stale value in mPendingSeek when there's no audio track. r=mattwoodrow 2015-01-29 22:11:11 -08:00
Bobby Holley
ab598e783e Bug 1126465 - Stop invoking On*NotDecoded when we didn't actually go through the promise. r=mattwoodrow
This isn't right, and it means that we can't assume at the top of
On{Audio,Video}{,Not}Decoded() that we're fresh out of promise dispatch, which
we want to do.
2015-01-29 22:11:11 -08:00
Chris Double
e60ef82770 Bug 1112424 Part 3 - Adds size of the resource to the output a=ajones 2015-01-29 15:36:02 +13:00
Chris Double
53340761b8 Bug 1112424 Part 2 - Implement MediaSource methods to return debug information for about:media - r=ajones 2015-01-29 15:35:58 +13:00
Chris Pearce
98295b4b3a Bug 1123535 - Make MP4Reader and WMFMediaDataDecoder support going dormant. r=kentuckyfriedtakahe 2015-01-29 21:50:48 +13:00
Wes Kocher
6297d58550 Backed out 10 changesets (bug 1126465) for b2g osx build bustage on a CLOSED TREE
Backed out changeset a0a572ab4614 (bug 1126465)
Backed out changeset c96bac2df9a4 (bug 1126465)
Backed out changeset ebe589cc0d92 (bug 1126465)
Backed out changeset 96e70a10440c (bug 1126465)
Backed out changeset 47301816c705 (bug 1126465)
Backed out changeset dd957ede2d36 (bug 1126465)
Backed out changeset d8045d89bfda (bug 1126465)
Backed out changeset 22aff1448376 (bug 1126465)
Backed out changeset 212c4e3377f8 (bug 1126465)
Backed out changeset 408b00141b82 (bug 1126465)
2015-01-28 19:54:34 -08:00
Bobby Holley
5b1f402fb3 Bug 1126465 - Use a MediaPromiseConsumerHolder to track subdecoder seeks. r=mattwoodrow 2015-01-28 18:54:11 -08:00
Bobby Holley
51b0f88fd1 Bug 1126465 - Factor out the seeking phases into helper methods. r=mattwoodrow 2015-01-28 18:54:11 -08:00
Bobby Holley
876a02c933 Bug 1126465 - Factor out calls to Request{Audio,Video}Data into a helper method. r=mattwoodrow 2015-01-28 18:54:11 -08:00
Bobby Holley
15d0881593 Bug 1126465 - Pass consistent arguments to RequestVideoData invocations on subdecoders. r=mattwoodrow 2015-01-28 18:54:11 -08:00
Bobby Holley
c6cbaf8bc1 Bug 1126465 - Cancel sample requests when seeks start, disallow them while seeks are happening, and assert against seeks when samples arrive. r=mattwoodrow
The duplication of the IsSeeking() checks before all the Request{Audio,Video}Data
callsites is ugly. We'll fix this in the next patch by applying the same disconnect
treatment to the seek promise.
2015-01-28 18:54:11 -08:00
Bobby Holley
74b8e284f0 Bug 1126465 - Introduce machinery to hold onto MediaPromise::Consumer references, and use it for MediaSourceReader subdecoders. r=mattwoodrow 2015-01-28 18:54:11 -08:00
Bobby Holley
5e7d04b210 Bug 1126465 - Don't leave stale value in mPendingSeek when there's no audio track. r=mattwoodrow 2015-01-28 18:54:10 -08:00
Bobby Holley
1ced738e43 Bug 1126465 - Stop invoking On*NotDecoded when we didn't actually go through the promise. r=mattwoodrow
This isn't right, and it means that we can't assume at the top of
On{Audio,Video}{,Not}Decoded() that we're fresh out of promise dispatch, which
we want to do.
2015-01-28 18:54:10 -08:00
Edwin Flores
56d8da0a11 Bug 1124491 - Add HTMLMediaElement.isEncrypted attribute - r=cpearce,bz 2015-01-27 19:10:11 +13:00
Carsten "Tomcat" Book
fd00682616 Backed out changeset cdcfd5fda7b4 (bug 1123535) 2015-01-27 09:39:03 +01:00
Chris Pearce
20081a01f9 Bug 1123535 - Make MP4Reader and WMFMediaDataDecoder support going dormant. r=kentuckyfriedtakahe 2015-01-27 19:30:11 +13:00
Jean-Yves Avenard
fc6e8e4ebb Bug 1096089: Only return end of stream if we're near the known duration. r=mattwoodrow
YouTube will call endOfStream once the video has been entirely buffered.
When changing video quality, it will clear the entire source buffer,
following which it will append data once again which will reopen
the mediasource.
We don't want to consider a mediasource in ended state as not ever going to
receive more data in the future unless we're actually reached the end.
2015-01-24 21:46:21 +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
Bobby Holley
20db077556 Bug 1121692 - Handle mid-seek Request{Audio,Video}Data calls. rpending=cpearce
The MDSM really shouldn't be issuing these. The correct solution (which I'll
file a followup bug for) is to fix the MDSM to not do that. But rejecting the
promise with CANCELED is a lot safer, so we do that for now.
2015-01-16 10:58:00 -08:00
Bobby Holley
cd76811f1b Bug 1121692 - Make seeks cancelable. r=cpearce,r=mattwoodrow 2015-01-16 10:58:00 -08:00
Bobby Holley
500974f144 Bug 1121692 - Clean up semantics around m{Audio,Video}IsSeeking. r=mattwoodrow
The comments indicate that they're supposed to be used for setting mDiscontinuity
on the samples, but that never actually happens (and appears to happen in
MP4Reader.cpp). Resetting them in Request{Audio,Video}Data doesn't make any sense
at all. So we repurpose them to track our seek stage.
2015-01-16 10:58:00 -08:00
Bobby Holley
5c8c8f53b7 Bug 1121692 - Fix potential race condition with mWaitingForSeekData. r=mattwoodrow
mWaitingForSeekData is modified in NotifyTimeRangesChanged, which is
invoked on the main thread. One would hope that all of these other members
are only touched on the decode task queue.
2015-01-16 10:58:00 -08:00
Bobby Holley
bed06939fe Bug 1121692 - Stop honoring aEndTime in MediaSourceReader::Seek. r=mattwoodrow
Tracking it is a pain, and it's only used by OggReader.
2015-01-16 10:58:00 -08:00
Bobby Holley
c9bcff1003 Bug 1121692 - Remove unnecessary arguments to ::Seek. r=mattwoodrow,sr=cpearce 2015-01-16 10:57:59 -08:00
Jean-Yves Avenard
45f9f0d8d9 Bug 1119757: MSE: handle duration of 0 in metadata as infinity. r=mattwoodrow 2015-01-16 23:49:01 +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
Alfredo Yang
4bc1aba0d5 Bug 1120298 - add dormant functions in MediaSourceReader for gonk. r=ajones 2015-01-14 01:27:00 +01:00
Anthony Jones
ab5d886c59 Bug 1105066 - Seek after switching reader; r=mattwoodrow 2015-01-12 15:10:15 +13:00
Matt Woodrow
2bae1c3fd1 Bug 1105066 - Chain seeks in MediaSourceReader so that we seek audio to the same time as video; r=kentuckyfriedtakahe 2015-01-12 11:05:08 +13:00
Matt Woodrow
f05ddb6181 Bug 1105066 - Make SeekPromise return the time we actually seeked to; r=kentuckyfriedtakahe 2015-01-12 10:57:14 +13:00
Matt Woodrow
eae5a1bf43 Bug 1118528 - Use fuzzy comparisons in MediaSourceReader::HaveData. r=cajbir 2015-01-12 09:47:56 +13:00