pjsip编译步骤,centos环境支持视频通话

参考:1:http://trac.pjsip.org/repos/wiki/Getting-Started/Autoconf 
   2:VoIP应用在Ubuntu 14.04下编译FFmpeg libX264及PJSIP(http://www.mr-wu.cn/how-to-compile-ffmpeg-x264-and-pjsip-on-ubuntu-14-04-for-voip/)


1.CentOS版本:CentOS-7-x86_64-DVD-1503-01  pjsip版本:2.4
2.安装编译工具:
   yum -y install gcc automake autoconf libtool make
   yum install gcc gcc-c++
3.创建工作目录 用来存放使用的库 mkdir /home/toolchain, 源码下载都下载到/usr/local/src 中 
4.编译yasm http://yasm.tortall.net/Download.html 
   ./configure -prefix=/home/toolchain/yasm
   make && make install
   加入环境变量:export PATH=/home/toolchain/yasm/bin:$PATH
 5.编译sdl 2.0 http://www.libsdl.org/download-2.0.php
   ./configure --prefix=/home/toolchain/sdl
    make && make install
 6.安装Libyuv 我是在webrtc目录下找到的libyuv的源码 拷贝到linux下进行安装
   make -f linux.mk
 7.编译libx264  http://www.videolan.org/developers/x264.html
  ./configure --prefix=/home/toolchain/libx264 --enable-shared --enable-static
   make && make install
 8.编译ffmpeg   http://ffmpeg.org/download.html
   ./configure --prefix=/home/toolchain/ffmpeg --disable-static --enable-shared --enable-memalign-hack --extra-cflags="-I/home/toolchain/libx264/include" --extra-ldflags="-L/home/toolchain/libx264/lib" --enable-gpl --enable-libx264
   make && make install
   
 9.编译pjsip
    在源码文件config_site.h 添加:#define PJMEDIA_HAS_VIDEO 1
   ./configure --with-sdl=/home/toolchain/sdl/ --with-ffmpeg=/home/toolchain/ffmpeg/
   make dep
   make
   
 10.遇到的问题 编译后提示链接错误 找不到x264的函数 
    sudo vim /etc/ld.so.conf
    添加/home/toolchain/ffmpeg/lib保存
    执行 sudo ldconfig

    再次编译 编译成功


  11.如需下载的资源包括编译文档,请下载:http://download.csdn.net/detail/quitehandsome/9035451
   
  
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值