2
0

ogg_stream_state.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <html>
  2. <head>
  3. <title>libogg - datatype - ogg_stream_state</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>libogg documentation</p></td>
  10. <td align=right><p class=tiny>libogg release 1.3.2 - 20140527</p></td>
  11. </tr>
  12. </table>
  13. <h1>ogg_stream_state</h1>
  14. <p><i>declared in "ogg/ogg.h"</i></p>
  15. <p>
  16. The ogg_stream_state struct tracks the current encode/decode state of the current logical bitstream.
  17. <p>
  18. <table border=0 width=100% color=black cellspacing=0 cellpadding=7>
  19. <tr bgcolor=#cccccc>
  20. <td>
  21. <pre><b>
  22. typedef struct {
  23. unsigned char *body_data; /* bytes from packet bodies */
  24. long body_storage; /* storage elements allocated */
  25. long body_fill; /* elements stored; fill mark */
  26. long body_returned; /* elements of fill returned */
  27. int *lacing_vals; /* The values that will go to the segment table */
  28. ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact
  29. this way, but it is simple coupled to the
  30. lacing fifo */
  31. long lacing_storage;
  32. long lacing_fill;
  33. long lacing_packet;
  34. long lacing_returned;
  35. unsigned char header[282]; /* working space for header encode */
  36. int header_fill;
  37. int e_o_s; /* set when we have buffered the last packet in the
  38. logical bitstream */
  39. int b_o_s; /* set after we've written the initial page
  40. of a logical bitstream */
  41. long serialno;
  42. int pageno;
  43. ogg_int64_t packetno; /* sequence number for decode; the framing
  44. knows where there's a hole in the data,
  45. but we need coupling so that the codec
  46. (which is in a seperate abstraction
  47. layer) also knows about the gap */
  48. ogg_int64_t granulepos;
  49. } ogg_stream_state;
  50. </b></pre>
  51. </td>
  52. </tr>
  53. </table>
  54. <h3>Relevant Struct Members</h3>
  55. <dl>
  56. <dt><i>body_data</i></dt>
  57. <dd>Pointer to data from packet bodies.</dd>
  58. <dt><i>body_storage</i></dt>
  59. <dd>Storage allocated for bodies in bytes (filled or unfilled).</dd>
  60. <dt><i>body_fill</i></dt>
  61. <dd>Amount of storage filled with stored packet bodies.</dd>
  62. <dt><i>body_returned</i></dt>
  63. <dd>Number of elements returned from storage.</dd>
  64. <dt><i>lacing_vals</i></dt>
  65. <dd>String of lacing values for the packet segments within the current page. Each value is a byte, indicating packet segment length.</dd>
  66. <dt><i>granule_vals</i></dt>
  67. <dd>Pointer to the lacing values for the packet segments within the current page.</dd>
  68. <dt><i>lacing_storage</i></dt>
  69. <dd>Total amount of storage (in bytes) allocated for storing lacing values.</dd>
  70. <dt><i>lacing_fill</i></dt>
  71. <dd>Fill marker for the current vs. total allocated storage of lacing values for the page.</dd>
  72. <dt><i>lacing_packet</i></dt>
  73. <dd>Lacing value for current packet segment.</dd>
  74. <dt><i>lacing_returned</i></dt>
  75. <dd>Number of lacing values returned from lacing_storage.</dd>
  76. <dt><i>header</i></dt>
  77. <dd>Temporary storage for page header during encode process, while the header is being created.</dd>
  78. <dt><i>header_fill</i></dt>
  79. <dd>Fill marker for header storage allocation. Used during the header creation process.</dd>
  80. <dt><i>e_o_s</i></dt>
  81. <dd>Marker set when the last packet of the logical bitstream has been buffered.</dd>
  82. <dt><i>b_o_s</i></dt>
  83. <dd>Marker set after we have written the first page in the logical bitstream.</dd>
  84. <dt><i>serialno</i></dt>
  85. <dd>Serial number of this logical bitstream.</dd>
  86. <dt><i>pageno</i></dt>
  87. <dd>Number of the current page within the stream.</dd>
  88. <dt><i>packetno</i></dt>
  89. <dd>Number of the current packet.</dd>
  90. <dt><i>granulepos</i></dt>
  91. <dd>Exact position of decoding/encoding process.</dd>
  92. </dl>
  93. <br><br>
  94. <hr noshade>
  95. <table border=0 width=100%>
  96. <tr valign=top>
  97. <td><p class=tiny>copyright &copy; 2000-2014 Xiph.Org</p></td>
  98. <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
  99. </tr><tr>
  100. <td><p class=tiny>libogg documentation</p></td>
  101. <td align=right><p class=tiny>libogg release 1.3.2 - 20140527</p></td>
  102. </tr>
  103. </table>
  104. </body>
  105. </html>