Erik Montnemery
2003-Oct-08 02:06 UTC
[vorbis-dev] Detecting packet lengths in Vorbis-streams
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. I would really appreciate an explanation of how the end-of-packet condition is detected or any other suggestion on how to solve my problem. Regards, Erik --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Scott Wheeler
2003-Oct-08 02:13 UTC
[vorbis-dev] Detecting packet lengths in Vorbis-streams
Quoting Erik Montnemery <erik@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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.