本文整理汇总了C++中ProgramInfo::IsVideo方法的典型用法代码示例。如果您正苦于以下问题:C++ ProgramInfo::IsVideo方法的具体用法?C++ ProgramInfo::IsVideo怎么用?C++ ProgramInfo::IsVideo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProgramInfo
的用法示例。
在下文中一共展示了ProgramInfo::IsVideo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: internal_play_media
static int internal_play_media(const QString &mrl, const QString &plot,
const QString &title, const QString &subtitle,
const QString &director, int season, int episode,
int lenMins, const QString &year)
{
int res = -1;
QFile checkFile(mrl);
if ((!checkFile.exists() && !mrl.startsWith("dvd:")
&& !mrl.startsWith("bd:")
&& !mrl.startsWith("myth:")))
{
QString errorText = QObject::tr("Failed to open \n '%1' in %2 \n"
"Check if the video exists")
.arg(mrl.section('/', -1))
.arg(mrl.section('/', 0, -2));
ShowOkPopup(errorText);
return res;
}
ProgramInfo *pginfo = new ProgramInfo(
mrl, plot, title, subtitle, director, season, episode,
lenMins, (year.toUInt()) ? year.toUInt() : 1900);
int64_t pos = 0;
if (pginfo->IsVideoDVD())
{
RingBuffer *tmprbuf = RingBuffer::Create(pginfo->GetPathname(), false);
if (!tmprbuf)
{
delete pginfo;
return res;
}
QString name;
QString serialid;
if (tmprbuf->IsDVD() &&
tmprbuf->DVD()->GetNameAndSerialNum(name, serialid))
{
QStringList fields = pginfo->QueryDVDBookmark(serialid);
if (!fields.empty())
{
QStringList::Iterator it = fields.begin();
pos = (int64_t)((*++it).toLongLong() & 0xffffffffLL);
}
}
delete tmprbuf;
}
else if (pginfo->IsVideo())
pos = pginfo->QueryBookmark();
if (pos > 0)
{
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
BookmarkDialog *bookmarkdialog = new BookmarkDialog(pginfo, mainStack);
if (!bookmarkdialog->Create())
{
delete bookmarkdialog;
delete pginfo;
return res;
}
}
else
{
TV::StartTV(pginfo, kStartTVNoFlags);
res = 0;
delete pginfo;
}
return res;
}