Android, compile with ffmpeg

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

 



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 
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 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20151015/fd958625/attachment.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