mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
Merge branch 3.0release into develop
This commit is contained in:
commit
0d5c86853a
22 changed files with 44 additions and 336 deletions
|
@ -97,30 +97,12 @@ else
|
|||
srs_undefine_macro "SRS_AUTO_NGINX" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
if [ $SRS_DVR = YES ]; then
|
||||
srs_define_macro "SRS_AUTO_DVR" $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
srs_undefine_macro "SRS_AUTO_DVR" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
if [ $SRS_HLS = YES ]; then
|
||||
srs_define_macro "SRS_AUTO_HLS" $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
srs_undefine_macro "SRS_AUTO_HLS" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
if [ $SRS_HDS = YES ]; then
|
||||
srs_define_macro "SRS_AUTO_HDS" $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
srs_undefine_macro "SRS_AUTO_HDS" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
if [ $SRS_SSL = YES ]; then
|
||||
srs_define_macro "SRS_AUTO_SSL" $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
srs_undefine_macro "SRS_AUTO_SSL" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
if [ $SRS_MEM_WATCH = YES ]; then
|
||||
srs_define_macro "SRS_AUTO_MEM_WATCH" $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
|
@ -142,25 +124,6 @@ else
|
|||
srs_undefine_macro "SRS_AUTO_FFMPEG_STUB" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
if [ $SRS_TRANSCODE = YES ]; then
|
||||
srs_define_macro "SRS_AUTO_TRANSCODE" $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
srs_undefine_macro "SRS_AUTO_TRANSCODE" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
if [ $SRS_INGEST = YES ]; then
|
||||
srs_define_macro "SRS_AUTO_INGEST" $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
srs_undefine_macro "SRS_AUTO_INGEST" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
# for statistic.
|
||||
if [ $SRS_STAT = YES ]; then
|
||||
srs_define_macro "SRS_AUTO_STAT" $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
srs_undefine_macro "SRS_AUTO_STAT" $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
if [ $SRS_GPERF = YES ]; then
|
||||
srs_define_macro "SRS_AUTO_GPERF" $SRS_AUTO_HEADERS_H
|
||||
else
|
||||
|
|
|
@ -17,30 +17,23 @@ help=no
|
|||
# feature options
|
||||
SRS_HDS=RESERVED
|
||||
SRS_NGINX=RESERVED
|
||||
SRS_SSL=RESERVED
|
||||
SRS_FFMPEG_TOOL=RESERVED
|
||||
SRS_TRANSCODE=RESERVED
|
||||
SRS_INGEST=RESERVED
|
||||
SRS_STAT=RESERVED
|
||||
SRS_STREAM_CASTER=RESERVED
|
||||
SRS_KAFKA=RESERVED
|
||||
SRS_LIBRTMP=RESERVED
|
||||
SRS_RESEARCH=RESERVED
|
||||
SRS_UTEST=RESERVED
|
||||
# tcmalloc
|
||||
SRS_GPERF=RESERVED
|
||||
# gperf memory check
|
||||
SRS_GPERF_MC=RESERVED
|
||||
# gperf memory defence
|
||||
SRS_GPERF_MD=RESERVED
|
||||
# gperf memory profile
|
||||
SRS_GPERF_MP=RESERVED
|
||||
# gperf cpu profile
|
||||
SRS_GPERF_CP=RESERVED
|
||||
# gprof
|
||||
SRS_GPROF=RESERVED
|
||||
#
|
||||
SRS_GPERF=NO # Performance test: tcmalloc
|
||||
SRS_GPERF_MC=NO # Performance test: gperf memory check
|
||||
SRS_GPERF_MD=NO # Performance test: gperf memory defence
|
||||
SRS_GPERF_MP=NO # Performance test: gperf memory profile
|
||||
SRS_GPERF_CP=NO # Performance test: gperf cpu profile
|
||||
SRS_GPROF=NO # Performance test: gprof
|
||||
# Always enable the bellow features.
|
||||
SRS_INGEST=YES
|
||||
SRS_SSL=YES
|
||||
SRS_STAT=YES
|
||||
SRS_TRANSCODE=YES
|
||||
SRS_HTTP_CALLBACK=YES
|
||||
SRS_HTTP_SERVER=YES
|
||||
SRS_HTTP_API=YES
|
||||
|
@ -389,22 +382,12 @@ function apply_user_presets() {
|
|||
if [ $SRS_DISABLE_ALL = YES ]; then
|
||||
SRS_HDS=NO
|
||||
SRS_NGINX=NO
|
||||
SRS_SSL=NO
|
||||
SRS_FFMPEG_TOOL=NO
|
||||
SRS_TRANSCODE=NO
|
||||
SRS_INGEST=NO
|
||||
SRS_STAT=NO
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=NO
|
||||
SRS_LIBRTMP=NO
|
||||
SRS_RESEARCH=NO
|
||||
SRS_UTEST=NO
|
||||
SRS_GPERF=NO
|
||||
SRS_GPERF_MC=NO
|
||||
SRS_GPERF_MD=NO
|
||||
SRS_GPERF_MP=NO
|
||||
SRS_GPERF_CP=NO
|
||||
SRS_GPROF=NO
|
||||
SRS_STATIC=NO
|
||||
fi
|
||||
|
||||
|
@ -412,22 +395,12 @@ function apply_user_presets() {
|
|||
if [ $SRS_ENABLE_ALL = YES ]; then
|
||||
SRS_HDS=YES
|
||||
SRS_NGINX=YES
|
||||
SRS_SSL=YES
|
||||
SRS_FFMPEG_TOOL=YES
|
||||
SRS_TRANSCODE=YES
|
||||
SRS_INGEST=YES
|
||||
SRS_STAT=YES
|
||||
SRS_STREAM_CASTER=YES
|
||||
SRS_KAFKA=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=YES
|
||||
SRS_UTEST=YES
|
||||
SRS_GPERF=NO
|
||||
SRS_GPERF_MC=NO
|
||||
SRS_GPERF_MD=NO
|
||||
SRS_GPERF_MP=NO
|
||||
SRS_GPERF_CP=NO
|
||||
SRS_GPROF=NO
|
||||
SRS_STATIC=NO
|
||||
fi
|
||||
|
||||
|
@ -435,22 +408,12 @@ function apply_user_presets() {
|
|||
if [ $SRS_FAST = YES ]; then
|
||||
SRS_HDS=NO
|
||||
SRS_NGINX=NO
|
||||
SRS_SSL=NO
|
||||
SRS_FFMPEG_TOOL=NO
|
||||
SRS_TRANSCODE=NO
|
||||
SRS_INGEST=NO
|
||||
SRS_STAT=NO
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=NO
|
||||
SRS_LIBRTMP=NO
|
||||
SRS_RESEARCH=NO
|
||||
SRS_UTEST=NO
|
||||
SRS_GPERF=NO
|
||||
SRS_GPERF_MC=NO
|
||||
SRS_GPERF_MD=NO
|
||||
SRS_GPERF_MP=NO
|
||||
SRS_GPERF_CP=NO
|
||||
SRS_GPROF=NO
|
||||
SRS_STATIC=NO
|
||||
fi
|
||||
|
||||
|
@ -458,22 +421,12 @@ function apply_user_presets() {
|
|||
if [ $SRS_PURE_RTMP = YES ]; then
|
||||
SRS_HDS=NO
|
||||
SRS_NGINX=NO
|
||||
SRS_SSL=YES
|
||||
SRS_FFMPEG_TOOL=NO
|
||||
SRS_TRANSCODE=NO
|
||||
SRS_INGEST=NO
|
||||
SRS_STAT=NO
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=NO
|
||||
SRS_LIBRTMP=NO
|
||||
SRS_RESEARCH=NO
|
||||
SRS_UTEST=NO
|
||||
SRS_GPERF=NO
|
||||
SRS_GPERF_MC=NO
|
||||
SRS_GPERF_MD=NO
|
||||
SRS_GPERF_MP=NO
|
||||
SRS_GPERF_CP=NO
|
||||
SRS_GPROF=NO
|
||||
SRS_STATIC=NO
|
||||
fi
|
||||
|
||||
|
@ -481,22 +434,12 @@ function apply_user_presets() {
|
|||
if [ $SRS_ARM_UBUNTU12 = YES ]; then
|
||||
SRS_HDS=YES
|
||||
SRS_NGINX=NO
|
||||
SRS_SSL=YES
|
||||
SRS_FFMPEG_TOOL=NO
|
||||
SRS_TRANSCODE=YES
|
||||
SRS_INGEST=YES
|
||||
SRS_STAT=YES
|
||||
SRS_STREAM_CASTER=YES
|
||||
SRS_KAFKA=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=NO
|
||||
SRS_UTEST=NO
|
||||
SRS_GPERF=NO
|
||||
SRS_GPERF_MC=NO
|
||||
SRS_GPERF_MD=NO
|
||||
SRS_GPERF_MP=NO
|
||||
SRS_GPERF_CP=NO
|
||||
SRS_GPROF=NO
|
||||
# TODO: FIXME: need static? maybe donot.
|
||||
SRS_STATIC=YES
|
||||
fi
|
||||
|
@ -505,22 +448,12 @@ function apply_user_presets() {
|
|||
if [ $SRS_MIPS_UBUNTU12 = YES ]; then
|
||||
SRS_HDS=YES
|
||||
SRS_NGINX=NO
|
||||
SRS_SSL=YES
|
||||
SRS_FFMPEG_TOOL=NO
|
||||
SRS_TRANSCODE=YES
|
||||
SRS_INGEST=YES
|
||||
SRS_STAT=YES
|
||||
SRS_STREAM_CASTER=YES
|
||||
SRS_KAFKA=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=NO
|
||||
SRS_UTEST=NO
|
||||
SRS_GPERF=NO
|
||||
SRS_GPERF_MC=NO
|
||||
SRS_GPERF_MD=NO
|
||||
SRS_GPERF_MP=NO
|
||||
SRS_GPERF_CP=NO
|
||||
SRS_GPROF=NO
|
||||
SRS_STATIC=NO
|
||||
fi
|
||||
|
||||
|
@ -528,22 +461,12 @@ function apply_user_presets() {
|
|||
if [ $SRS_X86_X64 = YES ]; then
|
||||
SRS_HDS=YES
|
||||
SRS_NGINX=NO
|
||||
SRS_SSL=YES
|
||||
SRS_FFMPEG_TOOL=NO
|
||||
SRS_TRANSCODE=YES
|
||||
SRS_INGEST=YES
|
||||
SRS_STAT=YES
|
||||
SRS_STREAM_CASTER=YES
|
||||
SRS_KAFKA=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=NO
|
||||
SRS_UTEST=YES
|
||||
SRS_GPERF=NO
|
||||
SRS_GPERF_MC=NO
|
||||
SRS_GPERF_MD=NO
|
||||
SRS_GPERF_MP=NO
|
||||
SRS_GPERF_CP=NO
|
||||
SRS_GPROF=NO
|
||||
SRS_STATIC=NO
|
||||
fi
|
||||
|
||||
|
@ -551,22 +474,12 @@ function apply_user_presets() {
|
|||
if [ $SRS_OSX = YES ]; then
|
||||
SRS_HDS=YES
|
||||
SRS_NGINX=NO
|
||||
SRS_SSL=YES
|
||||
SRS_FFMPEG_TOOL=NO
|
||||
SRS_TRANSCODE=YES
|
||||
SRS_INGEST=YES
|
||||
SRS_STAT=YES
|
||||
SRS_STREAM_CASTER=YES
|
||||
SRS_KAFKA=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=NO
|
||||
SRS_UTEST=YES
|
||||
SRS_GPERF=NO
|
||||
SRS_GPERF_MC=NO
|
||||
SRS_GPERF_MD=NO
|
||||
SRS_GPERF_MP=NO
|
||||
SRS_GPERF_CP=NO
|
||||
SRS_GPROF=NO
|
||||
SRS_STATIC=NO
|
||||
# valgrind is not supported by macOS sierra, read
|
||||
# https://stackoverflow.com/questions/40650338/valgrind-on-macos-sierra
|
||||
|
@ -577,22 +490,12 @@ function apply_user_presets() {
|
|||
if [ $SRS_DEV = YES ]; then
|
||||
SRS_HDS=YES
|
||||
SRS_NGINX=NO
|
||||
SRS_SSL=YES
|
||||
SRS_FFMPEG_TOOL=YES
|
||||
SRS_TRANSCODE=YES
|
||||
SRS_INGEST=YES
|
||||
SRS_STAT=YES
|
||||
SRS_STREAM_CASTER=YES
|
||||
SRS_KAFKA=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=YES
|
||||
SRS_UTEST=YES
|
||||
SRS_GPERF=NO
|
||||
SRS_GPERF_MC=NO
|
||||
SRS_GPERF_MD=NO
|
||||
SRS_GPERF_MP=NO
|
||||
SRS_GPERF_CP=NO
|
||||
SRS_GPROF=NO
|
||||
SRS_STATIC=NO
|
||||
fi
|
||||
|
||||
|
@ -600,22 +503,12 @@ function apply_user_presets() {
|
|||
if [ $SRS_FAST_DEV = YES ]; then
|
||||
SRS_HDS=YES
|
||||
SRS_NGINX=NO
|
||||
SRS_SSL=YES
|
||||
SRS_FFMPEG_TOOL=NO
|
||||
SRS_TRANSCODE=YES
|
||||
SRS_INGEST=YES
|
||||
SRS_STAT=YES
|
||||
SRS_STREAM_CASTER=YES
|
||||
SRS_KAFKA=YES
|
||||
SRS_LIBRTMP=NO
|
||||
SRS_RESEARCH=NO
|
||||
SRS_UTEST=NO
|
||||
SRS_GPERF=NO
|
||||
SRS_GPERF_MC=NO
|
||||
SRS_GPERF_MD=NO
|
||||
SRS_GPERF_MP=NO
|
||||
SRS_GPERF_CP=NO
|
||||
SRS_GPROF=NO
|
||||
SRS_STATIC=NO
|
||||
fi
|
||||
|
||||
|
@ -623,22 +516,12 @@ function apply_user_presets() {
|
|||
if [ $SRS_DEMO = YES ]; then
|
||||
SRS_HDS=YES
|
||||
SRS_NGINX=NO
|
||||
SRS_SSL=YES
|
||||
SRS_FFMPEG_TOOL=YES
|
||||
SRS_TRANSCODE=YES
|
||||
SRS_INGEST=YES
|
||||
SRS_STAT=YES
|
||||
SRS_STREAM_CASTER=YES
|
||||
SRS_KAFKA=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=NO
|
||||
SRS_UTEST=YES
|
||||
SRS_GPERF=NO
|
||||
SRS_GPERF_MC=NO
|
||||
SRS_GPERF_MD=NO
|
||||
SRS_GPERF_MP=NO
|
||||
SRS_GPERF_CP=NO
|
||||
SRS_GPROF=NO
|
||||
SRS_STATIC=NO
|
||||
fi
|
||||
|
||||
|
@ -646,22 +529,12 @@ function apply_user_presets() {
|
|||
if [ $SRS_PI = YES ]; then
|
||||
SRS_HDS=YES
|
||||
SRS_NGINX=NO
|
||||
SRS_SSL=YES
|
||||
SRS_FFMPEG_TOOL=NO
|
||||
SRS_TRANSCODE=YES
|
||||
SRS_INGEST=YES
|
||||
SRS_STAT=YES
|
||||
SRS_STREAM_CASTER=YES
|
||||
SRS_KAFKA=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=NO
|
||||
SRS_UTEST=NO
|
||||
SRS_GPERF=NO
|
||||
SRS_GPERF_MC=NO
|
||||
SRS_GPERF_MD=NO
|
||||
SRS_GPERF_MP=NO
|
||||
SRS_GPERF_CP=NO
|
||||
SRS_GPROF=NO
|
||||
SRS_STATIC=NO
|
||||
fi
|
||||
|
||||
|
@ -669,22 +542,12 @@ function apply_user_presets() {
|
|||
if [ $SRS_CUBIE = YES ]; then
|
||||
SRS_HDS=YES
|
||||
SRS_NGINX=NO
|
||||
SRS_SSL=YES
|
||||
SRS_FFMPEG_TOOL=YES
|
||||
SRS_TRANSCODE=YES
|
||||
SRS_INGEST=YES
|
||||
SRS_STAT=YES
|
||||
SRS_STREAM_CASTER=NO
|
||||
SRS_KAFKA=YES
|
||||
SRS_LIBRTMP=YES
|
||||
SRS_RESEARCH=NO
|
||||
SRS_UTEST=NO
|
||||
SRS_GPERF=NO
|
||||
SRS_GPERF_MC=NO
|
||||
SRS_GPERF_MD=NO
|
||||
SRS_GPERF_MP=NO
|
||||
SRS_GPERF_CP=NO
|
||||
SRS_GPROF=NO
|
||||
SRS_STATIC=NO
|
||||
fi
|
||||
}
|
||||
|
@ -707,6 +570,10 @@ function apply_user_detail_options() {
|
|||
|
||||
# Always enable HTTP utilies.
|
||||
if [ $SRS_HTTP_CORE = NO ]; then SRS_HTTP_CORE=YES; echo -e "${YELLOW}[WARN] Always enable HTTP utilies.${BLACK}"; fi
|
||||
if [ $SRS_INGEST = NO ]; then SRS_INGEST=YES; echo -e "${YELLOW}[WARN] Always enable Ingest.${BLACK}"; fi
|
||||
if [ $SRS_SSL = NO ]; then SRS_SSL=YES; echo -e "${YELLOW}[WARN] Always enable SSL.${BLACK}"; fi
|
||||
if [ $SRS_STAT = NO ]; then SRS_STAT=YES; echo -e "${YELLOW}[WARN] Always enable Statistic.${BLACK}"; fi
|
||||
if [ $SRS_TRANSCODE = NO ]; then SRS_TRANSCODE=YES; echo -e "${YELLOW}[WARN] Always enable Transcode.${BLACK}"; fi
|
||||
if [ $SRS_HTTP_CALLBACK = NO ]; then SRS_HTTP_CALLBACK=YES; echo -e "${YELLOW}[WARN] Always enable HTTP callback.${BLACK}"; fi
|
||||
if [ $SRS_HTTP_SERVER = NO ]; then SRS_HTTP_SERVER=YES; echo -e "${YELLOW}[WARN] Always enable HTTP server.${BLACK}"; fi
|
||||
if [ $SRS_HTTP_API = NO ]; then SRS_HTTP_API=YES; echo -e "${YELLOW}[WARN] Always enable HTTP API.${BLACK}"; fi
|
||||
|
@ -732,6 +599,7 @@ function apply_user_detail_options() {
|
|||
SRS_SSL=NO
|
||||
SRS_FFMPEG_TOOL=NO
|
||||
SRS_TRANSCODE=NO
|
||||
SRS_HTTP_CALLBACK=NO
|
||||
SRS_INGEST=NO
|
||||
SRS_STAT=NO
|
||||
SRS_STREAM_CASTER=NO
|
||||
|
|
28
trunk/configure
vendored
28
trunk/configure
vendored
|
@ -101,7 +101,9 @@ SrsGprof=""; SrsGprofLink=""; if [ $SRS_GPROF = YES ]; then SrsGprof=" -pg -lc_p
|
|||
SrsGperf=""; SrsGperfLink=""; if [ $SRS_GPERF = YES ]; then SrsGperfLink=" -lpthread"; fi
|
||||
# the cxx flag generated.
|
||||
CXXFLAGS="${CXXFLAGS} ${CppStd}${WarnLevel}${GDBDebug}${LibraryCompile}${SrsGprof}"
|
||||
if [ $SRS_GPERF = YES ]; then CXXFLAGS="${CXXFLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free"; fi
|
||||
if [ $SRS_GPERF = YES ]; then
|
||||
CXXFLAGS="${CXXFLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free";
|
||||
fi
|
||||
# Start to generate the Makefile.
|
||||
cat << END > ${SRS_OBJS}/${SRS_MAKEFILE}
|
||||
GCC = gcc
|
||||
|
@ -126,19 +128,31 @@ END
|
|||
LibSTRoot="${SRS_OBJS_DIR}/st"; LibSTfile="${LibSTRoot}/libst.a"
|
||||
# openssl-1.1.0e, for the RTMP complex handshake.
|
||||
LibSSLRoot="";LibSSLfile=""
|
||||
if [ $SRS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = NO ]; then LibSSLRoot="${SRS_OBJS_DIR}/openssl/include"; LibSSLfile="${SRS_OBJS_DIR}/openssl/lib/libssl.a ${SRS_OBJS_DIR}/openssl/lib/libcrypto.a"; fi fi
|
||||
if [[ $SRS_SSL == YES && $SRS_USE_SYS_SSL == NO ]]; then
|
||||
LibSSLRoot="${SRS_OBJS_DIR}/openssl/include"; LibSSLfile="${SRS_OBJS_DIR}/openssl/lib/libssl.a ${SRS_OBJS_DIR}/openssl/lib/libcrypto.a";
|
||||
fi
|
||||
# gperftools-2.1, for mem check and mem/cpu profile
|
||||
LibGperfRoot=""; LibGperfFile=""
|
||||
if [ $SRS_GPERF = YES ]; then LibGperfRoot="${SRS_OBJS_DIR}/gperf/include"; LibGperfFile="${SRS_OBJS_DIR}/gperf/lib/libtcmalloc_and_profiler.a"; fi
|
||||
if [ $SRS_GPERF_MD = YES ]; then LibGperfFile="${SRS_OBJS_DIR}/gperf/lib/libtcmalloc_debug.a"; fi
|
||||
if [ $SRS_GPERF = YES ]; then
|
||||
LibGperfRoot="${SRS_OBJS_DIR}/gperf/include"; LibGperfFile="${SRS_OBJS_DIR}/gperf/lib/libtcmalloc_and_profiler.a";
|
||||
fi
|
||||
if [ $SRS_GPERF_MD = YES ]; then
|
||||
LibGperfFile="${SRS_OBJS_DIR}/gperf/lib/libtcmalloc_debug.a";
|
||||
fi
|
||||
# the link options, always use static link
|
||||
SrsLinkOptions="-ldl";
|
||||
if [ $SRS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = YES ]; then SrsLinkOptions="${SrsLinkOptions} -lssl -lcrypto"; fi fi
|
||||
if [[ $SRS_SSL == YES && $SRS_USE_SYS_SSL == YES ]]; then
|
||||
SrsLinkOptions="${SrsLinkOptions} -lssl -lcrypto";
|
||||
fi
|
||||
# if static specified, add static
|
||||
# TODO: FIXME: remove static.
|
||||
if [ $SRS_STATIC = YES ]; then SrsLinkOptions="${SrsLinkOptions} -static"; fi
|
||||
if [ $SRS_STATIC = YES ]; then
|
||||
SrsLinkOptions="${SrsLinkOptions} -static";
|
||||
fi
|
||||
# if mips, add -lgcc_eh, or stl compile failed.
|
||||
if [ $SRS_MIPS_UBUNTU12 = YES ]; then SrsLinkOptions="${SrsLinkOptions} -lgcc_eh"; fi
|
||||
if [ $SRS_MIPS_UBUNTU12 = YES ]; then
|
||||
SrsLinkOptions="${SrsLinkOptions} -lgcc_eh";
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
# Modules, compile each module, then link to binary
|
||||
|
|
|
@ -3895,21 +3895,6 @@ srs_error_t SrsConfig::check_normal_config()
|
|||
if (get_hls_enabled(vhost->arg0())) {
|
||||
srs_warn("can't enable vhost.hls of %s", vhost->arg0().c_str());
|
||||
}
|
||||
#ifndef SRS_AUTO_TRANSCODE
|
||||
if (get_transcode_enabled(get_transcode(vhost->arg0(), ""))) {
|
||||
srs_warn("can't enable vhost.transcode of %s", vhost->arg0().c_str());
|
||||
}
|
||||
#endif
|
||||
#ifndef SRS_AUTO_INGEST
|
||||
vector<SrsConfDirective*> ingesters = get_ingesters(vhost->arg0());
|
||||
for (int j = 0; j < (int)ingesters.size(); j++) {
|
||||
SrsConfDirective* ingest = ingesters[j];
|
||||
if (get_ingest_enabled(ingest)) {
|
||||
srs_warn("cant' enable vhost.ingest.%s of %s",
|
||||
ingest->arg0().c_str(), vhost->arg0().c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// TODO: FIXME: required http server when hls storage is ram or both.
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,6 @@ using namespace std;
|
|||
#include <srs_app_ffmpeg.hpp>
|
||||
#include <srs_kernel_utility.hpp>
|
||||
|
||||
#ifdef SRS_AUTO_TRANSCODE
|
||||
|
||||
// for encoder to detect the dead loop
|
||||
static std::vector<std::string> _transcoded_url;
|
||||
|
||||
|
@ -334,6 +332,3 @@ void SrsEncoder::show_encode_log_message()
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
|
||||
#include <srs_core.hpp>
|
||||
|
||||
#ifdef SRS_AUTO_TRANSCODE
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -72,5 +70,3 @@ private:
|
|||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -51,10 +51,7 @@ using namespace std;
|
|||
#include <srs_app_utility.hpp>
|
||||
#include <srs_app_http_hooks.hpp>
|
||||
#include <srs_protocol_format.hpp>
|
||||
|
||||
#ifdef SRS_AUTO_SSL
|
||||
#include <openssl/rand.h>
|
||||
#endif
|
||||
|
||||
// drop the segment when duration of ts too small.
|
||||
#define SRS_AUTO_HLS_SEGMENT_MIN_DURATION_MS 100
|
||||
|
@ -80,10 +77,8 @@ void SrsHlsSegment::config_cipher(unsigned char* key,unsigned char* iv)
|
|||
{
|
||||
memcpy(this->iv, iv,16);
|
||||
|
||||
#ifdef SRS_AUTO_SSL
|
||||
SrsEncFileWriter* fw = (SrsEncFileWriter*)writer;
|
||||
fw->config_cipher(key, iv);
|
||||
#endif
|
||||
}
|
||||
|
||||
SrsDvrAsyncCallOnHls::SrsDvrAsyncCallOnHls(int c, SrsRequest* r, string p, string t, string m, string mu, int s, double d)
|
||||
|
@ -334,11 +329,7 @@ srs_error_t SrsHlsMuxer::update_config(SrsRequest* r, string entry_prefix,
|
|||
}
|
||||
|
||||
if(hls_keys) {
|
||||
#ifdef SRS_AUTO_SSL
|
||||
writer = new SrsEncFileWriter();
|
||||
#else
|
||||
writer = new SrsFileWriter();
|
||||
#endif
|
||||
} else {
|
||||
writer = new SrsFileWriter();
|
||||
}
|
||||
|
@ -656,13 +647,6 @@ srs_error_t SrsHlsMuxer::write_hls_key()
|
|||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
#ifndef SRS_AUTO_SSL
|
||||
if (hls_keys) {
|
||||
srs_warn("SSL is disabled, ignore HLS key");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SRS_AUTO_SSL
|
||||
if (hls_keys && current->sequence_no % hls_fragments_per_key == 0) {
|
||||
if (RAND_bytes(key, 16) < 0) {
|
||||
return srs_error_wrap(err, "rand key failed.");
|
||||
|
@ -691,7 +675,6 @@ srs_error_t SrsHlsMuxer::write_hls_key()
|
|||
if (hls_keys) {
|
||||
current->config_cipher(key, iv);
|
||||
}
|
||||
#endif
|
||||
|
||||
return err;
|
||||
}
|
||||
|
@ -774,8 +757,7 @@ srs_error_t SrsHlsMuxer::_refresh_m3u8(string m3u8_file)
|
|||
// #EXT-X-DISCONTINUITY\n
|
||||
ss << "#EXT-X-DISCONTINUITY" << SRS_CONSTS_LF;
|
||||
}
|
||||
|
||||
#ifdef SRS_AUTO_SSL
|
||||
|
||||
if(hls_keys && ((segment->sequence_no % hls_fragments_per_key) == 0)) {
|
||||
char hexiv[33];
|
||||
srs_data_to_hex(hexiv, segment->iv, 16);
|
||||
|
@ -792,7 +774,6 @@ srs_error_t SrsHlsMuxer::_refresh_m3u8(string m3u8_file)
|
|||
|
||||
ss << "#EXT-X-KEY:METHOD=AES-128,URI=" << "\"" << key_path << "\",IV=0x" << hexiv << SRS_CONSTS_LF;
|
||||
}
|
||||
#endif
|
||||
|
||||
// "#EXTINF:4294967295.208,\n"
|
||||
ss.precision(3);
|
||||
|
|
|
@ -588,11 +588,7 @@ srs_error_t SrsGoApiFeatures::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMess
|
|||
SrsJsonObject* features = SrsJsonAny::object();
|
||||
data->set("features", features);
|
||||
|
||||
#ifdef SRS_AUTO_SSL
|
||||
features->set("ssl", SrsJsonAny::boolean(true));
|
||||
#else
|
||||
features->set("ssl", SrsJsonAny::boolean(false));
|
||||
#endif
|
||||
features->set("hls", SrsJsonAny::boolean(true));
|
||||
#ifdef SRS_AUTO_HDS
|
||||
features->set("hds", SrsJsonAny::boolean(true));
|
||||
|
@ -603,21 +599,9 @@ srs_error_t SrsGoApiFeatures::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMess
|
|||
features->set("api", SrsJsonAny::boolean(true));
|
||||
features->set("httpd", SrsJsonAny::boolean(true));
|
||||
features->set("dvr", SrsJsonAny::boolean(true));
|
||||
#ifdef SRS_AUTO_TRANSCODE
|
||||
features->set("transcode", SrsJsonAny::boolean(true));
|
||||
#else
|
||||
features->set("transcode", SrsJsonAny::boolean(false));
|
||||
#endif
|
||||
#ifdef SRS_AUTO_INGEST
|
||||
features->set("ingest", SrsJsonAny::boolean(true));
|
||||
#else
|
||||
features->set("ingest", SrsJsonAny::boolean(false));
|
||||
#endif
|
||||
#ifdef SRS_AUTO_STAT
|
||||
features->set("stat", SrsJsonAny::boolean(true));
|
||||
#else
|
||||
features->set("stat", SrsJsonAny::boolean(false));
|
||||
#endif
|
||||
#ifdef SRS_AUTO_NGINX
|
||||
features->set("nginx", SrsJsonAny::boolean(true));
|
||||
#else
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
#include <srs_app_ingest.hpp>
|
||||
|
||||
#ifdef SRS_AUTO_INGEST
|
||||
|
||||
#include <stdlib.h>
|
||||
using namespace std;
|
||||
|
||||
|
@ -570,5 +568,3 @@ srs_error_t SrsIngester::on_reload_listen()
|
|||
return srs_success;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
|
||||
#include <srs_core.hpp>
|
||||
|
||||
#ifdef SRS_AUTO_INGEST
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <srs_app_thread.hpp>
|
||||
|
@ -115,5 +113,4 @@ public:
|
|||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -485,10 +485,7 @@ SrsServer::SrsServer()
|
|||
http_api_mux = new SrsHttpServeMux();
|
||||
http_server = new SrsHttpServer(this);
|
||||
http_heartbeat = new SrsHttpHeartbeat();
|
||||
|
||||
#ifdef SRS_AUTO_INGEST
|
||||
ingester = new SrsIngester();
|
||||
#endif
|
||||
}
|
||||
|
||||
SrsServer::~SrsServer()
|
||||
|
@ -505,10 +502,7 @@ void SrsServer::destroy()
|
|||
srs_freep(http_api_mux);
|
||||
srs_freep(http_server);
|
||||
srs_freep(http_heartbeat);
|
||||
|
||||
#ifdef SRS_AUTO_INGEST
|
||||
srs_freep(ingester);
|
||||
#endif
|
||||
|
||||
if (pid_fd > 0) {
|
||||
::close(pid_fd);
|
||||
|
@ -810,11 +804,9 @@ srs_error_t SrsServer::ingest()
|
|||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
#ifdef SRS_AUTO_INGEST
|
||||
if ((err = ingester->start()) != srs_success) {
|
||||
return srs_error_wrap(err, "ingest start");
|
||||
}
|
||||
#endif
|
||||
|
||||
return err;
|
||||
}
|
||||
|
@ -903,7 +895,6 @@ srs_error_t SrsServer::do_cycle()
|
|||
// find the max loop
|
||||
int max = srs_max(0, SRS_SYS_TIME_RESOLUTION_MS_TIMES);
|
||||
|
||||
#ifdef SRS_AUTO_STAT
|
||||
max = srs_max(max, SRS_SYS_RUSAGE_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_CPU_STAT_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_DISK_STAT_RESOLUTION_TIMES);
|
||||
|
@ -911,7 +902,6 @@ srs_error_t SrsServer::do_cycle()
|
|||
max = srs_max(max, SRS_SYS_PLATFORM_INFO_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_NETWORK_DEVICE_RESOLUTION_TIMES);
|
||||
max = srs_max(max, SRS_SYS_NETWORK_RTMP_SERVER_RESOLUTION_TIMES);
|
||||
#endif
|
||||
|
||||
// for asprocess.
|
||||
bool asprocess = _srs_config->get_asprocess();
|
||||
|
@ -988,7 +978,6 @@ srs_error_t SrsServer::do_cycle()
|
|||
srs_update_system_time_ms();
|
||||
}
|
||||
|
||||
#ifdef SRS_AUTO_STAT
|
||||
if ((i % SRS_SYS_RUSAGE_RESOLUTION_TIMES) == 0) {
|
||||
srs_info("update resource info, rss.");
|
||||
srs_update_system_rusage();
|
||||
|
@ -1023,7 +1012,6 @@ srs_error_t SrsServer::do_cycle()
|
|||
http_heartbeat->heartbeat();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
srs_info("server main thread loop");
|
||||
}
|
||||
|
|
|
@ -243,9 +243,7 @@ private:
|
|||
SrsHttpServeMux* http_api_mux;
|
||||
SrsHttpServer* http_server;
|
||||
SrsHttpHeartbeat* http_heartbeat;
|
||||
#ifdef SRS_AUTO_INGEST
|
||||
SrsIngester* ingester;
|
||||
#endif
|
||||
SrsCoroutineManager* conn_manager;
|
||||
private:
|
||||
/**
|
||||
|
|
|
@ -824,9 +824,7 @@ SrsOriginHub::SrsOriginHub()
|
|||
hls = new SrsHls();
|
||||
dash = new SrsDash();
|
||||
dvr = new SrsDvr();
|
||||
#ifdef SRS_AUTO_TRANSCODE
|
||||
encoder = new SrsEncoder();
|
||||
#endif
|
||||
#ifdef SRS_AUTO_HDS
|
||||
hds = new SrsHds();
|
||||
#endif
|
||||
|
@ -854,9 +852,7 @@ SrsOriginHub::~SrsOriginHub()
|
|||
srs_freep(hls);
|
||||
srs_freep(dash);
|
||||
srs_freep(dvr);
|
||||
#ifdef SRS_AUTO_TRANSCODE
|
||||
srs_freep(encoder);
|
||||
#endif
|
||||
#ifdef SRS_AUTO_HDS
|
||||
srs_freep(hds);
|
||||
#endif
|
||||
|
@ -1116,11 +1112,9 @@ srs_error_t SrsOriginHub::on_publish()
|
|||
}
|
||||
|
||||
// TODO: FIXME: use initialize to set req.
|
||||
#ifdef SRS_AUTO_TRANSCODE
|
||||
if ((err = encoder->on_publish(req)) != srs_success) {
|
||||
return srs_error_wrap(err, "encoder publish");
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((err = hls->on_publish()) != srs_success) {
|
||||
return srs_error_wrap(err, "hls publish");
|
||||
|
@ -1158,10 +1152,7 @@ void SrsOriginHub::on_unpublish()
|
|||
// destroy all forwarders
|
||||
destroy_forwarders();
|
||||
|
||||
#ifdef SRS_AUTO_TRANSCODE
|
||||
encoder->on_unpublish();
|
||||
#endif
|
||||
|
||||
hls->on_unpublish();
|
||||
dash->on_unpublish();
|
||||
dvr->on_unpublish();
|
||||
|
@ -1419,7 +1410,6 @@ srs_error_t SrsOriginHub::on_reload_vhost_transcode(string vhost)
|
|||
|
||||
// TODO: FIXME: maybe should ignore when publish already stopped?
|
||||
|
||||
#ifdef SRS_AUTO_TRANSCODE
|
||||
encoder->on_unpublish();
|
||||
|
||||
// Don't start transcode when source is not active.
|
||||
|
@ -1431,7 +1421,6 @@ srs_error_t SrsOriginHub::on_reload_vhost_transcode(string vhost)
|
|||
return srs_error_wrap(err, "start encoder failed");
|
||||
}
|
||||
srs_trace("vhost %s transcode reload success", vhost.c_str());
|
||||
#endif
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -55,9 +55,7 @@ class SrsMessageHeader;
|
|||
class SrsHls;
|
||||
class SrsDvr;
|
||||
class SrsDash;
|
||||
#ifdef SRS_AUTO_TRANSCODE
|
||||
class SrsEncoder;
|
||||
#endif
|
||||
class SrsBuffer;
|
||||
#ifdef SRS_AUTO_HDS
|
||||
class SrsHds;
|
||||
|
@ -428,9 +426,7 @@ private:
|
|||
// dvr handler.
|
||||
SrsDvr* dvr;
|
||||
// transcoding handler.
|
||||
#ifdef SRS_AUTO_TRANSCODE
|
||||
SrsEncoder* encoder;
|
||||
#endif
|
||||
#ifdef SRS_AUTO_HDS
|
||||
// adobe hds(http dynamic streaming).
|
||||
SrsHds *hds;
|
||||
|
|
|
@ -34,11 +34,8 @@
|
|||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#ifdef SRS_AUTO_SSL
|
||||
#include <openssl/aes.h>
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
#include <srs_kernel_log.hpp>
|
||||
#include <srs_kernel_error.hpp>
|
||||
#include <srs_kernel_codec.hpp>
|
||||
|
@ -2616,7 +2613,6 @@ SrsVideoCodecId SrsTsContextWriter::video_codec()
|
|||
return vcodec;
|
||||
}
|
||||
|
||||
#ifdef SRS_AUTO_SSL
|
||||
SrsEncFileWriter::SrsEncFileWriter()
|
||||
{
|
||||
memset(iv,0,16);
|
||||
|
@ -2703,7 +2699,6 @@ void SrsEncFileWriter::close()
|
|||
|
||||
SrsFileWriter::close();
|
||||
}
|
||||
#endif
|
||||
|
||||
SrsTsMessageCache::SrsTsMessageCache()
|
||||
{
|
||||
|
|
|
@ -1572,7 +1572,6 @@ public:
|
|||
virtual SrsVideoCodecId video_codec();
|
||||
};
|
||||
|
||||
#ifdef SRS_AUTO_SSL
|
||||
/*
|
||||
* Used for HLS Encryption
|
||||
*/
|
||||
|
@ -1593,7 +1592,6 @@ private:
|
|||
char* buf;
|
||||
int nb_buf;
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* TS messages cache, to group frames to TS message,
|
||||
|
|
|
@ -653,10 +653,6 @@ int srs_rtmp_connect_server(srs_rtmp_t rtmp)
|
|||
|
||||
int srs_rtmp_do_complex_handshake(srs_rtmp_t rtmp)
|
||||
{
|
||||
#ifndef SRS_AUTO_SSL
|
||||
// complex handshake requires ssl
|
||||
return ERROR_RTMP_HS_SSL_REQUIRE;
|
||||
#else
|
||||
int ret = ERROR_SUCCESS;
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
|
@ -676,7 +672,6 @@ int srs_rtmp_do_complex_handshake(srs_rtmp_t rtmp)
|
|||
}
|
||||
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
int srs_rtmp_do_simple_handshake(srs_rtmp_t rtmp)
|
||||
|
|
|
@ -212,9 +212,9 @@ void show_macro_features()
|
|||
ss << "features";
|
||||
|
||||
// rch(rtmp complex handshake)
|
||||
ss << ", rch:" << srs_bool2switch(SRS_AUTO_SSL_BOOL);
|
||||
ss << ", rch:" << srs_bool2switch(true);
|
||||
ss << ", dash:" << "on";
|
||||
ss << ", hls:" << srs_bool2switch(SRS_AUTO_HLS_BOOL);
|
||||
ss << ", hls:" << srs_bool2switch(true);
|
||||
ss << ", hds:" << srs_bool2switch(SRS_AUTO_HDS_BOOL);
|
||||
// hc(http callback)
|
||||
ss << ", hc:" << srs_bool2switch(true);
|
||||
|
@ -224,13 +224,13 @@ void show_macro_features()
|
|||
ss << ", hs:" << srs_bool2switch(true);
|
||||
// hp(http parser)
|
||||
ss << ", hp:" << srs_bool2switch(true);
|
||||
ss << ", dvr:" << srs_bool2switch(SRS_AUTO_DVR_BOOL);
|
||||
ss << ", dvr:" << srs_bool2switch(true);
|
||||
// trans(transcode)
|
||||
ss << ", trans:" << srs_bool2switch(SRS_AUTO_TRANSCODE_BOOL);
|
||||
ss << ", trans:" << srs_bool2switch(true);
|
||||
// inge(ingest)
|
||||
ss << ", inge:" << srs_bool2switch(SRS_AUTO_INGEST_BOOL);
|
||||
ss << ", inge:" << srs_bool2switch(true);
|
||||
ss << ", kafka:" << srs_bool2switch(SRS_AUTO_KAFKA_BOOL);
|
||||
ss << ", stat:" << srs_bool2switch(SRS_AUTO_STAT_BOOL);
|
||||
ss << ", stat:" << srs_bool2switch(true);
|
||||
ss << ", nginx:" << srs_bool2switch(SRS_AUTO_NGINX_BOOL);
|
||||
// ff(ffmpeg)
|
||||
ss << ", ff:" << srs_bool2switch(SRS_AUTO_FFMPEG_TOOL_BOOL);
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
#include <srs_kernel_buffer.hpp>
|
||||
#include <srs_kernel_utility.hpp>
|
||||
|
||||
#ifdef SRS_AUTO_SSL
|
||||
|
||||
using namespace _srs_internal;
|
||||
|
||||
// for openssl_HMACsha256
|
||||
|
@ -1084,8 +1082,6 @@ namespace _srs_internal
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SrsSimpleHandshake::SrsSimpleHandshake()
|
||||
{
|
||||
}
|
||||
|
@ -1175,13 +1171,6 @@ SrsComplexHandshake::~SrsComplexHandshake()
|
|||
{
|
||||
}
|
||||
|
||||
#ifndef SRS_AUTO_SSL
|
||||
srs_error_t SrsComplexHandshake::handshake_with_client(SrsHandshakeBytes* /*hs_bytes*/, ISrsProtocolReaderWriter* /*io*/)
|
||||
{
|
||||
srs_trace("directly use simple handshake for ssl disabled.");
|
||||
return srs_error_new(ERROR_RTMP_TRY_SIMPLE_HS, "try simple handshake");
|
||||
}
|
||||
#else
|
||||
srs_error_t SrsComplexHandshake::handshake_with_client(SrsHandshakeBytes* hs_bytes, ISrsProtocolReaderWriter* io)
|
||||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
@ -1265,14 +1254,7 @@ srs_error_t SrsComplexHandshake::handshake_with_client(SrsHandshakeBytes* hs_byt
|
|||
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef SRS_AUTO_SSL
|
||||
srs_error_t SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* /*hs_bytes*/, ISrsProtocolReaderWriter* /*io*/)
|
||||
{
|
||||
return srs_error_new(ERROR_RTMP_TRY_SIMPLE_HS, "try simple handshake");
|
||||
}
|
||||
#else
|
||||
srs_error_t SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrsProtocolReaderWriter* io)
|
||||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
@ -1346,6 +1328,4 @@ srs_error_t SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_byt
|
|||
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -31,15 +31,13 @@ class SrsComplexHandshake;
|
|||
class SrsHandshakeBytes;
|
||||
class SrsBuffer;
|
||||
|
||||
#ifdef SRS_AUTO_SSL
|
||||
|
||||
// for openssl.
|
||||
#include <openssl/hmac.h>
|
||||
|
||||
namespace _srs_internal
|
||||
{
|
||||
// the digest key generate size.
|
||||
#define SRS_OpensslHashSize 512
|
||||
#define SRS_OpensslHashSize 512
|
||||
extern uint8_t SrsGenuineFMSKey[];
|
||||
extern uint8_t SrsGenuineFPKey[];
|
||||
srs_error_t openssl_HMACsha256(const void* key, int key_size, const void* data, int data_size, void* digest);
|
||||
|
@ -499,8 +497,6 @@ namespace _srs_internal
|
|||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* simple handshake.
|
||||
* user can try complex handshake first,
|
||||
|
|
|
@ -214,8 +214,6 @@ srs_error_t MockBufferIO::read(void* buf, size_t size, ssize_t* nread)
|
|||
|
||||
#ifdef ENABLE_UTEST_PROTOCOL
|
||||
|
||||
#ifdef SRS_AUTO_SSL
|
||||
|
||||
// verify the sha256
|
||||
VOID TEST(ProtocolHandshakeTest, OpensslSha256)
|
||||
{
|
||||
|
@ -379,8 +377,6 @@ VOID TEST(ProtocolHandshakeTest, ComplexHandshake)
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
VOID TEST(ProtocolHandshakeTest, SimpleHandshake)
|
||||
{
|
||||
uint8_t c0c1[] = {
|
||||
|
|
|
@ -36,9 +36,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include <srs_rtmp_handshake.hpp>
|
||||
#include <srs_protocol_stream.hpp>
|
||||
|
||||
#ifdef SRS_AUTO_SSL
|
||||
using namespace _srs_internal;
|
||||
#endif
|
||||
|
||||
#include <srs_protocol_io.hpp>
|
||||
|
||||
|
|
Loading…
Reference in a new issue