Bug 1285122. Part 1 - remove SeekTask::mNeedToStopPrerolling{Audio,Video} per discussion in https://reviewboard.mozilla.org/r/43689/#comment54421. r=kaku
authorJW Wang <jwwang@mozilla.com>
Thu, 07 Jul 2016 14:35:58 +0800
changeset 305459 db59de0a50806a79d204037029077eed79023174
parent 305458 c2c393c85d041b196936a0dd53aff0db1c58d516
child 305460 7f49a2ed5991c39612b1164461234a6feb3357da
push id30463
push usercbook@mozilla.com
push dateTue, 19 Jul 2016 14:02:45 +0000
treeherdermozilla-central@37cc0da01187 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1285122, 43689
milestone50.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 1285122. Part 1 - remove SeekTask::mNeedToStopPrerolling{Audio,Video} per discussion in https://reviewboard.mozilla.org/r/43689/#comment54421. r=kaku MozReview-Commit-ID: 1r909HO5Cbl
dom/media/MediaDecoderStateMachine.cpp
dom/media/SeekTask.cpp
dom/media/SeekTask.h
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1693,24 +1693,16 @@ MediaDecoderStateMachine::OnSeekTaskReso
     StopPrerollingAudio();
   }
 
   if (aValue.mIsVideoQueueFinished) {
     VideoQueue().Finish();
     StopPrerollingVideo();
   }
 
-  if (aValue.mNeedToStopPrerollingAudio) {
-    StopPrerollingAudio();
-  }
-
-  if (aValue.mNeedToStopPrerollingVideo) {
-    StopPrerollingVideo();
-  }
-
   SeekCompleted();
 }
 
 void
 MediaDecoderStateMachine::OnSeekTaskRejected(SeekTaskRejectValue aValue)
 {
   MOZ_ASSERT(OnTaskQueue());
   MOZ_ASSERT(mState == DECODER_STATE_SEEKING);
@@ -1722,24 +1714,16 @@ MediaDecoderStateMachine::OnSeekTaskReje
     StopPrerollingAudio();
   }
 
   if (aValue.mIsVideoQueueFinished) {
     VideoQueue().Finish();
     StopPrerollingVideo();
   }
 
-  if (aValue.mNeedToStopPrerollingAudio) {
-    StopPrerollingAudio();
-  }
-
-  if (aValue.mNeedToStopPrerollingVideo) {
-    StopPrerollingVideo();
-  }
-
   DecodeError();
 
   DiscardSeekTaskIfExist();
 }
 
 void
 MediaDecoderStateMachine::DiscardSeekTaskIfExist()
 {
--- a/dom/media/SeekTask.cpp
+++ b/dom/media/SeekTask.cpp
@@ -16,18 +16,16 @@ SeekTask::SeekTask(const void* aDecoderI
                    const SeekTarget& aTarget)
   : mDecoderID(aDecoderID)
   , mOwnerThread(aThread)
   , mReader(aReader)
   , mTarget(aTarget)
   , mIsDiscarded(false)
   , mIsAudioQueueFinished(false)
   , mIsVideoQueueFinished(false)
-  , mNeedToStopPrerollingAudio(false)
-  , mNeedToStopPrerollingVideo(false)
 {
   AssertOwnerThread();
 }
 
 SeekTask::~SeekTask()
 {
   AssertOwnerThread();
   MOZ_ASSERT(mIsDiscarded);
@@ -38,32 +36,28 @@ SeekTask::Resolve(const char* aCallSite)
 {
   AssertOwnerThread();
 
   SeekTaskResolveValue val;
   val.mSeekedAudioData = mSeekedAudioData;
   val.mSeekedVideoData = mSeekedVideoData;
   val.mIsAudioQueueFinished = mIsAudioQueueFinished;
   val.mIsVideoQueueFinished = mIsVideoQueueFinished;
-  val.mNeedToStopPrerollingAudio = mNeedToStopPrerollingAudio;
-  val.mNeedToStopPrerollingVideo = mNeedToStopPrerollingVideo;
 
   mSeekTaskPromise.Resolve(val, aCallSite);
 }
 
 void
 SeekTask::RejectIfExist(const char* aCallSite)
 {
   AssertOwnerThread();
 
   SeekTaskRejectValue val;
   val.mIsAudioQueueFinished = mIsAudioQueueFinished;
   val.mIsVideoQueueFinished = mIsVideoQueueFinished;
-  val.mNeedToStopPrerollingAudio = mNeedToStopPrerollingAudio;
-  val.mNeedToStopPrerollingVideo = mNeedToStopPrerollingVideo;
 
   mSeekTaskPromise.RejectIfExists(val, aCallSite);
 }
 
 void
 SeekTask::AssertOwnerThread() const
 {
   MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn());
--- a/dom/media/SeekTask.h
+++ b/dom/media/SeekTask.h
@@ -23,26 +23,22 @@ class TimeUnit;
 }
 
 struct SeekTaskResolveValue
 {
   RefPtr<MediaData> mSeekedAudioData;
   RefPtr<MediaData> mSeekedVideoData;
   bool mIsAudioQueueFinished;
   bool mIsVideoQueueFinished;
-  bool mNeedToStopPrerollingAudio;
-  bool mNeedToStopPrerollingVideo;
 };
 
 struct SeekTaskRejectValue
 {
   bool mIsAudioQueueFinished;
   bool mIsVideoQueueFinished;
-  bool mNeedToStopPrerollingAudio;
-  bool mNeedToStopPrerollingVideo;
 };
 
 class SeekTask {
 
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SeekTask)
 
 public:
   static const bool IsExclusive = true;
@@ -90,15 +86,13 @@ protected:
 
   /*
    * Information which are going to be returned to MDSM.
    */
   RefPtr<MediaData> mSeekedAudioData;
   RefPtr<MediaData> mSeekedVideoData;
   bool mIsAudioQueueFinished;
   bool mIsVideoQueueFinished;
-  bool mNeedToStopPrerollingAudio;
-  bool mNeedToStopPrerollingVideo;
 };
 
 } // namespace mozilla
 
 #endif /* SEEK_TASK_H */