#ifndef CONTENT_RENDERER_MEDIA_PEPPER_PLATFORM_VIDEO_DECODER_H_
#define CONTENT_RENDERER_MEDIA_PEPPER_PLATFORM_VIDEO_DECODER_H_
#include <vector>
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
#include "media/video/video_decode_accelerator.h"
namespace content {
class PlatformVideoDecoder : public media::VideoDecodeAccelerator,
public media::VideoDecodeAccelerator::Client {
public:
explicit PlatformVideoDecoder(int32 command_buffer_route_id);
virtual ~PlatformVideoDecoder();
virtual bool Initialize(media::VideoCodecProfile profile,
media::VideoDecodeAccelerator::Client* client)
OVERRIDE;
virtual void Decode(
const media::BitstreamBuffer& bitstream_buffer) OVERRIDE;
virtual void AssignPictureBuffers(
const std::vector<media::PictureBuffer>& buffers) OVERRIDE;
virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE;
virtual void Flush() OVERRIDE;
virtual void Reset() OVERRIDE;
virtual void Destroy() OVERRIDE;
virtual void ProvidePictureBuffers(uint32 requested_num_of_buffers,
const gfx::Size& dimensions,
uint32 texture_target) OVERRIDE;
virtual void PictureReady(const media::Picture& picture) OVERRIDE;
virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE;
virtual void NotifyError(
media::VideoDecodeAccelerator::Error error) OVERRIDE;
virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE;
virtual void NotifyFlushDone() OVERRIDE;
virtual void NotifyResetDone() OVERRIDE;
private:
media::VideoDecodeAccelerator::Client* client_;
int32 command_buffer_route_id_;
scoped_ptr<media::VideoDecodeAccelerator> decoder_;
DISALLOW_COPY_AND_ASSIGN(PlatformVideoDecoder);
};
}
#endif