diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index a6436535c..00d95d407 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -121,6 +121,7 @@ Options: --with-librtmp enable srs-librtmp, library for client. --with-research build the research tools. --with-utest build the utest for SRS. + --with-srt build the srt for SRS. --with-gperf build SRS with gperf tools(no gmd/gmc/gmp/gcp, with tcmalloc only). --with-gmc build memory check for SRS with gperf tools. --with-gmd build memory defense(corrupt memory) for SRS with gperf tools. @@ -141,6 +142,7 @@ Options: --without-librtmp disable srs-librtmp, library for client. --without-research do not build the research tools. --without-utest do not build the utest for SRS. + --without-srt do not build the srt for SRS. --without-gperf do not build SRS with gperf tools(without tcmalloc and gmd/gmc/gmp/gcp). --without-gmc do not build memory check for SRS with gperf tools. --without-gmd do not build memory defense for SRS with gperf tools. @@ -231,6 +233,7 @@ function parse_user_option() { --with-librtmp) SRS_LIBRTMP=YES ;; --with-research) SRS_RESEARCH=YES ;; --with-utest) SRS_UTEST=YES ;; + --with-srt) SRS_SRT=YES ;; --with-gperf) SRS_GPERF=YES ;; --with-gmc) SRS_GPERF_MC=YES ;; --with-gmd) SRS_GPERF_MD=YES ;; @@ -251,6 +254,7 @@ function parse_user_option() { --without-librtmp) SRS_LIBRTMP=NO ;; --without-research) SRS_RESEARCH=NO ;; --without-utest) SRS_UTEST=NO ;; + --without-srt) SRS_SRT=NO ;; --without-gperf) SRS_GPERF=NO ;; --without-gmc) SRS_GPERF_MC=NO ;; --without-gmd) SRS_GPERF_MD=NO ;; @@ -536,6 +540,7 @@ SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}" if [ $SRS_LIBRTMP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-librtmp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-librtmp"; fi if [ $SRS_RESEARCH = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-research"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-research"; fi if [ $SRS_UTEST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-utest"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-utest"; fi + if [ $SRS_SRT = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-srt"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-srt"; fi if [ $SRS_GPERF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gperf"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gperf"; fi if [ $SRS_GPERF_MC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gmc"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gmc"; fi if [ $SRS_GPERF_MD = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gmd"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gmd"; fi diff --git a/trunk/conf/srt.conf b/trunk/conf/srt.conf index 7f101b3d0..35614f2aa 100644 --- a/trunk/conf/srt.conf +++ b/trunk/conf/srt.conf @@ -28,9 +28,15 @@ vhost __defaultVhost__ { vhost srs.srt.com.cn { } -# srt推流:srt://127.0.0.1:10080?streamid=srs.srt.com.cn/live/test1?m=push -# srt拉流:srt://127.0.0.1:10080?streamid=srs.srt.com.cn/live/test1?m=pull -# rtmp拉流:rtmp://127.0.0.1/live?vhost=srs.srt.com.cn/test1 +# 无vhost配置(__defaultVhost__), 示例: +# srt推流地址:srt://127.0.0.1:10080?streamid=live/test1?m=push +# srt拉流地址:srt://127.0.0.1:10080?streamid=live/test1?m=pull +# rtmp拉流地址:rtmp://127.0.0.1/live/test1 + +# 带有vhost配置, 示例: +# srt推流地址:srt://127.0.0.1:10080?streamid=srs.srt.com.cn/live/test1?m=push +# srt拉流地址:srt://127.0.0.1:10080?streamid=srs.srt.com.cn/live/test1?m=pull +# rtmp拉流地址:rtmp://127.0.0.1/live?vhost=srs.srt.com.cn/test1 stats { network 0; diff --git a/trunk/configure b/trunk/configure index 93ee7e667..797b2207c 100755 --- a/trunk/configure +++ b/trunk/configure @@ -211,12 +211,15 @@ PROTOCOL_INCS="src/protocol"; MODULE_DIR=${PROTOCOL_INCS} . auto/modules.sh PROTOCOL_OBJS="${MODULE_OBJS[@]}" # #srt protocol features. +if [ $SRS_SRT = YES ]; then MODULE_ID="SRT" MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL" "SERVICE" "APP") ModuleLibIncs=(${SRS_OBJS_DIR}) MODULE_FILES=("srt_server" "srt_handle" "srt_conn" "srt_to_rtmp" "ts_demux" "srt_data") SRT_INCS=${LibSRTRoot}; MODULE_DIR=${LibSRTRoot} . auto/modules.sh SRT_OBJS="${MODULE_OBJS[@]}" +fi + # #Service Module, for both Server and Client Modules. if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then