CODEC

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

 



Hi Kresten,

First, the error message "No suitable codec for remote offer
(PJMEDIA_SDPNEG_NOANSCODEC)" means no common/shared codec among
endpoints, or no format/codec specified in the SDP offer (any chance
that all the codecs were disabled?).

So, for example if only PCMA is preferred:
---
#define PJMEDIA_HAS_PASSTHROUGH_CODECS  1
#define PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMA      1
// then disable other passthrough codec implementations
#define PJMEDIA_HAS_PASSTHROUGH_CODEC_*  0
---

Repeating what Benny mentioned before, the WMME-Direct is a full
sample of integration of hardware codecs (implemented as sound
device), which might be usable as reference.

BR,
nanang


On Mon, Nov 9, 2009 at 6:09 PM, Kresten Tolstrup <kt at danphone.com> wrote:
> Hi Benny
>
> Thank you for your answer.
>
> I have added the defines in config_site.h, but it is still not working, as
> it founds no WMME sound device.
> The CODEC is not known by WinCE, and there is no sound device, and therefore
> PJSIP fails when initializing, how to handle this?
>
> In file wmmw_dev.c, it ends at the line:
> PJ_LOG(4,(THIS_FILE, "WMME found no sound devices"));
>
> //-------------------------------------------------------
> /* API: init factory */
> static pj_status_t factory_init(pjmedia_aud_dev_factory *f)
> {
> ? ?struct wmme_factory *wf = (struct wmme_factory*)f;
> ? ?unsigned c;
> ? ?int i;
> ? ?int inputDeviceCount, outputDeviceCount, devCount=0;
> ? ?pj_bool_t waveMapperAdded = PJ_FALSE;
>
> ? ?/* Enumerate sound devices */
> ? ?wf->dev_count = 0;
>
> ? ?inputDeviceCount = waveInGetNumDevs();
> ? ?devCount += inputDeviceCount;
>
> ? ?outputDeviceCount = waveOutGetNumDevs();
> ? ?devCount += outputDeviceCount;
>
> ? ?if (devCount) {
> ? ? ? ?/* Assume there is WAVE_MAPPER */
> ? ? ? ?devCount += 2;
> ? ?}
>
> ? ?if (devCount==0) {
> ? ? ? ?PJ_LOG(4,(THIS_FILE, "WMME found no sound devices"));
> ? ? ? ?return PJMEDIA_EAUD_NODEV;
> ? ?}
>
> //---------------------------------
>
> And it returns to endpoint.c :
>
> ?/* Sound */
> ? ?status = pjmedia_aud_subsys_init(pf);
> ? ?if (status != PJ_SUCCESS)
> ? ? ? ?goto on_error;
>
> where it goes to error
>
> //----------------------------------------------------
>
> The output log looks like this:
>
> Load module: BSSIPClient.exe
> Load module: lpcrt.dll
> Load module: ws2.dll
> Load module: rpcrt4.dll
> Load module: oleaut32.dll
> Load module: ole32.dll
> Load module: fpcrt.dll
> Load module: commctrl.dll
> Load module: coredll.dll
> BSVoice startedBSSIPClient --> Ip addr:192.168.0.17, port: 50012
> Load module: ssllsp.dll
> Load module: wspm.dll
> Load module: nspm.dll
> Load module: iphlpapi.dll
> BSSIPClient -> ?--> ?01:44:15.912 sip_endpoint.c ?Module "mod-pjsua-log"
> registered
>
> BSSIPClient -> ?--> ?01:44:16.077 sip_endpoint.c ?Module "mod-tsx-layer"
> registered
>
> BSSIPClient -> ?--> ?01:44:16.328 sip_endpoint.c ?Module "mod-stateful-util"
> registered
>
> BSSIPClient -> ?--> ?01:44:16.581 sip_endpoint.c ?Module "mod-ua" registered
>
> BSSIPClient -> ?--> ?01:44:16.775 sip_endpoint.c ?Module "mod-100rel"
> registered
>
> BSSIPClient -> ?--> ?01:44:17.045 sip_endpoint.c ?Module "mod-pjsua"
> registered
>
> BSSIPClient -> ?--> ?01:44:17.239 sip_endpoint.c ?Module "mod-invite"
> registered
>
> BSSIPClient -> ?--> ?01:49:53.157 ? ? wmme_dev.c ?WMME found no sound
> devices
>
> //---------------------------------------------------------------
>
>
> Best Regards
> Kresten
>
>
> -----Oprindelig meddelelse-----
> Fra: pjsip-bounces at lists.pjsip.org
> [mailto:pjsip-bounces at lists.pjsip.org]P? vegne af Benny Prijono
> Sendt: 6. november 2009 09:40
> Til: pjsip list
> Emne: Re: [pjsip] CODEC
>
>
> On Tue, Nov 3, 2009 at 7:17 PM, Kresten Tolstrup <kt at danphone.com> wrote:
>> Hi,
>>
>> Isn't there anyone that kan help me with this problem? The short version
> of
>> the problem is that I need a passthrought CODEC, but when I use a
>> passthrought CODEC, the other end don't get any CODEC information, in the
>> SIP call.
>>
>
> Snippet of message trace would help here.
>
> But actually, we do have a sample to use hardware codec on Windows!
> The native WMME audio backend supports PCMA/PCMU codec, and here's
> what I have in my config_site.h to enable it:
>
>
> #define PJ_CONFIG_WIN32_WMME_DIRECT ? ? 1
> #include <pj/config_site_sample.h>
>
> #define PJMEDIA_HAS_L16_CODEC ? ? ? ? ? 0
> #define PJMEDIA_HAS_G711_CODEC ? ? ? ? ?0
> #define PJMEDIA_HAS_GSM_CODEC ? ? ? ? ? 0
> #define PJMEDIA_HAS_ILBC_CODEC ? ? ? ? ?0
> #define PJMEDIA_HAS_G722_CODEC ? ? ? ? ?0
> #define PJMEDIA_HAS_SPEEX_CODEC ? ? ? ? 0
> #define PJMEDIA_HAS_G7221_CODEC ? ? ? ? 0
>
> I just tested with latest pjsua and it seems to work.
>
> Cheers
> ?Benny
>
>
>
>
>
>> Best Regards
>> Kresten
>>
>> -----Oprindelig meddelelse-----
>> Fra: pjsip-bounces at lists.pjsip.org
>> [mailto:pjsip-bounces at lists.pjsip.org]P? vegne af Kresten Tolstrup
>> Sendt: 30. oktober 2009 14:15
>> Til: pjsip list
>> Emne: Re: [pjsip] CODEC
>>
>>
>> Hi Naning
>>
>> Thanks for your answer. I mean PCMA.
>>
>> I have read the link you gave me, but I have still problems.
>>
>> I have added #define PJMEDIA_CONF_USE_SWITCH_BOARD 1 in config_site.h and
>> the passthrough codec for PCMA is also set to 1, but when I make a call to
>> the PJSIP stack, I get the following error in the SIP SPD: "No suitable
>> codec for remote offer (PJMEDIA_SPDNEG_NOANSCODEC)". It looks like the SIP
>> stack don't have any passthrough codec, although #define
>> PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMA is set to 1. All codec defines are set
> to
>> zero.
>>
>> I have looked in the function pjsua_media_subsys_init, in file
>> pjsua_media.c, under the define PJMEDIA_HAS_PASSTHROUGH_CODECS. When I run
>> the code it finds no sound device, to me it looks like that could be the
>> problem, because ext_fmt_cnt remains on zero, how to add a dummy sound
>> device, I tried with null_sound_device, but it doesn't work.
>>
>> The samples shall be transmitted / received over a SSC bus, where the
> codec
>> is connected, so I have made my own PJSIP port, where the to functions
> put-
>> and getframe transmit and receive the data from and to the SSC bus, so I
>> don't need any sounddevice.
>>
>> Does anyone know how to solve this problem?
>>
>> Best Regards
>> Kresten
>>
>> -----Oprindelig meddelelse-----
>> Fra: pjsip-bounces at lists.pjsip.org
>> [mailto:pjsip-bounces at lists.pjsip.org]P? vegne af Nanang Izzuddin
>> Sendt: 29. oktober 2009 17:52
>> Til: pjsip list
>> Emne: Re: [pjsip] CODEC
>>
>>
>> Hi Kresten,
>>
>> Did you mean PCMU/u-law hardware codec?
>>
>> Please also note that enabling passthrough codecs will require audio
>> switchboard as described in APS/VAS-direct wiki [1].
>>
>> Log snippet could be very useful.
>>
>> ---
>> [1] http://trac.pjsip.org/repos/wiki/Nokia_APS_VAS_Direct
>>
>> BR,
>> nanang
>>
>>
>> On Thu, Oct 29, 2009 at 8:07 PM, Kresten Tolstrup <kt at danphone.com> wrote:
>>> Hi,
>>>
>>> I have a a-low hardware codec together with a WinCE uP. Therefore I want
>> to
>>> use PJSIP with a passthrough CODEC. in the file config_site.h I have set
>> the
>>> following:
>>>
>>> #define PJMEDIA_HAS_PASSTHROUGH_CODECS ?1
>>> #define PJMEDIA_HAS_L16_CODEC ? ? ? ? ? 0
>>> #define PJMEDIA_HAS_ILBC_CODEC ? ? ? ? ?0
>>> #define PJMEDIA_HAS_GSM_CODEC ? ? ? ? ? 0
>>> #define PJMEDIA_HAS_SPEEX_CODEC ? ? ? ? 0
>>> #define PJMEDIA_HAS_G722_CODEC ? ? ? ? ?0
>>> #define PJMEDIA_HAS_PASSTHROUGH_CODEC_G729 ?0
>>> #define PJMEDIA_HAS_PASSTHROUGH_CODEC_ILBC ? ? ?0
>>> #define PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMA ? ? ?0
>>>
>>> When I make a call to SJphone, and PJMEDIA_HAS_PASSTHROUGH_CODECS is set
>> to
>>> 1, SJphone says that there is CODEC error, but when
>>> PJMEDIA_HAS_PASSTHROUGH_CODECS is set to 0 the sip call go through.
>>> How can I fix this?
>>>
>>> Best regards
>>> Kresten
>>>
>>>
>>> _______________________________________________
>>> Visit our blog: http://blog.pjsip.org
>>>
>>> pjsip mailing list
>>> pjsip at lists.pjsip.org
>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>>
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip at lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip at lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip at lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>



[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