diff options
author | trav90 <travawine@openmailbox.org> | 2017-10-25 04:04:11 -0500 |
---|---|---|
committer | trav90 <travawine@openmailbox.org> | 2017-10-25 04:04:11 -0500 |
commit | a828d018f10b0c351d2ade1069b71df2e5ceeba4 (patch) | |
tree | 8e18d9b56d669f226142d87d908f291393153807 /dom/media/MediaDecoder.cpp | |
parent | 2f761baa85ef9efca8c0ff55ccb8604e7950a9e0 (diff) | |
download | palemoon-gre-a828d018f10b0c351d2ade1069b71df2e5ceeba4.tar.gz |
Move MediaDecoder::UpdateStreamBlockingForPlayState to the MDSM
Diffstat (limited to 'dom/media/MediaDecoder.cpp')
-rw-r--r-- | dom/media/MediaDecoder.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp index 561c057a3..bab636b7a 100644 --- a/dom/media/MediaDecoder.cpp +++ b/dom/media/MediaDecoder.cpp @@ -300,21 +300,6 @@ void MediaDecoder::SetVolume(double aVolume) mVolume = aVolume; } -void MediaDecoder::UpdateStreamBlockingForPlayState() -{ - MOZ_ASSERT(NS_IsMainThread()); - GetReentrantMonitor().AssertCurrentThreadIn(); - - auto s = GetDecodedStream(); - if (s) { - bool blockForPlayState = mPlayState != PLAY_STATE_PLAYING || mLogicallySeeking; - if (s->mHaveBlockedForPlayState != blockForPlayState) { - s->mStream->ChangeExplicitBlockerCount(blockForPlayState ? 1 : -1); - s->mHaveBlockedForPlayState = blockForPlayState; - } - } -} - void MediaDecoder::RecreateDecodedStream(int64_t aStartTimeUSecs) { MOZ_ASSERT(NS_IsMainThread()); @@ -322,7 +307,6 @@ void MediaDecoder::RecreateDecodedStream(int64_t aStartTimeUSecs) DECODER_LOG("RecreateDecodedStream aStartTimeUSecs=%lld!", aStartTimeUSecs); mDecodedStream.RecreateData(aStartTimeUSecs, MediaStreamGraph::GetInstance()); - UpdateStreamBlockingForPlayState(); } void MediaDecoder::AddOutputStream(ProcessedMediaStream* aStream, @@ -612,7 +596,6 @@ nsresult MediaDecoder::Seek(double aTime, SeekTarget::Type aSeekType) mWasEndedWhenEnteredDormant = false; mLogicallySeeking = true; - UpdateStreamBlockingForPlayState(); SeekTarget target = SeekTarget(timeUsecs, aSeekType); CallSeek(target); @@ -1033,7 +1016,6 @@ void MediaDecoder::OnSeekResolved(SeekResolveValue aVal) ChangeState(PLAY_STATE_ENDED); } mLogicallySeeking = false; - UpdateStreamBlockingForPlayState(); } UpdateLogicalPosition(aVal.mEventVisibility); @@ -1079,8 +1061,6 @@ void MediaDecoder::ChangeState(PlayState aState) gPlayStateStr[mPlayState], gPlayStateStr[aState]); mPlayState = aState; - UpdateStreamBlockingForPlayState(); - if (mPlayState == PLAY_STATE_PLAYING) { ConstructMediaTracks(); } else if (IsEnded()) { |