[Vorbis] help

Michael Smith msmith at xiph.org
Wed Oct 11 03:36:24 PDT 2006


On 10/11/06, Nagaraj.CG at flextronicssoftware.com
<Nagaraj.CG at flextronicssoftware.com> wrote:
>
>
>
>  I am designing an Ogg Player,in which i don't want to play the Chained stream.
> How can i recognize the chained stream without parsing whole file?
> what i am thinking is ,once i get the first page Serial Number ,i will store it and i will seek  to the  end of file,there i will extract the last page
> serial number, if this is same as the one i stored previously,then the file is not chained else it is chained,is it correct or not???????? or else do you have any
> easy method to recognize.

Yes, that's a sufficient method to recognise chained streams.
Note, however, that you should read the first page of _each_
multiplexed stream at the start (i.e. read pages until you get a page
with the BOS flag not set), and then check that the last page in the
file is from one of those streams.

That will let you play the audio from an audio+video file (you'd
presumably just discard the video pages).

Mike


More information about the Vorbis mailing list