[vorbis-dev] how do I flush the encoder's buffers

Michael Smith msmith at labyrinth.net.au
Thu Mar 14 06:05:10 PST 2002



At 08:46 AM 3/14/02 -0500, you wrote:
>How do I flush the encoder's buffers to force it to provide me will the 
>encoded results of all samples it has previously been passed up until that 
>point? I noticed an OggStream method called "flush", is that what I call?

You can use ogg_stream_flush() to flush the ogg page buffers, which will
(assuming you're doing other things correctly) give you all the data that
has been encoded so far - this is NOT all the data that has been passed
to the encoder, however. 

The only way to get those samples to be flushed is to signal end of 
stream to the encoder, then continue output as normal. The extra
buffering here is crucial - it cannot be avoided (i.e. this is NOT
an API issue, it's a matter of how the encoder encodes data). 

Michael

<p><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-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