mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Enable --nasm and --srtp-asm by default for performance. 4.0.64
This commit is contained in:
parent
945cf64024
commit
6e3bd61599
5 changed files with 19 additions and 7 deletions
|
@ -155,6 +155,7 @@ For previous versions, please read:
|
||||||
|
|
||||||
## V4 changes
|
## 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-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, HTML5 video tag resolution adaptive. 4.0.59
|
||||||
* v4.0, 2021-01-08, Fix memory leak and bugs for RTC. 4.0.58
|
* 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.
|
# For RTC, we should use ASM to improve performance, not a little improving.
|
||||||
if [[ $SRS_RTC == NO || $SRS_NASM == NO ]]; then
|
if [[ $SRS_RTC == NO || $SRS_NASM == NO ]]; then
|
||||||
OPENSSL_OPTIONS="$OPENSSL_OPTIONS -no-asm"
|
OPENSSL_OPTIONS="$OPENSSL_OPTIONS -no-asm"
|
||||||
|
echo "Warning: NASM is off, performance is hurt"
|
||||||
fi
|
fi
|
||||||
# Mac OS X can have issues (its often a neglected platform).
|
# Mac OS X can have issues (its often a neglected platform).
|
||||||
# @see https://wiki.openssl.org/index.php/Compilation_and_Installation
|
# @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
|
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
|
${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
|
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
|
fi
|
||||||
rm -f ${SRS_OBJS}/_tmp_srtp_asm_detect.c
|
rm -f ${SRS_OBJS}/_tmp_srtp_asm_detect.c
|
||||||
fi;
|
fi;
|
||||||
|
|
|
@ -128,8 +128,8 @@ SRS_EXTRA_FLAGS=
|
||||||
#
|
#
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# Performance optimize.
|
# Performance optimize.
|
||||||
SRS_NASM=NO
|
SRS_NASM=YES
|
||||||
SRS_SRTP_ASM=NO
|
SRS_SRTP_ASM=YES
|
||||||
SRS_SENDMMSG=NO
|
SRS_SENDMMSG=NO
|
||||||
SRS_DEBUG=NO
|
SRS_DEBUG=NO
|
||||||
|
|
||||||
|
@ -500,18 +500,18 @@ function apply_detail_options() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $SRS_SRTP_ASM == YES && $SRS_RTC == NO ]]; then
|
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
|
SRS_SRTP_ASM=NO
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $SRS_SRTP_ASM == YES && $SRS_NASM == NO ]]; then
|
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
|
SRS_SRTP_ASM=NO
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Which openssl we choose, openssl-1.0.* for SRTP with ASM, others we use openssl-1.1.*
|
# 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
|
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
|
SRS_SSL_1_0=YES
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
10
trunk/configure
vendored
10
trunk/configure
vendored
|
@ -717,6 +717,16 @@ if [ $SRS_SSL = YES ]; then
|
||||||
else
|
else
|
||||||
echo -e "${YELLOW}Warning: RTMP complex handshake is disabled, flash cann't play h264/aac.${BLACK}"
|
echo -e "${YELLOW}Warning: RTMP complex handshake is disabled, flash cann't play h264/aac.${BLACK}"
|
||||||
fi
|
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
|
if [ $SRS_TRANSCODE = YES ]; then
|
||||||
echo -e "${GREEN}The transcoding is enabled${BLACK}"
|
echo -e "${GREEN}The transcoding is enabled${BLACK}"
|
||||||
else
|
else
|
||||||
|
|
|
@ -24,6 +24,6 @@
|
||||||
#ifndef SRS_CORE_VERSION4_HPP
|
#ifndef SRS_CORE_VERSION4_HPP
|
||||||
#define SRS_CORE_VERSION4_HPP
|
#define SRS_CORE_VERSION4_HPP
|
||||||
|
|
||||||
#define SRS_VERSION4_REVISION 63
|
#define SRS_VERSION4_REVISION 64
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue