mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #370, support SRTP with ASM(enable openssl) by default
This commit is contained in:
parent
cdb20c79cc
commit
5e06a2568b
2 changed files with 54 additions and 24 deletions
|
@ -19,7 +19,6 @@ SRS_HDS=NO
|
|||
SRS_SRT=NO
|
||||
SRS_RTC=YES
|
||||
SRS_GB28181=NO
|
||||
SRS_NASM=YES
|
||||
SRS_NGINX=NO
|
||||
SRS_FFMPEG_TOOL=NO
|
||||
SRS_LIBRTMP=NO
|
||||
|
@ -77,6 +76,10 @@ SRS_EXPORT_LIBRTMP_PROJECT=NO
|
|||
SRS_EXPORT_LIBRTMP_SINGLE=NO
|
||||
# valgrind
|
||||
SRS_VALGRIND=NO
|
||||
# Set the object files tag name.
|
||||
SRS_BUILD_TAG=
|
||||
# Whether do "make clean" when configure.
|
||||
SRS_CLEAN=YES
|
||||
#
|
||||
################################################################
|
||||
# presets
|
||||
|
@ -112,10 +115,11 @@ SRS_TOOL_AR=ar
|
|||
SRS_TOOL_LD=ld
|
||||
SRS_TOOL_RANDLIB=randlib
|
||||
SRS_EXTRA_FLAGS=
|
||||
# Set the object files tag name.
|
||||
SRS_BUILD_TAG=
|
||||
# Whether do "make clean" when configure.
|
||||
SRS_CLEAN=YES
|
||||
#
|
||||
#####################################################################################
|
||||
# Performance optimize.
|
||||
SRS_NASM=YES
|
||||
SRS_SRTP_ASM=YES
|
||||
|
||||
#####################################################################################
|
||||
# menu
|
||||
|
@ -179,6 +183,11 @@ Performance: @see https://blog.csdn.net/win_lin/article/details/5
|
|||
--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.
|
||||
|
||||
Toolchain options: @see https://github.com/ossrs/srs/issues/1547#issuecomment-576078411
|
||||
--arm Enable crossbuild for ARM.
|
||||
--mips Enable crossbuild for MIPS.
|
||||
|
@ -188,11 +197,6 @@ Toolchain options: @see https://github.com/ossrs/srs/issues/1547#issuec
|
|||
--ld=<LD> Use linker tool LD, default is ld.
|
||||
--randlib=<RANDLIB> Use randlib tool RANDLIB, default is randlib.
|
||||
--extra-flags=<EFLAGS> Set EFLAGS as CFLAGS and CXXFLAGS. Also passed to ST as EXTRA_CFLAGS.
|
||||
--with-nasm Build FFMPEG for RTC with nasm support.
|
||||
--without-nasm Build FFMPEG for RTC without nasm support, for CentOS6 nasm is too old.
|
||||
--build-tag=<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..
|
||||
|
||||
Conflicts:
|
||||
1. --with-gmc vs --with-gmp:
|
||||
|
@ -208,6 +212,9 @@ Experts:
|
|||
--use-shared-srt Use link shared libraries for SRT which uses MPL license.
|
||||
--export-librtmp-project=<path> Export srs-librtmp to specified project in path.
|
||||
--export-librtmp-single=<path> Export srs-librtmp to a single file(.h+.cpp) in path.
|
||||
--build-tag=<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..
|
||||
|
||||
Workflow:
|
||||
1. Apply "Presets". if not specified, use default preset.
|
||||
|
@ -241,6 +248,7 @@ function parse_user_option() {
|
|||
--with-rtc) SRS_RTC=YES ;;
|
||||
--with-gb28181) SRS_GB28181=YES ;;
|
||||
--with-nasm) SRS_NASM=YES ;;
|
||||
--with-srtp-nasm) SRS_SRTP_ASM=YES ;;
|
||||
--with-clean) SRS_CLEAN=YES ;;
|
||||
--with-gperf) SRS_GPERF=YES ;;
|
||||
--with-gmc) SRS_GPERF_MC=YES ;;
|
||||
|
@ -261,6 +269,7 @@ function parse_user_option() {
|
|||
--without-rtc) SRS_RTC=NO ;;
|
||||
--without-gb28181) SRS_GB28181=NO ;;
|
||||
--without-nasm) SRS_NASM=NO ;;
|
||||
--without-srtp-nasm) SRS_SRTP_ASM=NO ;;
|
||||
--without-clean) SRS_CLEAN=NO ;;
|
||||
--without-gperf) SRS_GPERF=NO ;;
|
||||
--without-gmc) SRS_GPERF_MC=NO ;;
|
||||
|
@ -564,6 +573,7 @@ function regenerate_options() {
|
|||
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_NASM = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-srtp-nasm"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-srtp-nasm"; 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
|
||||
|
@ -616,6 +626,16 @@ function check_option_conflicts() {
|
|||
exit -1
|
||||
fi
|
||||
|
||||
if [[ $SRS_SRTP_ASM == YES && $SRS_RTC == NO ]]; then
|
||||
echo "Disable SRTP ASM, because RTC is disabled."
|
||||
SRS_SRTP_ASM=NO
|
||||
fi
|
||||
|
||||
if [[ $SRS_SRTP_ASM == YES && $SRS_NASM == NO ]]; then
|
||||
echo "Disable SRTP ASM, because NASM is disabled."
|
||||
SRS_SRTP_ASM=NO
|
||||
fi
|
||||
|
||||
# TODO: FIXME: check more os.
|
||||
|
||||
__check_ok=YES
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue