00001 <html>
00002
00003 <head>
00004 <title>Tremor - datatype - OggVorbis_File</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>OggVorbis_File</h1>
00017
00018 <p><i>declared in "ivorbisfile.h"</i></p>
00019
00020 <p>
00021 The OggVorbis_File structure defines an Ogg Vorbis file.
00022 <p>
00023
00024 This structure is used in all libvorbisidec routines. Before it can be used,
00025 it must be initialized by <a href="ov_open.html">ov_open()</a> or <a
00026 href="ov_open_callbacks.html">ov_open_callbacks()</a>.
00027
00028 <p>
00029 After use, the OggVorbis_File structure must be deallocated with a
00030 call to <a href="ov_clear.html">ov_clear()</a>.
00031
00032 <p>
00033 Once a file or data source is opened successfully by libvorbisidec
00034 (using <a href="ov_open.html">ov_open()</a> or <a
00035 href="ov_open_callbacks.html">ov_open_callbacks()</a>), it is owned by
00036 libvorbisidec. The file should not be used by any other applications or
00037 functions outside of the libvorbisidec API. The file must not be closed
00038 directly by the application at any time after a successful open;
00039 libvorbisidec expects to close the file within <a
00040 href="ov_clear.html">ov_clear()</a>.
00041 <p>
00042 If the call to <a href="ov_open.html">ov_open()</a> or <a
00043 href="ov_open_callbacks.html">ov_open_callbacks()</a> <b>fails</b>,
00044 libvorbisidec does <b>not</b> assume ownership of the file and the
00045 application is expected to close it if necessary.
00046
00047 <br><br>
00048 <table border=0 width=100% color=black cellspacing=0 cellpadding=7>
00049 <tr bgcolor=#cccccc>
00050 <td>
00051 <pre><b>typedef struct {
00052 void *datasource;
00053 int seekable;
00054 ogg_int64_t offset;
00055 ogg_int64_t end;
00056 ogg_sync_state oy;
00057
00058
00059
00060 int links;
00061 ogg_int64_t *offsets;
00062 ogg_int64_t *dataoffsets;
00063 long *serialnos;
00064 ogg_int64_t *pcmlengths;
00065 vorbis_info *vi;
00066 vorbis_comment *vc;
00067
00068
00069 ogg_int64_t pcm_offset;
00070 int ready_state;
00071 long current_serialno;
00072 int current_link;
00073
00074 ogg_int64_t bittrack;
00075 ogg_int64_t samptrack;
00076
00077 ogg_stream_state os;
00078
00079 vorbis_dsp_state vd;
00080 vorbis_block vb;
00081
00082 <a href="ov_callbacks.html">ov_callbacks</a> callbacks;
00083
00084 } OggVorbis_File;</b></pre>
00085 </td>
00086 </tr>
00087 </table>
00088
00089 <h3>Relevant Struct Members</h3>
00090 <dl>
00091 <dt><i>datasource</i></dt>
00092
00093 <dd>Pointer to file or other ogg source. When using stdio based
00094 file/stream access, this field contains a <tt>FILE</tt> pointer. When using
00095 custom IO via callbacks, libvorbisidec treats this void pointer as a
00096 black box only to be passed to the callback routines provided by the
00097 application.</dd>
00098
00099 <dt><i>seekable</i></dt>
00100 <dd>Read-only int indicating whether file is seekable. E.g., a physical file is seekable, a pipe isn't.</dd>
00101 <dt><i>links</i></dt>
00102 <dd>Read-only int indicating the number of logical bitstreams within the physical bitstream.</dd>
00103 <dt><i>ov_callbacks</i></dt>
00104 <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>
00105 </dl>
00106
00107 <h3>Notes</h3>
00108
00109 <p>Tremor requires a native 64 bit integer type to compile and
00110 function; The GNU build system will locate and typedef
00111 <tt>ogg_int64_t</tt> to the appropriate native type. If not using the
00112 GNU build tools, you will need to define <tt>ogg_int64_t</tt> as a
00113 64-bit type inside your system's project file/Makefile, etc. On win32,
00114 for example, this should be defined as <tt>__int64</tt>.
00115 <p>
00116
00117
00118 <br><br>
00119 <hr noshade>
00120 <table border=0 width=100%>
00121 <tr valign=top>
00122 <td><p class=tiny>copyright © 2002 Xiph.org</p></td>
00123 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
00124 </tr><tr>
00125 <td><p class=tiny>Tremor documentation</p></td>
00126 <td align=right><p class=tiny>Tremor version 1.0 - 20020403</p></td>
00127 </tr>
00128 </table>
00129
00130 </body>
00131
00132 </html>