本文整理汇总了C++中mp4::CoverArtList::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ CoverArtList::begin方法的具体用法?C++ CoverArtList::begin怎么用?C++ CoverArtList::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mp4::CoverArtList
的用法示例。
在下文中一共展示了CoverArtList::begin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: renderAtom
ByteVector
MP4::Tag::renderCovr(const ByteVector &name, const MP4::Item &item) const
{
ByteVector data;
MP4::CoverArtList value = item.toCoverArtList();
for(MP4::CoverArtList::ConstIterator it = value.begin(); it != value.end(); ++it) {
data.append(renderAtom("data", ByteVector::fromUInt(it->format()) +
ByteVector(4, '\0') + it->data()));
}
return renderAtom(name, data);
}
示例2: ParseTag
bool CTagLoaderTagLib::ParseTag(MP4::Tag *mp4, EmbeddedArt *art, CMusicInfoTag& tag)
{
if (!mp4)
return false;
ReplayGain replayGainInfo;
MP4::ItemListMap& itemListMap = mp4->itemListMap();
for (MP4::ItemListMap::ConstIterator it = itemListMap.begin(); it != itemListMap.end(); ++it)
{
if (it->first == "\251nam")
tag.SetTitle(it->second.toStringList().front().to8Bit(true));
else if (it->first == "\251ART")
SetArtist(tag, StringListToVectorString(it->second.toStringList()));
else if (it->first == "----:com.apple.iTunes:ARTISTS")
SetArtistHints(tag, StringListToVectorString(it->second.toStringList()));
else if (it->first == "\251alb")
tag.SetAlbum(it->second.toStringList().front().to8Bit(true));
else if (it->first == "aART")
SetAlbumArtist(tag, StringListToVectorString(it->second.toStringList()));
else if (it->first == "----:com.apple.iTunes:ALBUMARTISTS")
SetAlbumArtistHints(tag, StringListToVectorString(it->second.toStringList()));
else if (it->first == "\251gen")
SetGenre(tag, StringListToVectorString(it->second.toStringList()));
else if (it->first == "----:com.apple.iTunes:MOOD")
tag.SetMood(it->second.toStringList().front().to8Bit(true));
else if (it->first == "\251cmt")
tag.SetComment(it->second.toStringList().front().to8Bit(true));
else if (it->first == "\251wrt")
AddArtistRole(tag, "Composer", StringListToVectorString(it->second.toStringList()));
else if (it->first == "----:com.apple.iTunes:CONDUCTOR")
AddArtistRole(tag, "Conductor", StringListToVectorString(it->second.toStringList()));
//No MP4 standard tag for "ensemble"
else if (it->first == "----:com.apple.iTunes:LYRICIST")
AddArtistRole(tag, "Lyricist", StringListToVectorString(it->second.toStringList()));
else if (it->first == "----:com.apple.iTunes:REMIXER")
AddArtistRole(tag, "Remixer", StringListToVectorString(it->second.toStringList()));
else if (it->first == "----:com.apple.iTunes:ENGINEER")
AddArtistRole(tag, "Engineer", StringListToVectorString(it->second.toStringList()));
else if (it->first == "----:com.apple.iTunes:PRODUCER")
AddArtistRole(tag, "Producer", StringListToVectorString(it->second.toStringList()));
else if (it->first == "----:com.apple.iTunes:DJMIXER")
AddArtistRole(tag, "DJMixer", StringListToVectorString(it->second.toStringList()));
else if (it->first == "----:com.apple.iTunes:MIXER")
AddArtistRole(tag, "Mixer", StringListToVectorString(it->second.toStringList()));
//No MP4 standard tag for musician credits
else if (it->first == "----:com.apple.iTunes:LABEL")
{} // Publisher. Known unsupported, supress warnings
else if (it->first == "cpil")
tag.SetCompilation(it->second.toBool());
else if (it->first == "trkn")
tag.SetTrackNumber(it->second.toIntPair().first);
else if (it->first == "disk")
tag.SetDiscNumber(it->second.toIntPair().first);
else if (it->first == "\251day")
tag.SetYear(it->second.toStringList().front().toInt());
else if (it->first == "----:com.apple.iTunes:replaygain_track_gain")
replayGainInfo.ParseGain(ReplayGain::TRACK, it->second.toStringList().front().toCString());
else if (it->first == "----:com.apple.iTunes:replaygain_album_gain")
replayGainInfo.ParseGain(ReplayGain::ALBUM, it->second.toStringList().front().toCString());
else if (it->first == "----:com.apple.iTunes:replaygain_track_peak")
replayGainInfo.ParsePeak(ReplayGain::TRACK, it->second.toStringList().front().toCString());
else if (it->first == "----:com.apple.iTunes:replaygain_album_peak")
replayGainInfo.ParsePeak(ReplayGain::ALBUM, it->second.toStringList().front().toCString());
else if (it->first == "----:com.apple.iTunes:MusicBrainz Artist Id")
tag.SetMusicBrainzArtistID(SplitMBID(StringListToVectorString(it->second.toStringList())));
else if (it->first == "----:com.apple.iTunes:MusicBrainz Album Artist Id")
tag.SetMusicBrainzAlbumArtistID(SplitMBID(StringListToVectorString(it->second.toStringList())));
else if (it->first == "----:com.apple.iTunes:MusicBrainz Album Artist")
SetAlbumArtist(tag, StringListToVectorString(it->second.toStringList()));
else if (it->first == "----:com.apple.iTunes:MusicBrainz Album Id")
tag.SetMusicBrainzAlbumID(it->second.toStringList().front().to8Bit(true));
else if (it->first == "----:com.apple.iTunes:MusicBrainz Track Id")
tag.SetMusicBrainzTrackID(it->second.toStringList().front().to8Bit(true));
else if (it->first == "covr")
{
MP4::CoverArtList coverArtList = it->second.toCoverArtList();
for (MP4::CoverArtList::ConstIterator pt = coverArtList.begin(); pt != coverArtList.end(); ++pt)
{
std::string mime;
switch (pt->format())
{
case MP4::CoverArt::PNG:
mime = "image/png";
break;
case MP4::CoverArt::JPEG:
mime = "image/jpeg";
break;
default:
break;
}
if (mime.empty())
continue;
tag.SetCoverArtInfo(pt->data().size(), mime);
if (art)
art->set(reinterpret_cast<const uint8_t *>(pt->data().data()), pt->data().size(), mime);
break; // one is enough
}
}
}
//.........这里部分代码省略.........