您的位置:首页 > 编程语言 > PHP开发

JRTPLib移植到OMAP3530平台

2010-10-21 12:08 337 查看
JRTPLIB库是一个RTP协议的开源库,使用这套库文件,我们可以创建端到端的RTP连接,实现数据的实时传输。

JRTPLIB是使用标准c++编写的,因此,可以方便得移植到Montavista操作系统中,本文简要地描述了移植过程及一些注意事项。

下载

你可以在这里下载JRtplib

,同时,需要下载JThread



解压

我解压到embedded目录下:如红色字体。同时新建share
文件夹,以保存生成的头文件和库文件

acer@ubuntu:~/rtp$ cd embedded/

acer@ubuntu:~/rtp/embedded$ ls

aclocal.m4 Doxyfile jrtplib_wce5.vcproj missing

ChangeLog examples jrtplib_wce.sln mkinstalldirs

config.guess install-sh jrtplib_wce.vcproj pkgconfig

config.log jrtplib-3.7.1 jthread-1.2.1
README.TXT

config.status jrtplib-3.7.1.rar libtool share

config.sub jrtplib.dsp LICENSE.MIT src

configure jrtplib.dsw ltmain.sh TODO

configure.in jrtplib.sln Makefile tools

depcomp jrtplib.vcproj Makefile.am

doc jrtplib_wce5.sln Makefile.in

安装jthread

进入到jthread-1.2.1文件夹,配置编译环境。编译器的位置可根据实际情况来定

./configure --prefix=/home/acer/rtp/embedded/share --host=arm-none-linux-gnueabi CC=/usr/local/arm/arm-2009q1/bin/arm-none-linux-gnueabi-gcc CXX=/usr/local/arm/arm-2009q1/bin/arm-none-linux-gnueabi-g++

回车

将生成一个Makefile文件。

执行

make

make install

jthread安装完毕。

安装JRtpLib

和安装JThread类似,先执行配置文件:

./configure --prefix=/home/acer/rtp/embedded/share --host=arm-none-linux-gnueabi CC=/usr/local/arm/arm-2009q1/bin/arm-none-linux-gnueabi-gcc CXX=/usr/local/arm/arm-2009q1/bin/arm-none-linux-gnueabi-g++

编译:

make

安装到/prj/share目录:

make install

完成后,可以在share文件夹内看到include 和lib两个文件夹

把里面的头文件和库文件cp到 开发板文件系统的usr/local/include and usr/lib 下





测试

在JRtpLib目录下有几个例子程序,我们可以用来测试JRtpLib。进入/jrtplib-3.7.1/examples目录:
复制example1到开发板的home/root下

./example1

即可看到运行结果:
ema@beagleboard:/home$ ls

ema root

ema@beagleboard:/home$ cd root/

ema@beagleboard:/home/root$ ls

example1 mjpg-streamer-r63

ema@beagleboard:/home/root$ ./example1

Enter local portbase:

8000

Enter the destination IP address

127.0.0.1

Enter the destination port

8000

Number of packets you wish to be sent:

12

Sending packet 1/12

Sending packet 2/12

Got packet !

Sending packet 3/12

Got packet !

Sending packet 4/12

Got packet !

Sending packet 5/12

Got packet !

Sending packet 6/12

Got packet !

Sending packet 7/12

Got packet !

Sending packet 8/12

Got packet !

Sending packet 9/12

Got packet !

Sending packet 10/12

Got packet !

Sending packet 11/12

Got packet !

Sending packet 12/12

Got packet !
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: