vdr-plugin-drmdevice 2.0.0-46418f1
osdprovider.h
Go to the documentation of this file.
1// SPDX-License-Identifier: AGPL-3.0-or-later
2
14#ifndef __DRMDEVICE_OSDPROVIDER_H
15#define __DRMDEVICE_OSDPROVIDER_H
16
17#ifdef USE_GLES
18#include <memory>
19#endif
20
21#include <vdr/osd.h>
22
23#ifdef USE_GLES
24class cOglThread;
25#endif
26class cOutputDevice;
27
33class cDeviceOsdProvider:public cOsdProvider {
34public:
36 virtual ~cDeviceOsdProvider();
37
38 virtual cOsd * CreateOsd(int, int, uint);
39 virtual bool ProvidesTrueColor(void) { return true; };
40#ifdef USE_GLES
41 void RequestStopOpenGlThread(void);
42 void StopOpenGlThread(void);
43 bool LockOpenGlThread(void);
44 void UnlockOpenGlThread(void);
46 void OsdSizeChanged(void);
47#endif
48
49private:
50 cOsd *m_pOsd;
52#ifdef USE_GLES
53 std::shared_ptr<cOglThread> m_pOglThread;
54 bool StartOpenGlThread(void);
55#endif
56
57protected:
58#ifdef USE_GLES
59 virtual int StoreImageData(const cImage &Image);
60 virtual void DropImageData(int ImageHandle);
61#endif
62};
63
64#endif
Plugin OSD provider.
Definition osdprovider.h:33
virtual bool ProvidesTrueColor(void)
Definition osdprovider.h:39
virtual ~cDeviceOsdProvider()
Delete the OSD provider and stop the OpenGL thread if running.
void RequestStopOpenGlThread(void)
Initiate a stop of the OpenGL thread without waiting.
virtual void DropImageData(int ImageHandle)
Drop stored image data.
virtual int StoreImageData(const cImage &Image)
Store image data.
void StopOpenGlThread(void)
Stop the OpenGL thread and cancel it if necessary.
cOsd * m_pOsd
pointer to single OSD (currently not really used in cDeviceOsdProvider?)
Definition osdprovider.h:50
void UnlockOpenGlThread(void)
Unlock the OpenGL thread.
virtual cOsd * CreateOsd(int, int, uint)
Create a new OSD.
std::shared_ptr< cOglThread > m_pOglThread
OpenGL OSD thread.
Definition osdprovider.h:53
cOutputDevice * m_pDevice
pointer to the cOutputDevice object
Definition osdprovider.h:51
void OsdSizeChanged(void)
Stop the OpenGL thread, if the osd size changed and update the size.
const cImage * GetImageData(int ImageHandle)
Get stored image data.
bool LockOpenGlThread(void)
Lock the OpenGL thread.
bool StartOpenGlThread(void)
Start the OpenGL thread.
OpenGL Commands Processing Thread.
Definition openglosd.h:736
Output Device Implementation.
Definition device.h:72