annotate src/libvorbis-1.3.3/doc/vorbisfile/ov_test.html @ 1:05aa0afa9217

Bring in flac, ogg, vorbis
author Chris Cannam
date Tue, 19 Mar 2013 17:37:49 +0000
parents
children
rev   line source
Chris@1 1 <html>
Chris@1 2
Chris@1 3 <head>
Chris@1 4 <title>Vorbisfile - function - ov_test</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>ov_test</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 This partially opens a vorbis file to test for Vorbis-ness. It loads
Chris@1 22 the headers for the first chain and tests for seekability (but does not seek).
Chris@1 23 Use <a href="ov_test_open.html">ov_test_open()</a> to finish opening the file
Chris@1 24 or <a href="ov_clear.html">ov_clear</a> to close/free it.
Chris@1 25 <p>
Chris@1 26
Chris@1 27 <p><em><b> WARNING for Windows developers: </b> Do not use ov_test()
Chris@1 28 in Windows applications; Windows linking places restrictions on
Chris@1 29 passing <tt>FILE *</tt> handles successfully, and ov_test() runs afoul
Chris@1 30 of these restrictions <a href="#winfoot">[a]</a> in exactly the same
Chris@1 31 way as <a href="ov_open.html">ov_open()</a>. See the <a
Chris@1 32 href="ov_test_callbacks.html">ov_test_callbacks() page </a> for
Chris@1 33 details on using <a
Chris@1 34 href="ov_test_callbacks.html">ov_test_callbacks()</a> instead. </em>
Chris@1 35 <p>
Chris@1 36
Chris@1 37 <table border=0 color=black cellspacing=0 cellpadding=7>
Chris@1 38 <tr bgcolor=#cccccc>
Chris@1 39 <td>
Chris@1 40 <pre><b>
Chris@1 41 int ov_test(FILE *f,<a href="OggVorbis_File.html">OggVorbis_File</a> *vf,char *initial,long ibytes);
Chris@1 42 </b></pre>
Chris@1 43 </td>
Chris@1 44 </tr>
Chris@1 45 </table>
Chris@1 46
Chris@1 47 <h3>Parameters</h3>
Chris@1 48 <dl>
Chris@1 49 <dt><i>f</i></dt>
Chris@1 50 <dd>File pointer to an already opened file
Chris@1 51 or pipe (it need not be seekable--though this obviously restricts what
Chris@1 52 can be done with the bitstream).</dd>
Chris@1 53 <dt><i>vf</i></dt>
Chris@1 54 <dd>A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile
Chris@1 55 functions. Once this has been called, the same <tt>OggVorbis_File</tt>
Chris@1 56 struct should be passed to all the libvorbisfile functions.</dd>
Chris@1 57 <dt><i>initial</i></dt>
Chris@1 58 <dd>Typically set to NULL. This parameter is useful if some data has already been
Chris@1 59 read from the file and the stream is not seekable. It is used in conjunction with <tt>ibytes</tt>. In this case, <tt>initial</tt>
Chris@1 60 should be a pointer to a buffer containing the data read.</dd>
Chris@1 61 <dt><i>ibytes</i></dt>
Chris@1 62 <dd>Typically set to 0. This parameter is useful if some data has already been
Chris@1 63 read from the file and the stream is not seekable. In this case, <tt>ibytes</tt>
Chris@1 64 should contain the length (in bytes) of the buffer. Used together with <tt>initial</tt></dd>
Chris@1 65 </dl>
Chris@1 66
Chris@1 67
Chris@1 68 <h3>Return Values</h3>
Chris@1 69 <blockquote>
Chris@1 70 <li>0 for success</li>
Chris@1 71
Chris@1 72 <li>less than zero for failure:</li>
Chris@1 73 <ul>
Chris@1 74 <li>OV_EREAD - A read from media returned an error.</li>
Chris@1 75 <li>OV_ENOTVORBIS - Bitstream contains no Vorbis data.</li>
Chris@1 76 <li>OV_EVERSION - Vorbis version mismatch.</li>
Chris@1 77 <li>OV_EBADHEADER - Invalid Vorbis bitstream header.</li>
Chris@1 78 <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li>
Chris@1 79 </ul>
Chris@1 80 </blockquote>
Chris@1 81 <p>
Chris@1 82
Chris@1 83 <h3>Notes</h3>
Chris@1 84
Chris@1 85 All the <a href="ov_open.html#notes">notes from ov_open()</a> apply to ov_test().
Chris@1 86
Chris@1 87 <br><br>
Chris@1 88 <hr noshade>
Chris@1 89 <table border=0 width=100%>
Chris@1 90 <tr valign=top>
Chris@1 91 <td><p class=tiny>copyright &copy; 2000-2010 Xiph.Org</p></td>
Chris@1 92 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
Chris@1 93 </tr><tr>
Chris@1 94 <td><p class=tiny>Vorbisfile documentation</p></td>
Chris@1 95 <td align=right><p class=tiny>vorbisfile version 1.3.2 - 20101101</p></td>
Chris@1 96 </tr>
Chris@1 97 </table>
Chris@1 98
Chris@1 99 </body>
Chris@1 100
Chris@1 101 </html>