[Speex-dev] Decoding multiple encoded frames

Darren Longhorn darren.longhorn at redembedded.com
Tue Oct 7 13:31:20 PDT 2008


I've been looking at using speex over RTP. Section 3.3 of
draft-ietf-avt-rtp-speex-05 states that:

"For the purposes of packetizing the bit stream in RTP, it is only
necessary to consider the sequence of bits as output by the Speex
encoder [speex_manual], and present the same sequence to the decoder."

So, I assume that I just pass the whole contents of the RTP packet (less
the RTP header) to the decoder, regardless of whether it contains
multiple frames of encoded data. I can then see two alternatives:

	1. the decoder decodes all of the data in one go
	2. the decoder must it be called repetitively for each frame

If 1, then I can't see how to calculate how much space to allocate for
the output buffer, since I don't know the number of frames contained
within the encoded data.

If 2, then I can't see how it can be determined how many bytes the
decoder has consumed, and hence how many remain in the input buffer.

I'm probably just overlooking something in the documentation. Any
suggestions of where to look are welcome.



More information about the Speex-dev mailing list