[pjmedia] Unable to find default audio device on Android

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

 



Ok,

So as you have your own entry point different from csipsimple's one, 
maybe you forgot to report these lines :

http://code.google.com/p/csipsimple/source/browse/trunk/pjsip_android/apps/pjsip/project/jni/src/pjsua_jni_addons.c#435

In your case it is this one :

pjmedia_aud_register_factory(&pjmedia_opensl_factory);

(Even if I'd advise you to add both lines with the define tests around).
With this done, pjsip will find the valid aud factory when trying to retrieve an audio device factory for current device.



Le mar. 11 oct. 2011 16:48:16 CEST, Isidoro Castell Egea a ?crit :
>
> Hi R?gis,
>
> First of all thanks for your quickly reply. I'm building the library
> from CSipSimple project as you say I use pjsip_android subfolder.
>
> I try to compile with 2.3 compatibility instead 1.5 but I get the same
> error code (420006). I can't use CSipSimple directly because I don't
> use sip part, so I make some native functions in c that do the hard work.
>
> Do you have any idea about I'm doing bad?
>
> I paste my Application.mk below:
>
> APP_PROJECT_PATH := $(call my-dir)/../../../CSipSimple
> #APP_PROJECT_PATH := $(call my-dir)/project
> APP_BUILD_SCRIPT= := $(call my-dir)/project/build/Android.mk
> #APP_OPTIM := debug
> APP_OPTIM := release
> APP_ABI := armeabi armeabi-v7a
> #APP_ABI := armeabi-v7a
> #APP_ABI := armv4t
> APP_STL := stlport_static
>
>
> MY_USE_G729 := 1
> MY_USE_ILBC := 0
> MY_USE_G722 := 1
> MY_USE_G7221 := 0
> MY_USE_SPEEX := 1
> MY_USE_GSM := 1
> MY_USE_SILK := 1
> MY_USE_CODEC2 := 0
> MY_USE_TLS := 0
> MY_USE_WEBRTC := 0
>
> MY_ANDROID_DEV := 2
>
> BASE_PJSIP_FLAGS := -DPJ_ANDROID=1
> -DPJMEDIA_HAS_G729_CODEC=$(MY_USE_G729) \
> -DPJMEDIA_HAS_ILBC_CODEC=$(MY_USE_ILBC)
> -DPJMEDIA_HAS_G722_CODEC=$(MY_USE_G722) \
> -DPJMEDIA_HAS_SPEEX_CODEC=$(MY_USE_SPEEX)
> -DPJMEDIA_HAS_GSM_CODEC=$(MY_USE_GSM) \
> -DPJMEDIA_HAS_SILK_CODEC=$(MY_USE_SILK)
> -DPJMEDIA_HAS_CODEC2_CODEC=$(MY_USE_CODEC2) \
> -DPJMEDIA_HAS_G7221_CODEC=$(MY_USE_G7221)
> -DPJMEDIA_HAS_WEBRTC_CODEC=$(MY_USE_WEBRTC) \
> -DPJ_HAS_SSL_SOCK=$(MY_USE_TLS) -DPJMEDIA_HAS_ZRTP=$(MY_USE_TLS) \
> -DPJ_ANDROID_DEVICE=$(MY_ANDROID_DEV)
>
> I don't use Webrtc so I desactivated it.
>
> You said "pjsip_android sub project also includes other specific glues
> for android." What are this includes? And where I can find this file?
>
> Many thanks!
>
> BR,
> Isidoro.
>
> 2011/10/11 R?gis Montoya <r3gis.3r at gmail.com <mailto:r3gis.3r at gmail.com>>
>
> Hi Isidorio,
>
> Did you try to build the library from CSipSimple project or a
> direct build of pjsip from trunk?
>
> If you use pjsip from trunk, keep in mind that Android is not yet
> support by pjsip trunk.
> So, obviously the glue with android audio device is not included
> in pjsip, and as consequence it's absolutely normal that it does
> not find the android device, and that your lib cries about the
> fact it does not find any glue for this audio device.
>
> You should have a look to csipsimple/pjsip_android sub project. It
> includes two implementation of the audio device for android. One
> works from android 1.5 and is based on the android java API (it
> requires to add something in your glue, but if you reuse
> pjsip_android project, everything is included), another is based
> on the new OpenSL-ES API introduced in android 2.3 (and is
> available only from android 2.3 and upper).
>
> pjsip_android sub project also includes other specific glues for
> android. I'm currently finishing the port of the timer
> implementation so that it will use android alarms instead of a
> running thread that consume a lot of CPU.
>
> Regards,
> R?gis
>
>
> On 11/10/2011 15:07, Isidoro Castell Egea wrote:
>>
>> Hi all,
>>
>> I'm developing an android app wich integrate pjmedia in order to
>> transfer audio each devices. I can initialize media manager, but
>> when I try to create a stream I get "Unable to find default audio
>> device" (PJMEDIA_EAUD_NODEFDEV = 420006) from lookup_dev() call
>> in audiodev.c. And I cannot continue with the stream creation.
>>
>> Anyone knows why I get 420006 return code when I call
>> lookup_dev()? Could be privileges matters?
>>
>> Many many thanks in advance!
>>
>> BR,
>> Isidoro.
>>
>>
>>
>> _______________________________________________
>> Visit our blog:http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip at lists.pjsip.org <mailto: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 <mailto:pjsip at lists.pjsip.org>
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
>
>
> -- 
> Isidoro Castell
> Android developer
>
>
>
> _______________________________________________
> 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