vdr-plugin-softhddevice-drm-gles 1.4.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
cDrmPlane Class Reference

cDrmPlane - DRM plane class More...

#include <drmplane.h>

Public Member Functions

 cDrmPlane (void)
 
virtual ~cDrmPlane (void)
 
void SetParams (uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t)
 Set the modesetting parameters of a plane. More...
 
void DumpParameters (const char *)
 Dump the plane parameter modesetting values. More...
 
void FillProperties (int)
 Fill the plane properties. More...
 
void FreeProperties (void)
 Free the previously filled plane properties. More...
 
void SetPlaneZpos (drmModeAtomicReqPtr)
 Set the plane zpos property. More...
 
void SetPlane (drmModeAtomicReqPtr)
 Set all other plane properties. More...
 
void ClearPlane (drmModeAtomicReqPtr)
 Clear plane from drm. More...
 
int HasZpos (int)
 Check, if the plane is able to set the zpos property. More...
 
uint32_t GetId (void)
 
void SetId (uint32_t id)
 
uint64_t GetType (void)
 
void SetType (uint64_t type)
 
uint64_t GetCrtcId (void)
 
uint64_t GetFbId (void)
 
uint64_t GetCrtcX (void)
 
uint64_t GetCrtcY (void)
 
uint64_t GetCrtcW (void)
 
uint64_t GetCrtcH (void)
 
uint64_t GetSrcX (void)
 
uint64_t GetSrcY (void)
 
uint64_t GetSrcW (void)
 
uint64_t GetSrcH (void)
 
uint64_t GetZpos (void)
 
void SetZpos (uint64_t zpos)
 
int GetCountProps (void)
 
char * GetPropsInfoName (int prop)
 
uint32_t GetPropsInfoPropId (int prop)
 
drmModeObjectProperties * GetProps (void)
 
void SetProps (drmModeObjectProperties *props)
 
drmModePropertyRes ** GetPropsInfo (void)
 
drmModePropertyRes ** GetPropsInfoElem (int elem)
 

Private Member Functions

int SetPropertyRequest (drmModeAtomicReqPtr, const char *, uint64_t)
 Add the properties to the mode setting request. More...
 

Private Attributes

uint32_t m_planeId
 the plane's ID More...
 
uint64_t m_type
 type: DRM_PLANE_TYPE_PRIMARY or DRM_PLANE_TYPE_OVERLAY More...
 
drmModeObjectProperties * m_props
 
drmModePropertyRes ** m_propsInfo
 
uint64_t m_crtcId
 CRTC_ID. More...
 
uint64_t m_fbId
 FB_ID. More...
 
uint64_t m_crtcX
 CRTC_X. More...
 
uint64_t m_crtcY
 CRTC_Y. More...
 
uint64_t m_crtcW
 CRTC_W. More...
 
uint64_t m_crtcH
 CRTC_H. More...
 
uint64_t m_srcX
 SRC_X. More...
 
uint64_t m_srcY
 SRC_Y. More...
 
uint64_t m_srcW
 SRC_W. More...
 
uint64_t m_srcH
 SRC_H. More...
 
uint64_t m_zpos
 ZPOS. More...
 

Detailed Description

cDrmPlane - DRM plane class

Definition at line 30 of file drmplane.h.

Constructor & Destructor Documentation

◆ cDrmPlane()

cDrmPlane::cDrmPlane ( void  )

Definition at line 35 of file drmplane.cpp.

References m_planeId, and m_zpos.

◆ ~cDrmPlane()

cDrmPlane::~cDrmPlane ( void  )
virtual

Definition at line 41 of file drmplane.cpp.

Member Function Documentation

◆ ClearPlane()

void cDrmPlane::ClearPlane ( drmModeAtomicReqPtr  ModeReq)

Clear plane from drm.

Parameters
ModeReqpointer to the atomic mode request

Definition at line 183 of file drmplane.cpp.

References SetPropertyRequest().

Referenced by cVideoRender::CommitBuffer().

◆ DumpParameters()

void cDrmPlane::DumpParameters ( const char *  id)

Dump the plane parameter modesetting values.

Definition at line 223 of file drmplane.cpp.

References GetCrtcH(), GetCrtcId(), GetCrtcW(), GetCrtcX(), GetCrtcY(), GetFbId(), GetId(), GetSrcH(), GetSrcW(), GetSrcX(), GetSrcY(), GetZpos(), and LOGERROR.

Referenced by cVideoRender::CommitBuffer(), and cVideoRender::Init().

◆ FillProperties()

void cDrmPlane::FillProperties ( int  fd)

Fill the plane properties.

This "caches" the properties within the class

Parameters
fddrm file descriptor

Definition at line 52 of file drmplane.cpp.

References GetId(), LOGERROR, m_props, m_propsInfo, and SetProps().

Referenced by cDrmDevice::Init().

◆ FreeProperties()

void cDrmPlane::FreeProperties ( void  )

Free the previously filled plane properties.

Definition at line 71 of file drmplane.cpp.

References GetProps(), GetPropsInfo(), m_props, and m_propsInfo.

Referenced by cVideoRender::Exit().

◆ GetCountProps()

int cDrmPlane::GetCountProps ( void  )
inline

Definition at line 63 of file drmplane.h.

References m_props.

Referenced by SetPropertyRequest().

◆ GetCrtcH()

uint64_t cDrmPlane::GetCrtcH ( void  )
inline

Definition at line 55 of file drmplane.h.

References m_crtcH.

Referenced by DumpParameters(), and SetPlane().

◆ GetCrtcId()

uint64_t cDrmPlane::GetCrtcId ( void  )
inline

Definition at line 50 of file drmplane.h.

References m_crtcId.

Referenced by DumpParameters(), and SetPlane().

◆ GetCrtcW()

uint64_t cDrmPlane::GetCrtcW ( void  )
inline

Definition at line 54 of file drmplane.h.

References m_crtcW.

Referenced by DumpParameters(), and SetPlane().

◆ GetCrtcX()

uint64_t cDrmPlane::GetCrtcX ( void  )
inline

Definition at line 52 of file drmplane.h.

References m_crtcX.

Referenced by DumpParameters(), and SetPlane().

◆ GetCrtcY()

uint64_t cDrmPlane::GetCrtcY ( void  )
inline

Definition at line 53 of file drmplane.h.

References m_crtcY.

Referenced by DumpParameters(), and SetPlane().

◆ GetFbId()

uint64_t cDrmPlane::GetFbId ( void  )
inline

Definition at line 51 of file drmplane.h.

References m_fbId.

Referenced by cVideoRender::CommitBuffer(), DumpParameters(), and SetPlane().

◆ GetId()

uint32_t cDrmPlane::GetId ( void  )
inline

◆ GetProps()

drmModeObjectProperties * cDrmPlane::GetProps ( void  )
inline

Definition at line 66 of file drmplane.h.

References m_props.

Referenced by FreeProperties().

◆ GetPropsInfo()

drmModePropertyRes ** cDrmPlane::GetPropsInfo ( void  )
inline

Definition at line 68 of file drmplane.h.

References m_propsInfo.

Referenced by FreeProperties().

◆ GetPropsInfoElem()

drmModePropertyRes ** cDrmPlane::GetPropsInfoElem ( int  elem)
inline

Definition at line 69 of file drmplane.h.

References m_propsInfo.

◆ GetPropsInfoName()

char * cDrmPlane::GetPropsInfoName ( int  prop)
inline

Definition at line 64 of file drmplane.h.

References m_propsInfo.

Referenced by SetPropertyRequest().

◆ GetPropsInfoPropId()

uint32_t cDrmPlane::GetPropsInfoPropId ( int  prop)
inline

Definition at line 65 of file drmplane.h.

References m_propsInfo.

Referenced by SetPropertyRequest().

◆ GetSrcH()

uint64_t cDrmPlane::GetSrcH ( void  )
inline

Definition at line 59 of file drmplane.h.

References m_srcH.

Referenced by DumpParameters(), and SetPlane().

◆ GetSrcW()

uint64_t cDrmPlane::GetSrcW ( void  )
inline

Definition at line 58 of file drmplane.h.

References m_srcW.

Referenced by DumpParameters(), and SetPlane().

◆ GetSrcX()

uint64_t cDrmPlane::GetSrcX ( void  )
inline

Definition at line 56 of file drmplane.h.

References m_srcX.

Referenced by DumpParameters(), and SetPlane().

◆ GetSrcY()

uint64_t cDrmPlane::GetSrcY ( void  )
inline

Definition at line 57 of file drmplane.h.

References m_srcY.

Referenced by DumpParameters(), and SetPlane().

◆ GetType()

uint64_t cDrmPlane::GetType ( void  )
inline

Definition at line 48 of file drmplane.h.

References m_type.

Referenced by cDrmDevice::Init().

◆ GetZpos()

uint64_t cDrmPlane::GetZpos ( void  )
inline

Definition at line 60 of file drmplane.h.

References m_zpos.

Referenced by DumpParameters(), cDrmDevice::Init(), cVideoRender::SetOsdBuffer(), and SetPlaneZpos().

◆ HasZpos()

int cDrmPlane::HasZpos ( int  fdDrm)

Check, if the plane is able to set the zpos property.

Parameters
fdDrmdrm file descriptor
Returns
1 plane can use zpos
0 plane can't use zpos

Definition at line 196 of file drmplane.cpp.

References L_DRM, LOGDEBUG2, LOGERROR, and SetPlaneZpos().

Referenced by cDrmDevice::Init().

◆ SetId()

void cDrmPlane::SetId ( uint32_t  id)
inline

Definition at line 47 of file drmplane.h.

References m_planeId.

Referenced by cDrmDevice::Init().

◆ SetParams()

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 
)

Set the modesetting parameters of a plane.

These values are used for drm modesetting

Parameters
crtcIdMode object ID of the crtc
fbIdMode object ID of the drm framebuffer
crtcXX offset of the destination rect
crtcYY offset of the destination rect
crtcWwidth of the destination rect
crtcHheight of the destination rect
srcXX offset of the source rect
srcYY offset of the source rect
srcWwidth of the source rect
srccHheight of the source rect

Definition at line 104 of file drmplane.cpp.

References m_crtcH, m_crtcId, m_crtcW, m_crtcX, m_crtcY, m_fbId, m_srcH, m_srcW, m_srcX, and m_srcY.

Referenced by cVideoRender::Init(), cVideoRender::SetOsdBuffer(), cVideoRender::SetPipBuffer(), and cVideoRender::SetVideoBuffer().

◆ SetPlane()

void cDrmPlane::SetPlane ( drmModeAtomicReqPtr  ModeReq)

Set all other plane properties.

Parameters
ModeReqpointer to the atomic mode request

Definition at line 162 of file drmplane.cpp.

References GetCrtcH(), GetCrtcId(), GetCrtcW(), GetCrtcX(), GetCrtcY(), GetFbId(), GetSrcH(), GetSrcW(), GetSrcX(), GetSrcY(), and SetPropertyRequest().

Referenced by cVideoRender::CommitBuffer(), and cVideoRender::Init().

◆ SetPlaneZpos()

void cDrmPlane::SetPlaneZpos ( drmModeAtomicReqPtr  ModeReq)

Set the plane zpos property.

Parameters
ModeReqpointer to the atomic mode request

Definition at line 152 of file drmplane.cpp.

References GetZpos(), and SetPropertyRequest().

Referenced by HasZpos(), cVideoRender::Init(), and cVideoRender::SetOsdBuffer().

◆ SetPropertyRequest()

int cDrmPlane::SetPropertyRequest ( drmModeAtomicReqPtr  ModeReq,
const char *  propName,
uint64_t  value 
)
private

Add the properties to the mode setting request.

Parameters
ModeReqpointer to the atomic mode request
propNamename of the property to set
valueproperty value

Definition at line 127 of file drmplane.cpp.

References GetCountProps(), GetId(), GetPropsInfoName(), GetPropsInfoPropId(), and LOGERROR.

Referenced by ClearPlane(), SetPlane(), and SetPlaneZpos().

◆ SetProps()

void cDrmPlane::SetProps ( drmModeObjectProperties *  props)
inline

Definition at line 67 of file drmplane.h.

References m_props.

Referenced by FillProperties().

◆ SetType()

void cDrmPlane::SetType ( uint64_t  type)
inline

Definition at line 49 of file drmplane.h.

References m_type.

Referenced by cDrmDevice::Init().

◆ SetZpos()

void cDrmPlane::SetZpos ( uint64_t  zpos)
inline

Definition at line 61 of file drmplane.h.

References m_zpos.

Referenced by cDrmDevice::Init(), cVideoRender::Init(), and cVideoRender::SetOsdBuffer().

Member Data Documentation

◆ m_crtcH

uint64_t cDrmPlane::m_crtcH
private

CRTC_H.

Definition at line 84 of file drmplane.h.

Referenced by GetCrtcH(), and SetParams().

◆ m_crtcId

uint64_t cDrmPlane::m_crtcId
private

CRTC_ID.

Definition at line 79 of file drmplane.h.

Referenced by GetCrtcId(), and SetParams().

◆ m_crtcW

uint64_t cDrmPlane::m_crtcW
private

CRTC_W.

Definition at line 83 of file drmplane.h.

Referenced by GetCrtcW(), and SetParams().

◆ m_crtcX

uint64_t cDrmPlane::m_crtcX
private

CRTC_X.

Definition at line 81 of file drmplane.h.

Referenced by GetCrtcX(), and SetParams().

◆ m_crtcY

uint64_t cDrmPlane::m_crtcY
private

CRTC_Y.

Definition at line 82 of file drmplane.h.

Referenced by GetCrtcY(), and SetParams().

◆ m_fbId

uint64_t cDrmPlane::m_fbId
private

FB_ID.

Definition at line 80 of file drmplane.h.

Referenced by GetFbId(), and SetParams().

◆ m_planeId

uint32_t cDrmPlane::m_planeId
private

the plane's ID

Definition at line 72 of file drmplane.h.

Referenced by cDrmPlane(), GetId(), and SetId().

◆ m_props

drmModeObjectProperties* cDrmPlane::m_props
private

Definition at line 75 of file drmplane.h.

Referenced by FillProperties(), FreeProperties(), GetCountProps(), GetProps(), and SetProps().

◆ m_propsInfo

drmModePropertyRes** cDrmPlane::m_propsInfo
private

◆ m_srcH

uint64_t cDrmPlane::m_srcH
private

SRC_H.

Definition at line 88 of file drmplane.h.

Referenced by GetSrcH(), and SetParams().

◆ m_srcW

uint64_t cDrmPlane::m_srcW
private

SRC_W.

Definition at line 87 of file drmplane.h.

Referenced by GetSrcW(), and SetParams().

◆ m_srcX

uint64_t cDrmPlane::m_srcX
private

SRC_X.

Definition at line 85 of file drmplane.h.

Referenced by GetSrcX(), and SetParams().

◆ m_srcY

uint64_t cDrmPlane::m_srcY
private

SRC_Y.

Definition at line 86 of file drmplane.h.

Referenced by GetSrcY(), and SetParams().

◆ m_type

uint64_t cDrmPlane::m_type
private

type: DRM_PLANE_TYPE_PRIMARY or DRM_PLANE_TYPE_OVERLAY

Definition at line 73 of file drmplane.h.

Referenced by GetType(), and SetType().

◆ m_zpos

uint64_t cDrmPlane::m_zpos
private

ZPOS.

Definition at line 89 of file drmplane.h.

Referenced by cDrmPlane(), GetZpos(), and SetZpos().


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