annotate src/libvorbis-1.3.3/doc/vorbisfile/ov_test_callbacks.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 - function - ov_test_callbacks</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_callbacks</h1>
Chris@1 17
Chris@1 18 <p><i>declared in "vorbis/vorbisfile.h";</i></p>
Chris@1 19
Chris@1 20 <p>This is an alternative function used to open and test an OggVorbis_File
Chris@1 21 structure when using a data source other than a file,
Chris@1 22 when its necessary to modify default file access behavior, or to
Chris@1 23 test for Vorbis content from a <tt>FILE *</tt> pointer under
Chris@1 24 Windows where <a href="ov_open.html">ov_test()</a> cannot be used. It
Chris@1 25 allows the application to specify custom file manipulation routines
Chris@1 26 and sets up all the related decoding structures.
Chris@1 27
Chris@1 28 <p>Once this has been called, the same <tt>OggVorbis_File</tt>
Chris@1 29 struct should be passed to all the libvorbisfile functions.
Chris@1 30 <p>
Chris@1 31 <br><br>
Chris@1 32 <table border=0 color=black cellspacing=0 cellpadding=7>
Chris@1 33 <tr bgcolor=#cccccc>
Chris@1 34 <td>
Chris@1 35 <pre><b>
Chris@1 36 int ov_test_callbacks(void *datasource, <a href="OggVorbis_File.html">OggVorbis_File</a> *vf, char *initial, long ibytes, <a href="ov_callbacks.html">ov_callbacks</a> callbacks);
Chris@1 37 </b></pre>
Chris@1 38 </td>
Chris@1 39 </tr>
Chris@1 40 </table>
Chris@1 41
Chris@1 42 <h3>Parameters</h3>
Chris@1 43 <dl>
Chris@1 44 <dt><i>f</i></dt>
Chris@1 45 <dd>File pointer to an already opened file
Chris@1 46 or pipe (it need not be seekable--though this obviously restricts what
Chris@1 47 can be done with the bitstream).</dd>
Chris@1 48 <dt><i>vf</i></dt>
Chris@1 49 <dd>A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile
Chris@1 50 functions. Once this has been called, the same <tt>OggVorbis_File</tt>
Chris@1 51 struct should be passed to all the libvorbisfile functions.</dd>
Chris@1 52 <dt><i>initial</i></dt>
Chris@1 53 <dd>Typically set to NULL. This parameter is useful if some data has already been
Chris@1 54 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 55 should be a pointer to a buffer containing the data read.</dd>
Chris@1 56 <dt><i>ibytes</i></dt>
Chris@1 57 <dd>Typically set to 0. This parameter is useful if some data has already been
Chris@1 58 read from the file and the stream is not seekable. In this case, <tt>ibytes</tt>
Chris@1 59 should contain the length (in bytes) of the buffer. Used together with <tt>initial</tt>.</dd>
Chris@1 60 <dt><i>callbacks</i></dt>
Chris@1 61 <dd>A completed <a href="ov_callbacks.html">ov_callbacks</a> struct which indicates desired custom file manipulation routines. vorbisfile.h defines several preprovided callback sets; see <a href="ov_callbacks.html">ov_callbacks</a> for details.</dd>
Chris@1 62 </dl>
Chris@1 63
Chris@1 64
Chris@1 65 <h3>Return Values</h3>
Chris@1 66 <blockquote>
Chris@1 67 <li>0 for success</li>
Chris@1 68 <li>less than zero for failure:</li>
Chris@1 69 <ul>
Chris@1 70 <li>OV_EREAD - A read from media returned an error.</li>
Chris@1 71 <li>OV_ENOTVORBIS - Bitstream contains no Vorbis data.</li>
Chris@1 72 <li>OV_EVERSION - Vorbis version mismatch.</li>
Chris@1 73 <li>OV_EBADHEADER - Invalid Vorbis bitstream header.</li>
Chris@1 74 <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li>
Chris@1 75 </ul>
Chris@1 76 </blockquote>
Chris@1 77 <p>
Chris@1 78
Chris@1 79 <h3>Notes</h3>
Chris@1 80 <dl>
Chris@1 81
Chris@1 82 <dt><b>[a] Windows and use as an ov_test() substitute</b><p> Windows
Chris@1 83 applications should not use <a href="ov_test.html">ov_test()</a> due
Chris@1 84 to the likelihood of <a href="ov_open.html#winfoot">CRT linking
Chris@1 85 mismatches and runtime protection faults
Chris@1 86 [ov_open:a]</a>. ov_test_callbacks() is a safe substitute; specifically:
Chris@1 87
Chris@1 88 <pre><tt>ov_test_callbacks(f, vf, initial, ibytes, OV_CALLBACKS_DEFAULT);</tt>
Chris@1 89 </pre>
Chris@1 90
Chris@1 91 ... provides exactly the same functionality as <a
Chris@1 92 href="ov_test.html">ov_test()</a> but will always work correctly under
Chris@1 93 Windows, regardless of linking setup details.<p>
Chris@1 94
Chris@1 95 </dl>
Chris@1 96
Chris@1 97 <br><br>
Chris@1 98 <hr noshade>
Chris@1 99 <table border=0 width=100%>
Chris@1 100 <tr valign=top>
Chris@1 101 <td><p class=tiny>copyright &copy; 2000-2010 Xiph.Org</p></td>
Chris@1 102 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
Chris@1 103 </tr><tr>
Chris@1 104 <td><p class=tiny>Vorbisfile documentation</p></td>
Chris@1 105 <td align=right><p class=tiny>vorbisfile version 1.3.2 - 20101101</p></td>
Chris@1 106 </tr>
Chris@1 107 </table>
Chris@1 108
Chris@1 109 </body>
Chris@1 110
Chris@1 111 </html>