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

2023-10-21 21:52

本文主要是介绍基于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编码的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/257222

相关文章

golang程序打包成脚本部署到Linux系统方式

《golang程序打包成脚本部署到Linux系统方式》Golang程序通过本地编译(设置GOOS为linux生成无后缀二进制文件),上传至Linux服务器后赋权执行,使用nohup命令实现后台运行,完... 目录本地编译golang程序上传Golang二进制文件到linux服务器总结本地编译Golang程序

Linux系统性能检测命令详解

《Linux系统性能检测命令详解》本文介绍了Linux系统常用的监控命令(如top、vmstat、iostat、htop等)及其参数功能,涵盖进程状态、内存使用、磁盘I/O、系统负载等多维度资源监控,... 目录toppsuptimevmstatIOStatiotopslabtophtopdstatnmon

Android kotlin中 Channel 和 Flow 的区别和选择使用场景分析

《Androidkotlin中Channel和Flow的区别和选择使用场景分析》Kotlin协程中,Flow是冷数据流,按需触发,适合响应式数据处理;Channel是热数据流,持续发送,支持... 目录一、基本概念界定FlowChannel二、核心特性对比数据生产触发条件生产与消费的关系背压处理机制生命周期

Android ClassLoader加载机制详解

《AndroidClassLoader加载机制详解》Android的ClassLoader负责加载.dex文件,基于双亲委派模型,支持热修复和插件化,需注意类冲突、内存泄漏和兼容性问题,本文给大家介... 目录一、ClassLoader概述1.1 类加载的基本概念1.2 android与Java Class

linux重启命令有哪些? 7个实用的Linux系统重启命令汇总

《linux重启命令有哪些?7个实用的Linux系统重启命令汇总》Linux系统提供了多种重启命令,常用的包括shutdown-r、reboot、init6等,不同命令适用于不同场景,本文将详细... 在管理和维护 linux 服务器时,完成系统更新、故障排查或日常维护后,重启系统往往是必不可少的步骤。本文

Android DataBinding 与 MVVM使用详解

《AndroidDataBinding与MVVM使用详解》本文介绍AndroidDataBinding库,其通过绑定UI组件与数据源实现自动更新,支持双向绑定和逻辑运算,减少模板代码,结合MV... 目录一、DataBinding 核心概念二、配置与基础使用1. 启用 DataBinding 2. 基础布局

Android ViewBinding使用流程

《AndroidViewBinding使用流程》AndroidViewBinding是Jetpack组件,替代findViewById,提供类型安全、空安全和编译时检查,代码简洁且性能优化,相比Da... 目录一、核心概念二、ViewBinding优点三、使用流程1. 启用 ViewBinding (模块级

Mac系统下卸载JAVA和JDK的步骤

《Mac系统下卸载JAVA和JDK的步骤》JDK是Java语言的软件开发工具包,它提供了开发和运行Java应用程序所需的工具、库和资源,:本文主要介绍Mac系统下卸载JAVA和JDK的相关资料,需... 目录1. 卸载系统自带的 Java 版本检查当前 Java 版本通过命令卸载系统 Java2. 卸载自定

基于Python实现一个简单的题库与在线考试系统

《基于Python实现一个简单的题库与在线考试系统》在当今信息化教育时代,在线学习与考试系统已成为教育技术领域的重要组成部分,本文就来介绍一下如何使用Python和PyQt5框架开发一个名为白泽题库系... 目录概述功能特点界面展示系统架构设计类结构图Excel题库填写格式模板题库题目填写格式表核心数据结构

Linux系统中的firewall-offline-cmd详解(收藏版)

《Linux系统中的firewall-offline-cmd详解(收藏版)》firewall-offline-cmd是firewalld的一个命令行工具,专门设计用于在没有运行firewalld服务的... 目录主要用途基本语法选项1. 状态管理2. 区域管理3. 服务管理4. 端口管理5. ICMP 阻断