Commit Graph

80 Commits

Author SHA1 Message Date
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
Bobby Holley
dbb413d6ec Bug 1120014 - Initialize MediaSourceReader::mLast{Audio,Video}Time to 0 rather than -1. r=rillian
There isn't actually any initialization code that sets them at 0. Instead, we
currently rely on the fact that our first decoder ends up active regardless of
what its buffered range reports. So as long as invoking the first Request{Audio,Video}Data
is resolved, this ends up ok. But while that is usually the case, it isn't _always_
the case, especially in the case where the MP4Reader rejects with WAITING_FOR_DATA.
2015-01-09 17:20:58 -08: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
f58ed77d04 Bug 1092025 - Hold the lock for the entire duration of MediaSourceReader::ReadMetaData. r=karlt 2014-12-21 23:14:59 -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
c4b04bce21 Bug 1112446 - Add logging for media queue lengths. r=ajones 2014-12-18 12:41:19 +13:00
Matt Woodrow
878c895eb7 Bug 1111413 - Part 2: Remove RequestSampleCallback. r=bholley 2014-12-16 23:08:42 +13:00
Matt Woodrow
93e24340d6 Bug 1111413 - Part 1: Use MediaPromises for seeking. r=bholley 2014-12-16 22:52:57 +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
Anthony Jones
9afda1809f Bug 1110595 - Fix MSE playback stalling; r=mattwoodrow 2014-12-12 17:11:51 +13: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
Bobby Holley
ef7b8245e6 Bug 1108701 - Use MediaPromises for RequestAudioData and RequestVideoData. r=cpearce 2014-12-10 14:03:56 -08:00
Bobby Holley
5823c22a13 Bug 1108707 - Make reader shutdown asynchronous. r=cpearce (relanding on a CLOSED TREE because it wasn't the source of the leaks) 2014-12-09 11:43:21 -08:00
Ryan VanderMeulen
28ea3da34b Backed out changeset 18c302f80bce (bug 1108707) for nsTArray_base leaks.
CLOSED TREE
2014-12-09 15:49:38 -05:00
Bobby Holley
89292051ab Bug 1108707 - Make reader shutdown asynchronous. r=cpearce 2014-12-09 11:43:21 -08:00
Bobby Holley
d3d2a8dd4c Bug 1097823 - Move NotDecodedReason from RequestSampleCallback to MediaDecoderReader. r=cpearce 2014-12-08 14:45:36 -08:00
Ryan VanderMeulen
b04ae532a6 Backed out changesets ae63e2dda6e0, a9ca0113db3c, and d0a6757e24bd (bug 1097823) for bustage.
DONTBUILD CLOSED TREE
2014-12-08 15:00:02 -05:00
Bobby Holley
8f32f522cd Bug 1097823 - Move NotDecodedReason from RequestSampleCallback to MediaDecoderReader. r=cpearce 2014-12-08 11:34:50 -08:00
Bobby Holley
97f300c6e6 Backed out changeset c405b4271e64 (bug 1097823) 2014-12-07 17:09:12 -08:00
Bobby Holley
1239cadbd6 Backed out changeset b76636e9f49a (bug 1097823) 2014-12-07 17:09:08 -08:00