cannam@86
|
1 <html>
|
cannam@86
|
2
|
cannam@86
|
3 <head>
|
cannam@86
|
4 <title>Vorbisfile - datatype - OggVorbis_File</title>
|
cannam@86
|
5 <link rel=stylesheet href="style.css" type="text/css">
|
cannam@86
|
6 </head>
|
cannam@86
|
7
|
cannam@86
|
8 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
cannam@86
|
9 <table border=0 width=100%>
|
cannam@86
|
10 <tr>
|
cannam@86
|
11 <td><p class=tiny>Vorbisfile documentation</p></td>
|
cannam@86
|
12 <td align=right><p class=tiny>vorbisfile version 1.3.2 - 20101101</p></td>
|
cannam@86
|
13 </tr>
|
cannam@86
|
14 </table>
|
cannam@86
|
15
|
cannam@86
|
16 <h1>OggVorbis_File</h1>
|
cannam@86
|
17
|
cannam@86
|
18 <p><i>declared in "vorbis/vorbisfile.h"</i></p>
|
cannam@86
|
19
|
cannam@86
|
20 <p>
|
cannam@86
|
21 The OggVorbis_File structure defines an Ogg Vorbis file.
|
cannam@86
|
22 <p>
|
cannam@86
|
23
|
cannam@86
|
24 This structure is used in all libvorbisfile routines. Before it can
|
cannam@86
|
25 be used, it must be initialized by <a
|
cannam@86
|
26 href="ov_open.html">ov_open()</a>, <a
|
cannam@86
|
27 href="ov_fopen.html">ov_fopen()</a>, or <a
|
cannam@86
|
28 href="ov_open_callbacks.html">ov_open_callbacks()</a>. <em>Important
|
cannam@86
|
29 Note:</em> The use of <a href="ov_open.html">ov_open()</a> is
|
cannam@86
|
30 discouraged under Windows due to a peculiarity of Windows linking
|
cannam@86
|
31 convention; use <a href="ov_fopen.html">ov_fopen()</a> or <a
|
cannam@86
|
32 href="ov_open_callbacks.html">ov_open_callbacks()</a> instead. This
|
cannam@86
|
33 caution only applies to Windows; use of <a
|
cannam@86
|
34 href="ov_open.html">ov_open()</a> is appropriate for all other
|
cannam@86
|
35 platforms. See the <a href="ov_open.html">ov_open()</a> page for more
|
cannam@86
|
36 information.
|
cannam@86
|
37
|
cannam@86
|
38 <p>
|
cannam@86
|
39 After use, the OggVorbis_File structure must be deallocated with a
|
cannam@86
|
40 call to <a href="ov_clear.html">ov_clear()</a>.
|
cannam@86
|
41
|
cannam@86
|
42 <p>
|
cannam@86
|
43 Note that once a file handle is passed to a successful <a
|
cannam@86
|
44 href="ov_open.html">ov_open()</a> call, the handle is owned by
|
cannam@86
|
45 libvorbisfile and will be closed by libvorbisfile later during the
|
cannam@86
|
46 call to <a href="ov_clear.html">ov_clear()</a>. The handle should not
|
cannam@86
|
47 be used or closed outside of the libvorbisfile API. Similarly, files
|
cannam@86
|
48 opened by <a href="ov_fopen.html">ov_fopen()</a> will also be closed
|
cannam@86
|
49 internally by vorbisfile in <a href="ov_clear.html">ov_clear()</a>.<p>
|
cannam@86
|
50
|
cannam@86
|
51 <a href="ov_open_callbacks.html">ov_open_callbacks()</a> allows the
|
cannam@86
|
52 application to choose whether libvorbisfile will or will not close the
|
cannam@86
|
53 handle in <a href="ov_clear.html">ov_clear()</a>; see the <a
|
cannam@86
|
54 href="ov_open_callbacks.html">ov_open_callbacks()</a> page for more information.<p>
|
cannam@86
|
55
|
cannam@86
|
56 If a call to <a href="ov_open.html">ov_open()</a> or <a
|
cannam@86
|
57 href="ov_open_callbacks.html">ov_open_callbacks()</a> <b>fails</b>,
|
cannam@86
|
58 libvorbisfile does <b>not</b> assume ownership of the handle and the
|
cannam@86
|
59 application is expected to close it if necessary. A failed <a
|
cannam@86
|
60 href="ov_fopen.html">ov_fopen()</a> call will internally close the
|
cannam@86
|
61 file handle if the open process fails.<p>
|
cannam@86
|
62
|
cannam@86
|
63 <br><br>
|
cannam@86
|
64 <table border=0 width=100% color=black cellspacing=0 cellpadding=7>
|
cannam@86
|
65 <tr bgcolor=#cccccc>
|
cannam@86
|
66 <td>
|
cannam@86
|
67 <pre><b>typedef struct {
|
cannam@86
|
68 void *datasource; /* Pointer to a FILE *, etc. */
|
cannam@86
|
69 int seekable;
|
cannam@86
|
70 ogg_int64_t offset;
|
cannam@86
|
71 ogg_int64_t end;
|
cannam@86
|
72 ogg_sync_state oy;
|
cannam@86
|
73
|
cannam@86
|
74 /* If the FILE handle isn't seekable (eg, a pipe), only the current
|
cannam@86
|
75 stream appears */
|
cannam@86
|
76 int links;
|
cannam@86
|
77 ogg_int64_t *offsets;
|
cannam@86
|
78 ogg_int64_t *dataoffsets;
|
cannam@86
|
79 long *serialnos;
|
cannam@86
|
80 ogg_int64_t *pcmlengths;
|
cannam@86
|
81 vorbis_info *vi;
|
cannam@86
|
82 vorbis_comment *vc;
|
cannam@86
|
83
|
cannam@86
|
84 /* Decoding working state local storage */
|
cannam@86
|
85 ogg_int64_t pcm_offset;
|
cannam@86
|
86 int ready_state;
|
cannam@86
|
87 long current_serialno;
|
cannam@86
|
88 int current_link;
|
cannam@86
|
89
|
cannam@86
|
90 ogg_int64_t bittrack;
|
cannam@86
|
91 ogg_int64_t samptrack;
|
cannam@86
|
92
|
cannam@86
|
93 ogg_stream_state os; /* take physical pages, weld into a logical
|
cannam@86
|
94 stream of packets */
|
cannam@86
|
95 vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
|
cannam@86
|
96 vorbis_block vb; /* local working space for packet->PCM decode */
|
cannam@86
|
97
|
cannam@86
|
98 <a href="ov_callbacks.html">ov_callbacks</a> callbacks;
|
cannam@86
|
99
|
cannam@86
|
100 } OggVorbis_File;</b></pre>
|
cannam@86
|
101 </td>
|
cannam@86
|
102 </tr>
|
cannam@86
|
103 </table>
|
cannam@86
|
104
|
cannam@86
|
105 <h3>Relevant Struct Members</h3>
|
cannam@86
|
106 <dl>
|
cannam@86
|
107 <dt><i>datasource</i></dt>
|
cannam@86
|
108
|
cannam@86
|
109 <dd>Pointer to file or other ogg source. When using stdio based
|
cannam@86
|
110 file/stream access, this field contains a <tt>FILE</tt> pointer. When using
|
cannam@86
|
111 custom IO via callbacks, libvorbisfile treats this void pointer as a
|
cannam@86
|
112 black box only to be passed to the callback routines provided by the
|
cannam@86
|
113 application.</dd>
|
cannam@86
|
114
|
cannam@86
|
115 <dt><i>seekable</i></dt>
|
cannam@86
|
116 <dd>Read-only int indicating whether file is seekable. E.g., a physical file is seekable, a pipe isn't.</dd>
|
cannam@86
|
117 <dt><i>links</i></dt>
|
cannam@86
|
118 <dd>Read-only int indicating the number of logical bitstreams within the physical bitstream.</dd>
|
cannam@86
|
119 <dt><i>ov_callbacks</i></dt>
|
cannam@86
|
120 <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>
|
cannam@86
|
121 </dl>
|
cannam@86
|
122
|
cannam@86
|
123 <br><br>
|
cannam@86
|
124 <hr noshade>
|
cannam@86
|
125 <table border=0 width=100%>
|
cannam@86
|
126 <tr valign=top>
|
cannam@86
|
127 <td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td>
|
cannam@86
|
128 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
|
cannam@86
|
129 </tr><tr>
|
cannam@86
|
130 <td><p class=tiny>Vorbisfile documentation</p></td>
|
cannam@86
|
131 <td align=right><p class=tiny>vorbisfile version 1.3.2 - 20101101</p></td>
|
cannam@86
|
132 </tr>
|
cannam@86
|
133 </table>
|
cannam@86
|
134
|
cannam@86
|
135 </body>
|
cannam@86
|
136
|
cannam@86
|
137 </html>
|