Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::RETRO::CRenderBufferDMA Class Reference

Special IRenderBuffer implementation for use with CBufferObject. This buffer type uses Direct Memory Access (DMA) sharing via file descriptors (fds). The file descriptor is then used to create an EGL image. More...

#include <RenderBufferDMA.h>

Inheritance diagram for KODI::RETRO::CRenderBufferDMA:
KODI::RETRO::CBaseRenderBuffer KODI::RETRO::IRenderBuffer

Public Member Functions

 CRenderBufferDMA (CRenderContext &context, int fourcc)
 
 ~CRenderBufferDMA () override
 
bool Allocate (AVPixelFormat format, unsigned int width, unsigned int height) override
 
size_t GetFrameSize () const override
 
uint8_tGetMemory () override
 
void ReleaseMemory () override
 
bool UploadTexture () override
 
GLuint TextureID () const
 
- Public Member Functions inherited from KODI::RETRO::CBaseRenderBuffer
 CBaseRenderBuffer ()
 
 ~CBaseRenderBuffer () override=default
 
void Acquire () override
 
void Acquire (std::shared_ptr< IRenderBufferPool > pool) override
 
void Release () override
 
IRenderBufferPoolGetPool () override
 
DataAccess GetMemoryAccess () const override
 
DataAlignment GetMemoryAlignment () const override
 
- Public Member Functions inherited from KODI::RETRO::IRenderBuffer
virtual ~IRenderBuffer ()=default
 
virtual void Update ()
 
virtual void BindToUnit (unsigned int unit)
 
virtual void SetHeader (void *header)
 
AVPixelFormat GetFormat () const
 
unsigned int GetWidth () const
 
unsigned int GetHeight () const
 
bool IsLoaded () const
 
void SetLoaded (bool bLoaded)
 
bool IsRendered () const
 
void SetRendered (bool bRendered)
 
unsigned int GetRotation () const
 
void SetRotation (unsigned int rotationDegCCW)
 

Protected Attributes

CRenderContextm_context
 
const int m_fourcc = 0
 
const GLenum m_textureTarget = GL_TEXTURE_2D
 
GLuint m_textureId = 0
 
- Protected Attributes inherited from KODI::RETRO::CBaseRenderBuffer
std::atomic_int m_refCount
 
std::shared_ptr< IRenderBufferPoolm_pool
 
- Protected Attributes inherited from KODI::RETRO::IRenderBuffer
AVPixelFormat m_format = AV_PIX_FMT_NONE
 
unsigned int m_width = 0
 
unsigned int m_height = 0
 
bool m_bLoaded = false
 
bool m_bRendered = false
 
unsigned int m_rotationDegCCW = 0
 

Detailed Description

Special IRenderBuffer implementation for use with CBufferObject. This buffer type uses Direct Memory Access (DMA) sharing via file descriptors (fds). The file descriptor is then used to create an EGL image.

Constructor & Destructor Documentation

◆ CRenderBufferDMA()

CRenderBufferDMA::CRenderBufferDMA ( CRenderContext & context,
int fourcc )

◆ ~CRenderBufferDMA()

CRenderBufferDMA::~CRenderBufferDMA ( )
override

Member Function Documentation

◆ Allocate()

bool CRenderBufferDMA::Allocate ( AVPixelFormat format,
unsigned int width,
unsigned int height )
overridevirtual

◆ GetFrameSize()

size_t CRenderBufferDMA::GetFrameSize ( ) const
overridevirtual
Todo
Remove me

Implements KODI::RETRO::IRenderBuffer.

◆ GetMemory()

uint8_t * CRenderBufferDMA::GetMemory ( )
overridevirtual

◆ ReleaseMemory()

void CRenderBufferDMA::ReleaseMemory ( )
overridevirtual

Reimplemented from KODI::RETRO::IRenderBuffer.

◆ TextureID()

GLuint KODI::RETRO::CRenderBufferDMA::TextureID ( ) const
inline

◆ UploadTexture()

bool CRenderBufferDMA::UploadTexture ( )
overridevirtual

Member Data Documentation

◆ m_context

CRenderContext& KODI::RETRO::CRenderBufferDMA::m_context
protected

◆ m_fourcc

const int KODI::RETRO::CRenderBufferDMA::m_fourcc = 0
protected

◆ m_textureId

GLuint KODI::RETRO::CRenderBufferDMA::m_textureId = 0
protected

◆ m_textureTarget

const GLenum KODI::RETRO::CRenderBufferDMA::m_textureTarget = GL_TEXTURE_2D
protected

The documentation for this class was generated from the following files: