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