To finish using an OGGZ handle, it should be closed with oggz_close().
For details, see <oggz/oggz_io.h> .
#include <stdio.h>
#include <sys/types.h>
#include <ogg/ogg.h>
#include <oggz/oggz_constants.h>
#include <oggz/oggz_table.h>
#include <oggz/oggz_io.h>
Go to the source code of this file.
Typedefs | |
typedef void | OGGZ |
An opaque handle to an Ogg file. | |
typedef int(* | OggzReadPacket )(OGGZ *oggz, ogg_packet *op, long serialno, void *user_data) |
This is the signature of a callback which you must provide for Oggz to call whenever it finds a new packet in the Ogg stream associated with oggz. | |
typedef int(* | OggzWriteHungry )(OGGZ *oggz, int empty, void *user_data) |
This is the signature of a callback which Oggz will call when oggz is hungry . | |
typedef ogg_int64_t(* | OggzMetric )(OGGZ *oggz, long serialno, ogg_int64_t granulepos, void *user_data) |
This is the signature of a function to correlate Ogg streams. | |
Functions | |
OGGZ * | oggz_new (int flags) |
Create a new OGGZ object. | |
OGGZ * | oggz_open (char *filename, int flags) |
Open an Ogg file, creating an OGGZ handle for it. | |
OGGZ * | oggz_open_stdio (FILE *file, int flags) |
Create an OGGZ handle associated with a stdio stream. | |
int | oggz_flush (OGGZ *oggz) |
Ensure any associated io streams are flushed. | |
int | oggz_close (OGGZ *oggz) |
Close an OGGZ handle. | |
int | oggz_get_bos (OGGZ *oggz, long serialno) |
Determine if a given logical bitstream is at bos (beginning of stream). | |
int | oggz_get_eos (OGGZ *oggz, long serialno) |
Determine if a given logical bitstream is at eos (end of stream). | |
int | oggz_set_read_callback (OGGZ *oggz, long serialno, OggzReadPacket read_packet, void *user_data) |
Set a callback for Oggz to call when a new Ogg packet is found in the stream. | |
long | oggz_read (OGGZ *oggz, long n) |
Read n bytes into oggz, calling any read callbacks on the fly. | |
long | oggz_read_input (OGGZ *oggz, unsigned char *buf, long n) |
Input data into oggz. | |
int | oggz_write_set_hungry_callback (OGGZ *oggz, OggzWriteHungry hungry, int only_when_empty, void *user_data) |
Set a callback for Oggz to call when oggz is hungry . | |
int | oggz_write_feed (OGGZ *oggz, ogg_packet *op, long serialno, int flush, int *guard) |
Add a packet to oggz's packet queue. | |
long | oggz_write_output (OGGZ *oggz, unsigned char *buf, long n) |
Output data from an OGGZ handle. | |
long | oggz_write (OGGZ *oggz, long n) |
Write n bytes from an OGGZ handle. | |
long | oggz_write_get_next_page_size (OGGZ *oggz) |
Query the number of bytes in the next page to be written. | |
int | oggz_set_metric_linear (OGGZ *oggz, long serialno, ogg_int64_t granule_rate_numerator, ogg_int64_t granule_rate_denominator) |
Specify that a logical bitstream has a linear metric. | |
int | oggz_set_metric (OGGZ *oggz, long serialno, OggzMetric metric, void *user_data) |
Set the OggzMetric to use for an OGGZ handle. | |
ogg_int64_t | oggz_tell_units (OGGZ *oggz) |
Query the current offset in units corresponding to the Metric function. | |
ogg_int64_t | oggz_seek_units (OGGZ *oggz, ogg_int64_t units, int whence) |
Seek to a number of units corresponding to the Metric function. | |
int | oggz_purge (OGGZ *oggz) |
Erase any input buffered in OGGZ. | |
int | oggz_set_data_start (OGGZ *oggz, off_t offset) |
Tell OGGZ to remember the given offset as the start of data. | |
off_t | oggz_tell (OGGZ *oggz) |
Provide the file offset in bytes corresponding to the data read. | |
off_t | oggz_seek (OGGZ *oggz, off_t offset, int whence) |
Seek to a specific byte offset. | |
long | oggz_serialno_new (OGGZ *oggz) |
Request a new serialno, as required for a new stream, ensuring the serialno is not yet used for any other streams managed by this OGGZ. |
|
An opaque handle to an Ogg file. This is returned by oggz_open() or oggz_new(), and is passed to all other oggz_* functions. |
|
Close an OGGZ handle.
|
|
Ensure any associated io streams are flushed.
|
|
Determine if a given logical bitstream is at bos (beginning of stream).
|
|
Determine if a given logical bitstream is at eos (end of stream).
|
|
Create a new OGGZ object.
|
|
Open an Ogg file, creating an OGGZ handle for it.
|
|
Create an OGGZ handle associated with a stdio stream.
|
|
Request a new serialno, as required for a new stream, ensuring the serialno is not yet used for any other streams managed by this OGGZ.
|