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

#include <mythvrr.h>

Inheritance diagram for MythVRR:
Inheritance graph
[legend]

Public Types

enum  VRRType { 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 *_Display)
 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 14 of file mythvrr.h.

Member Enumeration Documentation

◆ VRRType

Enumerator
Unknown 
FreeSync 
GSync 
GSyncCompat 

Definition at line 17 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 44 of file mythvrr.cpp.

Member Function Documentation

◆ Create()

MythVRRPtr MythVRR::Create ( class MythDisplay _Display)
static

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

Definition at line 54 of file mythvrr.cpp.

Referenced by MythDisplay::Initialise().

◆ SetEnabled()

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

Implemented in MythGSync, and MythDRMVRR.

◆ TypeToString()

QString MythVRR::TypeToString ( ) const

Definition at line 119 of file mythvrr.cpp.

◆ Enabled()

bool MythVRR::Enabled ( ) const

Definition at line 104 of file mythvrr.cpp.

◆ GetRange()

MythVRRRange MythVRR::GetRange ( ) const

Definition at line 109 of file mythvrr.cpp.

◆ RangeDescription()

QString MythVRR::RangeDescription ( ) const

Definition at line 131 of file mythvrr.cpp.

◆ IsControllable()

bool MythVRR::IsControllable ( ) const

Definition at line 114 of file mythvrr.cpp.

Member Data Documentation

◆ m_controllable

bool MythVRR::m_controllable { false }
protected

Definition at line 37 of file mythvrr.h.

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

◆ m_type

VRRType MythVRR::m_type { Unknown }
protected

Definition at line 38 of file mythvrr.h.

Referenced by TypeToString().

◆ m_enabled

bool MythVRR::m_enabled { false }
protected

Definition at line 39 of file mythvrr.h.

Referenced by Enabled().

◆ m_range

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

Definition at line 40 of file mythvrr.h.

Referenced by GetRange(), and RangeDescription().


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