18#include <libavutil/frame.h>
19#include <libavutil/hwcontext_drm.h>
static constexpr int RENDERBUFFERS
number of render video buffers
void SetNumPlanes(int numPlanes)
void SetSizeOnScreen(int x, int y, int w, int h)
bool m_dirty
true, if the buffer is dirty (it was written to)
bool m_destroyAfterUse
true, if buffer should be destroyed after use
void SetPixFmt(uint32_t pixFmt)
int m_objIdx[4]
index of the objects
bool m_closeHandleOnDestroy
true, if DMA-BUF handle should be closed on destroy
cRect m_rectOnScreen
dimensions on screen - set at pageflip, needed for grab
int m_numObjects
number of prime objects in the buffer
void SetOffset(int idx, uint32_t offset)
uint32_t m_fbId
framebuffer id
struct gbm_bo * m_pBo
pointer to the gbm buffer object
bool IsPresentationPending(void)
void SetNumObjects(int numObjects)
void SetSize(int idx, uint32_t size)
uint32_t m_width
buffer width
uint32_t m_offset[4]
array of the plane offset
cRect GetScreenRect(void)
uint32_t m_pitch[4]
array of the plane pitch
void SetPitch(int idx, uint32_t pitch)
uint32_t PrimeHandle(int idx)
AVFrame * frame
associated AVFrame
void SetHandle(int idx, uint32_t handle)
uint32_t m_objectPrimeHandle[4]
primedata objects prime handles (count is numObjects, index is objIdx)
int m_dmaBufHandle[4]
DMA-BUF file descriptor.
uint32_t m_pixFmt
buffer pixel format
uint32_t * PrimeHandle(void)
void SetObjectIndex(int idx, uint32_t objIdx)
int m_drmDeviceFd
drm device file descriptor
uint32_t m_height
buffer height
void SetPresentationPending(bool pending)
void SetWidth(uint32_t width)
bool m_presentationPending
true, if buffer presentation is pending
uint8_t * m_pPlane[4]
array of the plane data
void SetHeight(uint32_t height)
uint32_t m_size[4]
array of the plane size
void SetDmaBufHandle(uint32_t fd)
uint32_t m_planePrimeHandle[4]
array of the plane handles
int m_numPlanes
number of planes in the buffer
void SetDestroyAfterUse(bool val)
Pool Implementation Template Class.
cDrmBuffer(void)
Create a new drm buffer.
cDrmBuffer * FindUninitilized(void)
Find a clean drm buffer from the buffer pool.
void Setup(int, uint32_t, uint32_t, uint32_t, AVDRMFrameDescriptor *, bool)
Setup the buffer.
cDrmBuffer * FindByDmaBufHandle(int)
Find a drm buffer from the buffer pool by a given prime handle.
void FillBlack(void)
Color the buffer black.
cDrmBuffer * FindNoPresentationPending(void)
Find a dirty drm buffer from the buffer pool which presentation has finished.
void DestroyAllExcept(cDrmBuffer *)
Destroy all drm buffers except the given one.
void PresentationFinished(void)
The presentation of this buffer has finished.
void Destroy(void)
Clear and destroy the buffer object and its parameters.