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 #ifdef USING_XRANDR
12 #include <X11/extensions/Xrandr.h> // always last
13 #endif
14 
16 {
17  public:
19  ~MythDisplayX11() override = default;
20  static bool IsAvailable(void);
21  void UpdateCurrentMode(void) override final;
22 
23 #ifdef USING_XRANDR
24  bool VideoModesAvailable(void) override { return true; }
25  bool UsingVideoModes(void) override;
26  const std::vector<MythDisplayMode>& GetVideoModes(void) override;
27  bool SwitchToVideoMode(QSize Size, double DesiredRate) override;
28 
29  private:
30  static XRROutputInfo* GetOutput(XRRScreenResources* Resources, MythXDisplay* mDisplay,
31  QScreen* qScreen, RROutput* Output = nullptr);
32 #endif
33 
34  private:
35  void GetEDID(MythXDisplay* mDisplay);
36 
37  QMap<uint64_t, unsigned long> m_modeMap { };
38  unsigned long m_crtc { 0 };
39 };
40 
41 #endif // MYTHDISPLAYX11_H
QList< Resource * > Resources
MythEDID & GetEDID(void)
bool VideoModesAvailable(void) override
~MythDisplayX11() override=default
bool UsingVideoModes(void) override
const std::vector< MythDisplayMode > & GetVideoModes(void) override
void UpdateCurrentMode(void) override final
Retrieve details for the current video mode.
QMap< uint64_t, unsigned long > m_modeMap
static XRROutputInfo * GetOutput(XRRScreenResources *Resources, MythXDisplay *mDisplay, QScreen *qScreen, RROutput *Output=nullptr)
unsigned long m_crtc
bool SwitchToVideoMode(QSize Size, double DesiredRate) override
static bool IsAvailable(void)