Bug 1303655. Part 2 - Remove unused functions. draft
authorJW Wang <jwwang@mozilla.com>
Tue, 06 Sep 2016 16:54:14 +0800
changeset 415335 105b38cf5763d4c4669071fb0135213a3f804b92
parent 415334 3c747388db01dffc6c222a673350e1e879285295
child 415336 6b1e41f8a8e62beb94ff5d9809c36f0243956d24
push id29852
push userjwwang@mozilla.com
push dateTue, 20 Sep 2016 06:50:15 +0000
bugs1303655
milestone51.0a1
Bug 1303655. Part 2 - Remove unused functions. MozReview-Commit-ID: 3Y7gVZXledn
dom/media/MediaDecoderStateMachine.cpp
dom/media/MediaDecoderStateMachine.h
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1640,44 +1640,16 @@ MediaDecoderStateMachine::DecodeFirstFra
     SetState(DECODER_STATE_DECODING);
     return;
   }
 
   // Dispatch tasks to decode first frames.
   DispatchDecodeTasksIfNeeded();
 }
 
-void
-MediaDecoderStateMachine::StartDecoding()
-{
-  MOZ_ASSERT(OnTaskQueue());
-  // Should transition to DECODING only after decoding first frames.
-  MOZ_ASSERT(mSentFirstFrameLoadedEvent);
-  MOZ_ASSERT(mState == DECODER_STATE_DECODING);
-  // Pending seek should've been handled by DECODING_FIRSTFRAME before
-  // transitioning to DECODING.
-  MOZ_ASSERT(!mQueuedSeek.Exists());
-
-  if (CheckIfDecodeComplete()) {
-    SetState(DECODER_STATE_COMPLETED);
-    return;
-  }
-
-  mDecodeStartTime = TimeStamp::Now();
-
-  // Reset other state to pristine values before starting decode.
-  mIsAudioPrerolling = !DonePrerollingAudio() && !mReader->IsWaitingAudioData();
-  mIsVideoPrerolling = !DonePrerollingVideo() && !mReader->IsWaitingVideoData();
-
-  // Ensure that we've got tasks enqueued to decode data if we need to.
-  DispatchDecodeTasksIfNeeded();
-
-  ScheduleStateMachine();
-}
-
 void MediaDecoderStateMachine::PlayStateChanged()
 {
   MOZ_ASSERT(OnTaskQueue());
 
   if (mPlayState != MediaDecoder::PLAY_STATE_PLAYING) {
     mVideoDecodeSuspendTimer.Reset();
     return;
   }
--- a/dom/media/MediaDecoderStateMachine.h
+++ b/dom/media/MediaDecoderStateMachine.h
@@ -466,19 +466,16 @@ protected:
 
   // Check to see if we don't have enough data to play up to the next frame.
   // If we don't, switch to buffering mode.
   void MaybeStartBuffering();
 
   // The entry action of DECODER_STATE_DECODING_FIRSTFRAME.
   void DecodeFirstFrame();
 
-  // The entry action of DECODER_STATE_DECODING.
-  void StartDecoding();
-
   // Moves the decoder into the shutdown state, and dispatches an error
   // event to the media element. This begins shutting down the decoder.
   // The decoder monitor must be held. This is only called on the
   // decode thread.
   void DecodeError(const MediaResult& aError);
 
   // Dispatches a LoadedMetadataEvent.
   // This is threadsafe and can be called on any thread.