On 14/02/2008, Ralph Giles <giles@xiph.org> wrote:> On 13-Feb-08, at 3:40 AM, ogg.k.ogg.k@googlemail.com wrote: > > > However, I was concerned about the RTP streaming case, where packets > > may be lost, and the "other" container case, where they have to be > > concatenated (and thus one needs a way to walk past them easily). > > I reckon I'll just add a "header length" to headers past the first > > one, and > > maybe on data packets as well. I'm not clear at all on what would > > happen > > when not in Ogg, I need to think more about this case. > > There are a usually lot more data packets than header packets, so > having an internal length there hurts your bitrate a lot more. Of > course, it may not be significant for an uncompressed text codec.there's also the possibility of having a marker in the first byte to say whether its a header packet or not, kinda like how vorbis and theora start their header packets with (0x1, 0x3, 0x5,) and (0x80, 0x81, 0x82) respectively ... and then make sure not to start data packets that way. That does make it a little dirty for a text codec though as you always have to check/skip the first byte of your data packets. Conrad.
> there's also the possibility of having a marker in the first byte to > say whether its a header packet or not, kinda like how vorbis and > theora start their header packets with (0x1, 0x3, 0x5,) and (0x80, > 0x81, 0x82) respectively ... and then make sure not to start data > packets that way. That does make it a little dirty for a text codec > though as you always have to check/skip the first byte of your data > packets.Why does it make it dirty ? I'm doing just this (with headers having 0x80 set), and as far as having to check/skip the first byte, I also have to check/skip everying in there anyway for consistency checking (eg, checking the encoding is within expected bounds, etc, etc). Or is there a particular thing to be aware of with having a first byte as a packet type ?
On 14/02/2008, ogg.k.ogg.k@googlemail.com <ogg.k.ogg.k@googlemail.com> wrote:> > there's also the possibility of having a marker in the first byte to > > say whether its a header packet or not, kinda like how vorbis and > > theora start their header packets with (0x1, 0x3, 0x5,) and (0x80, > > 0x81, 0x82) respectively ... and then make sure not to start data > > packets that way. That does make it a little dirty for a text codec > > though as you always have to check/skip the first byte of your data > > packets. > > Why does it make it dirty ? > I'm doing just this (with headers having 0x80 set), and as far as having > to check/skip the first byte, I also have to check/skip everying in there > anyway for consistency checking (eg, checking the encoding is within > expected bounds, etc, etc).fair enough :-) Conrad.