1 | <html>
|
---|
2 |
|
---|
3 | <head>
|
---|
4 | <title>libogg - function - ogg_stream_packetout</title>
|
---|
5 | <link rel=stylesheet href="style.css" type="text/css">
|
---|
6 | </head>
|
---|
7 |
|
---|
8 | <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
---|
9 | <table border=0 width=100%>
|
---|
10 | <tr>
|
---|
11 | <td><p class=tiny>libogg documentation</p></td>
|
---|
12 | <td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
---|
13 | </tr>
|
---|
14 | </table>
|
---|
15 |
|
---|
16 | <h1>ogg_stream_packetout</h1>
|
---|
17 |
|
---|
18 | <p><i>declared in "ogg/ogg.h";</i></p>
|
---|
19 |
|
---|
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>
|
---|
25 |
|
---|
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>
|
---|
31 |
|
---|
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>
|
---|
35 |
|
---|
36 | <br><br>
|
---|
37 | <table border=0 color=black cellspacing=0 cellpadding=7>
|
---|
38 | <tr bgcolor=#cccccc>
|
---|
39 | <td>
|
---|
40 | <pre><b>
|
---|
41 | int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
|
---|
42 | </b></pre>
|
---|
43 | </td>
|
---|
44 | </tr>
|
---|
45 | </table>
|
---|
46 |
|
---|
47 | <h3>Parameters</h3>
|
---|
48 | <dl>
|
---|
49 | <dt><i>os</i></dt>
|
---|
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>
|
---|
52 | <dt><i>op</i></dt>
|
---|
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>
|
---|
57 | </dl>
|
---|
58 |
|
---|
59 |
|
---|
60 | <h3>Return Values</h3>
|
---|
61 | <blockquote>
|
---|
62 | <ul>
|
---|
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>
|
---|
66 | </ul>
|
---|
67 | </blockquote>
|
---|
68 |
|
---|
69 | <br><br>
|
---|
70 |
|
---|
71 | <hr noshade>
|
---|
72 |
|
---|
73 | <table border=0 width=100%>
|
---|
74 | <tr valign=top>
|
---|
75 | <td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
---|
76 | <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
---|
77 | </tr><tr>
|
---|
78 | <td><p class=tiny>libogg documentation</p></td>
|
---|
79 | <td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
---|
80 | </tr>
|
---|
81 | </table>
|
---|
82 |
|
---|
83 | </body>
|
---|
84 |
|
---|
85 | </html>
|
---|