ov_test_callbacks.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <html>
  2. <head>
  3. <title>Tremor - 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>Tremor documentation</p></td>
  10. <td align=right><p class=tiny>Tremor version 1.0 - 20020403</p></td>
  11. </tr>
  12. </table>
  13. <h1>ov_test_callbacks</h1>
  14. <p><i>declared in "ivorbisfile.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 structures.
  17. <p>Once this has been called, the same <tt>OggVorbis_File</tt>
  18. struct should be passed to all the libvorbisidec 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 libvorbisidec
  38. functions. Once this has been called, the same <tt>OggVorbis_File</tt>
  39. struct should be passed to all the libvorbisidec 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>0 for success</li>
  54. <li>less than zero for failure:</li>
  55. <ul>
  56. <li>OV_EREAD - A read from media returned an error.</li>
  57. <li>OV_ENOTVORBIS - Bitstream is not Vorbis data.</li>
  58. <li>OV_EVERSION - Vorbis version mismatch.</li>
  59. <li>OV_EBADHEADER - Invalid Vorbis bitstream header.</li>
  60. <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li>
  61. </ul>
  62. </blockquote>
  63. <p>
  64. <br><br>
  65. <hr noshade>
  66. <table border=0 width=100%>
  67. <tr valign=top>
  68. <td><p class=tiny>copyright &copy; 2002 Xiph.org</p></td>
  69. <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
  70. </tr><tr>
  71. <td><p class=tiny>Tremor documentation</p></td>
  72. <td align=right><p class=tiny>Tremor version 1.0 - 20020403</p></td>
  73. </tr>
  74. </table>
  75. </body>
  76. </html>