[vorbis-dev] some (basic?) development questions...

Michael Plump plumpy at skylab.org
Tue May 16 04:57:48 PDT 2000



On Tue, 16 May 2000, Monty wrote:

> One thing I need to add to the libvorbis API is an ogg_stream_flush() so that 
> one can flush a complete page comprised of however many packets one has 
> submitted up to that point, rather than when libvorbis feels like flushing.  
> That way you still don't know exactly how much you need to read, but when you 
> *do* have all the pages needed to extract the second (comment) packet, you 
> only need to split open those pages, not the pages for the entire stream.

Except that if I read the second page and pull the second packet out of
it, but the third packet is ALSO in that page (and, as is likely to
happen, spreads into the third and fourth page) I could potentially still
end up re-paginating the whole file up until I find a packet that ends on
a page boundary (shouldn't be too long after the third header, but
still...)

Flush would be nice, but not necessarily everything I'd need.  If I knew
ALL encoders flushed after the second packet, I'd be okay, I think, but
that's not in the spec.

I might be a little confused still, but I don't think so.  The revelation
of a sequence number on each page makes this a little tougher.

> Your assumptions as stated are all correct.  Can you provide more detail of the
> trouble you're having?

Well the first page I'm writing out (the initial header) doesn't match the
first page I'm reading in.  They're the same size and close to each other,
but not the same.  (Possibly subsequent pages are corrupt, too...  I
haven't looked that far).

But I just tried to make a "smallest test case" and it passed with flying
colors, so unless you can think of any reason why that might be, I guess
I'll assume it's a bug in my program and get back to gdb ..<sigh>...

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/



More information about the Vorbis-dev mailing list