Building Java code
To build the Java code you only need eclipse and Android SDK.
Building native Libraries
Imsdroid contains only one native Library (Tinywrap. So) Written in C ++ as a wrapper
Doubango project. The JNI files are generated using
Swig.
To buildTinywrapYou have to build all
Doubango's libraries (ANSI-C ).
TinywrapDepends on:
- Tinysak(Swiss Army Knife): utilities functions (SHA-1, MD5, HMAC, String, list, timers, thread, mutex, semaphore ,...)
- Tinynet: Networking (DNS, dhcpv4/V6, stun, turn, ice, Enum, sockets ,...)
- Tinyhttp: HTTP stack (connect, delete, get, Head, options, patch, post, put, Trace ,...)
- Tinyxcap: Xcap stack (auid manager, URL generator) without XML Parser (see Java code for parsers)
- Tinyipsec: IPSec SA manager. Useless for Android but you must have it
- Tinysms: SMS over IP (SM-TL, SM-RL) for IMS/LTE Networks
- Tinysigcomp:Signaling Compression
- Tinysdp: SDP protocol
- Tinyrtp: RTP/RTCP protocols
- Tinymsrp: MSRP protocol (chat and file transfer)
- Tinymedia: Media plugins Manager (audio, video, codecs, sessions, MSRP, QoS ,...)
- Tinydav(Doubango audio video): Media plugins implementation
- Tinysip: SIP/IMS Stack
The project also depends on FFMPEG, x264, opencore-Amr, libogg, libvorbis, libtheora, ilbc, speex ,... but you don't need to rebuild these libraries as they are already part of doubango ($ (Doubango_home)/thirdparties/Android/lib).
Checkout doubango
svn checkout http://doubango.googlecode.com/svn/trunk/ doubango-read-only
Adjusting
Root. mk
- Goto$ (Doubango_home)/Android-ProjectsAnd openRoot. mkWith your preferred text editor
- Change$ Android_ndk_rootVariable to point to the ndk root directory (e.g.
/Cygdrive/C/Android-ndk)
- Change$ Android_sdk_rootVariable to point to the SDK root directory (e.g.
/Cygdrive/C/Android-SDK). This step is not required if you don't want to use
ADBUtility.
- Change$ Android_platformVariable to point to your preferred platform root directory (e.g.
$(Android_ndk_root)/build/platforms/Android-1.5)
- Set$ Android_gcc_verVariable with your GCC version (e.g.
4.2.1)
- Open new console window
- Add the toolchain root binary directory to the System$ PathIf not already done:
export PATH=$ANDROID_NDK_ROOT\build\prebuilt\$(HOST)\arm-eabi-4.2.1\bin:$PATH
Where$ HostIs equalDarwin-x86On Mac OS X,
WindowsOn Windows XP/Vista/7 andLinux-x86On Unix-like systems. We assume that
$ (Android_gcc_ver)Is equal4.2.1.
- Set your custom$ (Cflags)Flags to change the default behavior. Example:
export CFLAGS="–Os –DDEBUG_LEVEL=DEBUG_LEVEL_ERROR"
You can off course set any valid gcc$ (Cflags)Flags.
Example of doubango's specific flags:
- -Dtnet_have_openssl_h = 1: Enable supportTLS(You must have
OpenSSL)
- -Djb_history_size = 500: Sets audio jitter buffer size to 500 frames
- -Dflip_decoded_pict = 1: Flip the decode Video Frames
- ...
Building libtinywrap. So without g729ab
- Go to the Android-Projects root directory:
cd $(DOUBANGO_HOME)/android-projects
- Build all projects:
../bindings/java/android/buildAll.sh# For neon optimizations#../bindings/java/android/buildAll.sh NEON=yes
You can addNeon = YesTo enable neon Optimization for armv7-a processors. You must use at least
Ndk r4b.
The binaries will be generated under$ (Doubango_home)/Android-Projects/Output. The shared libraries will be named
LibtinyWRAP_armv7-a.soIf builtNeonOptimizations. Otherwise it will be named
Libtinywrap_armv5te.so. Rename the libraryLibtinywrap. SoAnd copy it
Imsdroid \ libs \ $ (ABI)WhereAbiIs equal
ArmeabiFor the armv5te version orArmeabi-v7aFor ARMv7-a.
Building libtinywrap. So with g729ab
Starting imsdroid
Revision 311 and doubango
Revision 498 we fully support g.729 Annex A and B (CNG and VaD ).
G.729 shoshould only be used for experimental purpose. g.729 provided des patents from several companies and is licensed by sipro lab Telecom.
Sipro lab Telecom is the authorized intellectual property licensing administrator for g.729 technology and patent pool.
In a number of countries, the use of g.729 may require a license between and/or royalty.
Because of the licensing issue the application is not built with g.729.
To buildLibtinywrap. SoWith g.729ab support:
- Go into $ (doubango_home) Directory
cd $(DOUBANGO_HOME)
- Checkout the arm optimized version of g729ab/Cygdrive/C/tmp
svn checkout http://g729.googlecode.com/svn/trunk/ /cygdrive/c/tmp/g729b
- Copy g729ab files into doubango Project
cp -f /cygdrive/c/tmp/g729b/* $(DOUBANGO_HOME)/g729b
- Build and install g729ab Library
cd $(DOUBANGO_HOME)/android-projectsmake PROJECT=g729b BT=static install#For cleanup#make PROJECT=g729b BT=static clean
- Build tinywrap with g29ab
../bindings/java/android/buildAll.sh G729=yes# For neon optimizations#../bindings/java/android/buildAll.sh G729=yes NEON=yes
You can addNeon = YesTo enable neon Optimization for armv7-a processors. You must use at least
Ndk r4b.
The binaries will be generated under$ (Doubango_home)/Android-Projects/Output. The shared libraries will be named
LibtinyWRAP_armv7-a.soIf builtNeonOptimizations. Otherwise it will be named
Libtinywrap_armv5te.so. Rename the libraryLibtinywrap. SoAnd copy it
Imsdroid \ libs \ $ (ABI)WhereAbiIs equal
ArmeabiFor the armv5te version orArmeabi-v7aFor ARMv7-a.
Et voil à