Go to the documentation of this file.
6 #include <QRegularExpression>
45 QMap<QString,QString>::const_iterator it =
m_pref.find(Value);
54 return tmp.isEmpty() ? 0 :
tmp.toUInt();
72 float FValue,
int IValue,
bool IsFloat,
bool *Ok)
const
77 IValue = int(FValue * 1000.0F);
78 QString cmp =
Get(Key);
81 cmp.replace(QLatin1String(
" "),QLatin1String(
""));
82 QStringList exprList = cmp.split(
"&");
83 for (
const QString& expr : std::as_const(exprList))
92 static const QRegularExpression regex(
"^([0-9.]*)([^0-9.]*)([0-9.]*)$");
93 QRegularExpressionMatch rmatch = regex.match(expr);
98 QString capture1 = rmatch.captured(1);
100 if (!capture1.isEmpty())
104 int dec=capture1.indexOf(
'.');
105 if (dec > -1 && (capture1.length()-dec) > 4)
109 double double1 = capture1.toDouble(&isOK);
110 if (double1 > 2000000.0 || double1 < 0.0)
112 value1 = int(double1 * 1000.0);
117 value1 = capture1.toInt(&isOK);
122 oper = rmatch.captured(2);
123 capture3 = rmatch.captured(3);
124 if (!capture3.isEmpty())
128 int dec=capture3.indexOf(
'.');
129 if (dec > -1 && (capture3.length()-dec) > 4)
133 double double1 = capture3.toDouble(&isOK);
134 if (double1 > 2000000.0 || double1 < 0.0)
136 value2 = int(double1 * 1000.0);
141 value2 = capture3.toInt(&isOK);
148 if (value1 == 0 && value2 == 0 && oper.isEmpty())
154 if (value1 != 0 && oper.isEmpty() && value2 == 0)
160 else if (oper ==
"-")
163 if (capture1.isEmpty() || capture3.isEmpty())
169 else if (capture1.isEmpty())
175 else if (oper ==
">")
180 else if (oper ==
">=")
185 else if (oper ==
"<")
189 else if (oper ==
"<=")
203 match = match && (IValue >= value1 && IValue <= value2);
217 const QStringList &DisallowedDecoders)
const
230 QStringList clist = cmp.split(
" ", Qt::SkipEmptyParts);
232 match &= clist.contains(CodecName,Qt::CaseInsensitive);
236 if (DisallowedDecoders.contains(decoder))
243 using result = std::tuple<bool,QString>;
246 return result {
false,
"Invalid width condition" };
248 return result {
false,
"Invalid height condition" };
250 return result {
false,
"Invalid framerate condition" };
254 if (decoder.isEmpty() || renderer.isEmpty())
255 return result {
false,
"Need a decoder and renderer" };
257 return result {
false, QString(
"decoder %1 is not available").arg(decoder) };
259 return result {
false, QString(
"renderer %1 is not supported with decoder %2") .arg(renderer, decoder) };
261 return result {
true, {}};
271 QString cmp0 =
Get(
"pref_cmp0");
272 QString cmp1 =
Get(
"pref_cmp1");
285 QString cond = QString(
"w(%1) h(%2) framerate(%3) codecs(%4)")
286 .arg(width, height, framerate, codecs);
287 QString str = QString(
"cmp(%1%2) %7 dec(%3) cpus(%4) skiploop(%5) rend(%6) ")
288 .arg(cmp0, QString(cmp1.isEmpty() ?
"" :
",") + cmp1,
289 decoder, QString::number(max_cpus), (skiploop) ?
"enabled" :
"disabled",
291 str += QString(
"deint(%1,%2) upscale(%3)").arg(deint0, deint1, upscale);
295 #define LOC QString("VideoProfile: ")
306 std::vector<MythVideoProfileItem> items =
LoadDB(groupid);
307 for (
const auto & item : items)
309 if (
auto [valid,
error] = item.IsValid(); !valid)
311 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Rejecting: " + item.toString() +
"\n\t\t\t" +
error);
315 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"Accepting: " + item.toString());
321 const QStringList &DisallowedDecoders)
323 QMutexLocker locker(&
m_lock);
324 bool change = !DisallowedDecoders.isEmpty();
331 if (Framerate > 0.0F && !qFuzzyCompare(Framerate + 1.0F,
m_lastRate + 1.0F))
347 QMutexLocker locker(&
m_lock);
348 if (!qFuzzyCompare(Framerate + 1.0F,
m_lastRate + 1.0F))
397 QMutexLocker locker(&
m_lock);
398 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"SetVideoRenderer: '%1'").arg(VideoRenderer));
403 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"Old preferences: " +
toString());
405 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"New preferences: " +
toString());
420 QMutexLocker locker(&
m_lock);
434 QMutexLocker locker(&
m_lock);
440 (
const QSize Size,
float Framerate,
const QString &CodecName,
const QStringList& DisallowedDecoders)
442 for (
auto it = m_allowedPreferences.cbegin(); it != m_allowedPreferences.cend(); ++it)
443 if ((*it).IsMatch(Size, Framerate, CodecName, DisallowedDecoders))
445 return m_allowedPreferences.end();
449 const QString &CodecName,
450 const QStringList &DisallowedDecoders)
456 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"LoadBestPreferences(%1x%2, %3, %4)")
457 .arg(Size.width()).arg(Size.height())
458 .arg(
static_cast<double>(Framerate), 0,
'f', 3).arg(CodecName));
461 auto it =
FindMatch(Size, Framerate, CodecName, DisallowedDecoders);
468 int threads =
std::clamp(QThread::idealThreadCount(), 1, 4);
469 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"No useable profile. Using defaults.");
481 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"LoadBestPreferences result: "
482 "priority:%1 width:%2 height:%3 fps:%4 codecs:%5")
486 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"decoder:%1 renderer:%2 deint0:%3 deint1:%4 cpus:%5 upscale:%6")
497 if ((deint1x != olddeint1x) || (deint2x != olddeint2x))
504 std::vector<MythVideoProfileItem> list;
508 "SELECT profileid, value, data "
509 "FROM displayprofiles "
510 "WHERE profilegroupid = :GROUPID "
511 "ORDER BY profileid");
523 if (query.
value(0).toUInt() != profileid)
527 tmp.SetProfileID(profileid);
528 auto [valid,
error] =
tmp.IsValid();
532 LOG(VB_PLAYBACK, LOG_NOTICE,
LOC + QString(
"Ignoring profile %1 (%2)")
533 .arg(profileid).arg(
error));
536 profileid = query.
value(0).toUInt();
538 tmp.Set(query.
value(1).toString(), query.
value(2).toString());
543 tmp.SetProfileID(profileid);
544 auto [valid,
error] =
tmp.IsValid();
548 LOG(VB_PLAYBACK, LOG_NOTICE,
LOC + QString(
"Ignoring profile %1 (%2)")
549 .arg(profileid).arg(
error));
552 sort(list.begin(), list.end());
560 "DELETE FROM displayprofiles "
561 "WHERE profilegroupid = :GROUPID AND "
562 " profileid = :PROFILEID");
565 for (
const auto & item : Items)
567 if (!item.GetProfileID())
571 query.
bindValue(
":PROFILEID", item.GetProfileID());
588 "UPDATE displayprofiles "
590 "WHERE profilegroupid = :GROUPID AND "
591 " profileid = :PROFILEID AND "
596 "INSERT INTO displayprofiles "
597 " ( profilegroupid, profileid, value, data) "
599 " (:GROUPID, :PROFILEID, :VALUE, :DATA) ");
603 "DELETE FROM displayprofiles "
604 "WHERE profilegroupid = :GROUPID AND "
605 " profileid = :PROFILEID AND "
609 for (
auto & item : Items)
611 QMap<QString,QString> list = item.GetAll();
612 if (list.begin() == list.end())
615 QMap<QString,QString>::const_iterator lit = list.cbegin();
617 if (!item.GetProfileID())
620 if (!query.
exec(
"SELECT MAX(profileid) FROM displayprofiles"))
628 item.SetProfileID(query.
value(0).toUInt() + 1);
631 for (; lit != list.cend(); ++lit)
633 if ((*lit).isEmpty())
637 insert.
bindValue(
":PROFILEID", item.GetProfileID());
650 for (; lit != list.cend(); ++lit)
654 "FROM displayprofiles "
655 "WHERE profilegroupid = :GROUPID AND "
656 " profileid = :PROFILEID AND "
659 query.
bindValue(
":PROFILEID", item.GetProfileID());
668 if (query.
next() && (1 == query.
value(0).toUInt()))
672 sqldelete.
bindValue(
":GROUPID", GroupId);
673 sqldelete.
bindValue(
":PROFILEID", item.GetProfileID());
674 sqldelete.
bindValue(
":VALUE", lit.key());
675 if (!sqldelete.
exec())
685 update.
bindValue(
":PROFILEID", item.GetProfileID());
699 insert.
bindValue(
":PROFILEID", item.GetProfileID());
727 [](QStringList Res,
const QString& Dec) { return Res << GetDecoderName(Dec); });
732 static std::vector<std::pair<QString,QString>> s_upscalers =
748 kDecName[
"ffmpeg"] = tr(
"Standard");
749 kDecName[
"vdpau"] = tr(
"VDPAU acceleration");
750 kDecName[
"vdpau-dec"] = tr(
"VDPAU acceleration (decode only)");
751 kDecName[
"vaapi"] = tr(
"VAAPI acceleration");
752 kDecName[
"vaapi-dec"] = tr(
"VAAPI acceleration (decode only)");
753 kDecName[
"dxva2"] = tr(
"Windows hardware acceleration");
754 kDecName[
"mediacodec"] = tr(
"Android MediaCodec acceleration");
755 kDecName[
"mediacodec-dec"] = tr(
"Android MediaCodec acceleration (decode only)");
756 kDecName[
"nvdec"] = tr(
"NVIDIA NVDEC acceleration");
757 kDecName[
"nvdec-dec"] = tr(
"NVIDIA NVDEC acceleration (decode only)");
758 kDecName[
"vtb"] = tr(
"VideoToolbox acceleration");
759 kDecName[
"vtb-dec"] = tr(
"VideoToolbox acceleration (decode only)");
760 kDecName[
"v4l2"] = tr(
"V4L2 acceleration");
761 kDecName[
"v4l2-dec"] = tr(
"V4L2 acceleration (decode only)");
762 kDecName[
"mmal"] = tr(
"MMAL acceleration");
763 kDecName[
"mmal-dec"] = tr(
"MMAL acceleration (decode only)");
764 kDecName[
"drmprime"] = tr(
"DRM PRIME acceleration");
768 QMap<QString,QString>::const_iterator it =
kDecName.constFind(
Decoder);
777 QString msg = tr(
"Processing method used to decode video.");
785 msg += tr(
"Standard will use the FFmpeg library for software decoding.");
787 if (
Decoder.startsWith(
"vdpau"))
790 "VDPAU will attempt to use the graphics hardware to "
791 "accelerate video decoding.");
794 if (
Decoder.startsWith(
"vaapi"))
797 "VAAPI will attempt to use the graphics hardware to "
798 "accelerate video decoding and playback.");
801 if (
Decoder.startsWith(
"dxva2"))
804 "DXVA2 will use the graphics hardware to "
805 "accelerate video decoding and playback. ");
808 if (
Decoder.startsWith(
"mediacodec"))
811 "Mediacodec will use Android graphics hardware to "
812 "accelerate video decoding and playback. ");
815 if (
Decoder.startsWith(
"nvdec"))
818 "Nvdec uses the NVDEC API to "
819 "accelerate video decoding and playback with NVIDIA Graphics Adapters. ");
824 "The VideoToolbox library is used to accelerate video decoding. ");
826 if (
Decoder.startsWith(
"mmal"))
828 "MMAL is used to accelerated video decoding (Raspberry Pi only). ");
831 msg +=
"Highly experimental: ";
833 if (
Decoder.startsWith(
"v4l2"))
836 "Video4Linux codecs are used to accelerate video decoding on "
837 "supported platforms. ");
843 "DRM-PRIME decoders are used to accelerate video decoding on "
844 "supported platforms. ");
849 msg += tr(
"The decoder will transfer frames back to system memory "
850 "which will significantly reduce performance but may allow "
851 "other functionality to be used (such as automatic "
852 "letterbox detection). ");
863 kRendName[
"opengl-yv12"] = tr(
"OpenGL YV12");
864 kRendName[
"opengl-hw"] = tr(
"OpenGL Hardware");
868 QString ret = Renderer;
869 QMap<QString,QString>::const_iterator it =
kRendName.constFind(Renderer);
880 query.
prepare(
"SELECT name FROM displayprofilegroups WHERE hostname = :HOST ");
889 list += query.
value(0).toString();
898 tmp = (profiles.contains(
tmp)) ?
tmp : QString();
902 if (!profiles.empty())
905 tmp = (profiles.contains(
"Normal")) ?
"Normal" :
tmp;
919 const QString &HostName)
923 "SELECT profilegroupid "
924 "FROM displayprofilegroups "
925 "WHERE name = :NAME AND "
926 " hostname = :HOST ");
932 else if (query.
next())
933 return query.
value(0).toUInt();
939 const QString& Width,
const QString& Height,
const QString& Codecs,
940 const QString&
Decoder,
uint MaxCpus,
bool SkipLoop,
const QString& VideoRenderer,
941 const QString& Deint1,
const QString& Deint2,
const QString &Upscale)
947 if (!query.
exec(
"SELECT MAX(profileid) FROM displayprofiles"))
949 else if (query.
next())
950 profileid = query.
value(0).toUInt() + 1;
953 "INSERT INTO displayprofiles "
954 "VALUES (:GRPID, :PROFID, 'pref_priority', :PRIORITY)");
961 QStringList queryValue;
962 QStringList queryData;
977 queryData += QString::number(MaxCpus);
980 queryData += (SkipLoop) ?
"1" :
"0";
983 queryData += VideoRenderer;
992 queryData += Upscale;
994 QStringList::const_iterator itV = queryValue.cbegin();
995 QStringList::const_iterator itD = queryData.cbegin();
996 for (; itV != queryValue.cend() && itD != queryData.cend(); ++itV,++itD)
1001 "INSERT INTO displayprofiles "
1002 "VALUES (:GRPID, :PROFID, :VALUE, :DATA)");
1016 "INSERT INTO displayprofilegroups (name, hostname) "
1017 "VALUES (:NAME,:HOST)");
1038 "SELECT profilegroupid "
1039 "FROM displayprofilegroups "
1040 "WHERE name = :NAME AND "
1041 " hostname = :HOST ");
1053 while (query.
next())
1055 query2.
prepare(
"DELETE FROM displayprofiles "
1056 "WHERE profilegroupid = :PROFID");
1067 "DELETE FROM displayprofilegroups "
1068 "WHERE name = :NAME AND "
1069 " hostname = :HOST");
1088 if (!profiles.contains(
"OpenGL High Quality"))
1090 (void)tr(
"OpenGL High Quality",
1091 "Sample: OpenGL high quality");
1094 "ffmpeg", 2,
true,
"opengl-yv12",
1095 "shader:high",
"shader:high");
1098 if (!profiles.contains(
"OpenGL Normal"))
1100 (void)tr(
"OpenGL Normal",
"Sample: OpenGL medium quality");
1103 "ffmpeg", 2,
true,
"opengl-yv12",
1104 "shader:medium",
"shader:medium");
1107 if (!profiles.contains(
"OpenGL Slim"))
1109 (void)tr(
"OpenGL Slim",
"Sample: OpenGL low power GPU");
1112 "ffmpeg", 1,
true,
"opengl",
1113 "medium",
"medium");
1118 if (!profiles.contains(
"VAAPI Normal"))
1120 (void)tr(
"VAAPI Normal",
"Sample: VAAPI average quality");
1123 "vaapi", 2,
true,
"opengl-hw",
1124 "shader:driver:high",
"shader:driver:high");
1126 "ffmpeg", 2,
true,
"opengl-yv12",
1127 "shader:medium",
"shader:medium");
1132 if (!profiles.contains(
"VDPAU Normal"))
1134 (void)tr(
"VDPAU Normal",
"Sample: VDPAU medium quality");
1137 "vdpau", 1,
true,
"opengl-hw",
1138 "driver:medium",
"driver:medium");
1140 "ffmpeg", 2,
true,
"opengl-yv12",
1141 "shader:medium",
"shader:medium");
1145 #ifdef USING_MEDIACODEC
1146 if (!profiles.contains(
"MediaCodec Normal"))
1148 (void)tr(
"MediaCodec Normal",
1149 "Sample: MediaCodec Normal");
1152 "mediacodec-dec", 4,
true,
"opengl-yv12",
1153 "shader:driver:medium",
"shader:driver:medium");
1155 "ffmpeg", 2,
true,
"opengl-yv12",
1156 "shader:medium",
"shader:medium");
1161 #if defined(USING_NVDEC) && defined(USING_OPENGL)
1162 if (!profiles.contains(
"NVDEC Normal"))
1164 (void)tr(
"NVDEC Normal",
"Sample: NVDEC Normal");
1167 "nvdec", 1,
true,
"opengl-hw",
1168 "shader:driver:high",
"shader:driver:high");
1170 "ffmpeg", 2,
true,
"opengl-yv12",
1171 "shader:high",
"shader:high");
1175 #if defined(USING_VTB) && defined(USING_OPENGL)
1176 if (!profiles.contains(
"VideoToolBox Normal")) {
1177 (void)tr(
"VideoToolBox Normal",
"Sample: VideoToolBox Normal");
1180 "vtb", 1,
true,
"opengl-hw",
1181 "shader:driver:medium",
"shader:driver:medium");
1183 "ffmpeg", 2,
true,
"opengl-yv12",
1184 "shader:medium",
"shader:medium");
1188 #if defined(USING_MMAL) && defined(USING_OPENGL)
1189 if (!profiles.contains(
"MMAL"))
1191 (void)tr(
"MMAL",
"Sample: MMAL");
1194 "mmal", 1,
true,
"opengl-hw",
1195 "shader:driver:medium",
"shader:driver:medium");
1197 "ffmpeg", 2,
true,
"opengl-yv12",
1198 "shader:medium",
"shader:medium");
1202 #if defined(USING_V4L2)
1203 if (!profiles.contains(
"V4L2 Codecs"))
1205 (void)tr(
"V4L2 Codecs",
"Sample: V4L2");
1208 "v4l2", 1,
true,
"opengl-hw",
1209 "shader:driver:medium",
"shader:driver:medium");
1211 "ffmpeg", 2,
true,
"opengl-yv12",
1212 "shader:medium",
"shader:medium");
1230 if (Renderer ==
"null")
1231 return tr(
"Render video offscreen. Used internally.");
1233 if (Renderer ==
"direct3d")
1235 return tr(
"Windows video renderer based on Direct3D. Requires "
1236 "video card compatible with Direct3D 9. This is the preferred "
1237 "renderer for current Windows systems.");
1240 if (Renderer ==
"opengl")
1242 return tr(
"Video is converted to an intermediate format by the CPU (YUV2) "
1243 "before OpenGL is used for color conversion, scaling, picture controls"
1244 " and optionally deinterlacing. Processing is balanced between the CPU "
1248 if (Renderer ==
"opengl-yv12")
1250 return tr(
"OpenGL is used for all color conversion, scaling, picture "
1251 "controls and optionally deinterlacing. CPU load is low but a slightly more "
1252 "powerful GPU is needed for deinterlacing.");
1255 if (Renderer ==
"opengl-hw")
1256 return tr(
"This video renderer is used by hardware decoders to display frames using OpenGL.");
1258 return tr(
"Video rendering method");
1269 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"Safe renderers for '%1': %2").arg(
Decoder, safe.join(
",")));
1271 QStringList filtered;
1272 for (
const auto& dec : std::as_const(safe))
1273 if (Renderers.contains(dec))
1274 filtered.push_back(dec);
1284 uint toppriority = 0;
1285 QString toprenderer;
1286 for (
const auto& renderer : std::as_const(Renderers))
1292 toprenderer = renderer;
1305 return QString(
"rend:%1 deint:%2/%3 CPUs: %4 Upscale: %5")
1306 .arg(renderer, deint0, deint1, cpus, upscale);
1311 static const QList<QPair<QString,QString> > s_deinterlacerOptions =
1319 return s_deinterlacerOptions;
1329 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Cannot initialise video profiles from this thread");
1335 LOG(VB_GENERAL, LOG_ERR,
LOC +
"No window!");
1341 LOG(VB_GENERAL, LOG_INFO,
LOC +
"Resetting decoder/render support");
1370 LOG(VB_GENERAL, LOG_INFO,
LOC + QString(
"Available GPU interops: %1")
1375 LOG(VB_GENERAL, LOG_INFO,
LOC + QString(
"Decoder/render support: %1%2")
static QStringList kSafeDecoders
bool isActive(void) const
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
QSqlQuery wrapper that fetches a DB connection from the connection pool.
static void InitStatics(bool Reinit=false)
QMap< QString, QString > GetAll() const
void SetVideoRenderer(const QString &VideoRenderer)
static QMap< QString, QStringList > kSafeEquivDec
void bindValueNoNull(const QString &placeholder, const QVariant &val)
Add a single binding, taking care not to set a NULL value.
static QMap< QString, QString > kDecName
static constexpr const char * PREF_PRIORITY
static void error(const char *str,...)
static uint GetProfileGroupID(const QString &ProfileName, const QString &HostName)
static bool SaveDB(uint GroupId, std::vector< MythVideoProfileItem > &Items)
static void CreateProfiles(const QString &HostName)
static const QList< QPair< QString, QString > > & GetDeinterlacers()
static uint CreateProfileGroup(const QString &ProfileName, const QString &HostName)
static constexpr const char * PREF_LOOP
static bool DeleteProfileGroup(const QString &GroupName, const QString &HostName)
bool IsDecoderCompatible(const QString &Decoder) const
static constexpr const char * DEINT_QUALITY_MEDIUM
static std::vector< MythVideoProfileItem > LoadDB(uint GroupId)
static QString GetVideoRendererHelp(const QString &Renderer)
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 constexpr const char * DEINT_QUALITY_HIGH
bool operator<(const MythVideoProfileItem &Other) const
QVariant value(int i) const
static QStringList GetVideoRenderers(const QString &Decoder)
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
static std::vector< std::pair< QString, QString > > GetUpscalers()
static constexpr const char * COND_RATE
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
static QString GetVideoRendererName(const QString &Renderer)
MythRender * GetRenderDevice()
static QString GetBestVideoRenderer(const QStringList &Renderers)
static constexpr const char * PREF_DEINT2X
bool HasMythMainWindow(void)
static QMap< QString, uint > kSafeRendererPriority
static constexpr const char * COND_WIDTH
static QString TypesToString(const InteropMap &Types)
QString GetDoubleRatePreferences() const
static QStringList GetProfiles(const QString &HostName)
static QStringList kSafeCustom
QString GetPreference(const QString &Key) const
void SetPreference(const QString &Key, const QString &Value)
void SetProfileID(uint Id)
std::vector< MythVideoProfileItem >::const_iterator FindMatch(QSize Size, float Framerate, const QString &CodecName, const QStringList &DisallowedDecoders=QStringList())
void LoadBestPreferences(QSize Size, float Framerate, const QString &CodecName, const QStringList &DisallowedDecoders=QStringList())
std::vector< MythVideoProfileItem > m_allowedPreferences
static constexpr const char * UPSCALE_HQ1
QString GetDecoder() const
QString GetSingleRatePreferences() const
QMap< QString, QString > m_pref
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
static constexpr const char * PREF_RENDER
static void DBError(const QString &where, const MSqlQuery &query)
QString GetVideoRenderer() const
static constexpr const char * COND_HEIGHT
static QMap< QString, QStringList > kSafeRendererGroup
QMap< QString, QString > m_currentPreferences
QString GetUpscaler() const
static QStringList GetDecoders()
static constexpr const char * COND_CODECS
static QMap< QString, QString > kRendName
static QRecursiveMutex kSafeLock
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
static constexpr uint VIDEO_MAX_CPUS
static void SetDefaultProfileName(const QString &ProfileName, const QString &HostName)
static eu8 clamp(eu8 value, eu8 low, eu8 high)
static QStringList GetDecoderNames()
static constexpr const char * DEINT_QUALITY_LOW
void Set(const QString &Value, const QString &Data)
static constexpr const char * UPSCALE_DEFAULT
QString Get(const QString &Value) const
static constexpr const char * PREF_DEINT1X
static QString GetDecoderName(const QString &Decoder)
void SetInput(QSize Size, float Framerate=0, const QString &CodecName=QString(), const QStringList &DisallowedDecoders=QStringList())
static bool DeleteDB(uint GroupId, const std::vector< MythVideoProfileItem > &Items)
uint GetProfileID() const
QString GetSettingOnHost(const QString &key, const QString &host, const QString &defaultval="")
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
static constexpr const char * DEINT_QUALITY_NONE
static constexpr const char * PREF_DEC
static QString GetDefaultProfileName(const QString &HostName)
static InteropMap GetTypes(MythRender *Render)
MythMainWindow * GetMythMainWindow(void)
static constexpr const char * PREF_CPUS
static constexpr const char * PREF_UPSCALE
QString GetHostName(void)
static QString GetDecoderHelp(const QString &Decoder=QString())
void DeinterlacersChanged(const QString &Single, const QString &Double)
static void GetRenderOptions(RenderOptions &Options, MythRender *Render)
void UpscalerChanged(const QString &Upscaler)
static void GetDecoders(RenderOptions &Opts, bool Reinit=false)
bool IsSkipLoopEnabled() const
static bool kSafeInitialized
bool SaveSettingOnHost(const QString &key, const QString &newValue, const QString &host)
bool CheckRange(const QString &Key, float Value, bool *Ok=nullptr) const
void SetOutput(float Framerate)
static QMap< QString, QStringList > kSafeRenderer
static QStringList GetFilteredRenderers(const QString &Decoder, const QStringList &Renderers)
static QString GetPreferredVideoRenderer(const QString &Decoder)
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
bool IsMatch(QSize Size, float Framerate, const QString &CodecName, const QStringList &DisallowedDecoders=QStringList()) const