examples/sfexamples/oggvorbiscodec/src/tremor/doc/ov_callbacks.html

00001 <html>
00002 
00003 <head>
00004 <title>Tremor - datatype - ov_callbacks</title>
00005 <link rel=stylesheet href="style.css" type="text/css">
00006 </head>
00007 
00008 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
00009 <table border=0 width=100%>
00010 <tr>
00011 <td><p class=tiny>Tremor documentation</p></td>
00012 <td align=right><p class=tiny>Tremor version 1.0 - 20020403</p></td>
00013 </tr>
00014 </table>
00015 
00016 <h1>ov_callbacks</h1>
00017 
00018 <p><i>declared in "ivorbiscodec.h"</i></p>
00019 
00020 <p>
00021 The ov_callbacks structure contains file manipulation function prototypes necessary for opening, closing, seeking, and location.
00022 
00023 <p>
00024 The ov_callbacks structure does not need to be user-defined if you are
00025 working with stdio-based file manipulation; the <a
00026 href="ov_open.html">ov_open()</a> call provides default callbacks for
00027 stdio.  ov_callbacks are defined and passed to <a
00028 href="ov_open_callbacks.html">ov_open_callbacks()</a> when
00029 implementing non-stdio based stream manipulation (such as playback
00030 from a memory buffer).
00031 <p>
00032 
00033 <table border=0 width=100% color=black cellspacing=0 cellpadding=7>
00034 <tr bgcolor=#cccccc>
00035         <td>
00036 <pre><b>typedef struct {
00037   size_t (*read_func)  (void *ptr, size_t size, size_t nmemb, void *datasource);
00038   int    (*seek_func)  (void *datasource, ogg_int64_t offset, int whence);
00039   int    (*close_func) (void *datasource);
00040   long   (*tell_func)  (void *datasource);
00041 } ov_callbacks;</b></pre>
00042         </td>
00043 </tr>
00044 </table>
00045 
00046 <h3>Relevant Struct Members</h3>
00047 <dl>
00048 <dt><i>read_func</i></dt>
00049 <dd>Pointer to custom data reading function.</dd>
00050 <dt><i>seek_func</i></dt>
00051 <dd>Pointer to custom data seeking function. If the data source is not seekable (or the application wants the data source to be treated as unseekable at all times), the provided seek callback should always return -1 (failure).</dd>
00052 <dt><i>close_func</i></dt>
00053 <dd>Pointer to custom data source closure function.</dd>
00054 <dt><i>tell_func</i></dt>
00055 <dd>Pointer to custom data location function.</dd>
00056 </dl>
00057 
00058 <p>
00059 
00060 See <a href="callbacks.html">the callbacks and non-stdio I/O document</a> for more
00061 detailed information on required behavior of the various callback
00062 functions.<p>
00063 
00064 <br><br>
00065 <hr noshade>
00066 <table border=0 width=100%>
00067 <tr valign=top>
00068 <td><p class=tiny>copyright &copy; 2002 Xiph.org</p></td>
00069 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
00070 </tr><tr>
00071 <td><p class=tiny>Tremor documentation</p></td>
00072 <td align=right><p class=tiny>Tremor version 1.0 - 20020403</p></td>
00073 </tr>
00074 </table>
00075 
00076 </body>
00077 
00078 </html>

Generated by  doxygen 1.6.2