Changes between Version 44 and Version 45 of Getting-Started/Android


Ignore:
Timestamp:
Mar 23, 2015 10:13:06 AM (10 years ago)
Author:
nanang
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Getting-Started/Android

    v44 v45  
    1919 2. Set your [wiki:Getting-Started/Build-Preparation config_site.h] to the following: 
    2020  {{{ 
     21/* Activate Android specific settings in the 'config_site_sample.h' */ 
    2122#define PJ_CONFIG_ANDROID 1 
    2223#include <pj/config_site_sample.h> 
    2324  }}} 
    24   This will activate Android specific settings in the {{{config_site_sample.h}}}. 
     25  To also enable video, append the following video settings into {{{config_site.h}}}: 
     26  {{{ 
     27/* Video settings */ 
     28#define PJMEDIA_HAS_VIDEO                       1 
     29#define PJMEDIA_VIDEO_DEV_HAS_ANDROID           1 
     30#define PJMEDIA_VIDEO_DEV_HAS_OPENGL            1 
     31#define PJMEDIA_VIDEO_DEV_HAS_ANDROID_OPENGL    1 
     32  }}} 
    2533 
    2634== Building PJSIP == 
     
    4957 * other customizations are similar to what is explained in [wiki:Getting-Started/Autoconf Building with GNU] page. 
    5058 
    51 == Video Support (in progress) == 
     59== Video Support == 
    5260 
    5361=== Features === 
     
    8795Sample invocation of ./configure-android: 
    8896{{{ 
    89 $ ./configure-android --with-openh264=/Users/me/openh264-1.0.0/android --with-libyuv=/Users/me/libyuv-android 
     97$ ./configure-android --with-openh264=/Users/me/openh264-1.0.0/android --with-libyuv=/Users/me/libyuv-android/jni 
    9098}}} 
    9199 
     
    95103Using OpenH264 prefix... /Users/me/openh264-1.0.0/android 
    96104checking OpenH264 availability... ok 
    97 Using libyuv prefix... /Users/me/libyuv-android 
     105Using libyuv prefix... /Users/me/libyuv-android/jni 
    98106checking for I420Scale in -lyuv... yes 
    99107... 
    100108}}} 
     109 
     110 
     111=== Using Video API === 
     112Please check [wiki:Video_Users_Guide Video User's Guide]. 
     113 
    101114 
    102115== Setting up the target device == 
     
    152165 
    153166 
     167== Using pjsua2 for your own application == #create-own-app 
     168 
     169Note that this has only been tested using [http://developer.android.com/tools/help/adt.html Eclipse with ADT], however it might also be applicable for [http://developer.android.com/tools/studio/index.html Android Studio]. 
     170 
     171 1. First, build {{{pjproject}}} libraries as described above. 
     172 1. Also build {{{pjsua2 sample application}}} as described above, this step is required to generate the pjsua2 Java interface and the native library. 
     173 1. Create Android application outside the PJSIP sources for your project. 
     174 1. Get pjsua2 Java interface and native library from pjsua2 sample application: 
     175    1. Copy pjsua2 Java interface files from {{{pjsip-apps/src/swig/java/android/src}}} to your project's {{{src}}} folder: 
     176       {{{ 
     177$ cd $YOUR_PROJECT_DIR 
     178$ cp -r $PJSIP_DIR/pjsip-apps/src/swig/java/android/src . 
     179 
     180# Cleanup excess pjsua2 application sources. 
     181$ rm -r src/org/pjsip/pjsua2/app 
     182       }}} 
     183    1. Copy native library {{{libpjsua2.so}}} from {{{pjsip-apps/src/swig/java/android/libs}}} to your project's {{{libs}}} folder: 
     184       {{{ 
     185$ cd $YOUR_PROJECT_DIR 
     186$ cp -r $PJSIP_DIR/pjsip-apps/src/swig/java/android/libs . 
     187       }}} 
     188 1. Start writing your application, please check [http://www.pjsip.org/docs/book-latest/html/index.html pjsua2 docs] for reference. 
     189 
     190 
    154191== Debugging native code with Eclipse == #debug-native 
    155192