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

#include <mythdisplayrpi.h>

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

Public Member Functions

 MythDisplayRPI ()
 
 ~MythDisplayRPI () override
 
void UpdateCurrentMode (void) override
 Retrieve screen details. More...
 
bool VideoModesAvailable (void) override
 
bool UsingVideoModes (void) override
 
bool SwitchToVideoMode (QSize Size, double Framerate) override
 
const MythDisplayModesGetVideoModes (void) override
 
void Callback (uint32_t Reason, uint32_t, uint32_t)
 
- Public Member Functions inherited from MythDisplay
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...
 
MythEDIDGetEDID ()
 
MythDisplayRates GetRefreshRates (QSize Size)
 
MythHDRPtr GetHDRState ()
 

Private Member Functions

void GetEDID (void)
 

Private Attributes

QMutex m_modeChangeLock { }
 
QWaitCondition m_modeChangeWait { }
 
VCHI_INSTANCE_T m_vchiInstance { nullptr }
 
int m_deviceId { -1 }
 
QMap< uint64_t, QPair< uint32_t, uint32_t > > m_modeMap { }
 

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 (QRect Geometry)
 
- Signals inherited from MythDisplay
void CurrentScreenChanged (QScreen *qScreen)
 
void ScreenCountChanged (int Screens)
 
void CurrentDPIChanged (qreal DPI)
 
- Static Public Member Functions inherited from MythDisplay
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 ()
 
- Protected Member Functions inherited from MythDisplay
 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 Protected Member Functions inherited from MythDisplay
static MythDisplayCreate (MythMainWindow *MainWindow)
 Create a MythDisplay object appropriate for the current platform. More...
 
static QScreen * GetDesiredScreen ()
 
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 }
 
MythDisplayModes m_videoModes
 
MythHDRPtr m_hdrState { nullptr }
 
MythVRRPtr m_vrrState { nullptr }
 

Detailed Description

MythDisplayRPI uses Broadcom specific APIs to access display information and set the current video mode. It should be used when an X11 display is not present (MythDisplayX11 will offer complete functionality) and is preferred to MythDisplayDRM - which currently has no mode switching functionality.

Note
MythDisplayRPI only supports changing the display refresh rate and not the resolution. All video modes that do not match the resolution at start up will be filtered out. This is because when X11 is not available, the APIs in use will 'undercut' Qt's display handling i.e. Qt will not be aware that the video mode has been changed and it will not create a new framebuffer of the correct size.

Definition at line 16 of file mythdisplayrpi.h.

Constructor & Destructor Documentation

◆ MythDisplayRPI()

MythDisplayRPI::MythDisplayRPI ( )

Definition at line 53 of file mythdisplayrpi.cpp.

◆ ~MythDisplayRPI()

MythDisplayRPI::~MythDisplayRPI ( )
override

Definition at line 97 of file mythdisplayrpi.cpp.

Member Function Documentation

◆ UpdateCurrentMode()

void MythDisplayRPI::UpdateCurrentMode ( void  )
overridevirtual

Retrieve screen details.

This is the final fallback when no other platform specifics are available It is usually accurate apart from the refresh rate - which is often rounded down.

Reimplemented from MythDisplay.

Definition at line 110 of file mythdisplayrpi.cpp.

◆ VideoModesAvailable()

bool MythDisplayRPI::VideoModesAvailable ( void  )
inlineoverridevirtual

Reimplemented from MythDisplay.

Definition at line 25 of file mythdisplayrpi.h.

◆ UsingVideoModes()

bool MythDisplayRPI::UsingVideoModes ( void  )
overridevirtual

Reimplemented from MythDisplay.

Definition at line 164 of file mythdisplayrpi.cpp.

◆ SwitchToVideoMode()

bool MythDisplayRPI::SwitchToVideoMode ( QSize  Size,
double  Framerate 
)
overridevirtual

Reimplemented from MythDisplay.

Definition at line 237 of file mythdisplayrpi.cpp.

◆ GetVideoModes()

const MythDisplayModes & MythDisplayRPI::GetVideoModes ( void  )
overridevirtual

Reimplemented from MythDisplay.

Definition at line 171 of file mythdisplayrpi.cpp.

◆ Callback()

void MythDisplayRPI::Callback ( uint32_t  Reason,
uint32_t  ,
uint32_t   
)

Definition at line 104 of file mythdisplayrpi.cpp.

Referenced by MythTVServiceCallback().

◆ GetEDID()

void MythDisplayRPI::GetEDID ( void  )
private

Definition at line 134 of file mythdisplayrpi.cpp.

Referenced by UpdateCurrentMode().

Member Data Documentation

◆ m_modeChangeLock

QMutex MythDisplayRPI::m_modeChangeLock { }
private

Definition at line 34 of file mythdisplayrpi.h.

Referenced by SwitchToVideoMode().

◆ m_modeChangeWait

QWaitCondition MythDisplayRPI::m_modeChangeWait { }
private

Definition at line 35 of file mythdisplayrpi.h.

Referenced by Callback(), and SwitchToVideoMode().

◆ m_vchiInstance

VCHI_INSTANCE_T MythDisplayRPI::m_vchiInstance { nullptr }
private

Definition at line 36 of file mythdisplayrpi.h.

Referenced by MythDisplayRPI(), and ~MythDisplayRPI().

◆ m_deviceId

int MythDisplayRPI::m_deviceId { -1 }
private

◆ m_modeMap

QMap<uint64_t, QPair<uint32_t, uint32_t> > MythDisplayRPI::m_modeMap { }
private

Definition at line 38 of file mythdisplayrpi.h.

Referenced by GetVideoModes(), and SwitchToVideoMode().


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