1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-15 04:42:04 +00:00

Build: Support --shared-srt

This commit is contained in:
winlin 2021-06-01 12:29:22 +08:00
parent 7e657ae654
commit 785d2fce08
6 changed files with 15 additions and 8 deletions

View file

@ -188,6 +188,7 @@ For external services to work with SRS:
## V4 changes ## V4 changes
* v4.0, 2021-06-01, Support --shared-srt to link with *.so for MPL license. 4.0.125
* v4.0, 2021-05-31, Use [SPDX-License-Identifier: MIT](https://spdx.dev/ids/). 4.0.124 * v4.0, 2021-05-31, Use [SPDX-License-Identifier: MIT](https://spdx.dev/ids/). 4.0.124
* v4.0, 2021-05-28, Fix bugs for GB28181 and RTC. 4.0.123 * v4.0, 2021-05-28, Fix bugs for GB28181 and RTC. 4.0.123
* v4.0, 2021-05-21, Fix [#2370][bug #2370] bug for Firefox play stream(published by Chrome). 4.0.121 * v4.0, 2021-05-21, Fix [#2370][bug #2370] bug for Firefox play stream(published by Chrome). 4.0.121

View file

@ -656,7 +656,7 @@ if [[ $SRS_RTC == YES ]]; then
fi fi
##################################################################################### #####################################################################################
# ffmpeg-fix, for WebRTC to transcode AAC with Opus. # ffmpeg-fit, for WebRTC to transcode AAC with Opus.
##################################################################################### #####################################################################################
if [[ $SRS_FFMPEG_FIT == YES ]]; then if [[ $SRS_FFMPEG_FIT == YES ]]; then
FFMPEG_OPTIONS="" FFMPEG_OPTIONS=""
@ -743,7 +743,12 @@ if [[ $SRS_SRT == YES ]]; then
exit -1; exit -1;
fi fi
# Always disable c++11 for libsrt, because only the srt-app requres it. # Always disable c++11 for libsrt, because only the srt-app requres it.
LIBSRT_OPTIONS="--disable-app --enable-shared=0 --enable-static --enable-c++11=0" LIBSRT_OPTIONS="--disable-app --enable-static --enable-c++11=0"
if [[ $SRS_SHARED_SRT == YES ]]; then
LIBSRT_OPTIONS="$LIBSRT_OPTIONS --enable-shared=1"
else
LIBSRT_OPTIONS="$LIBSRT_OPTIONS --enable-shared=0"
fi
# Start build libsrt. # Start build libsrt.
rm -rf ${SRS_OBJS}/${SRS_PLATFORM}/srt-1-fit && cd ${SRS_OBJS}/${SRS_PLATFORM} && rm -rf ${SRS_OBJS}/${SRS_PLATFORM}/srt-1-fit && cd ${SRS_OBJS}/${SRS_PLATFORM} &&
cp -R ../../3rdparty/srt-1-fit srt-1-fit && cd srt-1-fit && cp -R ../../3rdparty/srt-1-fit srt-1-fit && cd srt-1-fit &&

View file

@ -149,8 +149,8 @@ Experts:
--sys-ssl=on|off Do not compile ssl, use system ssl(-lssl) if required. Default: $(value2switch $SRS_USE_SYS_SSL) --sys-ssl=on|off Do not compile ssl, use system ssl(-lssl) if required. Default: $(value2switch $SRS_USE_SYS_SSL)
--ssl-1-0=on|off Whether use openssl-1.0.*. Default: $(value2switch $SRS_SSL_1_0) --ssl-1-0=on|off Whether use openssl-1.0.*. Default: $(value2switch $SRS_SSL_1_0)
--ssl-local=on|off Whether use local openssl, not system even exists. Default: $(value2switch $SRS_SSL_LOCAL) --ssl-local=on|off Whether use local openssl, not system even exists. Default: $(value2switch $SRS_SSL_LOCAL)
--use-shared-st Use link shared libraries for ST which uses MPL license. Default: $(value2switch $SRS_SHARED_ST) --shared-st=on|off Use link shared libraries for ST which uses MPL license. Default: $(value2switch $SRS_SHARED_ST)
--use-shared-srt Use link shared libraries for SRT which uses MPL license. Default: $(value2switch $SRS_SHARED_SRT) --shared-srt=on|off Use link shared libraries for SRT which uses MPL license. Default: $(value2switch $SRS_SHARED_SRT)
--clean=on|off Whether do 'make clean' when configure. Default: $(value2switch $SRS_CLEAN) --clean=on|off Whether do 'make clean' when configure. Default: $(value2switch $SRS_CLEAN)
--simulator=on|off RTC: Whether enable network simulator. Default: $(value2switch $SRS_SIMULATOR) --simulator=on|off RTC: Whether enable network simulator. Default: $(value2switch $SRS_SIMULATOR)
--build-tag=<TAG> Set the build object directory suffix. --build-tag=<TAG> Set the build object directory suffix.
@ -481,8 +481,8 @@ function regenerate_options() {
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gcp=$(value2switch $SRS_GPERF_CP)" SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gcp=$(value2switch $SRS_GPERF_CP)"
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gprof=$(value2switch $SRS_GPROF)" SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gprof=$(value2switch $SRS_GPROF)"
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --static=$(value2switch $SRS_STATIC)" SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --static=$(value2switch $SRS_STATIC)"
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --use-shared-st=$(value2switch $SRS_SHARED_ST)" SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --shared-st=$(value2switch $SRS_SHARED_ST)"
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --use-shared-srt=$(value2switch $SRS_SHARED_SRT)" SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --shared-srt=$(value2switch $SRS_SHARED_SRT)"
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-verbose=$(value2switch $SRS_LOG_VERBOSE)" SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-verbose=$(value2switch $SRS_LOG_VERBOSE)"
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-info=$(value2switch $SRS_LOG_INFO)" SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-info=$(value2switch $SRS_LOG_INFO)"
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-trace=$(value2switch $SRS_LOG_TRACE)" SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-trace=$(value2switch $SRS_LOG_TRACE)"

View file

@ -17,7 +17,7 @@ else
SRS_PLATFORM="${SRS_PLATFORM}-${GCC_VERSION}" SRS_PLATFORM="${SRS_PLATFORM}-${GCC_VERSION}"
fi fi
# Use isolate cache for different SRS version. # Use isolate cache for different SRS version.
SRS_PLATFORM="${SRS_PLATFORM}-SRS4" SRS_PLATFORM="${SRS_PLATFORM}-SRS5"
echo "SRS_WORKDIR: ${SRS_WORKDIR}, SRS_OBJS_DIR: ${SRS_OBJS_DIR}, SRS_OBJS: ${SRS_OBJS}, SRS_PLATFORM: ${SRS_PLATFORM}" echo "SRS_WORKDIR: ${SRS_WORKDIR}, SRS_OBJS_DIR: ${SRS_OBJS_DIR}, SRS_OBJS: ${SRS_OBJS}, SRS_PLATFORM: ${SRS_PLATFORM}"

1
trunk/configure vendored
View file

@ -164,6 +164,7 @@ fi
if [[ $SRS_SRT == YES ]]; then if [[ $SRS_SRT == YES ]]; then
SrsSRTRoot="${SRS_WORKDIR}/src/srt" SrsSRTRoot="${SRS_WORKDIR}/src/srt"
LibSRTRoot="${SRS_OBJS_DIR}/srt/include"; LibSRTfile="${SRS_OBJS_DIR}/srt/lib/libsrt.a" LibSRTRoot="${SRS_OBJS_DIR}/srt/include"; LibSRTfile="${SRS_OBJS_DIR}/srt/lib/libsrt.a"
if [[ $SRS_SHARED_SRT == YES ]]; then LibSRTfile="-L${SRS_OBJS_DIR}/srt/lib -lsrt"; fi
fi fi
# For iconv on macOS only, CentOS seems ok. # For iconv on macOS only, CentOS seems ok.

View file

@ -9,6 +9,6 @@
#define VERSION_MAJOR 4 #define VERSION_MAJOR 4
#define VERSION_MINOR 0 #define VERSION_MINOR 0
#define VERSION_REVISION 124 #define VERSION_REVISION 125
#endif #endif