For a full description of the seeking methods possible in Ogg, see Semantics of seeking in Ogg bitstreams .
Typedefs | |
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 | |
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. |
|
This is the signature of a function to correlate Ogg streams. If every position in an Ogg stream can be described by a metric (eg. time) then define this function that returns some arbitrary unit value. This is the normal use of OGGZ for media streams. The meaning of units is arbitrary, but must be consistent across all logical bitstreams; for example a conversion of the time offset of a given packet into nanoseconds or a similar stream-specific subdivision may be appropriate.
|
|
Erase any input buffered in OGGZ. This discards any input read from the underlying IO system but not yet delivered as ogg_packets.
|
|
Seek to a specific byte offset.
|
|
Seek to a number of units corresponding to the Metric function.
|
|
Tell OGGZ to remember the given offset as the start of data. This informs the seeking mechanism that when seeking back to unit 0, go to the given offset, not to the start of the file, which is usually codec headers. The usual usage is:
|
|
Set the OggzMetric to use for an OGGZ handle.
|
|
Specify that a logical bitstream has a linear metric.
|
|
Provide the file offset in bytes corresponding to the data read.
|
|
Query the current offset in units corresponding to the Metric function.
|