Bug 1300956. Part 6 - Implement SeekingState. r=kaku
authorJW Wang <jwwang@mozilla.com>
Tue, 06 Sep 2016 11:20:12 +0800
changeset 354474 d12930f864f388289533fa2813829f0ce19b1747
parent 354473 b9ea5ce506a7318e037aa519a8af63aa307f8ab6
child 354475 a37e83f746eebb5899f02fbe4110939a2dbd2eeb
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1300956
milestone51.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 1300956. Part 6 - Implement SeekingState. r=kaku MozReview-Commit-ID: IrEOmTXlzuR
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -307,16 +307,28 @@ public:
   }
 
   State GetState() const override
   {
     return DECODER_STATE_DECODING;
   }
 };
 
+class MediaDecoderStateMachine::SeekingState
+  : public MediaDecoderStateMachine::StateObject
+{
+public:
+  explicit SeekingState(Master* aPtr) : StateObject(aPtr) {}
+
+  State GetState() const override
+  {
+    return DECODER_STATE_SEEKING;
+  }
+};
+
 #define INIT_WATCHABLE(name, val) \
   name(val, "MediaDecoderStateMachine::" #name)
 #define INIT_MIRROR(name, val) \
   name(mTaskQueue, val, "MediaDecoderStateMachine::" #name " (Mirror)")
 #define INIT_CANONICAL(name, val) \
   name(mTaskQueue, val, "MediaDecoderStateMachine::" #name " (Canonical)")
 
 MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
@@ -1186,16 +1198,19 @@ MediaDecoderStateMachine::SetState(State
       mStateObj = MakeUnique<DormantState>(this);
       break;
     case DECODER_STATE_DECODING_FIRSTFRAME:
       mStateObj = MakeUnique<DecodingFirstFrameState>(this);
       break;
     case DECODER_STATE_DECODING:
       mStateObj = MakeUnique<DecodingState>(this);
       break;
+    case DECODER_STATE_SEEKING:
+      mStateObj = MakeUnique<SeekingState>(this);
+      break;
     default:
       mStateObj = nullptr;
       break;
   }
 
   EnterState();
 }