I have been working on a project streaming MP3 audio over a network to a hardware decoder. In order for this to work the MP3 frames had to be re-arranged prior to sending as they were not independent (byte-reservoir, back-data pointer).
Is this the case for Ogg Vorbis streams, or is each packet independent of others (assuming it is not a continuation one set in the header)? I am I safe to parse on packet boundaries, and the decoder deal with them packet at a time? Or is it more complex?
Apologies if this question has been asked before I could not find the answer trawling.
Thanks
Tim
... or is each packet independent of others (assuming it is not a continuation one set in the header)? I am I safe to parse on packet boundaries, and the decoder deal with them packet at a time? Or is it more complex?
These raw packets may be used directly by transport mechanisms that provide their own framing and packet-separation mechanisms (such as UDP datagrams). For stream based storage (such as files) and transport (such as TCP streams or pipes), Vorbis uses the Ogg bitstream format to provide framing/sync, sync recapture after error, landmarks during seeking, and enough information to properly separate data back into packets at the original packet boundaries without relying on decoding to find packet boundaries.
I am assuming this means yes! Wow what a refreshingly easy format to use; now on to WMA