#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"
// 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().
//
// 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
//
// 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;