Commit Graph

167 Commits

Author SHA1 Message Date
Chris Pearce
c4ff2694d4 Bug 1002266 - Access MediaQueues from MediaDecoderStateMachine through accessors. r=kinetik 2014-04-28 13:12:50 +12:00
Birunthan Mohanathas
ff8ce9bd42 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Matthew Gregan
91fe868e8b Bug 881512 - Remove useless static_casts. r=cajbir 2014-04-22 23:58:00 +12:00
Robert O'Callahan
dba7d4c6ba Bug 998284. When entering the buffering state from AdvanceFrame, be prepared to accept a second's delay before reevaluating whether to exit buffering. r=cpearce
--HG--
extra : rebase_source : 2a7aab19c998f6977cb47d6300e2967be69bcbdf
2014-03-25 00:58:11 +13:00
JW Wang
22158c2aa1 Bug 998168 - nsITimer functions should be only called in the event target thread of the timer. r=cpearce. 2014-04-23 05:29:14 -04:00
JW Wang
77af058043 Bug 998168 - add decoder pointer to the log message of MediaDecoderStateMachine/MediaDecoder for debugging. r=cpearce 2014-04-23 05:29:04 -04:00
Chris Pearce
5205d683d0 Bug 993753 - Don't set media decoders idle while seeking. r=kinetik 2014-04-15 15:01:34 +12:00
Randell Jesup
cec7b451da Bug 919215: Drop queued audio data on low-latency startup, make AudioStream::Init() async r=roc,padenot 2014-04-09 15:59:07 -04:00
Andrea Marchesini
eaa3ff4eed Bug 987064 - Remove AudioChannelType. r=roc, r=mchen, r=bent 2014-04-10 18:39:20 +01:00
Carsten "Tomcat" Book
d8cac0a0f4 Backed out changeset ac06eacc2206 (bug 987064) for B2G ICS Emulator Debug Bustage on a CLOSED TREE 2014-04-10 13:18:18 +02:00
Andrea Marchesini
e7f2c01a1a Bug 987064 - Remove AudioChannelType, r=roc, r=mchen, r=bent 2014-04-10 11:49:23 +01:00
Michael Pruett
558552bcd5 Bug 847827 - Update libsoundtouch to allow changing playback rate with multichannel audio. r=padenot
--HG--
extra : rebase_source : ebf10737b048ae3280b9a7706f701337211b2880
2014-04-10 10:37:07 +02:00
Wes Kocher
58f74f6ca3 Merge m-c to inbound on a CLOSED TREE 2014-04-02 19:54:15 -07:00
JW Wang
061bca995e Bug 990356 - Part 3: Remove nsRunnable base class from MediaDecoderStateMachine. r=cpearce 2014-04-02 08:51:47 -04:00
JW Wang
ed9bb75a2d Bug 990356 - Part 2: Only one way to dispatch state machine (using a timer) tasks and remove unused variables. r=cpearce 2014-04-02 08:51:47 -04:00
JW Wang
994cb3c402 Bug 990356 - Part 1: Remove lazy init of |mTimer| since we need one for most of the case. r=cpearce 2014-04-02 08:51:46 -04:00
Ryan VanderMeulen
6a3fa988ca Merge inbound to m-c. 2014-04-01 16:45:00 -04:00
JW Wang
08b681abf8 Bug 980868 - Don't skip video frame when |clock time| is less than |mVideoFrameEndTime| for we are still in the safe range without underruning video frames. r=cpearce 2014-04-01 08:58:55 -04:00
Benjamin Chen
b4f390989e Bug 984816: RTSP play/pause deadlock issue. 1. Release the monitor when access mReader. 2. Reverse the order in RtspOmxReader::SetIdle(). r=cpearce 2014-03-31 10:18:01 +08:00
Matthew Gregan
5979b051e5 Bug 927245 - Remove deprecated Audio Data API implementation. r=cajbir,smaug 2014-04-03 10:53:39 +13:00
Chris Pearce
e1cae995ac Bug 631058 - Don't preroll as many media samples when loading preload="metadata" media. r=cajbir 2014-04-01 16:43:57 +13:00
Chris Pearce
223e397746 Bug 778077 - Implement HTMLMediaElement.fastSeek(time). r=cajbir
Implement HTMLMediaElement.fastSeek(), basically by changing all the
MediaDecoderReader::Seek() overrides to not call
MediaDecoderReader::DecodeToTarget(), and have MediaDecoderReader::DecodeSeek()
call DecodeToTarget() if we're doing an accurate (non-fast) seek.

Update gizmo.mp4 to have a keyframe every second, instead of only 1 keyframe at
the start of stream. This makes the unit test I added more useful for mp4...

I pushed most of the seek target clamping logic in MediaDecoder up into
HTMLMediaElement, so that we're clamping in fewer places. Note
MediaDecoderStateMachine::Seek() still sanity checks the seek target.

We have to update the currentTime/MediaDecoder playback position after a seek
completes now, rather than assuming the seek always got it exactly right.

Removed those pesky assertions about seek target lying in the first frame after
seek, since actually sometimes the media doesn't have samples for all streams
after a seek (either due to the media being encoded like that, or because of a
bug in the platform's decoder, not entirely sure).

Green: https://tbpl.mozilla.org/?tree=Try&rev=b028258565e2
* * *
Bug 778077 - Fix up MediaOMXReader fastseek to ensure audio stream stays in sync with video stream. r=cajbir
2014-04-01 16:39:04 +13:00
Ed Morley
05dcbf9506 Backed out changeset 00fa39c23b44 (bug 778077) for reftest failures 2014-03-28 12:31:29 +00:00
Chris Pearce
dac6ce38ba Bug 778077 - Implement HTMLMediaElement.fastSeek(time). r=cajbir
Implement HTMLMediaElement.fastSeek(), basically by changing all the
MediaDecoderReader::Seek() overrides to not call
MediaDecoderReader::DecodeToTarget(), and have MediaDecoderReader::DecodeSeek()
call DecodeToTarget() if we're doing an accurate (non-fast) seek.

Update gizmo.mp4 to have a keyframe every second, instead of only 1 keyframe at
the start of stream. This makes the unit test I added more useful for mp4...

I pushed most of the seek target clamping logic in MediaDecoder up into
HTMLMediaElement, so that we're clamping in fewer places. Note
MediaDecoderStateMachine::Seek() still sanity checks the seek target.

We have to update the currentTime/MediaDecoder playback position after a seek
completes now, rather than assuming the seek always got it exactly right.

Removed those pesky assertions about seek target lying in the first frame after
seek, since actually sometimes the media doesn't have samples for all streams
after a seek (either due to the media being encoded like that, or because of a
bug in the platform's decoder, not entirely sure).

Green: https://tbpl.mozilla.org/?tree=Try&rev=b028258565e2
2014-03-28 22:36:10 +13:00
Phil Ringnalda
e21145ad4a Backed out 2 changesets (bug 778077, bug 631058)
CLOSED TREE

Backed out changeset dda301682977 (bug 631058)
Backed out changeset 25b633e7dcd5 (bug 778077)
2014-03-27 21:50:02 -07:00
Chris Pearce
002a177846 Bug 631058 - Don't preroll extra media samples when we're not playing. r=cajbir 2014-03-28 15:50:35 +13:00
Chris Pearce
fc3fc91d79 Bug 778077 - Implement HTMLMediaElement.fastSeek(time). r=cajbir
Implement HTMLMediaElement.fastSeek(), basically by changing all the
MediaDecoderReader::Seek() overrides to not call
MediaDecoderReader::DecodeToTarget(), and have MediaDecoderReader::DecodeSeek()
call DecodeToTarget() if we're doing an accurate (non-fast) seek.

Update gizmo.mp4 to have a keyframe every second, instead of only 1 keyframe at
the start of stream. This makes the unit test I added more useful for mp4...

I pushed most of the seek target clamping logic in MediaDecoder up into
HTMLMediaElement, so that we're clamping in fewer places. Note
MediaDecoderStateMachine::Seek() still sanity checks the seek target.

We have to update the currentTime/MediaDecoder playback position after a seek
completes now, rather than assuming the seek always got it exactly right.

Removed those pesky assertions about seek target lying in the first frame after
seek, since actually sometimes the media doesn't have samples for all streams
after a seek (either due to the media being encoded like that, or because of a
bug in the platform's decoder, not entirely sure).

Green: https://tbpl.mozilla.org/?tree=Try&rev=b028258565e2
2014-03-28 15:50:28 +13:00
Chris Pearce
91d4174974 Bug 984698 - Reduce the amount of audio prerolled when we are not also decoding video in the same file. r=padenot 2014-03-21 11:47:17 +13:00
JW Wang
2a84991524 Bug 907162 - Fix MediaDecoderStateMachine might dispatch MediaDecoder::PlaybackEnded more than once and trigger multiple 'ended' events in HTMLMediaElement. r=cpearce 2014-03-17 10:12:20 +08:00
Neil Rashbrook
c3b2f90f39 Bug 514280 Stop using nsCOMPtr for concrete types r=bsmedberg
--HG--
extra : rebase_source : f8fb50de9292320eb7589dd28dc566d0f5044da6
2014-03-18 00:23:03 +00:00
Wes Kocher
c0dba87922 Backed out 2 changesets (bug 514280) for OSX build bustage on a CLOSED TREE
Backed out changeset 2a015b45d808 (bug 514280)
Backed out changeset a01f97c1ed02 (bug 514280)
2014-03-17 15:19:53 -07:00
Neil Rashbrook
b07eaa1644 Bug 514280 Stop using nsCOMPtr for concrete types r=bsmedberg
--HG--
extra : rebase_source : eaca8b2925eaffb49e29a617cd72c0d6686e6d9e
2014-03-17 19:07:09 +00:00
Chris Pearce
3683933177 Bug 982032 - Don't re-run the COMPLETED state in MediaDecoderStateMachine if we've already run it. r=padenot 2014-03-11 18:06:23 +08:00
Chris Pearce
09cf363ca1 Bug 973408 - Merge logic from UpdateIdleState and enqueueing decode tasks, so that we always behave consistently, especially WRT setting readers Idle on B2G. r=kinetik 2014-03-11 11:44:10 +08:00
Chris Pearce
5e594c8460 Bug 973408 - Set MediaDecoderReaders idle when they're not decoding. r=kinetik 2014-03-11 11:44:10 +08:00
Chris Pearce
fbe154216d Bug 973408 - Decode video and audio in separate media tasks. r=kinetik 2014-03-11 11:44:09 +08:00
Chris Pearce
ae1a9465d2 Bug 973408 - Split innards of MediaDecoderStateMachine::DecodeLoop() into sub DecodeAudio/DecodeVideo functions. r=kinetik 2014-03-11 11:44:09 +08:00
Chris Pearce
deb182976e Bug 973408 - Don't block a decode thread while awaiting resources. r=kinetik 2014-03-11 11:44:09 +08:00
Chris Pearce
197f8f04a4 Bug 973408 - Split DecodeThreadRun() into separate decode tasks. r=kinetik 2014-03-11 11:44:09 +08:00
Chris Pearce
9c847a29a5 Bug 973408 - Remove MediaDecoderStateMachine::GetAmpleVideoFrames(), and MediaOMXStateMachine. r=kinetik 2014-03-11 11:44:08 +08:00
Chris Pearce
f15c1aea78 Bug 973408 - Move MediaDecoderStateMachine::DecodeLoop()'s local variables to class members so the function can be made reentrant in future. r=kinetik 2014-03-11 11:44:08 +08:00
Matthew Gregan
87855800ef Bug 962353 - Remove totalFrameDelay from VideoPlaybackQuality. r=chris.double
It's not implemented by other vendors and marked as "at risk" in the spec.
Easy to add back if there's real demand/a concrete spec.
2014-03-04 15:31:57 +13:00
Chris Pearce
6fa14bff12 Bug 861136 - Strip whitespace from MediaDecoderStateMachine.cpp that was introduced in previous changeset. r=whitespace DONTBUILD 2014-03-03 14:55:33 +13:00
Chris Pearce
dfdc0cfb5d Bug 861136 - Don't start buffering media state machine when we don't need to. r=roc 2014-03-03 14:49:52 +13:00
Chris Pearce
61d66690f5 Bug 634747 - Set MediaQueue's to Finished() when we reach end of stream while decoding after seeking and while finding first frame. r=kinetik 2014-02-25 18:45:03 +13:00
Chris Pearce
2723c96809 Bug 968016 - Wait until decode has finished before releasing resources when decoder becomes dormant. r=kinetik 2014-02-18 11:53:53 +13:00
Chris Pearce
81814d397d Bug 968016 - Call MediaDecoderReader::OnDecodeThreadStart/Finish() in DecodeLoop(). r=kinetik 2014-02-18 11:53:53 +13:00
Chris Pearce
39ff027773 Bug 968016 - Use a SharedThreadPool of size 1 for the Media State Machine thread. r=kinetik
This makes it easy to share the state machine thread, and for it to shut down
automatically when the last reference is dropped to it.
2014-02-18 11:53:53 +13:00
Chris Pearce
b162ede7bd Bug 968016 - Use SharedThreadPool instead of manually managed threads for the media decoding. r=kinetik 2014-02-18 11:53:52 +13:00
Paul Adenot
5605305435 Bug 960057 - When an HTMLMediaElement outputs to a MediaStream, make sure to install the refill callback in any case. r=roc DONTBUILD 2014-02-14 10:38:58 -08:00