Bug 1274214 - remove use of FlushableTaskQueue. r=kaku. draft
authorJW Wang <jwwang@mozilla.com>
Thu, 19 May 2016 17:32:22 +0800
changeset 369579 20c347edc458d2b2c4603df20e584ed1d5e9cd22
parent 369577 9d932e7642bc852cbabe13bc8f865e06797c694a
child 521563 1fa615b3112f338f86872b27a0fb524ed3ded2f7
push id18854
push userjwwang@mozilla.com
push dateMon, 23 May 2016 03:20:01 +0000
reviewerskaku
bugs1274214
milestone49.0a1
Bug 1274214 - remove use of FlushableTaskQueue. r=kaku. MozReview-Commit-ID: 5tMa5aqAgQ1
dom/media/platforms/wmf/WMFMediaDataDecoder.cpp
dom/media/platforms/wmf/WMFMediaDataDecoder.h
--- a/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp
+++ b/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp
@@ -14,17 +14,17 @@
 #include "mozilla/SyncRunnable.h"
 
 extern mozilla::LogModule* GetPDMLog();
 #define LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
 
 namespace mozilla {
 
 WMFMediaDataDecoder::WMFMediaDataDecoder(MFTManager* aMFTManager,
-                                         FlushableTaskQueue* aTaskQueue,
+                                         TaskQueue* aTaskQueue,
                                          MediaDataDecoderCallback* aCallback)
   : mTaskQueue(aTaskQueue)
   , mCallback(aCallback)
   , mMFTManager(aMFTManager)
   , mIsFlushing(false)
   , mIsShutDown(false)
 {
 }
--- a/dom/media/platforms/wmf/WMFMediaDataDecoder.h
+++ b/dom/media/platforms/wmf/WMFMediaDataDecoder.h
@@ -64,17 +64,17 @@ protected:
 // Decodes audio and video using Windows Media Foundation. Samples are decoded
 // using the MFTDecoder created by the MFTManager. This class implements
 // the higher-level logic that drives mapping the MFT to the async
 // MediaDataDecoder interface. The specifics of decoding the exact stream
 // type are handled by MFTManager and the MFTDecoder it creates.
 class WMFMediaDataDecoder : public MediaDataDecoder {
 public:
   WMFMediaDataDecoder(MFTManager* aOutputSource,
-                      FlushableTaskQueue* aAudioTaskQueue,
+                      TaskQueue* aTaskQueue,
                       MediaDataDecoderCallback* aCallback);
   ~WMFMediaDataDecoder();
 
   RefPtr<MediaDataDecoder::InitPromise> Init() override;
 
   nsresult Input(MediaRawData* aSample);
 
   nsresult Flush() override;
@@ -111,17 +111,17 @@ private:
   void ProcessDrain();
 
   void ProcessShutdown();
 
   // Called on the task queue. Tell the MFT that the next Input will have a
   // different configuration (typically resolution change).
   void ProcessConfigurationChanged(UniquePtr<TrackInfo>&& aConfig);
 
-  RefPtr<FlushableTaskQueue> mTaskQueue;
+  const RefPtr<TaskQueue> mTaskQueue;
   MediaDataDecoderCallback* mCallback;
 
   nsAutoPtr<MFTManager> mMFTManager;
 
   // The last offset into the media resource that was passed into Input().
   // This is used to approximate the decoder's position in the media resource.
   int64_t mLastStreamOffset;