Bug 1352934 - make the seek operation at StateObject::HandleResumeVideoDecoding() unobservable; r?jwwang draft
authorKaku Kuo <kaku@mozilla.com>
Thu, 06 Apr 2017 15:14:37 +0800
changeset 556630 e49a3f098336a19c344f89e4c54be04df0a50dca
parent 556588 6484119d76296b8b71e387e135483e00f768ff07
child 622942 9176c39dd67feed64779e8b6688e8da0b2a58a29
push id52605
push userbmo:kaku@mozilla.com
push dateThu, 06 Apr 2017 07:16:11 +0000
reviewersjwwang
bugs1352934, 1309494, 1350852
milestone55.0a1
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
dom/media/MediaDecoderStateMachine.cpp
--- 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)