mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Bug 1208932 - Remove ReadMetadataFailureReason::WAITING_FOR_RESOURCES. r=jya.
This commit is contained in:
parent
03b34f2d31
commit
0bb44154c7
@ -49,7 +49,6 @@ private:
|
||||
|
||||
enum class ReadMetadataFailureReason : int8_t
|
||||
{
|
||||
WAITING_FOR_RESOURCES,
|
||||
METADATA_ERROR
|
||||
};
|
||||
|
||||
|
@ -1168,7 +1168,6 @@ void MediaDecoderStateMachine::UpdatePlaybackPosition(int64_t aTime)
|
||||
static const char* const gMachineStateStr[] = {
|
||||
"NONE",
|
||||
"DECODING_METADATA",
|
||||
"WAIT_FOR_RESOURCES",
|
||||
"WAIT_FOR_CDM",
|
||||
"DORMANT",
|
||||
"DECODING",
|
||||
@ -1411,12 +1410,6 @@ MediaDecoderStateMachine::NotifyWaitingForResourcesStatusChanged()
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
|
||||
DECODER_LOG("NotifyWaitingForResourcesStatusChanged");
|
||||
|
||||
if (mState == DECODER_STATE_WAIT_FOR_RESOURCES) {
|
||||
// Try again.
|
||||
SetState(DECODER_STATE_DECODING_NONE);
|
||||
ScheduleStateMachine();
|
||||
}
|
||||
}
|
||||
|
||||
void MediaDecoderStateMachine::PlayStateChanged()
|
||||
@ -2040,14 +2033,8 @@ MediaDecoderStateMachine::OnMetadataNotRead(ReadMetadataFailureReason aReason)
|
||||
MOZ_ASSERT(mState == DECODER_STATE_DECODING_METADATA);
|
||||
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
|
||||
mMetadataRequest.Complete();
|
||||
|
||||
if (aReason == ReadMetadataFailureReason::WAITING_FOR_RESOURCES) {
|
||||
SetState(DECODER_STATE_WAIT_FOR_RESOURCES);
|
||||
} else {
|
||||
MOZ_ASSERT(aReason == ReadMetadataFailureReason::METADATA_ERROR);
|
||||
DECODER_WARN("Decode metadata failed, shutting down decoder");
|
||||
DecodeError();
|
||||
}
|
||||
DECODER_WARN("Decode metadata failed, shutting down decoder");
|
||||
DecodeError();
|
||||
}
|
||||
|
||||
void
|
||||
@ -2341,7 +2328,6 @@ nsresult MediaDecoderStateMachine::RunStateMachine()
|
||||
case DECODER_STATE_SHUTDOWN:
|
||||
case DECODER_STATE_DORMANT:
|
||||
case DECODER_STATE_WAIT_FOR_CDM:
|
||||
case DECODER_STATE_WAIT_FOR_RESOURCES:
|
||||
return NS_OK;
|
||||
|
||||
case DECODER_STATE_DECODING_NONE: {
|
||||
|
@ -140,7 +140,6 @@ public:
|
||||
enum State {
|
||||
DECODER_STATE_DECODING_NONE,
|
||||
DECODER_STATE_DECODING_METADATA,
|
||||
DECODER_STATE_WAIT_FOR_RESOURCES,
|
||||
DECODER_STATE_WAIT_FOR_CDM,
|
||||
DECODER_STATE_DORMANT,
|
||||
DECODER_STATE_DECODING,
|
||||
|
@ -272,10 +272,8 @@ MediaDecodeTask::OnMetadataRead(MetadataHolder* aMetadata)
|
||||
void
|
||||
MediaDecodeTask::OnMetadataNotRead(ReadMetadataFailureReason aReason)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(aReason != ReadMetadataFailureReason::WAITING_FOR_RESOURCES);
|
||||
mDecoderReader->Shutdown();
|
||||
ReportFailureOnMainThread(WebAudioDecodeJob::InvalidContent);
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user