4 <title>Vorbisfile - datatype - OggVorbis_File</title>
5 <link rel=stylesheet href="style.css" type="text/css">
8 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
9 <table border=0 width=100%>
11 <td><p class=tiny>Vorbisfile documentation</p></td>
12 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>
16 <h1>OggVorbis_File</h1>
18 <p><i>declared in "vorbis/vorbisfile.h"</i></p>
21 The OggVorbis_File structure defines an Ogg Vorbis file.
24 This structure is used in all libvorbisfile routines. Before it can be used,
25 it must be initialized by <a href="ov_open.html">ov_open()</a> or <a
26 href="ov_open_callbacks.html">ov_open_callbacks()</a>.
29 After use, the OggVorbis_File structure must be deallocated with a
30 call to <a href="ov_clear.html">ov_clear()</a>.
33 Once a file or data source is opened successfully by libvorbisfile
34 (using <a href="ov_open.html">ov_open()</a> or <a
35 href="ov_open_callbacks.html">ov_open_callbacks()</a>), it is owned by
36 libvorbisfile. The file should not be used by any other applications or
37 functions outside of the libvorbisfile API. The file must not be closed
38 directly by the application at any time after a successful open;
39 libvorbisfile expects to close the file within <a
40 href="ov_clear.html">ov_clear()</a>.
42 If the call to <a href="ov_open.html">ov_open()</a> or <a
43 href="ov_open_callbacks.html">ov_open_callbacks()</a> <b>fails</b>,
44 libvorbisfile does <b>not</b> assume ownership of the file and the
45 application is expected to close it if necessary.
48 <table border=0 width=100% color=black cellspacing=0 cellpadding=7>
51 <pre><b>typedef struct {
52 void *datasource; /* Pointer to a FILE *, etc. */
58 /* If the FILE handle isn't seekable (eg, a pipe), only the current
62 ogg_int64_t *dataoffsets;
64 ogg_int64_t *pcmlengths;
68 /* Decoding working state local storage */
69 ogg_int64_t pcm_offset;
71 long current_serialno;
75 ogg_int64_t samptrack;
77 ogg_stream_state os; /* take physical pages, weld into a logical
79 vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
80 vorbis_block vb; /* local working space for packet->PCM decode */
82 <a href="ov_callbacks.html">ov_callbacks</a> callbacks;
84 } OggVorbis_File;</b></pre>
89 <h3>Relevant Struct Members</h3>
91 <dt><i>datasource</i></dt>
93 <dd>Pointer to file or other ogg source. When using stdio based
94 file/stream access, this field contains a <tt>FILE</tt> pointer. When using
95 custom IO via callbacks, libvorbisfile treats this void pointer as a
96 black box only to be passed to the callback routines provided by the
99 <dt><i>seekable</i></dt>
100 <dd>Read-only int indicating whether file is seekable. E.g., a physical file is seekable, a pipe isn't.</dd>
101 <dt><i>links</i></dt>
102 <dd>Read-only int indicating the number of logical bitstreams within the physical bitstream.</dd>
\r
103 <dt><i>ov_callbacks</i></dt>
\r
104 <dd>Collection of file manipulation routines to be used on this data source. When using stdio/FILE access via <a href="ov_open.html">ov_open()</a>, the callbacks will be filled in with stdio calls or wrappers to stdio calls.</dd>
109 <table border=0 width=100%>
111 <td><p class=tiny>copyright © 2003 Xiph.org</p></td>
112 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
114 <td><p class=tiny>Vorbisfile documentation</p></td>
115 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>