[Vorbis-dev] ogg encoding

Ralph Giles giles at xiph.org
Wed Jun 7 22:15:14 PDT 2006

On Thu, Jun 08, 2006 at 01:08:36AM -0400, Stephen Whiters-Ridley wrote:

> Thanks! So ogg_stream_pageout() and ogg_stream_flush() *do* "fill in" the
> contents of the ogg_page structure, and its only valid to access the
> ogg_page structure's contents (like in the file writing routines) after you
> have either flush()ed or pageout()ed.

Thanks right. I guess that's supposed to be obvious from the fact that 
you pass in a pointer to an ogg_page, but clearly our API docs could be 
more verbose.

libogg owns the memory pointed to by the actual head and body memebers 
of ogg_page, and they're only valid until the next flush() or pageout()
so you have to write, memcpy, etc. everything yourself.

> As for what this is used for, I am
> implementing a network daemon that runs single socket, and has to support
> muxing/demuxing all within the same connection, instead of reinvent the
> wheel I decided to go with ogg. 

Cool! We always expected to see this sort of application, but 
we haven't heard of many. Let us know how it turns out.


More information about the Vorbis-dev mailing list