[vorbis-dev] New comment interfaces

Michael Smith msmith at labyrinth.net.au
Sat Jul 29 02:21:42 PDT 2000



I just committed a bunch of work on the comment interfaces in libvorbis. 
Importantly, there is now a way to deal with non-0-terminated strings being
returned in the comment structure.

THe vorbis_comment struct has an additional member - int *comment_lengths.
Unless you're editing the struct directly (i.e. not using
vorbis_comment_add(),
etc.), no changes will be needed to applications (but this WILL break binary
compatibility with shared libraries, I think.)

Additionally, two extra calls were added: vorbis_comment_add_tag() and
vorbis_comment_query(). These give a nicer interface to the 'tag' system.

vorbis_comment_add_tag() is basically the same as vorbis_comment_add(), except
it takes a tag and the contents. vorbis_comment_query() searches for the given
tag, and returns the nth instance (one of the arguments) of this tag -
usually,
you'll want this to be zero.

None of the interfaces for SETTING comments currently support non-0-terminated
data. If anyone would find this useful, I'll add appropriate calls. Let me
know.

Michael

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/



More information about the Vorbis-dev mailing list