2
0

ogg_stream_flush.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <html>
  2. <head>
  3. <title>libogg - function - ogg_stream_flush</title>
  4. <link rel=stylesheet href="style.css" type="text/css">
  5. </head>
  6. <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
  7. <table border=0 width=100%>
  8. <tr>
  9. <td><p class=tiny>libogg documentation</p></td>
  10. <td align=right><p class=tiny>libogg release 1.3.2 - 20140527</p></td>
  11. </tr>
  12. </table>
  13. <h1>ogg_stream_flush</h1>
  14. <p><i>declared in "ogg/ogg.h";</i></p>
  15. <p>This function checks for remaining packets inside the stream and forces remaining packets into a page, regardless of the size of the page.
  16. <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.
  17. <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.
  18. <br><br>
  19. <table border=0 color=black cellspacing=0 cellpadding=7>
  20. <tr bgcolor=#cccccc>
  21. <td>
  22. <pre><b>
  23. int ogg_stream_flush(<a href="ogg_stream_state.html">ogg_stream_state</a> *os, <a href="ogg_page.html">ogg_page</a> *og);
  24. </b></pre>
  25. </td>
  26. </tr>
  27. </table>
  28. <h3>Parameters</h3>
  29. <dl>
  30. <dt><i>os</i></dt>
  31. <dd>Pointer to a previously declared <a href="ogg_stream_state.html">ogg_stream_state</a> struct, which represents the current logical bitstream.</dd>
  32. <dt><i>og</i></dt>
  33. <dd>Pointer to a page of data. The remaining packets in the stream will be placed into this page, if any remain.
  34. </dl>
  35. <h3>Return Values</h3>
  36. <blockquote>
  37. <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>
  38. <li>
  39. Nonzero means that remaining packets have successfully been flushed into the page.</li>
  40. </blockquote>
  41. <p>
  42. <br><br>
  43. <hr noshade>
  44. <table border=0 width=100%>
  45. <tr valign=top>
  46. <td><p class=tiny>copyright &copy; 2000-2014 Xiph.Org</p></td>
  47. <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
  48. </tr><tr>
  49. <td><p class=tiny>libogg documentation</p></td>
  50. <td align=right><p class=tiny>libogg release 1.3.2 - 20140527</p></td>
  51. </tr>
  52. </table>
  53. </body>
  54. </html>