6#include <QRegularExpression>
9#include "libmythbase/mythconfig.h"
46 QMap<QString,QString>::const_iterator it =
m_pref.find(Value);
55 return tmp.isEmpty() ? 0 : tmp.toUInt();
73 float FValue,
int IValue,
bool IsFloat,
bool *Ok)
const
78 IValue = int(FValue * 1000.0F);
79 QString cmp =
Get(Key);
82 cmp.replace(QLatin1String(
" "),QLatin1String(
""));
83 QStringList exprList = cmp.split(
"&");
84 for (
const QString& expr : std::as_const(exprList))
93 static const QRegularExpression regex(
"^([0-9.]*)([^0-9.]*)([0-9.]*)$");
94 QRegularExpressionMatch rmatch = regex.match(expr);
99 QString capture1 = rmatch.captured(1);
101 if (!capture1.isEmpty())
105 int dec=capture1.indexOf(
'.');
106 if (dec > -1 && (capture1.length()-dec) > 4)
110 double double1 = capture1.toDouble(&isOK);
111 if (double1 > 2000000.0 || double1 < 0.0)
113 value1 = int(double1 * 1000.0);
118 value1 = capture1.toInt(&isOK);
123 oper = rmatch.captured(2);
124 capture3 = rmatch.captured(3);
125 if (!capture3.isEmpty())
129 int dec=capture3.indexOf(
'.');
130 if (dec > -1 && (capture3.length()-dec) > 4)
134 double double1 = capture3.toDouble(&isOK);
135 if (double1 > 2000000.0 || double1 < 0.0)
137 value2 = int(double1 * 1000.0);
142 value2 = capture3.toInt(&isOK);
149 if (value1 == 0 && value2 == 0 && oper.isEmpty())
155 if (value1 != 0 && oper.isEmpty() && value2 == 0)
161 else if (oper ==
"-")
164 if (capture1.isEmpty() || capture3.isEmpty())
170 else if (capture1.isEmpty())
178 else if (oper ==
">")
183 else if (oper ==
">=")
188 else if (oper ==
"<")
192 else if (oper ==
"<=")
206 match = match && (IValue >= value1 && IValue <= value2);
220 const QStringList &DisallowedDecoders)
const
233 QStringList clist = cmp.split(
" ", Qt::SkipEmptyParts);
235 match &= clist.contains(CodecName,Qt::CaseInsensitive);
239 if (DisallowedDecoders.contains(decoder))
246 using result = std::tuple<bool,QString>;
249 return result {
false,
"Invalid width condition" };
251 return result {
false,
"Invalid height condition" };
253 return result {
false,
"Invalid framerate condition" };
257 if (decoder.isEmpty() || renderer.isEmpty())
258 return result {
false,
"Need a decoder and renderer" };
260 return result {
false, QString(
"decoder %1 is not available").arg(decoder) };
262 return result {
false, QString(
"renderer %1 is not supported with decoder %2") .arg(renderer, decoder) };
264 return result {
true, {}};
274 QString cmp0 =
Get(
"pref_cmp0");
275 QString cmp1 =
Get(
"pref_cmp1");
288 QString cond = QString(
"w(%1) h(%2) framerate(%3) codecs(%4)")
289 .arg(width, height, framerate, codecs);
290 QString str = QString(
"cmp(%1%2) %7 dec(%3) cpus(%4) skiploop(%5) rend(%6) ")
291 .arg(cmp0, QString(cmp1.isEmpty() ?
"" :
",") + cmp1,
292 decoder, QString::number(max_cpus), skiploop ?
"enabled" :
"disabled",
294 str += QString(
"deint(%1,%2) upscale(%3)").arg(deint0, deint1, upscale);
298#define LOC QString("VideoProfile: ")
309 std::vector<MythVideoProfileItem> items =
LoadDB(groupid);
310 for (
const auto & item : items)
312 if (
auto [valid,
error] = item.IsValid(); !valid)
314 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Rejecting: " + item.toString() +
"\n\t\t\t" +
error);
318 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"Accepting: " + item.toString());
324 const QStringList &DisallowedDecoders)
326 QMutexLocker locker(&
m_lock);
327 bool change = !DisallowedDecoders.isEmpty();
334 if (Framerate > 0.0F && !qFuzzyCompare(Framerate + 1.0F,
m_lastRate + 1.0F))
350 QMutexLocker locker(&
m_lock);
351 if (!qFuzzyCompare(Framerate + 1.0F,
m_lastRate + 1.0F))
400 QMutexLocker locker(&
m_lock);
401 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"SetVideoRenderer: '%1'").arg(VideoRenderer));
406 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"Old preferences: " +
toString());
408 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"New preferences: " +
toString());
423 QMutexLocker locker(&
m_lock);
437 QMutexLocker locker(&
m_lock);
443 (
const QSize Size,
float Framerate,
const QString &CodecName,
const QStringList& DisallowedDecoders)
446 if ((*it).IsMatch(Size, Framerate, CodecName, DisallowedDecoders))
452 const QString &CodecName,
453 const QStringList &DisallowedDecoders)
459 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"LoadBestPreferences(%1x%2, %3, %4)")
460 .arg(Size.width()).arg(Size.height())
461 .arg(
static_cast<double>(Framerate), 0,
'f', 3).arg(CodecName));
464 auto it =
FindMatch(Size, Framerate, CodecName, DisallowedDecoders);
471 int threads =
std::clamp(QThread::idealThreadCount(), 1, 4);
472 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"No useable profile. Using defaults.");
484 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"LoadBestPreferences result: "
485 "priority:%1 width:%2 height:%3 fps:%4 codecs:%5")
489 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"decoder:%1 renderer:%2 deint0:%3 deint1:%4 cpus:%5 upscale:%6")
500 if ((deint1x != olddeint1x) || (deint2x != olddeint2x))
507 std::vector<MythVideoProfileItem> list;
511 "SELECT profileid, value, data "
512 "FROM displayprofiles "
513 "WHERE profilegroupid = :GROUPID "
514 "ORDER BY profileid");
526 if (query.
value(0).toUInt() != profileid)
535 LOG(VB_PLAYBACK, LOG_NOTICE,
LOC + QString(
"Ignoring profile %1 (%2)")
536 .arg(profileid).arg(
error));
539 profileid = query.
value(0).toUInt();
541 tmp.
Set(query.
value(1).toString(), query.
value(2).toString());
551 LOG(VB_PLAYBACK, LOG_NOTICE,
LOC + QString(
"Ignoring profile %1 (%2)")
552 .arg(profileid).arg(
error));
555 std::ranges::sort(list);
563 "DELETE FROM displayprofiles "
564 "WHERE profilegroupid = :GROUPID AND "
565 " profileid = :PROFILEID");
568 for (
const auto & item : Items)
570 if (!item.GetProfileID())
574 query.
bindValue(
":PROFILEID", item.GetProfileID());
591 "UPDATE displayprofiles "
593 "WHERE profilegroupid = :GROUPID AND "
594 " profileid = :PROFILEID AND "
599 "INSERT INTO displayprofiles "
600 " ( profilegroupid, profileid, value, data) "
602 " (:GROUPID, :PROFILEID, :VALUE, :DATA) ");
606 "DELETE FROM displayprofiles "
607 "WHERE profilegroupid = :GROUPID AND "
608 " profileid = :PROFILEID AND "
612 for (
auto & item : Items)
614 QMap<QString,QString> list = item.GetAll();
615 if (list.begin() == list.end())
618 QMap<QString,QString>::const_iterator lit = list.cbegin();
620 if (!item.GetProfileID())
623 if (!query.
exec(
"SELECT MAX(profileid) FROM displayprofiles"))
631 item.SetProfileID(query.
value(0).toUInt() + 1);
634 for (; lit != list.cend(); ++lit)
636 if ((*lit).isEmpty())
640 insert.
bindValue(
":PROFILEID", item.GetProfileID());
653 for (; lit != list.cend(); ++lit)
657 "FROM displayprofiles "
658 "WHERE profilegroupid = :GROUPID AND "
659 " profileid = :PROFILEID AND "
662 query.
bindValue(
":PROFILEID", item.GetProfileID());
671 if (query.
next() && (1 == query.
value(0).toUInt()))
675 sqldelete.
bindValue(
":GROUPID", GroupId);
676 sqldelete.
bindValue(
":PROFILEID", item.GetProfileID());
677 sqldelete.
bindValue(
":VALUE", lit.key());
678 if (!sqldelete.
exec())
688 update.
bindValue(
":PROFILEID", item.GetProfileID());
702 insert.
bindValue(
":PROFILEID", item.GetProfileID());
730 [](QStringList Res,
const QString& Dec) { return Res << GetDecoderName(Dec); });
735 static std::vector<std::pair<QString,QString>> s_upscalers =
751 kDecName[
"ffmpeg"] = tr(
"Standard");
752 kDecName[
"vdpau"] = tr(
"VDPAU acceleration");
753 kDecName[
"vdpau-dec"] = tr(
"VDPAU acceleration (decode only)");
754 kDecName[
"vaapi"] = tr(
"VAAPI acceleration");
755 kDecName[
"vaapi-dec"] = tr(
"VAAPI acceleration (decode only)");
756 kDecName[
"dxva2"] = tr(
"Windows hardware acceleration");
757 kDecName[
"mediacodec"] = tr(
"Android MediaCodec acceleration");
758 kDecName[
"mediacodec-dec"] = tr(
"Android MediaCodec acceleration (decode only)");
759 kDecName[
"nvdec"] = tr(
"NVIDIA NVDEC acceleration");
760 kDecName[
"nvdec-dec"] = tr(
"NVIDIA NVDEC acceleration (decode only)");
761 kDecName[
"vtb"] = tr(
"VideoToolbox acceleration");
762 kDecName[
"vtb-dec"] = tr(
"VideoToolbox acceleration (decode only)");
763 kDecName[
"v4l2"] = tr(
"V4L2 acceleration");
764 kDecName[
"v4l2-dec"] = tr(
"V4L2 acceleration (decode only)");
765 kDecName[
"mmal"] = tr(
"MMAL acceleration");
766 kDecName[
"mmal-dec"] = tr(
"MMAL acceleration (decode only)");
767 kDecName[
"drmprime"] = tr(
"DRM PRIME acceleration");
771 QMap<QString,QString>::const_iterator it =
kDecName.constFind(
Decoder);
780 QString msg = tr(
"Processing method used to decode video.");
788 msg += tr(
"Standard will use the FFmpeg library for software decoding.");
790 if (
Decoder.startsWith(
"vdpau"))
793 "VDPAU will attempt to use the graphics hardware to "
794 "accelerate video decoding.");
797 if (
Decoder.startsWith(
"vaapi"))
800 "VAAPI will attempt to use the graphics hardware to "
801 "accelerate video decoding and playback.");
804 if (
Decoder.startsWith(
"dxva2"))
807 "DXVA2 will use the graphics hardware to "
808 "accelerate video decoding and playback. ");
811 if (
Decoder.startsWith(
"mediacodec"))
814 "Mediacodec will use Android graphics hardware to "
815 "accelerate video decoding and playback. ");
818 if (
Decoder.startsWith(
"nvdec"))
821 "Nvdec uses the NVDEC API to "
822 "accelerate video decoding and playback with NVIDIA Graphics Adapters. ");
827 "The VideoToolbox library is used to accelerate video decoding. ");
829 if (
Decoder.startsWith(
"mmal"))
831 "MMAL is used to accelerated video decoding (Raspberry Pi only). ");
834 msg +=
"Highly experimental: ";
836 if (
Decoder.startsWith(
"v4l2"))
839 "Video4Linux codecs are used to accelerate video decoding on "
840 "supported platforms. ");
846 "DRM-PRIME decoders are used to accelerate video decoding on "
847 "supported platforms. ");
852 msg += tr(
"The decoder will transfer frames back to system memory "
853 "which will significantly reduce performance but may allow "
854 "other functionality to be used (such as automatic "
855 "letterbox detection). ");
866 kRendName[
"opengl-yv12"] = tr(
"OpenGL YV12");
867 kRendName[
"opengl-hw"] = tr(
"OpenGL Hardware");
871 QString ret = Renderer;
872 QMap<QString,QString>::const_iterator it =
kRendName.constFind(Renderer);
883 query.
prepare(
"SELECT name FROM displayprofilegroups WHERE hostname = :HOST ");
892 list += query.
value(0).toString();
901 tmp = (profiles.contains(tmp)) ? tmp : QString();
905 if (!profiles.empty())
908 tmp = (profiles.contains(
"Normal")) ?
"Normal" : tmp;
922 const QString &HostName)
926 "SELECT profilegroupid "
927 "FROM displayprofilegroups "
928 "WHERE name = :NAME AND "
929 " hostname = :HOST ");
935 else if (query.
next())
936 return query.
value(0).toUInt();
942 const QString& Width,
const QString& Height,
const QString& Codecs,
943 const QString&
Decoder,
uint MaxCpus,
bool SkipLoop,
const QString& VideoRenderer,
944 const QString& Deint1,
const QString& Deint2,
const QString &Upscale)
950 if (!query.
exec(
"SELECT MAX(profileid) FROM displayprofiles"))
952 else if (query.
next())
953 profileid = query.
value(0).toUInt() + 1;
956 "INSERT INTO displayprofiles "
957 "VALUES (:GRPID, :PROFID, 'pref_priority', :PRIORITY)");
964 QStringList queryValue;
965 QStringList queryData;
980 queryData += QString::number(MaxCpus);
983 queryData += SkipLoop ?
"1" :
"0";
986 queryData += VideoRenderer;
995 queryData += Upscale;
997 QStringList::const_iterator itV = queryValue.cbegin();
998 QStringList::const_iterator itD = queryData.cbegin();
999 for (; itV != queryValue.cend() && itD != queryData.cend(); ++itV,++itD)
1004 "INSERT INTO displayprofiles "
1005 "VALUES (:GRPID, :PROFID, :VALUE, :DATA)");
1019 "INSERT INTO displayprofilegroups (name, hostname) "
1020 "VALUES (:NAME,:HOST)");
1041 "SELECT profilegroupid "
1042 "FROM displayprofilegroups "
1043 "WHERE name = :NAME AND "
1044 " hostname = :HOST ");
1056 while (query.
next())
1058 query2.
prepare(
"DELETE FROM displayprofiles "
1059 "WHERE profilegroupid = :PROFID");
1070 "DELETE FROM displayprofilegroups "
1071 "WHERE name = :NAME AND "
1072 " hostname = :HOST");
1091 if (!profiles.contains(
"OpenGL High Quality"))
1093 (void)tr(
"OpenGL High Quality",
1094 "Sample: OpenGL high quality");
1097 "ffmpeg", 2,
true,
"opengl-yv12",
1098 "shader:high",
"shader:high");
1101 if (!profiles.contains(
"OpenGL Normal"))
1103 (void)tr(
"OpenGL Normal",
"Sample: OpenGL medium quality");
1106 "ffmpeg", 2,
true,
"opengl-yv12",
1107 "shader:medium",
"shader:medium");
1110 if (!profiles.contains(
"OpenGL Slim"))
1112 (void)tr(
"OpenGL Slim",
"Sample: OpenGL low power GPU");
1115 "ffmpeg", 1,
true,
"opengl",
1116 "medium",
"medium");
1121 if (!profiles.contains(
"VAAPI Normal"))
1123 (void)tr(
"VAAPI Normal",
"Sample: VAAPI average quality");
1126 "vaapi", 2,
true,
"opengl-hw",
1127 "shader:driver:high",
"shader:driver:high");
1129 "ffmpeg", 2,
true,
"opengl-yv12",
1130 "shader:medium",
"shader:medium");
1135 if (!profiles.contains(
"VDPAU Normal"))
1137 (void)tr(
"VDPAU Normal",
"Sample: VDPAU medium quality");
1140 "vdpau", 1,
true,
"opengl-hw",
1141 "driver:medium",
"driver:medium");
1143 "ffmpeg", 2,
true,
"opengl-yv12",
1144 "shader:medium",
"shader:medium");
1148#if CONFIG_MEDIACODEC
1149 if (!profiles.contains(
"MediaCodec Normal"))
1151 (void)tr(
"MediaCodec Normal",
1152 "Sample: MediaCodec Normal");
1155 "mediacodec-dec", 4,
true,
"opengl-yv12",
1156 "shader:driver:medium",
"shader:driver:medium");
1158 "ffmpeg", 2,
true,
"opengl-yv12",
1159 "shader:medium",
"shader:medium");
1164#if CONFIG_NVDEC && CONFIG_OPENGL
1165 if (!profiles.contains(
"NVDEC Normal"))
1167 (void)tr(
"NVDEC Normal",
"Sample: NVDEC Normal");
1170 "nvdec", 1,
true,
"opengl-hw",
1171 "shader:driver:high",
"shader:driver:high");
1173 "ffmpeg", 2,
true,
"opengl-yv12",
1174 "shader:high",
"shader:high");
1178#if CONFIG_VIDEOTOOLBOX && CONFIG_OPENGL
1179 if (!profiles.contains(
"VideoToolBox Normal")) {
1180 (void)tr(
"VideoToolBox Normal",
"Sample: VideoToolBox Normal");
1183 "vtb", 1,
true,
"opengl-hw",
1184 "shader:driver:medium",
"shader:driver:medium");
1186 "ffmpeg", 2,
true,
"opengl-yv12",
1187 "shader:medium",
"shader:medium");
1191#if CONFIG_MMAL && CONFIG_OPENGL
1192 if (!profiles.contains(
"MMAL"))
1194 (void)tr(
"MMAL",
"Sample: MMAL");
1197 "mmal", 1,
true,
"opengl-hw",
1198 "shader:driver:medium",
"shader:driver:medium");
1200 "ffmpeg", 2,
true,
"opengl-yv12",
1201 "shader:medium",
"shader:medium");
1206 if (!profiles.contains(
"V4L2 Codecs"))
1208 (void)tr(
"V4L2 Codecs",
"Sample: V4L2");
1211 "v4l2", 1,
true,
"opengl-hw",
1212 "shader:driver:medium",
"shader:driver:medium");
1214 "ffmpeg", 2,
true,
"opengl-yv12",
1215 "shader:medium",
"shader:medium");
1233 if (Renderer ==
"null")
1234 return tr(
"Render video offscreen. Used internally.");
1236 if (Renderer ==
"direct3d")
1238 return tr(
"Windows video renderer based on Direct3D. Requires "
1239 "video card compatible with Direct3D 9. This is the preferred "
1240 "renderer for current Windows systems.");
1243 if (Renderer ==
"opengl")
1245 return tr(
"Video is converted to an intermediate format by the CPU (YUV2) "
1246 "before OpenGL is used for color conversion, scaling, picture controls"
1247 " and optionally deinterlacing. Processing is balanced between the CPU "
1251 if (Renderer ==
"opengl-yv12")
1253 return tr(
"OpenGL is used for all color conversion, scaling, picture "
1254 "controls and optionally deinterlacing. CPU load is low but a slightly more "
1255 "powerful GPU is needed for deinterlacing.");
1258 if (Renderer ==
"opengl-hw")
1259 return tr(
"This video renderer is used by hardware decoders to display frames using OpenGL.");
1261 return tr(
"Video rendering method");
1272 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"Safe renderers for '%1': %2").arg(
Decoder, safe.join(
",")));
1274 QStringList filtered;
1275 for (
const auto& dec : std::as_const(safe))
1276 if (Renderers.contains(dec))
1277 filtered.push_back(dec);
1287 uint toppriority = 0;
1288 QString toprenderer;
1289 for (
const auto& renderer : std::as_const(Renderers))
1295 toprenderer = renderer;
1308 return QString(
"rend:%1 deint:%2/%3 CPUs: %4 Upscale: %5")
1309 .arg(renderer, deint0, deint1, cpus, upscale);
1314 static const QList<QPair<QString,QString> > s_deinterlacerOptions =
1322 return s_deinterlacerOptions;
1332 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Cannot initialise video profiles from this thread");
1340 LOG(VB_GENERAL, LOG_ERR,
LOC +
"No window!");
1347 LOG(VB_GENERAL, LOG_INFO,
LOC +
"Resetting decoder/render support");
1376 LOG(VB_GENERAL, LOG_INFO,
LOC + QString(
"Available GPU interops: %1")
1381 LOG(VB_GENERAL, LOG_INFO,
LOC + QString(
"Decoder/render support: %1%2")
QSqlQuery wrapper that fetches a DB connection from the connection pool.
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
QVariant value(int i) const
bool isActive(void) const
void bindValueNoNull(const QString &placeholder, const QVariant &val)
Add a single binding, taking care not to set a NULL value.
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
static void GetDecoders(RenderOptions &Opts, bool Reinit=false)
bool IsFrontend(void) const
is this process a frontend process
QString GetHostName(void)
bool SaveSettingOnHost(const QString &key, const QString &newValue, const QString &host)
QString GetSettingOnHost(const QString &key, const QString &host, const QString &defaultval="")
static void DBError(const QString &where, const MSqlQuery &query)
static QString TypesToString(const InteropMap &Types)
static InteropMap GetTypes(MythRender *Render)
MythRender * GetRenderDevice()
static void GetRenderOptions(RenderOptions &Options, MythRender *Render)
void Set(const QString &Value, const QString &Data)
bool CheckRange(const QString &Key, float Value, bool *Ok=nullptr) const
QString Get(const QString &Value) const
QMap< QString, QString > m_pref
void SetProfileID(uint Id)
QMap< QString, QString > GetAll() const
bool operator<(const MythVideoProfileItem &Other) const
bool IsMatch(QSize Size, float Framerate, const QString &CodecName, const QStringList &DisallowedDecoders=QStringList()) const
uint GetProfileID() const
void UpscalerChanged(const QString &Upscaler)
static bool kSafeInitialized
static QString GetDecoderHelp(const QString &Decoder=QString())
static QStringList GetDecoders()
static QString GetDefaultProfileName(const QString &HostName)
static void CreateProfiles(const QString &HostName)
static uint CreateProfileGroup(const QString &ProfileName, const QString &HostName)
static QMap< QString, QStringList > kSafeRendererGroup
static QRecursiveMutex kSafeLock
void SetPreference(const QString &Key, const QString &Value)
static bool DeleteDB(uint GroupId, const std::vector< MythVideoProfileItem > &Items)
static bool SaveDB(uint GroupId, std::vector< MythVideoProfileItem > &Items)
static QStringList GetFilteredRenderers(const QString &Decoder, const QStringList &Renderers)
static uint GetProfileGroupID(const QString &ProfileName, const QString &HostName)
static const QList< QPair< QString, QString > > & GetDeinterlacers()
static QString GetBestVideoRenderer(const QStringList &Renderers)
static std::vector< std::pair< QString, QString > > GetUpscalers()
static void SetDefaultProfileName(const QString &ProfileName, const QString &HostName)
static void CreateProfile(uint GroupId, uint Priority, const QString &Width, const QString &Height, const QString &Codecs, const QString &Decoder, uint MaxCpus, bool SkipLoop, const QString &VideoRenderer, const QString &Deint1, const QString &Deint2, const QString &Upscale=UPSCALE_DEFAULT)
static void InitStatics(bool Reinit=false)
void SetVideoRenderer(const QString &VideoRenderer)
void SetOutput(float Framerate)
void SetInput(QSize Size, float Framerate=0, const QString &CodecName=QString(), const QStringList &DisallowedDecoders=QStringList())
static QString GetPreferredVideoRenderer(const QString &Decoder)
QString GetPreference(const QString &Key) const
QMap< QString, QString > m_currentPreferences
static QStringList kSafeCustom
static QStringList GetProfiles(const QString &HostName)
static QMap< QString, QStringList > kSafeEquivDec
std::vector< MythVideoProfileItem >::const_iterator FindMatch(QSize Size, float Framerate, const QString &CodecName, const QStringList &DisallowedDecoders=QStringList())
static std::vector< MythVideoProfileItem > LoadDB(uint GroupId)
QString GetUpscaler() const
QString GetVideoRenderer() const
QString GetDoubleRatePreferences() const
static QMap< QString, QString > kDecName
static QStringList GetDecoderNames()
static bool DeleteProfileGroup(const QString &GroupName, const QString &HostName)
static QStringList kSafeDecoders
static QMap< QString, uint > kSafeRendererPriority
static QString GetVideoRendererName(const QString &Renderer)
QString GetDecoder() const
QString GetSingleRatePreferences() const
void DeinterlacersChanged(const QString &Single, const QString &Double)
static QStringList GetVideoRenderers(const QString &Decoder)
std::vector< MythVideoProfileItem > m_allowedPreferences
bool IsDecoderCompatible(const QString &Decoder) const
bool IsSkipLoopEnabled() const
static QString GetVideoRendererHelp(const QString &Renderer)
static QString GetDecoderName(const QString &Decoder)
void LoadBestPreferences(QSize Size, float Framerate, const QString &CodecName, const QStringList &DisallowedDecoders=QStringList())
static QMap< QString, QStringList > kSafeRenderer
static QMap< QString, QString > kRendName
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
bool HasMythMainWindow(void)
MythMainWindow * GetMythMainWindow(void)
static constexpr const char * PREF_DEC
static constexpr const char * PREF_DEINT1X
static constexpr const char * DEINT_QUALITY_MEDIUM
static constexpr const char * DEINT_QUALITY_HIGH
static constexpr const char * PREF_LOOP
static constexpr const char * DEINT_QUALITY_LOW
static constexpr const char * PREF_PRIORITY
static constexpr const char * PREF_UPSCALE
static constexpr const char * COND_RATE
static constexpr const char * COND_CODECS
static constexpr const char * PREF_CPUS
static constexpr const char * DEINT_QUALITY_NONE
static constexpr const char * COND_HEIGHT
static constexpr const char * PREF_RENDER
static constexpr const char * PREF_DEINT2X
static constexpr uint VIDEO_MAX_CPUS
static constexpr const char * UPSCALE_DEFAULT
static constexpr const char * COND_WIDTH
static constexpr const char * UPSCALE_HQ1
static eu8 clamp(eu8 value, eu8 low, eu8 high)