Chris@1
|
1 <html>
|
Chris@1
|
2
|
Chris@1
|
3 <head>
|
Chris@1
|
4 <title>libogg - function - ogg_stream_packetout</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_packetout</h1>
|
Chris@1
|
17
|
Chris@1
|
18 <p><i>declared in "ogg/ogg.h";</i></p>
|
Chris@1
|
19
|
Chris@1
|
20 <p>This function assembles a data packet for output to the codec
|
Chris@1
|
21 decoding engine. The data has already been submitted to the
|
Chris@1
|
22 <a href="ogg_stream_state.html">ogg_stream_state</a> and broken
|
Chris@1
|
23 into segments. Each successive call returns the next complete packet
|
Chris@1
|
24 built from those segments.</p>
|
Chris@1
|
25
|
Chris@1
|
26 <p>In a typical decoding situation, this should be used after calling
|
Chris@1
|
27 <a href="ogg_stream_pagein.html">ogg_stream_pagein()</a> to submit a
|
Chris@1
|
28 page of data to the bitstream. If the function returns 0, more data is
|
Chris@1
|
29 needed and another page should be submitted. A non-zero return value
|
Chris@1
|
30 indicates successful return of a packet.</p>
|
Chris@1
|
31
|
Chris@1
|
32 <p>The <i>op</i> is filled in with pointers to memory managed by
|
Chris@1
|
33 the stream state and is only valid until the next call. The client
|
Chris@1
|
34 must copy the packet data if a longer lifetime is required.</p>
|
Chris@1
|
35
|
Chris@1
|
36 <br><br>
|
Chris@1
|
37 <table border=0 color=black cellspacing=0 cellpadding=7>
|
Chris@1
|
38 <tr bgcolor=#cccccc>
|
Chris@1
|
39 <td>
|
Chris@1
|
40 <pre><b>
|
Chris@1
|
41 int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
|
Chris@1
|
42 </b></pre>
|
Chris@1
|
43 </td>
|
Chris@1
|
44 </tr>
|
Chris@1
|
45 </table>
|
Chris@1
|
46
|
Chris@1
|
47 <h3>Parameters</h3>
|
Chris@1
|
48 <dl>
|
Chris@1
|
49 <dt><i>os</i></dt>
|
Chris@1
|
50 <dd>Pointer to a previously declared <a
|
Chris@1
|
51 href="ogg_stream_state.html">ogg_stream_state</a> struct. Before this function is called, an <a href="ogg_page.html">ogg_page</a> should be submitted to the stream using <a href="ogg_stream_pagein.html">ogg_stream_pagein()</a>.</dd>
|
Chris@1
|
52 <dt><i>op</i></dt>
|
Chris@1
|
53 <dd>Pointer to the packet to be filled in with pointers to the new data.
|
Chris@1
|
54 This will typically be submitted to a codec for decode after this
|
Chris@1
|
55 function is called. The pointers are only valid until the next call
|
Chris@1
|
56 on this stream state.</dd>
|
Chris@1
|
57 </dl>
|
Chris@1
|
58
|
Chris@1
|
59
|
Chris@1
|
60 <h3>Return Values</h3>
|
Chris@1
|
61 <blockquote>
|
Chris@1
|
62 <ul>
|
Chris@1
|
63 <li>-1 if we are out of sync and there is a gap in the data. This is usually a recoverable error and subsequent calls to ogg_stream_packetout are likely to succeed. <i>op</i> has not been updated.</li>
|
Chris@1
|
64 <li>0 if there is insufficient data available to complete a packet, or on unrecoverable internal error occurred. <i>op</i> has not been updated.
|
Chris@1
|
65 <li>1 if a packet was assembled normally. <i>op</i> contains the next packet from the stream.</li>
|
Chris@1
|
66 </ul>
|
Chris@1
|
67 </blockquote>
|
Chris@1
|
68
|
Chris@1
|
69 <br><br>
|
Chris@1
|
70
|
Chris@1
|
71 <hr noshade>
|
Chris@1
|
72
|
Chris@1
|
73 <table border=0 width=100%>
|
Chris@1
|
74 <tr valign=top>
|
Chris@1
|
75 <td><p class=tiny>copyright © 2000-2010 xiph.org</p></td>
|
Chris@1
|
76 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
Chris@1
|
77 </tr><tr>
|
Chris@1
|
78 <td><p class=tiny>libogg documentation</p></td>
|
Chris@1
|
79 <td align=right><p class=tiny>libogg release 1.3.0 - 20110804</p></td>
|
Chris@1
|
80 </tr>
|
Chris@1
|
81 </table>
|
Chris@1
|
82
|
Chris@1
|
83 </body>
|
Chris@1
|
84
|
Chris@1
|
85 </html>
|