11 #include "cores/RetroPlayer/RetroPlayerTypes.h" 15 #include <libavutil/pixfmt.h> 25 class IRenderBufferPool;
33 virtual void Acquire() = 0;
34 virtual void Acquire(std::shared_ptr<IRenderBufferPool> pool) = 0;
35 virtual void Release() = 0;
37 virtual DataAccess GetMemoryAccess()
const = 0;
38 virtual DataAlignment GetMemoryAlignment()
const = 0;
41 virtual bool Allocate(AVPixelFormat format,
unsigned int width,
unsigned int height) = 0;
42 virtual void Update() {}
44 virtual uint8_t* GetMemory() = 0;
45 virtual void ReleaseMemory() {}
46 virtual bool UploadTexture() = 0;
47 virtual void BindToUnit(
unsigned int unit) {}
48 virtual void SetHeader(
void* header) {}
51 AVPixelFormat GetFormat()
const {
return m_format; }
52 unsigned int GetWidth()
const {
return m_width; }
53 unsigned int GetHeight()
const {
return m_height; }
54 bool IsLoaded()
const {
return m_bLoaded; }
55 void SetLoaded(
bool bLoaded) { m_bLoaded = bLoaded; }
56 bool IsRendered()
const {
return m_bRendered; }
57 void SetRendered(
bool bRendered) { m_bRendered = bRendered; }
58 unsigned int GetRotation()
const {
return m_rotationDegCCW; }
59 void SetRotation(
unsigned int rotationDegCCW) { m_rotationDegCCW = rotationDegCCW; }
62 AVPixelFormat m_format = AV_PIX_FMT_NONE;
63 unsigned int m_width = 0;
64 unsigned int m_height = 0;
65 bool m_bLoaded =
false;
66 bool m_bRendered =
false;
67 unsigned int m_rotationDegCCW = 0;
Definition: IRenderBuffer.h:27
Definition: AudioDecoder.h:18
Definition: IRenderBufferPool.h:30
virtual size_t GetFrameSize() const =0