blob: 980aeb200d04d441ce50693b711fd651f4860ac5 [file] [log] [blame]
<title>libogg - function - ogg_stream_flush</title>
<link rel=stylesheet href="style.css" type="text/css">
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
<table border=0 width=100%>
<td><p class=tiny>libogg documentation</p></td>
<td align=right><p class=tiny>libogg release 1.3.3 - 20171107</p></td>
<p><i>declared in "ogg/ogg.h";</i></p>
<p>This function checks for remaining packets inside the stream and forces remaining packets into a page, regardless of the size of the page.
<p>This should only be used when you want to flush an undersized page from the middle of the stream. Otherwise, <a href="ogg_stream_pageout.html">ogg_stream_pageout</a> or <a href="ogg_stream_pageout_fill.html">ogg_stream_pageout_fill</a> should always be used.
<p>This function can also be used to verify that all packets have been flushed. If the return value is 0, all packets have been placed into a page. Like <a href="ogg_stream_pageout.html">ogg_stream_pageout</a>, it should generally be called in a loop until available packet data has been flushes, since even a single packet may span multiple pages.
<table border=0 color=black cellspacing=0 cellpadding=7>
<tr bgcolor=#cccccc>
int ogg_stream_flush(<a href="ogg_stream_state.html">ogg_stream_state</a> *os, <a href="ogg_page.html">ogg_page</a> *og);
<dd>Pointer to a previously declared <a href="ogg_stream_state.html">ogg_stream_state</a> struct, which represents the current logical bitstream.</dd>
<dd>Pointer to a page of data. The remaining packets in the stream will be placed into this page, if any remain.
<h3>Return Values</h3>
<li>0 means that all packet data has already been flushed into pages, and there are no packets to put into the page. 0 is also returned in the case of an <a href="ogg_stream_state.html">ogg_stream_state</a> that has been cleared explicitly or implicitly due to an internal error.</li>
Nonzero means that remaining packets have successfully been flushed into the page.</li>
<hr noshade>
<table border=0 width=100%>
<tr valign=top>
<td><p class=tiny>copyright &copy; 2000-2017 Xiph.Org Foundation</p></td>
<td align=right><p class=tiny><a href="">Ogg Container Format</a></p></td>
<td><p class=tiny>libogg documentation</p></td>
<td align=right><p class=tiny>libogg release 1.3.3 - 20171107</p></td>