Commit Graph

15 Commits

Author SHA1 Message Date
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