基于Android系统PJSIP库植入g729编码

编程入门 行业动态 更新时间:2024-10-21 18:55:12

基于Android<a href=https://www.elefans.com/category/jswz/34/1770742.html style=系统PJSIP库植入g729编码"/>

基于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。

下载地址:

2.下载补丁
下载地址:.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编码

本文发布于:2023-12-05 21:55:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1665421.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:系统   Android   PJSIP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!