Bug 1330603. Part 2 - remove MDSM::CheckIfDecodeComplete(). r=kaku

MozReview-Commit-ID: 1bkWVknX2FO

--HG--
extra : rebase_source : beef1c69a4d68b00bd724e3a991eca3d44613ae2
extra : intermediate-source : 2ed4109cb4793f593c769c2fc4516895420ede83
extra : source : 6e952d52371caf33736600df74bc49d416e90a40
This commit is contained in:
JW Wang 2017-01-09 22:37:57 +08:00
Родитель 51803c6e08
Коммит 4e46c57168
2 изменённых файлов: 1 добавлений и 15 удалений

Просмотреть файл

@ -2086,7 +2086,7 @@ DecodingState::Enter()
HandleVideoSuspendTimeout();
}
if (mMaster->CheckIfDecodeComplete()) {
if (!mMaster->IsVideoDecoding() && !mMaster->IsAudioDecoding()) {
SetState<CompletedState>();
return;
}
@ -2699,17 +2699,6 @@ MediaDecoderStateMachine::IsVideoDecoding()
return HasVideo() && !VideoQueue().IsFinished();
}
bool
MediaDecoderStateMachine::CheckIfDecodeComplete()
{
MOZ_ASSERT(OnTaskQueue());
// DecodeComplete is possible only after decoding first frames.
MOZ_ASSERT(mSentFirstFrameLoadedEvent);
MOZ_ASSERT(mState == DECODER_STATE_DECODING ||
mState == DECODER_STATE_BUFFERING);
return !IsVideoDecoding() && !IsAudioDecoding();
}
bool MediaDecoderStateMachine::IsPlaying() const
{
MOZ_ASSERT(OnTaskQueue());

Просмотреть файл

@ -443,9 +443,6 @@ protected:
void FinishDecodeFirstFrame();
// Queries our state to see whether the decode has finished for all streams.
bool CheckIfDecodeComplete();
// Performs one "cycle" of the state machine.
void RunStateMachine();