2#include "libmythbase/mythconfig.h"
19#define LOC QString("VRR: ")
47 : m_controllable(Controllable),
50 m_range(
std::move(Range))
63#if CONFIG_X11 || CONFIG_DRM
68 if (result ==
nullptr)
94 LOG(VB_GENERAL, LOG_INFO,
LOC +
"No variable refresh rate support detected");
98 LOG(VB_GENERAL, LOG_INFO,
LOC + QString(
"VRR type '%1': Enabled: %2 Controllable: %3 %4")
99 .arg(result->TypeToString()).arg(result->Enabled()).arg(result->IsControllable())
100 .arg(result->RangeDescription()));
124 case FreeSync:
return QObject::tr(
"FreeSync");
125 case GSync:
return QObject::tr(
"GSync");
126 case GSyncCompat:
return QObject::tr(
"GSync Compatible");
129 return QObject::tr(
"None");
136 return QObject::tr(
"Range: %1-%2%3")
138 .arg(std::get<2>(
m_range) ?
"" :
" (Estimated)");
static MythDRMPtr Create(QScreen *qScreen, const QString &Device=QString(), bool NeedPlanes=true)
Create a MythDRMDevice instance.
static MythVRRPtr CreateFreeSync(const MythDRMPtr &Device, MythVRRRange Range)
QScreen * GetCurrentScreen()
Return a pointer to the screen to use.
MythVRRRange GetVRRRange() const
Return the range of supported refresh rates.
static MythVRRPtr CreateGSync(MythVRRRange Range)
MythVRR(bool Controllable, VRRType Type, bool Enabled, MythVRRRange Range)
MythVRRRange GetRange() const
static MythVRRPtr Create(class MythDisplay *MDisplay)
Create a concrete implementation of MythVRR suitable for the given Display.
QString RangeDescription() const
QString TypeToString() const
bool IsControllable() const
static constexpr const char * DRM_QUIET
std::tuple< int, int, bool > MythVRRRange
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
std::shared_ptr< class MythVRR > MythVRRPtr