Bug 1352934 - make the seek operation at StateObject::HandleResumeVideoDecoding() unobservable; r?jwwang
The seeking operation WAS unobservable before
Bug 1309494.
It was changed to be observable because I want the "canplay" event, which will be dispatched after the seeking operation is done,
to notify our video controller to cancel the throbber(which will be shown if the decoder resuming cannot be done in 250 ms).
Now, we can change the seeking operatoin back to unobservable thanks to
bug 1350852.
In
bug 1350852, we dispatche a specific "mozvideoonlyseekcompleted" event to cancel the throbber.
MozReview-Commit-ID: Ke9sqDPotAB
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2037,17 +2037,17 @@ StateObject::HandleResumeVideoDecoding(c
: SeekTarget::Type::PrevSyncPoint;
seekJob.mTarget.emplace(aTarget, type, true /* aVideoOnly */);
// Hold mMaster->mAbstractMainThread here because this->mMaster will be
// invalid after the current state object is deleted in SetState();
RefPtr<AbstractThread> mainThread = mMaster->mAbstractMainThread;
- SetSeekingState(Move(seekJob), EventVisibility::Observable)->Then(
+ SetSeekingState(Move(seekJob), EventVisibility::Suppressed)->Then(
mainThread, __func__,
[start, info, hw](){ ReportRecoveryTelemetry(start, info, hw); },
[](){});
}
RefPtr<MediaDecoder::SeekPromise>
MediaDecoderStateMachine::
StateObject::SetSeekingState(SeekJob&& aSeekJob, EventVisibility aVisibility)