1<html> 2 3<head> 4<title>Tremor - function - ov_test</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>Tremor documentation</p></td> 12<td align=right><p class=tiny>Tremor version 1.0 - 20020403</p></td> 13</tr> 14</table> 15 16<h1>ov_test</h1> 17 18<p><i>declared in "ivorbisfile.h";</i></p> 19 20<p> 21This partially opens a vorbis file to test for Vorbis-ness. It loads 22the headers for the first chain, and tests for seekability (but does not seek). 23Use <a href="ov_test_open.html">ov_test_open()</a> to finish opening the file 24or <a href="ov_clear.html">ov_clear</a> to close/free it. 25<p> 26 27<table border=0 color=black cellspacing=0 cellpadding=7> 28<tr bgcolor=#cccccc> 29 <td> 30<pre><b> 31int ov_test(FILE *f,<a href="OggVorbis_File.html">OggVorbis_File</a> *vf,char *initial,long ibytes); 32</b></pre> 33 </td> 34</tr> 35</table> 36 37<h3>Parameters</h3> 38<dl> 39<dt><i>f</i></dt> 40<dd>File pointer to an already opened file 41or pipe (it need not be seekable--though this obviously restricts what 42can be done with the bitstream).</dd> 43<dt><i>vf</i></dt> 44<dd>A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisidec 45functions. Once this has been called, the same <tt>OggVorbis_File</tt> 46struct should be passed to all the libvorbisidec functions.</dd> 47<dt><i>initial</i></dt> 48<dd>Typically set to NULL. This parameter is useful if some data has already been 49read from the file and the stream is not seekable. It is used in conjunction with <tt>ibytes</tt>. In this case, <tt>initial</tt> 50should be a pointer to a buffer containing the data read.</dd> 51<dt><i>ibytes</i></dt> 52<dd>Typically set to 0. This parameter is useful if some data has already been 53read from the file and the stream is not seekable. In this case, <tt>ibytes</tt> 54should contain the length (in bytes) of the buffer. Used together with <tt>initial</tt></dd> 55</dl> 56 57 58<h3>Return Values</h3> 59<blockquote> 60<li>0 for success</li> 61 62<li>less than zero for failure:</li> 63<ul> 64<li>OV_EREAD - A read from media returned an error.</li> 65<li>OV_ENOTVORBIS - Bitstream is not Vorbis data.</li> 66<li>OV_EVERSION - Vorbis version mismatch.</li> 67<li>OV_EBADHEADER - Invalid Vorbis bitstream header.</li> 68<li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li> 69</ul> 70</blockquote> 71<p> 72 73 74 75<br><br> 76<hr noshade> 77<table border=0 width=100%> 78<tr valign=top> 79<td><p class=tiny>copyright © 2002 Xiph.org</p></td> 80<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td> 81</tr><tr> 82<td><p class=tiny>Tremor documentation</p></td> 83<td align=right><p class=tiny>Tremor version 1.0 - 20020403</p></td> 84</tr> 85</table> 86 87</body> 88 89</html> 90