Merge branch_beta3 onto the mainline.
[platform/upstream/libvorbis.git] / doc / vorbisfile / ov_callbacks.html
1 <html>
2
3 <head>
4 <title>vorbisfile - datatype - ov_callbacks</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>vorbisfile documentation</p></td>
12 <td align=right><p class=tiny>vorbisfile version 1.25 - 20000615</p></td>
13 </tr>
14 </table>
15
16 <h1>ov_callbacks</h1>
17
18 <p><i>declared in "vorbis/codec.h"</i></p>
19
20 <p>
21 The ov_callbacks structure contains file manipulation function prototypes necessary for opening, closing, seeking, and location.
22 <p>
23 The ov_callbacks structure does not need to be user-defined if you are working with a standard file.  The typical <a href="ov_open.html">ov_open()</a> call will fill ov_callbacks for you.  However, ov_callbacks should be defined if you are using other data sources.  In this situation, use <a href="ov_open_callbacks.html">ov_open_callbacks()</a> instead of <a href="ov_open.html">ov_open()</a>.
24 <p>
25
26 <table border=0 width=100% color=black cellspacing=0 cellpadding=7>
27 <tr bgcolor=#cccccc>
28         <td>
29 <pre><b>typedef struct {
30   size_t (*read_func)  (void *ptr, size_t size, size_t nmemb, void *datasource);
31   int    (*seek_func)  (void *datasource, int64_t offset, int whence);
32   int    (*close_func) (void *datasource);
33   long   (*tell_func)  (void *datasource);
34 } ov_callbacks;</b></pre>
35         </td>
36 </tr>
37 </table>
38
39 <h3>Relevant Struct Members</h3>
40 <dl>
41 <dt><i>read_func</i></dt>
42 <dd>Pointer to custom data reading function.</dd>
43 <dt><i>seek_func</i></dt>
44 <dd>Pointer to custom data seeking function.</dd>
45 <dt><i>close_func</i></dt>
46 <dd>Pointer to custom data source closure function.</dd>
47 <dt><i>tell_func</i></dt>
48 <dd>Pointer to custom data location function.</dd>
49 </dl>
50
51
52 <br><br>
53 <hr noshade>
54 <table border=0 width=100%>
55 <tr valign=top>
56 <td><p class=tiny>copyright &copy; 2000 vorbis team</p></td>
57 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team@vorbis.org">team@vorbis.org</a></p></td>
58 </tr><tr>
59 <td><p class=tiny>vorbisfile documentation</p></td>
60 <td align=right><p class=tiny>vorbisfile version 1.25 - 20000615</p></td>
61 </tr>
62 </table>
63
64 </body>
65
66 </html>