Bug 1314524. Part 7 - fix comments about dormant. r=kaku
authorJW Wang <jwwang@mozilla.com>
Fri, 28 Oct 2016 16:20:15 +0800
changeset 351542 85aba58a1144ed9060cecffe45a713966a241219
parent 351541 8715720a9ac28ba4dafa0e58ec965098723a759c
child 351543 56dfef4b382a41fbbefcec7a9d159cd32835bf9c
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1314524
milestone52.0a1
Bug 1314524. Part 7 - fix comments about dormant. r=kaku MozReview-Commit-ID: 5qFuMRMLqEr
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -271,17 +271,16 @@ protected:
 };
 
 /**
  * Purpose: decode metadata like duration and dimensions of the media resource.
  *
  * Transition to other states when decoding metadata is done:
  *   SHUTDOWN if failing to decode metadata.
  *   WAIT_FOR_CDM if the media is encrypted and CDM is not available.
- *   DORMANT if any pending dormant request.
  *   DECODING_FIRSTFRAME otherwise.
  */
 class MediaDecoderStateMachine::DecodeMetadataState
   : public MediaDecoderStateMachine::StateObject
 {
 public:
   explicit DecodeMetadataState(Master* aPtr) : StateObject(aPtr) {}
 
@@ -345,17 +344,16 @@ private:
 
   MozPromiseRequestHolder<MediaDecoderReader::MetadataPromise> mMetadataRequest;
 };
 
 /**
  * Purpose: wait for the CDM to start decoding.
  *
  * Transition to other states when CDM is ready:
- *   DORMANT if any pending dormant request.
  *   DECODING_FIRSTFRAME otherwise.
  */
 class MediaDecoderStateMachine::WaitForCDMState
   : public MediaDecoderStateMachine::StateObject
 {
 public:
   explicit WaitForCDMState(Master* aPtr) : StateObject(aPtr) {}
 
@@ -453,32 +451,31 @@ public:
 private:
   SeekJob mPendingSeek;
 };
 
 /**
  * Purpose: decode the 1st audio and video frames to fire the 'loadeddata' event.
  *
  * Transition to:
- *   DORMANT if any dormant request.
  *   SHUTDOWN if any decode error.
  *   SEEKING if any pending seek and seek is possible.
  *   DECODING when the 'loadeddata' event is fired.
  */
 class MediaDecoderStateMachine::DecodingFirstFrameState
   : public MediaDecoderStateMachine::StateObject
 {
 public:
   explicit DecodingFirstFrameState(Master* aPtr) : StateObject(aPtr) {}
 
   void Enter(SeekJob aPendingSeek);
 
   void Exit() override
   {
-    // mPendingSeek is either moved before transition to SEEKING or DORMANT,
+    // mPendingSeek is either moved before transition to SEEKING,
     // or should be rejected here before transition to SHUTDOWN.
     mPendingSeek.RejectIfExists(__func__);
   }
 
   State GetState() const override
   {
     return DECODER_STATE_DECODING_FIRSTFRAME;
   }
@@ -523,17 +520,17 @@ private:
 
   SeekJob mPendingSeek;
 };
 
 /**
  * Purpose: decode audio/video data for playback.
  *
  * Transition to:
- *   DORMANT if any dormant request.
+ *   DORMANT if playback is paused for a while.
  *   SEEKING if any seek request.
  *   SHUTDOWN if any decode error.
  *   BUFFERING if playback can't continue due to lack of decoded data.
  *   COMPLETED when having decoded all audio/video data.
  */
 class MediaDecoderStateMachine::DecodingState
   : public MediaDecoderStateMachine::StateObject
 {
@@ -756,17 +753,16 @@ private:
   // Fired when playback is paused for a while to enter dormant.
   DelayedScheduler mDormantTimer;
 };
 
 /**
  * Purpose: seek to a particular new playback position.
  *
  * Transition to:
- *   DORMANT if any dormant request.
  *   SEEKING if any new seek request.
  *   SHUTDOWN if seek failed.
  *   COMPLETED if the new playback position is the end of the media resource.
  *   DECODING otherwise.
  */
 class MediaDecoderStateMachine::SeekingState
   : public MediaDecoderStateMachine::StateObject
 {
@@ -932,17 +928,16 @@ private:
   MozPromiseRequestHolder<SeekTask::SeekTaskPromise> mSeekTaskRequest;
   RefPtr<SeekTask> mSeekTask;
 };
 
 /**
  * Purpose: stop playback until enough data is decoded to continue playback.
  *
  * Transition to:
- *   DORMANT if any dormant request.
  *   SEEKING if any seek request.
  *   SHUTDOWN if any decode error.
  *   COMPLETED when having decoded all audio/video data.
  *   DECODING when having decoded enough data to continue playback.
  */
 class MediaDecoderStateMachine::BufferingState
   : public MediaDecoderStateMachine::StateObject
 {
@@ -1010,17 +1005,16 @@ private:
   // unbuffered data.
   const uint32_t mBufferingWait = 15;
 };
 
 /**
  * Purpose: play all the decoded data and fire the 'ended' event.
  *
  * Transition to:
- *   DORMANT if any dormant request.
  *   SEEKING if any seek request.
  */
 class MediaDecoderStateMachine::CompletedState
   : public MediaDecoderStateMachine::StateObject
 {
 public:
   explicit CompletedState(Master* aPtr) : StateObject(aPtr) {}