Bug 1320466 part 6 - dispatch {not-}decoded and {not-}waited events from SeekingObject to SeekTask; r=jwwang
authorKaku Kuo <kaku@mozilla.com>
Sat, 26 Nov 2016 14:56:19 +0800
changeset 324932 2db94d238128bef513f7cff768f87ad4056030a1
parent 324931 38c2d58de393339a8ffc76e188f0e4ff68844229
child 324933 3a13ac4fb7a65965b6dd6a67c30d9e68d5d10413
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersjwwang
bugs1320466
milestone53.0a1
Bug 1320466 part 6 - dispatch {not-}decoded and {not-}waited events from SeekingObject to SeekTask; r=jwwang MozReview-Commit-ID: 3rzKd5GZBA6
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -842,22 +842,42 @@ public:
 
   State GetState() const override
   {
     return DECODER_STATE_SEEKING;
   }
 
   void HandleAudioDecoded(MediaData* aAudio) override
   {
-    MOZ_ASSERT(false);
+    mSeekTask->HandleAudioDecoded(aAudio);
   }
 
   void HandleVideoDecoded(MediaData* aVideo, TimeStamp aDecodeStart) override
   {
-    MOZ_ASSERT(false);
+    mSeekTask->HandleVideoDecoded(aVideo, aDecodeStart);
+  }
+
+  void HandleNotDecoded(MediaData::Type aType, const MediaResult& aError) override
+  {
+    mSeekTask->HandleNotDecoded(aType, aError);
+  }
+
+  void HandleAudioWaited(MediaData::Type aType) override
+  {
+    mSeekTask->HandleAudioWaited(aType);
+  }
+
+  void HandleVideoWaited(MediaData::Type aType) override
+  {
+    mSeekTask->HandleVideoWaited(aType);
+  }
+
+  void HandleNotWaited(const WaitForDataRejectValue& aRejection) override
+  {
+    mSeekTask->HandleNotWaited(aRejection);
   }
 
   void HandleVideoSuspendTimeout() override
   {
     // Do nothing since we want a valid video frame to show when seek is done.
   }
 
   void HandleResumeVideoDecoding() override