mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 13:21:28 +00:00
Bug 1136827 - Stop proxying DecodeError to the decode thread. r=mattwoodrow
At this point, all the callers actually call it on the state machine thread, where it belongs.
This commit is contained in:
parent
d5f5272884
commit
6aa248ee60
@ -930,13 +930,6 @@ MediaDecoderStateMachine::OnNotDecoded(MediaData::Type aType,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MediaDecoderStateMachine::AcquireMonitorAndInvokeDecodeError()
|
||||
{
|
||||
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
|
||||
DecodeError();
|
||||
}
|
||||
|
||||
void
|
||||
MediaDecoderStateMachine::MaybeFinishDecodeFirstFrame()
|
||||
{
|
||||
@ -2096,25 +2089,13 @@ bool MediaDecoderStateMachine::HasLowUndecodedData(int64_t aUsecs)
|
||||
void
|
||||
MediaDecoderStateMachine::DecodeError()
|
||||
{
|
||||
AssertCurrentThreadInMonitor();
|
||||
MOZ_ASSERT(OnStateMachineThread());
|
||||
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
|
||||
if (mState == DECODER_STATE_SHUTDOWN) {
|
||||
// Already shutdown.
|
||||
return;
|
||||
}
|
||||
|
||||
// DecodeError should probably be redesigned so that it doesn't need to run
|
||||
// on the Decode Task Queue, but this does the trick for now.
|
||||
if (!OnDecodeThread()) {
|
||||
RefPtr<nsIRunnable> task(
|
||||
NS_NewRunnableMethod(this, &MediaDecoderStateMachine::AcquireMonitorAndInvokeDecodeError));
|
||||
nsresult rv = DecodeTaskQueue()->Dispatch(task);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
DECODER_WARN("Failed to dispatch AcquireMonitorAndInvokeDecodeError");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Change state to shutdown before sending error report to MediaDecoder
|
||||
// and the HTMLMediaElement, so that our pipeline can start exiting
|
||||
// cleanly during the sync dispatch below.
|
||||
|
@ -410,9 +410,6 @@ public:
|
||||
// and aborting all pending operations on the decode task queue.
|
||||
void Reset();
|
||||
|
||||
private:
|
||||
void AcquireMonitorAndInvokeDecodeError();
|
||||
|
||||
protected:
|
||||
virtual ~MediaDecoderStateMachine();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user