Re: [Muine] TagLib



Hi Tamara,

> Today, Todd Berman mentioned Cowbell [http://more-cowbell.org/], a tag
> editor which looks really nice (I don't have access to my computer
> right now but I'll try it at my first chance). 

I'm quite honoured that people like Cowbell so much!  After about a year
of incubation, its was great to get it out there.

> This uses Clemens
> Koppensteiner's C# wrapper of TagLib
> [http://developer.kde.org/~wheeler/taglib.html]. For those of you in
> the dark, TagLib is an ID3/Ogg/Flac/etc. tag reader and writer. I
> missed it because it is developed in the context of KDE but it is an
> independent library. Koppensteiner's wrappers aren't really
> maintained, it looks like he just released it a year ago on his blog
> and that was it (I haven't looked to see if the code included with
> Cowbell differs from the original wrappers -- I would assume so, since
> things have change in Mono in the last year).
> 
> The wrapping for TagLib becomes somewhat difficult because TagLib is
> written in C++. C# support for C is great and we use that a lot but
> C++ is more complicated and (in my understanding) requires the use of
> a managed C++ library to sit between the C# and C++. TagLib does
> provide a C API but it is more basic than the C++ interface (I haven't
> really gotten a chance to compare them) -- Koppensteiner's code only
> wraps the simpler C API, which will probably be sufficient for our
> purposes.

To be truthful, there isn't much that you need to do that isn't exposed
in the C api.  Its actually quite nice -- just edit any of the fields,
call Save, and you're done.

> TagLib claims it's much faster than either id3lib and libvorbisfile
> (which we use). As cleaning C code out of Muine is one of my main
> priorities, I propose that we should look into replacing existing
> dependencies on id3lib and libvorbisfile with TagLib.

TagLib is a perfect choice for this -- its incredibly fast (even over
interop) and is quite clean.  Unfortunately, since it is highly
abstracted, it only exposes a select number of fields; namely Artist,
Album, Title, Track Number, Title, Comment and Genre.  This represents
quite a good amount of fields, but it doesn't include # of Tracks or any
of the album cover embedding that id3lib can do.

So, if you're looking for a full featured tag library, you won't find it
in TagLib, but its benefits (speed and transparency) outweigh the costs,
imho.

A perfect system in this situation would probably be to use TagLib when
you can (in the case of MP3, Ogg and Flac) and use the slower GStreamer
for compatibility.

Another choice would be to use Aaron Bockover's entagged-sharp.  He
already has a good start on a port of the java library which supports
AAC, Ogg, Flac, MP3, WMV, ASF, and a myriad of other formats all in
managed code.  However, it doesn't currently support editing and his
code is about twice as slow to read as TagLib (even over interop), but
its definitely worth considering.

I'd be happy to help out with the TagLib bits in Muine if you could use
it.

-Brad

-- 
Brad Taylor
Genome Software LLC
http://www.getcoded.net

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]