cannam@86
|
1 <html>
|
cannam@86
|
2
|
cannam@86
|
3 <head>
|
cannam@86
|
4 <title>libvorbis - datatype - vorbis_comment</title>
|
cannam@86
|
5 <link rel=stylesheet href="style.css" type="text/css">
|
cannam@86
|
6 </head>
|
cannam@86
|
7
|
cannam@86
|
8 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
cannam@86
|
9 <table border=0 width=100%>
|
cannam@86
|
10 <tr>
|
cannam@86
|
11 <td><p class=tiny>libvorbis documentation</p></td>
|
cannam@86
|
12 <td align=right><p class=tiny>libvorbis version 1.3.2 - 20101101</p></td>
|
cannam@86
|
13 </tr>
|
cannam@86
|
14 </table>
|
cannam@86
|
15
|
cannam@86
|
16 <h1>vorbis_comment</h1>
|
cannam@86
|
17
|
cannam@86
|
18 <p><i>declared in "vorbis/codec.h"</i></p>
|
cannam@86
|
19
|
cannam@86
|
20 <p>
|
cannam@86
|
21 The vorbis_comment structure defines an Ogg Vorbis comment.
|
cannam@86
|
22 <p>
|
cannam@86
|
23 Only the fields the program needs must be defined. If a field isn't
|
cannam@86
|
24 defined by the application, it will either be blank (if it's a string value)
|
cannam@86
|
25 or set to some reasonable default (usually 0).
|
cannam@86
|
26 <p>
|
cannam@86
|
27 <i>Note:</i> When encoding, while it <i>is</i> supported to modify a
|
cannam@86
|
28 vorbis_comment structure directly, be sure to read the notes on the
|
cannam@86
|
29 <a href="vorbis_comment_init.html">vorbis_comment_init</a> and
|
cannam@86
|
30 <a href="vorbis_comment_clear.html">vorbis_comment_clear</a> pages for
|
cannam@86
|
31 considerations on memory allocation and freeing before you do so. Rule of
|
cannam@86
|
32 thumb: call vorbis_comment_init, then <i>either</i> do all allocation,
|
cannam@86
|
33 freeing, and modification yourself and <i>do not</i> call
|
cannam@86
|
34 vorbis_comment_clear, <i>or</i> do all modification using libvorbis
|
cannam@86
|
35 functions and <i>do</i> call vorbis_comment_clear.
|
cannam@86
|
36 <p>
|
cannam@86
|
37
|
cannam@86
|
38 <table border=0 width=100% color=black cellspacing=0 cellpadding=7>
|
cannam@86
|
39 <tr bgcolor=#cccccc>
|
cannam@86
|
40 <td>
|
cannam@86
|
41 <pre><b>typedef struct vorbis_comment{
|
cannam@86
|
42 /* unlimited user comment fields. */
|
cannam@86
|
43 char **user_comments;
|
cannam@86
|
44 int *comment_lengths;
|
cannam@86
|
45 int comments;
|
cannam@86
|
46 char *vendor;
|
cannam@86
|
47
|
cannam@86
|
48 } vorbis_comment;</b></pre>
|
cannam@86
|
49 </td>
|
cannam@86
|
50 </tr>
|
cannam@86
|
51 </table>
|
cannam@86
|
52
|
cannam@86
|
53 <h3>Parameters</h3>
|
cannam@86
|
54 <dl>
|
cannam@86
|
55 <dt><i>user_comments</i></dt>
|
cannam@86
|
56 <dd>Unlimited user comment array. The individual strings in the array are 8 bit clean, by the Vorbis specification, and as such the <tt>comment_lengths</tt> 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).</dd>
|
cannam@86
|
57 <dt><i>comment_lengths</i></dt>
|
cannam@86
|
58 <dd>An int array that stores the length of each comment string</dd>
|
cannam@86
|
59 <dt><i>comments</i></dt>
|
cannam@86
|
60 <dd>Int signifying number of user comments in user_comments field.</dd>
|
cannam@86
|
61 <dt><i>vendor</i></dt>
|
cannam@86
|
62 <dd>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.</dd>
|
cannam@86
|
63 </dl>
|
cannam@86
|
64
|
cannam@86
|
65
|
cannam@86
|
66 <br><br>
|
cannam@86
|
67 <hr noshade>
|
cannam@86
|
68 <table border=0 width=100%>
|
cannam@86
|
69 <tr valign=top>
|
cannam@86
|
70 <td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td>
|
cannam@86
|
71 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
|
cannam@86
|
72 </tr><tr>
|
cannam@86
|
73 <td><p class=tiny>libvorbis documentation</p></td>
|
cannam@86
|
74 <td align=right><p class=tiny>libvorbis version 1.3.2 - 20101101</p></td>
|
cannam@86
|
75 </tr>
|
cannam@86
|
76 </table>
|
cannam@86
|
77
|
cannam@86
|
78 </body>
|
cannam@86
|
79
|
cannam@86
|
80 </html>
|