Imported Upstream version 1.3.0
[platform/upstream/libogg.git] / doc / libogg / ogg_stream_pageout_fill.html
1 <html>
2
3 <head>
4 <title>libogg - function - ogg_stream_pageout_fill</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.0 - 20110804</p></td>
13 </tr>
14 </table>
15
16 <h1>ogg_stream_pageout_fill</h1>
17
18 <p><i>declared in "ogg/ogg.h";</i></p>
19
20 <p>This function forms packets into pages, similar
21 to <a href="ogg_stream_pageout.html">ogg_stream_pageout()</a>, but
22 allows applications to explicitly request a specific page spill
23 size.</p>
24
25 <p>In a typical encoding situation, this would be called after using <a 
26 href="ogg_stream_packetin.html">ogg_stream_packetin()</a> to submit 
27 data packets to the bitstream. Internally, this function assembles 
28 the accumulated packet bodies into an Ogg page suitable for writing 
29 to a stream. The function is typically called in a loop until there
30 are no more pages ready for output.</p>
31
32 <p>This function will return a page when at least four packets have
33 been accumulated and accumulated packet data meets or exceeds the
34 specified number of bytes, <b>and/or</b> when the accumulated packet
35 data meets/exceeds the maximum page size regardless of accumulated
36 packet count.
37 Call <a href="ogg_stream_flush.html">ogg_stream_flush()</a> or
38 <a href="ogg_stream_flush_fill.html">ogg_stream_flush_fill()</a> if
39 immediate page generation is desired regardless of accumulated data.</p>
40
41 <br><br>
42 <table border=0 color=black cellspacing=0 cellpadding=7>
43 <tr bgcolor=#cccccc>
44         <td>
45 <pre><b>
46 int ogg_stream_pageout_fill(<a href="ogg_stream_state.html">ogg_stream_state</a> *os, <a href="ogg_page.html">ogg_page</a> *og, int fillbytes);
47 </b></pre>
48         </td>
49 </tr>
50 </table>
51
52 <h3>Parameters</h3>
53 <dl>
54 <dt><i>os</i></dt>
55 <dd>Pointer to a previously declared <a href="ogg_stream.html">ogg_stream</a> struct, which represents the current logical bitstream.</dd>
56 <dt><i>og</i></dt>
57 <dd>Pointer to an <a href="ogg_page.html">ogg_page</a> structure to fill
58 in. Data pointed to is owned by libogg. The structure is valid until the 
59 next call to ogg_stream_pageout(), ogg_stream_packetin(), or 
60 ogg_stream_flush().</dd>
61 <dt><i>fillbytes</i></dt>
62 <dd>Packet data watermark in bytes.</dd>
63 </dl>
64
65
66 <h3>Return Values</h3>
67 <blockquote>
68 <li>Zero means that insufficient data has accumulated to fill a page, or an internal error occurred. In 
69 this case <i>og</i> is not modified.</li>
70 <li>Non-zero means that a page has been completed and returned.</li>
71 </blockquote>
72 <p>
73
74 <br><br>
75 <hr noshade>
76 <table border=0 width=100%>
77 <tr valign=top>
78 <td><p class=tiny>copyright &copy; 2000-2010 xiph.org</p></td>
79 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
80 </tr><tr>
81 <td><p class=tiny>libogg documentation</p></td>
82 <td align=right><p class=tiny>libogg release 1.3.0 - 20110804</p></td>
83 </tr>
84 </table>
85
86
87 </body>
88
89 </html>