打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
在x86 Linux平台使能pjsua的视频通话

转山哥。。。。

---------------------------------------------------------------------------------------------------------------------------------

这里用的是pjproject-2.0-alpha2.tar.bz2版本。

 参考http://trac.pjsip.org/repos/wiki/Video_Users_Guide
官网上给出三个必需组件:SDL、ffmpeg和v4l2
1. 安装SDL
http://www.libsdl.org/hg.php处下载,解包,运行

./configure  make && make install


2. 安装yasm(libx264依赖)
http://yasm.tortall.net/Download.html处下载,解包,运行

./configure  make && make install


3. 安装libx264(ffmpeg可选特性,用于h.264编解码)
http://www.videolan.org/developers/x264.html
处下载,解包,运行

./configure --enable-static  make && make install


4. 安装ffmpeg
http://ffmpeg.org/
处下载,解包,运行

./configure --enable-shared --disable-static --enable-memalign-hack --enable-gpl --enable-libx264  make && make install


5. 安装v4l2
http://www.linuxtv.org/downloads/v4l-utils/处下载,解包,运行

make && make install


6. 将pjsip源代码解包,运行

./configure  


检查如下输出

checking SDL availability..... 1.3.0  checking for deflate in -lz... yes  checking for x264_free in -lx264... yes  checking for avdevice_version in -lavdevice... yes  checking for av_register_all in -lavformat... yes  checking for avcodec_init in -lavcodec... yes  checking for sws_scale in -lswscale... yes  checking for av_malloc in -lavutil... yes  checking for avcore_version in -lavcore... no  checking for v4l2_open in -lv4l2... yes


7. pjsip的编译需要config_site.h文件,位于./pjlib/include/pj/中,该目录提供了一个示例文件config_site_sample.h,将其重命名即可。
使能视频通话,需要在config_site.h文件中加入

#define PJMEDIA_HAS_VIDEO 1  #define PJMEDIA_HAS_FFMPEG         1  #define PJMEDIA_VIDEO_DEV_HAS_SDL       1  #define PJMEDIA_HAS_FFMPEG_CODEC_H264   1 /* Optional. Note: require libx264 and ffmpeg must be built with h264 enabled */


8. pjsua附带的源代码中需要进行修改,参考http://trac.pjsip.org/repos/wiki/Video_Users_Guide,在Line4360之后加入如下代码:

++acc_cfg.max_video_cnt;    acc_cfg.vid_in_auto_show = PJ_TRUE;  acc_cfg.vid_out_auto_transmit = PJ_TRUE;


9. 运行

make dep && make


 

 

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
交叉编译ffmpeg并生成ffplay
install.packages(“sf”): ERROR, 安装R包sf出错解决方法
[转载]使用Automake,Autoconf生成Makefile
在Ubuntu上安裝Kscope
编译oprofile的FAQ
autoconf、automake工具组使用简单介绍
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服