Bug 1252753. Part 2 - remove MediaDecoderStateMachine::PushFront(). r=kinetik.
authorJW Wang <jwwang@mozilla.com>
Tue, 08 Mar 2016 11:20:39 +0800
changeset 338036 d8886937457cad74d5382bf7cd29a55c1da191ef
parent 338035 4a4bb1aade866ea0b758416fcf8e56a930abed32
child 338037 fd40628ecf34533f681736709a9fed2f84958a64
child 338050 a02ed44274ced0fa7a6434317e780390a3890c39
push id12405
push usercku@mozilla.com
push dateTue, 08 Mar 2016 03:35:29 +0000
reviewerskinetik
bugs1252753
milestone47.0a1
Bug 1252753. Part 2 - remove MediaDecoderStateMachine::PushFront(). r=kinetik. MozReview-Commit-ID: 2jtDFI61bGf
dom/media/MediaDecoderStateMachine.cpp
dom/media/MediaDecoderStateMachine.h
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -691,32 +691,16 @@ MediaDecoderStateMachine::Push(MediaData
   } else {
     // TODO: Handle MediaRawData, determine which queue should be pushed.
   }
   UpdateNextFrameStatus();
   DispatchDecodeTasksIfNeeded();
 }
 
 void
-MediaDecoderStateMachine::PushFront(MediaData* aSample, MediaData::Type aSampleType)
-{
-  MOZ_ASSERT(OnTaskQueue());
-  MOZ_ASSERT(aSample);
-  if (aSample->mType == MediaData::AUDIO_DATA) {
-    AudioQueue().PushFront(aSample);
-  } else if (aSample->mType == MediaData::VIDEO_DATA) {
-    aSample->As<VideoData>()->mFrameID = ++mCurrentFrameID;
-    VideoQueue().PushFront(aSample);
-  } else {
-    // TODO: Handle MediaRawData, determine which queue should be pushed.
-  }
-  UpdateNextFrameStatus();
-}
-
-void
 MediaDecoderStateMachine::CheckIsAudible(const MediaData* aSample)
 {
   MOZ_ASSERT(OnTaskQueue());
   MOZ_ASSERT(aSample->mType == MediaData::AUDIO_DATA);
 
   const AudioData* data = aSample->As<AudioData>();
   bool isAudible = data->IsAudible();
   if (isAudible && !mIsAudioDataAudible) {
--- a/dom/media/MediaDecoderStateMachine.h
+++ b/dom/media/MediaDecoderStateMachine.h
@@ -387,17 +387,16 @@ protected:
   void SetState(State aState);
 
   void BufferedRangeUpdated();
 
   // Inserts MediaData* samples into their respective MediaQueues.
   // aSample must not be null.
 
   void Push(MediaData* aSample, MediaData::Type aSampleType);
-  void PushFront(MediaData* aSample, MediaData::Type aSampleType);
 
   void OnAudioPopped(const RefPtr<MediaData>& aSample);
   void OnVideoPopped(const RefPtr<MediaData>& aSample);
 
   void CheckIsAudible(const MediaData* aSample);
   void VolumeChanged();
   void LogicalPlaybackRateChanged();
   void PreservesPitchChanged();