[vorbis-dev] Given ONLY an ogg packet, can one be able to decode the packet to PCM?

Kenji Chan adslbqmr at tpg.com.au
Tue Apr 13 01:21:45 PDT 2004



So raw ogg_packet must come with the first and third header before I could
decode it

Is that those three headers like:

    ogg_packet header;
    ogg_packet header_comm;
    ogg_packet header_code;

    vorbis_analysis_headerout(&vd,&vc,&header,&header_comm,&header_code);
    ogg_stream_packetin(&os,&header); /* automatically placed in its own
                                         page */
    ogg_stream_packetin(&os,&header_comm);
    ogg_stream_packetin(&os,&header_code);

That means I have to send and receive ogg stream instead of ONLY vorbis?
Actually, I want to have a telephone program that stream vorbis to the other
end, and I only need the least information possible for delivering good
sound.

<p>On Tuesday 13 April 2004 06:27, Kenji Chan wrote:
> Given ONLY an ogg packet, can one be able to decode the packet to PCM?
>
> And how ogg vorbis know the info of it (bitrate..etc) in order to decode
> it?

An ogg packet is just a generalised chunk of binary data - it has no meaning

by itself. Do you mean a 'vorbis packet'? If so, the answer is no - vorbis 
requires the header packets (of which there are 3; the second is metadata
and 
is not crucial) to allow decode.

Mike

<p>--- >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