本文整理汇总了C++中Metadata::determineIfCompilation方法的典型用法代码示例。如果您正苦于以下问题:C++ Metadata::determineIfCompilation方法的具体用法?C++ Metadata::determineIfCompilation怎么用?C++ Metadata::determineIfCompilation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Metadata
的用法示例。
在下文中一共展示了Metadata::determineIfCompilation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: read
/*!
* \copydoc MetaIO::read()
*/
Metadata* MetaIOAVFComment::read(QString filename)
{
QString artist, compilation_artist, album, title, genre;
int year = 0, tracknum = 0, length = 0;
AVFormatContext* p_context = NULL;
AVFormatParameters* p_params = NULL;
AVInputFormat* p_inputformat = NULL;
QByteArray local8bit = filename.toLocal8Bit();
if ((av_open_input_file(&p_context, local8bit.constData(),
p_inputformat, 0, p_params) < 0))
{
return NULL;
}
if (av_find_stream_info(p_context) < 0)
return NULL;
title += (char *)p_context->title;
if (title.isEmpty())
{
readFromFilename(filename, artist, album, title, genre, tracknum);
}
else
{
artist += (char *)p_context->author;
// compilation_artist???
album += (char *)p_context->album;
genre += (char *)p_context->genre;
year = p_context->year;
tracknum = p_context->track;
}
length = getTrackLength(p_context);
Metadata *retdata = new Metadata(filename, artist, compilation_artist, album,
title, genre, year, tracknum, length);
retdata->determineIfCompilation();
av_close_input_file(p_context);
return retdata;
}