ogg_stream_packetout.html 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <html>
  2. <head>
  3. <title>libogg - function - ogg_stream_packetout</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.4 - 20190830</p></td>
  11. </tr>
  12. </table>
  13. <h1>ogg_stream_packetout</h1>
  14. <p><i>declared in "ogg/ogg.h";</i></p>
  15. <p>This function assembles a data packet for output to the codec
  16. decoding engine. The data has already been submitted to the
  17. <a href="ogg_stream_state.html">ogg_stream_state</a> and broken
  18. into segments. Each successive call returns the next complete packet
  19. built from those segments.</p>
  20. <p>In a typical decoding situation, this should be used after calling
  21. <a href="ogg_stream_pagein.html">ogg_stream_pagein()</a> to submit a
  22. page of data to the bitstream. If the function returns 0, more data is
  23. needed and another page should be submitted. A non-zero return value
  24. indicates successful return of a packet.</p>
  25. <p>The <i>op</i> is filled in with pointers to memory managed by
  26. the stream state and is only valid until the next call. The client
  27. must copy the packet data if a longer lifetime is required.</p>
  28. <br><br>
  29. <table border=0 color=black cellspacing=0 cellpadding=7>
  30. <tr bgcolor=#cccccc>
  31. <td>
  32. <pre><b>
  33. int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
  34. </b></pre>
  35. </td>
  36. </tr>
  37. </table>
  38. <h3>Parameters</h3>
  39. <dl>
  40. <dt><i>os</i></dt>
  41. <dd>Pointer to a previously declared <a
  42. href="ogg_stream_state.html">ogg_stream_state</a> struct. Before this function is called, an <a href="ogg_page.html">ogg_page</a> should be submitted to the stream using <a href="ogg_stream_pagein.html">ogg_stream_pagein()</a>.</dd>
  43. <dt><i>op</i></dt>
  44. <dd>Pointer to the packet to be filled in with pointers to the new data.
  45. This will typically be submitted to a codec for decode after this
  46. function is called. The pointers are only valid until the next call
  47. on this stream state.</dd>
  48. </dl>
  49. <h3>Return Values</h3>
  50. <blockquote>
  51. <ul>
  52. <li>-1 if we are out of sync and there is a gap in the data. This is usually a recoverable error and subsequent calls to ogg_stream_packetout are likely to succeed. <i>op</i> has not been updated.</li>
  53. <li>0 if there is insufficient data available to complete a packet, or on unrecoverable internal error occurred. <i>op</i> has not been updated.
  54. <li>1 if a packet was assembled normally. <i>op</i> contains the next packet from the stream.</li>
  55. </ul>
  56. </blockquote>
  57. <br><br>
  58. <hr noshade>
  59. <table border=0 width=100%>
  60. <tr valign=top>
  61. <td><p class=tiny>copyright &copy; 2000-2019 Xiph.Org Foundation</p></td>
  62. <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
  63. </tr><tr>
  64. <td><p class=tiny>libogg documentation</p></td>
  65. <td align=right><p class=tiny>libogg release 1.3.4 - 20190830</p></td>
  66. </tr>
  67. </table>
  68. </body>
  69. </html>