Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / media / base / video_decoder.h
index edca238..52aa867 100644 (file)
@@ -5,6 +5,8 @@
 #ifndef MEDIA_BASE_VIDEO_DECODER_H_
 #define MEDIA_BASE_VIDEO_DECODER_H_
 
+#include <string>
+
 #include "base/callback.h"
 #include "base/memory/ref_counted.h"
 #include "media/base/media_export.h"
@@ -46,6 +48,9 @@ class MEDIA_EXPORT VideoDecoder {
   // depends on |this|.
   virtual ~VideoDecoder();
 
+  // Returns the name of the decoder for logging purpose.
+  virtual std::string GetDisplayName() const = 0;
+
   // Initializes a VideoDecoder with the given |config|, executing the
   // |status_cb| upon completion. |output_cb| is called for each output frame
   // decoded by Decode().
@@ -69,7 +74,7 @@ class MEDIA_EXPORT VideoDecoder {
   //
   // Implementations guarantee that the callback will not be called from within
   // this method and that |decode_cb| will not be blocked on the following
-  // Decode() calls (i.e. |decode_cb| will be called even Decode() is never
+  // Decode() calls (i.e. |decode_cb| will be called even if Decode() is never
   // called again).
   //
   // After decoding is finished the decoder calls |output_cb| specified in
@@ -78,7 +83,8 @@ class MEDIA_EXPORT VideoDecoder {
   //
   // If |buffer| is an EOS buffer then the decoder must be flushed, i.e.
   // |output_cb| must be called for each frame pending in the queue and
-  // |decode_cb| must be called after that.
+  // |decode_cb| must be called after that. Callers will not call Decode()
+  // again until after the flush completes.
   virtual void Decode(const scoped_refptr<DecoderBuffer>& buffer,
                       const DecodeCB& decode_cb) = 0;