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())
176 else if (oper ==
">")
181 else if (oper ==
">=")
186 else if (oper ==
"<")
190 else if (oper ==
"<=")
204 match = match && (IValue >= value1 && IValue <= value2);
218 const QStringList &DisallowedDecoders)
const
231 QStringList clist = cmp.split(
" ", Qt::SkipEmptyParts);
233 match &= clist.contains(CodecName,Qt::CaseInsensitive);
237 if (DisallowedDecoders.contains(decoder))
244 using result = std::tuple<bool,QString>;
247 return result {
false,
"Invalid width condition" };
249 return result {
false,
"Invalid height condition" };
251 return result {
false,
"Invalid framerate condition" };
255 if (decoder.isEmpty() || renderer.isEmpty())
256 return result {
false,
"Need a decoder and renderer" };
258 return result {
false, QString(
"decoder %1 is not available").arg(decoder) };
260 return result {
false, QString(
"renderer %1 is not supported with decoder %2") .arg(renderer, decoder) };
262 return result {
true, {}};
272 QString cmp0 =
Get(
"pref_cmp0");
273 QString cmp1 =
Get(
"pref_cmp1");
286 QString cond = QString(
"w(%1) h(%2) framerate(%3) codecs(%4)")
287 .arg(width, height, framerate, codecs);
288 QString str = QString(
"cmp(%1%2) %7 dec(%3) cpus(%4) skiploop(%5) rend(%6) ")
289 .arg(cmp0, QString(cmp1.isEmpty() ?
"" :
",") + cmp1,
290 decoder, QString::number(max_cpus), (skiploop) ?
"enabled" :
"disabled",
292 str += QString(
"deint(%1,%2) upscale(%3)").arg(deint0, deint1, upscale);
296#define LOC QString("VideoProfile: ")
307 std::vector<MythVideoProfileItem> items =
LoadDB(groupid);
308 for (
const auto & item : items)
310 if (
auto [valid,
error] = item.IsValid(); !valid)
312 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Rejecting: " + item.toString() +
"\n\t\t\t" +
error);
316 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"Accepting: " + item.toString());
322 const QStringList &DisallowedDecoders)
324 QMutexLocker locker(&
m_lock);
325 bool change = !DisallowedDecoders.isEmpty();
332 if (Framerate > 0.0F && !qFuzzyCompare(Framerate + 1.0F,
m_lastRate + 1.0F))
348 QMutexLocker locker(&
m_lock);
349 if (!qFuzzyCompare(Framerate + 1.0F,
m_lastRate + 1.0F))
398 QMutexLocker locker(&
m_lock);
399 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"SetVideoRenderer: '%1'").arg(VideoRenderer));
404 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"Old preferences: " +
toString());
406 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"New preferences: " +
toString());
421 QMutexLocker locker(&
m_lock);
435 QMutexLocker locker(&
m_lock);
441 (
const QSize Size,
float Framerate,
const QString &CodecName,
const QStringList& DisallowedDecoders)
444 if ((*it).IsMatch(Size, Framerate, CodecName, DisallowedDecoders))
450 const QString &CodecName,
451 const QStringList &DisallowedDecoders)
457 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"LoadBestPreferences(%1x%2, %3, %4)")
458 .arg(Size.width()).arg(Size.height())
459 .arg(
static_cast<double>(Framerate), 0,
'f', 3).arg(CodecName));
462 auto it =
FindMatch(Size, Framerate, CodecName, DisallowedDecoders);
469 int threads =
std::clamp(QThread::idealThreadCount(), 1, 4);
470 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"No useable profile. Using defaults.");
482 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"LoadBestPreferences result: "
483 "priority:%1 width:%2 height:%3 fps:%4 codecs:%5")
487 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"decoder:%1 renderer:%2 deint0:%3 deint1:%4 cpus:%5 upscale:%6")
498 if ((deint1x != olddeint1x) || (deint2x != olddeint2x))
505 std::vector<MythVideoProfileItem> list;
509 "SELECT profileid, value, data "
510 "FROM displayprofiles "
511 "WHERE profilegroupid = :GROUPID "
512 "ORDER BY profileid");
524 if (query.
value(0).toUInt() != profileid)
533 LOG(VB_PLAYBACK, LOG_NOTICE,
LOC + QString(
"Ignoring profile %1 (%2)")
534 .arg(profileid).arg(
error));
537 profileid = query.
value(0).toUInt();
539 tmp.
Set(query.
value(1).toString(), query.
value(2).toString());
549 LOG(VB_PLAYBACK, LOG_NOTICE,
LOC + QString(
"Ignoring profile %1 (%2)")
550 .arg(profileid).arg(
error));
553 sort(list.begin(), list.end());
561 "DELETE FROM displayprofiles "
562 "WHERE profilegroupid = :GROUPID AND "
563 " profileid = :PROFILEID");
566 for (
const auto & item : Items)
568 if (!item.GetProfileID())
572 query.
bindValue(
":PROFILEID", item.GetProfileID());
589 "UPDATE displayprofiles "
591 "WHERE profilegroupid = :GROUPID AND "
592 " profileid = :PROFILEID AND "
597 "INSERT INTO displayprofiles "
598 " ( profilegroupid, profileid, value, data) "
600 " (:GROUPID, :PROFILEID, :VALUE, :DATA) ");
604 "DELETE FROM displayprofiles "
605 "WHERE profilegroupid = :GROUPID AND "
606 " profileid = :PROFILEID AND "
610 for (
auto & item : Items)
612 QMap<QString,QString> list = item.GetAll();
613 if (list.begin() == list.end())
616 QMap<QString,QString>::const_iterator lit = list.cbegin();
618 if (!item.GetProfileID())
621 if (!query.
exec(
"SELECT MAX(profileid) FROM displayprofiles"))
629 item.SetProfileID(query.
value(0).toUInt() + 1);
632 for (; lit != list.cend(); ++lit)
634 if ((*lit).isEmpty())
638 insert.
bindValue(
":PROFILEID", item.GetProfileID());
651 for (; lit != list.cend(); ++lit)
655 "FROM displayprofiles "
656 "WHERE profilegroupid = :GROUPID AND "
657 " profileid = :PROFILEID AND "
660 query.
bindValue(
":PROFILEID", item.GetProfileID());
669 if (query.
next() && (1 == query.
value(0).toUInt()))
673 sqldelete.
bindValue(
":GROUPID", GroupId);
674 sqldelete.
bindValue(
":PROFILEID", item.GetProfileID());
675 sqldelete.
bindValue(
":VALUE", lit.key());
676 if (!sqldelete.
exec())
686 update.
bindValue(
":PROFILEID", item.GetProfileID());
700 insert.
bindValue(
":PROFILEID", item.GetProfileID());
728 [](QStringList Res,
const QString& Dec) { return Res << GetDecoderName(Dec); });
733 static std::vector<std::pair<QString,QString>> s_upscalers =
749 kDecName[
"ffmpeg"] = tr(
"Standard");
750 kDecName[
"vdpau"] = tr(
"VDPAU acceleration");
751 kDecName[
"vdpau-dec"] = tr(
"VDPAU acceleration (decode only)");
752 kDecName[
"vaapi"] = tr(
"VAAPI acceleration");
753 kDecName[
"vaapi-dec"] = tr(
"VAAPI acceleration (decode only)");
754 kDecName[
"dxva2"] = tr(
"Windows hardware acceleration");
755 kDecName[
"mediacodec"] = tr(
"Android MediaCodec acceleration");
756 kDecName[
"mediacodec-dec"] = tr(
"Android MediaCodec acceleration (decode only)");
757 kDecName[
"nvdec"] = tr(
"NVIDIA NVDEC acceleration");
758 kDecName[
"nvdec-dec"] = tr(
"NVIDIA NVDEC acceleration (decode only)");
759 kDecName[
"vtb"] = tr(
"VideoToolbox acceleration");
760 kDecName[
"vtb-dec"] = tr(
"VideoToolbox acceleration (decode only)");
761 kDecName[
"v4l2"] = tr(
"V4L2 acceleration");
762 kDecName[
"v4l2-dec"] = tr(
"V4L2 acceleration (decode only)");
763 kDecName[
"mmal"] = tr(
"MMAL acceleration");
764 kDecName[
"mmal-dec"] = tr(
"MMAL acceleration (decode only)");
765 kDecName[
"drmprime"] = tr(
"DRM PRIME acceleration");
769 QMap<QString,QString>::const_iterator it =
kDecName.constFind(
Decoder);
778 QString msg = tr(
"Processing method used to decode video.");
786 msg += tr(
"Standard will use the FFmpeg library for software decoding.");
788 if (
Decoder.startsWith(
"vdpau"))
791 "VDPAU will attempt to use the graphics hardware to "
792 "accelerate video decoding.");
795 if (
Decoder.startsWith(
"vaapi"))
798 "VAAPI will attempt to use the graphics hardware to "
799 "accelerate video decoding and playback.");
802 if (
Decoder.startsWith(
"dxva2"))
805 "DXVA2 will use the graphics hardware to "
806 "accelerate video decoding and playback. ");
809 if (
Decoder.startsWith(
"mediacodec"))
812 "Mediacodec will use Android graphics hardware to "
813 "accelerate video decoding and playback. ");
816 if (
Decoder.startsWith(
"nvdec"))
819 "Nvdec uses the NVDEC API to "
820 "accelerate video decoding and playback with NVIDIA Graphics Adapters. ");
825 "The VideoToolbox library is used to accelerate video decoding. ");
827 if (
Decoder.startsWith(
"mmal"))
829 "MMAL is used to accelerated video decoding (Raspberry Pi only). ");
832 msg +=
"Highly experimental: ";
834 if (
Decoder.startsWith(
"v4l2"))
837 "Video4Linux codecs are used to accelerate video decoding on "
838 "supported platforms. ");
844 "DRM-PRIME decoders are used to accelerate video decoding on "
845 "supported platforms. ");
850 msg += tr(
"The decoder will transfer frames back to system memory "
851 "which will significantly reduce performance but may allow "
852 "other functionality to be used (such as automatic "
853 "letterbox detection). ");
864 kRendName[
"opengl-yv12"] = tr(
"OpenGL YV12");
865 kRendName[
"opengl-hw"] = tr(
"OpenGL Hardware");
869 QString ret = Renderer;
870 QMap<QString,QString>::const_iterator it =
kRendName.constFind(Renderer);
881 query.
prepare(
"SELECT name FROM displayprofilegroups WHERE hostname = :HOST ");
890 list += query.
value(0).toString();
899 tmp = (profiles.contains(tmp)) ? tmp : QString();
903 if (!profiles.empty())
906 tmp = (profiles.contains(
"Normal")) ?
"Normal" : tmp;
920 const QString &HostName)
924 "SELECT profilegroupid "
925 "FROM displayprofilegroups "
926 "WHERE name = :NAME AND "
927 " hostname = :HOST ");
933 else if (query.
next())
934 return query.
value(0).toUInt();
940 const QString& Width,
const QString& Height,
const QString& Codecs,
941 const QString&
Decoder,
uint MaxCpus,
bool SkipLoop,
const QString& VideoRenderer,
942 const QString& Deint1,
const QString& Deint2,
const QString &Upscale)
948 if (!query.
exec(
"SELECT MAX(profileid) FROM displayprofiles"))
950 else if (query.
next())
951 profileid = query.
value(0).toUInt() + 1;
954 "INSERT INTO displayprofiles "
955 "VALUES (:GRPID, :PROFID, 'pref_priority', :PRIORITY)");
962 QStringList queryValue;
963 QStringList queryData;
978 queryData += QString::number(MaxCpus);
981 queryData += (SkipLoop) ?
"1" :
"0";
984 queryData += VideoRenderer;
993 queryData += Upscale;
995 QStringList::const_iterator itV = queryValue.cbegin();
996 QStringList::const_iterator itD = queryData.cbegin();
997 for (; itV != queryValue.cend() && itD != queryData.cend(); ++itV,++itD)
1002 "INSERT INTO displayprofiles "
1003 "VALUES (:GRPID, :PROFID, :VALUE, :DATA)");
1017 "INSERT INTO displayprofilegroups (name, hostname) "
1018 "VALUES (:NAME,:HOST)");
1039 "SELECT profilegroupid "
1040 "FROM displayprofilegroups "
1041 "WHERE name = :NAME AND "
1042 " hostname = :HOST ");
1054 while (query.
next())
1056 query2.
prepare(
"DELETE FROM displayprofiles "
1057 "WHERE profilegroupid = :PROFID");
1068 "DELETE FROM displayprofilegroups "
1069 "WHERE name = :NAME AND "
1070 " hostname = :HOST");
1089 if (!profiles.contains(
"OpenGL High Quality"))
1091 (void)tr(
"OpenGL High Quality",
1092 "Sample: OpenGL high quality");
1095 "ffmpeg", 2,
true,
"opengl-yv12",
1096 "shader:high",
"shader:high");
1099 if (!profiles.contains(
"OpenGL Normal"))
1101 (void)tr(
"OpenGL Normal",
"Sample: OpenGL medium quality");
1104 "ffmpeg", 2,
true,
"opengl-yv12",
1105 "shader:medium",
"shader:medium");
1108 if (!profiles.contains(
"OpenGL Slim"))
1110 (void)tr(
"OpenGL Slim",
"Sample: OpenGL low power GPU");
1113 "ffmpeg", 1,
true,
"opengl",
1114 "medium",
"medium");
1119 if (!profiles.contains(
"VAAPI Normal"))
1121 (void)tr(
"VAAPI Normal",
"Sample: VAAPI average quality");
1124 "vaapi", 2,
true,
"opengl-hw",
1125 "shader:driver:high",
"shader:driver:high");
1127 "ffmpeg", 2,
true,
"opengl-yv12",
1128 "shader:medium",
"shader:medium");
1133 if (!profiles.contains(
"VDPAU Normal"))
1135 (void)tr(
"VDPAU Normal",
"Sample: VDPAU medium quality");
1138 "vdpau", 1,
true,
"opengl-hw",
1139 "driver:medium",
"driver:medium");
1141 "ffmpeg", 2,
true,
"opengl-yv12",
1142 "shader:medium",
"shader:medium");
1146#if CONFIG_MEDIACODEC
1147 if (!profiles.contains(
"MediaCodec Normal"))
1149 (void)tr(
"MediaCodec Normal",
1150 "Sample: MediaCodec Normal");
1153 "mediacodec-dec", 4,
true,
"opengl-yv12",
1154 "shader:driver:medium",
"shader:driver:medium");
1156 "ffmpeg", 2,
true,
"opengl-yv12",
1157 "shader:medium",
"shader:medium");
1162#if CONFIG_NVDEC && CONFIG_OPENGL
1163 if (!profiles.contains(
"NVDEC Normal"))
1165 (void)tr(
"NVDEC Normal",
"Sample: NVDEC Normal");
1168 "nvdec", 1,
true,
"opengl-hw",
1169 "shader:driver:high",
"shader:driver:high");
1171 "ffmpeg", 2,
true,
"opengl-yv12",
1172 "shader:high",
"shader:high");
1176#if CONFIG_VIDEOTOOLBOX && CONFIG_OPENGL
1177 if (!profiles.contains(
"VideoToolBox Normal")) {
1178 (void)tr(
"VideoToolBox Normal",
"Sample: VideoToolBox Normal");
1181 "vtb", 1,
true,
"opengl-hw",
1182 "shader:driver:medium",
"shader:driver:medium");
1184 "ffmpeg", 2,
true,
"opengl-yv12",
1185 "shader:medium",
"shader:medium");
1189#if CONFIG_MMAL && CONFIG_OPENGL
1190 if (!profiles.contains(
"MMAL"))
1192 (void)tr(
"MMAL",
"Sample: MMAL");
1195 "mmal", 1,
true,
"opengl-hw",
1196 "shader:driver:medium",
"shader:driver:medium");
1198 "ffmpeg", 2,
true,
"opengl-yv12",
1199 "shader:medium",
"shader:medium");
1204 if (!profiles.contains(
"V4L2 Codecs"))
1206 (void)tr(
"V4L2 Codecs",
"Sample: V4L2");
1209 "v4l2", 1,
true,
"opengl-hw",
1210 "shader:driver:medium",
"shader:driver:medium");
1212 "ffmpeg", 2,
true,
"opengl-yv12",
1213 "shader:medium",
"shader:medium");
1231 if (Renderer ==
"null")
1232 return tr(
"Render video offscreen. Used internally.");
1234 if (Renderer ==
"direct3d")
1236 return tr(
"Windows video renderer based on Direct3D. Requires "
1237 "video card compatible with Direct3D 9. This is the preferred "
1238 "renderer for current Windows systems.");
1241 if (Renderer ==
"opengl")
1243 return tr(
"Video is converted to an intermediate format by the CPU (YUV2) "
1244 "before OpenGL is used for color conversion, scaling, picture controls"
1245 " and optionally deinterlacing. Processing is balanced between the CPU "
1249 if (Renderer ==
"opengl-yv12")
1251 return tr(
"OpenGL is used for all color conversion, scaling, picture "
1252 "controls and optionally deinterlacing. CPU load is low but a slightly more "
1253 "powerful GPU is needed for deinterlacing.");
1256 if (Renderer ==
"opengl-hw")
1257 return tr(
"This video renderer is used by hardware decoders to display frames using OpenGL.");
1259 return tr(
"Video rendering method");
1270 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"Safe renderers for '%1': %2").arg(
Decoder, safe.join(
",")));
1272 QStringList filtered;
1273 for (
const auto& dec : std::as_const(safe))
1274 if (Renderers.contains(dec))
1275 filtered.push_back(dec);
1285 uint toppriority = 0;
1286 QString toprenderer;
1287 for (
const auto& renderer : std::as_const(Renderers))
1293 toprenderer = renderer;
1306 return QString(
"rend:%1 deint:%2/%3 CPUs: %4 Upscale: %5")
1307 .arg(renderer, deint0, deint1, cpus, upscale);
1312 static const QList<QPair<QString,QString> > s_deinterlacerOptions =
1320 return s_deinterlacerOptions;
1330 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Cannot initialise video profiles from this thread");
1338 LOG(VB_GENERAL, LOG_ERR,
LOC +
"No window!");
1345 LOG(VB_GENERAL, LOG_INFO,
LOC +
"Resetting decoder/render support");
1374 LOG(VB_GENERAL, LOG_INFO,
LOC + QString(
"Available GPU interops: %1")
1379 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)