[vorbis] Exact decode positioning

Paul Noffke paul at mindwalk.co.uk
Wed Feb 5 11:30:52 PST 2003



Monty,

I've solved my problem by using the PCM offset instead of the RAW offset.

At first I was trying to use exactly the same technique I used for the mp3 
stuff.  But I then realised that what I really needed was a reliable "point 
of reference" between the two decoders.  This can be anything - just so 
long as both decoders produce the same "reference point" at a given point 
in the stream - even if one started decoding in the middle of the stream or 
if data was lost or if one of the decoders lost sync.  And the ogg PCM 
offset does this for me because the granule positions are embedded in the 
stream.  And so problem solved.  I hope this makes sense.

Thanks for your help
Paul

-----Original Message-----
From:	Monty [SMTP:xiphmont at xiph.org]
Sent:	05 February 2003 17:22
To:	vorbis at xiph.org
Subject:	Re: [vorbis] Exact decode positioning

<p><p><p>On Thu, Jan 23, 2003 at 10:28:53PM -0000, Paul Noffke wrote:
> Hi,
>
> I'm busy working on a method of synchronising playback between two ogg
> decoders.  To do this reliably, I need to create a cross-reference of the 
> raw & pcm offsets in the bitstream.

You have complete control over PCM offsets; you don't have complete
conttrol over raw offset because you both need some level of buffering
for Ogg to function, and the raw offset is not directly related to the
PCM offset anyway.  All you know about an Ogg stream is that it comes
in order, and that the granulepos can be used to know needed buffering
depth.  The raw offset changes in large chunks because it has to; you
can't process only a few bytes of an Ogg stream at a time.

So, I'd like to ask, "What are you *really* doing?"  It seems unlikely
that Vorbisfile can't do what you want, but if it can't, I'd like to
know in more detail why such that I can take that into account for
future API design.

Monty
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list