mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1233630 - Remove MediaDecoderStateMachine::AudioDecodedUsecs. r=kikuo.
This commit is contained in:
parent
b3b65240bd
commit
e7f2ec86d3
@ -412,7 +412,7 @@ bool MediaDecoderStateMachine::HasFutureAudio()
|
||||
// we've completely decoded all audio (but not finished playing it yet
|
||||
// as per 1).
|
||||
return !mAudioCompleted &&
|
||||
(AudioDecodedUsecs() >
|
||||
(GetDecodedAudioDuration() >
|
||||
mLowAudioThresholdUsecs * mPlaybackRate ||
|
||||
AudioQueue().IsFinished());
|
||||
}
|
||||
@ -1817,18 +1817,6 @@ MediaDecoderStateMachine::StartMediaSink()
|
||||
}
|
||||
}
|
||||
|
||||
int64_t MediaDecoderStateMachine::AudioDecodedUsecs()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
NS_ASSERTION(HasAudio(),
|
||||
"Should only call AudioDecodedUsecs() when we have audio");
|
||||
// The amount of audio we have decoded is the amount of audio data we've
|
||||
// already decoded and pushed to the hardware, plus the amount of audio
|
||||
// data waiting to be pushed to the hardware.
|
||||
int64_t pushed = mMediaSink->IsStarted() ? (AudioEndTime() - GetMediaTime()) : 0;
|
||||
return pushed + AudioQueue().Duration();
|
||||
}
|
||||
|
||||
bool MediaDecoderStateMachine::HasLowDecodedData(int64_t aAudioUsecs)
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
@ -1837,7 +1825,7 @@ bool MediaDecoderStateMachine::HasLowDecodedData(int64_t aAudioUsecs)
|
||||
// provided we've not decoded to the end of the audio stream, or
|
||||
// if we're low on video frames, provided
|
||||
// we've not decoded to the end of the video stream.
|
||||
return ((IsAudioDecoding() && AudioDecodedUsecs() < aAudioUsecs) ||
|
||||
return ((IsAudioDecoding() && GetDecodedAudioDuration() < aAudioUsecs) ||
|
||||
(IsVideoDecoding() &&
|
||||
static_cast<uint32_t>(VideoQueue().GetSize()) < LOW_VIDEO_FRAMES));
|
||||
}
|
||||
|
@ -448,12 +448,6 @@ protected:
|
||||
// Returns true if we have less than aUsecs of undecoded data available.
|
||||
bool HasLowUndecodedData(int64_t aUsecs);
|
||||
|
||||
// Returns the number of unplayed usecs of audio we've got decoded and/or
|
||||
// pushed to the hardware waiting to play. This is how much audio we can
|
||||
// play without having to run the audio decoder. The decoder monitor
|
||||
// must be held.
|
||||
int64_t AudioDecodedUsecs();
|
||||
|
||||
// Returns true when there's decoded audio waiting to play.
|
||||
// The decoder monitor must be held.
|
||||
bool HasFutureAudio();
|
||||
|
Loading…
Reference in New Issue
Block a user