jrtplib的安装和使用
来源:互联网 发布:杜兰特首秀数据 编辑:程序博客网 时间:2024/05/22 06:50
jrtplib下载地址:http://research.edm.uhasselt.be/~jori/page/index.php?n=CS.Jrtplib
解压:
tar -zxvf xxxx.tar.gz
进入到 jrtplib-3.9.1,阅读README.TXT,可以知道如何使用这个jrtplib
root@ubuntu:~ cmake ./
检测到系统没有安装cmake,
root@ubuntu:~ apt-get install cmake
安装完毕后,执行cmake
root@ubuntu:~ cmake ./root@ubuntu:~ makeroot@ubuntu:~ make install
就会在
usr/local/include看到rtp头文件
/jrtplib-3.9.1
在usr/local/lib看到库文件
编写测试程序:
//testrtcp.cpp#include "rtpsession.h"#include "rtpudpv4transmitter.h"#include "rtpipv4address.h"#include "rtperrors.h"#include "rtpsessionparams.h"using namespace jrtplib;int main(void){ RTPSession sess; RTPSessionParams sessparams; RTPUDPv4TransmissionParams transparams; sessparams.SetOwnTimestampUnit(1.0/10.0); sessparams.SetAcceptOwnPackets(true); transparams.SetPortbase(8888); sess.Create(sessparams,&transparams); return 0;}
//makefile
#!\bin\shCC = g++RM = rmRTPLIBDIR = /usr/localINC = $(RTPLIBDIR)/include/jrtplib3LIB = $(RTPLIBDIR)/lib/CPPFLAGS = -Wall -I $(INC)LDFLAGS = -L $(LIB)LIBS = -ljrtp LIBMODE = -staticTARGET = testrtpOBJ = testrtp.oSRC = testrtp.cpp$(TARGET):$(OBJ) $(CC) $(CPPFLAGS) $(LDFLAGS) $(LIBS) -o $(TARGET) $(OBJ)clean: $(RM) -f $(OBJ) $(TARGET)
编译:
root@ubuntu:~/work/test# makeg++ -Wall -I /usr/local/include/jrtplib3 -c -o testrtp.o testrtp.cppg++ -Wall -I /usr/local/include/jrtplib3 -L /usr/local/lib/ -ljrtp -o testrtp testrtp.o
运行程序:
root@ubuntu:~/work/test# ./testrtp./testrtp: error while loading shared libraries: libjrtp.so.3.9.1: cannot open shared object file: No such file or directory
无法找到库文件,解析:linux的应用程序加载动态链接库默认是在/usr/lib路径下,所以当程序运行的时候找链接库肯定找不到了,因为我们的链接库放在usr/local/lib。所以要正常运行就可以复制所要用到的库文件到/usr/lib路径下。
0 0
- jrtplib的安装和使用
- RTP和JRTPLIB的使用
- ubuntu下jthread 和jrtplib的安装
- ubuntu下jthread 和jrtplib的安装
- ubuntu下jthread 和jrtplib的安装
- ubuntu下jthread 和jrtplib的安装
- jrtplib库的使用
- jrtplib的使用
- JRTPLIB库的使用
- jrtplib库的使用
- JRTPLIB库的使用
- 使用jrtplib写的一个简单服务器和客户端程序
- jrtplib 使用
- 开源项目jrtplib的安装
- 使用Jrtplib编译的arm程序和pc无法通信的问题
- jrtplib和jthread的交叉编译
- RTP开源库jrtplib在VS2013下编译 安装和配置
- jrtplib 编译 安装
- 广东海洋大学mooc团队2015寒假宣讲会
- TCP_Header
- UVa 202 大数除法
- Android中使用addr2line来分析出错信息
- junit测试用例
- jrtplib的安装和使用
- OutputDebugString在win7操作系统windbg内核调试下无法输出的解决办法
- ArcGIS Engine 编辑- IEngineEditor
- Nginx之应用
- 2015begin to study
- 数据结构专题——树
- 30-40岁的程序员们,请把一些账算清楚,为过冬做准备(一)
- 实现radiogroup的多行多列显示,行列自己定义
- 微信拉低我们的智商?