1<html>
2
3<head>
4<title>libogg - function - ogg_stream_pageout</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.2.0 - 20100325</p></td>
13</tr>
14</table>
15
16<h1>ogg_stream_pageout</h1>
17
18<p><i>declared in "ogg/ogg.h";</i></p>
19
20<p>This function forms packets into pages.</p>
21
22<p>In a typical encoding situation, this would be called after using <a 
23href="ogg_stream_packetin.html">ogg_stream_packetin()</a> to submit 
24data packets to the bitstream. Internally, this function assembles 
25the accumulated packet bodies into an Ogg page suitable for writing 
26to a stream. The function is typically called in a loop until there
27are no more pages ready for output.</p>
28
29<p>This function will only return a page when a "reasonable" amount of 
30packet data is available. Normally this is appropriate since it 
31limits the overhead of the Ogg page headers in the bitstream, and so
32calling ogg_stream_pageout() after ogg_stream_packetin() should be the 
33common case. Call <a href="ogg_stream_flush.html">ogg_stream_flush()</a> 
34if immediate page generation is desired. This may be occasionally 
35necessary, for example, to limit the temporal latency of a variable 
36bitrate stream.</p>
37
38<br><br>
39<table border=0 color=black cellspacing=0 cellpadding=7>
40<tr bgcolor=#cccccc>
41	<td>
42<pre><b>
43int ogg_stream_pageout(<a href="ogg_stream_state.html">ogg_stream_state</a> *os, <a href="ogg_page.html">ogg_page</a> *og);
44</b></pre>
45	</td>
46</tr>
47</table>
48
49<h3>Parameters</h3>
50<dl>
51<dt><i>os</i></dt>
52<dd>Pointer to a previously declared <a href="ogg_stream.html">ogg_stream</a> struct, which represents the current logical bitstream.</dd>
53<dt><i>og</i></dt>
54<dd>Pointer to an <a href="ogg_page.html">ogg_page</a> structure to fill
55in. Data pointed to is owned by libogg. The structure is valid until the 
56next call to ogg_stream_pageout(), ogg_stream_packetin(), or 
57ogg_stream_flush().</dd>
58</dl>
59
60
61<h3>Return Values</h3>
62<blockquote>
63<li>Zero means that insufficient data has accumulated to fill a page, or an internal error occurred. In 
64this case <i>og</i> is not modified.</li>
65<li>Non-zero means that a page has been completed and returned.</li>
66</blockquote>
67<p>
68
69<br><br>
70<hr noshade>
71<table border=0 width=100%>
72<tr valign=top>
73<td><p class=tiny>copyright &copy; 2000-2010 xiph.org</p></td>
74<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
75</tr><tr>
76<td><p class=tiny>libogg documentation</p></td>
77<td align=right><p class=tiny>libogg release 1.2.0 - 20100325</p></td>
78</tr>
79</table>
80
81
82</body>
83
84</html>
85