Some goals of TagLib:
Because TagLib desires to be toolkit agnostic, in hope of being widely adopted and the most flexible in licensing TagLib provides many of its own toolkit classes; in fact the only external dependancy that TagLib has, it a semi-sane STL implementation.
As TagLib will be initially injected into the KDE community, while I am not linking to any of the KDE or Qt libraries I have tried to follow the coding style of those libraries. Again, this is in sharp contrast to id3lib, which basically provides a hybrid C/C++ API and uses a dubious object model.
I get asked rather frequently why I am replacing id3lib (mostly by people that have never worked with id3lib), if you are concerned about this please email me; I can provide my lengthy standard rant. :-)
TagLib::FileRef f("Latex Solar Beef.mp3"); TagLib::String artist = f.tag()->artist(); // artist == "Frank Zappa" f.tag()->setAlbum("Fillmore East"); f.save(); TagLib::FileRef g("Free City Rhymes.ogg"); TagLib::String album = g.tag()->album(); // album == "NYC Ghosts & Flowers" g.tag()->setTrack(1); g.save();
Notice that these high level functions work for both Ogg and MP3. For this high level API, which is suitable for most applications, the differences between ID3v2, ID3v1, MPEG and Ogg Vorbis can all be ignored.