[xiph-rtp] Updated -04 Vorbis-RTP I-D

Michael Smith msmith at xiph.org
Wed Dec 15 15:03:42 PST 2004


On Monday 13 December 2004 17:38, Phil Kerr wrote:
> I'm near ready to release an alpha of the server.  So far raw Vorbis
> data streaming, packet fragmentation and aggregation, configuration and
> metadata packet streaming works.  I'm now working on a codebook problem,
> the API doesn't support access to the packed codebooks so I'm looking
> for a way round.  Also I've not seen any way from libvorbis to get the
> blocksize values for the identification header, any pointers on what
> they do?

(a late response because my email is flaky... this message didn't arrive until 
today).

First question: Why are you trying to get the packed codebooks? I think it's 
fairly unlikely that these will be interesting on their own. I would think 
what you'd be interested in is getting the entire codebook setup packet 
(which has the mode definitions, mappings, etc. as well as the codebooks 
themselves) - and since that's just an entire packet, you don't need a 
special API for it. Am I misunderstanding your needs here?

If you really do need access to the constituent parts of the codebook header, 
then yes - the libvorbis API has nothing here. You can use the library 
internals, or just take bits of code (mostly in info.c, and various other 
things called from there) from the sources, and adapt for your requirements.

vorbis_info_blocksize() will give you the blocksize values (pass 0 and 1 as 
the second argument to get the two different blocksizes). I wasn't quite sure 
what you were asking here, when you asked what they do. Vorbis, like many 
(most?) other block-based lossy audio codecs, has both short and long blocks 
(this helps reduce pre-echo). Unlike many other codecs, the sizes in vorbis 
are variable (though always powers of two), and so are sent in the header (In 
the primary header, not in the setup header).

Mike



More information about the xiph-rtp mailing list