libvorbis documentation

libvorbis version 1.3.2 - 20101101

vorbis_comment

declared in "vorbis/codec.h"

The vorbis_comment structure defines an Ogg Vorbis comment.

Only the fields the program needs must be defined. If a field isn't defined by the application, it will either be blank (if it's a string value) or set to some reasonable default (usually 0).

Note: When encoding, while it is supported to modify a vorbis_comment structure directly, be sure to read the notes on the vorbis_comment_init and vorbis_comment_clear pages for considerations on memory allocation and freeing before you do so. Rule of thumb: call vorbis_comment_init, then either do all allocation, freeing, and modification yourself and do not call vorbis_comment_clear, or do all modification using libvorbis functions and do call vorbis_comment_clear.

typedef struct vorbis_comment{
  /* unlimited user comment fields. */
  char **user_comments;
  int  *comment_lengths;
  int  comments;
  char *vendor;

} vorbis_comment;

Parameters

user_comments
Unlimited user comment array. The individual strings in the array are 8 bit clean, by the Vorbis specification, and as such the comment_lengths array should be consulted to determine string length. For convenience, each string is also NULL-terminated by the decode library (although Vorbis comments are not NULL terminated within the bitstream itself).
comment_lengths
An int array that stores the length of each comment string
comments
Int signifying number of user comments in user_comments field.
vendor
Information about the Vorbis implementation that encoded the file. Stored in a standard C 0-terminated string. Libvorbis will fill this in itself when encoding a comment packet from this structure; when decoding, this contains the vendor string that was in the comment packet.



copyright © 2000-2010 Xiph.Org

Ogg Vorbis

libvorbis documentation

libvorbis version 1.3.2 - 20101101