In a word, I don't what's the standard of speex payload format.<br>
The file doc/rtp.txt is for what? Is it not for rtp payload?<br>
I find that rtp.txt is more detail that draft02.txt<br>
<br>
Which rtp docment should be followed?<br>
Anyone else has written the RTP wrapper already?<br>
<br>
Lianghu<br><br><div><span class="gmail_quote">On 11/22/06, <b class="gmail_sendername">Jean-Marc Valin</b> <<a href="mailto:jean-marc.valin@usherbrooke.ca">jean-marc.valin@usherbrooke.ca</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> 1) First, I think there is a bug in libspeex/lsp.c line 512.<br>><br>> /* hard limit ak's to +/- 32767 */<br>> if (a < -32767) a =32767; // This line should be changed to if<br>> (a < -32767) a = -32767;
<br>> if (a > 32767) a = 32767;<br>> ak[j-1] = (short)a;<br><br>Oops. Thanks for pointing that out. It's fixed in svn.<br><br>> 2) About the RTP wrapper for VoIP<br>><br>> I'd like to use the payload format defined in the SVN document
rtp.txt<br>> as below.<br>><br>> What I'm worry about is the interoperability with other implementations.<br>><br>> What's your opinion on that?<br><br>Can you summarize what the issue is?<br><br> Jean-Marc
<br><br>> Best Regards,<br>><br>> Lianghu<br>><br>><br>> //************************from the SVN /doc/rtp.txt begin<br>> *************************************//<br>> The Speex RTP payload is defined as a header, followed by any number of
<br>> requests to the remote encoder and all encoded speech frames.<br>><br>> +--------+----------+----------------+<br>> | Header | Requests | Speech data... |<br>> +--------+----------+----------------+<br>
><br>> The header contains only the number of frames sent<br>> encoded in 6 bits<br>><br>> 0 1 2 3 4 5<br>> +-+-+-+-+-+-+<br>> | NB frames |<br>> +-+-+-+-+-+-+<br>><br>> There can be any number of requests of the form
<br>><br>> 0 1 2 3 4 5 6 7 0 1<br>> +-+-+-+-+-+-+-+-+-+-+<br>> |R| ReqID | ReqVal |<br>> +-+-+-+-+-+-+-+-+-+-+<br>><br>> where R is 1 when a request is following and 0 when there is no more<br>> request. Each request (if R=1) is composed of a 4-bit request ID (ReqID) and
<br>> a 5-bit value (ReqVal)<br>><br>> Possible values for ReqID are:<br>> 0: REQ_PERSIST ReqVal=1 for persistent requests/mode selection,<br>> 0 otherwise<br>> 1: PERSIST_ACK Acknowledge a REQ_PERSIST from the other end,
<br>>
ReqVal equals the value received<br>> 2: MODE Choose the encoder mode directly<br>> 3: QUALITY Choose the encoder quality<br>> 4: VBR Set VBR on (ReqVal=1) or off (ReqVal=2)<br>> 5: VBR_QUALITY Set the encoder quality for VBR mode
<br>> 6: LOW_MODE Set the encoder mode for low-band (wideband only)<br>> 7: HIGH_MODE Set the encoder mode for high-band (wideband only)<br>><br>> All requests should be considered at the receiver as a suggestion and
<br>> compliance is not mandatory. The PERSIST_ACK should be sent upon receiving a<br>> REQ_PERSIST request to indicate that the request has been received.<br>><br>> The speech data part contains speech frames one after the other. The size of
<br>> the encoded frames can be found since the mode is directly encoded into each<br>> frame.<br>><br>> For example, a frame where we request VBR to be on with quality 8 and we<br>> transmit two frames encoded at
8.35 kbps (167 bits/frame) will be:<br>><br>> 0
1
2
3<br>> 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7<br>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<br>> | NB=2 |1|ReqID=2| ReqVal=0|1|ReqID=3|ReqVal=8 |0| frame 1 |
<br>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<br>>
|
frame
1
|<br>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<br>>
|
frame
1
|<br>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<br>>
|
frame
1
|<br>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<br>>
|
frame
1
|<br>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<br>>
|
frame
1
|<br>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<br>>
|end|
frame
2
|<br>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<br>>
|
frame
2
|<br>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<br>>
|
frame
2
|<br>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<br>>
|
frame
2
|<br>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<br>>
|
frame
2
|<br>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<br>> | end frame 2 |P|P|P|P|P|P|<br>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<br>><br>> //************************from the SVN /doc/rtp.txt end
<br>> *************************************//<br></blockquote></div><br>