|
vdr-plugin-softhddevice-drm-gles 1.6.2
|
DRM Display Interface. More...
Classes | |
| struct | format_plane_info |
| struct | format_info |
| class | cDrmBuffer |
| DRM Buffer. More... | |
| class | cDrmBufferPool |
| DRM Buffer Pool. More... | |
| class | cDrmDevice |
| DRM Device. More... | |
| struct | vector |
| struct | colorspace |
| class | cHdrMetadata |
| HDR Metadata. More... | |
| class | cDrmPlane |
| DRM Plane. More... | |
Macros | |
| #define | ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) |
| #define | MAX_DRM_DEVICES 64 |
| #define | ARRAY_LENGTH(a) (sizeof(a) / sizeof(a)[0]) |
Enumerations | |
| enum | hdrMetadataEotf { EOTF_TRADITIONAL_GAMMA_SDR , EOTF_TRADITIONAL_GAMMA_HDR , EOTF_ST2084 , EOTF_HLG } |
| enum | metadataId { METADATA_TYPE1 } |
Variables | |
| static const struct format_info | format_info_array [] |
| Holds the infos of a pixel format. | |
| PFNEGLGETPLATFORMDISPLAYEXTPROC | get_platform_display = NULL |
| PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC | get_platform_surface = NULL |
| static const EGLint | context_attribute_list [] |
| int | plane |
| static struct colorspace | bt709 |
| BT709 Color Space. | |
| static struct colorspace | bt2020 |
| BT2020 Color Space. | |
| static struct colorspace | bt470bg |
| BT470bg Color Space. | |
| static struct colorspace *const | colorspaces [] |
DRM Display Interface.
Definition at line 237 of file drmbuffer.cpp.
| #define MAX_DRM_DEVICES 64 |
Definition at line 107 of file drmdevice.cpp.
| Enumerator | |
|---|---|
| EOTF_TRADITIONAL_GAMMA_SDR | |
| EOTF_TRADITIONAL_GAMMA_HDR | |
| EOTF_ST2084 | |
| EOTF_HLG | |
Definition at line 32 of file drmhdr.cpp.
| Enumerator | |
|---|---|
| METADATA_TYPE1 | |
Definition at line 39 of file drmhdr.cpp.
| __attribute__ | ( | (weak) | ) |
| int cHdrMetadata::Build | ( | struct hdr_output_metadata * | data, |
| int | colorPrimaries, | ||
| int | colorTrc, | ||
| AVFrameSideData * | sd1, | ||
| AVFrameSideData * | sd2 | ||
| ) |
Build an HDR static metadata blob.
| [out] | data | blob data |
| [in] | colorPrimaries | color primaries |
| [in] | colorTrc | transfer characteristics |
| [in] | sd1 | mastering display metadata from ffmpeg frame's sidedata |
| [in] | sd2 | content light metadata from ffmpeg frame's sidedata |
| 0 | on success |
| -1 | on error |
Definition at line 60 of file drmhdr.cpp.
References cVideoRender::CanHandleHdr(), colorspace_lookup(), EncodeXYY(), EOTF_HLG, EOTF_ST2084, EOTF_TRADITIONAL_GAMMA_SDR, vector::f, L_DRM, LOGDEBUG2, cHdrMetadata::m_clMetadata, cHdrMetadata::m_colorPrimaries, cHdrMetadata::m_colorTrc, cHdrMetadata::m_hdr10, cHdrMetadata::m_mdMetadata, cHdrMetadata::m_pRender, and METADATA_TYPE1.
Referenced by cVideoRender::SetVideoBuffer().
| cDrmBuffer::cDrmBuffer | ( | cDrmBuffer * | src | ) |
Create a new drm buffer.
cloned from an existing cDrmBuffer
| src | src buffer to be cloned |
Definition at line 66 of file drmbuffer.cpp.
References L_GRAB, LOGDEBUG2, LOGERROR, cDrmBuffer::m_dirty, cDrmBuffer::m_dmaBufHandle, cDrmBuffer::m_numObjects, cDrmBuffer::m_numPlanes, cDrmBuffer::m_objIdx, cDrmBuffer::m_offset, cDrmBuffer::m_pitch, cDrmBuffer::m_planePrimeHandle, cDrmBuffer::m_pPlane, cDrmBuffer::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 140 of file drmbuffer.cpp.
References cDrmBuffer::m_dirty, cDrmBuffer::m_numPlanes, cDrmBuffer::m_offset, cDrmBuffer::m_pitch, cDrmBuffer::m_planePrimeHandle, cDrmBuffer::m_pPlane, and cDrmBuffer::m_size.
| cDrmBuffer::cDrmBuffer | ( | void | ) |
Create a new drm buffer.
as an empty buffer
Definition at line 48 of file drmbuffer.cpp.
References cDrmBuffer::m_dirty, cDrmBuffer::m_dmaBufHandle, cDrmBuffer::m_numPlanes, and cDrmBuffer::m_pPlane.
| cDrmDevice::cDrmDevice | ( | cVideoRender * | render, |
| const char * | resolution | ||
| ) |
Create a drm device.
| render | pointer to cVideoRender object |
| resolution | display resolution string set by user |
Definition at line 54 of file drmdevice.cpp.
References cDrmDevice::m_userReqDisplayHeight, cDrmDevice::m_userReqDisplayRefreshRate, and cDrmDevice::m_userReqDisplayWidth.
| void cDrmPlane::ClearPlane | ( | drmModeAtomicReqPtr | ModeReq | ) |
Clear plane from drm.
| ModeReq | pointer to the atomic mode request |
Definition at line 170 of file drmplane.cpp.
References cDrmPlane::SetPropertyRequest().
Close the drm file handle.
Definition at line 906 of file drmdevice.cpp.
References L_DRM, LOGDEBUG2, and cDrmDevice::m_fdDrm.
Referenced by cVideoRender::Exit().
|
inlinestatic |
Definition at line 86 of file drmhdr.h.
References ARRAY_LENGTH, colorspaces, and colorspace::name.
Referenced by cHdrMetadata::Build().
| int cDrmDevice::CreateHdrBlob | ( | struct hdr_output_metadata * | data, |
| size_t | size, | ||
| uint32_t * | blobID | ||
| ) |
Definition at line 1160 of file drmdevice.cpp.
References L_DRM, LOGDEBUG2, and cDrmDevice::m_fdDrm.
Referenced by cVideoRender::SetHdrBlob().
Definition at line 1150 of file drmdevice.cpp.
References cDrmDevice::m_drmModeInfo, and cDrmDevice::m_fdDrm.
Referenced by cVideoRender::Init(), cVideoRender::RestoreColorSpace(), and cVideoRender::SetColorSpace().
Wrapper to create a property blob.
Creates a property blob for the drm mode which was found during Init()
| [out] | modeID | id of the blob |
| 0 | on success |
| -errno | on error |
Definition at line 928 of file drmdevice.cpp.
References cDrmDevice::m_drmModeInfo, and cDrmDevice::m_fdDrm.
Clear and destroy the buffer object and its parameters.
Definition at line 162 of file drmbuffer.cpp.
References L_DRM, LOGDEBUG2, LOGERROR, cDrmBuffer::m_closeHandleOnDestroy, cDrmBuffer::m_destroyAfterUse, cDrmBuffer::m_dirty, cDrmBuffer::m_dmaBufHandle, cDrmBuffer::m_drmDeviceFd, cDrmBuffer::m_fbId, cDrmBuffer::m_height, cDrmBuffer::m_numObjects, cDrmBuffer::m_numPlanes, cDrmBuffer::m_objectPrimeHandle, cDrmBuffer::m_objIdx, cDrmBuffer::m_offset, cDrmBuffer::m_pitch, cDrmBuffer::m_planePrimeHandle, cDrmBuffer::m_pPlane, cDrmBuffer::m_size, and cDrmBuffer::m_width.
Referenced by cVideoRender::DisplayBlackFrame(), cVideoRender::Exit(), and cDrmBuffer::PresentationFinished().
| void cDrmBufferPool::DestroyAllExcept | ( | cDrmBuffer * | exceptBuf | ) |
Destroy all drm buffers except the given one.
| exceptBuf | the buffer, which should be kept alive if nullptr is given, all buffers are destroyed |
Definition at line 473 of file drmbuffer.cpp.
References cPool< cDrmBuffer >::buffer.
Referenced by cVideoRender::ClearDecoderToDisplayQueue(), and cVideoRender::ClearPipDecoderToDisplayQueue().
Definition at line 1179 of file drmdevice.cpp.
References cDrmDevice::m_fdDrm.
Referenced by cVideoRender::SetHdrBlob().
Definition at line 1155 of file drmdevice.cpp.
References cDrmDevice::m_fdDrm.
Referenced by cVideoRender::RestoreColorSpace(), and cVideoRender::SetColorSpace().
Callback function to destroy a drm buffer which stays in the gbm_bo's user data.
Definition at line 736 of file drmdevice.cpp.
Referenced by cDrmDevice::GetBufFromBo().
Dump the cached plane parameter modesetting values.
Definition at line 211 of file drmplane.cpp.
References cDrmPlane::GetCrtcH(), cDrmPlane::GetCrtcId(), cDrmPlane::GetCrtcW(), cDrmPlane::GetCrtcX(), cDrmPlane::GetCrtcY(), cDrmPlane::GetFbId(), cDrmPlane::GetId(), cDrmPlane::GetSrcH(), cDrmPlane::GetSrcW(), cDrmPlane::GetSrcX(), cDrmPlane::GetSrcY(), cDrmPlane::GetZpos(), and LOGERROR.
Definition at line 43 of file drmhdr.cpp.
Referenced by cHdrMetadata::Build().
Color the buffer black.
Definition at line 398 of file drmbuffer.cpp.
References cDrmBuffer::m_height, cDrmBuffer::m_pPlane, and cDrmBuffer::m_width.
Referenced by cVideoRender::Init().
Fill the plane properties.
This "caches" the properties within the class
| fd | drm file descriptor |
Definition at line 39 of file drmplane.cpp.
References cDrmPlane::GetId(), LOGERROR, cDrmPlane::m_props, cDrmPlane::m_propsInfo, and cDrmPlane::SetProps().
Referenced by cDrmDevice::Init().
| cDrmBuffer * cDrmBufferPool::FindByDmaBufHandle | ( | int | primeFd | ) |
Find a drm buffer from the buffer pool by a given prime handle.
Definition at line 428 of file drmbuffer.cpp.
References cPool< cDrmBuffer >::buffer.
|
private |
Find the CRTC_ID for the given connector.
| resources | drm resources |
| connector | drm connector |
Definition at line 883 of file drmdevice.cpp.
References FindCrtcForEncoder(), and cDrmDevice::m_fdDrm.
Referenced by cDrmDevice::Init().
|
static |
Find the CRTC_ID for the given encoder.
| resources | drm resources |
| encoder | drm encoder |
Definition at line 860 of file drmdevice.cpp.
Referenced by cDrmDevice::FindCrtcForConnector().
|
static |
Find a suitable connector, preferably a connected one.
Definition at line 157 of file drmdevice.cpp.
Referenced by cDrmDevice::Init().
|
static |
Find and open a suitable device with the wanted capabilities.
Definition at line 113 of file drmdevice.cpp.
References get_resources(), LOGERROR, MAX_DRM_DEVICES, and TestCaps().
Referenced by cDrmDevice::Init().
| const struct format_info * FindFormat | ( | uint32_t | format | ) |
Find infos for the given pixel format.
| format | pixel format |
Definition at line 246 of file drmbuffer.cpp.
References ARRAY_SIZE, format_info::format, and format_info_array.
Referenced by cDrmBuffer::Setup().
| cDrmBuffer * cDrmBufferPool::FindNoPresentationPending | ( | void | ) |
Find a dirty drm buffer from the buffer pool which presentation has finished.
Definition at line 457 of file drmbuffer.cpp.
References cPool< cDrmBuffer >::buffer.
| cDrmBuffer * cDrmBufferPool::FindUninitilized | ( | void | ) |
Find a clean drm buffer from the buffer pool.
Definition at line 441 of file drmbuffer.cpp.
References cPool< cDrmBuffer >::buffer.
Free the previously filled plane properties.
Definition at line 58 of file drmplane.cpp.
References cDrmPlane::GetProps(), cDrmPlane::GetPropsInfo(), cDrmPlane::m_props, and cDrmPlane::m_propsInfo.
|
static |
| cDrmBuffer * cDrmDevice::GetBufFromBo | ( | struct gbm_bo * | bo | ) |
Get a drm buffer from a gbm buffer object.
| bo | gbm buffer object |
Definition at line 772 of file drmdevice.cpp.
References drm_fb_destroy_callback(), L_DRM, LOGDEBUG2, LOGFATAL, and cDrmDevice::m_fdDrm.
Referenced by cVideoRender::OsdClear(), and cVideoRender::OsdDrawARGB().
Get a suitable EGLConfig.
Definition at line 625 of file drmdevice.cpp.
References EGL_CHECK, L_OPENGL, LOGDEBUG2, LOGFATAL, and cDrmDevice::m_eglDisplay.
Referenced by cDrmDevice::InitEGL().
|
private |
Get a property ID.
| objectID | drm object ID |
| objectType | drm object type |
| propName | drm property name |
Definition at line 1031 of file drmdevice.cpp.
References L_DRM, LOGDEBUG2, and cDrmDevice::m_fdDrm.
Referenced by cDrmDevice::Init().
|
private |
Get a drm property value.
| objectID | drm object ID | |
| objectType | drm object type | |
| propName | drm property name | |
| [out] | value | value for the requested property |
| 0 | value was found |
| -1 | value was not found |
Definition at line 986 of file drmdevice.cpp.
References L_DRM, LOGDEBUG2, and cDrmDevice::m_fdDrm.
Referenced by cDrmDevice::GetVideoPlaneColorRange(), and cDrmDevice::Init().
Definition at line 1135 of file drmdevice.cpp.
References cDrmPlane::GetId(), cDrmDevice::GetPropertyValue(), and cDrmDevice::m_videoPlane.
Referenced by cVideoRender::SetHdrBlob().
Poll for a drm event.
| 0 | if successful |
| -1 | on error |
Definition at line 1093 of file drmdevice.cpp.
References cDrmDevice::m_drmEventCtx, and cDrmDevice::m_fdDrm.
Referenced by cVideoRender::DrmHandleEvent(), and cVideoRender::PageFlip().
Check, if the plane is able to set the zpos property.
| fdDrm | drm file descriptor |
| 1 | plane can use zpos |
| 0 | plane can't use zpos |
Definition at line 184 of file drmplane.cpp.
References L_DRM, LOGDEBUG2, LOGERROR, and cDrmPlane::SetPlaneZpos().
Referenced by cDrmDevice::Init().
Initiate the drm device.
| 0 | on success |
| -errno | on error |
Definition at line 194 of file drmdevice.cpp.
References cDrmPlane::FillProperties(), cDrmDevice::FindCrtcForConnector(), FindDrmConnector(), FindDrmDevice(), cDrmPlane::GetId(), cDrmDevice::GetPropertyID(), cDrmDevice::GetPropertyValue(), cDrmPlane::GetType(), cDrmPlane::GetZpos(), cDrmPlane::HasZpos(), cDrmDevice::InitEGL(), cDrmDevice::InitGbm(), L_DRM, LOGDEBUG2, LOGERROR, LOGFATAL, LOGINFO, LOGWARNING, cDrmDevice::m_connectorId, cDrmDevice::m_crtcId, cDrmDevice::m_crtcIndex, cDrmDevice::m_drmModeInfo, cDrmDevice::m_fdDrm, cDrmDevice::m_hdrMetadata, cDrmDevice::m_osdPlane, cDrmDevice::m_pipPlane, cDrmDevice::m_pRender, cDrmDevice::m_userReqDisplayHeight, cDrmDevice::m_userReqDisplayRefreshRate, cDrmDevice::m_userReqDisplayWidth, cDrmDevice::m_useZpos, cDrmDevice::m_videoPlane, cDrmDevice::m_zposOverlay, cDrmDevice::m_zposPip, cDrmDevice::m_zposPrimary, cVideoRender::OglOsdDisabled(), plane, cDrmPlane::SetId(), cVideoRender::SetScreenSize(), cDrmPlane::SetType(), and cDrmPlane::SetZpos().
Referenced by cVideoRender::Init().
Init EGL context.
| 0 | on success |
| -1 | on error |
Definition at line 680 of file drmdevice.cpp.
References context_attribute_list, EGL_CHECK, get_platform_display, get_platform_surface, cDrmDevice::GetEGLConfig(), L_OPENGL, LOGDEBUG2, LOGERROR, LOGINFO, cDrmDevice::m_eglContext, cDrmDevice::m_eglDisplay, cDrmDevice::m_eglSurface, cDrmDevice::m_glInitiated, cDrmDevice::m_pGbmDevice, and cDrmDevice::m_pGbmSurface.
Referenced by cDrmDevice::Init().
Init the event context.
Definition at line 1101 of file drmdevice.cpp.
References cDrmDevice::m_drmEventCtx.
Referenced by cVideoRender::Init().
Init gbm device and surface.
| w | gbm surface width |
| h | gbm surface height |
| format | gbm pixel format |
| modifier | gbm buffer modifier |
| 0 | on success |
| -1 | on error |
Definition at line 596 of file drmdevice.cpp.
References LOGERROR, cDrmDevice::m_fdDrm, cDrmDevice::m_pGbmDevice, and cDrmDevice::m_pGbmSurface.
Referenced by cDrmDevice::Init().
The presentation of this buffer has finished.
Destroys the buffer, if it not needed anymore (m_destroyAfterUse == true)
Definition at line 412 of file drmbuffer.cpp.
References cDrmBuffer::Destroy(), cDrmBuffer::frame, cDrmBuffer::m_destroyAfterUse, and cDrmBuffer::m_presentationPending.
Referenced by cVideoRender::DisplayFrame().
Restore information of a CRTC.
Definition at line 1078 of file drmdevice.cpp.
References cDrmDevice::m_connectorId, cDrmDevice::m_drmModeCrtcSaved, and cDrmDevice::m_fdDrm.
Referenced by cVideoRender::Exit().
Save information of a CRTC.
Definition at line 1070 of file drmdevice.cpp.
References cDrmDevice::m_crtcId, cDrmDevice::m_drmModeCrtcSaved, and cDrmDevice::m_fdDrm.
Referenced by cVideoRender::Init().
| int cDrmDevice::SetConnectorColorspace | ( | drmModeAtomicReqPtr | modeReq, |
| uint32_t | id | ||
| ) |
Definition at line 1120 of file drmdevice.cpp.
References cDrmDevice::m_connectorId, and cDrmDevice::SetPropertyRequest().
Referenced by cVideoRender::RestoreColorSpace(), and cVideoRender::SetColorSpace().
| int cDrmDevice::SetConnectorCrtcId | ( | drmModeAtomicReqPtr | modeReq | ) |
Definition at line 1110 of file drmdevice.cpp.
References cDrmDevice::m_connectorId, cDrmDevice::m_crtcId, and cDrmDevice::SetPropertyRequest().
Referenced by cVideoRender::Init(), cVideoRender::RestoreColorSpace(), and cVideoRender::SetColorSpace().
Definition at line 1169 of file drmdevice.cpp.
References L_DRM, LOGDEBUG2, cDrmDevice::m_connectorId, cDrmDevice::m_fdDrm, and cDrmDevice::m_hdrMetadata.
Referenced by cVideoRender::SetHdrBlob().
| int cDrmDevice::SetConnectorHdrOutputMetadata | ( | drmModeAtomicReqPtr | modeReq, |
| uint32_t | id | ||
| ) |
Definition at line 1115 of file drmdevice.cpp.
References cDrmDevice::m_connectorId, and cDrmDevice::SetPropertyRequest().
Referenced by cVideoRender::RestoreColorSpace().
| int cDrmDevice::SetCrtcActive | ( | drmModeAtomicReqPtr | modeReq, |
| uint32_t | id | ||
| ) |
Definition at line 1145 of file drmdevice.cpp.
References cDrmDevice::m_crtcId, and cDrmDevice::SetPropertyRequest().
Referenced by cVideoRender::Init(), cVideoRender::RestoreColorSpace(), and cVideoRender::SetColorSpace().
| int cDrmDevice::SetCrtcModeId | ( | drmModeAtomicReqPtr | modeReq, |
| uint32_t | id | ||
| ) |
Definition at line 1140 of file drmdevice.cpp.
References cDrmDevice::m_crtcId, and cDrmDevice::SetPropertyRequest().
Referenced by cVideoRender::Init(), cVideoRender::RestoreColorSpace(), and cVideoRender::SetColorSpace().
| void cDrmPlane::SetParams | ( | uint64_t | crtcId, |
| uint64_t | fbId, | ||
| uint64_t | crtcX, | ||
| uint64_t | crtcY, | ||
| uint64_t | crtcW, | ||
| uint64_t | crtcH, | ||
| uint64_t | srcX, | ||
| uint64_t | srcY, | ||
| uint64_t | srcW, | ||
| uint64_t | srcH | ||
| ) |
Caches the modesetting parameters of a plane.
These values are used for drm modesetting
| crtcId | Mode object ID of the crtc |
| fbId | Mode object ID of the drm framebuffer |
| crtcX | X offset of the destination rect |
| crtcY | Y offset of the destination rect |
| crtcW | width of the destination rect |
| crtcH | height of the destination rect |
| srcX | X offset of the source rect |
| srcY | Y offset of the source rect |
| srcW | width of the source rect |
| srccH | height of the source rect |
Definition at line 91 of file drmplane.cpp.
References cDrmPlane::m_crtcH, cDrmPlane::m_crtcId, cDrmPlane::m_crtcW, cDrmPlane::m_crtcX, cDrmPlane::m_crtcY, cDrmPlane::m_fbId, cDrmPlane::m_srcH, cDrmPlane::m_srcW, cDrmPlane::m_srcX, and cDrmPlane::m_srcY.
| void cDrmPlane::SetPlane | ( | drmModeAtomicReqPtr | ModeReq | ) |
Set all plane properties (except zpos)
| ModeReq | pointer to the atomic mode request |
Definition at line 149 of file drmplane.cpp.
References cDrmPlane::GetCrtcH(), cDrmPlane::GetCrtcId(), cDrmPlane::GetCrtcW(), cDrmPlane::GetCrtcX(), cDrmPlane::GetCrtcY(), cDrmPlane::GetFbId(), cDrmPlane::GetSrcH(), cDrmPlane::GetSrcW(), cDrmPlane::GetSrcX(), cDrmPlane::GetSrcY(), and cDrmPlane::SetPropertyRequest().
| void cDrmPlane::SetPlaneZpos | ( | drmModeAtomicReqPtr | ModeReq | ) |
Set the plane zpos property.
| ModeReq | pointer to the atomic mode request |
Definition at line 139 of file drmplane.cpp.
References cDrmPlane::GetZpos(), and cDrmPlane::SetPropertyRequest().
Referenced by cDrmPlane::HasZpos().
|
private |
Add the properties to the mode setting request.
| ModeReq | pointer to the atomic mode request |
| propName | name of the property to set |
| value | property value |
Definition at line 114 of file drmplane.cpp.
References cDrmPlane::GetCountProps(), cDrmPlane::GetId(), cDrmPlane::GetPropsInfoName(), cDrmPlane::GetPropsInfoPropId(), and LOGDEBUG.
Referenced by cDrmPlane::ClearPlane(), cDrmPlane::SetPlane(), and cDrmPlane::SetPlaneZpos().
|
private |
Add a drm property to an atomic modeset request.
| ModeReq | atomic request object |
| objectID | drm object id |
| objectType | drm object type |
| propName | name of the drm property to be set |
| value | the value, the drm property should get |
Definition at line 944 of file drmdevice.cpp.
References L_DRM, LOGDEBUG2, and cDrmDevice::m_fdDrm.
Referenced by cDrmDevice::SetConnectorColorspace(), cDrmDevice::SetConnectorCrtcId(), cDrmDevice::SetConnectorHdrOutputMetadata(), cDrmDevice::SetCrtcActive(), cDrmDevice::SetCrtcModeId(), cDrmDevice::SetVideoPlaneColorEncoding(), and cDrmDevice::SetVideoPlaneColorRange().
| 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 264 of file drmbuffer.cpp.
References FindFormat(), L_DRM, LOGDEBUG2, LOGERROR, LOGFATAL, cDrmBuffer::m_closeHandleOnDestroy, cDrmBuffer::m_dirty, cDrmBuffer::m_dmaBufHandle, cDrmBuffer::m_drmDeviceFd, cDrmBuffer::m_fbId, cDrmBuffer::m_height, cDrmBuffer::m_numObjects, cDrmBuffer::m_numPlanes, cDrmBuffer::m_objectPrimeHandle, cDrmBuffer::m_objIdx, cDrmBuffer::m_offset, cDrmBuffer::m_pitch, cDrmBuffer::m_pixFmt, cDrmBuffer::m_planePrimeHandle, cDrmBuffer::m_pPlane, cDrmBuffer::m_size, cDrmBuffer::m_width, format_info::num_planes, plane, and format_info::planes.
Referenced by cVideoRender::Init().
| int cDrmDevice::SetVideoPlaneColorEncoding | ( | drmModeAtomicReqPtr | modeReq, |
| uint32_t | id | ||
| ) |
Definition at line 1125 of file drmdevice.cpp.
References cDrmPlane::GetId(), cDrmDevice::m_videoPlane, and cDrmDevice::SetPropertyRequest().
Referenced by cVideoRender::RestoreColorSpace(), and cVideoRender::SetColorSpace().
| int cDrmDevice::SetVideoPlaneColorRange | ( | drmModeAtomicReqPtr | modeReq, |
| uint32_t | id | ||
| ) |
Definition at line 1130 of file drmdevice.cpp.
References cDrmPlane::GetId(), cDrmDevice::m_videoPlane, and cDrmDevice::SetPropertyRequest().
Referenced by cVideoRender::RestoreColorSpace(), and cVideoRender::SetColorSpace().
Test drm capabilities.
| 0 | if all needed caps match |
| 1 | on mismatch |
Definition at line 82 of file drmdevice.cpp.
Referenced by FindDrmDevice().
| cDrmDevice::~cDrmDevice | ( | void | ) |
Definition at line 61 of file drmdevice.cpp.
|
static |
|
static |
|
static |
|
static |
Definition at line 616 of file drmdevice.cpp.
Referenced by cDrmDevice::InitEGL().
|
static |
Holds the infos of a pixel format.
Each entry describes a format in the following matter: { uint32_t format, const char *fourcc, uint8_t num_planes, struct format_plane_info planes[4] }
The format_plane_info is: { uint8_t bitspp, uint8_t xsub, uint8_t ysub, }
Definition at line 231 of file drmbuffer.cpp.
Referenced by FindFormat().
| PFNEGLGETPLATFORMDISPLAYEXTPROC get_platform_display = NULL |
Definition at line 613 of file drmdevice.cpp.
Referenced by cDrmDevice::InitEGL().
| PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC get_platform_surface = NULL |
Definition at line 614 of file drmdevice.cpp.
Referenced by cDrmDevice::InitEGL().
| int plane |
Definition at line 748 of file drmdevice.cpp.
Referenced by cDrmBuffer::cDrmBuffer(), cGrabBuffer::FreeDrmBuf(), cSoftHdGrab::GetGrab(), cDrmDevice::Init(), and cDrmBuffer::Setup().