Skip to content

Commit

Permalink
Enable --nasm and --srtp-asm by default for performance. 4.0.64
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Jan 31, 2021
1 parent 945cf64 commit 6e3bd61
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion trunk/auto/depends.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions trunk/auto/options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions trunk/configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6e3bd61

Please sign in to comment.