examples/sfexamples/oggvorbiscodec/src/libvorbis/doc/vorbisfile/OggVorbis_File.html

00001 <html>
00002 
00003 <head>
00004 <title>Vorbisfile - 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>Vorbisfile documentation</p></td>
00012 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>
00013 </tr>
00014 </table>
00015 
00016 <h1>OggVorbis_File</h1>
00017 
00018 <p><i>declared in "vorbis/vorbisfile.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 libvorbisfile 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 libvorbisfile
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 libvorbisfile.  The file should not be used by any other applications or
00037 functions outside of the libvorbisfile API.  The file must not be closed
00038 directly by the application at any time after a successful open;
00039 libvorbisfile 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 libvorbisfile 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; /* Pointer to a FILE *, etc. */
00053   int              seekable;
00054   ogg_int64_t      offset;
00055   ogg_int64_t      end;
00056   ogg_sync_state   oy; 
00057 
00058   /* If the FILE handle isn't seekable (eg, a pipe), only the current
00059      stream appears */
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   /* Decoding working state local storage */
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; /* take physical pages, weld into a logical
00078                           stream of packets */
00079   vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
00080   vorbis_block     vb; /* local working space for packet->PCM decode */
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, libvorbisfile 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 <br><br>
00108 <hr noshade>
00109 <table border=0 width=100%>
00110 <tr valign=top>
00111 <td><p class=tiny>copyright &copy; 2003 Xiph.org</p></td>
00112 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
00113 </tr><tr>
00114 <td><p class=tiny>Vorbisfile documentation</p></td>
00115 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>
00116 </tr>
00117 </table>
00118 
00119 </body>
00120 
00121 </html>

Generated by  doxygen 1.6.2