[xiph-commits] r16017 - trunk/ogg/doc/libogg

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Tue May 19 17:18:35 PDT 2009


Author: xiphmont
Date: 2009-05-19 17:18:35 -0700 (Tue, 19 May 2009)
New Revision: 16017

Added:
   trunk/ogg/doc/libogg/ogg_iovec_t.html
   trunk/ogg/doc/libogg/ogg_stream_iovecin.html
   trunk/ogg/doc/libogg/oggpack_writecheck.html
Modified:
   trunk/ogg/doc/libogg/bitpacking.html
   trunk/ogg/doc/libogg/encoding.html
   trunk/ogg/doc/libogg/general.html
   trunk/ogg/doc/libogg/ogg_stream_init.html
   trunk/ogg/doc/libogg/ogg_stream_packetin.html
   trunk/ogg/doc/libogg/ogg_stream_pagein.html
   trunk/ogg/doc/libogg/ogg_sync_buffer.html
Log:
Update documentation to reflect new API calls, and extended error return behavior.



Modified: trunk/ogg/doc/libogg/bitpacking.html
===================================================================
--- trunk/ogg/doc/libogg/bitpacking.html	2009-05-19 23:27:38 UTC (rev 16016)
+++ trunk/ogg/doc/libogg/bitpacking.html	2009-05-20 00:18:35 UTC (rev 16017)
@@ -29,6 +29,10 @@
 	<td>Initializes a buffer for writing using this bitpacking library.</td>
 </tr>
 <tr valign=top>
+<td><a href="oggpack_writecheck.html">oggpack_writecheck</a></td>
+	<td>Asynchronously checks error status of bitpacker write buffer.</td>
+</tr>
+<tr valign=top>
 <td><a href="oggpack_reset.html">oggpack_reset</a></td>
 	<td>Clears and resets the buffer to the initial position.</td>
 </tr>

Modified: trunk/ogg/doc/libogg/encoding.html
===================================================================
--- trunk/ogg/doc/libogg/encoding.html	2009-05-19 23:27:38 UTC (rev 16016)
+++ trunk/ogg/doc/libogg/encoding.html	2009-05-20 00:18:35 UTC (rev 16017)
@@ -38,6 +38,10 @@
 	<td>Submits a raw packet to the streaming layer, so that it can be formed into a page.</td>
 </tr>
 <tr valign=top>
+<td><a href="ogg_stream_iovecin.html">ogg_stream_iovecin</a></td>
+	<td>iovec version of ogg_stream_packetin() above.</td>
+</tr>
+<tr valign=top>
 <td><a href="ogg_stream_pageout.html">ogg_stream_pageout</a></td>
 	<td>Outputs a completed page if the stream contains enough packets to form a full page.<td>
 </tr>

Modified: trunk/ogg/doc/libogg/general.html
===================================================================
--- trunk/ogg/doc/libogg/general.html	2009-05-19 23:27:38 UTC (rev 16016)
+++ trunk/ogg/doc/libogg/general.html	2009-05-20 00:18:35 UTC (rev 16017)
@@ -79,7 +79,7 @@
 	<td>Returns the sequential page number for this page.</td>
 </tr>
 <tr valign=top>
-<td><a href="ogg_packet_clear.html">ogg_packet_clear</a><td>
+<td><a href="ogg_packet_clear.html">ogg_packet_clear</a></td>
         <td>Clears the ogg_packet structure.</td>
 </tr>
 <tr valign=top>

Added: trunk/ogg/doc/libogg/ogg_iovec_t.html
===================================================================
--- trunk/ogg/doc/libogg/ogg_iovec_t.html	                        (rev 0)
+++ trunk/ogg/doc/libogg/ogg_iovec_t.html	2009-05-20 00:18:35 UTC (rev 16017)
@@ -0,0 +1,62 @@
+<html>
+
+<head>
+<title>libogg - datatype - ogg_iovec_t</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 - 20011015</p></td>
+</tr>
+</table>
+
+<h1>ogg_iovec_t</h1>
+
+<p><i>declared in "ogg/ogg.h"</i></p>
+
+<p>
+The ogg_iovec_t struct encapsulates a length-encoded buffer.  An array
+of ogg_iovec_t is used to pass a list of buffers to functions that
+accept data in ogg_iovec_t* form.
+<p>
+
+<table border=0 width=100% color=black cellspacing=0 cellpadding=7>
+<tr bgcolor=#cccccc>
+	<td>
+<pre><b>
+typedef struct {
+  void *iov_base;
+  size_t iov_len;
+} ogg_iovec_t;
+</b></pre>
+	</td>
+</tr>
+</table>
+
+<h3>Relevant Struct Members</h3>
+<dl>
+<dt><i>iov_base</i></dt>
+<dd>Pointer to the buffer data.</dd>
+<dt><i>iov_len</i></dt>
+<dd>Length of buffer data in bytes.</dd>
+</dl>
+
+
+<br><br>
+<hr noshade>
+<table border=0 width=100%>
+<tr valign=top>
+<td><p class=tiny>copyright &copy; 2001 xiph.org foundation</p></td>
+<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
+</tr><tr>
+<td><p class=tiny>libogg documentation</p></td>
+<td align=right><p class=tiny>libogg - 20011015</p></td>
+</tr>
+</table>
+
+</body>
+
+</html>

Modified: trunk/ogg/doc/libogg/ogg_stream_init.html
===================================================================
--- trunk/ogg/doc/libogg/ogg_stream_init.html	2009-05-19 23:27:38 UTC (rev 16016)
+++ trunk/ogg/doc/libogg/ogg_stream_init.html	2009-05-20 00:18:35 UTC (rev 16017)
@@ -44,7 +44,7 @@
 <li>
 0 if successful</li>
 <li>
--1 if unsuccessful.  If this fails, the ogg_stream_state was not properly declared before calling this function.</li>
+-1 if unsuccessful.</li>
 </blockquote>
 <p>
 

Added: trunk/ogg/doc/libogg/ogg_stream_iovecin.html
===================================================================
--- trunk/ogg/doc/libogg/ogg_stream_iovecin.html	                        (rev 0)
+++ trunk/ogg/doc/libogg/ogg_stream_iovecin.html	2009-05-20 00:18:35 UTC (rev 16017)
@@ -0,0 +1,83 @@
+<html>
+
+<head>
+<title>libogg - function - ogg_stream_iovecin</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 release 1.0 - 20000615</p></td>
+</tr>
+</table>
+
+<h1>ogg_stream_iovecin</h1>
+
+<p><i>declared in "ogg/ogg.h";</i></p>
+
+<p>This function submits packet data (in the form of
+an array of <a href="ogg_iovec_t.html">ogg_iovec_t</a>, rather than using
+an <a href="ogg_packet.html">ogg_packet</a> structure) to the
+bitstream for page encapsulation. After this is called, more packets
+can be submitted, or pages can be written out.</p>
+
+<p>In a typical encoding situation, this should be used after filling a 
+packet with data.
+The data in the packet is copied into the internal storage managed by 
+the <a href="ogg_stream_state.html">ogg_stream_state</a>, so the caller
+is free to alter the contents of <i>os</i> after this call has returned.
+
+<br><br>
+<table border=0 color=black cellspacing=0 cellpadding=7>
+<tr bgcolor=#cccccc>
+	<td>
+<pre><b>
+int ogg_stream_iovecin(ogg_stream_state *os, ogg_iovec_t *iov, int count, long e_o_s, ogg_int64_t granulepos);
+</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.</dd>
+<dt><i>iov</i></dt>
+<dd>Length-encoded buffers held in an array of <a href="ogg_iovec_t.html">ogg_iovec_t</a>.
+<dt><i>count</i></dt>
+<dd>Length of the iov array.
+<dt><i>e_o_s</i></dt>
+<dd>End of stream flag, analagous to the e_o_s field in an <a href="ogg_packet.html">ogg_packet</a>.
+<dt><i>granulepos</i></dt>
+<dd>Granule position value, analagous to the granpos field in an <a href="ogg_packet.html">ogg_packet</a>.
+</dl>
+
+
+<h3>Return Values</h3>
+<blockquote>
+<li>
+0 returned on success.  -1 returned in the event of internal error
+(currently only caused by a failed memory allocation, a case that can
+only occur on embedded systems.  It is reasonable to ignore the return
+value innormal desktop applications).</li>
+</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>
+<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
+</tr><tr>
+<td><p class=tiny>libogg documentation</p></td>
+<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
+</tr>
+</table>
+
+
+</body>
+
+</html>

Modified: trunk/ogg/doc/libogg/ogg_stream_packetin.html
===================================================================
--- trunk/ogg/doc/libogg/ogg_stream_packetin.html	2009-05-19 23:27:38 UTC (rev 16016)
+++ trunk/ogg/doc/libogg/ogg_stream_packetin.html	2009-05-20 00:18:35 UTC (rev 16017)
@@ -50,7 +50,10 @@
 <h3>Return Values</h3>
 <blockquote>
 <li>
-0 is always returned.</li>
+0 returned on success.  -1 returned in the event of internal error
+(currently only caused by a failed memory allocation, a case that can
+only occur on embedded systems.  It is reasonable to ignore the return
+value innormal desktop applications).</li>
 </blockquote>
 <p>
 

Modified: trunk/ogg/doc/libogg/ogg_stream_pagein.html
===================================================================
--- trunk/ogg/doc/libogg/ogg_stream_pagein.html	2009-05-19 23:27:38 UTC (rev 16016)
+++ trunk/ogg/doc/libogg/ogg_stream_pagein.html	2009-05-20 00:18:35 UTC (rev 16017)
@@ -43,7 +43,7 @@
 
 <h3>Return Values</h3>
 <blockquote>
-<li>-1 indicates failure.  This means that the serial number of the page did not match the serial number of the bitstream, or that the page version was incorrect.</li>
+<li>-1 indicates failure.  This means that the serial number of the page did not match the serial number of the bitstream, the page version was incorrect, or a memory allocation failed.</li>
 <li>
 0 means that the page was successfully submitted to the bitstream.</li>
 </blockquote>

Modified: trunk/ogg/doc/libogg/ogg_sync_buffer.html
===================================================================
--- trunk/ogg/doc/libogg/ogg_sync_buffer.html	2009-05-19 23:27:38 UTC (rev 16016)
+++ trunk/ogg/doc/libogg/ogg_sync_buffer.html	2009-05-20 00:18:35 UTC (rev 16017)
@@ -45,7 +45,7 @@
 <h3>Return Values</h3>
 <blockquote>
 <li>
-Returns a pointer to the newly allocated buffer.</li>
+Returns a pointer to the newly allocated buffer or NULL on error</li>
 </blockquote>
 <p>
 

Added: trunk/ogg/doc/libogg/oggpack_writecheck.html
===================================================================
--- trunk/ogg/doc/libogg/oggpack_writecheck.html	                        (rev 0)
+++ trunk/ogg/doc/libogg/oggpack_writecheck.html	2009-05-20 00:18:35 UTC (rev 16017)
@@ -0,0 +1,81 @@
+<html>
+
+<head>
+<title>libogg - function - oggpack_writecheck</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 release 1.0 - 20000615</p></td>
+</tr>
+</table>
+
+<h1>oggpack_writecheck</h1>
+
+<p><i>declared in "ogg/ogg.h";</i></p>
+
+<p>This function checks the readiness status of
+an <a href="oggpack_buffer.html">oggpack_buffer</a> previously
+initialized for writing using the
+Ogg <a href="bitpacking.html">bitpacking</a> functions.  A write
+buffer that encounters an error (such as a failed malloc) will clear
+its internal state and release any in-use memory, flagging itself as
+'not ready'.  Subsequent attempts to write using the buffer will
+silently fail. This error state may be detected at any later time by
+using oggpack_writecheck().  It is safe but not necessary to
+call <a href="oggpack_clear.html">oggpack_clear()</a> on a buffer that
+has flagged an error and released its resources. 
+
+<p><em>Important note to developers: Although libogg checks the
+results of memory allocations, these checks are only useful on a
+narrow range of embedded platforms. Allocation checks perform no
+useful service on a general purpose desktop OS where pages are
+routinely overallocated and all allocations succeed whether memory is
+available or not.  The only way to detect an out of memory condition
+on the vast majority of OSes is to watch for and capture segmentation
+faults.  This function is useful only to embedded developers.</em>
+ 
+<br><br>
+<table border=0 color=black cellspacing=0 cellpadding=7>
+<tr bgcolor=#cccccc>
+	<td>
+<pre><b>
+int  oggpack_writecheck(<a href="oggpack_buffer.html">oggpack_buffer</a> *b);
+</b></pre>
+	</td>
+</tr>
+</table>
+
+<h3>Parameters</h3>
+<dl>
+<dt><i>b</i></dt>
+<dd>An <a href="oggpack_buffer.html">oggpack_buffer</a> previously initialized for writing.</dd>
+</dl>
+
+
+<h3>Return Values</h3>
+<blockquote>
+<li><i>zero</i>: buffer is ready for writing</li>
+<li><i>nonzero</i>: buffer is not ready or encountered an error</li>
+</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>
+<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
+</tr><tr>
+<td><p class=tiny>libogg documentation</p></td>
+<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
+</tr>
+</table>
+
+
+</body>
+
+</html>



More information about the commits mailing list