[vorbis-dev] ogg_sync_state with discontinuous codecs

Aaron Colwell acolwell at real.com
Wed Dec 3 10:06:18 PST 2003



This brings up a question that I've wondered about for a while. Why are 
the granulepos values associated with the last sample of the last complete 
packet in a page? This is completely different than most media file 
formats that I can think of and makes things like seeking a pain. It also 
doesn't easily handle sparse or discontinuous media like Arc says. I'm 
just interested in why this design decision was made.

Aaron

On Tue, 2 Dec 2003, Arc wrote:

> Rillian pointed out something important tonight about needing support in 
> libogg(2)... discontinuous bitstreams, which have the page granulepos 
> equal the FIRST granule of the included content vs the last, will need 
> Ogg to know about this so when packets get passed through ogg_stream_state 
> the resulting page's granulepos is that of the FIRST packet.
> 
> I think this is going to take an API change for libogg2, either a 
> seperate ogg_sync_state group (like was done with the packet buffer) or 
> setting a flag when ogg_stream_create is called for wether it's 
> continuous or discontinuous, ie:
> 
> extern ogg_stream_state *ogg_stream_create(int serialno);
> 
> changed to
> 
> extern ogg_stream_state *ogg_stream_create(int serialno, int discontinuous);
> 
> While a few lines in vorbose and py-ogg2 would need to be changed to do 
> this, it seems like a good idea to implement such an API change now 
> before more software is written.
> --- >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-dev-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.
> 

--- >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-dev-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-dev mailing list