Chris@1: Chris@1: Chris@1: Chris@1: Vorbisfile - function - ov_test Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1:

Vorbisfile documentation

vorbisfile version 1.3.2 - 20101101

Chris@1: Chris@1:

ov_test

Chris@1: Chris@1:

declared in "vorbis/vorbisfile.h";

Chris@1: Chris@1:

Chris@1: This partially opens a vorbis file to test for Vorbis-ness. It loads Chris@1: the headers for the first chain and tests for seekability (but does not seek). Chris@1: Use ov_test_open() to finish opening the file Chris@1: or ov_clear to close/free it. Chris@1:

Chris@1: Chris@1:

WARNING for Windows developers: Do not use ov_test() Chris@1: in Windows applications; Windows linking places restrictions on Chris@1: passing FILE * handles successfully, and ov_test() runs afoul Chris@1: of these restrictions [a] in exactly the same Chris@1: way as ov_open(). See the ov_test_callbacks() page for Chris@1: details on using ov_test_callbacks() instead. Chris@1:

Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1:
Chris@1:

Chris@1: int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
Chris@1: 
Chris@1:
Chris@1: Chris@1:

Parameters

Chris@1:
Chris@1:
f
Chris@1:
File pointer to an already opened file Chris@1: or pipe (it need not be seekable--though this obviously restricts what Chris@1: can be done with the bitstream).
Chris@1:
vf
Chris@1:
A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile Chris@1: functions. Once this has been called, the same OggVorbis_File Chris@1: struct should be passed to all the libvorbisfile functions.
Chris@1:
initial
Chris@1:
Typically set to NULL. This parameter is useful if some data has already been Chris@1: read from the file and the stream is not seekable. It is used in conjunction with ibytes. In this case, initial Chris@1: should be a pointer to a buffer containing the data read.
Chris@1:
ibytes
Chris@1:
Typically set to 0. This parameter is useful if some data has already been Chris@1: read from the file and the stream is not seekable. In this case, ibytes Chris@1: should contain the length (in bytes) of the buffer. Used together with initial
Chris@1:
Chris@1: Chris@1: Chris@1:

Return Values

Chris@1:
Chris@1:
  • 0 for success
  • Chris@1: Chris@1:
  • less than zero for failure:
  • Chris@1: Chris@1:
    Chris@1:

    Chris@1: Chris@1:

    Notes

    Chris@1: Chris@1: All the notes from ov_open() apply to ov_test(). Chris@1: Chris@1:

    Chris@1:
    Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1:

    copyright © 2000-2010 Xiph.Org

    Ogg Vorbis

    Vorbisfile documentation

    vorbisfile version 1.3.2 - 20101101

    Chris@1: Chris@1: Chris@1: Chris@1: