当前位置:网站首页>Live555 push RTSP audio and video stream summary (I) cross compilation

Live555 push RTSP audio and video stream summary (I) cross compilation

2022-07-05 08:00:00 Drink more hot water-

**

One 、 brief introduction

**

Live555 It's a cross platform solution for streaming media C++ Open source project , It implements standard streaming protocols such as RTP/RTCP、RTSP、SIP And so on .Live555 Realize the streaming of audio and video data of various audio and video coding formats 、 Receiving and processing support , Include MPEG、H.263+、DV、JPEG Video and a variety of audio coding . And because of good design ,Live555 It's very easy to extend support for other formats . at present ,Live555 It has been used in the realization of streaming media playing function of many players , Such as VLC(VideoLan)、MPlayer.

Two 、 History version download

http://download.videolan.org/pub/contrib/live555/
I use it live.2018.07.01.tar.gz edition

**

3、 ... and 、 Cross compilation

**
be based on mips platform
1.copy A platform config file

cp config.armlinux config.mips-linux-uclibc-gnu

2. Modify the configuration file

CROSS_COMPILE?=		mips-linux-uclibc-gnu-
COMPILE_OPTS =		$(INCLUDES) -I. -O2 -fPIC -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED
C =			c
C_COMPILER =		$(CROSS_COMPILE)gcc
C_FLAGS =		$(COMPILE_OPTS)
CPP =			cpp
CPLUSPLUS_COMPILER =	$(CROSS_COMPILE)g++
CPLUSPLUS_FLAGS =	$(COMPILE_OPTS) -Wall -DBSD=1
OBJ =			o
LINK =			$(CROSS_COMPILE)g++ -o
LINK_OPTS =		
CONSOLE_LINK_OPTS =	$(LINK_OPTS)
LIBRARY_LINK =		$(CROSS_COMPILE)ar cr 
LIBRARY_LINK_OPTS =	$(LINK_OPTS)
LIB_SUFFIX =			a
LIBS_FOR_CONSOLE_APPLICATION =
LIBS_FOR_GUI_APPLICATION =
EXE =

3. Generate makefile compile

./genMakefiles mips-linux-uclibc-gnu
make	

4. Common mistakes
I always meet OpenSSL The error of So helpless I still don't know how to solve it But I had to change the version ==

Then compile over 了

5. Get the static library out
liveMedia The source code of the project includes four basic libraries , Various test codes and IVE555 Media Server.

The four basic libraries are UsageEnvironment&TaskScheduler,groupsock,liveMedia,BasicUsageEnvironment.

Direct execution of scripts

#!/bin/sh


rm -rf live555/
mkdir live555
INSTALL_DIR_LIVE=/home/ky

#create file
cd live555
mkdir lib
mkdir include
cd -

cd live555/include
mkdir liveMedia
mkdir BasicUsageEnvironment
mkdir UsageEnvironment
mkdir groupsock
cd -

#copy include
cp -rf liveMedia/include/*.*h ${INSTALL_DIR_LIVE}/live555/include/liveMedia
cp -rf BasicUsageEnvironment/include/*.*h ${INSTALL_DIR_LIVE}/live555/include/BasicUsageEnvironment
cp -rf UsageEnvironment/include/*.*h ${INSTALL_DIR_LIVE}/live555/include/UsageEnvironment
cp -rf groupsock/include/*.*h ${INSTALL_DIR_LIVE}/live555/include/groupsock

#copy lib
cp -rf liveMedia/libliveMedia.a ${INSTALL_DIR_LIVE}/live555/lib
cp -rf BasicUsageEnvironment/libBasicUsageEnvironment.a ${INSTALL_DIR_LIVE}/live555/lib
cp -rf UsageEnvironment/libUsageEnvironment.a ${INSTALL_DIR_LIVE}/live555/lib
cp -rf groupsock/libgroupsock.a ${INSTALL_DIR_LIVE}/live555/lib

echo "-------------- install library done ------------------"

Finished Next, you can write applications to do whatever you want

before this Read Thor's article ==

原网站

版权声明
本文为[Drink more hot water-]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140547486077.html