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

Michael Smith msmith at xiph.org
Tue Apr 13 01:29:31 PDT 2004



On Tuesday 13 April 2004 18:21, Kenji Chan wrote:
> So raw ogg_packet must come with the first and third header before I could
> decode it

Yes (vorbis packets, specifically).

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

You need the three headers, but you're not required to use ogg - the 
ogg_packet struct is just a simple C structure that has a length and a 
pointer to some data. You can use this data however you wish. You don't need 
to use any of the ogg_stream_* functions unless you're using ogg.

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

Well, you'll need some sort of container layer. You might investigate the 
vorbis-RTP drafts. Or you might investigate Speex (www.speex.org), which is 
probably better suited to your task.

Mike

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