[pjsip] Android, compile with ffmpeg

Giacomo Furlan giacomo.furlan at be-ssd.com
Fri Oct 16 05:21:49 EDT 2015


Ok news here.

Actually the library is named "libavformat-57.so", not -56! Is this an
ffmpeg bug or a pjsip one?

Giacomo Furlan
Software developer
Software Solutions Designs

2015-10-16 9:06 GMT+02:00 Giacomo Furlan <giacomo.furlan at be-ssd.com>:

> Thanks Alexander, Werner for the answers,
>
> honestly I didn't expect an email so soon! Thanks!
>
> @Alexander: I still use Eclipse at work due to CI and previous projects
> that we still need to convert to Android Studio and new CI settings.
> @Werner: I just use the Pjsua2 example application: I only import it and
> run it (copying the ffmpeg so files before it). I can though write you how
> I compile all the things:
>
> 1. SVN checkout of pjproject
> 2. download FFMPEG (2.8.1) sources
> 3. compile FFMPEG following this tutorial (specifying architecture):
> http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/ specifying
> 4. compile PJProject following this guide (specifying architecture):
> https://trac.pjsip.org/repos/wiki/Getting-Started/Android (specifying
> FFMPEG's directory)
> 5. make the swig project
> 6. import Pjsua2 project in Eclipse
> 7. move libs/armeabi to /libs/armeabi-v7a
> 8. copy all FFMPEG's .so files to /libs/armeabi-v7a
> 9. lunch (and that's the error)
>
> Giacomo Furlan
> Software developer
> Software Solutions Designs
>
> 2015-10-15 17:57 GMT+02:00 Alexandar Gotev <alex.gotev at mobimesh.it>:
>
>> Hi Giacomo,
>> if you use Android Studio you have to place the JNI source files in the
>> src/main/jniLibs directory of your project. You can see how I've done it in
>> one of my projects here: https://github.com/alexbbb/pjsip-android
>>
>> Alex Gotev
>>
>> Team di sviluppo MobiMESH
>> Via Benigno Crespi 57, 20159 Milano
>> tel. +39 02 70633354 <callto:+39%2002%2070633354>
>> web http://www.mobimesh.it
>>
>> ------------------------------
>> *Da: *"Werner Dittmann" <Werner.Dittmann at t-online.de>
>> *A: *"pjsip" <pjsip at lists.pjsip.org>
>> *Inviato: *Giovedì, 15 ottobre 2015 17:47:34
>> *Oggetto: *Re: [pjsip] Android, compile with ffmpeg
>>
>> Can you show the statements that you use to load the libraries?
>>
>> Am 15.10.2015 um 17:03 schrieb Giacomo Furlan:
>> > Hello to everyone!
>> >
>> > I've tried compiling pjsip for Android following the guide on the
>> website. I've compiled also ffmpeg, and generated the Android project. Both
>> the project have been built for armeabi-v7a, thus I renamed the
>> libs/armeabi to libs/armeabi-v7a and copied all the ffmpeg's .so library
>> files in the same folder.
>> >
>> > Now Pjsua2 crashes at startup with the following error:
>> >
>> > E/AndroidRuntime( 2247): FATAL EXCEPTION: main
>> > E/AndroidRuntime( 2247): java.lang.ExceptionInInitializerError
>> > E/AndroidRuntime( 2247):     at
>> org.pjsip.pjsua2.app.MainActivity.onCreate(MainActivity.java:92)
>> > E/AndroidRuntime( 2247):     at
>> android.app.Activity.performCreate(Activity.java:5008)
>> > E/AndroidRuntime( 2247):     at
>> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
>> > E/AndroidRuntime( 2247):     at
>> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
>> > E/AndroidRuntime( 2247):     at
>> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
>> > E/AndroidRuntime( 2247):     at
>> android.app.ActivityThread.access$600(ActivityThread.java:130)
>> > E/AndroidRuntime( 2247):     at
>> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
>> > E/AndroidRuntime( 2247):     at
>> android.os.Handler.dispatchMessage(Handler.java:99)
>> > E/AndroidRuntime( 2247):     at android.os.Looper.loop(Looper.java:137)
>> > E/AndroidRuntime( 2247):     at
>> android.app.ActivityThread.main(ActivityThread.java:4745)
>> > E/AndroidRuntime( 2247):     at
>> java.lang.reflect.Method.invokeNative(Native Method)
>> > E/AndroidRuntime( 2247):     at
>> java.lang.reflect.Method.invoke(Method.java:511)
>> > E/AndroidRuntime( 2247):     at
>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
>> > E/AndroidRuntime( 2247):     at
>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
>> > E/AndroidRuntime( 2247):     at dalvik.system.NativeStart.main(Native
>> Method)
>> > E/AndroidRuntime( 2247): Caused by: java.lang.UnsatisfiedLinkError:
>> Cannot load library: link_image[1891]:    90 could not load needed library
>> 'libavformat-56.so' for 'libpjsua2.so' (load_library[1093]: Library
>> 'libavformat-56.so' not found)
>> > E/AndroidRuntime( 2247):     at
>> java.lang.Runtime.loadLibrary(Runtime.java:370)
>> > E/AndroidRuntime( 2247):     at
>> java.lang.System.loadLibrary(System.java:535)
>> > E/AndroidRuntime( 2247):     at
>> org.pjsip.pjsua2.app.MyApp.<clinit>(MyApp.java:292)
>> > E/AndroidRuntime( 2247):     ... 15 more
>> > W/ActivityManager(  266):   Force finishing activity
>> org.pjsip.pjsua2.app/.MainActivity
>> >
>> > Strange thing, the library is there. I've also double checked, the file
>> is in the apk under the libs folder.
>> >
>> > Any hint?
>> >
>> > Thanks
>> >
>> >
>> > Giacomo Furlan
>> > Software developer
>> > Software Solutions Designs
>> >
>> >
>> > _______________________________________________
>> > 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
>> >
>>
>> --
>> Werner Dittmann
>> email: Werner.Dittmann at t-online.de
>> cell:  +49 173 44 37 659
>> PGP key: 82EF5E8B
>>
>> _______________________________________________
>> 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
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20151016/91d27f78/attachment-0002.html>


More information about the pjsip mailing list