зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1314524. Part 4 - remove DormantState::HandleDormant(). r=kaku
MozReview-Commit-ID: JSkpvglJzpN --HG-- extra : rebase_source : 973188fccc77fca8fbbe6d9f36d244845f3f40f8 extra : intermediate-source : 9a8179f25a2f1a9c51f97506a9a329aa6ae51dce extra : source : 89332d2e561395efa12385c264c4a9d32169ff98
This commit is contained in:
Родитель
94da1177a0
Коммит
35a1c10d03
|
@ -453,8 +453,6 @@ public:
|
|||
return DECODER_STATE_DORMANT;
|
||||
}
|
||||
|
||||
bool HandleDormant(bool aDormant);
|
||||
|
||||
RefPtr<MediaDecoder::SeekPromise> HandleSeek(SeekTarget aTarget) override;
|
||||
|
||||
void HandleVideoSuspendTimeout() override
|
||||
|
@ -467,13 +465,7 @@ public:
|
|||
// Do nothing since we won't resume decoding until exiting dormant.
|
||||
}
|
||||
|
||||
void HandlePlayStateChanged(MediaDecoder::PlayState aPlayState) override
|
||||
{
|
||||
if (aPlayState == MediaDecoder::PLAY_STATE_PLAYING) {
|
||||
// Exit dormant when the user wants to play.
|
||||
HandleDormant(false);
|
||||
}
|
||||
}
|
||||
void HandlePlayStateChanged(MediaDecoder::PlayState aPlayState) override;
|
||||
|
||||
private:
|
||||
SeekJob mPendingSeek;
|
||||
|
@ -1366,17 +1358,6 @@ WaitForCDMState::HandleDormant(bool aDormant)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
MediaDecoderStateMachine::
|
||||
DormantState::HandleDormant(bool aDormant)
|
||||
{
|
||||
if (!aDormant) {
|
||||
MOZ_ASSERT(!Info().IsEncrypted() || mMaster->mCDMProxy);
|
||||
SetState<DecodingFirstFrameState>(Move(mPendingSeek));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
RefPtr<MediaDecoder::SeekPromise>
|
||||
MediaDecoderStateMachine::
|
||||
DormantState::HandleSeek(SeekTarget aTarget)
|
||||
|
@ -1388,6 +1369,17 @@ DormantState::HandleSeek(SeekTarget aTarget)
|
|||
return SetState<SeekingState>(Move(seekJob));
|
||||
}
|
||||
|
||||
void
|
||||
MediaDecoderStateMachine::
|
||||
DormantState::HandlePlayStateChanged(MediaDecoder::PlayState aPlayState)
|
||||
{
|
||||
if (aPlayState == MediaDecoder::PLAY_STATE_PLAYING) {
|
||||
// Exit dormant when the user wants to play.
|
||||
MOZ_ASSERT(!Info().IsEncrypted() || mMaster->mCDMProxy);
|
||||
SetState<DecodingFirstFrameState>(Move(mPendingSeek));
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
MediaDecoderStateMachine::
|
||||
WaitForCDMState::HandleCDMProxyReady()
|
||||
|
|
Загрузка…
Ссылка в новой задаче