[vorbis-dev] timestamping / latency
John Ripley
jripley at rioaudio.com
Tue Jan 13 07:18:07 PST 2004
> -----Original Message-----
> From: Olaf Matthes [mailto:olaf.matthes at gmx.de]
> Sent: 13 January 2004 14:30
> To: vorbis-dev at xiph.org
> Subject: Re: [vorbis-dev] timestamping / latency
>
> John Ripley wrote:
>
> >You could still use Ogg if you force a page out for each
> encoded packet.
> >That means you only have one packet per page, so the framing
> overhead will
> >be a lot higher (about 5-10%), but it will work without modifying the
> >decoder.
> >
> Thanks for that, but just to make shure I got it right:
>
> If ogg_stream_pageout() returns 0 I call ogg_stream_flush() and then
> ogg_stream_pageout() again to obtain the page that has been
> created on
> flushing? Or does ogg_stream_flush() by itself give me the page and I
> don't have to call ogg_stream_pageout() afterwards?
Have a look at how the comment and codebook packets are flushed out as a
single page in examples/encoder_example.c. It looks like you call
ogg_stream_flush() and write out bytes, until it returns 0. You probably
want to replace the ogg_stream_pageout() in the encoding loop with an
ogg_stream_flush(). Presumably ogg_stream_pageout() returns 0 until a page
is completely filled, whereas ogg_stream_flush() ensures the page goes out
even though it's not full.
- John Ripley.
--- >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