一、ubuntu 下面用rtp传送h264
二、dm8168 下面用rtp传送h264视频流
1、交叉编译jrtplib
在这里只编译jrtplib,不编译jthread库,在编译jrtplib的时候把jthread库给屏蔽
编译jrtplib
修改CMakeLists.txt
添加交叉编译工具链:
set(VERSION 3.9.1)
set(CMAKE_CXX_COMPILER arm-arago-linux-gnueabi-g++)
添加安装路径
#设置安装路径
#set (_DEFAULT_LIBRARY_INSTALL_DIR lib)
#if (EXISTS "${CMAKE_INSTALL_PREFIX}/lib32/" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
# set (_DEFAULT_LIBRARY_INSTALL_DIR lib32)
#elseif (EXISTS "${CMAKE_INSTALL_PREFIX}/lib64/" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
# set (_DEFAULT_LIBRARY_INSTALL_DIR lib64)
#endif ()
#set(LIBRARY_INSTALL_DIR "${_DEFAULT_LIBRARY_INSTALL_DIR}" CACHE PATH "Library installation directory")
#if(NOT IS_ABSOLUTE "${LIBRARY_INSTALL_DIR}")
# set(LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIBRARY_INSTALL_DIR}")
#endif()
set(CMAKE_INSTALL_PREFIX "/xubinbin/on_the_way/new_jrtplib/release_rtp/jrtplib-3.9.1/target")
set(LIBRARY_INSTALL_DIR "/xubinbin/on_the_way/new_jrtplib/release_rtp/jrtplib-3.9.1/target")
注释jthread编译的相关配置,同时配置为jthread
#if (JTHREAD_FOUND)
# set(V "ON")
#else (JTHREAD_FOUND)
# set(V "OFF")
#endif (JTHREAD_FOUND)
# set(V "OFF")
#option(JTHREAD_ENABLED "Thread support" ${V})
#if (JTHREAD_ENABLED)
# set (RTP_SUPPORT_THREAD "#define RTP_SUPPORT_THREAD")
# if (JTHREAD_FOUND)
# save_paths(JRTPLIB_EXTERNAL_INCLUDES "${JTHREAD_INCLUDE_DIRS}")
# save_paths(JRTPLIB_LINK_LIBS "${JTHREAD_LIBRARIES}")
# endif(JTHREAD_FOUND)
#else (JTHREAD_ENABLED)
# set (RTP_SUPPORT_THREAD "// No support for JThread was enabled")
#endif (JTHREAD_ENABLED)
set (RTP_SUPPORT_THREAD "// No support for JThread was enabled")
编译:
cmake CMakeLists.txt
make ; 可以不用make install 了,在程序编译的时候,直接可以链接到src ,可以找到对应的头文件和对应的库
2、rtp
代码直接编译就可以了
|