Go to the documentation of this file.
42 QMap<QString,QString>::const_iterator it =
m_pref.find(Value);
51 return tmp.isEmpty() ? 0 :
tmp.toUInt();
69 float FValue,
int IValue,
bool IsFloat,
bool *Ok)
const
74 IValue = int(FValue * 1000.0F);
75 QString cmp =
Get(Key);
78 cmp.replace(QLatin1String(
" "),QLatin1String(
""));
79 QStringList exprList = cmp.split(
"&");
80 for (
const QString& expr : qAsConst(exprList))
89 static const QRegularExpression regex(
"^([0-9.]*)([^0-9.]*)([0-9.]*)$");
90 QRegularExpressionMatch rmatch = regex.match(expr);
95 QString capture1 = rmatch.captured(1);
97 if (!capture1.isEmpty())
101 int dec=capture1.indexOf(
'.');
102 if (dec > -1 && (capture1.length()-dec) > 4)
106 double double1 = capture1.toDouble(&isOK);
107 if (double1 > 2000000.0 || double1 < 0.0)
109 value1 = int(double1 * 1000.0);
113 value1 = capture1.toInt(&isOK);
117 oper = rmatch.captured(2);
118 capture3 = rmatch.captured(3);
119 if (!capture3.isEmpty())
123 int dec=capture3.indexOf(
'.');
124 if (dec > -1 && (capture3.length()-dec) > 4)
128 double double1 = capture3.toDouble(&isOK);
129 if (double1 > 2000000.0 || double1 < 0.0)
131 value2 = int(double1 * 1000.0);
135 value2 = capture3.toInt(&isOK);
141 if (value1 == 0 && value2 == 0 && oper.isEmpty())
147 if (value1 != 0 && oper.isEmpty() && value2 == 0)
153 else if (oper ==
"-")
156 if (capture1.isEmpty() || capture3.isEmpty())
162 else if (capture1.isEmpty())
168 else if (oper ==
">")
173 else if (oper ==
">=")
178 else if (oper ==
"<")
180 else if (oper ==
"<=")
189 match = match && (IValue >= value1 && IValue <= value2);
203 const QStringList &DisallowedDecoders)
const
216 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
217 QStringList clist = cmp.split(
" ", QString::SkipEmptyParts);
219 QStringList clist = cmp.split(
" ", Qt::SkipEmptyParts);
222 match &= clist.contains(CodecName,Qt::CaseInsensitive);
226 if (DisallowedDecoders.contains(decoder))
233 using result = std::tuple<bool,QString>;
236 return result {
false,
"Invalid width condition" };
238 return result {
false,
"Invalid height condition" };
240 return result {
false,
"Invalid framerate condition" };
244 if (decoder.isEmpty() || renderer.isEmpty())
245 return result {
false,
"Need a decoder and renderer" };
247 return result {
false, QString(
"decoder %1 is not available").arg(decoder) };
249 return result {
false, QString(
"renderer %1 is not supported with decoder %2") .arg(renderer, decoder) };
251 return result {
true, {}};
261 QString cmp0 =
Get(
"pref_cmp0");
262 QString cmp1 =
Get(
"pref_cmp1");
275 QString cond = QString(
"w(%1) h(%2) framerate(%3) codecs(%4)")
276 .arg(width, height, framerate, codecs);
277 QString str = QString(
"cmp(%1%2) %7 dec(%3) cpus(%4) skiploop(%5) rend(%6) ")
278 .arg(cmp0, QString(cmp1.isEmpty() ?
"" :
",") + cmp1,
279 decoder, QString::number(max_cpus), (skiploop) ?
"enabled" :
"disabled",
281 str += QString(
"deint(%1,%2) upscale(%3)").arg(deint0, deint1, upscale);
285 #define LOC QString("VideoProfile: ")
296 std::vector<MythVideoProfileItem> items =
LoadDB(groupid);
297 for (
const auto & item : items)
299 if (
auto [valid,
error] = item.IsValid(); !valid)
301 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Rejecting: " + item.toString() +
"\n\t\t\t" +
error);
305 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"Accepting: " + item.toString());
311 const QStringList &DisallowedDecoders)
313 QMutexLocker locker(&
m_lock);
314 bool change = !DisallowedDecoders.isEmpty();
321 if (Framerate > 0.0F && !qFuzzyCompare(Framerate + 1.0F,
m_lastRate + 1.0F))
337 QMutexLocker locker(&
m_lock);
338 if (!qFuzzyCompare(Framerate + 1.0F,
m_lastRate + 1.0F))
387 QMutexLocker locker(&
m_lock);
388 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"SetVideoRenderer: '%1'").arg(VideoRenderer));
393 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"Old preferences: " +
toString());
395 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"New preferences: " +
toString());
410 QMutexLocker locker(&
m_lock);
424 QMutexLocker locker(&
m_lock);
430 (
const QSize Size,
float Framerate,
const QString &CodecName,
const QStringList& DisallowedDecoders)
432 for (
auto it = m_allowedPreferences.cbegin(); it != m_allowedPreferences.cend(); ++it)
433 if ((*it).IsMatch(Size, Framerate, CodecName, DisallowedDecoders))
435 return m_allowedPreferences.end();
439 const QString &CodecName,
440 const QStringList &DisallowedDecoders)
446 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"LoadBestPreferences(%1x%2, %3, %4)")
447 .arg(Size.width()).arg(Size.height())
448 .arg(
static_cast<double>(Framerate), 0,
'f', 3).arg(CodecName));
451 auto it =
FindMatch(Size, Framerate, CodecName, DisallowedDecoders);
458 int threads = std::clamp(QThread::idealThreadCount(), 1, 4);
459 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"No useable profile. Using defaults.");
471 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"LoadBestPreferences result: "
472 "priority:%1 width:%2 height:%3 fps:%4 codecs:%5")
476 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"decoder:%1 renderer:%2 deint0:%3 deint1:%4 cpus:%5 upscale:%6")
487 if ((deint1x != olddeint1x) || (deint2x != olddeint2x))
494 std::vector<MythVideoProfileItem> list;
498 "SELECT profileid, value, data "
499 "FROM displayprofiles "
500 "WHERE profilegroupid = :GROUPID "
501 "ORDER BY profileid");
513 if (query.
value(0).toUInt() != profileid)
517 tmp.SetProfileID(profileid);
518 auto [valid,
error] =
tmp.IsValid();
522 LOG(VB_PLAYBACK, LOG_NOTICE,
LOC + QString(
"Ignoring profile %1 (%2)")
523 .arg(profileid).arg(
error));
526 profileid = query.
value(0).toUInt();
528 tmp.Set(query.
value(1).toString(), query.
value(2).toString());
533 tmp.SetProfileID(profileid);
534 auto [valid,
error] =
tmp.IsValid();
538 LOG(VB_PLAYBACK, LOG_NOTICE,
LOC + QString(
"Ignoring profile %1 (%2)")
539 .arg(profileid).arg(
error));
542 sort(list.begin(), list.end());
550 "DELETE FROM displayprofiles "
551 "WHERE profilegroupid = :GROUPID AND "
552 " profileid = :PROFILEID");
555 for (
const auto & item : Items)
557 if (!item.GetProfileID())
561 query.
bindValue(
":PROFILEID", item.GetProfileID());
578 "UPDATE displayprofiles "
580 "WHERE profilegroupid = :GROUPID AND "
581 " profileid = :PROFILEID AND "
586 "INSERT INTO displayprofiles "
587 " ( profilegroupid, profileid, value, data) "
589 " (:GROUPID, :PROFILEID, :VALUE, :DATA) ");
593 "DELETE FROM displayprofiles "
594 "WHERE profilegroupid = :GROUPID AND "
595 " profileid = :PROFILEID AND "
599 for (
auto & item : Items)
601 QMap<QString,QString> list = item.GetAll();
602 if (list.begin() == list.end())
605 QMap<QString,QString>::const_iterator lit = list.cbegin();
607 if (!item.GetProfileID())
610 if (!query.
exec(
"SELECT MAX(profileid) FROM displayprofiles"))
618 item.SetProfileID(query.
value(0).toUInt() + 1);
621 for (; lit != list.cend(); ++lit)
623 if ((*lit).isEmpty())
627 insert.
bindValue(
":PROFILEID", item.GetProfileID());
640 for (; lit != list.cend(); ++lit)
644 "FROM displayprofiles "
645 "WHERE profilegroupid = :GROUPID AND "
646 " profileid = :PROFILEID AND "
649 query.
bindValue(
":PROFILEID", item.GetProfileID());
658 if (query.
next() && (1 == query.
value(0).toUInt()))
662 sqldelete.
bindValue(
":GROUPID", GroupId);
663 sqldelete.
bindValue(
":PROFILEID", item.GetProfileID());
664 sqldelete.
bindValue(
":VALUE", lit.key());
665 if (!sqldelete.
exec())
675 update.
bindValue(
":PROFILEID", item.GetProfileID());
689 insert.
bindValue(
":PROFILEID", item.GetProfileID());
717 [](QStringList Res,
const QString& Dec) { return Res << GetDecoderName(Dec); });
722 static std::vector<std::pair<QString,QString>> s_upscalers =
738 kDecName[
"ffmpeg"] = tr(
"Standard");
739 kDecName[
"vdpau"] = tr(
"VDPAU acceleration");
740 kDecName[
"vdpau-dec"] = tr(
"VDPAU acceleration (decode only)");
741 kDecName[
"vaapi"] = tr(
"VAAPI acceleration");
742 kDecName[
"vaapi-dec"] = tr(
"VAAPI acceleration (decode only)");
743 kDecName[
"dxva2"] = tr(
"Windows hardware acceleration");
744 kDecName[
"mediacodec"] = tr(
"Android MediaCodec acceleration");
745 kDecName[
"mediacodec-dec"] = tr(
"Android MediaCodec acceleration (decode only)");
746 kDecName[
"nvdec"] = tr(
"NVIDIA NVDEC acceleration");
747 kDecName[
"nvdec-dec"] = tr(
"NVIDIA NVDEC acceleration (decode only)");
748 kDecName[
"vtb"] = tr(
"VideoToolbox acceleration");
749 kDecName[
"vtb-dec"] = tr(
"VideoToolbox acceleration (decode only)");
750 kDecName[
"v4l2"] = tr(
"V4L2 acceleration");
751 kDecName[
"v4l2-dec"] = tr(
"V4L2 acceleration (decode only)");
752 kDecName[
"mmal"] = tr(
"MMAL acceleration");
753 kDecName[
"mmal-dec"] = tr(
"MMAL acceleration (decode only)");
754 kDecName[
"drmprime"] = tr(
"DRM PRIME acceleration");
758 QMap<QString,QString>::const_iterator it =
kDecName.constFind(
Decoder);
767 QString msg = tr(
"Processing method used to decode video.");
775 msg += tr(
"Standard will use the FFmpeg library for software decoding.");
777 if (
Decoder.startsWith(
"vdpau"))
780 "VDPAU will attempt to use the graphics hardware to "
781 "accelerate video decoding.");
784 if (
Decoder.startsWith(
"vaapi"))
787 "VAAPI will attempt to use the graphics hardware to "
788 "accelerate video decoding and playback.");
791 if (
Decoder.startsWith(
"dxva2"))
794 "DXVA2 will use the graphics hardware to "
795 "accelerate video decoding and playback. ");
798 if (
Decoder.startsWith(
"mediacodec"))
801 "Mediacodec will use Android graphics hardware to "
802 "accelerate video decoding and playback. ");
805 if (
Decoder.startsWith(
"nvdec"))
808 "Nvdec uses the NVDEC API to "
809 "accelerate video decoding and playback with NVIDIA Graphics Adapters. ");
814 "The VideoToolbox library is used to accelerate video decoding. ");
816 if (
Decoder.startsWith(
"mmal"))
818 "MMAL is used to accelerated video decoding (Raspberry Pi only). ");
821 msg +=
"Highly experimental: ";
823 if (
Decoder.startsWith(
"v4l2"))
826 "Video4Linux codecs are used to accelerate video decoding on "
827 "supported platforms. ");
833 "DRM-PRIME decoders are used to accelerate video decoding on "
834 "supported platforms. ");
839 msg += tr(
"The decoder will transfer frames back to system memory "
840 "which will significantly reduce performance but may allow "
841 "other functionality to be used (such as automatic "
842 "letterbox detection). ");
853 kRendName[
"opengl-yv12"] = tr(
"OpenGL YV12");
854 kRendName[
"opengl-hw"] = tr(
"OpenGL Hardware");
858 QString ret = Renderer;
859 QMap<QString,QString>::const_iterator it =
kRendName.constFind(Renderer);
870 query.
prepare(
"SELECT name FROM displayprofilegroups WHERE hostname = :HOST ");
879 list += query.
value(0).toString();
888 tmp = (profiles.contains(
tmp)) ?
tmp : QString();
892 if (!profiles.empty())
895 tmp = (profiles.contains(
"Normal")) ?
"Normal" :
tmp;
909 const QString &HostName)
913 "SELECT profilegroupid "
914 "FROM displayprofilegroups "
915 "WHERE name = :NAME AND "
916 " hostname = :HOST ");
922 else if (query.
next())
923 return query.
value(0).toUInt();
929 const QString& Width,
const QString& Height,
const QString& Codecs,
930 const QString&
Decoder,
uint MaxCpus,
bool SkipLoop,
const QString& VideoRenderer,
931 const QString& Deint1,
const QString& Deint2,
const QString &Upscale)
937 if (!query.
exec(
"SELECT MAX(profileid) FROM displayprofiles"))
939 else if (query.
next())
940 profileid = query.
value(0).toUInt() + 1;
943 "INSERT INTO displayprofiles "
944 "VALUES (:GRPID, :PROFID, 'pref_priority', :PRIORITY)");
951 QStringList queryValue;
952 QStringList queryData;
967 queryData += QString::number(MaxCpus);
970 queryData += (SkipLoop) ?
"1" :
"0";
973 queryData += VideoRenderer;
982 queryData += Upscale;
984 QStringList::const_iterator itV = queryValue.cbegin();
985 QStringList::const_iterator itD = queryData.cbegin();
986 for (; itV != queryValue.cend() && itD != queryData.cend(); ++itV,++itD)
991 "INSERT INTO displayprofiles "
992 "VALUES (:GRPID, :PROFID, :VALUE, :DATA)");
1006 "INSERT INTO displayprofilegroups (name, hostname) "
1007 "VALUES (:NAME,:HOST)");
1028 "SELECT profilegroupid "
1029 "FROM displayprofilegroups "
1030 "WHERE name = :NAME AND "
1031 " hostname = :HOST ");
1043 while (query.
next())
1045 query2.
prepare(
"DELETE FROM displayprofiles "
1046 "WHERE profilegroupid = :PROFID");
1057 "DELETE FROM displayprofilegroups "
1058 "WHERE name = :NAME AND "
1059 " hostname = :HOST");
1078 if (!profiles.contains(
"OpenGL High Quality"))
1080 (void)tr(
"OpenGL High Quality",
1081 "Sample: OpenGL high quality");
1084 "ffmpeg", 2,
true,
"opengl-yv12",
1085 "shader:high",
"shader:high");
1088 if (!profiles.contains(
"OpenGL Normal"))
1090 (void)tr(
"OpenGL Normal",
"Sample: OpenGL medium quality");
1093 "ffmpeg", 2,
true,
"opengl-yv12",
1094 "shader:medium",
"shader:medium");
1097 if (!profiles.contains(
"OpenGL Slim"))
1099 (void)tr(
"OpenGL Slim",
"Sample: OpenGL low power GPU");
1102 "ffmpeg", 1,
true,
"opengl",
1103 "medium",
"medium");
1108 if (!profiles.contains(
"VAAPI Normal"))
1110 (void)tr(
"VAAPI Normal",
"Sample: VAAPI average quality");
1113 "vaapi", 2,
true,
"opengl-hw",
1114 "shader:driver:high",
"shader:driver:high");
1116 "ffmpeg", 2,
true,
"opengl-yv12",
1117 "shader:medium",
"shader:medium");
1122 if (!profiles.contains(
"VDPAU Normal"))
1124 (void)tr(
"VDPAU Normal",
"Sample: VDPAU medium quality");
1127 "vdpau", 1,
true,
"opengl-hw",
1128 "driver:medium",
"driver:medium");
1130 "ffmpeg", 2,
true,
"opengl-yv12",
1131 "shader:medium",
"shader:medium");
1135 #ifdef USING_MEDIACODEC
1136 if (!profiles.contains(
"MediaCodec Normal"))
1138 (void)tr(
"MediaCodec Normal",
1139 "Sample: MediaCodec Normal");
1142 "mediacodec-dec", 4,
true,
"opengl-yv12",
1143 "shader:driver:medium",
"shader:driver:medium");
1145 "ffmpeg", 2,
true,
"opengl-yv12",
1146 "shader:medium",
"shader:medium");
1151 #if defined(USING_NVDEC) && defined(USING_OPENGL)
1152 if (!profiles.contains(
"NVDEC Normal"))
1154 (void)tr(
"NVDEC Normal",
"Sample: NVDEC Normal");
1157 "nvdec", 1,
true,
"opengl-hw",
1158 "shader:driver:high",
"shader:driver:high");
1160 "ffmpeg", 2,
true,
"opengl-yv12",
1161 "shader:high",
"shader:high");
1165 #if defined(USING_VTB) && defined(USING_OPENGL)
1166 if (!profiles.contains(
"VideoToolBox Normal")) {
1167 (void)tr(
"VideoToolBox Normal",
"Sample: VideoToolBox Normal");
1170 "vtb", 1,
true,
"opengl-hw",
1171 "shader:driver:medium",
"shader:driver:medium");
1173 "ffmpeg", 2,
true,
"opengl-yv12",
1174 "shader:medium",
"shader:medium");
1178 #if defined(USING_MMAL) && defined(USING_OPENGL)
1179 if (!profiles.contains(
"MMAL"))
1181 (void)tr(
"MMAL",
"Sample: MMAL");
1184 "mmal", 1,
true,
"opengl-hw",
1185 "shader:driver:medium",
"shader:driver:medium");
1187 "ffmpeg", 2,
true,
"opengl-yv12",
1188 "shader:medium",
"shader:medium");
1192 #if defined(USING_V4L2)
1193 if (!profiles.contains(
"V4L2 Codecs"))
1195 (void)tr(
"V4L2 Codecs",
"Sample: V4L2");
1198 "v4l2", 1,
true,
"opengl-hw",
1199 "shader:driver:medium",
"shader:driver:medium");
1201 "ffmpeg", 2,
true,
"opengl-yv12",
1202 "shader:medium",
"shader:medium");
1220 if (Renderer ==
"null")
1221 return tr(
"Render video offscreen. Used internally.");
1223 if (Renderer ==
"direct3d")
1225 return tr(
"Windows video renderer based on Direct3D. Requires "
1226 "video card compatible with Direct3D 9. This is the preferred "
1227 "renderer for current Windows systems.");
1230 if (Renderer ==
"opengl")
1232 return tr(
"Video is converted to an intermediate format by the CPU (YUV2) "
1233 "before OpenGL is used for color conversion, scaling, picture controls"
1234 " and optionally deinterlacing. Processing is balanced between the CPU "
1238 if (Renderer ==
"opengl-yv12")
1240 return tr(
"OpenGL is used for all color conversion, scaling, picture "
1241 "controls and optionally deinterlacing. CPU load is low but a slightly more "
1242 "powerful GPU is needed for deinterlacing.");
1245 if (Renderer ==
"opengl-hw")
1246 return tr(
"This video renderer is used by hardware decoders to display frames using OpenGL.");
1248 return tr(
"Video rendering method");
1259 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"Safe renderers for '%1': %2").arg(
Decoder, safe.join(
",")));
1261 QStringList filtered;
1262 for (
const auto& dec : qAsConst(safe))
1263 if (Renderers.contains(dec))
1264 filtered.push_back(dec);
1274 uint toppriority = 0;
1275 QString toprenderer;
1276 for (
const auto& renderer : qAsConst(Renderers))
1282 toprenderer = renderer;
1295 return QString(
"rend:%1 deint:%2/%3 CPUs: %4 Upscale: %5")
1296 .arg(renderer, deint0, deint1, cpus, upscale);
1301 static const QList<QPair<QString,QString> > s_deinterlacerOptions =
1309 return s_deinterlacerOptions;
1319 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Cannot initialise video profiles from this thread");
1325 LOG(VB_GENERAL, LOG_ERR,
LOC +
"No window!");
1331 LOG(VB_GENERAL, LOG_INFO,
LOC +
"Resetting decoder/render support");
1360 LOG(VB_GENERAL, LOG_INFO,
LOC + QString(
"Available GPU interops: %1")
1365 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 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