Changes between Version 44 and Version 45 of Getting-Started/Android
- Timestamp:
- Mar 23, 2015 10:13:06 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Getting-Started/Android
v44 v45 19 19 2. Set your [wiki:Getting-Started/Build-Preparation config_site.h] to the following: 20 20 {{{ 21 /* Activate Android specific settings in the 'config_site_sample.h' */ 21 22 #define PJ_CONFIG_ANDROID 1 22 23 #include <pj/config_site_sample.h> 23 24 }}} 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 }}} 25 33 26 34 == Building PJSIP == … … 49 57 * other customizations are similar to what is explained in [wiki:Getting-Started/Autoconf Building with GNU] page. 50 58 51 == Video Support (in progress)==59 == Video Support == 52 60 53 61 === Features === … … 87 95 Sample invocation of ./configure-android: 88 96 {{{ 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 90 98 }}} 91 99 … … 95 103 Using OpenH264 prefix... /Users/me/openh264-1.0.0/android 96 104 checking OpenH264 availability... ok 97 Using libyuv prefix... /Users/me/libyuv-android 105 Using libyuv prefix... /Users/me/libyuv-android/jni 98 106 checking for I420Scale in -lyuv... yes 99 107 ... 100 108 }}} 109 110 111 === Using Video API === 112 Please check [wiki:Video_Users_Guide Video User's Guide]. 113 101 114 102 115 == Setting up the target device == … … 152 165 153 166 167 == Using pjsua2 for your own application == #create-own-app 168 169 Note 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 154 191 == Debugging native code with Eclipse == #debug-native 155 192