Bug 1328831 - Remove MDSM::DispatchAudioOffloading. r=jolin

MozReview-Commit-ID: JVJOpmUHNp6

--HG--
extra : rebase_source : 7bcca5c52938b9e429c1e1833500bd85b64dc229
This commit is contained in:
JW Wang 2017-01-05 17:38:17 +08:00
parent a6bb0bf37f
commit f6c88fe5f9
2 changed files with 2 additions and 22 deletions

View File

@ -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;
}

View File

@ -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;