MythTV  master
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
MythDisplayX11 Class Reference

#include <mythdisplayx11.h>

Inheritance diagram for MythDisplayX11:
Inheritance graph
[legend]
Collaboration diagram for MythDisplayX11:
Collaboration graph
[legend]

Public Member Functions

 MythDisplayX11 ()
 
 ~MythDisplayX11 () override=default
 
void UpdateCurrentMode (void) override
 Retrieve details for the current video mode. More...
 
bool VideoModesAvailable (void) override
 
bool UsingVideoModes (void) override
 
const std::vector< MythDisplayMode > & GetVideoModes (void) override
 
bool SwitchToVideoMode (QSize Size, double DesiredRate) override
 
- Public Member Functions inherited from MythDisplay
QRect GetScreenBounds (void)
 
QScreen * GetCurrentScreen (void)
 Return a pointer to the screen to use. More...
 
double GetPixelAspectRatio (void)
 
QSize GetGUIResolution (void)
 
bool NextModeIsLarger (QSize Size)
 Check whether the next mode is larger in size than the current mode. More...
 
void SwitchToDesktop (void)
 Return the screen to the original desktop video mode. More...
 
bool SwitchToGUI (bool Wait=false)
 Switches to the GUI resolution. More...
 
bool SwitchToVideo (QSize Size, double Rate=0.0)
 Switches to the resolution and refresh rate defined in the database for the specified video resolution and frame rate. More...
 
QSize GetResolution (void)
 
QSize GetPhysicalSize (void)
 
double GetRefreshRate (void) const
 
int GetRefreshInterval (int Fallback) const
 
double GetAspectRatio (QString &Source, bool IgnoreModeOverride=false)
 Returns current screen aspect ratio. More...
 
double EstimateVirtualAspectRatio (void)
 Estimate the overall display aspect ratio for multi screen setups. More...
 
MythEDIDGetEDID (void)
 
std::vector< double > GetRefreshRates (QSize Size)
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter (const QString &debugName, bool logDebug=true)
 Creates reference counter with an initial value of 1. More...
 
virtual int IncrRef (void)
 Increments reference count. More...
 
virtual int DecrRef (void)
 Decrements reference count and deletes on 0. More...
 

Static Public Member Functions

static bool IsAvailable (void)
 
- Static Public Member Functions inherited from MythDisplay
static MythDisplayAcquireRelease (bool Acquire=true)
 
static QStringList GetDescription (void)
 
static void ConfigureQtGUI (int SwapInterval=1, const QString &Display=QString())
 Shared static initialistaion code for all MythTV GUI applications. More...
 
static bool SpanAllScreens (void)
 Return true if the MythTV windows should span all screens. More...
 
static QString GetExtraScreenInfo (QScreen *qScreen)
 
static int GetScreenCount (void)
 
- Static Public Member Functions inherited from ReferenceCounter
static void PrintDebug (void)
 Print out any leaks if that level of debugging is enabled. More...
 

Private Member Functions

void GetEDID (MythXDisplay *mDisplay)
 

Static Private Member Functions

static XRROutputInfo * GetOutput (XRRScreenResources *Resources, MythXDisplay *mDisplay, QScreen *qScreen, RROutput *Output=nullptr)
 

Private Attributes

QMap< uint64_t, unsigned long > m_modeMap { }
 
unsigned long m_crtc { 0 }
 

Additional Inherited Members

- Public Slots inherited from MythDisplay
virtual void ScreenChanged (QScreen *qScreen)
 The actual screen in use has changed. We must use it. More...
 
static void PrimaryScreenChanged (QScreen *qScreen)
 
void ScreenAdded (QScreen *qScreen)
 
void ScreenRemoved (QScreen *qScreen)
 
void PhysicalDPIChanged (qreal DPI)
 
static void GeometryChanged (const QRect &Geometry)
 
- Signals inherited from MythDisplay
void CurrentScreenChanged (QScreen *qScreen)
 
void ScreenCountChanged (int Screens)
 
void CurrentDPIChanged (qreal DPI)
 
- Protected Member Functions inherited from MythDisplay
 MythDisplay ()
 
 ~MythDisplay () override
 
void DebugModes (void) const
 
void SetWidget (QWidget *MainWindow)
 Set the QWidget and QWindow in use. More...
 
void Initialise (void)
 
void InitScreenBounds (void)
 Get screen size from Qt while respecting the user's multiscreen settings. More...
 
void WaitForScreenChange (void)
 
void WaitForNewScreen (void)
 
- Protected Member Functions inherited from ReferenceCounter
virtual ~ReferenceCounter (void)
 Called on destruction, will warn if object deleted with references in place. More...
 
- Static Protected Member Functions inherited from MythDisplay
static QScreen * GetDesiredScreen (void)
 
static void DebugScreen (QScreen *qScreen, const QString &Message)
 
- Protected Attributes inherited from MythDisplay
bool m_waitForModeChanges { true }
 
bool m_modeComplete { false }
 
double m_refreshRate { 0.0 }
 
double m_aspectRatioOverride { 0.0 }
 
QSize m_resolution { 0, 0 }
 
QSize m_physicalSize { 0, 0 }
 
MythEDID m_edid { }
 
QWidget * m_widget { nullptr }
 
QWindow * m_window { nullptr }
 
QScreen * m_screen { nullptr }
 
vector< MythDisplayModem_videoModes { }
 
- Protected Attributes inherited from ReferenceCounter
bool m_logDebug
 This is used to suppress creating LoggingItem classes for LoggingItem reference count changes. More...
 
QAtomicInt m_referenceCount {1}
 

Detailed Description

Definition at line 14 of file mythdisplayx11.h.

Constructor & Destructor Documentation

◆ MythDisplayX11()

MythDisplayX11::MythDisplayX11 ( )

Definition at line 12 of file mythdisplayx11.cpp.

◆ ~MythDisplayX11()

MythDisplayX11::~MythDisplayX11 ( )
overridedefault

Member Function Documentation

◆ IsAvailable()

bool MythDisplayX11::IsAvailable ( void  )
static

Definition at line 17 of file mythdisplayx11.cpp.

Referenced by MythDisplay::AcquireRelease(), and MythDisplay::ConfigureQtGUI().

◆ UpdateCurrentMode()

void MythDisplayX11::UpdateCurrentMode ( void  )
overridevirtual

Retrieve details for the current video mode.

The Qt default implementation tends to get the details correct but only uses an integer refresh rate for some backends.

The MythXDisplay methods now use the modeline to get accurate refresh, resolution and display size details regardless of the number of displays connected - but the closed source NVidia drivers do their own thing and return fictitious modelines for mutiple connected displays.

So we now use the Qt defaults and override where possible with XRANDR versions. If XRANDR is not available we try and get a more accurate refresh rate only.

Reimplemented from MythDisplay.

Definition at line 43 of file mythdisplayx11.cpp.

◆ VideoModesAvailable()

bool MythDisplayX11::VideoModesAvailable ( void  )
inlineoverridevirtual

Reimplemented from MythDisplay.

Definition at line 21 of file mythdisplayx11.h.

◆ UsingVideoModes()

bool MythDisplayX11::UsingVideoModes ( void  )
overridevirtual

Reimplemented from MythDisplay.

Definition at line 94 of file mythdisplayx11.cpp.

◆ GetVideoModes()

const std::vector< MythDisplayMode > & MythDisplayX11::GetVideoModes ( void  )
overridevirtual

Reimplemented from MythDisplay.

Definition at line 101 of file mythdisplayx11.cpp.

Referenced by SwitchToVideoMode(), and UpdateCurrentMode().

◆ SwitchToVideoMode()

bool MythDisplayX11::SwitchToVideoMode ( QSize  Size,
double  DesiredRate 
)
overridevirtual

Reimplemented from MythDisplay.

Definition at line 181 of file mythdisplayx11.cpp.

◆ GetOutput()

XRROutputInfo * MythDisplayX11::GetOutput ( XRRScreenResources *  Resources,
MythXDisplay mDisplay,
QScreen *  qScreen,
RROutput *  Output = nullptr 
)
staticprivate

Definition at line 235 of file mythdisplayx11.cpp.

Referenced by GetEDID(), GetVideoModes(), and UpdateCurrentMode().

◆ GetEDID()

void MythDisplayX11::GetEDID ( MythXDisplay mDisplay)
private

Definition at line 275 of file mythdisplayx11.cpp.

Member Data Documentation

◆ m_modeMap

QMap<uint64_t, unsigned long> MythDisplayX11::m_modeMap { }
private

Definition at line 33 of file mythdisplayx11.h.

Referenced by GetVideoModes(), and SwitchToVideoMode().

◆ m_crtc

unsigned long MythDisplayX11::m_crtc { 0 }
private

Definition at line 34 of file mythdisplayx11.h.

Referenced by GetVideoModes(), SwitchToVideoMode(), and UpdateCurrentMode().


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