Bug 1273390. Part 5 - remove use of FlushableTaskQueue. r=jya. draft 1273390_WaveDataDecoder_Flush
authorJW Wang <jwwang@mozilla.com>
Tue, 17 May 2016 14:57:26 +0800
branch1273390_WaveDataDecoder_Flush
changeset 367673 7e582ef4b481e099d0d94250c9fb0dec019cf30b
parent 367672 2eb123d9be20a525953a7049c2758f413e88775f
child 367678 4c6dcf4fc55bf4a0a08415d52cd8fd1b7e5c46b1
child 724553 bbb3af39a1f92f9605ee7a567dfe72d0e00a80c1
push id18315
push userjwwang@mozilla.com
push dateTue, 17 May 2016 06:58:32 +0000
reviewersjya
bugs1273390
milestone49.0a1
Bug 1273390. Part 5 - remove use of FlushableTaskQueue. r=jya. MozReview-Commit-ID: TYbvfH5gp7
dom/media/platforms/agnostic/WAVDecoder.cpp
dom/media/platforms/agnostic/WAVDecoder.h
--- a/dom/media/platforms/agnostic/WAVDecoder.cpp
+++ b/dom/media/platforms/agnostic/WAVDecoder.cpp
@@ -42,17 +42,17 @@ DecodeULawSample(uint8_t aValue)
   int8_t sign = (aValue & 0x80) ? -1 : 1;
   uint8_t exponent = (aValue & 0x70) >> 4;
   uint8_t mantissa = aValue & 0x0F;
   int16_t sample = (33 + 2 * mantissa) * (2 << (exponent + 1)) - 33;
   return sign * sample;
 }
 
 WaveDataDecoder::WaveDataDecoder(const AudioInfo& aConfig,
-                                 FlushableTaskQueue* aTaskQueue,
+                                 TaskQueue* aTaskQueue,
                                  MediaDataDecoderCallback* aCallback)
   : mInfo(aConfig)
   , mTaskQueue(aTaskQueue)
   , mCallback(aCallback)
   , mIsFlushing(false)
   , mFrames(0)
 {
 }
--- a/dom/media/platforms/agnostic/WAVDecoder.h
+++ b/dom/media/platforms/agnostic/WAVDecoder.h
@@ -11,17 +11,17 @@
 #include "mp4_demuxer/ByteReader.h"
 
 namespace mozilla {
 
 class WaveDataDecoder : public MediaDataDecoder
 {
 public:
   WaveDataDecoder(const AudioInfo& aConfig,
-                  FlushableTaskQueue* aTaskQueue,
+                  TaskQueue* aTaskQueue,
                   MediaDataDecoderCallback* aCallback);
 
   // Return true if mimetype is Wave
   static bool IsWave(const nsACString& aMimeType);
 
 private:
   RefPtr<InitPromise> Init() override;
   nsresult Input(MediaRawData* aSample) override;
@@ -33,17 +33,17 @@ private:
     return "wave audio decoder";
   }
 
   void ProcessDecode(MediaRawData* aSample);
   bool DoDecode(MediaRawData* aSample);
   void ProcessDrain();
 
   const AudioInfo& mInfo;
-  RefPtr<FlushableTaskQueue> mTaskQueue;
+  const RefPtr<TaskQueue> mTaskQueue;
   MediaDataDecoderCallback* mCallback;
   Atomic<bool> mIsFlushing;
 
   int64_t mFrames;
 };
 
 } // namespace mozilla
 #endif