ov_test.html 3.3 KB

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