Bug 1104964 - Rename the task queue for hardware video decoding to something more obvious. r=cpearce, a=sledru
authorBobby Holley <bobbyholley@gmail.com>
Mon, 01 Dec 2014 21:51:02 -0800
changeset 242434 0f823d3509129763762b1f51491ea07a56727e6c
parent 242433 a52f49bac58b7d3056611c2995fb2339a0742a53
child 242435 874ce9bce91a62093d14a3a08640baa7ae8596f5
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, sledru
bugs1104964
milestone36.0a2
Bug 1104964 - Rename the task queue for hardware video decoding to something more obvious. r=cpearce, a=sledru Otherwise it will shadow the mTaskQueue that we're about to introduce on MediaDecoderReader.
dom/media/webm/IntelWebMVideoDecoder.cpp
dom/media/webm/WebMReader.cpp
dom/media/webm/WebMReader.h
--- a/dom/media/webm/IntelWebMVideoDecoder.cpp
+++ b/dom/media/webm/IntelWebMVideoDecoder.cpp
@@ -101,17 +101,17 @@ IntelWebMVideoDecoder::Shutdown()
 }
 
 /* static */
 WebMVideoDecoder*
 IntelWebMVideoDecoder::Create(WebMReader* aReader)
 {
   nsAutoPtr<IntelWebMVideoDecoder> decoder(new IntelWebMVideoDecoder(aReader));
 
-  decoder->mTaskQueue = aReader->GetTaskQueue();
+  decoder->mTaskQueue = aReader->GetVideoTaskQueue();
   NS_ENSURE_TRUE(decoder->mTaskQueue, nullptr);
 
   return decoder.forget();
 }
 
 bool
 IntelWebMVideoDecoder::IsSupportedVideoMimeType(const char* aMimeType)
 {
--- a/dom/media/webm/WebMReader.cpp
+++ b/dom/media/webm/WebMReader.cpp
@@ -221,19 +221,19 @@ WebMReader::~WebMReader()
   }
   MOZ_ASSERT(!mVideoDecoder);
   MOZ_COUNT_DTOR(WebMReader);
 }
 
 void WebMReader::Shutdown()
 {
 #if defined(MOZ_PDM_VPX)
-  if (mTaskQueue) {
-    mTaskQueue->BeginShutdown();
-    mTaskQueue->AwaitShutdownAndIdle();
+  if (mVideoTaskQueue) {
+    mVideoTaskQueue->BeginShutdown();
+    mVideoTaskQueue->AwaitShutdownAndIdle();
   }
 #endif
 
   if (mVideoDecoder) {
     mVideoDecoder->Shutdown();
     mVideoDecoder = nullptr;
   }
 
@@ -248,19 +248,19 @@ nsresult WebMReader::Init(MediaDecoderRe
   memset(&mVorbisBlock, 0, sizeof(vorbis_block));
 
 #if defined(MOZ_PDM_VPX)
   if (sIsIntelDecoderEnabled) {
     PlatformDecoderModule::Init();
 
     InitLayersBackendType();
 
-    mTaskQueue = new MediaTaskQueue(
+    mVideoTaskQueue = new MediaTaskQueue(
       SharedThreadPool::Get(NS_LITERAL_CSTRING("IntelVP8 Video Decode")));
-    NS_ENSURE_TRUE(mTaskQueue, NS_ERROR_FAILURE);
+    NS_ENSURE_TRUE(mVideoTaskQueue, NS_ERROR_FAILURE);
   }
 #endif
 
   if (aCloneDonor) {
     mBufferedState = static_cast<WebMReader*>(aCloneDonor)->mBufferedState;
   } else {
     mBufferedState = new WebMBufferedState;
   }
--- a/dom/media/webm/WebMReader.h
+++ b/dom/media/webm/WebMReader.h
@@ -182,17 +182,17 @@ public:
   virtual void PushVideoPacket(NesteggPacketHolder* aItem);
 
   int GetVideoCodec();
   nsIntRect GetPicture();
   nsIntSize GetInitialFrame();
   uint64_t GetLastVideoFrameTime();
   void SetLastVideoFrameTime(uint64_t aFrameTime);
   layers::LayersBackend GetLayersBackendType() { return mLayersBackendType; }
-  MediaTaskQueue* GetTaskQueue() { return mTaskQueue; }
+  MediaTaskQueue* GetVideoTaskQueue() { return mVideoTaskQueue; }
 
 protected:
 #ifdef MOZ_OPUS
   // Setup opus decoder
   bool InitOpusDecoder();
 #endif
 
   // Decode a nestegg packet of audio data. Push the audio data on the
@@ -277,17 +277,19 @@ private:
   nsIntRect mPicture;
 
   // Codec ID of audio track
   int mAudioCodec;
   // Codec ID of video track
   int mVideoCodec;
 
   layers::LayersBackend mLayersBackendType;
-  nsRefPtr<MediaTaskQueue> mTaskQueue;
+
+  // For hardware video decoding.
+  nsRefPtr<MediaTaskQueue> mVideoTaskQueue;
 
   // Booleans to indicate if we have audio and/or video data
   bool mHasVideo;
   bool mHasAudio;
 
 #ifdef MOZ_OPUS
   // Opus padding should only be discarded on the final packet.  Once this
   // is set to true, if the reader attempts to decode any further packets it