MythTV
master
|
#include <mythdisplayx11.h>
Public Member Functions | |
MythDisplayX11 () | |
~MythDisplayX11 () override=default | |
void | UpdateCurrentMode () override |
Retrieve details for the current video mode. More... | |
bool | VideoModesAvailable () override |
bool | UsingVideoModes () override |
bool | SwitchToVideoMode (QSize Size, double DesiredRate) override |
const MythDisplayModes & | GetVideoModes () override |
![]() | |
virtual bool | IsPlanar () |
QStringList | GetDescription () |
QRect | GetScreenBounds () |
QScreen * | GetCurrentScreen () |
Return a pointer to the screen to use. More... | |
double | GetPixelAspectRatio () |
QSize | GetGUIResolution () |
bool | NextModeIsLarger (QSize Size) |
Check whether the next mode is larger in size than the current mode. More... | |
void | SwitchToDesktop () |
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 () |
QSize | GetPhysicalSize () |
double | GetRefreshRate () const |
std::chrono::microseconds | GetRefreshInterval (std::chrono::microseconds Fallback) const |
double | GetAspectRatio (QString &Source, bool IgnoreModeOverride=false) |
Returns current screen aspect ratio. More... | |
double | EstimateVirtualAspectRatio () |
Estimate the overall display aspect ratio for multi screen setups. More... | |
MythEDID & | GetEDID () |
MythDisplayRates | GetRefreshRates (QSize Size) |
MythHDRPtr | GetHDRState () |
Static Public Member Functions | |
static bool | IsAvailable () |
![]() | |
static void | ConfigureQtGUI (int SwapInterval, const MythCommandLineParser &CmdLine) |
Shared static initialisation code for all MythTV GUI applications. More... | |
static bool | SpanAllScreens () |
Return true if the MythTV windows should span all screens. More... | |
static QString | GetExtraScreenInfo (QScreen *qScreen) |
static int | GetScreenCount () |
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 | |
![]() | |
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 (QRect Geometry) |
![]() | |
void | CurrentScreenChanged (QScreen *qScreen) |
void | ScreenCountChanged (int Screens) |
void | CurrentDPIChanged (qreal DPI) |
![]() | |
MythDisplay () | |
~MythDisplay () override | |
void | DebugModes () const |
void | SetWidget (QWidget *MainWindow) |
Set the QWidget and QWindow in use. More... | |
void | Initialise () |
void | InitScreenBounds () |
Get screen size from Qt while respecting the user's multiscreen settings. More... | |
void | WaitForScreenChange () |
void | WaitForNewScreen () |
void | InitHDR () |
![]() | |
static MythDisplay * | Create (MythMainWindow *MainWindow) |
Create a MythDisplay object appropriate for the current platform. More... | |
static QScreen * | GetDesiredScreen () |
static void | DebugScreen (QScreen *qScreen, const QString &Message) |
![]() | |
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 } |
MythDisplayModes | m_videoModes { } |
MythHDRPtr | m_hdrState { nullptr } |
MythVRRPtr | m_vrrState { nullptr } |
Definition at line 16 of file mythdisplayx11.h.
MythDisplayX11::MythDisplayX11 | ( | ) |
Definition at line 11 of file mythdisplayx11.cpp.
|
overridedefault |
|
static |
Definition at line 16 of file mythdisplayx11.cpp.
Referenced by MythDisplay::ConfigureQtGUI(), and MythDisplay::Create().
|
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 42 of file mythdisplayx11.cpp.
|
inlineoverridevirtual |
Reimplemented from MythDisplay.
Definition at line 24 of file mythdisplayx11.h.
|
overridevirtual |
Reimplemented from MythDisplay.
Definition at line 93 of file mythdisplayx11.cpp.
|
overridevirtual |
Reimplemented from MythDisplay.
Definition at line 177 of file mythdisplayx11.cpp.
|
overridevirtual |
Reimplemented from MythDisplay.
Definition at line 100 of file mythdisplayx11.cpp.
Referenced by SwitchToVideoMode(), and UpdateCurrentMode().
|
staticprivate |
Definition at line 233 of file mythdisplayx11.cpp.
Referenced by GetEDID(), GetVideoModes(), and UpdateCurrentMode().
|
private |
Definition at line 273 of file mythdisplayx11.cpp.
|
private |
Definition at line 34 of file mythdisplayx11.h.
Referenced by GetVideoModes(), and SwitchToVideoMode().
|
private |
Definition at line 35 of file mythdisplayx11.h.
Referenced by GetVideoModes(), SwitchToVideoMode(), and UpdateCurrentMode().