mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1258271 - Remove arguments from MediaDecoderStateMachine::HaveEnoughDecodedAudio(). r=bechen.
MozReview-Commit-ID: E0qE18TmNH0
This commit is contained in:
parent
35e5eec178
commit
cc2cdd3cd6
@ -460,12 +460,13 @@ void MediaDecoderStateMachine::DiscardStreamData()
|
||||
}
|
||||
}
|
||||
|
||||
bool MediaDecoderStateMachine::HaveEnoughDecodedAudio(int64_t aAmpleAudioUSecs)
|
||||
bool MediaDecoderStateMachine::HaveEnoughDecodedAudio()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
|
||||
int64_t ampleAudioUSecs = mAmpleAudioThresholdUsecs * mPlaybackRate;
|
||||
if (AudioQueue().GetSize() == 0 ||
|
||||
GetDecodedAudioDuration() < aAmpleAudioUSecs) {
|
||||
GetDecodedAudioDuration() < ampleAudioUSecs) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -562,14 +563,12 @@ MediaDecoderStateMachine::NeedToDecodeAudio()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
SAMPLE_LOG("NeedToDecodeAudio() isDec=%d minPrl=%d enufAud=%d",
|
||||
IsAudioDecoding(), mMinimizePreroll,
|
||||
HaveEnoughDecodedAudio(mAmpleAudioThresholdUsecs * mPlaybackRate));
|
||||
IsAudioDecoding(), mMinimizePreroll, HaveEnoughDecodedAudio());
|
||||
|
||||
return IsAudioDecoding() &&
|
||||
mState != DECODER_STATE_SEEKING &&
|
||||
((IsDecodingFirstFrame() && AudioQueue().GetSize() == 0) ||
|
||||
(!mMinimizePreroll &&
|
||||
!HaveEnoughDecodedAudio(mAmpleAudioThresholdUsecs * mPlaybackRate)));
|
||||
(!mMinimizePreroll && !HaveEnoughDecodedAudio()));
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -340,7 +340,7 @@ private:
|
||||
|
||||
// Discard audio/video data that are already played by MSG.
|
||||
void DiscardStreamData();
|
||||
bool HaveEnoughDecodedAudio(int64_t aAmpleAudioUSecs);
|
||||
bool HaveEnoughDecodedAudio();
|
||||
bool HaveEnoughDecodedVideo();
|
||||
|
||||
// Returns true if the state machine has shutdown or is in the process of
|
||||
|
Loading…
Reference in New Issue
Block a user