1.生成config_site.h文件
1.1.引入头文件
#include
1.2.添加宏
#define PJ_CONFIG_IPHONE 1
#define PJMEDIA_HAS_VIDEO 1
1.3 添加第三方.a 文件,到 third_party 文件夹内
(openh264,opus1.1.5)
2.开始编译
2.1. cd到主目录.
2.2. 设置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.合并静态库
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 (备注 直接进入到生成新的库目录)
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 (备注 直接进入到生成新的库目录)
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 (备注 直接进入到生成新的库目录)
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 (备注 直接进入到生成新的库目录)
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 (备注 直接进入到生成新的库目录)
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 (备注 直接进入到生成新的库目录)
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.导出头文件
分别把 pjlib; pjlib-util ;pjmedia;pjnath;pjsip; 文件夹中的include文件拷贝到一个文件夹内。
5.导出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中