Merge branch_beta3 onto the mainline.
[platform/upstream/libvorbis.git] / doc / vorbisfile / OggVorbis_File.html
1 <html>
2
3 <head>
4 <title>vorbisfile - datatype - OggVorbis_File</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>OggVorbis_File</h1>
17
18 <p><i>declared in "vorbis/vorbisfile.h"</i></p>
19
20 <p>
21 The OggVorbis_File structure defines an Ogg Vorbis file.
22 <p>
23 This structure is used in all vorbisfile routines.  Before it can be used, it must be initialized by <a href="ov_open.html">ov_open</a> or <a href="ov_open_callbacks.html">ov_open_callbacks</a>.
24 <p>
25 After use, the OggVorbis_File structure must be deallocated with a call to <a href="ov_clear.html">ov_clear()</a>.\r
26 <p>Once a file or data source is passed to libvorbisfile, it is owned by vorbisfile.  The file should not be used by any other applications or functions outside the Vorbisfile API.
27 <br><br>
28 <table border=0 width=100% color=black cellspacing=0 cellpadding=7>
29 <tr bgcolor=#cccccc>
30         <td>
31 <pre><b>typedef struct {
32   void             *datasource; /* Pointer to a FILE *, etc. */
33   int              seekable;
34   int64_t          offset;
35   int64_t          end;
36   ogg_sync_state   oy; 
37
38   /* If the FILE handle isn't seekable (eg, a pipe), only the current
39      stream appears */
40   int              links;
41   int64_t          *offsets;
42   int64_t          *dataoffsets;
43   long             *serialnos;
44   int64_t          *pcmlengths;
45   vorbis_info      *vi;
46   vorbis_comment   *vc;
47
48   /* Decoding working state local storage */
49   int64_t          pcm_offset;
50   int              decode_ready;
51   long             current_serialno;
52   int              current_link;
53
54   double           bittrack;
55   double           samptrack;
56
57   ogg_stream_state os; /* take physical pages, weld into a logical
58                           stream of packets */
59   vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
60   vorbis_block     vb; /* local working space for packet->PCM decode */
61
62   <a href="ov_callbacks.html">ov_callbacks</a> callbacks;
63
64 } OggVorbis_File;</b></pre>
65         </td>
66 </tr>
67 </table>
68
69 <h3>Relevant Struct Members</h3>
70 <dl>
71 <dt><i>datasource</i></dt>
72 <dd>Pointer to file or other ogg source.</dd>
73 <dt><i>seekable</i></dt>
74 <dd>Read-only int indicating whether file is seekable, i.e., physical file is seekable, a pipe isn't.</dd>
75 <dt><i>links</i></dt>
76 <dd>Read-only int indicating the number of logical bitstreams within the physical bitstream.</dd>\r
77 <dt><i>ov_callbacks</i></dt>\r
78 <dd>Collection of file manipulation routines to be used on this data source.</dd>
79 </dl>
80
81 <h3>Notes</h3>
82
83 <p>If your system's <tt>&lt;sys/types.h></tt> does not
84 define <tt>int64_t,</tt> you will need to define this as a 64-bit type
85 inside your system's project file/Makefile, etc. On win32, for example,
86 this should be defined as <tt>__int64</tt>. On the Unix platform, these
87 are usually defined properly in the system header files.
88 <p>
89
90
91 <br><br>
92 <hr noshade>
93 <table border=0 width=100%>
94 <tr valign=top>
95 <td><p class=tiny>copyright &copy; 2000 vorbis team</p></td>
96 <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>
97 </tr><tr>
98 <td><p class=tiny>vorbisfile documentation</p></td>
99 <td align=right><p class=tiny>vorbisfile version 1.25 - 20000615</p></td>
100 </tr>
101 </table>
102
103 </body>
104
105 </html>