From 583e8af90ceba5e57326cbae3d665503410def30 Mon Sep 17 00:00:00 2001 From: Karl Tomlinson Date: Tue, 30 Oct 2018 14:59:52 +0000 Subject: [PATCH] Bug 1503132 do not shut down graph thread on completion of offline rendering r=padenot AudioWorket will need to keep processing events on the graph thread. The graph thread is instead shut down when the AudioContext is destroyed. Depends on D10165 Differential Revision: https://phabricator.services.mozilla.com/D10166 --HG-- extra : moz-landing-system : lando --- dom/media/MediaStreamGraph.cpp | 13 ------------- dom/media/MediaStreamGraphImpl.h | 5 ----- 2 files changed, 18 deletions(-) diff --git a/dom/media/MediaStreamGraph.cpp b/dom/media/MediaStreamGraph.cpp index 49e78f643e5b..576346bb817a 100644 --- a/dom/media/MediaStreamGraph.cpp +++ b/dom/media/MediaStreamGraph.cpp @@ -1230,18 +1230,6 @@ MediaStreamGraphImpl::ProduceDataForStreamsBlockByBlock(uint32_t aStreamIndex, "Something went wrong with rounding to block boundaries"); } -bool -MediaStreamGraphImpl::AllFinishedStreamsNotified() -{ - MOZ_ASSERT(OnGraphThread()); - for (MediaStream* stream : AllStreams()) { - if (stream->mFinished && !stream->mNotifiedFinished) { - return false; - } - } - return true; -} - void MediaStreamGraphImpl::RunMessageAfterProcessing(UniquePtr aMessage) { @@ -1451,7 +1439,6 @@ MediaStreamGraphImpl::UpdateMainThreadState() MOZ_ASSERT(OnGraphThread()); MonitorAutoLock lock(mMonitor); bool finalUpdate = mForceShutDown || - (mProcessedTime >= mEndTime && AllFinishedStreamsNotified()) || (IsEmpty() && mBackMessageQueue.IsEmpty()); PrepareUpdatesToMainThreadState(finalUpdate); if (finalUpdate) { diff --git a/dom/media/MediaStreamGraphImpl.h b/dom/media/MediaStreamGraphImpl.h index 27de05030538..868ca370fd07 100644 --- a/dom/media/MediaStreamGraphImpl.h +++ b/dom/media/MediaStreamGraphImpl.h @@ -218,11 +218,6 @@ public: * mMonitor must be held. */ void PrepareUpdatesToMainThreadState(bool aFinalUpdate); - /** - * Returns false if there is any stream that has finished but not yet finished - * playing out. - */ - bool AllFinishedStreamsNotified(); /** * If we are rendering in non-realtime mode, we don't want to send messages to * the main thread at each iteration for performance reasons. We instead