本文整理汇总了C++中MythCommFlagCommandLineParser::SetValue方法的典型用法代码示例。如果您正苦于以下问题:C++ MythCommFlagCommandLineParser::SetValue方法的具体用法?C++ MythCommFlagCommandLineParser::SetValue怎么用?C++ MythCommFlagCommandLineParser::SetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythCommFlagCommandLineParser
的用法示例。
在下文中一共展示了MythCommFlagCommandLineParser::SetValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
ret = FlagCommercials(chanid, starttime, jobID, "", jobQueueCPU != 0);
if (ret > GENERIC_EXIT_NOT_OK)
JobQueue::ChangeJobStatus(jobID, JOB_ERRORED,
QCoreApplication::translate("(mythcommflag)",
"Failed with exit status %1",
"Job status").arg(ret));
else
JobQueue::ChangeJobStatus(jobID, JOB_FINISHED,
QCoreApplication::translate("(mythcommflag)",
"%n commercial break(s)",
"Job status",
QCoreApplication::UnicodeUTF8,
ret));
}
else if (cmdline.toBool("video"))
{
// build skiplist for video file
return RebuildSeekTable(cmdline.toString("video"), -1);
}
else if (cmdline.toBool("file"))
{
if (cmdline.toBool("skipdb"))
{
if (cmdline.toBool("rebuild"))
{
cerr << "The --rebuild parameter builds the seektable for "
"internal MythTV use only. It cannot be used in "
"combination with --skipdb." << endl;
return GENERIC_EXIT_INVALID_CMDLINE;
}
if (!cmdline.toBool("outputfile"))
cmdline.SetValue("outputfile", "-");
// perform commercial flagging on file outside the database
FlagCommercials(cmdline.toString("file"), -1,
cmdline.toString("outputfile"),
!cmdline.toBool("skipdb"),
true);
}
else
{
ProgramInfo pginfo(cmdline.toString("file"));
// pass chanid and starttime
// inefficient, but it lets the other function
// handle sanity checking
if (cmdline.toBool("rebuild"))
result = RebuildSeekTable(pginfo.GetChanID(),
pginfo.GetRecordingStartTime(),
-1);
else
result = FlagCommercials(pginfo.GetChanID(),
pginfo.GetRecordingStartTime(),
-1, cmdline.toString("outputfile"),
true);
}
}
else if (cmdline.toBool("queue"))
{
// run flagging for all recordings with no skiplist
MSqlQuery query(MSqlQuery::InitCon());
query.prepare("SELECT r.chanid, r.starttime, c.commmethod "
"FROM recorded AS r "
"LEFT JOIN channel AS c ON r.chanid=c.chanid "
// "WHERE startime >= :STARTTIME AND endtime <= :ENDTIME "