[Vorbis-dev] liboggz oggz_get_bos, oggz_get_eos

Conrad Parker conrad at metadecks.org
Wed Mar 18 02:00:32 PDT 2009


2009/3/18 Ian Malone <ibmalone at gmail.com>:
> Hi,
>
> I was wondering what oggz_get_bos and oggz_get_eos are supposed to do,
> specifically are they meant to be used in oggz_read mode?  The
> documentation says "Determine if a given logical bitstream is at
> [bos/eos]".  However if get_bos is given a specific serialno it
> returns that stream's b_o_s flag which, in read mode, is set on
> initialisation.  The serialno=-1 (for all streams) instead checks
> delivered_non_b_o_s.  Are these functions really intended for write
> mode?

it's valid for both read and write.

If you are asking about a specific serialno, then you find out whether
or not the bos for that serialno has been read, or fed to the writer.
This is not particularly useful information, because if you already
know about the serialno then you probably already know if it's been
read or written.

If you are asking about all streams, then you are asking whether the
file (chain) is at the beginning of stream or not, ie. whether or not
all bos packets have been seen. Internally it keeps check of this by
the flag delivered_non_b_o_s: if any non-bos packets have been
read/written, then we are no longer processing bos packets, ie. you
cannot expect to read any more, and you may not write any more.

Conrad.


More information about the Vorbis-dev mailing list