Audio::TagLib is a library for reading and editing audio meta data, commonly known as tags.
my $f = Audio::TagLib::FileRef->new("Latex Solar Beef.mp3");
my $artist = $f->tag()->artist();
print $artist->toCString(), "n"; # got "Frank Zappa"
my $g = Audio::TagLib::FileRef->new("Free City Rhymes.ogg");
my $album = $g->tag()->album();
print $album->toCString(), "n"; # got "NYC Ghosts & Flowers"
Note that these high level functions work for Ogg, FLAC, MPC and MP3 (or any other formats supported in the future). For this high level API, which is suitable for most applications, the differences between tag and file formats can all be ignored.
Some goals of TagLib: - A clean, high level, C++ API to handling audio meta data. - Support for at least ID3v1, ID3v2 and Ogg Vorbis comments. - A generic, simple API for the most common tagging related functions. - Binary compatibility between minor releases using the standard KDE/Qt techniques for C++ binary compatibility. - Make the tagging framework extensible by library users; i.e. it will be possible for libarary users to implement additional ID3v2 frames, without modifying the TagLib source (through the use of Abstract Factories and such.
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.