ORTP库的移植
1、准备源码
(1)下载ortp源码:https://github.com/dmonakhov/ortp
(2)存放到临时工作目录并解压
2、源码修改
(1)由于这个没有支持H.264,所以增加H.264的payload支持。
在src/avprofile.c中357行添加:
rtp_profile_set_payload(profile,96,&payload_type_h264);
3、配置和编译、安装
(1)进入ortp目录执行./autogen.sh
(2)错误1:./autogen.sh: line 44: libtoolize: command not found
解决:sudo apt-get install libtool*
(2)错误2:libtoolize: error: Please install GNU M4, or 'export M4=/path/to/gnu/m4'.
解决:sudo apt-get install m4
(3)错误3:Automake - aclocal: command not found
解决:sudo apt-get install automake
运行结果:下面表示成功
+ aclocal
+ autoheader
+ automake --force-missing --add-missing --copy
configure.ac:41: installing './compile'
configure.ac:3: installing './config.guess'
configure.ac:3: installing './config.sub'
configure.ac:31: installing './install-sh'
configure.ac:31: installing './missing'
Makefile.am:20: warning: docdir was already defined in condition TRUE, which includes condition HAVE_DOXYGEN ...
configure.ac:2: ... 'docdir' previously defined here
Makefile.am:27: warning: <D: non-POSIX variable name
Makefile.am:60: warning: shell pwd: non-POSIX variable name
Makefile.am:60: (probably a GNU make extension)
src/Makefile.am:7: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
src/Makefile.am: installing './depcomp'
src/tests/Makefile.am:32: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
+ autoconf
(4)继续执行./configure --prefix=/tmp/ortp --host=arm-hisiv300-linux
--prefix:安装位置
--host:交叉编译工具链
(5)make && make install
4、到/tmp/ortp目录下查看移植好的库和头文件
aaa@qq.com:/tmp/ortp/lib$ ls
libortp.la libortp.so libortp.so.9 libortp.so.9.0.0 pkgconfig
aaa@qq.com:/tmp/ortp/lib$ cd ../include/
aaa@qq.com:/tmp/ortp/include$ ls
ortp
aaa@qq.com:/tmp/ortp/include$ cd ortp/
aaa@qq.com:/tmp/ortp/include/ortp$ ls
b64.h logging.h ortp_srtp.h port.h rtp.h rtpsession.h sessionset.h stun.h telephonyevents.h
event.h ortp.h payloadtype.h rtcp.h rtpprofile.h rtpsignaltable.h str_utils.h stun_udp.h zrtp.h
上一篇: php实现处理输入转义字符的代码_PHP
下一篇: web开发中怎样检测原始值