Posted on 2007-03-09 10:14:13-08 by nonos
Extending interface
Hello,

'Taglib' and 'Audio::TagLib' are really useful.
I just need 'composer' and 'bpm' fieds to be present in Tag's functions, because I like the idea of leaving taglib manage all metatag considerations (not to have check file extensions and use frameList for all metatag types).

So, my wish is : you just load the file (mp3, ogg or whatelse) and get title, composer or somethingelse with Audio::TagLib::Tag functions.

I've made a patch for taglib which works : just add virtual methods 'composer()' and 'bpm()' in tag.h and their implementation in all metatag classes.

My problem is with Audio::Taglib

I've done the same thing in '.xs' files : in tag.xs and all '.xs' for metatag types.

for example 'id3v2tag.xs' add :
TagLib::String * TagLib::ID3v2::Tag::composer() CODE: RETVAL = new TagLib::String(THIS->composer()); OUTPUT: RETVAL
The compilation works and I can use this new function Audio::TagLib::Tag->composer()
but the result is false : I get a big number, just like is something wasn't init.

I may have forgotten something : could you help me ?

Cheers,
Nonos
Direct Responses: 4517 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.