diff --git a/README.md b/README.md index 270a7569a..1c490f621 100755 --- a/README.md +++ b/README.md @@ -55,6 +55,9 @@ docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 \ * Usage: How to delivery HTTP-FLV?([CN][v3_CN_SampleHttpFlv], [EN][v3_EN_SampleHttpFlv]) * Usage: How to delivery HTTP-FLV Cluster?([CN][v3_CN_SampleHttpFlvCluster], [EN][v3_EN_SampleHttpFlvCluster]) * Usage: How to delivery HLS?([CN][v3_CN_SampleHLS], [EN][v3_EN_SampleHLS]) +* Usage: How to publish GB28181 to SRS? [#1500](https://github.com/ossrs/srs/issues/1500#issuecomment-606695679) +* Usage: How to play WebRTC from SRS? [#307](https://github.com/ossrs/srs/issues/307#issuecomment-602193458) +* Usage: How to publish SRT(Experimental) to SRS?([CN][v4_CN_SampleSRT], [EN][v4_EN_SampleSRT]) * Usage: How to transcode to h.264+aac for HLS?([CN][v3_CN_SampleTranscode2HLS], [EN][v3_EN_SampleTranscode2HLS]) * Usage: How to transode stream by FFMPEG?([CN][v2_CN_SampleFFMPEG], [EN][v2_EN_SampleFFMPEG]) * Usage: How to forward stream to other servers?([CN][v3_CN_SampleForward], [EN][v3_EN_SampleForward]) @@ -62,7 +65,6 @@ docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 \ * Usage: How to ingest file/stream/device to SRS?([CN][v1_CN_SampleIngest], [EN][v1_EN_SampleIngest]) * Usage: How to delivery HLS by SRS HTTP server?([CN][v3_CN_SampleHTTP], [EN][v3_EN_SampleHTTP]) * Usage: How to delivery DASH(Experimental)?([CN][v3_CN_SampleDASH], [EN][v3_EN_SampleDASH]) -* Usage: How to transmux SRT(Experimental) to live streaming?([CN][v4_CN_SampleSRT], [EN][v4_EN_SampleSRT]) * Usage: How to publish h.264 raw stream as RTMP? ([CN][v3_CN_SrsLibrtmp2], [EN][v3_EN_SrsLibrtmp2]) * Usage: How to enable multiple processes? ([CN][v3_CN_REUSEPORT], [EN][v3_EN_REUSEPORT]) * Usage: Why SRS? What's the milestones? ([CN][v1_CN_Product], [EN][v1_EN_Product]) @@ -157,6 +159,7 @@ For previous versions, please read: ## V4 changes +* v4.0, 2020-04-30, For [#307][bug #307], support publish RTC with passing opus. 4.0.24 * v4.0, 2020-04-14, For [#307][bug #307], support sendmmsg, GSO and reuseport. 4.0.23 * v4.0, 2020-04-05, For [#307][bug #307], SRTP ASM only works with openssl-1.0, auto detect it. 4.0.22 * v4.0, 2020-04-04, Merge RTC and GB28181, with bugs fixed. 4.0.21 diff --git a/trunk/3rdparty/readme.txt b/trunk/3rdparty/readme.txt index 1f7d99a9a..331e2928c 100644 --- a/trunk/3rdparty/readme.txt +++ b/trunk/3rdparty/readme.txt @@ -3,9 +3,6 @@ http-parser-2.1.zip nginx-1.5.7.zip for srs to support hls streaming. - -st-1.9.zip - basic framework for srs. openssl-1.1.0e.zip openssl-OpenSSL_1_0_2u.tar.gz @@ -35,8 +32,11 @@ gtest-1.6.0.zip gperftools-2.1.zip gperf tools for performance benchmark. -state-threads-1.9.1.tar.gz: - patched st from https://github.com/ossrs/state-threads/releases/tag/v1.9.1 +st-srs +st-1.9.zip +state-threads +state-threads-1.9.1.tar.gz + Patched ST from https://github.com/ossrs/state-threads links: nginx: @@ -44,7 +44,7 @@ links: http-parser: https://github.com/joyent/http-parser state-threads: - http://sourceforge.net/projects/state-threads + https://github.com/ossrs/state-threads ffmpeg: http://ffmpeg.org/ http://ffmpeg.org/releases/ffmpeg-3.2.4.tar.gz diff --git a/trunk/3rdparty/st-srs/Makefile b/trunk/3rdparty/st-srs/Makefile index 7e641d195..7102eedb4 100644 --- a/trunk/3rdparty/st-srs/Makefile +++ b/trunk/3rdparty/st-srs/Makefile @@ -189,10 +189,6 @@ OTHER_FLAGS = -Wall ifeq ($(shell test -f /usr/include/sys/epoll.h && echo yes), yes) DEFINES += -DMD_HAVE_EPOLL endif -# For SRS, sendmmsg -ifeq ($(shell grep -qs sendmmsg /usr/include/sys/socket.h && echo yes), yes) -DEFINES += -DMD_HAVE_SENDMMSG -D_GNU_SOURCE -endif endif ifeq ($(OS), NETBSD) diff --git a/trunk/3rdparty/st-srs/io.c b/trunk/3rdparty/st-srs/io.c index 750099450..7e05f99ae 100644 --- a/trunk/3rdparty/st-srs/io.c +++ b/trunk/3rdparty/st-srs/io.c @@ -742,17 +742,16 @@ int st_sendmsg(_st_netfd_t *fd, const struct msghdr *msg, int flags, st_utime_t return n; } - -#if defined(MD_HAVE_SENDMMSG) && defined(_GNU_SOURCE) -int st_sendmmsg(st_netfd_t fd, struct mmsghdr *msgvec, unsigned int vlen, int flags, st_utime_t timeout) +int st_sendmmsg(st_netfd_t fd, struct st_mmsghdr *msgvec, unsigned int vlen, int flags, st_utime_t timeout) { +#if defined(MD_HAVE_SENDMMSG) && defined(_GNU_SOURCE) int n; int left; struct mmsghdr *p; left = (int)vlen; while (left > 0) { - p = msgvec + (vlen - left); + p = (struct mmsghdr*)msgvec + (vlen - left); if ((n = sendmmsg(fd->osfd, p, left, flags)) < 0) { if (errno == EINTR) @@ -772,8 +771,30 @@ int st_sendmmsg(st_netfd_t fd, struct mmsghdr *msgvec, unsigned int vlen, int fl return n; } return (int)vlen - left; -} +#else + struct st_mmsghdr *p; + int i, n; + + // @see http://man7.org/linux/man-pages/man2/sendmmsg.2.html + for (i = 0; i < (int)vlen; ++i) { + p = msgvec + i; + n = st_sendmsg(fd, &p->msg_hdr, flags, timeout); + if (n < 0) { + // An error is returned only if no datagrams could be sent. + if (i == 0) { + return n; + } + return i + 1; + } + + p->msg_len = n; + } + + // Returns the number of messages sent from msgvec; if this is less than vlen, the caller can retry with a + // further sendmmsg() call to send the remaining messages. + return vlen; #endif +} /* diff --git a/trunk/3rdparty/st-srs/public.h b/trunk/3rdparty/st-srs/public.h index c54bd790a..80fd93346 100644 --- a/trunk/3rdparty/st-srs/public.h +++ b/trunk/3rdparty/st-srs/public.h @@ -151,7 +151,15 @@ extern int st_recvfrom(st_netfd_t fd, void *buf, int len, struct sockaddr *from, extern int st_sendto(st_netfd_t fd, const void *msg, int len, const struct sockaddr *to, int tolen, st_utime_t timeout); extern int st_recvmsg(st_netfd_t fd, struct msghdr *msg, int flags, st_utime_t timeout); extern int st_sendmsg(st_netfd_t fd, const struct msghdr *msg, int flags, st_utime_t timeout); -extern int st_sendmmsg(st_netfd_t fd, struct mmsghdr *msgvec, unsigned int vlen, int flags, st_utime_t timeout); + +// @see http://man7.org/linux/man-pages/man2/sendmmsg.2.html +#include +struct st_mmsghdr { + struct msghdr msg_hdr; /* Message header */ + unsigned int msg_len; /* Number of bytes transmitted */ +}; +extern int st_sendmmsg(st_netfd_t fd, struct st_mmsghdr *msgvec, unsigned int vlen, int flags, st_utime_t timeout); + extern st_netfd_t st_open(const char *path, int oflags, mode_t mode); #ifdef DEBUG diff --git a/trunk/auto/auto_headers.sh b/trunk/auto/auto_headers.sh index d77325395..6c5838c5c 100755 --- a/trunk/auto/auto_headers.sh +++ b/trunk/auto/auto_headers.sh @@ -11,11 +11,11 @@ echo "#ifndef SRS_AUTO_HEADER_HPP" >> $SRS_AUTO_HEADERS_H echo "#define SRS_AUTO_HEADER_HPP" >> $SRS_AUTO_HEADERS_H echo "" >> $SRS_AUTO_HEADERS_H -echo "#define SRS_AUTO_BUILD_TS \"`date +%s`\"" >> $SRS_AUTO_HEADERS_H -echo "#define SRS_AUTO_BUILD_DATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $SRS_AUTO_HEADERS_H -echo "#define SRS_AUTO_UNAME \"`uname -a`\"" >> $SRS_AUTO_HEADERS_H -echo "#define SRS_AUTO_USER_CONFIGURE \"${SRS_AUTO_USER_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H -echo "#define SRS_AUTO_CONFIGURE \"${SRS_AUTO_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H +echo "#define SRS_BUILD_TS \"`date +%s`\"" >> $SRS_AUTO_HEADERS_H +echo "#define SRS_BUILD_DATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $SRS_AUTO_HEADERS_H +echo "#define SRS_UNAME \"`uname -a`\"" >> $SRS_AUTO_HEADERS_H +echo "#define SRS_USER_CONFIGURE \"${SRS_AUTO_USER_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H +echo "#define SRS_CONFIGURE \"${SRS_AUTO_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H echo "" >> $SRS_AUTO_HEADERS_H function srs_define_macro() @@ -62,73 +62,79 @@ echo "" >> $SRS_AUTO_HEADERS_H ##################################################################################### # auto headers in depends. if [ $SRS_HDS = YES ]; then - srs_define_macro "SRS_AUTO_HDS" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_HDS" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_HDS" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_HDS" $SRS_AUTO_HEADERS_H fi if [ $SRS_SRT = YES ]; then - srs_define_macro "SRS_AUTO_SRT" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_SRT" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_SRT" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_SRT" $SRS_AUTO_HEADERS_H fi if [ $SRS_RTC = YES ]; then - srs_define_macro "SRS_AUTO_RTC" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_RTC" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_RTC" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_RTC" $SRS_AUTO_HEADERS_H +fi + +if [ $SRS_SIMULATOR = YES ]; then + srs_define_macro "SRS_SIMULATOR" $SRS_AUTO_HEADERS_H +else + srs_undefine_macro "SRS_SIMULATOR" $SRS_AUTO_HEADERS_H fi if [ $SRS_GB28181 = YES ]; then - srs_define_macro "SRS_AUTO_GB28181" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_GB28181" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_GB28181" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_GB28181" $SRS_AUTO_HEADERS_H fi if [ $SRS_MEM_WATCH = YES ]; then - srs_define_macro "SRS_AUTO_MEM_WATCH" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_MEM_WATCH" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_MEM_WATCH" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_MEM_WATCH" $SRS_AUTO_HEADERS_H fi if [ $SRS_UTEST = YES ]; then - srs_define_macro "SRS_AUTO_UTEST" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_UTEST" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_UTEST" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_UTEST" $SRS_AUTO_HEADERS_H fi # whatever the FFMPEG tools, if transcode and ingest specified, # srs always compile the FFMPEG tool stub which used to start the FFMPEG process. if [ $SRS_FFMPEG_STUB = YES ]; then - srs_define_macro "SRS_AUTO_FFMPEG_STUB" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_FFMPEG_STUB" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_FFMPEG_STUB" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_FFMPEG_STUB" $SRS_AUTO_HEADERS_H fi if [ $SRS_GPERF = YES ]; then - srs_define_macro "SRS_AUTO_GPERF" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_GPERF" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_GPERF" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_GPERF" $SRS_AUTO_HEADERS_H fi if [ $SRS_GPERF_MC = YES ]; then - srs_define_macro "SRS_AUTO_GPERF_MC" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_GPERF_MC" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_GPERF_MC" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_GPERF_MC" $SRS_AUTO_HEADERS_H fi if [ $SRS_GPERF_MD = YES ]; then - srs_define_macro "SRS_AUTO_GPERF_MD" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_GPERF_MD" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_GPERF_MD" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_GPERF_MD" $SRS_AUTO_HEADERS_H fi if [ $SRS_GPERF_MP = YES ]; then - srs_define_macro "SRS_AUTO_GPERF_MP" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_GPERF_MP" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_GPERF_MP" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_GPERF_MP" $SRS_AUTO_HEADERS_H fi if [ $SRS_GPERF_CP = YES ]; then - srs_define_macro "SRS_AUTO_GPERF_CP" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_GPERF_CP" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_GPERF_CP" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_GPERF_CP" $SRS_AUTO_HEADERS_H fi ##################################################################################### @@ -136,50 +142,45 @@ fi ##################################################################################### # for log level compile settings if [ $SRS_LOG_VERBOSE = YES ]; then - srs_define_macro "SRS_AUTO_VERBOSE" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_VERBOSE" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_VERBOSE" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_VERBOSE" $SRS_AUTO_HEADERS_H fi if [ $SRS_LOG_INFO = YES ]; then - srs_define_macro "SRS_AUTO_INFO" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_INFO" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_INFO" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_INFO" $SRS_AUTO_HEADERS_H fi if [ $SRS_LOG_TRACE = YES ]; then - srs_define_macro "SRS_AUTO_TRACE" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_TRACE" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_TRACE" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_TRACE" $SRS_AUTO_HEADERS_H fi if [ $SRS_CROSS_BUILD = YES ]; then - srs_define_macro "SRS_AUTO_CROSSBUILD" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_CROSSBUILD" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_CROSSBUILD" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_CROSSBUILD" $SRS_AUTO_HEADERS_H fi if [ $SRS_OSX = YES ]; then - srs_define_macro "SRS_AUTO_OSX" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_OSX" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_OSX" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_OSX" $SRS_AUTO_HEADERS_H fi if [ $SRS_SENDMMSG = YES ]; then - srs_define_macro "SRS_AUTO_SENDMMSG" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_SENDMMSG" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_SENDMMSG" $SRS_AUTO_HEADERS_H -fi -if [ $SRS_HAS_SENDMMSG = YES ]; then - srs_define_macro "SRS_AUTO_HAS_SENDMMSG" $SRS_AUTO_HEADERS_H -else - srs_undefine_macro "SRS_AUTO_HAS_SENDMMSG" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_SENDMMSG" $SRS_AUTO_HEADERS_H fi if [ $SRS_DEBUG = YES ]; then - srs_define_macro "SRS_AUTO_DEBUG" $SRS_AUTO_HEADERS_H + srs_define_macro "SRS_DEBUG" $SRS_AUTO_HEADERS_H else - srs_undefine_macro "SRS_AUTO_DEBUG" $SRS_AUTO_HEADERS_H + srs_undefine_macro "SRS_DEBUG" $SRS_AUTO_HEADERS_H fi # prefix echo "" >> $SRS_AUTO_HEADERS_H -echo "#define SRS_AUTO_PREFIX \"${SRS_PREFIX}\"" >> $SRS_AUTO_HEADERS_H +echo "#define SRS_PREFIX \"${SRS_PREFIX}\"" >> $SRS_AUTO_HEADERS_H echo "" >> $SRS_AUTO_HEADERS_H @@ -188,13 +189,13 @@ echo "" >> $SRS_AUTO_HEADERS_H ##################################################################################### if [[ -f ../AUTHORS.txt ]]; then SRS_CONSTRIBUTORS=`cat ../AUTHORS.txt|grep "*"|awk '{print $2}'` - echo "#define SRS_AUTO_CONSTRIBUTORS \"\\" >> $SRS_AUTO_HEADERS_H + echo "#define SRS_CONSTRIBUTORS \"\\" >> $SRS_AUTO_HEADERS_H for CONTRIBUTOR in $SRS_CONSTRIBUTORS; do echo "${CONTRIBUTOR} \\" >> $SRS_AUTO_HEADERS_H done echo "\"" >> $SRS_AUTO_HEADERS_H else - echo "#define SRS_AUTO_CONSTRIBUTORS \"ossrs\"" >> $SRS_AUTO_HEADERS_H + echo "#define SRS_CONSTRIBUTORS \"ossrs\"" >> $SRS_AUTO_HEADERS_H fi # new empty line to auto headers file. diff --git a/trunk/auto/depends.sh b/trunk/auto/depends.sh index 1103377d2..f65ebaaf0 100755 --- a/trunk/auto/depends.sh +++ b/trunk/auto/depends.sh @@ -338,18 +338,21 @@ fi ##################################################################################### if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then # check the cross build flag file, if flag changed, need to rebuild the st. - _ST_MAKE=linux-debug && _ST_EXTRA_CFLAGS="-DMD_HAVE_EPOLL" && _ST_LD=${SRS_TOOL_LD} && _ST_OBJ="LINUX_*" + _ST_MAKE=linux-debug && _ST_EXTRA_CFLAGS="-O0" && _ST_LD=${SRS_TOOL_LD} && _ST_OBJ="LINUX_`uname -r`_DBG" if [[ $SRS_VALGRIND == YES ]]; then _ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS -DMD_VALGRIND" fi # for osx, use darwin for st, donot use epoll. if [[ $SRS_OSX == YES ]]; then - _ST_MAKE=darwin-debug && _ST_EXTRA_CFLAGS="-DMD_HAVE_KQUEUE" && _ST_LD=${SRS_TOOL_CC} && _ST_OBJ="DARWIN_*" + _ST_MAKE=darwin-debug && _ST_EXTRA_CFLAGS="-DMD_HAVE_KQUEUE" && _ST_LD=${SRS_TOOL_CC} && _ST_OBJ="DARWIN_`uname -r`_DBG" fi # For UDP sendmmsg, disable it if not suppported. if [[ $SRS_SENDMMSG == YES ]]; then echo "Build ST with UDP sendmmsg support." _ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS -DMD_HAVE_SENDMMSG -D_GNU_SOURCE" + else + echo "Build ST without UDP sendmmsg support." + _ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS -UMD_HAVE_SENDMMSG -U_GNU_SOURCE" fi # Pass the global extra flags. if [[ $SRS_EXTRA_FLAGS != '' ]]; then @@ -379,7 +382,7 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then # Build source code. make ${_ST_MAKE} EXTRA_CFLAGS="${_ST_EXTRA_CFLAGS}" \ CC=${SRS_TOOL_CC} AR=${SRS_TOOL_AR} LD=${_ST_LD} RANDLIB=${SRS_TOOL_RANDLIB} && - cd .. && rm -f st && ln -sf st-srs/${_ST_OBJ} st + cd .. && rm -rf st && ln -sf st-srs/${_ST_OBJ} st ) fi # check status @@ -515,7 +518,7 @@ if [[ $SRS_SSL == YES && $SRS_USE_SYS_SSL != YES ]]; then # Which openssl we choose, openssl-1.0.* for SRTP with ASM, others we use openssl-1.1.* OPENSSL_CANDIDATE="openssl-1.1.0e" && OPENSSL_UNZIP="unzip -q ../../3rdparty/$OPENSSL_CANDIDATE.zip" if [[ $SRS_SRTP_ASM == YES ]]; then - OPENSSL_CANDIDATE="openssl-OpenSSL_1_0_2u" && OPENSSL_UNZIP="tar xf ../../3rdparty/$OPENSSL_CANDIDATE.tar.gz" + OPENSSL_CANDIDATE="openssl-OpenSSL_1_0_2u" && OPENSSL_UNZIP="tar xf ../../3rdparty/$OPENSSL_CANDIDATE.tar.gz" fi # cross build not specified, if exists flag, need to rebuild for no-arm platform. if [[ -f ${SRS_OBJS}/${SRS_PLATFORM}/openssl/lib/libssl.a ]]; then @@ -573,13 +576,13 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then rm -rf libsrtp-2.0.0 && unzip -q ../../3rdparty/libsrtp-2.0.0.zip && cd libsrtp-2.0.0 && ${SRTP_CONFIG} && ./configure ${SRTP_OPTIONS} --prefix=`pwd`/_release && make ${SRS_JOBS} && make install && - cd .. && rm -f srtp2 && ln -sf libsrtp-2.0.0/_release srtp2 + cd .. && rm -rf srtp2 && ln -sf libsrtp-2.0.0/_release srtp2 ) fi # check status ret=$?; if [[ $ret -ne 0 ]]; then echo "Build srtp2 failed, ret=$ret"; exit $ret; fi # Always update the links. - (cd ${SRS_OBJS} && rm -f srtp2 && ln -sf ${SRS_PLATFORM}/libsrtp-2.0.0/_release srtp2) + (cd ${SRS_OBJS} && rm -rf srtp2 && ln -sf ${SRS_PLATFORM}/libsrtp-2.0.0/_release srtp2) if [ ! -f ${SRS_OBJS}/srtp2/lib/libsrtp2.a ]; then echo "Build srtp2 static lib failed."; exit -1; fi fi @@ -601,7 +604,7 @@ if [[ $SRS_EXPORT_LIBRTMP_PROJECT == NO && $SRS_RTC == YES ]]; then # check status ret=$?; if [[ $ret -ne 0 ]]; then echo "Build opus-1.3.1 failed, ret=$ret"; exit $ret; fi # Always update the links. - (cd ${SRS_OBJS} && rm -f opus && ln -sf ${SRS_PLATFORM}/opus-1.3.1/_release opus) + (cd ${SRS_OBJS} && rm -rf opus && ln -sf ${SRS_PLATFORM}/opus-1.3.1/_release opus) if [ ! -f ${SRS_OBJS}/opus/lib/libopus.a ]; then echo "Build opus-1.3.1 failed."; exit -1; fi fi @@ -678,7 +681,10 @@ if [ $SRS_FFMPEG_TOOL = YES ]; then if [[ -f ${SRS_OBJS}/${SRS_PLATFORM}/ffmpeg/bin/ffmpeg ]]; then echo "ffmpeg-4.1 is ok."; else - echo "no ffmpeg found, please use srs-docker or --without-ffmpeg"; + echo "Error: no FFmpeg found at /usr/local/bin/ffmpeg"; + echo " please copy it from srs-docker"; + echo " or download from http://ffmpeg.org/download.html"; + echo " or disable it by --without-ffmpeg"; exit -1; fi # Always update the links. diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index 745b45e29..704ec5ad7 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -80,6 +80,8 @@ SRS_VALGRIND=NO SRS_BUILD_TAG= # Whether do "make clean" when configure. SRS_CLEAN=YES +# Whether enable RTC simulate API. +SRS_SIMULATOR=NO # ################################################################ # presets @@ -118,10 +120,9 @@ SRS_EXTRA_FLAGS= # ##################################################################################### # Performance optimize. -SRS_NASM=YES -SRS_SRTP_ASM=YES -SRS_SENDMMSG=YES -SRS_HAS_SENDMMSG=YES +SRS_NASM=NO +SRS_SRTP_ASM=NO +SRS_SENDMMSG=NO SRS_DEBUG=NO ##################################################################################### @@ -138,32 +139,20 @@ Presets: Features: -h, --help Print this message and exit 0. - --with-ssl Enable rtmp complex handshake, requires openssl-devel installed. - --with-hds Enable hds streaming, mux RTMP to F4M/F4V files. - --with-stream-caster Enable stream caster to serve other stream over other protocol. - --with-stat Enable the data statistic, for http api. - --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 support for SRS. - --with-rtc Build the WebRTC support for SRS. - --with-gb28181 Build the GB28181 support for SRS. - - --without-ssl Disable rtmp complex handshake. - --without-hds Disable hds, the adobe http dynamic streaming. - --without-stream-caster Disable stream caster, only listen and serve RTMP/HTTP. - --without-stat Disable the data statistic feature. - --without-librtmp Disable srs-librtmp, library for client. - --without-research Disable the research tools. - --without-utest Disable the utest for SRS. - --without-srt Disable the SRT support for SRS. - --without-rtc Disable the WebRTC support for SRS. - --without-gb28181 Disable the GB28181 support for SRS. + --ssl=on|off Whether build the rtmp complex handshake, requires openssl-devel installed. + --hds=on|off Whether build the hds streaming, mux RTMP to F4M/F4V files. + --stream-caster=on|off Whether build the stream caster to serve other stream over other protocol. + --stat=on|off Whether build the the data statistic, for http api. + --librtmp=on|off Whether build the srs-librtmp, library for client. + --research=on|off Whether build the research tools. + --utest=on|off Whether build the utest for SRS. + --srt=on|off Whether build the SRT support for SRS. + --rtc=on|off Whether build the WebRTC support for SRS. + --gb28181=on|off Whether build the GB28181 support for SRS. --prefix= The absolute installation path for srs. Default: $SRS_PREFIX - --static Whether add '-static' to link options. - --gcov Whether enable the GCOV compiler options. - --debug Whether enable the debug code, may hurt performance. + --gcov=on|off Whether enable the GCOV compiler options. + --debug=on|off Whether enable the debug code, may hurt performance. --jobs[=N] Allow N jobs at once; infinite jobs with no arg. Used for make in the configure, for example, to make ffmpeg. --log-verbose Whether enable the log verbose level. default: no. @@ -171,30 +160,20 @@ Features: --log-trace Whether enable the log trace level. default: yes. Performance: @see https://blog.csdn.net/win_lin/article/details/53503869 - --with-valgrind Support valgrind for memory check. - --with-gperf Build SRS with gperf tools(no gmd/gmc/gmp/gcp, with tcmalloc only). - --with-gmc Build memory check for SRS with gperf tools. - --with-gmd Build memory defense(corrupt memory) for SRS with gperf tools. - --with-gmp Build memory profile for SRS with gperf tools. - --with-gcp Build cpu profile for SRS with gperf tools. - --with-gprof Build SRS with gprof(GNU profile tool). + --valgrind=on|off Whether build valgrind for memory check. + --gperf=on|off Whether build SRS with gperf tools(no gmd/gmc/gmp/gcp, with tcmalloc only). + --gmc=on|off Whether build memory check for SRS with gperf tools. + --gmd=on|off Whether build memory defense(corrupt memory) for SRS with gperf tools. + --gmp=on|off Whether build memory profile for SRS with gperf tools. + --gcp=on|off Whether build cpu profile for SRS with gperf tools. + --gprof=on|off Whether build SRS with gprof(GNU profile tool). - --without-valgrind Do not support valgrind for memory check. - --without-gperf Do not build SRS with gperf tools(without tcmalloc and gmd/gmc/gmp/gcp). - --without-gmc Do not build memory check for SRS with gperf tools. - --without-gmd Do not build memory defense for SRS with gperf tools. - --without-gmp Do not build memory profile for SRS with gperf tools. - --without-gcp Do not build cpu profile for SRS with gperf tools. - --without-gprof Do not build srs with gprof(GNU profile tool). - - --with-nasm Build FFMPEG for RTC with nasm support. - --without-nasm Build FFMPEG for RTC without nasm support, for CentOS6 nasm is too old. - --with-srtp-nasm Build SRTP with ASM(openssl-asm) support, requires RTC and openssl-1.0.*. - --without-srtp-nasm Disable SRTP ASM support. - --with-sendmmsg Enable UDP sendmmsg support. @see http://man7.org/linux/man-pages/man2/sendmmsg.2.html - --without-sendmmsg Disable UDP sendmmsg support. + --nasm=on|off Whether build FFMPEG for RTC with nasm support. + --srtp-nasm=on|off Whether build SRTP with ASM(openssl-asm) support, requires RTC and openssl-1.0.*. + --sendmmsg=on|off Whether enable UDP sendmmsg support. @see http://man7.org/linux/man-pages/man2/sendmmsg.2.html Toolchain options: @see https://github.com/ossrs/srs/issues/1547#issuecomment-576078411 + --static Whether add '-static' to link options. --arm Enable crossbuild for ARM. --mips Enable crossbuild for MIPS. --cc= Use c compiler CC, default is gcc. @@ -213,14 +192,17 @@ Conflicts: The complex tools not available for arm. Experts: - --use-sys-ssl Do not compile ssl, use system ssl(-lssl) if required. + --sys-ssl=on|off Do not compile ssl, use system ssl(-lssl) if required. --use-shared-st Use link shared libraries for ST which uses MPL license. --use-shared-srt Use link shared libraries for SRT which uses MPL license. --export-librtmp-project= Export srs-librtmp to specified project in path. --export-librtmp-single= Export srs-librtmp to a single file(.h+.cpp) in path. - --build-tag= Set the build object directory suffix. - --with-clean Configure SRS and do make clean if possible. - --without-clean Configure SRS and never make clean even possible.. + --build-tag= Set the build object directory suffix. + --with-clean Configure SRS and do make clean if possible. + --without-clean Configure SRS and never make clean even possible. + --detect-sendmmsg=on|off Whether detect the sendmmsg API. + --has-sendmmsg=on|off Whether OS supports sendmmsg API. + --simulator=on|off Whether enable RTC network simulator. Workflow: 1. Apply "Presets". if not specified, use default preset. @@ -239,55 +221,6 @@ function parse_user_option() { -h) help=yes ;; --help) help=yes ;; - --with-ssl) SRS_SSL=YES ;; - --with-hds) SRS_HDS=YES ;; - --with-nginx) SRS_NGINX=YES ;; - --with-ffmpeg) SRS_FFMPEG_TOOL=YES ;; - --with-transcode) SRS_TRANSCODE=YES ;; - --with-ingest) SRS_INGEST=YES ;; - --with-stat) SRS_STAT=YES ;; - --with-stream-caster) SRS_STREAM_CASTER=YES ;; - --with-librtmp) SRS_LIBRTMP=YES ;; - --with-research) SRS_RESEARCH=YES ;; - --with-utest) SRS_UTEST=YES ;; - --with-srt) SRS_SRT=YES ;; - --with-rtc) SRS_RTC=YES ;; - --with-gb28181) SRS_GB28181=YES ;; - --with-nasm) SRS_NASM=YES ;; - --with-srtp-nasm) SRS_SRTP_ASM=YES ;; - --with-sendmmsg) SRS_SENDMMSG=YES ;; - --with-clean) SRS_CLEAN=YES ;; - --with-gperf) SRS_GPERF=YES ;; - --with-gmc) SRS_GPERF_MC=YES ;; - --with-gmd) SRS_GPERF_MD=YES ;; - --with-gmp) SRS_GPERF_MP=YES ;; - --with-gcp) SRS_GPERF_CP=YES ;; - --with-gprof) SRS_GPROF=YES ;; - --with-arm-ubuntu12) SRS_CROSS_BUILD=YES ;; - --with-mips-ubuntu12) SRS_CROSS_BUILD=YES ;; - - --without-hds) SRS_HDS=NO ;; - --without-nginx) SRS_NGINX=NO ;; - --without-ffmpeg) SRS_FFMPEG_TOOL=NO ;; - --without-librtmp) SRS_LIBRTMP=NO ;; - --without-research) SRS_RESEARCH=NO ;; - --without-utest) SRS_UTEST=NO ;; - --without-srt) SRS_SRT=NO ;; - --without-rtc) SRS_RTC=NO ;; - --without-gb28181) SRS_GB28181=NO ;; - --without-nasm) SRS_NASM=NO ;; - --without-srtp-nasm) SRS_SRTP_ASM=NO ;; - --without-sendmmsg) SRS_SENDMMSG=NO ;; - --without-clean) SRS_CLEAN=NO ;; - --without-gperf) SRS_GPERF=NO ;; - --without-gmc) SRS_GPERF_MC=NO ;; - --without-gmd) SRS_GPERF_MD=NO ;; - --without-gmp) SRS_GPERF_MP=NO ;; - --without-gcp) SRS_GPERF_CP=NO ;; - --without-gprof) SRS_GPROF=NO ;; - --without-arm-ubuntu12) SRS_CROSS_BUILD=NO ;; - --without-mips-ubuntu12) SRS_CROSS_BUILD=NO ;; - --jobs) SRS_JOBS=${value} ;; --prefix) SRS_PREFIX=${value} ;; --static) SRS_STATIC=YES ;; @@ -320,33 +253,146 @@ function parse_user_option() { --disable-all) SRS_DISABLE_ALL=YES ;; --pure-rtmp) SRS_PURE_RTMP=YES ;; --full) SRS_ENABLE_ALL=YES ;; - - --use-sys-ssl) SRS_USE_SYS_SSL=YES ;; - --use-shared-st) SRS_SHARED_ST=YES ;; - --use-shared-srt) SRS_SHARED_SRT=YES ;; --memory-watch) SRS_MEM_WATCH=YES ;; --export-librtmp-project) SRS_EXPORT_LIBRTMP_PROJECT=${value} ;; --export-librtmp-single) SRS_EXPORT_LIBRTMP_SINGLE=${value} ;; + + --sendmmsg) if [[ $value == off ]]; then SRS_SENDMMSG=NO; else SRS_SENDMMSG=YES; fi ;; + + --without-srtp-nasm) SRS_SRTP_ASM=NO ;; + --with-srtp-nasm) SRS_SRTP_ASM=YES ;; + --srtp-nasm) if [[ $value == off ]]; then SRS_SRTP_ASM=NO; else SRS_SRTP_ASM=YES; fi ;; + + --without-nasm) SRS_NASM=NO ;; + --with-nasm) SRS_NASM=YES ;; + --nasm) if [[ $value == off ]]; then SRS_NASM=NO; else SRS_NASM=YES; fi ;; + + --with-ssl) SRS_SSL=YES ;; + --ssl) if [[ $value == off ]]; then SRS_SSL=NO; else SRS_SSL=YES; fi ;; + + --with-hds) SRS_HDS=YES ;; + --without-hds) SRS_HDS=NO ;; + --hds) if [[ $value == off ]]; then SRS_HDS=NO; else SRS_HDS=YES; fi ;; + + --with-nginx) SRS_NGINX=YES ;; + --without-nginx) SRS_NGINX=NO ;; + --nginx) if [[ $value == off ]]; then SRS_NGINX=NO; else SRS_NGINX=YES; fi ;; + + --with-ffmpeg) SRS_FFMPEG_TOOL=YES ;; + --without-ffmpeg) SRS_FFMPEG_TOOL=NO ;; + --ffmpeg) if [[ $value == off ]]; then SRS_FFMPEG_TOOL=NO; else SRS_FFMPEG_TOOL=YES; fi ;; + + --with-transcode) SRS_TRANSCODE=YES ;; + --without-transcode) echo "ignore option \"$option\"" ;; + --transcode) if [[ $value == off ]]; then SRS_TRANSCODE=NO; else SRS_TRANSCODE=YES; fi ;; + + --with-ingest) SRS_INGEST=YES ;; + --without-ingest) echo "ignore option \"$option\"" ;; + --ingest) if [[ $value == off ]]; then SRS_INGEST=NO; else SRS_INGEST=YES; fi ;; + + --with-stat) SRS_STAT=YES ;; + --without-stat) echo "ignore option \"$option\"" ;; + --stat) if [[ $value == off ]]; then SRS_STAT=NO; else SRS_STAT=YES; fi ;; + + --with-stream-caster) SRS_STREAM_CASTER=YES ;; + --without-stream-caster) echo "ignore option \"$option\"" ;; + --stream-caster) if [[ $value == off ]]; then SRS_STREAM_CASTER=NO; else SRS_STREAM_CASTER=YES; fi ;; + + --with-librtmp) SRS_LIBRTMP=YES ;; + --without-librtmp) SRS_LIBRTMP=NO ;; + --librtmp) if [[ $value == off ]]; then SRS_LIBRTMP=NO; else SRS_LIBRTMP=YES; fi ;; + + --with-research) SRS_RESEARCH=YES ;; + --without-research) SRS_RESEARCH=NO ;; + --research) if [[ $value == off ]]; then SRS_RESEARCH=NO; else SRS_RESEARCH=YES; fi ;; + + --with-utest) SRS_UTEST=YES ;; + --without-utest) SRS_UTEST=NO ;; + --utest) if [[ $value == off ]]; then SRS_UTEST=NO; else SRS_UTEST=YES; fi ;; + + --with-srt) SRS_SRT=YES ;; + --without-srt) SRS_SRT=NO ;; + --srt) if [[ $value == off ]]; then SRS_SRT=NO; else SRS_SRT=YES; fi ;; + + --with-rtc) SRS_RTC=YES ;; + --without-rtc) SRS_RTC=NO ;; + --rtc) if [[ $value == off ]]; then SRS_RTC=NO; else SRS_RTC=YES; fi ;; + --simulator) if [[ $value == off ]]; then SRS_SIMULATOR=NO; else SRS_SIMULATOR=YES; fi ;; + + --with-gb28181) SRS_GB28181=YES ;; + --without-gb28181) SRS_GB28181=NO ;; + --gb28181) if [[ $value == off ]]; then SRS_GB28181=NO; else SRS_GB28181=YES; fi ;; + + --with-clean) SRS_CLEAN=YES ;; + --without-clean) SRS_CLEAN=NO ;; + --clean) if [[ $value == off ]]; then SRS_CLEAN=NO; else SRS_CLEAN=YES; fi ;; + + --with-gperf) SRS_GPERF=YES ;; + --without-gperf) SRS_GPERF=NO ;; + --gperf) if [[ $value == off ]]; then SRS_GPERF=NO; else SRS_GPERF=YES; fi ;; + + --with-gmc) SRS_GPERF_MC=YES ;; + --without-gmc) SRS_GPERF_MC=NO ;; + --gmc) if [[ $value == off ]]; then SRS_GPERF_MC=NO; else SRS_GPERF_MC=YES; fi ;; + + --with-gmd) SRS_GPERF_MD=YES ;; + --without-gmd) SRS_GPERF_MD=NO ;; + --gmd) if [[ $value == off ]]; then SRS_GPERF_MD=NO; else SRS_GPERF_MD=YES; fi ;; + + --with-gmp) SRS_GPERF_MP=YES ;; + --without-gmp) SRS_GPERF_MP=NO ;; + --gmp) if [[ $value == off ]]; then SRS_GPERF_MP=NO; else SRS_GPERF_MP=YES; fi ;; + + --with-gcp) SRS_GPERF_CP=YES ;; + --without-gcp) SRS_GPERF_CP=NO ;; + --gcp) if [[ $value == off ]]; then SRS_GPERF_CP=NO; else SRS_GPERF_CP=YES; fi ;; + + --with-gprof) SRS_GPROF=YES ;; + --without-gprof) SRS_GPROF=NO ;; + --gprof) if [[ $value == off ]]; then SRS_GPROF=NO; else SRS_GPROF=YES; fi ;; + + --with-arm-ubuntu12) SRS_CROSS_BUILD=YES ;; + --without-arm-ubuntu12) SRS_CROSS_BUILD=NO ;; + --arm-ubuntu12) if [[ $value == off ]]; then SRS_CROSS_BUILD=NO; else SRS_CROSS_BUILD=YES; fi ;; + + --with-mips-ubuntu12) SRS_CROSS_BUILD=YES ;; + --without-mips-ubuntu12) SRS_CROSS_BUILD=NO ;; + --mips-ubuntu12) if [[ $value == off ]]; then SRS_CROSS_BUILD=NO; else SRS_CROSS_BUILD=YES; fi ;; + + --use-sys-ssl) SRS_USE_SYS_SSL=YES ;; + --without-ssl) echo "ignore option \"$option\"" ;; + --sys-ssl) if [[ $value == off ]]; then SRS_USE_SYS_SSL=NO; else SRS_USE_SYS_SSL=YES; fi ;; + + --use-shared-st) SRS_SHARED_ST=YES ;; + --shared-st) if [[ $value == off ]]; then SRS_SHARED_ST=NO; else SRS_SHARED_ST=YES; fi ;; + + --use-shared-srt) SRS_SHARED_SRT=YES ;; + --shared-srt) if [[ $value == off ]]; then SRS_SHARED_SRT=NO; else SRS_SHARED_SRT=YES; fi ;; + --with-valgrind) SRS_VALGRIND=YES ;; --without-valgrind) SRS_VALGRIND=NO ;; + --valgrind) if [[ $value == off ]]; then SRS_VALGRIND=NO; else SRS_VALGRIND=YES; fi ;; --with-http-callback) SRS_HTTP_CALLBACK=YES ;; - --with-http-api) SRS_HTTP_API=YES ;; - --with-http-server) SRS_HTTP_SERVER=YES ;; - --with-hls) SRS_HLS=YES ;; - --with-dvr) SRS_DVR=YES ;; - - --without-stream-caster) echo "ignore option \"$option\"" ;; - --without-ingest) echo "ignore option \"$option\"" ;; - --without-ssl) echo "ignore option \"$option\"" ;; - --without-stat) echo "ignore option \"$option\"" ;; - --without-transcode) echo "ignore option \"$option\"" ;; --without-http-callback) echo "ignore option \"$option\"" ;; - --without-http-server) echo "ignore option \"$option\"" ;; + --http-callback) if [[ $value == off ]]; then SRS_HTTP_CALLBACK=NO; else SRS_HTTP_CALLBACK=YES; fi ;; + + --with-http-api) SRS_HTTP_API=YES ;; --without-http-api) echo "ignore option \"$option\"" ;; + --http-api) if [[ $value == off ]]; then SRS_HTTP_API=NO; else SRS_HTTP_API=YES; fi ;; + + --with-http-server) SRS_HTTP_SERVER=YES ;; + --without-http-server) echo "ignore option \"$option\"" ;; + --http-server) if [[ $value == off ]]; then SRS_HTTP_SERVER=NO; else SRS_HTTP_SERVER=YES; fi ;; + + --with-hls) SRS_HLS=YES ;; --without-hls) echo "ignore option \"$option\"" ;; + --hls) if [[ $value == off ]]; then SRS_HLS=NO; else SRS_HLS=YES; fi ;; + + --with-dvr) SRS_DVR=YES ;; --without-dvr) echo "ignore option \"$option\"" ;; + --dvr) if [[ $value == off ]]; then SRS_DVR=NO; else SRS_DVR=YES; fi ;; *) echo "$0: error: invalid option \"$option\"" @@ -567,23 +613,9 @@ function apply_user_detail_options() { SRS_SRTP_ASM=NO fi - # Detect whether has sendmmsg. - # @see http://man7.org/linux/man-pages/man2/sendmmsg.2.html - mkdir -p ${SRS_OBJS} && - echo " #include " > ${SRS_OBJS}/_tmp_sendmmsg_detect.c - echo " int main(int argc, char** argv) { " >> ${SRS_OBJS}/_tmp_sendmmsg_detect.c - echo " struct mmsghdr hdr; " >> ${SRS_OBJS}/_tmp_sendmmsg_detect.c - echo " hdr.msg_len = 0; " >> ${SRS_OBJS}/_tmp_sendmmsg_detect.c - echo " return 0; " >> ${SRS_OBJS}/_tmp_sendmmsg_detect.c - echo " } " >> ${SRS_OBJS}/_tmp_sendmmsg_detect.c - ${SRS_TOOL_CC} -c ${SRS_OBJS}/_tmp_sendmmsg_detect.c -D_GNU_SOURCE -o /dev/null >/dev/null 2>&1 - ret=$?; rm -f ${SRS_OBJS}/_tmp_sendmmsg_detect.c; - if [[ $ret -ne 0 ]]; then - SRS_HAS_SENDMMSG=NO - if [[ $SRS_SENDMMSG == YES ]]; then - echo "Disable UDP sendmmsg automatically" - SRS_SENDMMSG=NO - fi + if [[ $SRS_OSX == YES && $SRS_SENDMMSG == YES ]]; then + echo "Disable sendmmsg for OSX" + SRS_SENDMMSG=NO fi } apply_user_detail_options @@ -593,48 +625,50 @@ function regenerate_options() { SRS_AUTO_USER_CONFIGURE=`echo $opt` # regenerate the options for default values. SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}" - if [ $SRS_HLS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-hls"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-hls"; fi - if [ $SRS_HDS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-hds"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-hds"; fi - if [ $SRS_DVR = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-dvr"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-dvr"; fi - if [ $SRS_SSL = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ssl"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ssl"; fi - if [ $SRS_TRANSCODE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-transcode"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-transcode"; fi - if [ $SRS_INGEST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ingest"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ingest"; fi - if [ $SRS_STAT = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-stat"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-stat"; fi - if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-callback"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-callback"; fi - if [ $SRS_HTTP_SERVER = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-server"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-server"; fi - if [ $SRS_STREAM_CASTER = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-stream-caster"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-stream-caster"; fi - if [ $SRS_HTTP_API = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-api"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-api"; fi - 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_RTC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-rtc"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-rtc"; fi - if [ $SRS_GB28181 = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gb28181"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gb28181"; fi - if [ $SRS_NASM = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-nasm"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-nasm"; fi - if [ $SRS_SRTP_ASM = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-srtp-nasm"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-srtp-nasm"; fi - if [ $SRS_SENDMMSG = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-sendmmsg"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-sendmmsg"; fi - if [ $SRS_CLEAN = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-clean"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-clean"; 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 - if [ $SRS_GPERF_MP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gmp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gmp"; fi - if [ $SRS_GPERF_CP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gcp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gcp"; fi - if [ $SRS_GPROF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gprof"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gprof"; fi - if [ $SRS_STATIC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --static"; fi - if [ $SRS_SHARED_ST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --use-shared-st"; fi - if [ $SRS_SHARED_SRT = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --use-shared-srt"; fi - if [ $SRS_LOG_VERBOSE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-verbose"; fi - if [ $SRS_LOG_INFO = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-info"; fi - if [ $SRS_LOG_TRACE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-trace"; fi - if [ $SRS_GCOV = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gcov"; fi - if [ $SRS_DEBUG = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --debug"; fi - if [[ $SRS_EXTRA_FLAGS != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --extra-flags=\\\"$SRS_EXTRA_FLAGS\\\""; fi - if [[ $SRS_BUILD_TAG != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --build-tag=\\\"$SRS_BUILD_TAG\\\""; fi - if [[ $SRS_TOOL_CC != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cc=$SRS_TOOL_CC"; fi - if [[ $SRS_TOOL_CXX != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cxx=$SRS_TOOL_CXX"; fi - if [[ $SRS_TOOL_AR != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --ar=$SRS_TOOL_AR"; fi - if [[ $SRS_TOOL_LD != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --ld=$SRS_TOOL_LD"; fi - if [[ $SRS_TOOL_RANDLIB != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --randlib=$SRS_TOOL_RANDLIB"; fi + if [ $SRS_HLS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --hls=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --hls=off"; fi + if [ $SRS_HDS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --hds=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --hds=off"; fi + if [ $SRS_DVR = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --dvr=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --dvr=off"; fi + if [ $SRS_SSL = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --ssl=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --ssl=off"; fi + if [ $SRS_USE_SYS_SSL = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --sys-ssl=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --sys-ssl=off"; fi + if [ $SRS_TRANSCODE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --transcode=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --transcode=off"; fi + if [ $SRS_INGEST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --ingest=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --ingest=off"; fi + if [ $SRS_STAT = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --stat=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --stat=off"; fi + if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --http-callback=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --http-callback=off"; fi + if [ $SRS_HTTP_SERVER = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --http-server=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --http-server=off"; fi + if [ $SRS_STREAM_CASTER = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --stream-caster=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --stream-caster=off"; fi + if [ $SRS_HTTP_API = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --http-api=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --http-api=off"; fi + if [ $SRS_LIBRTMP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --librtmp=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --librtmp=off"; fi + if [ $SRS_RESEARCH = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --research=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --research=off"; fi + if [ $SRS_UTEST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --utest=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --utest=off"; fi + if [ $SRS_SRT = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --srt=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --srt=off"; fi + if [ $SRS_RTC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --rtc=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --rtc=off"; fi + if [ $SRS_SIMULATOR = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --simulator=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --simulator=off"; fi + if [ $SRS_GB28181 = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gb28181=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gb28181=off"; fi + if [ $SRS_NASM = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --nasm=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --nasm=off"; fi + if [ $SRS_SRTP_ASM = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --srtp-nasm=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --srtp-nasm=off"; fi + if [ $SRS_SENDMMSG = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --sendmmsg=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --sendmmsg=off"; fi + if [ $SRS_CLEAN = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --clean=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --clean=off"; fi + if [ $SRS_GPERF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gperf=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gperf=off"; fi + if [ $SRS_GPERF_MC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gmc=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gmc=off"; fi + if [ $SRS_GPERF_MD = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gmd=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gmd=off"; fi + if [ $SRS_GPERF_MP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gmp=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gmp=off"; fi + if [ $SRS_GPERF_CP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gcp=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gcp=off"; fi + if [ $SRS_GPROF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gprof=on"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gprof=off"; fi + if [ $SRS_STATIC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --static"; fi + if [ $SRS_SHARED_ST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --use-shared-st"; fi + if [ $SRS_SHARED_SRT = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --use-shared-srt"; fi + if [ $SRS_LOG_VERBOSE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-verbose"; fi + if [ $SRS_LOG_INFO = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-info"; fi + if [ $SRS_LOG_TRACE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-trace"; fi + if [ $SRS_GCOV = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gcov"; fi + if [ $SRS_DEBUG = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --debug"; fi + if [[ $SRS_EXTRA_FLAGS != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --extra-flags=\\\"$SRS_EXTRA_FLAGS\\\""; fi + if [[ $SRS_BUILD_TAG != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --build-tag=\\\"$SRS_BUILD_TAG\\\""; fi + if [[ $SRS_TOOL_CC != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cc=$SRS_TOOL_CC"; fi + if [[ $SRS_TOOL_CXX != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cxx=$SRS_TOOL_CXX"; fi + if [[ $SRS_TOOL_AR != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --ar=$SRS_TOOL_AR"; fi + if [[ $SRS_TOOL_LD != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --ld=$SRS_TOOL_LD"; fi + if [[ $SRS_TOOL_RANDLIB != '' ]]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --randlib=$SRS_TOOL_RANDLIB"; fi echo "User config: $SRS_AUTO_USER_CONFIGURE" echo "Detail config: ${SRS_AUTO_CONFIGURE}" } diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index bb852f43e..0b079133f 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -421,6 +421,13 @@ rtc_server { # $CANDIDATE $EIP # TODO: Implements it. # default: * candidate *; + # The IP family filter for candidate, it can be: + # ipv4 Filter IP v4 candidates. + # ipv6 Filter IP v6 candidates. + # all Filter all IP v4 or v6 candidates. + # For example, if set to ipv4, we only use the IPv4 address as candidate. + # default: ipv4 + ip_family ipv4; # Whether use ECDSA certificate. # If not, use RSA certificate. # default: on @@ -461,6 +468,16 @@ rtc_server { # then system queue is 2000*4 = 8k, user can incrase reuseport to incrase the queue. # default: 2000 queue_length 2000; + # The black-hole to copy packet to, for debugging. + # For example, when debugging Chrome publish stream, the received packets are encrypted cipher, + # we can set the publisher black-hole, SRS will copy the plaintext packets to black-hole, and + # we are able to capture the plaintext packets by wireshark. + black_hole { + # Whether enable the black-hole. + enabled off; + # The black-hole address for publisher, or SRS as receiver. + publisher 127.0.0.1:10000; + } } vhost rtc.vhost.srs.com { @@ -499,6 +516,12 @@ vhost rtc.vhost.srs.com { # default: 1 (For WebRTC, min_latency off) mw_msgs 0; } + # For NACK. + nack { + # Whether support NACK. + # default: on + enabled on; + } } ############################################################################################# diff --git a/trunk/configure b/trunk/configure index ed76da4d5..f34c47e30 100755 --- a/trunk/configure +++ b/trunk/configure @@ -188,7 +188,7 @@ if [[ $SRS_GCOV == YES ]]; then SrsLinkOptions="${SrsLinkOptions} ${SrsGcov}"; fi # For FFMPEG/RTC. -if [[ $SRS_RTC == YES && $SRS_NASM == NO ]]; then +if [[ $SRS_RTC == YES && $SRS_NASM == NO && $SRS_OSX == NO ]]; then SrsLinkOptions="${SrsLinkOptions} -lrt"; fi @@ -213,7 +213,7 @@ MODULE_FILES=("srs_kernel_error" "srs_kernel_log" "srs_kernel_buffer" "srs_kernel_consts" "srs_kernel_aac" "srs_kernel_mp3" "srs_kernel_ts" "srs_kernel_stream" "srs_kernel_balance" "srs_kernel_mp4" "srs_kernel_file") if [[ $SRS_RTC == YES ]]; then - MODULE_FILES+=("srs_kernel_rtp") + MODULE_FILES+=("srs_kernel_rtc_rtp") fi KERNEL_INCS="src/kernel"; MODULE_DIR=${KERNEL_INCS} . auto/modules.sh KERNEL_OBJS="${MODULE_OBJS[@]}" @@ -227,7 +227,7 @@ MODULE_FILES=("srs_protocol_amf0" "srs_protocol_io" "srs_rtmp_stack" "srs_raw_avc" "srs_rtsp_stack" "srs_sip_stack" "srs_http_stack" "srs_protocol_kbps" "srs_protocol_json" "srs_protocol_format") if [[ $SRS_RTC == YES ]]; then - MODULE_FILES+=("srs_stun_stack") + MODULE_FILES+=("srs_rtc_stun_stack") fi PROTOCOL_INCS="src/protocol"; MODULE_DIR=${PROTOCOL_INCS} . auto/modules.sh PROTOCOL_OBJS="${MODULE_OBJS[@]}" @@ -279,7 +279,8 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then "srs_app_hourglass" "srs_app_dash" "srs_app_fragment" "srs_app_dvr" "srs_app_coworkers" "srs_app_hybrid") if [[ $SRS_RTC == YES ]]; then - MODULE_FILES+=("srs_app_rtc" "srs_app_rtc_conn" "srs_app_dtls" "srs_app_audio_recode" "srs_app_sdp") + MODULE_FILES+=("srs_app_rtc" "srs_app_rtc_conn" "srs_app_rtc_dtls" "srs_app_rtc_codec" "srs_app_rtc_sdp" + "srs_app_rtc_queue" "srs_app_rtc_server") fi if [[ $SRS_GB28181 == YES ]]; then MODULE_FILES+=("srs_app_gb28181" "srs_app_gb28181_sip") diff --git a/trunk/research/players/js/srs.page.js b/trunk/research/players/js/srs.page.js index 3f3b1f6ca..6da6d4440 100755 --- a/trunk/research/players/js/srs.page.js +++ b/trunk/research/players/js/srs.page.js @@ -30,6 +30,7 @@ function update_nav() { $("#srs_index").attr("href", "index.html" + window.location.search); $("#nav_srs_player").attr("href", "srs_player.html" + window.location.search); $("#nav_rtc_player").attr("href", "rtc_player.html" + window.location.search); + $("#nav_rtc_publisher").attr("href", "rtc_publisher.html" + window.location.search); $("#nav_srs_publisher").attr("href", "srs_publisher.html" + window.location.search); $("#nav_srs_chat").attr("href", "srs_chat.html" + window.location.search); $("#nav_srs_bwt").attr("href", "srs_bwt.html" + window.location.search); diff --git a/trunk/research/players/rtc_player.html b/trunk/research/players/rtc_player.html index e531aa434..2a5ed1ec4 100644 --- a/trunk/research/players/rtc_player.html +++ b/trunk/research/players/rtc_player.html @@ -15,7 +15,7 @@ - +