[vorbis-dev] Detecting packet lengths in Vorbis-streams
Scott Wheeler
wheeler at kde.org
Wed Oct 8 02:13:45 PDT 2003
Quoting Erik Montnemery <erik at babes-inc.com>:
> How would one implement the following scheme with minimal use of
> resources:
>
> Every Vorbis packet should be preprocessed to a certain extent, that is,
> the beginning of every audio packet should be parsed and some decoding
> steps executed. The result of this predecode as well as the rest of the
> packet should then be sent as output for final processing.
>
> I have skimmed through the standard, and as far as i can tell there is no
> field containing the packet length, however the 'end-of-packet'-condition
> is mentioned at severeal places, and it is also checked for at various
> places in the decoder source code.
The packet lengths are read from the "lacing values" at the end of Ogg page
headers. (Also referred to as the "segment_table" in the RFC.)
http://www.ietf.org/rfc/rfc3533.txt
Each Ogg page contains a set of packets, which in the case of a "degenerate
Vorbis stream" (i.e. a normal Ogg Vorbis file) will all be Vorbis packets.
-Scott
--- >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