add option bwtc, to enable or disable the bandwidth test tool

pull/133/head
winlin 11 years ago
parent 0a2b8b797d
commit 1892245db6

@ -16,6 +16,7 @@ SRS_SSL=RESERVED
SRS_FFMPEG=RESERVED
SRS_HTTP=RESERVED
SRS_LIBRTMP=RESERVED # srs-librtmp
SRS_BWTC=RESERVED # srs-bandwidth-test client
SRS_RESEARCH=RESERVED
SRS_UTEST=RESERVED
SRS_GPERF=RESERVED # tcmalloc
@ -32,6 +33,7 @@ SRS_SSL=YES
SRS_FFMPEG=YES
SRS_HTTP=YES
SRS_LIBRTMP=YES
SRS_BWTC=YES
SRS_RESEARCH=NO
SRS_UTEST=YES
SRS_GPERF=NO
@ -65,6 +67,7 @@ do
--with-ffmpeg) SRS_FFMPEG=YES ;;
--with-http) SRS_HTTP=YES ;;
--with-librtmp) SRS_LIBRTMP=YES ;;
--with-bwtc) SRS_BWTC=YES ;;
--with-research) SRS_RESEARCH=YES ;;
--with-utest) SRS_UTEST=YES ;;
--with-gperf) SRS_GPERF=YES ;;
@ -78,6 +81,7 @@ do
--without-ffmpeg) SRS_FFMPEG=NO ;;
--without-http) SRS_HTTP=NO ;;
--without-librtmp) SRS_LIBRTMP=NO ;;
--without-bwtc) SRS_BWTC=NO ;;
--without-research) SRS_RESEARCH=NO ;;
--without-utest) SRS_UTEST=NO ;;
--without-gperf) SRS_GPERF=NO ;;
@ -120,6 +124,7 @@ if [ $help = yes ]; then
srs will call the http hooks, such as: on_connect.
--with-ffmpeg enable transcoding with ffmpeg.
--with-librtmp enable srs-librtmp, library for client.
--with-bwtc enable srs bandwidth test client tool.
--with-research build the research tools.
--with-utest build the utest for srs.
--with-gperf build srs with gperf tools(no gmc/gmp/gcp, with tcmalloc only).
@ -133,6 +138,7 @@ if [ $help = yes ]; then
--without-http disable http, http hooks callback.
--without-ffmpeg disable the ffmpeg transcoding feature.
--without-librtmp disable srs-librtmp, library for client.
--without-bwtc disable srs bandwidth test client tool.
--without-research do not build the research tools.
--without-utest do not build the utest for srs.
--without-gperf do not build srs with gperf tools(without tcmalloc and gmc/gmp/gcp).
@ -240,6 +246,10 @@ if [ $SRS_LIBRTMP = RESERVED ]; then
echo "you must specifies the librtmp, see: ./configure --help";
__check_ok=NO
fi
if [ $SRS_BWTC = RESERVED ]; then
echo "you must specifies the bwtc, see: ./configure --help";
__check_ok=NO
fi
if [ $__check_ok = NO ]; then
exit 1;
fi

26
trunk/configure vendored

@ -64,6 +64,7 @@ SrsFfmpegSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_FFMPEG = YES ]; then Sr
SrsHttpSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_HTTP = YES ]; then SrsHttpSummaryColor="\$(GREEN)"; fi
SrsLibrtmpSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_LIBRTMP = YES ]; then SrsLibrtmpSummaryColor="\$(GREEN)"; fi
SrsLibrtmpSSLSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_LIBRTMP = YES ]; then if [ $SRS_SSL = YES ]; then SrsLibrtmpSSLSummaryColor="\$(GREEN)"; fi fi
SrsBWTCSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_BWTC = YES ]; then SrsBWTCSummaryColor="\$(GREEN)"; fi
SrsResearchSummaryColor="\$(GREEN)(disabled) "; if [ $SRS_RESEARCH = YES ]; then SrsResearchSummaryColor="\$(GREEN)"; fi
SrsUtestSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_UTEST = YES ]; then SrsUtestSummaryColor="\$(GREEN)"; fi
SrsGperfSummaryColor="\$(GREEN)(disabled) "; if [ $SRS_GPERF = YES ]; then SrsGperfSummaryColor="\$(GREEN)"; fi
@ -113,7 +114,7 @@ default: bandwidth librtmp-sample utest
@echo -e " \$(BLACK)+------------------------------------------------------------------------------------\$(BLACK)"
@echo -e " |${SrsUtestSummaryColor}utest: ./objs/srs_utest, the utest for srs\$(BLACK)"
@echo -e " \$(BLACK)+------------------------------------------------------------------------------------\$(BLACK)"
@echo -e " |\$(GREEN)bandwidth: ./objs/bandwidth, the bandwidth test client\$(BLACK)"
@echo -e " |${SrsBWTCSummaryColor}bandwidth: ./objs/bandwidth, the bandwidth test client\$(BLACK)"
@echo -e " \$(BLACK)+------------------------------------------------------------------------------------\$(BLACK)"
@echo -e " |${SrsLibrtmpSummaryColor}librtmp @see: https://github.com/winlinvip/simple-rtmp-server/wiki/SrsLibrtmp\$(BLACK)"
@echo -e " |${SrsLibrtmpSummaryColor}librtmp: ./objs/include, ./objs/lib, the srs-librtmp library\$(BLACK)"
@ -153,11 +154,22 @@ server: _prepare_dir
@echo "build the srs(simple rtmp server) over st(state-threads)"
\$(MAKE) -f ${SRS_OBJS}/${SRS_MAKEFILE} srs
END
if [ $SRS_BWTC = YES ]; then
cat << END >> ${SRS_MAKEFILE}
bandwidth: server
@echo "build the bandwidth test client tool"
\$(MAKE) -f ${SRS_OBJS}/${SRS_MAKEFILE} bandwidth
END
else
cat << END >> ${SRS_MAKEFILE}
bandwidth: server
@echo "bandwidth test client tool is disabled, ignore."
END
fi
if [ $SRS_LIBRTMP = YES ]; then
cat << END >> ${SRS_MAKEFILE}
@ -324,9 +336,10 @@ LINK_OPTIONS="-ldl${SrsGprofLink}${SrsGperfLink}"
# srs(simple rtmp server) over st(state-threads)
BUILD_KEY="srs" APP_MAIN="srs_main_server" APP_NAME="srs" . auto/apps.sh
#
# bandwidth
# bandwidth test tool, to test the bandwidth to server
BUILD_KEY="bandwidth" APP_MAIN="srs_main_bandcheck" APP_NAME="bandwidth" . auto/apps.sh
if [ $SRS_BWTC = YES ]; then
# bandwidth test tool, to test the bandwidth to server
BUILD_KEY="bandwidth" APP_MAIN="srs_main_bandcheck" APP_NAME="bandwidth" . auto/apps.sh
fi
#
if [ $SRS_LIBRTMP = YES ]; then
# srs librtmp
@ -381,6 +394,11 @@ if [ $SRS_LIBRTMP = YES ]; then
else
echo -e "${YELLOW}note: srs-librtmp for client is disabled${BLACK}"
fi
if [ $SRS_BWTC = YES ]; then
echo -e "${GREEN}srs bandwidth test client is enabled${BLACK}"
else
echo -e "${YELLOW}note: srs bandwidth test client is disabled${BLACK}"
fi
if [ $SRS_RESEARCH = YES ]; then
echo -e "${GREEN}research tools are builded${BLACK}"
else

Loading…
Cancel
Save