annotate src/libvorbis-1.3.3/doc/vorbisfile/ov_test.html @ 86:98c1576536ae

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