As a side/fun project I'm building an audio player (Qt application), and one of the hurdles is displaying embedded cover art. With *.mp3 files this ended up not being too much of an issue, mainly thanks to the example provided here:
static QImage imageForTag(TagLib::ID3v2::Tag *tag)
{
TagLib::ID3v2::FrameList l = tag->frameList("APIC");
QImage image;
if(l.isEmpty())
return image;
TagLib::ID3v2::AttachedPictureFrame *f =
static_cast<TagLib::ID3v2::AttachedPictureFrame *>(l.front());
image.loadFromData((const uchar *) f->picture().data(), f->picture().size());
return image;
}
However, how can embedded cover arts be extracted for MPEG 4 files (particularly *.m4a)?