MythTV  master
mythdisplayx11.h
Go to the documentation of this file.
1 #ifndef MYTHDISPLAYX11_H
2 #define MYTHDISPLAYX11_H
3 
4 // Qt
5 #include <QMap>
6 
7 // MythTV
8 #include "mythdisplay.h"
9 #include "mythxdisplay.h"
10 
11 // X11 - always last
12 #define pointer Xpointer // Prevent conflicts with Qt6.
13 #include <X11/extensions/Xrandr.h>
14 #undef pointer
15 
17 {
18  public:
20  ~MythDisplayX11() override = default;
21 
22  static bool IsAvailable ();
23  void UpdateCurrentMode () override;
24  bool VideoModesAvailable() override { return true; }
25  bool UsingVideoModes () override;
26  bool SwitchToVideoMode (QSize Size, double DesiredRate) override;
27  const MythDisplayModes& GetVideoModes() override;
28 
29  private:
30  static XRROutputInfo* GetOutput(XRRScreenResources* Resources, MythXDisplay* mDisplay,
31  QScreen* qScreen, RROutput* Output = nullptr);
32  void GetEDID(MythXDisplay* mDisplay);
33 
34  QMap<uint64_t, unsigned long> m_modeMap { };
35  unsigned long m_crtc { 0 };
36 };
37 
38 #endif
MythDisplayX11::m_modeMap
QMap< uint64_t, unsigned long > m_modeMap
Definition: mythdisplayx11.h:34
MythDisplayX11::UpdateCurrentMode
void UpdateCurrentMode() override
Retrieve details for the current video mode.
Definition: mythdisplayx11.cpp:42
MythDisplay::GetEDID
MythEDID & GetEDID()
Definition: mythdisplay.cpp:931
MythDisplayModes
std::vector< MythDisplayMode > MythDisplayModes
Definition: mythdisplaymode.h:18
MythDisplayX11::GetOutput
static XRROutputInfo * GetOutput(XRRScreenResources *Resources, MythXDisplay *mDisplay, QScreen *qScreen, RROutput *Output=nullptr)
Definition: mythdisplayx11.cpp:233
MythDisplayX11::SwitchToVideoMode
bool SwitchToVideoMode(QSize Size, double DesiredRate) override
Definition: mythdisplayx11.cpp:177
MythDisplayX11::IsAvailable
static bool IsAvailable()
Definition: mythdisplayx11.cpp:16
MythDisplayX11::GetVideoModes
const MythDisplayModes & GetVideoModes() override
Definition: mythdisplayx11.cpp:100
MythDisplayX11::MythDisplayX11
MythDisplayX11()
Definition: mythdisplayx11.cpp:11
mythdisplay.h
MythDisplayX11::VideoModesAvailable
bool VideoModesAvailable() override
Definition: mythdisplayx11.h:24
MythDisplayX11::UsingVideoModes
bool UsingVideoModes() override
Definition: mythdisplayx11.cpp:93
MythDisplayX11
Definition: mythdisplayx11.h:16
MythDisplayX11::m_crtc
unsigned long m_crtc
Definition: mythdisplayx11.h:35
MythDisplayX11::~MythDisplayX11
~MythDisplayX11() override=default
MythDisplay
Definition: mythdisplay.h:22
mythxdisplay.h
MythXDisplay
Definition: mythxdisplay.h:21
Resources
QList< Resource * > Resources
Definition: upnpcdsobjects.h:128