Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>liboggz: Writing by force feeding Oggz</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Writing by force feeding Oggz</h1>
<p>Force feeding involves synchronously:</p>
<ul>
<li>Creating an <em>ogg_packet</em> structure</li>
<li>Adding it to the packet queue with <a class="el" href="group__write__api.html#ga6ccaceb107db1fd2eae047dbdbaa5889" title="Add a packet to oggz&#39;s packet queue.">oggz_write_feed()</a></li>
<li>Calling <a class="el" href="group__write__api.html#ga3c97d94ea425d64546adf9c368b71904" title="Write n bytes from an OGGZ handle.">oggz_write()</a> or <a class="el" href="group__write__api.html#ga5606dff01964caec4582eb172fde0c1c" title="Output data from an OGGZ handle.">oggz_write_output()</a>, repeatedly as necessary, to generate the Ogg bitstream. </li>
</ul>
 
<a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
</table>
<p>Force feeding involves synchronously:</p>
<ul>
<li>Creating an <em>ogg_packet</em> structure</li>
<li>Adding it to the packet queue with <a class="el" href="group__write__api.html#ga6ccaceb107db1fd2eae047dbdbaa5889" title="Add a packet to oggz&#39;s packet queue.">oggz_write_feed()</a></li>
<li>Calling <a class="el" href="group__write__api.html#ga3c97d94ea425d64546adf9c368b71904" title="Write n bytes from an OGGZ handle.">oggz_write()</a> or <a class="el" href="group__write__api.html#ga5606dff01964caec4582eb172fde0c1c" title="Output data from an OGGZ handle.">oggz_write_output()</a>, repeatedly as necessary, to generate the Ogg bitstream. </li>
</ul>
<p>This process is illustrated in the following diagram:</p>
<div align="center">
<img src="forcefeed.png" alt="forcefeed.png"/>
</div>
 <p>The following example code generates a stream of ten packets, each containing a single byte ('A', 'B', ... , 'J'):</p>
<div class="fragment"><pre class="fragment"></pre></div> </div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Sat Apr 24 09:13:55 2010 for liboggz by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>