< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate-users] Question about G726 codec


Here is some sample code for creating the media part of an SDP:

 

SdpContents::Session::Medium medium("audio", port, 1, "RTP/AVP");

SdpContents::Session::Codec g711ucodec("PCMU", 8000);

g711ucodec.payloadType() = 0;  /* RFC3551 */ ;

medium.addCodec(g711ucodec);

SdpContents::Session::Codec g711acodec("PCMA", 8000);

g711acodec.payloadType() = 8;  /* RFC3551 */ ;

medium.addCodec(g711acodec);

SdpContents::Session::Codec gsmCodec("GSM", 8000);

gsmCodec.payloadType() = 3;  /* RFC3551 */ ;

medium.addCodec(gsmCodec);

SdpContents::Session::Codec speexCodec("SPEEX", 8000);

speexCodec.payloadType() = 110; 

speexCodec.parameters() = Data("mode=3");

medium.addCodec(speexCodec);

medium.addAttribute("ptime", Data(20));  // 20 ms of speech per frame (note G711 has 10ms samples, so this is 2 samples per frame)

medium.addAttribute("sendrecv");

 

SdpContents::Session::Codec toneCodec("telephone-event", 8000);

toneCodec.payloadType() = 102; 

toneCodec.parameters() = Data("0-15");

medium.addCodec(toneCodec);

session.addMedium(medium);

 

Scott

 

From: resiprocate-users-bounces@xxxxxxxxxxxxxxx [mailto:resiprocate-users-bounces@xxxxxxxxxxxxxxx] On Behalf Of ???
Sent: Wednesday, October 10, 2007 11:03 PM
To: resiprocate-users@xxxxxxxxxxxxxxx
Subject: [reSIProcate-users] Question about G726 codec

 

I’m developing with reciprocate, I want to add G726 codec in my application, according to ITU RFC doc , G726 is a dynamic payload type instead of a static payload type.

So how can I add it.