vdr-plugin-drmdevice 2.0.0-46418f1
cDeviceOsdProvider Class Reference

Plugin OSD provider. More...

#include <osdprovider.h>

Public Member Functions

 cDeviceOsdProvider (cOutputDevice *)
 Create a new OSD provider.
 
virtual ~cDeviceOsdProvider ()
 Delete the OSD provider and stop the OpenGL thread if running.
 
virtual cOsd * CreateOsd (int, int, uint)
 Create a new OSD.
 
virtual bool ProvidesTrueColor (void)
 
void RequestStopOpenGlThread (void)
 Initiate a stop of the OpenGL thread without waiting.
 
void StopOpenGlThread (void)
 Stop the OpenGL thread and cancel it if necessary.
 
bool LockOpenGlThread (void)
 Lock the OpenGL thread.
 
void UnlockOpenGlThread (void)
 Unlock the OpenGL thread.
 
const cImage * GetImageData (int ImageHandle)
 Get stored image data.
 
void OsdSizeChanged (void)
 Stop the OpenGL thread, if the osd size changed and update the size.
 

Protected Member Functions

virtual int StoreImageData (const cImage &Image)
 Store image data.
 
virtual void DropImageData (int ImageHandle)
 Drop stored image data.
 

Private Member Functions

bool StartOpenGlThread (void)
 Start the OpenGL thread.
 

Private Attributes

cOsd * m_pOsd
 pointer to single OSD (currently not really used in cDeviceOsdProvider?)
 
cOutputDevice * m_pDevice
 pointer to the cOutputDevice object
 
std::shared_ptr< cOglThread > m_pOglThread
 OpenGL OSD thread.
 

Detailed Description

Plugin OSD provider.

Definition at line 33 of file osdprovider.h.

Constructor & Destructor Documentation

◆ cDeviceOsdProvider()

cDeviceOsdProvider::cDeviceOsdProvider ( cOutputDevice *  device)

Create a new OSD provider.

Definition at line 34 of file osdprovider.cpp.

References L_OSD, and LOGDEBUG2.

◆ ~cDeviceOsdProvider()

cDeviceOsdProvider::~cDeviceOsdProvider ( )
virtual

Delete the OSD provider and stop the OpenGL thread if running.

Definition at line 44 of file osdprovider.cpp.

References cOutputDevice::IsOsdProviderSet(), L_OSD, LOGDEBUG2, m_pDevice, cOutputDevice::OglOsdIsDisabled(), cOutputDevice::ResetOsdProvider(), and StopOpenGlThread().

Member Function Documentation

◆ CreateOsd()

cOsd * cDeviceOsdProvider::CreateOsd ( int  left,
int  top,
uint  level 
)
virtual

Create a new OSD.

Create either a hardware accelerated (cOglOsd), software based (cSoftOsd) or dummy OSD (if detached)

Parameters
leftx-coordinate of OSD
topy-coordinate of OSD
levellayer level of OSD

Definition at line 66 of file osdprovider.cpp.

References cOutputDevice::IsDetached(), L_OSD, LOGDEBUG, LOGDEBUG2, m_pDevice, m_pOglThread, m_pOsd, cOutputDevice::OglOsdIsDisabled(), cOutputDevice::SetDisableOglOsd(), and StartOpenGlThread().

◆ DropImageData()

void cDeviceOsdProvider::DropImageData ( int  ImageHandle)
protectedvirtual

Drop stored image data.

Definition at line 204 of file osdprovider.cpp.

References m_pOglThread, and StartOpenGlThread().

◆ GetImageData()

const cImage * cDeviceOsdProvider::GetImageData ( int  ImageHandle)

Get stored image data.

Definition at line 197 of file osdprovider.cpp.

◆ LockOpenGlThread()

bool cDeviceOsdProvider::LockOpenGlThread ( void  )

Lock the OpenGL thread.

Definition at line 162 of file osdprovider.cpp.

References L_OPENGL, LOGDEBUG2, and m_pOglThread.

Referenced by cOutputDevice::HaltOpenGlThread().

◆ OsdSizeChanged()

void cDeviceOsdProvider::OsdSizeChanged ( void  )

Stop the OpenGL thread, if the osd size changed and update the size.

Definition at line 102 of file osdprovider.cpp.

References m_pDevice, cOutputDevice::OglOsdIsDisabled(), and StopOpenGlThread().

◆ ProvidesTrueColor()

virtual bool cDeviceOsdProvider::ProvidesTrueColor ( void  )
inlinevirtual

Definition at line 39 of file osdprovider.h.

◆ RequestStopOpenGlThread()

void cDeviceOsdProvider::RequestStopOpenGlThread ( void  )

Initiate a stop of the OpenGL thread without waiting.

Definition at line 141 of file osdprovider.cpp.

References L_OPENGL, LOGDEBUG2, and m_pOglThread.

Referenced by cOutputDevice::EnterState().

◆ StartOpenGlThread()

bool cDeviceOsdProvider::StartOpenGlThread ( void  )
private

◆ StopOpenGlThread()

void cDeviceOsdProvider::StopOpenGlThread ( void  )

Stop the OpenGL thread and cancel it if necessary.

Definition at line 151 of file osdprovider.cpp.

References L_OPENGL, LOGDEBUG2, and m_pOglThread.

Referenced by cOutputDevice::EnterState(), OsdSizeChanged(), and ~cDeviceOsdProvider().

◆ StoreImageData()

int cDeviceOsdProvider::StoreImageData ( const cImage &  Image)
protectedvirtual

Store image data.

Definition at line 185 of file osdprovider.cpp.

References m_pOglThread, and StartOpenGlThread().

◆ UnlockOpenGlThread()

void cDeviceOsdProvider::UnlockOpenGlThread ( void  )

Unlock the OpenGL thread.

Definition at line 175 of file osdprovider.cpp.

References L_OPENGL, LOGDEBUG2, and m_pOglThread.

Referenced by cOutputDevice::EnterState(), and cOutputDevice::ResumeOpenGlThread().

Member Data Documentation

◆ m_pDevice

cOutputDevice* cDeviceOsdProvider::m_pDevice
private

pointer to the cOutputDevice object

Definition at line 51 of file osdprovider.h.

Referenced by CreateOsd(), OsdSizeChanged(), StartOpenGlThread(), and ~cDeviceOsdProvider().

◆ m_pOglThread

std::shared_ptr<cOglThread> cDeviceOsdProvider::m_pOglThread
private

◆ m_pOsd

cOsd* cDeviceOsdProvider::m_pOsd
private

pointer to single OSD (currently not really used in cDeviceOsdProvider?)

Definition at line 50 of file osdprovider.h.

Referenced by CreateOsd().


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