Bug 1310140. Part 11 - make StateObject::HandleVideoSuspendTimeout() pure virtual for all sub-classes override it. r=kaku,kamidphish
authorJW Wang <jwwang@mozilla.com>
Tue, 18 Oct 2016 13:58:34 +0800
changeset 318479 6b99ecc25e0ae2296729747bef071dfb6168b863
parent 318478 df85afebba7bc35630e69357c685129b9646acba
child 318480 385c13b85702c3349b4fb402927cdeb597a89573
push id30841
push usercbook@mozilla.com
push dateWed, 19 Oct 2016 14:59:31 +0000
treeherdermozilla-central@8b2d92343bcb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku, kamidphish
bugs1310140
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1310140. Part 11 - make StateObject::HandleVideoSuspendTimeout() pure virtual for all sub-classes override it. r=kaku,kamidphish MozReview-Commit-ID: 2uZHm3NZIFV
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -210,22 +210,17 @@ public:
   virtual bool HandleWaitingForData() { return false; }
 
   virtual RefPtr<MediaDecoder::SeekPromise> HandleSeek(SeekTarget aTarget) = 0;
 
   virtual bool HandleAudioCaptured() { return false; }
 
   virtual RefPtr<ShutdownPromise> HandleShutdown();
 
-  virtual void HandleVideoSuspendTimeout()
-  {
-    mMaster->mVideoDecodeSuspended = true;
-    mMaster->mOnPlaybackEvent.Notify(MediaEventType::EnterVideoSuspend);
-    Reader()->SetVideoBlankDecode(true);
-  }
+  virtual void HandleVideoSuspendTimeout() = 0;
 
   virtual void DumpDebugInfo() {}
 
 protected:
   using Master = MediaDecoderStateMachine;
   explicit StateObject(Master* aPtr) : mMaster(aPtr) {}
   TaskQueue* OwnerThread() const { return mMaster->mTaskQueue; }
   MediaResource* Resource() const { return mMaster->mResource; }