kodi
|
base class for using the IBufferObject interface. More...
#include <BufferObject.h>
Public Member Functions | |
virtual bool | CreateBufferObject (uint32_t format, uint32_t width, uint32_t height) override=0 |
Create a BufferObject based on the format, width, and height of the desired buffer. More... | |
bool | CreateBufferObject (uint64_t size) override |
Create a BufferObject based only on the size of the desired buffer. More... | |
int | GetFd () override |
Get the File Descriptor of the BufferObject. More... | |
uint32_t | GetStride () override |
Get the Stride of the BufferObject. More... | |
uint64_t | GetModifier () override |
Get the Modifier of the BufferObject. More... | |
void | SyncStart () override |
Must be called before reading/writing data to the BufferObject. | |
void | SyncEnd () override |
Must be called after reading/writing data to the BufferObject. | |
![]() | |
virtual void | DestroyBufferObject ()=0 |
Destroy a BufferObject. | |
virtual uint8_t * | GetMemory ()=0 |
Get the Memory location of the BufferObject. More... | |
virtual void | ReleaseMemory ()=0 |
Release the mapped memory of the BufferObject. More... | |
virtual std::string | GetName () const =0 |
Get the Name of the BufferObject type in use. More... | |
Static Public Member Functions | |
static std::unique_ptr< CBufferObject > | GetBufferObject (bool needsCreateBySize) |
Get a BufferObject from CBufferObjectFactory. More... | |
Protected Attributes | |
int | m_fd {-1} |
uint32_t | m_stride {0} |
base class for using the IBufferObject interface.
Derived classes should be based on this class.
|
overridepure virtual |
Create a BufferObject based on the format, width, and height of the desired buffer.
format | framebuffer pixel formats are described using the fourcc codes defined in https://github.com/torvalds/linux/blob/master/include/uapi/drm/drm_fourcc.h |
width | width of the requested buffer. |
height | height of the requested buffer. |
Implements IBufferObject.
Implemented in CGBMBufferObject, CDMAHeapBufferObject, CDumbBufferObject, and CUDMABufferObject.
|
inlineoverridevirtual |
Create a BufferObject based only on the size of the desired buffer.
Not all CBufferObject implementations may support this. This method is required for use with the CAddonVideoCodec as it only knows the decoded buffer size.
size | of the requested buffer. |
Implements IBufferObject.
Reimplemented in CDMAHeapBufferObject, and CUDMABufferObject.
|
static |
Get a BufferObject from CBufferObjectFactory.
|
overridevirtual |
Get the File Descriptor of the BufferObject.
The fd is guaranteed to be available after calling CreateBufferObject().
Implements IBufferObject.
|
overridevirtual |
Get the Modifier of the BufferObject.
Format Modifiers further describe the buffer's format such as for tiling or compression. see https://github.com/torvalds/linux/blob/master/include/uapi/drm/drm_fourcc.h
Implements IBufferObject.
Reimplemented in CGBMBufferObject.
|
overridevirtual |
Get the Stride of the BufferObject.
The stride is guaranteed to be available after calling GetMemory().
Implements IBufferObject.