зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1328811. Part 3 - inline NeedToDecode{Audio,Video} for DispatchDecodeTasksIfNeeded is the only caller. r=kaku
MozReview-Commit-ID: H1K6LJCjk4B --HG-- extra : rebase_source : 382293f2aa91a134b895458866cc590798d36edd extra : source : c0971794c58515b498d93caeccf8d8932f48614f
This commit is contained in:
Родитель
38ceee4499
Коммит
0a36f808bc
|
@ -2526,18 +2526,6 @@ bool MediaDecoderStateMachine::HaveEnoughDecodedVideo()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
MediaDecoderStateMachine::NeedToDecodeVideo()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
SAMPLE_LOG("NeedToDecodeVideo() isDec=%d minPrl=%d enufVid=%d",
|
||||
IsVideoDecoding(), mMinimizePreroll, HaveEnoughDecodedVideo());
|
||||
return IsVideoDecoding() &&
|
||||
mState != DECODER_STATE_SEEKING &&
|
||||
((!mSentFirstFrameLoadedEvent && VideoQueue().GetSize() == 0) ||
|
||||
(!mMinimizePreroll && !HaveEnoughDecodedVideo()));
|
||||
}
|
||||
|
||||
bool
|
||||
MediaDecoderStateMachine::NeedToSkipToNextKeyframe()
|
||||
{
|
||||
|
@ -2594,19 +2582,6 @@ MediaDecoderStateMachine::NeedToSkipToNextKeyframe()
|
|||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
MediaDecoderStateMachine::NeedToDecodeAudio()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
SAMPLE_LOG("NeedToDecodeAudio() isDec=%d minPrl=%d enufAud=%d",
|
||||
IsAudioDecoding(), mMinimizePreroll, HaveEnoughDecodedAudio());
|
||||
|
||||
return IsAudioDecoding() &&
|
||||
mState != DECODER_STATE_SEEKING &&
|
||||
((!mSentFirstFrameLoadedEvent && AudioQueue().GetSize() == 0) ||
|
||||
(!mMinimizePreroll && !HaveEnoughDecodedAudio()));
|
||||
}
|
||||
|
||||
void
|
||||
MediaDecoderStateMachine::PushAudio(MediaData* aSample)
|
||||
{
|
||||
|
@ -2975,8 +2950,17 @@ MediaDecoderStateMachine::DispatchDecodeTasksIfNeeded()
|
|||
return;
|
||||
}
|
||||
|
||||
const bool needToDecodeAudio = NeedToDecodeAudio();
|
||||
const bool needToDecodeVideo = NeedToDecodeVideo();
|
||||
const bool needToDecodeAudio =
|
||||
IsAudioDecoding() &&
|
||||
mState != DECODER_STATE_SEEKING &&
|
||||
((!mSentFirstFrameLoadedEvent && AudioQueue().GetSize() == 0) ||
|
||||
(!mMinimizePreroll && !HaveEnoughDecodedAudio()));
|
||||
|
||||
const bool needToDecodeVideo =
|
||||
IsVideoDecoding() &&
|
||||
mState != DECODER_STATE_SEEKING &&
|
||||
((!mSentFirstFrameLoadedEvent && VideoQueue().GetSize() == 0) ||
|
||||
(!mMinimizePreroll && !HaveEnoughDecodedVideo()));
|
||||
|
||||
SAMPLE_LOG("DispatchDecodeTasksIfNeeded needAudio=%d audioStatus=%s needVideo=%d videoStatus=%s",
|
||||
needToDecodeAudio, AudioRequestStatus(),
|
||||
|
|
|
@ -341,14 +341,6 @@ protected:
|
|||
MediaQueue<MediaData>& AudioQueue() { return mAudioQueue; }
|
||||
MediaQueue<MediaData>& VideoQueue() { return mVideoQueue; }
|
||||
|
||||
// True if our buffers of decoded audio are not full, and we should
|
||||
// decode more.
|
||||
bool NeedToDecodeAudio();
|
||||
|
||||
// True if our buffers of decoded video are not full, and we should
|
||||
// decode more.
|
||||
bool NeedToDecodeVideo();
|
||||
|
||||
// True if we are low in decoded audio/video data.
|
||||
// May not be invoked when mReader->UseBufferingHeuristics() is false.
|
||||
bool HasLowDecodedData();
|
||||
|
|
Загрузка…
Ссылка в новой задаче