VirtualBox

source: vbox/trunk/src/libs/libogg-1.3.5/doc/libogg/ogg_stream_packetpeek.html

Last change on this file was 96360, checked in by vboxsync, 2 years ago

libogg, libvorbis: export to OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1<html>
2
3<head>
4<title>libogg - function - ogg_stream_packetpeek</title>
5<link rel=stylesheet href="style.css" type="text/css">
6</head>
7
8<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
9<table border=0 width=100%>
10<tr>
11<td><p class=tiny>libogg documentation</p></td>
12<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
13</tr>
14</table>
15
16<h1>ogg_stream_packetpeek</h1>
17
18<p><i>declared in "ogg/ogg.h";</i></p>
19
20<p>This function attempts to assemble a raw data packet and returns
21it without advancing decoding.</p>
22
23<p>In a typical situation, this would be called
24speculatively after <a
25href="ogg_stream_pagein.html">ogg_stream_pagein()</a> to check
26the packet contents before handing it off to a codec for
27decompression. To advance page decoding and remove
28the packet from the sync structure, call
29<a href="ogg_stream_packetout.html">ogg_stream_packetout()</a>.</p>
30
31<br><br>
32
33<table border=0 color=black cellspacing=0 cellpadding=7>
34<tr bgcolor=#cccccc>
35 <td>
36<pre><b>
37int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op);
38</b></pre>
39 </td>
40</tr>
41</table>
42
43<h3>Parameters</h3>
44<dl>
45<dt><i>os</i></dt>
46<dd>Pointer to a previously declared
47<a href="ogg_stream_state.html">ogg_stream_state</a> struct. Before this
48function is called, an <a href="ogg_page.html">ogg_page</a> should be
49submitted to the stream using
50<a href="ogg_stream_pagein.html">ogg_stream_pagein()</a>.</dd>
51<dt><i>op</i></dt>
52<dd>Pointer to the next packet available in the bitstream, if
53any. A NULL value may be passed in the case of a simple "is there a
54packet?" check.</dd>
55</dl>
56
57
58<h3>Return Values</h3>
59<blockquote>
60<ul>
61<li>-1 if there's no packet available due to lost sync or a hole in the data.</li>
62<li>0 if there is insufficient data available to complete a packet, or on unrecoverable internal error occurred.</li>
63<li>1 if a packet is available.</li>
64</ul>
65</blockquote>
66
67
68<br><br>
69
70<hr noshade>
71
72<table border=0 width=100%>
73<tr valign=top>
74<td><p class=tiny>copyright &copy; 2000-2021 Xiph.Org Foundation</p></td>
75<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
76</tr><tr>
77<td><p class=tiny>libogg documentation</p></td>
78<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
79</tr>
80</table>
81
82
83</body>
84
85</html>
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette