Commit b37d90b9 authored by conrad's avatar conrad

Add new API call oggz_get_numtracks() to retrieve the number of logical

bitstreams.


git-svn-id: http://svn.annodex.net/liboggz/trunk@2885 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent fc81ef4c
......@@ -542,6 +542,18 @@ int oggz_get_bos (OGGZ * oggz, long serialno);
*/
int oggz_get_eos (OGGZ * oggz, long serialno);
/**
* Query the number of tracks (logical bitstreams). When reading, this
* number is incremented every time a new track is found, so the returned
* value is only correct once the OGGZ is no longer at bos (beginning of
* stream): see oggz_get_bos() for determining this.
* \param oggz An OGGZ handle
* \return The number of tracks in OGGZ
* \retval OGGZ_ERR_BAD_SERIALNO \a serialno does not identify an existing
* logical bitstream in \a oggz.
*/
int oggz_get_numtracks (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.
......
......@@ -15,6 +15,7 @@
oggz_close;
oggz_get_bos;
oggz_get_eos;
oggz_get_numtracks;
oggz_run_set_blocksize;
oggz_run;
......
......@@ -432,6 +432,13 @@ oggz_set_eos (OGGZ * oggz, long serialno)
return 0;
}
int
oggz_get_numtracks (OGGZ * oggz)
{
if (oggz == NULL) return OGGZ_ERR_BAD_OGGZ;
return oggz_vector_size (oggz->streams);
}
long
oggz_serialno_new (OGGZ * oggz)
{
......
......@@ -81,6 +81,11 @@ oggz_table_lookup @46
oggz_table_size @47
oggz_table_nth @48
;
; General querying
;
oggz_get_numtracks @49
;
;oggz stream functions (determining content type)
;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment