TagLib usage by a buffer not a file

Thomas CANIPEL (4SH France) thomas.canipel at 4sh.fr
Wed May 23 13:52:37 UTC 2012

Dear Nikhil,


I made a simple class extending from IOStream and then I am using it to
initialize an MPEG::FILE, in my case I correctly get the ID3v1 field, but
for a reason no ID3V2 frames seems to be created.


As I am correctly reading from my IOStream I am guessing that
ID3v2::FrameFactory is not yet able the create the framelist correctly from
the IOStream.


Is it planned to support it ? 


Kind regards





== Code ==

TagLib::IOStream* stream  = new filestream(ba);

TagLib::ID3v2::FrameFactory *frameFactory =

TagLib::MPEG::File* filedebug =new

TagLib::FileRef* f = new TagLib::FileRef filedebug); 

cout << filedebug ->ID3v2Tag()->frameListMap().size() << endl; // = 0





De : taglib-devel-bounces at kde.org [mailto:taglib-devel-bounces at kde.org] De
la part de Nikhil Marathe
Envoyé : samedi 5 mai 2012 22:51
À : taglib-devel at kde.org
Objet : Re: TagLib usage by a buffer not a file



On Thu, May 3, 2012 at 6:37 PM, Thomas CANIPEL (4SH France)
<thomas.canipel at 4sh.fr> wrote:

Dear Members,


Is there a way  to use TagLib by passing a buffer ( representing the music)
rather than passing a file path ?

(in my case it’s a restricted case as it is only a ID3v2 Tag.


I am looking into the code, but I don’t know where to begin, should I
investigate the TagLib::ID3v2::Tag class ( but as to use it properly it
needs a TagLib::File* ..)  ?


Hi Thomas,

TagLib v1.8 (not yet released, see github master) supports IOStream. You can
extend the IOStream class to support your buffer and then TagLib will handle


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20120523/fc2252d3/attachment.html>

More information about the taglib-devel mailing list