Building imsdroid Source

Source: Internet
Author: User
Tags xml parser
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
  1. Goto$ (Doubango_home)/Android-ProjectsAnd openRoot. mkWith your preferred text editor
  2. Change$ Android_ndk_rootVariable to point to the ndk root directory (e.g.
    /Cygdrive/C/Android-ndk)
  3. 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.
  4. Change$ Android_platformVariable to point to your preferred platform root directory (e.g.
    $(Android_ndk_root)/build/platforms/Android-1.5)
  5. Set$ Android_gcc_verVariable with your GCC version (e.g.
    4.2.1
    )
  6. Open new console window
  7. 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.

  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
  1. Go to the Android-Projects root directory:

    cd $(DOUBANGO_HOME)/android-projects
  2. 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
Armeabi
For 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:

  1. Go into $ (doubango_home) Directory

    cd $(DOUBANGO_HOME)
  2. Checkout the arm optimized version of g729ab/Cygdrive/C/tmp
    svn checkout http://g729.googlecode.com/svn/trunk/ /cygdrive/c/tmp/g729b
  3. Copy g729ab files into doubango Project
    cp -f /cygdrive/c/tmp/g729b/* $(DOUBANGO_HOME)/g729b
  4. Build and install g729ab Library
    cd $(DOUBANGO_HOME)/android-projectsmake PROJECT=g729b BT=static install#For cleanup#make PROJECT=g729b BT=static clean
  5. 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
Armeabi
For the armv5te version orArmeabi-v7aFor ARMv7-a.

Et voil à

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.