Fwd: C Bindings
Dudy Kohen
kohen.d at gmail.com
Mon Apr 13 10:02:59 CEST 2009
Forgot to send to the list...
---------- Forwarded message ----------
From: Dudy Kohen <kohen.d at gmail.com>
Date: Mon, Apr 13, 2009 at 11:02 AM
Subject: Re: C Bindings
To: Linus Walleij <linus.ml.walleij at gmail.com>
On Mon, Apr 13, 2009 at 2:31 AM, Linus Walleij
<linus.ml.walleij at gmail.com>wrote:
> 2009/4/12 Dudy Kohen <kohen.d at gmail.com>:
>
> > I implemented some more of the C binding. (now you can read and write any
> > string tag for id3v2, and USLT)
>
> Cool!
>
> > Currently, my Lyrics set subroutine strips all the others from the
> > file, do you think I should add a boolean to control this behaviour?
>
> All other Lyrics? Hm, one tag is one tag I guess... only one USLT
> frame and that's it. It should be the same behaviour for all string
> tags I think.
>
USLT isn't your normal string frame, it has "description" and "language"
fields that hardly anyone uses, and the specification says that you should
have only one field with the same description and language.
>
> > And I have a problem I encountered: I need the USLT frame with a null
> > terminator on-disk, I tried rendering it and resize the rendered
> > vector, and adding it as an unknown fame, but it deleted the null
> > terminator, I didn't see where an UnknownFrame is changing it's data,
> > could you point me in the right direction?
>
> No idea, better ask on the mailinglist and post some code also I think...
>
The if 1==1 is for debugging purposes, I intend to change it with an actual
condition...
String s2(lyrics, unicodeStrings ? String::UTF8 : String::Latin1);
s2.append(String(" ", unicodeStrings ? String::UTF8 :
String::Latin1));
uslt_frame->setText(s2);
TagLib::ByteVector buff(uslt_frame->render());
if (1==1) {
String::Type encoding=uslt_frame->textEncoding();
buff.data()[buff.size()-1]='\0';
}
ID3v2::UnknownFrame *uf=new ID3v2::UnknownFrame(buff);
t->addFrame(uf);
delete (uslt_frame);
>
> Linus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20090413/33fb730c/attachment.htm
More information about the taglib-devel
mailing list