mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1328831 - Remove MDSM::DispatchAudioOffloading. r=jolin
MozReview-Commit-ID: JVJOpmUHNp6 --HG-- extra : rebase_source : 7bcca5c52938b9e429c1e1833500bd85b64dc229
This commit is contained in:
parent
a6bb0bf37f
commit
f6c88fe5f9
@ -2366,7 +2366,6 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
|
||||
mVideoDecodeSuspendTimer(mTaskQueue),
|
||||
mOutputStreamManager(new OutputStreamManager()),
|
||||
mResource(aDecoder->GetResource()),
|
||||
mAudioOffloading(false),
|
||||
INIT_MIRROR(mBuffered, TimeIntervals()),
|
||||
INIT_MIRROR(mEstimatedDuration, NullableTimeUnit()),
|
||||
INIT_MIRROR(mExplicitDuration, Maybe<double>()),
|
||||
@ -2741,11 +2740,8 @@ void MediaDecoderStateMachine::MaybeStartPlayback()
|
||||
return;
|
||||
}
|
||||
|
||||
bool playStatePermits = mPlayState == MediaDecoder::PLAY_STATE_PLAYING;
|
||||
if (!playStatePermits || mAudioOffloading) {
|
||||
DECODER_LOG("Not starting playback [playStatePermits: %d, "
|
||||
"mAudioOffloading: %d]",
|
||||
playStatePermits, mAudioOffloading);
|
||||
if (mPlayState != MediaDecoder::PLAY_STATE_PLAYING) {
|
||||
DECODER_LOG("Not starting playback [mPlayState=%d]", mPlayState.Ref());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -208,18 +208,6 @@ public:
|
||||
OwnerThread()->Dispatch(r.forget());
|
||||
}
|
||||
|
||||
void DispatchAudioOffloading(bool aAudioOffloading)
|
||||
{
|
||||
RefPtr<MediaDecoderStateMachine> self = this;
|
||||
nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction([=] () {
|
||||
if (self->mAudioOffloading != aAudioOffloading) {
|
||||
self->mAudioOffloading = aAudioOffloading;
|
||||
self->ScheduleStateMachine();
|
||||
}
|
||||
});
|
||||
OwnerThread()->Dispatch(r.forget());
|
||||
}
|
||||
|
||||
// Drop reference to mResource. Only called during shutdown dance.
|
||||
void BreakCycles() {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
@ -738,10 +726,6 @@ private:
|
||||
|
||||
MediaEventProducer<DecoderDoctorEvent> mOnDecoderDoctorEvent;
|
||||
|
||||
// True if audio is offloading.
|
||||
// Playback will not start when audio is offloading.
|
||||
bool mAudioOffloading;
|
||||
|
||||
void OnCDMProxyReady(RefPtr<CDMProxy> aProxy);
|
||||
void OnCDMProxyNotReady();
|
||||
RefPtr<CDMProxy> mCDMProxy;
|
||||
|
Loading…
Reference in New Issue
Block a user