Bug 1288344. Part 2 - Remove MediaDecoder::mWasEndedWhenEnteredDormant. r=cpearce

MozReview-Commit-ID: edGkP9mv6L

--HG--
extra : rebase_source : 4833d10975c6dd241d41bf86f81b08a9fe76784c
This commit is contained in:
JW Wang 2016-07-12 14:34:06 +08:00
Родитель 237d5b4a0d
Коммит db58db163a
2 изменённых файлов: 1 добавлений и 10 удалений

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

@ -510,7 +510,6 @@ MediaDecoder::MediaDecoder(MediaDecoderOwner* aOwner)
, mMediaTracksConstructed(false)
, mFiredMetadataLoaded(false)
, mIsDormant(false)
, mWasEndedWhenEnteredDormant(false)
, mIsHeuristicDormantSupported(
Preferences::GetBool("media.decoder.heuristic.dormant.enabled", false))
, mHeuristicDormantTimeout(
@ -818,7 +817,6 @@ MediaDecoder::Seek(double aTime, SeekTarget::Type aSeekType, dom::Promise* aProm
int64_t timeUsecs = TimeUnit::FromSeconds(aTime).ToMicroseconds();
mLogicalPosition = aTime;
mWasEndedWhenEnteredDormant = false;
mLogicallySeeking = true;
SeekTarget target = SeekTarget(timeUsecs, aSeekType);
@ -1122,8 +1120,7 @@ bool
MediaDecoder::IsEnded() const
{
MOZ_ASSERT(NS_IsMainThread());
return mPlayState == PLAY_STATE_ENDED ||
(mWasEndedWhenEnteredDormant && (mPlayState != PLAY_STATE_SHUTDOWN));
return mPlayState == PLAY_STATE_ENDED;
}
void

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

@ -715,12 +715,6 @@ protected:
// True if MediaDecoder is in dormant state.
bool mIsDormant;
// True if MediaDecoder was PLAY_STATE_ENDED state, when entering to dormant.
// When MediaCodec is in dormant during PLAY_STATE_ENDED state, PlayState
// becomes different from PLAY_STATE_ENDED. But the MediaDecoder need to act
// as in PLAY_STATE_ENDED state to MediaDecoderOwner.
bool mWasEndedWhenEnteredDormant;
// True if heuristic dormant is supported.
const bool mIsHeuristicDormantSupported;