现在的位置: 首页 > 综合 > 正文

JRTPLIB库简介–LIB文件编译方法,范例编译方法(转)

2012年07月27日 ⁄ 综合 ⁄ 共 1899字 ⁄ 字号 评论关闭

RTP是一个实时通讯网络协议,网络上的音视频传输可以用它来做,像QQ的语音聊天等都是使用这个。real 开发 的在线rm文件播放协议 rstp也是基于RTP协议,可以自己搜索一下, 在网上可找到“RTP 实时网络协议rfc3550.pdf” 文档,有详细介绍。

JRTPLIB 是一个开源的 RTP协议实现库,支持Windows和unix平台,应该也很多人用了,封装的类方式很不错。 他的主页是 http://research.edm.uhasselt.be/~jori/page/index.php?n=CS.Jrtplib

帮助文档:http://research.edm.uhasselt.be/jori/jrtplib/documentation/index.html

RTPSession Class Reference http://research.edm.uhasselt.be/jori/jrtplib/documentation/classRTPSession.html

从他主页上下载完整的 JRTPLIB   源码包下来解压就行了,不过JRTPLIB 用到了他的JThread库,在主页上可以找到,也把JThread 库下载下来就行了。

 

接下来编译这两个工程,生成jthread.libjrtplib.Lib两个文件。

 

完成上述工作后我们就可以开始尝试编译jrtplib附带的examples

创建一个新的Win32 Console 应用程序项目,添加example文件到source files文件夹中,然后添加jrtplib工程下的所有.h头文件,这里我们可以用VC6提供的一个功能偷懒:)将jrtplib项目添加到本工作区,然后将Header Files下的所有文件复制到我们创建的工程的Header Files文件夹里面。

(迎奥运,练英语,翻译一下上面这段,请达人看看翻的对不对,先谢过)

(Create a new Win32 Console Application, then add the example file into the source files dictionary, add all the .h file into workspace from project jrtplib. Here we can insert the jrtplib project into workspace, copy all .h file from jrtplib/Header Files to our project/Header Files.)

修改example.cpp文件,在文件开始添加

#pragma comment(lib, "jrtplib.lib")

#pragma comment(lib, "jthread.lib")

#pragma comment(lib, "WS2_32.lib")

最后就可以编译、连接、生成可执行文件了。

Example1运行方法:

Enter local portbase 8888

Enter the destination IP address127.0.0.1

Enter the destination port8888

Number of packets you wish to be send :60

回车后可以看到程序运行如下:

转自:http://jessiebuaa.blog.sohu.com/85340704.html

http://hi.baidu.com/widebright/blog/item/b9ffb54581177023cefca364.html

 

进一步学习请参照:

http://jimmyh.blog.sohu.com/87264917.html

http://blog.csdn.net/xingyu19871124/archive/2009/06.aspx

http://blog.csdn.net/wu209000

http://hi.baidu.com/red_alisa/blog/item/44de204486377f2fcffca3a1.html

http://hi.baidu.com/tunix/blog/item/1db600ddc9b378e877c6384a.html

http://blog.csdn.net/li_007/archive/2007/07/13/1689005.aspx

http://lyhuidou12.blog.163.com/blog/static/5933676020098835912438/

http://lx87663756.spaces.live.com/blog/cns!BAB8B2CD253F2CE7!185.entry

 

抱歉!评论已关闭.