annotate src/libvorbis-1.3.3/doc/vorbisfile/OggVorbis_File.html @ 83:ae30d91d2ffe

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