Bug 1274205 - remove use of FlushableTaskQueue. r=bechen. draft 1274205_remove_GonkMediaDataDecoder_TaskQueue
authorJW Wang <jwwang@mozilla.com>
Thu, 19 May 2016 17:14:09 +0800
branch1274205_remove_GonkMediaDataDecoder_TaskQueue
changeset 370019 ea3d57a3034577ddc1d079f50094ca4ad46f40bb
parent 370018 5a8877922eabf0993839b882b800304057cc57fc
child 370020 2e6ef81cc20e9e10a68d4d2af2cf78bfdc16bc4c
child 724569 21d4b95c1fbd666ef72c650fa9b10fb8cfcf7284
push id18977
push userjwwang@mozilla.com
push dateTue, 24 May 2016 03:49:46 +0000
reviewersbechen
bugs1274205
milestone49.0a1
Bug 1274205 - remove use of FlushableTaskQueue. r=bechen. MozReview-Commit-ID: HbHhhPsLAUS
dom/media/platforms/gonk/GonkDecoderModule.cpp
dom/media/platforms/gonk/GonkMediaDataDecoder.cpp
dom/media/platforms/gonk/GonkMediaDataDecoder.h
--- a/dom/media/platforms/gonk/GonkDecoderModule.cpp
+++ b/dom/media/platforms/gonk/GonkDecoderModule.cpp
@@ -23,29 +23,29 @@ GonkDecoderModule::CreateVideoDecoder(co
                                      mozilla::layers::LayersBackend aLayersBackend,
                                      mozilla::layers::ImageContainer* aImageContainer,
                                      FlushableTaskQueue* aVideoTaskQueue,
                                      MediaDataDecoderCallback* aCallback,
                                      DecoderDoctorDiagnostics* aDiagnostics)
 {
   RefPtr<MediaDataDecoder> decoder =
   new GonkMediaDataDecoder(new GonkVideoDecoderManager(aImageContainer, aConfig),
-                           aVideoTaskQueue, aCallback);
+                           aCallback);
   return decoder.forget();
 }
 
 already_AddRefed<MediaDataDecoder>
 GonkDecoderModule::CreateAudioDecoder(const AudioInfo& aConfig,
                                       FlushableTaskQueue* aAudioTaskQueue,
                                       MediaDataDecoderCallback* aCallback,
                                       DecoderDoctorDiagnostics* aDiagnostics)
 {
   RefPtr<MediaDataDecoder> decoder =
   new GonkMediaDataDecoder(new GonkAudioDecoderManager(aConfig),
-                           aAudioTaskQueue, aCallback);
+                           aCallback);
   return decoder.forget();
 }
 
 PlatformDecoderModule::ConversionRequired
 GonkDecoderModule::DecoderNeedsConversion(const TrackInfo& aConfig) const
 {
   if (aConfig.IsVideo()) {
     return kNeedAnnexB;
--- a/dom/media/platforms/gonk/GonkMediaDataDecoder.cpp
+++ b/dom/media/platforms/gonk/GonkMediaDataDecoder.cpp
@@ -326,17 +326,16 @@ GonkDecoderManager::onMessageReceived(co
 bool
 GonkDecoderManager::OnTaskLooper()
 {
   return androidGetThreadId() == mTaskLooperId;
 }
 #endif
 
 GonkMediaDataDecoder::GonkMediaDataDecoder(GonkDecoderManager* aManager,
-                                           FlushableTaskQueue* aTaskQueue,
                                            MediaDataDecoderCallback* aCallback)
   : mManager(aManager)
 {
   MOZ_COUNT_CTOR(GonkMediaDataDecoder);
   mManager->SetDecodeCallback(aCallback);
 }
 
 GonkMediaDataDecoder::~GonkMediaDataDecoder()
--- a/dom/media/platforms/gonk/GonkMediaDataDecoder.h
+++ b/dom/media/platforms/gonk/GonkMediaDataDecoder.h
@@ -181,17 +181,16 @@ private:
 // Samples are decoded using the GonkDecoder (MediaCodec)
 // created by the GonkDecoderManager. This class implements
 // the higher-level logic that drives mapping the Gonk to the async
 // MediaDataDecoder interface. The specifics of decoding the exact stream
 // type are handled by GonkDecoderManager and the GonkDecoder it creates.
 class GonkMediaDataDecoder : public MediaDataDecoder {
 public:
   GonkMediaDataDecoder(GonkDecoderManager* aDecoderManager,
-                       FlushableTaskQueue* aTaskQueue,
                        MediaDataDecoderCallback* aCallback);
 
   ~GonkMediaDataDecoder();
 
   RefPtr<InitPromise> Init() override;
 
   nsresult Input(MediaRawData* aSample) override;