本文主要是介绍基于Android系统PJSIP库植入g729编码,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
基于Android系统PJSIP库植入g729编码
- 前言
- 操作步骤
- 1.从仓库下载最新的 PJSIP。
- 3.将你的PJSIP项目中的所有文件作为给定补丁中的目录。
- 4.按照 pjproject-2.5.diff 的说明应用更改。
- 5.构建。
前言
有时候由于工作的需求,我们需要基于Android系统的PJSIP库支持G.729编码,原来的库在编译的时候并没有支持此编码,通话会听不见声音,下面我就介绍下如何构建支持G.729编码的PJSIP库,希望能够帮助到需要的小伙伴。
操作步骤
1.从仓库下载最新的 PJSIP。
下载地址:https://github.com/pjsip/pjproject/releases
2.下载补丁
下载地址:https://github.com/saravnandm/pjsip2.5-g729codec
3.将你的PJSIP项目中的所有文件作为给定补丁中的目录。
PJSip 2.5 + G729 codecSteps to integrate g729 codec with the pjsip-2.5 library.Download g729 patch hereDownload pjsip-2.5 library hereUnzip both the downloaded zip files. Set the permission of the ./pjsip-2.5 folder to 777, By executing the below command in terminal.$chmod -R 777 /pjproject-2.5Apply pjproject-2.5.diff patch first.Copy the source and build files of g729 codec from "./pjsip2.5-g729codec/pjproject-2.5/" to the corresponding location of your pjproject-2.5. Make sure you are moving the files to the same location as the patch(pjproject-2.5). Create the dir structure if not exists.NOTEPatch is tested with pjsip2.5 onlyg729 codec is not an open source library. So make sure you have the licence to use.g729 codec source(pj.diff file) taken from linphone opensource project.COMMON ERRORS
Error 1:
bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory
Fix:
open your script with vi or vim and enter in vi command mode (key ESC), then type this:
:set fileformat=unix
Press return and finally save it
:x! or :wq!
Error 2:
Undefined symbols for architecture armv7s:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [../bin/samples/arm-apple-darwin9/pjsua2_demo] Error 1
make[2]: *** [pjsua2_demo] Error 2
make[1]: *** [samples] Error 2
make: *** [all] Error 1
Fix:
$ make clean
$ rm pjsip-apps/build/output/pjsua2_sample-arm-apple-darwin9/pjsua2_demo.oError 3:
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=armv7s, VALID_ARCHS=armv7)Fix:
To solve this issue, just turn off the ONLY_ACTIVE_ARCH flag. Open the Build Settings->Build Active Architecutre Only flag-> change from YES to NO.
帮助文档地址
4.按照 pjproject-2.5.diff 的说明应用更改。
5.构建。
这篇关于基于Android系统PJSIP库植入g729编码的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!