how to integrate g729 in pjsip

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I use IPP G729 with pjsip and it works flawlessly.  To check if the codec is
loaded you can call pjsua_enum_codecs() to check or display what codecs are
loaded.

 

pjsua_codec_info codec[32];

      ZeroMemory(codec, sizeof(codec));

      unsigned uCount = 32;

      if (pjsua_enum_codecs(codec, &uCount) == PJ_SUCCESS)

{

            printf("List of codecs:\n");

            for (unsigned i=0; i<uCount; ++i) {

                  printf("  %d\t%.*s\n", codec[i].priority,
(int)codec[i].codec_id.slen,codec[i].codec_id.ptr);

            }

      }

      

To specify which codec a call uses, you should indicate the codec priority
for each codec using the api pjsua_codec_set_priority.  Below is an example
that makes G729 the highest priority (you would need to specify all codecs
you are using).  If you set the priority to zero, the codec is disabled.  

 

pjsua_codec_set_priority( &(pj_str("G729/8000/1")),208);

pjsua_codec_set_priority( &(pj_str("iLBC/8000/1")),207);

      pjsua_codec_set_priority( &(pj_str("PCMU/8000/1")),206);

      pjsua_codec_set_priority( &(pj_str("PCMA/8000/1")),205);

      pjsua_codec_set_priority( &(pj_str("GSM/8000/1")), 204);

      pjsua_codec_set_priority( &(pj_str("SPEEX/8000/1")),203);

 

An example of specifying G729, only.

 

pjsua_codec_set_priority( &(pj_str("G729/8000/1")),208);

pjsua_codec_set_priority( &(pj_str("iLBC/8000/1")),0);

      pjsua_codec_set_priority( &(pj_str("PCMU/8000/1")),0);

      pjsua_codec_set_priority( &(pj_str("PCMA/8000/1")),0);

      pjsua_codec_set_priority( &(pj_str("GSM/8000/1")), 0);

      pjsua_codec_set_priority( &(pj_str("SPEEX/8000/1")),0);

 

                        

 

  _____  

From: pjsip-bounces@xxxxxxxxxxxxxxx [mailto:pjsip-bounces at lists.pjsip.org]
On Behalf Of johnson elangbam
Sent: Tuesday, September 16, 2008 8:05 AM
To: pjsip at lists.pjsip.org
Subject: Re: how to integrate g729 in pjsip

 

Hi Nanang,
                I've build PJSIP successfully with IPP codecs enabled,
according to the instructions from
http://trac.pjsip.org/repos/wiki/Intel_IPP_Codecs,  I am confused how do I
know that g729 codec is activated or not.
What I am doing is making a dll from pjsip and add it to my softphone, but I
didn't see any g729 codec in my softphone whereas other codec like GSM, G722
are there. Please tell me the simplest way to check that the codec g729 is
enable or not.

Thanks and Regards,
Elangbam Johnson

>Message: 6
>Date: Sat, 13 Sep 2008 22:54:23 +0700
>From: "Nanang Izzuddin" <nanang@xxxxxxxxx>
> Subject: Re: how to integrate g729 in pjsip
>To: "pjsip list" <pjsip at lists.pjsip.org>
>Message-ID:
       <f8a01ced0809130854u7681bec9wd82ee5a7c728505d at mail.gmail.com

>
>Content-Type: text/plain; charset=ISO-8859-1

>Hi,

>Once PJSIP has been built successfully with IPP codecs enabled, then
>the G.729 codec should be there, you don't need to modify anything in
>the PJSIP code! If your application is using PJSUA-LIB, you don't even
> need to change anything in your application code. Try to make a call,
>the G.729 should be included in the SDP and next if SDP negotiation
> chooses G.729, you'll just need to check the quality :) In case you
>need to set the codecs priority (e.g: make G.729 as the highest
>preference) please see pjmedia_codec_mgr_set_codec_priority().

> Regards,
>nanang


On Sat, Sep 13, 2008 at 5:14 PM, johnson elangbam
<elangbamjohnson at gmail.com> wrote:
>> Hi all,
>>         I am a newbie in pjsip, I am actually developing a softphone
which I
>> would like to support the codec g729, and I do some research on the net,
> > finally I got two options 1) using the intell ipp 2) developed my own
>> wrapper to add the codec.
>>
>> As I am new in pjsip I didn't have enough experience and decide to use
the
>> intel ipp and download the evaluation version and the demo source code.
>> What I actually want to do is to integrate g729 in my pjsip source code
and
>> make it works through intel ipp library. I've tried how to enabled intell
>> ipp in pjsip from the link
>> http://trac.pjsip.org/repos/wiki/Intel_IPP_Codecs  but I am confusing how
to
>> access the codec in my pjsip source code.
>>
>> Regards,
>> Elangbam Johnson
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org <http://blog.pjsip.org/> 
>>
>> pjsip mailing list
>> pjsip at lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080916/97a5a949/attachment-0001.html 


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux