PJSIP 2.1 for Android without OpenSL

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

 



Ah, that explains it :) ! Thanks ... and yeah audio routing is a nightmare of inconsistencies (particularly with the earlier Samsung implementations).

Regis, I'm trying to build a library that does not require libopenSLES. I've compiled with PJ_MEDIA_AUDIO_DEV+HAS_OPENSL set to 0 and the -disable-video flag but the build files still seem to link to libopenSLES. Do you by any chance know if there is anything else that requires it ? Or if there is a better way to build without any OpenSL support ?


From: pjsip [mailto:pjsip-bounces@xxxxxxxxxxxxxxx] On Behalf Of R?gis Montoya
Sent: 23 May 2013 11:22
To: pjsip at lists.pjsip.org
Subject: Re: PJSIP 2.1 for Android without OpenSL


The config site you see is one generated by the toolchain of csipsimple.
In CSipSimple I use initial contrib for opensl and jni implem and so, there is no HAS_OPENSL and the HAS_JNI macro because for me, I always build with both enabled at the same time.

When the implementation was integrated from csipsimple to pjsip it was cleaned up and some macro renamed to match better pjsip naming. That's why I don't see these macro in csipsimple.

Another point that you might be interested in : the intial implementation from CSipSimple also contains some hook to support all weird routing from all manufacturer that does audio routing a very weird way.
This can only be done by the app on java space. That's why it's not integrated in pjsip/pjsua (and unfortunately could not be technically a simple way). So if you encounter strange behaviors on some devices with implementation integrated in pjsip you might need to add some management of the audio routing in your java app. Despite of the 4 years I worked on CSipSimple there is still things to continuously change on this part and it's continuously evolving from users feedback when you devices arrives from manufacturers that does wrong things or when custom rom are build (cyanogen for example) that breaks the standard behavior of android routing api. It's really a problem of manufacturer/ROM maker, not a problem of android API. The code that has been integrated in pjsip strictly respect android API and should work just fine if manufacturer do clean implementation of audio driver (so it's most of cases for mainstream users).



On 23/05/2013 10:59, Seebregts, Anthony wrote:
Thanks Regis - I guess the multiply defined JNI_OnLoad issue is perhaps something to with pjsua then. I'll have to dig deeper.

re. CSipSimple/1.x I looked in the config_site.h and it had something like:

    #define PJMEDIA_AUDIO_DEV_HAS_ANDROID 1

whereas the config_site_sample.h for the 2.1 release has:

   #define PJMEDIA_AUDIO_DEV_HAS_OPENSL               1
    #define PJMEDIA_AUDIO_DEV_HAS_ANDROID_JNI  0

so I assumed it was using an earlier release. My mistake - apologies :(.


From: pjsip [mailto:pjsip-bounces@xxxxxxxxxxxxxxx] On Behalf Of R?gis Montoya
Sent: 23 May 2013 10:49
To: pjsip at lists.pjsip.org<mailto:pjsip at lists.pjsip.org>
Subject: Re: PJSIP 2.1 for Android without OpenSL



I've tried enabling PJMEDIA_AUDIO_DEV_HAS_ANDROID_JNI in config_site.h but end up with multiple JNI_OnLoad definitions when I compile. And CSipSimple (which apparently does work on earlier versions of Android) seems to be using a 1.x version of pjsip.


CSipSimple uses current trunk version of pjsip (so 2.x) (there is only few commits of latests days that are not yet integrated). Where did you see it uses 1.x? (Maybe I forgot to udpdate some wiki page?). There is the video feature... so you could have deduced it's not 1.x ;).

Else, yes, CSipSimple works from 1.6 (and actually could run from 1.5 if the compatibility library from google was supporting android 1.5).

The JNI and the OpenSL-ES implementation can coexists if you split things when you build and load the audio device implementation from your app / native code specific to your app instead of melding everything in a single dynamic library. Pjsip is well designed to support that dynamically... you can just use this fact.
BTW, if you want to support both it's mandatory to not have your main pjsip dyn lib linked to opensl-es lib else it will simply not load on older android versions.
Unlike on the monolitic iOS, android is made to allow plugins and dynamic detection of things. And pjsip also allows to dynamically add features (audio devices glue, video devices glue, codecs etc).



To read FirstRand Bank's Disclaimer for this email click on the following address or copy into your Internet browser:
https://www.fnb.co.za/disclaimer.html


If you are unable to access the Disclaimer, send a blank e-mail to firstrandbankdisclaimer at fnb.co.za<mailto:firstrandbankdisclaimer at fnb.co.za> and we will send you a copy of the Disclaimer.




_______________________________________________

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


To read FirstRand Bank's Disclaimer for this email click on the following address or copy into your Internet browser: 
https://www.fnb.co.za/disclaimer.html 

If you are unable to access the Disclaimer, send a blank e-mail to
firstrandbankdisclaimer at fnb.co.za and we will send you a copy of the Disclaimer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130523/1135a2f9/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