Bug 1273405. Part 3 - remove use of FlushableTaskQueue. r=jya. draft 1273405_VorbisDataDecoder_Flush
authorJW Wang <jwwang@mozilla.com>
Tue, 17 May 2016 17:30:53 +0800
branch1273405_VorbisDataDecoder_Flush
changeset 370008 7b09188e5c4af2d7bc861d5a60167f466b795b07
parent 370007 dde2ff867bb6de3d9e00fdd55c66ac7e8f97438b
child 370009 c4c918c98ed9acfdef410d5ad5ecd0c0008eb0f4
push id18977
push userjwwang@mozilla.com
push dateTue, 24 May 2016 03:49:46 +0000
reviewersjya
bugs1273405
milestone49.0a1
Bug 1273405. Part 3 - remove use of FlushableTaskQueue. r=jya. MozReview-Commit-ID: Do9REbjltEW
dom/media/platforms/agnostic/VorbisDecoder.cpp
dom/media/platforms/agnostic/VorbisDecoder.h
--- a/dom/media/platforms/agnostic/VorbisDecoder.cpp
+++ b/dom/media/platforms/agnostic/VorbisDecoder.cpp
@@ -28,17 +28,17 @@ ogg_packet InitVorbisPacket(const unsign
   packet.b_o_s = aBOS;
   packet.e_o_s = aEOS;
   packet.granulepos = aGranulepos;
   packet.packetno = aPacketNo;
   return packet;
 }
 
 VorbisDataDecoder::VorbisDataDecoder(const AudioInfo& aConfig,
-                                     FlushableTaskQueue* aTaskQueue,
+                                     TaskQueue* aTaskQueue,
                                      MediaDataDecoderCallback* aCallback)
   : mInfo(aConfig)
   , mTaskQueue(aTaskQueue)
   , mCallback(aCallback)
   , mPacketCount(0)
   , mFrames(0)
   , mIsFlushing(false)
 {
--- a/dom/media/platforms/agnostic/VorbisDecoder.h
+++ b/dom/media/platforms/agnostic/VorbisDecoder.h
@@ -17,17 +17,17 @@
 #endif
 
 namespace mozilla {
 
 class VorbisDataDecoder : public MediaDataDecoder
 {
 public:
   VorbisDataDecoder(const AudioInfo& aConfig,
-                FlushableTaskQueue* aTaskQueue,
+                TaskQueue* aTaskQueue,
                 MediaDataDecoderCallback* aCallback);
   ~VorbisDataDecoder();
 
   RefPtr<InitPromise> Init() override;
   nsresult Input(MediaRawData* aSample) override;
   nsresult Flush() override;
   nsresult Drain() override;
   nsresult Shutdown() override;
@@ -43,17 +43,17 @@ public:
 private:
   nsresult DecodeHeader(const unsigned char* aData, size_t aLength);
 
   void ProcessDecode(MediaRawData* aSample);
   int DoDecode(MediaRawData* aSample);
   void ProcessDrain();
 
   const AudioInfo& mInfo;
-  RefPtr<FlushableTaskQueue> mTaskQueue;
+  const RefPtr<TaskQueue> mTaskQueue;
   MediaDataDecoderCallback* mCallback;
 
   // Vorbis decoder state
   vorbis_info mVorbisInfo;
   vorbis_comment mVorbisComment;
   vorbis_dsp_state mVorbisDsp;
   vorbis_block mVorbisBlock;