bug 1161402 document that MediaDataDecoder::IsHardwareAccelerated() is called from the state machine task queue r=cpearce
authorKarl Tomlinson <karlt+@karlt.net>
Mon, 04 May 2015 09:53:04 +1200
changeset 274059 2e7ffb4d019b836387e60fa555ea2f500d17cc8a
parent 274058 27de813b3f799bc519d14ac028fc0106e1bb5a31
child 274060 29a7ef7e55994d0788a38e88c76621c5dfc3cda6
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1161402
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1161402 document that MediaDataDecoder::IsHardwareAccelerated() is called from the state machine task queue r=cpearce
dom/media/fmp4/PlatformDecoderModule.h
--- a/dom/media/fmp4/PlatformDecoderModule.h
+++ b/dom/media/fmp4/PlatformDecoderModule.h
@@ -184,19 +184,19 @@ public:
   virtual void ReleaseMediaResources() {};
 };
 
 // MediaDataDecoder is the interface exposed by decoders created by the
 // PlatformDecoderModule's Create*Decoder() functions. The type of
 // media data that the decoder accepts as valid input and produces as
 // output is determined when the MediaDataDecoder is created.
 //
-// All functions are only called on the decode task queue. Don't block
-// inside these functions, unless it's explicitly noted that you should
-// (like in Flush() and Drain()).
+// Unless otherwise noted, all functions are only called on the decode task
+// queue. Don't block inside these functions, unless it's explicitly noted
+// that you should (like in Flush() and Drain()).
 //
 // Decoding is done asynchronously. Any async work can be done on the
 // MediaTaskQueue passed into the PlatformDecoderModules's Create*Decoder()
 // function. This may not be necessary for platforms with async APIs
 // for decoding.
 class MediaDataDecoder {
 protected:
   virtual ~MediaDataDecoder() {};
@@ -240,16 +240,17 @@ public:
   // decoder. The platform decoder should clean up any resources it's using
   // and release memory etc. Shutdown() must block until the decoder has
   // completed shutdown. The reader calls Flush() before calling Shutdown().
   // The reader will delete the decoder once Shutdown() returns.
   // The MediaDataDecoderCallback *must* not be called after Shutdown() has
   // returned.
   virtual nsresult Shutdown() = 0;
 
+  // Called from the state machine task queue.
   virtual bool IsHardwareAccelerated() const { return false; }
 
   // ConfigurationChanged will be called to inform the video or audio decoder
   // that the format of the next input sample is about to change.
   // If video decoder, aConfig will be a VideoInfo object.
   // If audio decoder, aConfig will be a AudioInfo object.
   virtual nsresult ConfigurationChanged(const TrackInfo& aConfig)
   {