MythTV master
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MythVRR Class Referenceabstract

#include <libmythui/mythvrr.h>

Inheritance diagram for MythVRR:
[legend]

Public Types

enum  VRRType : std::uint8_t { Unknown = 0 , FreeSync , GSync , GSyncCompat }
 

Public Member Functions

virtual ~MythVRR ()=default
 
virtual void SetEnabled (bool Enable=true)=0
 
QString TypeToString () const
 
bool Enabled () const
 
MythVRRRange GetRange () const
 
QString RangeDescription () const
 
bool IsControllable () const
 

Static Public Member Functions

static MythVRRPtr Create (class MythDisplay *MDisplay)
 Create a concrete implementation of MythVRR suitable for the given Display. More...
 

Protected Member Functions

 MythVRR (bool Controllable, VRRType Type, bool Enabled, MythVRRRange Range)
 

Protected Attributes

bool m_controllable { false }
 
VRRType m_type { Unknown }
 
bool m_enabled { false }
 
MythVRRRange m_range { 0, 0, false }
 

Detailed Description

MythVRR is the base class for Variable Refresh Rate support. Concrete implementations are currently provided by MythGSync (for NVidia GSync) and MythDRMVRR (for FreeSync/Adaptive-Sync)

Note
Variable refresh rate works well with the MythTV rendering code though there may be some occasional 'unusual' behaviour. For example, when video is behind audio during playback, instead of dropping frames, the player will typically display a number of frames in rapid succession to catch up and as a result it looks as if the video is fast forwarded for a fraction of a second.
Neither GSync or FreeSync can be enabled or disabled once the application window has been created. To that end, the focus of support is based on detecting the current state and adapting behaviours when VRR is enabled (e.g. we do not switch video modes purely for a change in refresh rate). To try and change the VRR mode when the MythTV application starts, use the -vrr/–vrr command line option; which tries to either enable or disable VRR before the window is created and resets VRR to the default state when the application quits. (There is no setting for this option as it must be used before we have initialised Qt and hence there is no database connection).
See also
MythGSync
MythDRMVRR

Definition at line 15 of file mythvrr.h.

Member Enumeration Documentation

◆ VRRType

enum MythVRR::VRRType : std::uint8_t
Enumerator
Unknown 
FreeSync 
GSync 
GSyncCompat 

Definition at line 18 of file mythvrr.h.

Constructor & Destructor Documentation

◆ ~MythVRR()

virtual MythVRR::~MythVRR ( )
virtualdefault

◆ MythVRR()

MythVRR::MythVRR ( bool  Controllable,
VRRType  Type,
bool  Enabled,
MythVRRRange  Range 
)
protected

Definition at line 47 of file mythvrr.cpp.

Member Function Documentation

◆ Create()

MythVRRPtr MythVRR::Create ( class MythDisplay MDisplay)
static

Create a concrete implementation of MythVRR suitable for the given Display.

Definition at line 57 of file mythvrr.cpp.

Referenced by MythDisplay::Initialise().

◆ Enabled()

bool MythVRR::Enabled ( ) const

Definition at line 107 of file mythvrr.cpp.

◆ GetRange()

MythVRRRange MythVRR::GetRange ( ) const

Definition at line 112 of file mythvrr.cpp.

◆ IsControllable()

bool MythVRR::IsControllable ( ) const

Definition at line 117 of file mythvrr.cpp.

◆ RangeDescription()

QString MythVRR::RangeDescription ( ) const

Definition at line 134 of file mythvrr.cpp.

◆ SetEnabled()

virtual void MythVRR::SetEnabled ( bool  Enable = true)
pure virtual

Implemented in MythDRMVRR, and MythGSync.

◆ TypeToString()

QString MythVRR::TypeToString ( ) const

Definition at line 122 of file mythvrr.cpp.

Member Data Documentation

◆ m_controllable

bool MythVRR::m_controllable { false }
protected

Definition at line 38 of file mythvrr.h.

Referenced by IsControllable(), and MythDRMVRR::~MythDRMVRR().

◆ m_enabled

bool MythVRR::m_enabled { false }
protected

Definition at line 40 of file mythvrr.h.

Referenced by Enabled().

◆ m_range

MythVRRRange MythVRR::m_range { 0, 0, false }
protected

Definition at line 41 of file mythvrr.h.

Referenced by GetRange(), and RangeDescription().

◆ m_type

VRRType MythVRR::m_type { Unknown }
protected

Definition at line 39 of file mythvrr.h.

Referenced by TypeToString().


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