|
vdr-plugin-softhddevice-drm-gles 1.6.4-d0291bb
|
DRM Buffer. More...
#include <drmbuffer.h>
Public Attributes | |
| AVFrame * | frame = nullptr |
| associated AVFrame | |
Private Attributes | |
| uint32_t | m_width |
| buffer width | |
| uint32_t | m_height |
| buffer height | |
| uint32_t | m_pixFmt |
| buffer pixel format | |
| cRect | m_rectOnScreen |
| dimensions on screen - set at pageflip, needed for grab | |
| bool | m_dirty |
| true, if the buffer is dirty (it was written to) | |
| uint32_t | m_fbId |
| framebuffer id | |
| int | m_drmDeviceFd |
| drm device file descriptor | |
| int | m_numPlanes |
| number of planes in the buffer | |
| int | m_dmaBufHandle [4] |
| DMA-BUF file descriptor. | |
| int | m_numObjects |
| number of prime objects in the buffer | |
| int | m_objIdx [4] |
| index of the objects | |
| uint32_t | m_objectPrimeHandle [4] |
| primedata objects prime handles (count is numObjects, index is objIdx) | |
| uint8_t * | m_pPlane [4] |
| array of the plane data | |
| uint32_t | m_planePrimeHandle [4] |
| array of the plane handles | |
| uint32_t | m_offset [4] |
| array of the plane offset | |
| uint32_t | m_pitch [4] |
| array of the plane pitch | |
| uint32_t | m_size [4] {0} |
| array of the plane size | |
| bool | m_presentationPending = false |
| true, if buffer presentation is pending | |
| bool | m_destroyAfterUse = false |
| true, if buffer should be destroyed after use | |
| bool | m_closeHandleOnDestroy |
| true, if DMA-BUF handle should be closed on destroy | |
| struct gbm_bo * | m_pBo |
| pointer to the gbm buffer object | |
DRM Buffer.
Definition at line 46 of file drmbuffer.h.
| cDrmBuffer::cDrmBuffer | ( | void | ) |
Create a new drm buffer.
as an empty buffer
Definition at line 43 of file drmbuffer.cpp.
References m_dirty, m_dmaBufHandle, m_numPlanes, and m_pPlane.
| cDrmBuffer::cDrmBuffer | ( | cDrmBuffer * | src | ) |
Create a new drm buffer.
cloned from an existing cDrmBuffer
| src | src buffer to be cloned |
Definition at line 61 of file drmbuffer.cpp.
References L_GRAB, LOGDEBUG2, LOGERROR, m_dirty, m_dmaBufHandle, m_numObjects, m_numPlanes, m_objIdx, m_offset, m_pitch, m_planePrimeHandle, m_pPlane, m_size, and plane.
| cDrmBuffer::cDrmBuffer | ( | int | fdDrm, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | pixFmt, | ||
| struct gbm_bo * | bo | ||
| ) |
Create a new drm buffer.
from a gbm buffer object
| fdDrm | drm file descriptor |
| width | buffer width |
| height | buffer height |
| pixFmt | buffer pixel format |
| bo | pointer to gbm buffer object |
Definition at line 135 of file drmbuffer.cpp.
References m_dirty, m_numPlanes, m_offset, m_pitch, m_planePrimeHandle, m_pPlane, and m_size.
Clear and destroy the buffer object and its parameters.
Definition at line 157 of file drmbuffer.cpp.
References L_DRM, LOGDEBUG2, LOGERROR, m_closeHandleOnDestroy, m_destroyAfterUse, m_dirty, m_dmaBufHandle, m_drmDeviceFd, m_fbId, m_height, m_numObjects, m_numPlanes, m_objectPrimeHandle, m_objIdx, m_offset, m_pitch, m_planePrimeHandle, m_pPlane, m_size, and m_width.
Referenced by cVideoRender::DisplayBlackFrame(), cVideoRender::Exit(), and PresentationFinished().
Definition at line 77 of file drmbuffer.h.
References m_dmaBufHandle.
Color the buffer black.
Definition at line 393 of file drmbuffer.cpp.
References m_height, m_pPlane, and m_width.
Referenced by cVideoRender::Init().
Definition at line 98 of file drmbuffer.h.
References m_rectOnScreen.
Definition at line 61 of file drmbuffer.h.
References m_height.
Referenced by cVideoRender::Init(), cVideoRender::OsdClear(), and cVideoRender::SetOsdBuffer().
Definition at line 72 of file drmbuffer.h.
References m_fbId.
Referenced by cVideoRender::Init(), and cVideoRender::SetOsdBuffer().
Definition at line 66 of file drmbuffer.h.
References m_dirty.
Referenced by cVideoRender::DisplayFrame(), and cVideoRender::SetOsdBuffer().
Definition at line 69 of file drmbuffer.h.
References m_presentationPending.
Definition at line 67 of file drmbuffer.h.
References m_dirty.
Referenced by cVideoRender::SetOsdBuffer().
Definition at line 68 of file drmbuffer.h.
References m_dirty.
Referenced by cVideoRender::OsdClear(), and cVideoRender::OsdDrawARGB().
Definition at line 75 of file drmbuffer.h.
References m_numPlanes.
Definition at line 85 of file drmbuffer.h.
References m_offset.
Definition at line 86 of file drmbuffer.h.
References m_offset.
Definition at line 88 of file drmbuffer.h.
References m_pitch.
Referenced by cVideoRender::OsdClear(), and cVideoRender::OsdDrawARGB().
Definition at line 89 of file drmbuffer.h.
References m_pitch.
Definition at line 63 of file drmbuffer.h.
References m_pixFmt.
Definition at line 81 of file drmbuffer.h.
References m_pPlane.
Referenced by cVideoRender::OsdClear(), and cVideoRender::OsdDrawARGB().
The presentation of this buffer has finished.
Destroys the buffer, if it is not needed anymore (m_destroyAfterUse == true)
Definition at line 407 of file drmbuffer.cpp.
References Destroy(), frame, m_destroyAfterUse, and m_presentationPending.
Referenced by cVideoRender::DisplayFrame().
Definition at line 82 of file drmbuffer.h.
References m_planePrimeHandle.
Definition at line 83 of file drmbuffer.h.
References m_planePrimeHandle.
Definition at line 95 of file drmbuffer.h.
References m_destroyAfterUse.
Referenced by cVideoRender::ClearDecoderToDisplayQueue().
Definition at line 78 of file drmbuffer.h.
References m_dmaBufHandle.
Definition at line 74 of file drmbuffer.h.
References m_drmDeviceFd.
Definition at line 84 of file drmbuffer.h.
References m_planePrimeHandle.
Definition at line 62 of file drmbuffer.h.
References m_height.
Definition at line 73 of file drmbuffer.h.
References m_fbId.
Definition at line 79 of file drmbuffer.h.
References m_numObjects.
Definition at line 76 of file drmbuffer.h.
References m_numPlanes.
Definition at line 80 of file drmbuffer.h.
References m_objIdx.
Definition at line 87 of file drmbuffer.h.
References m_offset.
Definition at line 90 of file drmbuffer.h.
References m_pitch.
Definition at line 64 of file drmbuffer.h.
References m_pixFmt.
Definition at line 70 of file drmbuffer.h.
References m_presentationPending.
Definition at line 93 of file drmbuffer.h.
References m_size.
Definition at line 97 of file drmbuffer.h.
References m_rectOnScreen.
Referenced by cVideoRender::SetOsdBuffer().
| void cDrmBuffer::Setup | ( | int | drmDeviceFd, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | pixFmt, | ||
| AVDRMFrameDescriptor * | primedata, | ||
| bool | closeHandleOnDestroy | ||
| ) |
Setup the buffer.
| drmDeviceFd | drm device file descriptor |
| width | buffer width |
| height | buffer height |
| pixFmt | buffer pixel format |
| primedata | AVDRMFrameDescriptor or NULL (if this is a software buffer) |
Definition at line 259 of file drmbuffer.cpp.
References FindFormat(), L_DRM, LOGDEBUG2, LOGERROR, LOGFATAL, m_closeHandleOnDestroy, m_dirty, m_dmaBufHandle, m_drmDeviceFd, m_fbId, m_height, m_numObjects, m_numPlanes, m_objectPrimeHandle, m_objIdx, m_offset, m_pitch, m_pixFmt, m_planePrimeHandle, m_pPlane, m_size, m_width, format_info::num_planes, plane, and format_info::planes.
Referenced by cVideoRender::Init().
Definition at line 60 of file drmbuffer.h.
References m_width.
Definition at line 91 of file drmbuffer.h.
References m_size.
Definition at line 92 of file drmbuffer.h.
References m_size.
Definition at line 59 of file drmbuffer.h.
References m_width.
Referenced by cVideoRender::Init(), and cVideoRender::SetOsdBuffer().
associated AVFrame
Definition at line 94 of file drmbuffer.h.
Referenced by cVideoRender::DisplayBlackFrame(), cVideoRender::DisplayFrame(), and PresentationFinished().
|
private |
true, if DMA-BUF handle should be closed on destroy
Definition at line 127 of file drmbuffer.h.
true, if buffer should be destroyed after use
Definition at line 126 of file drmbuffer.h.
Referenced by Destroy(), PresentationFinished(), and SetDestroyAfterUse().
|
private |
true, if the buffer is dirty (it was written to)
Definition at line 107 of file drmbuffer.h.
Referenced by cDrmBuffer(), cDrmBuffer(), cDrmBuffer(), Destroy(), IsDirty(), MarkClean(), MarkDirty(), and Setup().
|
private |
DMA-BUF file descriptor.
Definition at line 114 of file drmbuffer.h.
Referenced by cDrmBuffer(), cDrmBuffer(), Destroy(), DmaBufHandle(), SetDmaBufHandle(), and Setup().
|
private |
drm device file descriptor
Definition at line 110 of file drmbuffer.h.
Referenced by Destroy(), SetFdDrm(), and Setup().
|
private |
|
private |
buffer height
Definition at line 102 of file drmbuffer.h.
Referenced by Destroy(), FillBlack(), Height(), SetHeight(), and Setup().
|
private |
number of prime objects in the buffer
Definition at line 115 of file drmbuffer.h.
Referenced by cDrmBuffer(), Destroy(), SetNumObjects(), and Setup().
|
private |
number of planes in the buffer
Definition at line 112 of file drmbuffer.h.
Referenced by cDrmBuffer(), cDrmBuffer(), cDrmBuffer(), Destroy(), NumPlanes(), SetNumPlanes(), and Setup().
|
private |
primedata objects prime handles (count is numObjects, index is objIdx)
Definition at line 117 of file drmbuffer.h.
|
private |
index of the objects
Definition at line 116 of file drmbuffer.h.
Referenced by cDrmBuffer(), Destroy(), SetObjectIndex(), and Setup().
|
private |
array of the plane offset
Definition at line 121 of file drmbuffer.h.
Referenced by cDrmBuffer(), cDrmBuffer(), Destroy(), Offset(), Offset(), SetOffset(), and Setup().
pointer to the gbm buffer object
Definition at line 130 of file drmbuffer.h.
|
private |
array of the plane pitch
Definition at line 122 of file drmbuffer.h.
Referenced by cDrmBuffer(), cDrmBuffer(), Destroy(), Pitch(), Pitch(), SetPitch(), and Setup().
|
private |
buffer pixel format
Definition at line 103 of file drmbuffer.h.
Referenced by PixFmt(), SetPixFmt(), and Setup().
|
private |
array of the plane handles
Definition at line 120 of file drmbuffer.h.
Referenced by cDrmBuffer(), cDrmBuffer(), Destroy(), PrimeHandle(), PrimeHandle(), SetHandle(), and Setup().
|
private |
array of the plane data
Definition at line 119 of file drmbuffer.h.
Referenced by cDrmBuffer(), cDrmBuffer(), cDrmBuffer(), Destroy(), FillBlack(), Plane(), and Setup().
true, if buffer presentation is pending
Definition at line 125 of file drmbuffer.h.
Referenced by IsPresentationPending(), PresentationFinished(), and SetPresentationPending().
|
private |
dimensions on screen - set at pageflip, needed for grab
Definition at line 105 of file drmbuffer.h.
Referenced by GetScreenRect(), and SetSizeOnScreen().
|
private |
array of the plane size
Definition at line 123 of file drmbuffer.h.
Referenced by cDrmBuffer(), cDrmBuffer(), Destroy(), SetSize(), Setup(), Size(), and Size().
|
private |
buffer width
Definition at line 101 of file drmbuffer.h.
Referenced by Destroy(), FillBlack(), Setup(), SetWidth(), and Width().