Commit Graph

325 Commits

Author SHA1 Message Date
Robert O'Callahan
8b8f22d97d Bug 779721. Part 2: Don't block a stream just because it has no consumers. r=jesup
There is actually no reason to do this.
2012-08-01 00:17:21 +12:00
Robert O'Callahan
dbd1d7313b Bug 779721. Part 1: Simplify MediaStreamGraph's invariants around when messages are processed. r=jesup
Rename mBlockingDecisionsMadeUntilTime to mStateComputedTime. The invariant is that
all graph state is known up to mStateComputedTime but not beyond it (except for some
stream contents that may be buffered beyond it).
Get rid of mMessageAffectedTime and all the code around computing "affected times" and "action times".
Instead, all messages take effect at mStateComputedTime.
Get rid of the two-phase execution of messages. Everything can just happen in a single Run() method.
2012-08-01 00:17:21 +12:00
Paul Adenot
0f3392ee19 Bug 775319 - Determine the sample format at compile time for all media code. r=kinetik
--HG--
extra : rebase_source : 4e8a2a4544895c9234ccd3992e1cafe82b8cf365
2012-08-07 16:01:02 -07:00
Aryeh Gregor
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Robert O'Callahan
c4ac2b7c5f Bug 771135. Add MediaStreamListener::NotifyPull to give SourceMediaStream generators an easy way to implement pulling data from some source. r=jesup 2012-07-20 12:36:03 -07:00
Robert O'Callahan
0be0d048a2 Bug 774597. Avoid accessing MediaStreamGraphImpl members after the graph object may have been cleaned up by the main thread. r=jesup
--HG--
extra : rebase_source : 5f6c34855ad5df629c25d4b11f008b03cf2266ae
2012-07-18 01:02:06 -04:00
Robert O'Callahan
3af104f72b Bug 752796. More logging. r=jesup 2012-06-22 22:51:04 +12:00
Mounir Lamouri
744531ad99 Back out bug 766007, bug 703241 and bug 752796 due to perma-orange (419f0d1b848b to 8661c74deeb5). 2012-06-22 11:13:32 +02:00
Robert O'Callahan
c23627b32f Bug 752796. Add a bit more logging. r=jesup 2012-06-22 17:07:41 +12:00
Ehsan Akhgari
7a041e9a4b Bug 758992 - Make the classes which use the XPCOM nsISupports implementation macros final, to avoid the warning about deleting using a pointer to a base class with virtual functions and no virtual dtor (content parts); r=bzbarsky
--HG--
extra : rebase_source : e25a064995914ca4f7b1db16b5725eb440d3e531
2012-06-18 22:30:09 -04:00
Robert O'Callahan
c2b6383f48 Bug 759908. Create MediaStreamListener::NotifyConsumptionChanged. r=jesup
--HG--
extra : rebase_source : f9479b836ec92170782eb01ea8b97004b057ceb7
2012-06-01 18:26:17 +12:00
Robert O'Callahan
d57bfcf475 Bug 758583. Must acquire SourceMediaStream lock before MediaStreamGraph lock. r=jesup 2012-05-29 21:10:45 +12:00
Robert O'Callahan
04aca0d190 Bug 752796. Ensure that stream-finished notifications aren't accidentally dropped. r=jesup 2012-05-28 23:58:34 +12:00
Robert O'Callahan
a0ecbc68c1 Bug 750258. Ensure that MediaStreamListener::NotifyBlockingChanged is always called for a new listener, and similar for NotifyFinished called on an already-finished stream. Rely on this to set readyState correctly for media elements consuming a stream. r=jesup,cpearce 2012-05-24 22:37:14 +12:00
Robert O'Callahan
40634d31a8 Bug 753852. Don't try to notify the graph to perform its next iteration if this stream has been removed from the graph. r=jesup 2012-05-23 18:01:15 +12:00
Daniel Holbert
10d3de74a3 Bug 664918 followup: Add missing */ terminator on emacs modeline in header comment for new files nsDOMMediaStream.cpp and MediaStreamGraph.cpp. (no review, comment-only) DONTBUILD 2012-05-11 10:35:36 -07:00
Robert O'Callahan
070d0a8c52 Bug 750258. Small cleanup to make it more obvious why mCurrentTime is initialized to 1. r=jesup 2012-05-10 15:30:34 +12:00
Randell Jesup
c601502ac4 Bug 752784: protect against media not having a track of the required type r=roc 2012-05-09 01:53:49 -04:00
Robert O'Callahan
137a9cf106 Bug 750258. Fix bustage. 2012-05-07 15:57:52 +12:00
Robert O'Callahan
b1c494a351 Bug 750258. Advance mBlockingDecisionsMadeUntilTime to include time lost when the media graph control thread was stopped and all streams had underruns. r=jesup
The first part just handles the case where nsAudioStream failed to allocate a stream. It won't be playing
anything, so instead of trying to get the audio position, just fall back to the media graph current time.
Otherwise GetPositionInFrames returns -1 and things go badly from there.
The second part simplifies the calculation of the next mCurrentTime to just make it based on real time.
We had some code to not let it advance past the end of a stream's buffer, but the next part will make that
unnecessary.
The third part is the real fix. When the new current time has advanced past mBlockingDecisionsMadeUntilTime,
that means the control loop didn't run in time to replenish the audio output buffers and keep up with its
other duties. Effectively all streams have been blocked between mBlockingDecisionsMadeUntilTime and
the new current time. Account for that by adding the difference as extra blocked time for every stream.
We only need to ensure that the stream is marked blocked from mBlockingDecisionsMadeUntilTime indefinitely
far into the future, and then update mBlockingDecisionsMadeUntilTime to the new current time, because the
code takes into account that only blocking decisions up to mBlockingDecisionsMadeUntilTime are valid.
2012-05-07 15:44:41 +12:00
Robert O'Callahan
811676c320 Bug 750163. MediaStreamGraphImpl::UpdateBufferSufficiencyState should skip tracks whose creation is pending --- there is no Track object for them yet. r=jesup 2012-04-30 17:23:00 +12:00
Robert O'Callahan
233d852e79 Bug 664918. Part 12: Finish SourceMediaStreams when the media decoder is destroyed, to avoid late low-audio/low-video notifications and issues when multiple decoders write to the same stream. r=cpearce,rjesup 2012-04-30 15:13:42 +12:00
Robert O'Callahan
8470d77f34 Bug 664918. Part 9: Tentative support for MediaStreamListener::NotifyQueuedTrackChanges. r=jesup 2012-04-30 15:12:50 +12:00
Robert O'Callahan
b10f6b9538 Bug 664918. Part 5: Create SourceMediaStream, a MediaStream with an API allowing data to be injected into it by some source. r=jesup 2012-04-30 15:11:40 +12:00
Robert O'Callahan
35ac9fec09 Bug 664918. Part 3: Create MediaStream and MediaGraphManager for internal management of real-time media processing. r=jesup 2012-04-30 15:11:26 +12:00