Commit Graph
1098 Commits
Author SHA1 Message Date
JW Wang 05d9f7e2f7 Bug 1330603. Part 1 - remove the call to CheckIfDecodeComplete() from HandleEndOf{Audio,Video}. r=kaku
1. in HandleEndOfAudio, we surely have !IsAudioDecoding(). So we only need to check !IsVideoDecoding().
2. likewise, we only need to check !IsAudioDecoding() in HandleEndOfVideo().

MozReview-Commit-ID: A3pj1LC2okB
2017-01-09 22:35:54 +08:00
JW Wang 683b9d824a Bug 1330254. Part 4 - let Handle{Audio,Video}Canceled and Handle{Audio,Video}Waited call Request{Audio,Video}Data instead. r=kikuo
The same reason as bug 1329897 P3.

MozReview-Commit-ID: AhyFnUmXoOr
2017-01-09 22:25:20 +08:00
JW Wang 570390c355 Bug 1330254. Part 3 - remove some checks from NeedToSkipToNextKeyframe(). r=kikuo
1. we assert mSentFirstFrameLoadedEvent in DecodingState::Enter()
2. NeedToSkipToNextKeyframe() is called by EnsureVideoDecodeTaskQueued() when IsVideoDecoding() is true.

MozReview-Commit-ID: O6rkCBVmNu
2017-01-09 22:17:21 +08:00
JW Wang 9f652fce90 Bug 1330254. Part 2 - move NeedToSkipToNextKeyframe() into DecodingState and remove some checks for mState. r=kikuo
MozReview-Commit-ID: FTsXX04rk2p
2017-01-09 21:39:22 +08:00
JW Wang 5ea5f78c19 Bug 1330254. Part 1 - move MDSM::Ensure{Audio,Video}DecodeTaskQueued into DecodingState. r=kikuo
MozReview-Commit-ID: 9xPNQ9E7R3E
2017-01-09 21:11:01 +08:00
Phil Ringnalda ac06930b7f Backed out changeset f69ae549623a (bug 1321198) for being a totally unacceptable thing to have landed on an integration branch 2017-01-11 21:41:57 -08:00
Jan Beich e34ec1d234 Bug 1330378 - Add missing header after bug 1329891. r=jwwang
MozReview-Commit-ID: AcOqT3fVuUA
2017-01-11 18:19:18 +00:00
JW Wang 85de99266a Bug 1321198 - this is a debugging patch which crashes when test_seek* time out to get the stack trace about what's stuck. r=jya
MozReview-Commit-ID: L7Q3Fyapkzf
2017-01-11 11:15:24 +08:00
JW Wang 46c78ffe67 Bug 1329897. Part 4 - inline Ensure{Audio,Video}DecodeTaskQueued for DispatchDecodeTasksIfNeeded is the only caller. r=kaku
MozReview-Commit-ID: CrldEKxY9Qg
2017-01-09 20:37:06 +08:00
JW Wang 20533f01c0 Bug 1329897. Part 3 - call Request{Audio,Video}Data instead. r=kaku
For HandleAudioCanceled():
1. IsRequestingAudioData() is false because mAudioDataRequest is completed in MDSM::RequestAudioData().
2. IsWaitingAudioData() is false because data promsie and wait promise are mutually exclusive.
3. IsAudioDecoding() is true because we wouldn't have requested audio data otherwise.

Likewise, we can prove EnsureAudioDecodeTaskQueued() can be reduced to mMaster->RequestAudioData()
in HandleAudioWaited.

MozReview-Commit-ID: 1i63IMfZaUh
2017-01-09 20:27:36 +08:00
JW Wang a23de8fca1 Bug 1329897. Part 2 - we don't want to skip to next key frames when buffering. r=kaku
MozReview-Commit-ID: 6Ln73FOVovs
2017-01-09 20:14:01 +08:00
JW Wang 30727b9543 Bug 1329897. Part 1 - copy Ensure{Audio,Video}DecodeTaskQueued into BufferingState. r=kaku
Note we remove the checks for mState.

MozReview-Commit-ID: 7uzjzjKDCIj
2017-01-09 20:12:00 +08:00
JW Wang 8c751eea36 Bug 1329891. Part 6 - default HandleWaitingFor{Audio,Video} to crash. r=kikuo
States that expect this event should override the function.

MozReview-Commit-ID: AmqktrDyVH5
2017-01-09 19:43:55 +08:00
JW Wang 03ccc3038d Bug 1329891. Part 5 - default HandleEndOf{Audio,Video} to crash. r=kikuo
States that expect this event should override the function.

MozReview-Commit-ID: 5Zhcu1m2MMm
2017-01-09 19:38:10 +08:00
JW Wang f4a6e669be Bug 1329891. Part 4 - remove StateObject::HandleNotWaited(). r=kikuo
If the wait promise is rejected, we probably won't be able to finish
decoding after seeking. So we should just raise an error immediately.

MozReview-Commit-ID: GKXo9ZooBfV
2017-01-09 19:34:12 +08:00
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