[Vorbis] metadata
Ralph Giles
giles at xiph.org
Sun Oct 2 13:17:53 PDT 2005
On Sun, Oct 02, 2005 at 07:50:25PM +0100, Ian Malone wrote:
> >[repacketization trouble]
> Well this makes sense, thanks. In the debugger I could see they were
> coming out with granulepos -1. I thought there was a buffer overrun
> somewhere in my code and was going mad.
Yeah, the granulepos stored in the Ogg page header corresponds to
the last packet to finish on that page. libogg sets the field
in the returned packet structure to -1 for the other packets to
tell you it doesn't have a valid granulepos and you'll need to
generate one yourself if you need it. Doing so is on the other
side of the abstraction.
> I seem to have the latest version. I'll file a bug and see what
> happens. "Hi, I want to corrupt all my files, can you help?"
Well, helix should handle general Ogg streams. :)
> It's not clear to me what the type should be,
> "<?xml version='1.0'?>" is clear enough to determine XML, but the
> header should probably indicate the type of stream.
Right. The XML declaration provides enough information for a muxer
to hand off the stream to an xml parser, analogous to how stream
identification can be done with our other codecs. Requiring this
should probably be part of a general XML-in-Ogg spec or best
practices document.
Also having a doctype or namespaced root element in the initial
packet to further identify the stream data is, as you suggest,
another good idea. I'd make that a SHOULD.
-r
More information about the Vorbis
mailing list