How to Implement Picture frame feature of Id3v2 in TagLIb ?
mahendradeore at gmail.com
Tue Sep 27 13:49:21 UTC 2011
As I gone through the taglib's folder "bindings/c/". In which tag_c.cpp and
tag_c.h having complete implementation to get generic features of all
As Taglib does not implement every feature of ID3v2. But if I want picture
frame feature should be the part of taglib ,instead of extend Taglib to
support this feature in application.
To support this I have written api inside "bindings/c/tag_c.cpp" file which
gives me picture frame buffer and buffersize. To implement this using ref of
at Taglib site. But this api is not generic only specific to id3v2 . This
api is independent of other API and works fine for me.
Belwo is the code snippet for api:-
char *taglib_tag_id3v2_albumart(char *pFile,int *size)
ID3v2::AttachedPictureFrame * pictureFrame;
char *pImgBuffer = NULL;
if(pFile != NULL)
mp3tag = mp3File.ID3v2Tag();
mp3tag->frameListMap()["APIC"];//look for picture frames only
static_cast<ID3v2::AttachedPictureFrame *> (*it);//cast Frame * to
*size = pictureFrame->picture().size();
pImgBuffer = (char
Is this is the correct way to do ? Or Need to write generic implementation
for picture-frame feature ?
Note: My application is in C and I could not extend Tag-lib to support this
feature in my app.
Please help me to solved this issue.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the taglib-devel