summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRalph Giles <giles@xiph.org>2001-05-28 05:30:19 +0000
committerRalph Giles <giles@xiph.org>2001-05-28 05:30:19 +0000
commit66e506a55697aa81c5cc1194f829b4ab8ff640b8 (patch)
treee0c9d2558753c07456d0fbd455287b7bb840c7c7 /doc
parent4a0a325590b296b863e4fb34365837cfae341aa9 (diff)
downloadogg-66e506a55697aa81c5cc1194f829b4ab8ff640b8.tar.gz
added documentation for the ogg_stream_packetpeek() function
plus small cleanups git-svn-id: http://svn.xiph.org/trunk/ogg@1465 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'doc')
-rw-r--r--doc/ogg/decoding.html47
-rw-r--r--doc/ogg/ogg_stream_packetout.html24
-rw-r--r--doc/ogg/ogg_stream_packetpeek.html85
-rw-r--r--doc/ogg/reference.html1
4 files changed, 125 insertions, 32 deletions
diff --git a/doc/ogg/decoding.html b/doc/ogg/decoding.html
index 38f1449..4a876b3 100644
--- a/doc/ogg/decoding.html
+++ b/doc/ogg/decoding.html
@@ -17,20 +17,20 @@
<p>Libogg contains a set of functions used in the decoding process.
<p>
All the <b>libogg</b> specific functions are declared in "ogg/ogg.h".
-<p>
+<p>
<p>Decoding is based around the ogg synchronization layer. The <a href="ogg_sync_state.html">ogg_sync_state</a> struct coordinates between incoming data and the decoder. We read data into the synchronization layer, submit the data to the stream, and output raw packets to the decoder.
<p>Decoding through the Ogg layer follows a specific logical sequence. A read loop follows these logical steps:
-<ul>
-<li>Expose a buffer using <a href="ogg_sync_buffer.html">ogg_sync_buffer()</a>.
-<li>Read data into the buffer, using fread() or a similar function.
-<li>Call <a href="ogg_sync_wrote.html">ogg_sync_wrote()</a> to tell the synchronization layer how many bytes you wrote into the buffer.
-<li>Write out the data using <a href="ogg_sync_pageout.html">ogg_sync_pageout</a>.
-<li>Submit the completed page to the streaming layer with <a href="ogg_stream_pagein.html">ogg_stream_pagein</a>.
+<ul>
+<li>Expose a buffer using <a href="ogg_sync_buffer.html">ogg_sync_buffer()</a>.
+<li>Read data into the buffer, using fread() or a similar function.
+<li>Call <a href="ogg_sync_wrote.html">ogg_sync_wrote()</a> to tell the synchronization layer how many bytes you wrote into the buffer.
+<li>Write out the data using <a href="ogg_sync_pageout.html">ogg_sync_pageout</a>.
+<li>Submit the completed page to the streaming layer with <a href="ogg_stream_pagein.html">ogg_stream_pagein</a>.
<li>Output a packet of data to the codec-specific decoding layer using <a href="ogg_stream_packetout.html">ogg_stream_packetout</a>.
-</ul>
-<p>In practice, streams are more complex, and Ogg also must handle headers, incomplete or dropped pages, and other errors in input.
-<br><br>
-
+</ul>
+<p>In practice, streams are more complex, and Ogg also must handle headers, incomplete or dropped pages, and other errors in input.
+<br><br>
+
<table border=1 color=black width=50% cellspacing=0 cellpadding=7>
<tr bgcolor=#cccccc>
<td><b>function</b></td>
@@ -39,43 +39,48 @@ All the <b>libogg</b> specific functions are declared in "ogg/ogg.h".
<tr valign=top>
<td><a href="ogg_sync_init.html">ogg_sync_init</a></td>
<td>Initializes an Ogg bitstream.</td>
-</tr>
+</tr>
<tr valign=top>
<td><a href="ogg_sync_clear.html">ogg_sync_clear</a></td>
<td>Clears the status information from the synchronization struct.<td>
-</tr>
+</tr>
<tr valign=top>
<td><a href="ogg_sync_reset.html">ogg_sync_reset</a></td>
<td>Resets the synchronization status to initial values.</td>
-</tr>
+</tr>
<tr valign=top>
<td><a href="ogg_sync_destroy.html">ogg_sync_destroy</a></td>
<td>Frees the synchronization struct.</td>
-</tr>
+</tr>
<tr valign=top>
<td><a href="ogg_sync_buffer.html">ogg_sync_buffer</a></td>
<td>Exposes a buffer from the synchronization layer in order to read data.</td>
-</tr>
+</tr>
<tr valign=top>
<td><a href="ogg_sync_wrote.html">ogg_sync_wrote</a></td>
<td>Tells the synchronization layer how many bytes were written into the buffer.</td>
-</tr>
+</tr>
<tr valign=top>
<td><a href="ogg_sync_pageseek.html">ogg_sync_pageseek</a></td>
<td>Finds the borders of pages and resynchronizes the stream.</td>
-</tr>
+</tr>
<tr valign=top>
<td><a href="ogg_sync_pageout.html">ogg_sync_pageout</a></td>
<td>Outputs a page from the synchronization layer.</td>
-</tr>
+</tr>
<tr valign=top>
<td><a href="ogg_stream_pagein.html">ogg_stream_pagein</a></td>
<td>Submits a complete page to the stream layer.</td>
-</tr>
+</tr>
<tr valign=top>
<td><a href="ogg_stream_packetout.html">ogg_stream_packetout</a></td>
<td>Outputs a packet to the codec-specific decoding engine.</td>
-</tr>
+</tr>
+<tr valign=top>
+<td><a href="ogg_stream_packetpeek.html">ogg_stream_packetpeek</a></td>
+ <td>Provides access to the next packet in the bitstream without
+advancing decoding.</td>
+</tr>
</table>
<br><br>
diff --git a/doc/ogg/ogg_stream_packetout.html b/doc/ogg/ogg_stream_packetout.html
index 9c59356..bd127fd 100644
--- a/doc/ogg/ogg_stream_packetout.html
+++ b/doc/ogg/ogg_stream_packetout.html
@@ -17,15 +17,15 @@
<p><i>declared in "ogg/ogg.h";</i></p>
-<p>This function assembles a raw data packet for output to the codec decoding engine. The data is already in the stream and broken into packet segments.
-<p>In a typical decoding situation, this should be used after calling <a href="ogg_stream_pagein.html"> to submit a page of data to the bitstream.
+<p>This function assembles a raw data packet for output to the codec decoding engine. The data is already in the stream and broken into packet segments.</p>
+<p>In a typical decoding situation, this should be used after calling <a href="ogg_stream_pagein.html">ogg_stream_pagein()</a> to submit a page of data to the bitstream.</p>
<br><br>
<table border=0 color=black cellspacing=0 cellpadding=7>
<tr bgcolor=#cccccc>
<td>
<pre><b>
-int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
+int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
</b></pre>
</td>
</tr>
@@ -34,22 +34,25 @@ int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
<h3>Parameters</h3>
<dl>
<dt><i>os</i></dt>
-<dd>Pointer to a previously declared <a 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.<dd>
-<dt><i>op</i></dt>
-<dd>Pointer to the packet that will be submitted to the decoding layer after this function is called.
+<dd>Pointer to a previously declared <a
+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>
+<dt><i>op</i></dt>
+<dd>Pointer to the packet that will be submitted to the decoding layer after this function is called.</dd>
</dl>
<h3>Return Values</h3>
<blockquote>
-<li>-1 if we are out of sync and there is a gap in the data. Usually this will not be a fatal error.
-<li>
-1 in all other cases.</li>
+<ul>
+<li>-1 if we are out of sync and there is a gap in the data. Usually this will not be a fatal error.</li>
+<li>1 in all other cases.</li>
+</ul>
</blockquote>
-<p>
<br><br>
+
<hr noshade>
+
<table border=0 width=100%>
<tr valign=top>
<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
@@ -60,7 +63,6 @@ int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
</tr>
</table>
-
</body>
</html>
diff --git a/doc/ogg/ogg_stream_packetpeek.html b/doc/ogg/ogg_stream_packetpeek.html
new file mode 100644
index 0000000..892977b
--- /dev/null
+++ b/doc/ogg/ogg_stream_packetpeek.html
@@ -0,0 +1,85 @@
+<html>
+
+<head>
+<title>libogg - function - ogg_stream_packetpeek</title>
+<link rel=stylesheet href="style.css" type="text/css">
+</head>
+
+<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
+<table border=0 width=100%>
+<tr>
+<td><p class=tiny>libogg documentation</p></td>
+<td align=right><p class=tiny>libogg version 1.26 - 20010527</p></td>
+</tr>
+</table>
+
+<h1>ogg_stream_packetout</h1>
+
+<p><i>declared in "ogg/ogg.h";</i></p>
+
+<p>This function attempts to assemble a raw data packet and returns
+it without advancing decoding.</p>
+
+<p>In a typical situation, this would be called
+speculatively after <a
+href="ogg_stream_pagein.html">ogg_stream_pagein()</a> to check
+the packet contents before handing it off to a codec for
+decompression. To advance page decoding and remove
+the packet from the sync structure, call
+<a href="ogg_stream_packetout.html">ogg_stream_packetout()</a>.</p>
+
+<br><br>
+
+<table border=0 color=black cellspacing=0 cellpadding=7>
+<tr bgcolor=#cccccc>
+ <td>
+<pre><b>
+int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op);
+</b></pre>
+ </td>
+</tr>
+</table>
+
+<h3>Parameters</h3>
+<dl>
+<dt><i>os</i></dt>
+<dd>Pointer to a previously declared
+<a 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>
+<dt><i>op</i></dt>
+<dd>Pointer to the next packet available in the bitstream, if
+any. A NULL value may be passed in the case of a simple "is there a
+packet?" check.</dd>
+</dl>
+
+
+<h3>Return Values</h3>
+<blockquote>
+<ul>
+<li>-1 if there's no packet available due to lost sync or a hole
+in the data.</li>
+<li>1 if a packet is available.</li>
+</ul>
+</blockquote>
+
+
+<br><br>
+
+<hr noshade>
+
+<table border=0 width=100%>
+<tr valign=top>
+<td><p class=tiny>copyright &copy; 2001 xiph.org</p></td>
+<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team@xiph.org">team@xiph.org</a></p></td>
+</tr><tr>
+<td><p class=tiny>libogg documentation</p></td>
+<td align=right><p class=tiny>libogg version 1.26 - 20010527</p></td>
+</tr>
+</table>
+
+
+</body>
+
+</html>
diff --git a/doc/ogg/reference.html b/doc/ogg/reference.html
index 0d3639d..fecb075 100644
--- a/doc/ogg/reference.html
+++ b/doc/ogg/reference.html
@@ -52,6 +52,7 @@
<a href="ogg_sync_pageout.html">ogg_sync_pageout()</a><br>
<a href="ogg_stream_pagein.html">ogg_stream_pagein()</a><br>
<a href="ogg_stream_packetout.html">ogg_stream_packetout()</a><br>
+<a href="ogg_stream_packetpeek.html">ogg_stream_packetpeek()</a><br>
<br>
<b>Encoding-Related</b><br>
<a href="ogg_stream_packetin.html">ogg_stream_packetin()</a><br>