Enable --nasm and --srtp-asm by default for performance. 4.0.64

pull/2199/head
winlin 4 years ago
parent 945cf64024
commit 6e3bd61599

@ -155,6 +155,7 @@ For previous versions, please read:
## V4 changes
* v4.0, 2021-01-25, Enable --nasm and --srtp-asm by default for performance. 4.0.64
* v4.0, 2021-01-20, Support HTTP-FLV and HLS for srs-player by H5. 4.0.63
* v4.0, 2021-01-08, HTML5 video tag resolution adaptive. 4.0.59
* v4.0, 2021-01-08, Fix memory leak and bugs for RTC. 4.0.58

@ -491,6 +491,7 @@ if [[ $SRS_SSL == YES && $SRS_USE_SYS_SSL != YES ]]; then
# For RTC, we should use ASM to improve performance, not a little improving.
if [[ $SRS_RTC == NO || $SRS_NASM == NO ]]; then
OPENSSL_OPTIONS="$OPENSSL_OPTIONS -no-asm"
echo "Warning: NASM is off, performance is hurt"
fi
# Mac OS X can have issues (its often a neglected platform).
# @see https://wiki.openssl.org/index.php/Compilation_and_Installation
@ -537,7 +538,7 @@ if [[ $SRS_SRTP_ASM == YES ]]; then
echo " #endif " >> ${SRS_OBJS}/_tmp_srtp_asm_detect.c
${SRS_TOOL_CC} -c ${SRS_OBJS}/_tmp_srtp_asm_detect.c -I${SRS_OBJS}/openssl/include -o /dev/null >/dev/null 2>&1
if [[ $? -ne 0 ]]; then
SRS_SRTP_ASM=NO && echo "Warning: Disable SRTP ASM optimization, please update docker";
SRS_SRTP_ASM=NO && echo "Warning: Disable SRTP-ASM optimization, please update docker";
fi
rm -f ${SRS_OBJS}/_tmp_srtp_asm_detect.c
fi;

@ -128,8 +128,8 @@ SRS_EXTRA_FLAGS=
#
#####################################################################################
# Performance optimize.
SRS_NASM=NO
SRS_SRTP_ASM=NO
SRS_NASM=YES
SRS_SRTP_ASM=YES
SRS_SENDMMSG=NO
SRS_DEBUG=NO
@ -500,18 +500,18 @@ function apply_detail_options() {
fi
if [[ $SRS_SRTP_ASM == YES && $SRS_RTC == NO ]]; then
echo "Disable SRTP ASM, because RTC is disabled."
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."
echo "Disable SRTP-ASM, because NASM is disabled."
SRS_SRTP_ASM=NO
fi
# Which openssl we choose, openssl-1.0.* for SRTP with ASM, others we use openssl-1.1.*
if [[ $SRS_SRTP_ASM == YES && $SRS_SSL_1_0 == NO ]]; then
echo "Use openssl-1.0 for SRTP ASM."
echo "Use openssl-1.0 for SRTP-ASM."
SRS_SSL_1_0=YES
fi

10
trunk/configure vendored

@ -717,6 +717,16 @@ if [ $SRS_SSL = YES ]; then
else
echo -e "${YELLOW}Warning: RTMP complex handshake is disabled, flash cann't play h264/aac.${BLACK}"
fi
if [[ $SRS_NASM == YES ]]; then
echo -e "${GREEN}NASM for HTTPS(openssl) and FFmepg is enabled${BLACK}"
else
echo -e "${YELLOW}Warning: NASM for HTTPS(openssl) and FFmepg is disabled${BLACK}"
fi
if [[ $SRS_SRTP_ASM == YES ]]; then
echo -e "${GREEN}SRTP-NASM for WebRTC(openssl) is enabled${BLACK}"
else
echo -e "${YELLOW}Warning: SRTP-NASM for WebRTC(openssl) is disabled${BLACK}"
fi
if [ $SRS_TRANSCODE = YES ]; then
echo -e "${GREEN}The transcoding is enabled${BLACK}"
else

@ -24,6 +24,6 @@
#ifndef SRS_CORE_VERSION4_HPP
#define SRS_CORE_VERSION4_HPP
#define SRS_VERSION4_REVISION 63
#define SRS_VERSION4_REVISION 64
#endif

Loading…
Cancel
Save