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.3.5 - 20210603</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
22 of the current logical bitstream.
25 <table border=0 width=100% color=black cellspacing=0 cellpadding=7>
30 unsigned char *body_data; /* bytes from packet bodies */
31 long body_storage; /* storage elements allocated */
32 long body_fill; /* elements stored; fill mark */
33 long body_returned; /* elements of fill returned */
36 int *lacing_vals; /* The values that will go to the segment table */
37 ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact
38 this way, but it is simple coupled to the
45 unsigned char header[282]; /* working space for header encode */
48 int e_o_s; /* set when we have buffered the last packet in the
50 int b_o_s; /* set after we've written the initial page
51 of a logical bitstream */
54 ogg_int64_t packetno; /* sequence number for decode; the framing
55 knows where there's a hole in the data,
56 but we need coupling so that the codec
57 (which is in a separate abstraction
58 layer) also knows about the gap */
59 ogg_int64_t granulepos;
67 <h3>Relevant Struct Members</h3>
69 <dt><i>body_data</i></dt>
70 <dd>Pointer to data from packet bodies.</dd>
71 <dt><i>body_storage</i></dt>
72 <dd>Storage allocated for bodies in bytes (filled or unfilled).</dd>
73 <dt><i>body_fill</i></dt>
74 <dd>Amount of storage filled with stored packet bodies.</dd>
75 <dt><i>body_returned</i></dt>
76 <dd>Number of elements returned from storage.</dd>
77 <dt><i>lacing_vals</i></dt>
78 <dd>String of lacing values for the packet segments within the current page. Each value is a byte, indicating packet segment length.</dd>
79 <dt><i>granule_vals</i></dt>
80 <dd>Pointer to the lacing values for the packet segments within the current page.</dd>
81 <dt><i>lacing_storage</i></dt>
82 <dd>Total amount of storage (in bytes) allocated for storing lacing values.</dd>
83 <dt><i>lacing_fill</i></dt>
84 <dd>Fill marker for the current vs. total allocated storage of lacing values for the page.</dd>
85 <dt><i>lacing_packet</i></dt>
86 <dd>Lacing value for current packet segment.</dd>
87 <dt><i>lacing_returned</i></dt>
88 <dd>Number of lacing values returned from lacing_storage.</dd>
89 <dt><i>header</i></dt>
90 <dd>Temporary storage for page header during encode process, while the header is being created.</dd>
91 <dt><i>header_fill</i></dt>
92 <dd>Fill marker for header storage allocation. Used during the header creation process.</dd>
94 <dd>Marker set when the last packet of the logical bitstream has been buffered.</dd>
96 <dd>Marker set after we have written the first page in the logical bitstream.</dd>
97 <dt><i>serialno</i></dt>
98 <dd>Serial number of this logical bitstream.</dd>
99 <dt><i>pageno</i></dt>
100 <dd>Number of the current page within the stream.</dd>
101 <dt><i>packetno</i></dt>
102 <dd>Number of the current packet.</dd>
103 <dt><i>granulepos</i></dt>
104 <dd>Exact position of decoding/encoding process.</dd>
110 <table border=0 width=100%>
112 <td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
113 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
115 <td><p class=tiny>libogg documentation</p></td>
116 <td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>