mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge SRT
This commit is contained in:
commit
5f174552f3
29 changed files with 3068 additions and 102 deletions
|
@ -67,6 +67,12 @@ else
|
|||
srs_undefine_macro "SRS_AUTO_HDS" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
if [ $SRS_SRT = YES ]; then
|
||||
srs_define_macro "SRS_AUTO_SRT" $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
srs_undefine_macro "SRS_AUTO_SRT" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
if [ $SRS_MEM_WATCH = YES ]; then
|
||||
srs_define_macro "SRS_AUTO_MEM_WATCH" $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
|
|
|
@ -385,6 +385,22 @@ if [ $SRS_FFMPEG_TOOL = YES ]; then
|
|||
if [ ! -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]; then echo "build ffmpeg-4.1 failed."; exit -1; fi
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
# SRT module, https://github.com/ossrs/srs/issues/1147#issuecomment-577469119
|
||||
#####################################################################################
|
||||
if [[ $SRS_SRT == YES ]]; then
|
||||
if [[ -f /usr/local/lib64/libsrt.a && ! -f ${SRS_OBJS}/srt/lib/libsrt.a ]]; then
|
||||
mkdir -p ${SRS_OBJS}/srt/lib && ln -sf /usr/local/lib64/libsrt.a ${SRS_OBJS}/srt/lib/libsrt.a
|
||||
mkdir -p ${SRS_OBJS}/srt/include && ln -sf /usr/local/include/srt ${SRS_OBJS}/srt/include/
|
||||
fi
|
||||
if [[ -f ${SRS_OBJS}/srt/lib/libsrt.a ]]; then
|
||||
echo "libsrt-1.4.1 is ok.";
|
||||
else
|
||||
echo "no libsrt, please use srs-docker or build from source https://github.com/ossrs/srs/issues/1147#issuecomment-577469119";
|
||||
exit -1;
|
||||
fi
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
# build research code, librtmp
|
||||
#####################################################################################
|
||||
|
|
|
@ -16,6 +16,7 @@ help=no
|
|||
################################################################
|
||||
# feature options
|
||||
SRS_HDS=NO
|
||||
SRS_SRT=NO
|
||||
SRS_NGINX=NO
|
||||
SRS_FFMPEG_TOOL=NO
|
||||
SRS_LIBRTMP=NO
|
||||
|
@ -125,6 +126,7 @@ Features:
|
|||
--with-librtmp Enable srs-librtmp, library for client.
|
||||
--with-research Build the research tools.
|
||||
--with-utest Build the utest for SRS.
|
||||
--with-srt Build the srt for SRS.
|
||||
|
||||
--without-ssl Disable rtmp complex handshake.
|
||||
--without-hds Disable hds, the adobe http dynamic streaming.
|
||||
|
@ -133,6 +135,7 @@ Features:
|
|||
--without-librtmp Disable srs-librtmp, library for client.
|
||||
--without-research Do not build the research tools.
|
||||
--without-utest Do not build the utest for SRS.
|
||||
--without-srt Do not build the srt for SRS.
|
||||
|
||||
--prefix=<path> The absolute installation path for srs. Default: $SRS_PREFIX
|
||||
--static Whether add '-static' to link options.
|
||||
|
@ -211,6 +214,7 @@ function parse_user_option() {
|
|||
--with-librtmp) SRS_LIBRTMP=YES ;;
|
||||
--with-research) SRS_RESEARCH=YES ;;
|
||||
--with-utest) SRS_UTEST=YES ;;
|
||||
--with-srt) SRS_SRT=YES ;;
|
||||
--with-gperf) SRS_GPERF=YES ;;
|
||||
--with-gmc) SRS_GPERF_MC=YES ;;
|
||||
--with-gmd) SRS_GPERF_MD=YES ;;
|
||||
|
@ -226,6 +230,7 @@ function parse_user_option() {
|
|||
--without-librtmp) SRS_LIBRTMP=NO ;;
|
||||
--without-research) SRS_RESEARCH=NO ;;
|
||||
--without-utest) SRS_UTEST=NO ;;
|
||||
--without-srt) SRS_SRT=NO ;;
|
||||
--without-gperf) SRS_GPERF=NO ;;
|
||||
--without-gmc) SRS_GPERF_MC=NO ;;
|
||||
--without-gmd) SRS_GPERF_MD=NO ;;
|
||||
|
@ -522,6 +527,7 @@ SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}"
|
|||
if [ $SRS_LIBRTMP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-librtmp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-librtmp"; fi
|
||||
if [ $SRS_RESEARCH = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-research"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-research"; fi
|
||||
if [ $SRS_UTEST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-utest"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-utest"; fi
|
||||
if [ $SRS_SRT = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-srt"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-srt"; fi
|
||||
if [ $SRS_GPERF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gperf"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gperf"; fi
|
||||
if [ $SRS_GPERF_MC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gmc"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gmc"; fi
|
||||
if [ $SRS_GPERF_MD = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gmd"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gmd"; fi
|
||||
|
|
|
@ -52,7 +52,7 @@ USER_DIR = .
|
|||
CPPFLAGS += -I\$(GTEST_DIR)/include
|
||||
|
||||
# Flags passed to the C++ compiler.
|
||||
CXXFLAGS += -g -Wall -Wextra -O0 ${EXTRA_DEFINES}
|
||||
CXXFLAGS += ${CXXFLAGS} -Wextra ${EXTRA_DEFINES}
|
||||
|
||||
# All tests produced by this Makefile. Remember to add new tests you
|
||||
# created to the list.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue