vorbis_comment.html 2.9 KB

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