csipsimple Latest Version compilation
Csipsimple is dependent on PJSIP protocol, official website http://code.google.com/p/csipsimple/, official online also has compiled the APK, for compiling csipsimple there are two ways, one is to compile JNI, Another kind of compiling JNI, directly using the two have been compiled, I will say, first of all, a relatively simple one, this on the official website also introduced Http://code.google.com/p/csipsimple/wiki/HowToBuild Describes how to compile csipsimple.
First method, do not compile JNI
1. The first is to download the source code, because Csipsimple relies on actionbarsherlock, so you import into eclipse also to import Actionbarsherlock.
[Java]View Plaincopyprint?
- SVN checkout http://csipsimple.googlecode.com/svn/trunk/csipsimple-trunk
There will be 5 folders inside.
Actionbarsherlock csipsimplebranded Csipsimplecodecpack
Csipsimple CSipSimpleCodecG729 Csipsimplevideoplugin
2. Download org.tar.gz, because you do not compile JNI part, so csipsimple source inside the src below the org.pjsip inside is empty, so we want to download some content, download and unzip the corresponding directory copy in
3. To the official website Http://nightlies.csipsimple.com/stable/1.01.00/(This is the latest version) download csipsimple-1.01.00-trunk.apk and then replace the suffix apk with RAR, Unzip to copy the contents of Lib into your project Libs below
4.clean a project, the source code will not error, can be normal operation.
The second method, compiling JNI
This method is more troublesome, mainly to download a variety of dependent library source code, the method is as follows:
1. First download the source code
[Java]View Plaincopyprint?
- SVN checkout http://csipsimple.googlecode.com/svn/trunk/csipsimple-trunk
2. Entering Csipsimple below, we can look at the makefile file, which is roughly what to do:
First download the dependent source code, a total of 6 is silk opus zrtp4pj OpenSSL libvpx Fdk_aac, so to keep the network unblocked, and time is relatively long
Then the patch, for this I started using the NDK version is R9, in this step has been wrong, so I replaced the r8d
Secondly, we have several options for make, as follows:
[Java]View Plaincopyprint?
- Codecpacklibs:
- @ (ndk-build-j6 app_modules="Pj_g7221_codec pj_codec2_codec pj_g726_codec pj_opus_codec pj_aac_codec")
- @ (./dispatch_shared_libs.sh)
- CodecG729:
- @ (ndk-build-j6 app_modules="Pj_g729_codec")
- @ (./dispatch_shared_libs.sh)
- Videolibs:ffmpeg-lib
- @ (ndk-build-j6 app_modules="pj_video_android pj_vpx")
- @ (./dispatch_shared_libs.sh)
- Screensharinglibs:
- @ (ndk-build-j6 app_modules="pj_screen_capture_android")
- @ (./dispatch_shared_libs.sh)
Add different functions, to compile the module is also different, I first was make, so first look at the basic module compile whether there is a problem.
3. First check if the following tools are installed on your system:
[Java]View Plaincopyprint?
- git quilt unzip wget swig2. 0 python make yasm
One of the swig best to download a new website, and now seems to be 2.0.11
4. Configure your SDK,NDK environment variable, then add to/ECT/BASH.BASHRC below, this part oneself to the Internet to search for a bit.
5.make with a very long time, here to declare my environment: ubuntu12.04 NDK for the r8d 32 system, the last appearance:
[Java]View Plaincopyprint?
- # Dispatch to external projects
- Moving libpj_g7221_codec.so to Csipsimplecodecpack project ... [--]-plugin not built
- Moving libpj_codec2_codec.so to Csipsimplecodecpack project ... [--]-plugin not built
- Moving libpj_opus_codec.so to Csipsimplecodecpack project ... [--]-plugin not built
- Moving libpj_g726_codec.so to Csipsimplecodecpack project ... [--]-plugin not built
- Moving libpj_aac_codec.so to Csipsimplecodecpack project ... [--]-plugin not built
- Moving libpj_g729_codec.so to CSipSimpleCodecG729 project ... [--]-plugin not built
- Moving libcrypto.so to Csipsimplecrypto project ... [OK]
- Moving libssl.so to Csipsimplecrypto project ... [OK]
- Moving libpj_video_android.so to Csipsimplevideoplugin project ... [--]-plugin not built
- Moving libpj_screen_capture_android.so to Csipsimplevideoplugin project ... [--]-plugin not built
- Moving libpj_vpx.so to Csipsimplevideoplugin project ... [--]-plugin not built
- # Build Native Library successful
The compilation is successful, then you go to the SRC directory below to see ORG.PJSIP below will have the previous Pjsua directory, this is compiled generated, and you will see the plugin
6. On the basis of the above I added video support, so on the terminal make videolibs to add video support, video support needs ffmpeg third party library, so this is compiled ffmpeg add h264 support.
Possible errors during the period such as:
[Java]View Plaincopyprint?
- make[1]: Leaving directory '/csipsimple-trunk_new/csipsimple/jni/ffmpeg '
- Make: * * * [ffmpeg-lib] Error 2
This is not a tube, again run make videolibs, finally after a long time, and finally the following:
[Java]View Plaincopyprint?
- make[1]: Leaving directory '/csipsimple-trunk_new/csipsimple '
- Moving libpj_g7221_codec.so to Csipsimplecodecpack project ... [--]-plugin not built
- Moving libpj_codec2_codec.so to Csipsimplecodecpack project ... [--]-plugin not built
- Moving libpj_opus_codec.so to Csipsimplecodecpack project ... [--]-plugin not built
- Moving libpj_g726_codec.so to Csipsimplecodecpack project ... [--]-plugin not built
- Moving libpj_aac_codec.so to Csipsimplecodecpack project ... [--]-plugin not built
- Moving libpj_g729_codec.so to CSipSimpleCodecG729 project ... [--]-plugin not built
- Moving libcrypto.so to Csipsimplecrypto project ... [OK]
- Moving libssl.so to Csipsimplecrypto project ... [OK]
- Moving libpj_video_android.so to Csipsimplevideoplugin project ... [OK]
- Moving libpj_screen_capture_android.so to Csipsimplevideoplugin project ... [--]-plugin not built
- Moving libpj_vpx.so to Csipsimplevideoplugin project ... [OK]
The video module we need to make up, when we cloned, there are 5 files, corresponding to the plug-in, the compiled library is not inside the csipsimple and under the Csipsimplevideoplugin folder, We copy the corresponding library to the Libs under the csipsimple.
7. Import the project into Eclipse and run the results as follows:
You can also download Minisipserver to build a server, my test results are as follows:
Csipsimple Latest Version Compilation