encoding.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <html>
  2. <head>
  3. <title>libogg - Encoding</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.2.1 - 20101029</p></td>
  11. </tr>
  12. </table>
  13. <h1>Encoding</h1>
  14. <p>Libogg contains a set of functions used in the encoding process.
  15. <p>
  16. All the <b>libogg</b> specific functions are declared in "ogg/ogg.h".
  17. <p>
  18. <p>When encoding, the encoding engine will output raw packets which must be placed into an Ogg bitstream.
  19. <p>Raw packets are inserted into the stream, and an <a href="ogg_page.html">ogg_page</a> is output when enough packets have been written to create a full page. The pages output are pointers to buffered packet segments, and can then be written out and saved as an ogg stream.
  20. <p>There are a couple of basic steps:
  21. <ul>
  22. <li>Use the encoding engine to produce a raw packet of data.
  23. <li>Call <a href="ogg_stream_packetin.html">ogg_stream_packetin</a> to submit a raw packet to the stream.
  24. <li>Use <a href="ogg_stream_pageout.html">ogg_stream_pageout</a> to output a page, if enough data has been submitted. Otherwise, continue submitting data.
  25. </ul>
  26. <br><br>
  27. <table border=1 color=black width=50% cellspacing=0 cellpadding=7>
  28. <tr bgcolor=#cccccc>
  29. <td><b>function</b></td>
  30. <td><b>purpose</b></td>
  31. </tr>
  32. <tr valign=top>
  33. <td><a href="ogg_stream_packetin.html">ogg_stream_packetin</a></td>
  34. <td>Submits a raw packet to the streaming layer, so that it can be formed into a page.</td>
  35. </tr>
  36. <tr valign=top>
  37. <td><a href="ogg_stream_iovecin.html">ogg_stream_iovecin</a></td>
  38. <td>iovec version of ogg_stream_packetin() above.</td>
  39. </tr>
  40. <tr valign=top>
  41. <td><a href="ogg_stream_pageout.html">ogg_stream_pageout</a></td>
  42. <td>Outputs a completed page if the stream contains enough packets to form a full page.<td>
  43. </tr>
  44. <tr valign=top>
  45. <td><a href="ogg_stream_pageout_fill.html">ogg_stream_pageout_fill</a></td>
  46. <td>Similar to ogg_stream_pageout(), but specifies a page spill threshold in bytes.
  47. </tr>
  48. <tr valign=top>
  49. <td><a href="ogg_stream_flush.html">ogg_stream_flush</a></td>
  50. <td>Forces any remaining packets in the stream to be returned as a page of any size.<td>
  51. </tr>
  52. </table>
  53. <br><br>
  54. <hr noshade>
  55. <table border=0 width=100%>
  56. <tr valign=top>
  57. <td><p class=tiny>copyright &copy; 2000-2010 Xiph.Org</p></td>
  58. <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
  59. </tr><tr>
  60. <td><p class=tiny>libogg documentation</p></td>
  61. <td align=right><p class=tiny>libogg release 1.2.1 - 20101029</p></td>
  62. </tr>
  63. </table>
  64. </body>
  65. </html>