Bug 1265296 - Move SeekTask from namespace mozilla::media to namespace mozilla. r=kaku.
authorJW Wang <jwwang@mozilla.com>
Mon, 18 Apr 2016 15:39:15 +0800
changeset 331556 d826eb7fb1ce6feade91e6d9356ba25fc1e5af9c
parent 331555 167c5e5e4b5c539b6db9b030ea2aaa2b5bccdd8b
child 331557 0a222ef3bf63416f8ac86a9930a1bf9b57e6b9cf
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1265296
milestone48.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 1265296 - Move SeekTask from namespace mozilla::media to namespace mozilla. r=kaku. MozReview-Commit-ID: 2bfgaqahchu
dom/media/MediaDecoderStateMachine.h
dom/media/SeekTask.cpp
dom/media/SeekTask.h
--- a/dom/media/MediaDecoderStateMachine.h
+++ b/dom/media/MediaDecoderStateMachine.h
@@ -683,21 +683,21 @@ private:
     return mPlayState == MediaDecoder::PLAY_STATE_PLAYING ||
            mNextPlayState == MediaDecoder::PLAY_STATE_PLAYING;
   }
 
   // Queued seek - moves to mCurrentSeek when DecodeFirstFrame completes.
   SeekJob mQueuedSeek;
 
   // mSeekTask is responsible for executing the current seek request.
-  RefPtr<media::SeekTask> mSeekTask;
-  MozPromiseRequestHolder<media::SeekTask::SeekTaskPromise> mSeekTaskRequest;
+  RefPtr<SeekTask> mSeekTask;
+  MozPromiseRequestHolder<SeekTask::SeekTaskPromise> mSeekTaskRequest;
 
-  void OnSeekTaskResolved(media::SeekTaskResolveValue aValue);
-  void OnSeekTaskRejected(media::SeekTaskRejectValue aValue);
+  void OnSeekTaskResolved(SeekTaskResolveValue aValue);
+  void OnSeekTaskRejected(SeekTaskRejectValue aValue);
 
   // Media Fragment end time in microseconds. Access controlled by decoder monitor.
   int64_t mFragmentEndTime;
 
   // The media sink resource.  Used on the state machine thread.
   RefPtr<media::MediaSink> mMediaSink;
 
   // The reader, don't call its methods with the decoder monitor held.
--- a/dom/media/SeekTask.cpp
+++ b/dom/media/SeekTask.cpp
@@ -30,18 +30,16 @@ extern LazyLogModule gMediaSampleLog;
   LOG(gMediaSampleLog, LogLevel::Debug, x, ##__VA_ARGS__)
 
 // Somehow MSVC doesn't correctly delete the comma before ##__VA_ARGS__
 // when __VA_ARGS__ expands to nothing. This is a workaround for it.
 #define DECODER_WARN_HELPER(a, b) NS_WARNING b
 #define DECODER_WARN(x, ...) \
   DECODER_WARN_HELPER(0, (nsPrintfCString("Decoder=%p " x, mDecoderID, ##__VA_ARGS__).get()))
 
-namespace media {
-
 /*static*/ already_AddRefed<SeekTask>
 SeekTask::CreateSeekTask(const void* aDecoderID,
                          AbstractThread* aThread,
                          MediaDecoderReader* aReader,
                          MediaDecoderReaderWrapper* aReaderWrapper,
                          SeekJob&& aSeekJob,
                          const MediaInfo& aInfo,
                          const media::TimeUnit& aDuration,
@@ -720,10 +718,9 @@ SeekTask::OnVideoNotDecoded(MediaDecoder
     }
 
     mIsVideoQueueFinished = true;
     mDropVideoUntilNextDiscontinuity = false; // To make IsVideoSeekComplete() return TRUE.
     CheckIfSeekComplete();
   }
 }
 
-} // namespace media
 } // namespace mozilla
--- a/dom/media/SeekTask.h
+++ b/dom/media/SeekTask.h
@@ -12,18 +12,16 @@
 #include "SeekJob.h"
 
 namespace mozilla {
 
 class AbstractThread;
 class MediaData;
 class MediaDecoderReaderWrapper;
 
-namespace media {
-
 struct SeekTaskResolveValue
 {
   RefPtr<MediaData> mSeekedAudioData;
   RefPtr<MediaData> mSeekedVideoData;
   bool mIsAudioQueueFinished;
   bool mIsVideoQueueFinished;
   bool mNeedToStopPrerollingAudio;
   bool mNeedToStopPrerollingVideo;
@@ -173,12 +171,11 @@ protected:
   RefPtr<MediaData> mSeekedAudioData;
   RefPtr<MediaData> mSeekedVideoData;
   bool mIsAudioQueueFinished;
   bool mIsVideoQueueFinished;
   bool mNeedToStopPrerollingAudio;
   bool mNeedToStopPrerollingVideo;
 };
 
-} // namespace media
 } // namespace mozilla
 
 #endif /* SEEK_TASK_H */