1.生成config_site.h文件
????1.1.引入頭文件
????#include?
????1.2.添加宏
????#define?PJ_CONFIG_IPHONE???????1
????#define?PJMEDIA_HAS_VIDEO??????1?
????1.3?添加第三方.a?文件遭笋,到?third_party?文件夾內(nèi)
????(openh264辞槐,opus1.1.5)
2.開始編譯
????2.1.?cd到主目錄.
????2.2.?設(shè)置iOS最小版本(openh264?=文件路徑???opus=文件路徑)
????2.2.1?(armv7)
export?MIN_IOS="-miphoneos-version-min=8.0"
./configure-iphone?--with-openh264=/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/openh264?--with-opus=/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/opus1.1.5?
make?dep?&&?make?clean?&&?make?
2.2.2(arm64)
export?MIN_IOS="-miphoneos-version-min=8.0"
ARCH="-arch?arm64"?./configure-iphone?--with-openh264=/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/openh264?--with-opus=/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/opus1.1.5
make?dep?&&?make?clean?&&?make?
2.2.3(armv7s)
export?MIN_IOS="-miphoneos-version-min=8.0"
ARCH='-arch?armv7s'?./configure-iphone?--with-openh264=/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/openh264?--with-opus=/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/opus1.1.5???
make?dep?&&?make?clean?&&?make?
2.2.4?(i386)
export?MIN_IOS="-miphoneos-version-min=8.0"
export?DEVPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
ARCH="-arch?i386"?CFLAGS="-O2?-m32?-mios-simulator-version-min=8.0"?LDFLAGS="-O2?-m32?-mios-simulator-version-min=8.0"?./configure-iphone?--with-openh264=/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/openh264?--with-opus=/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/opus1.1.5???
make?dep?&&?make?clean?&&?make?
2.2.5.?(x86_64)
export?MIN_IOS="-miphoneos-version-min=8.0"
export?DEVPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
ARCH="-arch?x86_64"?CFLAGS="-O2?-m64?-mios-simulator-version-min=8.0"?LDFLAGS="-O2?-m64?-mios-simulator-version-min=8.0"?./configure-iphone?--with-openh264=/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/openh264?--with-opus=/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/opus1.1.5
make?dep?&&?make?clean?&&?make?
3.合并靜態(tài)庫
3.1?pjlib(1)
路徑:pj2.7/pjlib/lib
libpj-armv7-apple-darwin_ios.a?+?libpj-arm64-apple-darwin_ios.a?+?libpj-armv7s-apple-darwin_ios.a?+?libpj-i386-apple-darwin_ios.a?+?libpj-x86_64-apple-darwin_ios.a?=?libpj.a
命令:
cd?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/lib/pjlib?(備注?直接進(jìn)入到生成新的庫目錄)
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjlib/lib/libpj-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjlib/lib/libpj-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjlib/lib/libpj-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjlib/lib/libpj-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjlib/lib/libpj-x86_64-apple-darwin_ios.a?-output?libpj.a
移動到lib/pjlib文件夾下
3.2?pjlib-util(2)
路徑:pj2.7/pjlib-util/lib
命令:
cd?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/lib/pjlib-util?(備注?直接進(jìn)入到生成新的庫目錄)
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjlib-util/lib/libpjlib-util-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjlib-util/lib/libpjlib-util-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjlib-util/lib/libpjlib-util-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjlib-util/lib/libpjlib-util-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjlib-util/lib/libpjlib-util-x86_64-apple-darwin_ios.a?-output?libpjlib-util.a
3.3?pjmedia(5)
路徑:pj2.7/pjmedia/lib
命令:
cd?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/lib/pjmedia?(備注?直接進(jìn)入到生成新的庫目錄)
3.3.1?libpjmedia.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-x86_64-apple-darwin_ios.a?-output?libpjmedia.a
3.3.2?libpjmedia-audiodev.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-audiodev-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-audiodev-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-audiodev-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-audiodev-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-audiodev-x86_64-apple-darwin_ios.a?-output?libpjmedia-audiodev.a
3.3.3?libpjmedia-codec.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-codec-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-codec-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-codec-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-codec-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-codec-x86_64-apple-darwin_ios.a?-output?libpjmedia-codec.a
3.3.4?libpjmedia-videodev.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-videodev-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-videodev-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-videodev-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-videodev-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjmedia-videodev-x86_64-apple-darwin_ios.a?-output?libpjmedia-videodev.a
3.3.5??libpjsdp.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjsdp-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjsdp-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjsdp-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjsdp-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjmedia/lib/libpjsdp-x86_64-apple-darwin_ios.a?-output?libpjsdp.a
3.4?pjnath(1)
路徑:pj2.7/pjnath/lib
命令:
cd?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/lib/pjnath?(備注?直接進(jìn)入到生成新的庫目錄)
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjnath/lib/libpjnath-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjnath/lib/libpjnath-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjnath/lib/libpjnath-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjnath/lib/libpjnath-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjnath/lib/libpjnath-x86_64-apple-darwin_ios.a?-output?libpjnath.a?
3.5?pjsip?(5)
路徑:pj2.7/pjsip/lib
命令:
cd?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/lib/pjsip?(備注?直接進(jìn)入到生成新的庫目錄)
3.5.1??libpjsip.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-x86_64-apple-darwin_ios.a?-output?libpjsip.a
3.5.2?libpjsip-simple.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-simple-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-simple-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-simple-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-simple-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-simple-x86_64-apple-darwin_ios.a?-output?libpjsip-simple.a
3.5.3?libpjsip-ua.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-ua-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-ua-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-ua-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-ua-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsip-ua-x86_64-apple-darwin_ios.a?-output?libpjsip-ua.a
3.5.4?libpjsua.a
-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsua-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsua-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsua-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsua-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsua-x86_64-apple-darwin_ios.a?-output?libpjsua.a
3.5.5?libpjsua2.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsua2-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsua2-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsua2-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsua2-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/pjsip/lib/libpjsua2-x86_64-apple-darwin_ios.a?-output?libpjsua2.a
3.6??third_party(8)
路徑:pj2.7/third_party/lib
命令:
cd?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/lib/third_party??(備注?直接進(jìn)入到生成新的庫目錄)
3.6.1?libg7221codec.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libg7221codec-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libg7221codec-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libg7221codec-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libg7221codec-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libg7221codec-x86_64-apple-darwin_ios.a?-output?libg7221codec.a
3.6.2?libgsmcodec.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libgsmcodec-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libgsmcodec-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libgsmcodec-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libgsmcodec-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libgsmcodec-x86_64-apple-darwin_ios.a?-output?libgsmcodec.a
3.6.3?libilbccodec.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libilbccodec-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libilbccodec-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libilbccodec-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libilbccodec-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libilbccodec-x86_64-apple-darwin_ios.a?-output?libilbccodec.a
3.6.4?libresample.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libresample-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libresample-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libresample-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libresample-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libresample-x86_64-apple-darwin_ios.a?-output?libresample.a
3.6.5?libspeex.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libspeex-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libspeex-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libspeex-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libspeex-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libspeex-x86_64-apple-darwin_ios.a?-output?libspeex.a
3.6.6?libsrtp.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libsrtp-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libsrtp-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libsrtp-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libsrtp-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libsrtp-x86_64-apple-darwin_ios.a?-output?libsrtp.a
3.6.7?libwebrtc.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libwebrtc-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libwebrtc-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libwebrtc-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libwebrtc-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libwebrtc-x86_64-apple-darwin_ios.a?-output?libwebrtc.a
3.6.8?libyuv.a
lipo?-create?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libyuv-arm64-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libyuv-armv7-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libyuv-armv7s-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libyuv-i386-apple-darwin_ios.a?/Users/sunhaiping/Desktop/原版pj2.7/pjproject-2.7.2/third_party/lib/libyuv-x86_64-apple-darwin_ios.a?-output?libyuv.a
3.7?將openh264.a?與?oups.a?移動到lib/third_party?中
編譯完成
4.導(dǎo)出頭文件
????分別把?pjlib;?pjlib-util?;pjmedia;pjnath;pjsip;??文件夾中的include文件拷貝到一個文件夾內(nèi)。
5.導(dǎo)出pjsua?文件
????在目錄:pjproject-2.7.2/pjsip-apps/src/pjsua?
????gui.h?
????pjsua_app_cli.c??
????pjsua_app_common.c?
????pjsua_app_common.h?
????pjsua_app_config.c?
????pjsua_app_config.h?
????pjsua_app_legacy.c?
????pjsua_app.c??
????pjsua_app.h
????放到新文件加pjsua中