4 <title>libogg - datatype - ogg_stream_state</title>
5 <link rel=stylesheet href="style.css" type="text/css">
8 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
9 <table border=0 width=100%>
11 <td><p class=tiny>libogg documentation</p></td>
12 <td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
16 <h1>ogg_stream_state</h1>
18 <p><i>declared in "ogg/ogg.h"</i></p>
21 The ogg_stream_state struct tracks the current encode/decode state of the current logical bitstream.
24 <table border=0 width=100% color=black cellspacing=0 cellpadding=7>
29 unsigned char *body_data; /* bytes from packet bodies */
30 long body_storage; /* storage elements allocated */
31 long body_fill; /* elements stored; fill mark */
32 long body_returned; /* elements of fill returned */
35 int *lacing_vals; /* The values that will go to the segment table */
36 ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact
37 this way, but it is simple coupled to the
44 unsigned char header[282]; /* working space for header encode */
47 int e_o_s; /* set when we have buffered the last packet in the
49 int b_o_s; /* set after we've written the initial page
50 of a logical bitstream */
53 ogg_int64_t packetno; /* sequence number for decode; the framing
54 knows where there's a hole in the data,
55 but we need coupling so that the codec
56 (which is in a seperate abstraction
57 layer) also knows about the gap */
58 ogg_int64_t granulepos;
66 <h3>Relevant Struct Members</h3>
68 <dt><i>body_data</i></dt>
69 <dd>Pointer to data from packet bodies.</dd>
70 <dt><i>body_storage</i></dt>
71 <dd>Storage allocated for bodies in bytes (filled or unfilled).</dd>
72 <dt><i>body_fill</i></dt>
73 <dd>Amount of storage filled with stored packet bodies.</dd>
74 <dt><i>body_returned</i></dt>
75 <dd>Number of elements returned from storage.</dd>
76 <dt><i>lacing_vals</i></dt>
77 <dd>String of lacing values for the packet segments within the current page. Each value is a byte, indicating packet segment length.</dd>
78 <dt><i>granule_vals</i></dt>
79 <dd>Pointer to the lacing values for the packet segments within the current page.</dd>
80 <dt><i>lacing_storage</i></dt>
81 <dd>Total amount of storage (in bytes) allocated for storing lacing values.</dd>
82 <dt><i>lacing_fill</i></dt>
83 <dd>Fill marker for the current vs. total allocated storage of lacing values for the page.</dd>
84 <dt><i>lacing_packet</i></dt>
85 <dd>Lacing value for current packet segment.</dd>
86 <dt><i>lacing_returned</i></dt>
87 <dd>Number of lacing values returned from lacing_storage.</dd>
88 <dt><i>header</i></dt>
89 <dd>Temporary storage for page header during encode process, while the header is being created.</dd>
90 <dt><i>header_fill</i></dt>
91 <dd>Fill marker for header storage allocation. Used during the header creation process.</dd>
93 <dd>Marker set when the last packet of the logical bitstream has been buffered.</dd>
95 <dd>Marker set after we have written the first page in the logical bitstream.</dd>
96 <dt><i>serialno</i></dt>
97 <dd>Serial number of this logical bitstream.</dd>
98 <dt><i>pageno</i></dt>
99 <dd>Number of the current page within the stream.</dd>
100 <dt><i>packetno</i></dt>
101 <dd>Number of the current packet.</dd>
102 <dt><i>granulepos</i></dt>
103 <dd>Exact position of decoding/encoding process.</dd>
109 <table border=0 width=100%>
111 <td><p class=tiny>copyright © 2000 xiph.org</p></td>
112 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team@xiph.org">team@xiph.org</a></p></td>
114 <td><p class=tiny>libogg documentation</p></td>
115 <td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>