Hi, If this is true: "Granule Position Information in Ogg Header is a hint for the decoder and gives some timing and position information." So say if granule position is 10000, it means that 10000 PCM samples are encoded in this page approximately. If this is true we can neglect this information, it will not effect the decoding right(but might effect for streaming)? Ravi __________________________________________________________ Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com
On 9/13/05, Ravi Lakkundi <ravilakkundi@yahoo.co.in> wrote:> Hi, > > If this is true: > > "Granule Position Information in Ogg Header is a hint > for the decoder and gives some timing and position > information." > > So say if granule position is 10000, it means that > 10000 PCM samples are encoded in this page > approximately.Incorrect. It means that if you decode up to the end of this page from the beginning of the stream, you'll have a total of precisely 10000 samples (assuming all the data was there, and you didn't lose any). Thus it gives precise and absolute positioning information, as required for seeking, for instance.> > If this is true we can neglect this information, it > will not effect the decoding right(but might effect > for streaming)?Incorrect. Vorbis sort of 'overloads' this field; it must be provided to the decoder for correct handling of beginning and end of stream. You also need it for seeking, obviously. Mike
Hi, What kind of over-loads are you referring to? Iam trying to write the Ogg parser, this bit of information will really help me. Any suggestions for below: The parser will broadly look like this: 1. Ogg_Parser 2. Get the three initial Packets (ID, Comment, Codebook) 3. Get_Packet 4. Decode_Packet 5. Loop to 3 Ravi __________________________________________________________ Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com