ov_test_callbacks.html 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <html>
  2. <head>
  3. <title>vorbisfile - function - ov_test_callbacks</title>
  4. <link rel=stylesheet href="style.css" type="text/css">
  5. </head>
  6. <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
  7. <table border=0 width=100%>
  8. <tr>
  9. <td><p class=tiny>vorbisfile documentation</p></td>
  10. <td align=right><p class=tiny>vorbisfile - 20011218</p></td>
  11. </tr>
  12. </table>
  13. <h1>ov_test_callbacks</h1>
  14. <p><i>declared in "vorbis/vorbisfile.h";</i></p>
  15. <p>This is an alternative function used to open and test an OggVorbis_File
  16. structure when using a data source other than a file. It allows you to specify custom file manipulation routines and sets up all the related decoding structure.
  17. <p>Once this has been called, the same <tt>OggVorbis_File</tt>
  18. struct should be passed to all the vorbisfile functions.
  19. <p>
  20. <br><br>
  21. <table border=0 color=black cellspacing=0 cellpadding=7>
  22. <tr bgcolor=#cccccc>
  23. <td>
  24. <pre><b>
  25. 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);
  26. </b></pre>
  27. </td>
  28. </tr>
  29. </table>
  30. <h3>Parameters</h3>
  31. <dl>
  32. <dt><i>f</i></dt>
  33. <dd>File pointer to an already opened file
  34. or pipe (it need not be seekable--though this obviously restricts what
  35. can be done with the bitstream).</dd>
  36. <dt><i>vf</i></dt>
  37. <dd>A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile
  38. functions. Once this has been called, the same <tt>OggVorbis_File</tt>
  39. struct should be passed to all the vorbisfile functions.</dd>
  40. <dt><i>initial</i></dt>
  41. <dd>Typically set to NULL. This parameter is useful if some data has already been
  42. 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>
  43. should be a pointer to a buffer containing the data read.</dd>
  44. <dt><i>ibytes</i></dt>
  45. <dd>Typically set to 0. This parameter is useful if some data has already been
  46. read from the file and the stream is not seekable. In this case, <tt>ibytes</tt>
  47. should contain the length (in bytes) of the buffer. Used together with <tt>initial</tt>.</dd>
  48. <dt><i>callbacks</i></dt>
  49. <dd>Pointer to a completed <a href="ov_callbacks.html">ov_callbacks</a> struct which indicates desired custom file manipulation routines.</dd>
  50. </dl>
  51. <h3>Return Values</h3>
  52. <blockquote>
  53. <li>
  54. 0 for success</li>
  55. <li>less than zero for failure:</li>
  56. <ul>
  57. <li>OV_EREAD - A read from media returned an error.</li>
  58. <li>OV_ENOTVORBIS - Bitstream is not Vorbis data.</li>
  59. <li>OV_EVERSION - Vorbis version mismatch.</li>
  60. <li>OV_EBADHEADER - Invalid Vorbis bitstream header.</li>
  61. <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li>
  62. </ul>
  63. </blockquote>
  64. <p>
  65. <hr noshade>
  66. <table border=0 width=100%>
  67. <tr valign=top>
  68. <td><p class=tiny>copyright &copy; 2001 vorbis team</p></td>
  69. <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team@vorbis.org">team@vorbis.org</a></p></td>
  70. </tr><tr>
  71. <td><p class=tiny>vorbisfile documentation</p></td>
  72. <td align=right><p class=tiny>vorbisfile - 20011218</p></td>
  73. </tr>
  74. </table>
  75. </body>
  76. </html>