Граф коммитов

169 Коммитов

Автор SHA1 Сообщение Дата
Bobby Holley 9487e1743a Bug 1136873 - Deliver NotifyWaitingForResourcesStatusChanged asynchronously on the state machine task queue. r=mattwoodrow
The previous setup is wacky, and can cause the notification to reach the state
machine before the promise rejection, which causes us to stall intermittently.
We also take the opportunity to be a bit less trigger happy when we fire it
in MediaSourceReader.cpp.
2015-03-23 13:17:52 -07:00
Bobby Holley 40a80320a6 Bug 1136873 - Use promises for metadata decoding. r=mattwoodrow 2015-03-23 13:17:51 -07:00
Jean-Yves Avenard 964b3518d3 Bug 1144617: Part1. Add MediaResource::IsLiveStream() API. r=cpearce
We can't just rely on the MediaResource size to be -1 with MSE. It needs a
dedicated method.
2015-03-23 21:08:05 +11:00
Edwin Flores 9a9b42ccdf Bug 1134434 - Fire loadedmetadata before encrypted event on encrypted MP4s - r=cpearce 2015-03-23 15:31:15 +13:00
Phil Ringnalda 0400bc353a Back out 59fd15407a79 (bug 1142336) for shutdown hangs
CLOSED TREE
2015-03-18 20:38:43 -07:00
Bobby Holley 7afd45ea42 Bug 1142336 - Create one unified thread pool for media code and run the MDSM task queues on it. r=mattwoodrow
This allows for parallel MDSM execution. \o/
2015-03-18 18:00:49 -07:00
Bobby Holley f4ba405552 Bug 1135424 - Run MDSM disposal off the MediaPromise returned by initiating shutdown on the task queue. r=mattwoodrow 2015-03-16 14:38:45 -07:00
Bobby Holley 53ad5b2a9c Bug 1135424 - Switch the MDSM to a task queue. r=mattwoodrow 2015-03-16 14:38:44 -07:00
Sotaro Ikeda 5bcb8e7249 Bug 1142527 - Always call ReleaseMediaResources() when entering dormant r=cpearce 2015-03-15 20:51:02 -07:00
Phil Ringnalda 345a4eca93 Back out 3 changesets (bug 1135424) on suspicion of causing frequent hangs in test_playback.html on mochitest-e10s
CLOSED TREE

Backed out changeset 584d91ffdf88 (bug 1135424)
Backed out changeset d86806ea63f4 (bug 1135424)
Backed out changeset e52401d30a67 (bug 1135424)
2015-03-12 23:05:11 -07:00
Bobby Holley 0563f41ef7 Bug 1135424 - Switch the MDSM to a task queue. r=mattwoodrow 2015-03-12 17:54:35 -07:00
Chris Double 17b0191dec Bug 1131884 - Video buffering calculation fails for some MP4 videos - r=jya
Playback position used in calculating buffering time is set
during metadata reading. This is at end of file for the
video in the bug. As a result the buffering data is always
wrong.

Changed to not setting position during metadata - it is set
during frame playback anyway.

Also changes buffering timeout to 15s from 30s.
2015-03-13 13:45:51 +13:00
Matt Woodrow 10ced0676b Bug 1131638 - Disable hardware decoding if too many frames are invalid. r=cpearce 2015-03-12 22:14:51 +13:00
Matt Woodrow c2badcb2ef Bug 1131638 - Record invalid frames as dropped for video playback stats. r=ajones 2015-03-12 22:14:04 +13:00
Jean-Yves Avenard 3a14d38778 Bug 1128380: Make AmpleVideoFrames calculation dynamic. r=cpearce 2015-03-09 14:17:30 +11:00
Jean-Yves Avenard ec19ab2505 Bug 1139380: Ensure all queued tasks are aborted when shutting down. r=cpearce 2015-03-06 16:49:00 +11:00
Bobby Holley 578cad549e Bug 1135170 - Rewrite the MediaDecoder-to-MediaDecoderStateMachine interface to be Promise-based. r=mattwoodrow 2015-03-06 19:17:07 -08:00
Bobby Holley 1dd7c91f68 Bug 1135170 - Move the RenderVideoFrame call to the end of SeekCompleted. r=mattwoodrow
This means that we can get rid of the code to recheck state after dropping the
monitor. We'll remove the other monitor drop from this method in a subsequent
patch.
2015-03-06 19:17:06 -08:00
Bobby Holley e02c011cd4 Bug 1135170 - Move some work from MDSM::Seek to MDSM::InitiateSeek. r=mattwoodrow
This has two implications:
* We no longer need to pipe mQueuedSeekTarget through MDSM::Seek to get the
  appropriate clamping.
* MDSM::Seek doesn't _need_ to be called on the main thread anymore.
2015-03-06 19:17:04 -08:00
Bobby Holley d846586729 Bug 1135170 - Reap some cleanup and assertions that were waiting on this bug. r=mattwoodrow 2015-03-06 19:17:01 -08:00
Bobby Holley bf69dac697 Bug 1135170 - Streamline seek initiation logic and abolish manual seek cancels and retries. r=mattwoodrow
The model we're moving towards is one where the MDSM can just disconnect all of
its promises, send a ResetDecode down the pipe, and start doing something
unrelated.
2015-03-06 19:16:59 -08:00
Bobby Holley 243db68fec Bug 1135170 - Stop doing sync dispatch for SeekingStarted. r=mattwoodrow
I can't see any reason why this should be necessary, and cursory archaeology
suggests that this too is a hand-me-down from previous threading models.
2015-03-06 19:16:57 -08:00
Bobby Holley df32aaa30e Bug 1135170 - Remove silly special case for seeking to exactly the current time. r=mattwoodrow
I traced this back to something 2011 or earlier and then gave up. Given that we're
doing an exact microsecond comparison here this is almost certainly dead code in
every case except for the one where the media is paused and JS does
|el.currentTime = el.currentTime|. And in that case, I think running through the
regular seek machinery is probably fine.
2015-03-06 19:16:56 -08:00
Bobby Holley 3b78e1ecfd Bug 1135170 - Route queued seeks back through MDSM::Seek and eliminate MDSM::StartSeek. r=mattwoodrow 2015-03-06 19:16:54 -08:00
Carsten "Tomcat" Book 248ef21229 Backed out changeset 5d97bad42411 (bug 1128380) 2015-03-05 08:38:47 +01:00
Jean-Yves Avenard 370ed231e4 Bug 1128380: Make AmpleVideoFrames calculation dynamic. r=cpearce 2015-03-05 16:53:47 +11:00
Sotaro Ikeda 8268179262 Bug 1128357 patch 4: Asynchronize SetDormant() r=cpearce,bobbyholley 2015-03-04 17:34:46 -08:00
Sotaro Ikeda b3535ec3a6 Bug 1128357 Patch 2: Don't dispatch seeking/seeked events when coming out of dormant mode r=cpearce 2015-03-04 17:33:40 -08:00
JW Wang 321f48fe98 Bug 1128417 - handle playback ended in a consistent way for both file and stream case. r=roc. 2015-03-03 11:08:50 +08:00
JW Wang 5adfdc7439 Bug 1127235 - refactor stream clock calculation in MediaDecoderStateMachine. r=roc. 2015-03-03 10:43:38 +08:00
Andreas Pehrson e1cd713962 Bug 1129263 - Part 3. Add tracks atomically when capturing from decoder. r=roc,jesup 2015-02-24 13:11:32 +08:00
Andreas Pehrson 2ca9e88578 Bug 1129263 - Part 2. Put hardcoded numeric TrackIDs in MediaInfo instead of DOMMediaStream. r=roc,jesup 2015-02-24 13:06:54 +08:00
Anthony Jones 69c0b09ad3 Bug 1138253 - Count dropped frames directly; r=cpearce 2015-03-03 17:46:48 +13:00
Bobby Holley 8ecafb0e29 Bug 1135785 - Hoist some work onto the state machine thread and tighten down our assertions. r=cpearce 2015-03-01 19:33:53 -08:00
Bobby Holley d7ab5a9b0f Bug 1135785 - Stop manually resetting mCurrentSeekTarget in MDSM::SeekCompleted and rely on the AutoSetOnScopeExit instead. r=cpearce
For some reason the current code is resetting it twice - once explicitly and
once with the AutoSetOnScopeExit. To make matters worse, we have a monitor drop
between the two. So when DecodeSeek runs on the decode task queue but SeekCompleted
runs on the state machine thread, we can start another DecodeSeek during the monitor
drop, and then clobber it with the AutoSeetOnScopeExit, causing us to hang.

This is a non-issue with the patches in bug 1135170, but necessary to make the
patches in this bug independently green.
2015-03-01 19:33:52 -08:00
Bobby Holley 8955631001 Bug 1135785 - Stop invoking StopPlayback in SetDormant. r=cpearce
This already gets incoded in the DECODER_STATE_DORMANT case of RunStateMachine,
which will run momentarily on the state machine thread. Doing this allows us to
avoid calling StopPlayback on the main thread.
2015-03-01 19:33:50 -08:00
Bobby Holley ba77f2e511 Bug 1135785 - Return samples on state machine thread. r=cpearce
This is necessary because we're going to want to start disconnecting sample
and seek requests directly from the state machine thread, and the machinery
asserts that disconnection happens on the same thread as resolution.

More generally, this is the right thing to do architecturally, and will help
wean us off the monitor.
2015-03-01 19:33:49 -08:00
Bobby Holley 5173a29934 Bug 1135785 - Make DecodeError safe to run on any thread. r=cpearce
This is necessary so that we can make On{Audio,Video}{,Not}Decoded run on the
state machine thread in the next patch.
2015-03-01 19:33:48 -08:00
Bobby Holley 3c7f735460 Bug 1137511 - Account for audio frames already pushed to audio hardware but not yet played when computing OutOfDecodedAudio. r=kinetik 2015-02-27 16:07:44 -08:00
Kilik Kuo cbe28e8d8f Bug 1112438 - Make newCurrentFrameTime more accurate while seeking by checking audio & video timestamp boundary in addition. r=cpearce 2015-02-17 11:21:40 +08:00
Sotaro Ikeda 8d10939395 Bug 1133167 - Add CancelSeek call to FlushDecoding() r=cpearce,bholley 2015-02-17 07:50:49 -08:00
Chris Pearce ded330ee85 Bug 1125970 - Don't flush decode task queue in MediaDecoderStateMachine::FlushDecoding(). r=bholley 2015-02-16 09:03:26 -08:00
Bobby Holley d828efaed5 Bug 1126723 - Bail out of HasLowUndecodedData if we don't have a duration. v1 r=cpearce
GetEstimatedBufferedTimeRanges returns an empty range if the duration is -1.
2015-02-13 12:09:51 -08:00
Bobby Holley 40c886531c Bug 1126723 - Don't store bogus durations. v1 r=cpearce
The apple MP3 decoder passes in garbage for this particular live stream. Let's
validate our inputs.
2015-02-13 12:09:50 -08:00
Jean-Yves Avenard 7773a4f02e Bug 1130839: Seek to end of media if duration changed. r=cpearce
If the duration is changed such that the current playback position ends up
being greater than the time of the end of the media resource, then the user
agent must also seek to the time of the end of the media resource.
2015-02-12 18:53:53 +11:00
Bobby Holley 4209e9651f Bug 1129246 - Switch to MediaPromiseConsumerHolders for MDSM audio/video promises and remove RequestStatus. v3 r=cpearce 2015-02-09 11:34:38 -08:00
Bobby Holley a15ce311b8 Bug 1129523 - Use ProxyMediaCall for video decode tasks. r=cpearce,r=mattwoodrow 2015-02-04 17:12:51 -08:00
Chris Pearce eb27bb22f8 Bug 1123535 - Make dormant ResetPlayback assertion more lenient. r=jwwang 2015-02-04 10:17:28 +13:00
Sotaro Ikeda 16749fec58 Bug 1112519 - Clear mDropVideoUntilNextDiscontinuity when we do not seek r=cpearce 2015-02-03 12:53:12 -08:00
JW Wang 997ae89e39 Bug 1128411. Part 2 - call SendStreamData() in AdvanceFrame() to simplify the code of SendStreamData(). r=roc. 2015-02-02 13:58:31 +08:00