4 <title>libogg - function - ogg_stream_packetout</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.2.0 - 20100325</p></td>
16 <h1>ogg_stream_packetout</h1>
18 <p><i>declared in "ogg/ogg.h";</i></p>
20 <p>This function assembles a data packet for output to the codec
21 decoding engine. The data has already been submitted to the
22 <a href="ogg_stream_state.html">ogg_stream_state</a> and broken
23 into segments. Each successive call returns the next complete packet
24 built from those segments.</p>
26 <p>In a typical decoding situation, this should be used after calling
27 <a href="ogg_stream_pagein.html">ogg_stream_pagein()</a> to submit a
28 page of data to the bitstream. If the function returns 0, more data is
29 needed and another page should be submitted. A non-zero return value
30 indicates successful return of a packet.</p>
32 <p>The <i>op</i> is filled in with pointers to memory managed by
33 the stream state and is only valid until the next call. The client
34 must copy the packet data if a longer lifetime is required.</p>
37 <table border=0 color=black cellspacing=0 cellpadding=7>
41 int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
50 <dd>Pointer to a previously declared <a
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>
53 <dd>Pointer to the packet to be filled in with pointers to the new data.
54 This will typically be submitted to a codec for decode after this
55 function is called. The pointers are only valid until the next call
56 on this stream state.</dd>
60 <h3>Return Values</h3>
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>
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.
65 <li>1 if a packet was assembled normally. <i>op</i> contains the next packet from the stream.</li>
73 <table border=0 width=100%>
75 <td><p class=tiny>copyright © 2000-2010 xiph.org</p></td>
76 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
78 <td><p class=tiny>libogg documentation</p></td>
79 <td align=right><p class=tiny>libogg release 1.2.0 - 20100325</p></td>