1 #ifndef MYTHDRMDEVICE_H
2 #define MYTHDRMDEVICE_H
6 #if defined (USING_QTPRIVATEHEADERS)
18 using MythAtomic = std::tuple<uint32_t,uint32_t,uint64_t>;
26 static std::tuple<QString,QStringList> GetDeviceList();
27 static MythDRMPtr Create(QScreen *qScreen,
const QString&
Device = QString(),
bool NeedPlanes =
true);
30 bool Authenticated ()
const;
33 QString GetSerialNumber()
const;
34 QScreen* GetScreen ()
const;
35 QSize GetResolution ()
const;
36 QSize GetPhysicalSize()
const;
37 double GetRefreshRate ()
const;
42 bool CanSwitchModes ()
const;
43 bool SwitchMode (
int ModeIndex);
45 #if defined (USING_QTPRIVATEHEADERS)
46 static inline bool s_mythDRMVideo = qEnvironmentVariableIsSet(
"MYTHTV_DRM_VIDEO");
47 static inline bool s_planarRequested =
false;
48 static inline bool s_planarSetup =
false;
49 static inline QString s_mythDRMDevice = qEnvironmentVariable(
"MYTHTV_DRM_DEVICE");
50 static inline QString s_mythDRMConnector = qEnvironmentVariable(
"MYTHTV_DRM_CONNECTOR");
51 static inline QString s_mythDRMVideoMode = qEnvironmentVariable(
"MYTHTV_DRM_MODE");
52 static MythDRMPtr FindDevice(
bool NeedPlanes =
true);
56 bool QueueAtomics (
const MythAtomics& Atomics)
const;
57 void DisableVideoPlane();
58 void MainWindowReady ();
62 MythDRMDevice(
int Fd, uint32_t CrtcId, uint32_t ConnectorId,
bool Atomic);
65 void AnalysePlanes ();
79 QString FindBestDevice ();
80 static bool ConfirmDevice(
const QString&
Device);
82 bool m_valid {
false };
83 QScreen* m_screen {
nullptr };
85 bool m_openedDevice {
true };
87 bool m_atomic {
false };
88 bool m_authenticated {
false };
97 double m_refreshRate { 0.0 };
98 double m_adjustedRefreshRate { 0.0 };
100 LogLevel_t m_verbose { LOG_INFO };