JW Wang
9af9e4bbcc
Bug 1329891. Part 3 - default Handle{Audio,Video}Waited to crash. r=kikuo
...
States that expect this event should override the function.
MozReview-Commit-ID: IjmR7F1UOiU
2017-01-09 15:53:12 +08:00
JW Wang
f8473445d1
Bug 1329891. Part 2 - default Handle{Audio,Video}Decoded to crash. r=kikuo
...
States expect this event should override this function.
MozReview-Commit-ID: 8Y4ngn4X7MS
2017-01-09 15:48:00 +08:00
JW Wang
8702c88b1e
Bug 1329891. Part 1 - default Handle{Audio,Video}Canceled() to crash. r=kikuo
...
1. States (DecodeMetadataState and WaitForCDMState) happen before
DecodingFirstFrameState should never receive this event because they don't
decode at all.
2. DormantState and ShutdownState shouldn't receive this event because
they call ResetDecode() in the entry action.
3. CompletedState should never receive this event because it happens after
HandleEndOf{Audio,Video} which happens before Handle{Audio,Video}Canceled.
MozReview-Commit-ID: LdwpWlFHtRp
2017-01-09 15:44:18 +08:00
JW Wang
94b3139a70
Bug 1329110. Part 7 - remove StateObject::HandleEndOfStream(). r=kaku
...
The same reason as P6. We would like to avoid virtual functions calls
inside a virtual function.
MozReview-Commit-ID: EYCk6tKPYSs
2017-01-09 13:18:37 +08:00
JW Wang
7c2036562f
Bug 1329110. Part 6 - remove StateObject::HandleWaitingForData(). r=kaku
...
Since DecodingState is the only one that overrides the function, we will let it
just override HandleWaitingFor{Audio,Video}. We also reduce the code complexity
because it is hard to trace the code when one virtual function calls another
virtual function.
MozReview-Commit-ID: AdLXpDgvOyx
2017-01-09 13:06:55 +08:00
JW Wang
7f03b611b7
Bug 1329110. Part 5 - split Split StateObject::HandleVideoNotDecoded into small functions. r=kaku
...
MozReview-Commit-ID: Bfyekr4I6OX
2017-01-09 12:59:32 +08:00
JW Wang
2fed1083f3
Bug 1329110. Part 4 - remove StateObject::HandleAudioNotDecoded(). r=kaku
...
MozReview-Commit-ID: 53iQ46klPMr
2017-01-09 12:45:43 +08:00
JW Wang
90ef6039c2
Bug 1329110. Part 3 - add HandleEndOfAudio(). r=kaku
...
MozReview-Commit-ID: KGiWU8t79pv
2017-01-06 17:54:59 +08:00
JW Wang
2c9b0e0946
Bug 1329110. Part 2 - add HandleAudioCanceled(). r=kaku
...
MozReview-Commit-ID: IlzcucZOHpo
2017-01-06 17:49:11 +08:00
JW Wang
609591cf50
Bug 1329110. Part 1 - add HandleWaitingForAudio(). r=kaku
...
MozReview-Commit-ID: B2ElMMYKt7m
2017-01-06 17:43:05 +08:00
JW Wang
c9e161ca85
Bug 1329098. Part 5 - remove unnecessary checks and temps. r=kaku
...
For mSentFirstFrameLoadedEvent is true in DecodingState.
MozReview-Commit-ID: 8zpsMAME8p6
2017-01-06 15:49:02 +08:00
JW Wang
0e48c9a3d9
Bug 1329098. Part 4 - move DispatchDecodeTasksIfNeeded into DecodingState. r=kaku
...
MozReview-Commit-ID: LT9xNdTAtOW
2017-01-06 15:43:31 +08:00
JW Wang
9a7c779d3c
Bug 1329098. Part 3 - remove some temp vairables. r=kaku
...
MozReview-Commit-ID: 3gz79Tzidtf
2017-01-06 15:36:38 +08:00
JW Wang
4c2fd20768
Bug 1329098. Part 2 - remove unnecessary checks. r=kaku
...
1. mSentFirstFrameLoadedEvent is true in BufferingState.
2. mMinimizePreroll is false in BufferingState for buffering happens after playback starts and we reset mMinimizePreroll once playback starts.
MozReview-Commit-ID: ABE7TvNEetD
2017-01-06 15:22:52 +08:00
JW Wang
2b8911fbd5
Bug 1329098. Part 1 - copy DispatchDecodeTasksIfNeeded() into BufferingState. r=kaku
...
MozReview-Commit-ID: 2q8FhTFTJ6g
2017-01-06 15:00:36 +08:00
JW Wang
f04fe1adb2
Bug 1329554. Part 2 - remove |mMaster->mMinimizePreroll| checks from BufferingState::Step(). r=kikuo
...
mMinimizePreroll is false in BufferingState because we enter buffering only
after playback starts.
MozReview-Commit-ID: 9vRuogzvV7x
2017-01-05 18:13:54 +08:00
JW Wang
c06643514d
Bug 1329554. Part 1 - let DecodingState decide whether to dispatch decoding tasks when mMinimizePreroll changes. r=kikuo
...
MozReview-Commit-ID: 6QnH2vOHid1
2017-01-05 18:12:06 +08:00
JW Wang
582fb8a762
Bug 1328836 - Remove MDSM::DispatchMinimizePrerollUntilPlaybackStarts. r=kaku
...
MozReview-Commit-ID: 1EGHVhZqUTA
2017-01-05 17:59:19 +08:00
JW Wang
4d6da0d151
Bug 1328782. part 3 - remove the |VideoQueue().GetSize() > 0| check. r=kikuo
...
Since |GetAmpleVideoFrames() * mPlaybackRate + 1| is positive,
|VideoQueue().GetSize() >= GetAmpleVideoFrames() * mPlaybackRate + 1| must imply
|VideoQueue().GetSize() > 0|
MozReview-Commit-ID: 6cZ2XfUrmj
2017-01-05 12:09:55 +08:00
JW Wang
99b098f048
Bug 1328782. part 2 - some more tweaks to the expression. r=kikuo
...
MozReview-Commit-ID: I1IcV88amob
2017-01-05 12:07:15 +08:00
JW Wang
142aecd9f4
Bug 1328782. part 1 - some tweaks to the expression. r=kikuo
...
MozReview-Commit-ID: 3Mt1c7TrSYy
2017-01-04 17:37:34 +08:00
JW Wang
0c531a769b
Bug 1328811. Part 4 - remove the |mState != DECODER_STATE_SEEKING| check. r=kaku
...
When mState is SEEKING, DispatchDecodeTasksIfNeeded() is a no-op.
MozReview-Commit-ID: 3sV6RdUwFBV
2017-01-05 14:48:42 +08:00
JW Wang
48ec28b591
Bug 1328811. Part 3 - inline NeedToDecode{Audio,Video} for DispatchDecodeTasksIfNeeded is the only caller. r=kaku
...
MozReview-Commit-ID: H1K6LJCjk4B
2017-01-05 14:44:45 +08:00
JW Wang
4a395411d2
Bug 1328811. Part 2 - remove the comment that is not valid anymore. r=kaku
...
MozReview-Commit-ID: JxrBRtKPAau
2017-01-05 14:39:35 +08:00
JW Wang
eb7693ebd8
Bug 1328811. Part 1 - remove the assertion. r=kaku
...
http://searchfox.org/mozilla-central/rev/82ebc0c5ea45477ef4a4bfb3bbff35069bd18cee/dom/media/MediaDecoderStateMachine.cpp#2980
The if statement ensures |mState != DECODER_STATE_COMPLETED|.
MozReview-Commit-ID: CyvfXj94E8s
2017-01-05 14:38:52 +08:00
JW Wang
47497b7125
Bug 1328810 - Remove the call to DispatchDecodeTasksIfNeeded() from MDSM::StopPlayback(). r=kaku
...
MozReview-Commit-ID: mZL1FJmea3
2017-01-05 14:32:53 +08:00
JW Wang
89a8ab3c4f
Bug 1328831 - Remove MDSM::DispatchAudioOffloading. r=jolin
...
MozReview-Commit-ID: JVJOpmUHNp6
2017-01-05 17:38:17 +08:00
JW Wang
c5cc6403f5
Bug 1328547. part 3 - inline NeedToDecode{Audio,Video} and remove some checks. r=kaku
...
1. |mState != DECODER_STATE_SEEKING| is true in DecodingState.
2. mSentFirstFrameLoadedEvent is true in DecodingState.
3. mMinimizePreroll is false because pop events fire only after MDSM starts playing.
MozReview-Commit-ID: FTkXmtEnzY5
2017-01-04 17:23:28 +08:00
JW Wang
3333ecf9f8
Bug 1328547. part 2 - remove checks for IsShutdown() which is false in DecodingState. r=kaku
...
MozReview-Commit-ID: CmU79bt4XoR
2017-01-04 17:13:49 +08:00
JW Wang
2233cbcb3c
Bug 1328547. part 1 - Move MDSM::Dispatch{Audio,Video}DecodeTaskIfNeeded into DecodingState. r=kaku
...
MozReview-Commit-ID: I2gT77VHutm
2017-01-04 17:10:37 +08:00
JW Wang
e1764604aa
Bug 1328781. part 2 - don't convert a double to an int64_t to avoid rounding errors. r=kikuo
...
MozReview-Commit-ID: 83Zxqr4aiMa
2017-01-05 11:50:20 +08:00
JW Wang
1732b87806
Bug 1328781. part 1 - somewhat rewrite the expression. r=kikuo
...
MozReview-Commit-ID: 5959ZdWKI4k
2017-01-04 17:35:04 +08:00
JW Wang
bd2175f8ef
Bug 1328541 - Remove the call to DispatchDecodeTasksIfNeeded() from MDSM::MaybeStartPlayback(). r=kikuo
...
MozReview-Commit-ID: 9Qj01MSw4Ia
2017-01-04 16:38:01 +08:00
JW Wang
2d0c74882f
Bug 1326335 - Ensure MDSM only decodes metadata once. r=kaku
...
MozReview-Commit-ID: AqKbR6OuQ40
2016-12-23 19:23:58 +08:00
JW Wang
c6fd7e2c8b
Bug 1325317. Part 2 - rename the function and fix comments. r=kikuo
...
MozReview-Commit-ID: 3GUkH5OpSmJ
2016-12-22 16:56:59 +08:00
JW Wang
943ccba437
Bug 1325317. Part 1 - move StopMediaSink() out of MediaDecoderStateMachine::Reset(). r=kikuo
...
MozReview-Commit-ID: 6Bso8uxM7Ee
2016-12-22 16:48:54 +08:00
JW Wang
2f3ca16102
Bug 1325321 - let DecodingState handle audio/video pop events. r=kaku
...
MozReview-Commit-ID: 9EjeOfn1vBU
2016-12-22 17:28:14 +08:00
JW Wang
7bdf603a9a
Bug 1325905. Part 7 - add assertions to ensure Ensure{Audio,Video}DecodeTaskQueued is never called by DecodingFirstFrameState. r=kaku
...
MozReview-Commit-ID: 9zSuH4p0aqg
2016-12-21 18:26:31 +08:00
JW Wang
56cd6ab899
Bug 1325905. Part 6 - let DecodingFirstFrameState::Enter() call Request{Audio,Video} instead. r=kaku
...
MozReview-Commit-ID: AH1F9hMJorM
2016-12-22 04:32:47 +08:00
JW Wang
f3f118ecb4
Bug 1325905. Part 5 - let DecodingFirstFrameState override Handle{Audio,Video}Waited. r=kaku
...
We want to call Request{Audio,Video}Data() instead of Ensure{Audio,Video}DecodeTaskQueued
which checks mState and breaks the encapsulation of the state objects.
MozReview-Commit-ID: 5oydItSvnMF
2016-12-21 18:23:00 +08:00
JW Wang
54c3e93089
Bug 1325905. Part 4 - let DecodingFirstFrameState override Handle{Audio,Video}NotDecoded. r=kaku
...
We want to call Request{Audio,Video}Data() instead of Ensure{Audio,Video}DecodeTaskQueued
which checks mState and breaks the encapsulation of the state objects.
MozReview-Commit-ID: 87CwSdtTwi4
2016-12-21 18:16:25 +08:00
JW Wang
6b8b39a0de
Bug 1325905. Part 3 - split HandleNotDecoded() into HandleAudioNotDecoded() and HandleVideoNotDecoded(). r=kaku
...
MozReview-Commit-ID: 3RcG43pxGSv
2016-12-21 18:00:37 +08:00
JW Wang
a4ea0ef91b
Bug 1325905. Part 2 - move IsWaitForDataSupported() assertions into MediaDecoderReaderWrapper. r=kaku
...
MozReview-Commit-ID: 6KwjHONHKo
2016-12-21 17:37:56 +08:00
JW Wang
256e4d4a9f
Bug 1325905. Part 1 - add assertions to MDSM::Request{Audio,Video}Data. r=kaku
...
MozReview-Commit-ID: JjRsv2wdLUq
2016-12-21 17:21:21 +08:00
JW Wang
99c0760a0b
Bug 1325004. Part 7 - remove Push(). r=kikuo
...
MozReview-Commit-ID: 7fNAGwKhKSN
2016-12-21 16:06:58 +08:00
JW Wang
b880e9ffeb
Bug 1325004. Part 6 - let DecodingState call Push{Audio,Video} instead. r=kikuo
...
MozReview-Commit-ID: boYTgSK4hw
2016-12-21 16:05:08 +08:00
JW Wang
bf53e1a542
Bug 1325004. Part 5 - let BufferingState call Push{Audio,Video} instead. r=kikuo
...
BufferingState will call DispatchDecodeTasksIfNeeded() if not done buffering.
MozReview-Commit-ID: Kzqqn8lXPLm
2016-12-21 16:03:16 +08:00
JW Wang
41b45e3489
Bug 1325004. Part 4 - let NextFrameSeekingState call Push{Audio,Video} instead. r=kikuo
...
MozReview-Commit-ID: 6E2BfLNh91r
2016-12-21 15:56:18 +08:00
JW Wang
9b5b56903e
Bug 1325004. Part 3 - let DecodingFirstFrameState call Push{Audio,Video} instead. r=kikuo
...
DecodingFirstFrameState needs only at most one audio or video sample.
MozReview-Commit-ID: 2pRrPlCUBSf
2016-12-21 15:54:30 +08:00
JW Wang
8396f61fa4
Bug 1325004. Part 2 - let AccurateSeekingState call Push{Audio,Video} instead. r=kikuo
...
AccurateSeekingState can stop decoding once there is one sample in the queue.
MozReview-Commit-ID: 76C7vX7ua14
2016-12-21 15:51:45 +08:00