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