diff --git a/trunk/auto/depends.sh b/trunk/auto/depends.sh index d83640e6e..3b9ed2bd2 100755 --- a/trunk/auto/depends.sh +++ b/trunk/auto/depends.sh @@ -272,7 +272,7 @@ function write_nginx_html5() END } -__SRS_BUILD_NGINX=NO; if [ $SRS_ARM_UBUNTU12 = NO ]; then if [ $SRS_HLS = YES ]; then __SRS_BUILD_NGINX=YES; fi fi +__SRS_BUILD_NGINX=NO; if [ $SRS_ARM_UBUNTU12 = NO ]; then if [ $SRS_NGINX = YES ]; then __SRS_BUILD_NGINX=YES; fi fi if [ $__SRS_BUILD_NGINX = YES ]; then if [[ -f ${SRS_OBJS}/nginx/sbin/nginx ]]; then echo "nginx-1.5.7 is ok."; @@ -317,6 +317,12 @@ if [ $__SRS_BUILD_NGINX = YES ]; then echo "nginx is ok" > ${SRS_OBJS}/nginx/html/nginx.html fi +if [ $SRS_NGINX = YES ]; then + echo "#define SRS_NGINX" >> $SRS_AUTO_HEADERS_H +else + echo "#undef SRS_NGINX" >> $SRS_AUTO_HEADERS_H +fi + if [ $SRS_HLS = YES ]; then echo "#define SRS_HLS" >> $SRS_AUTO_HEADERS_H else diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index 015b5012d..5135b79b9 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -15,6 +15,7 @@ help=no SRS_HLS=RESERVED +SRS_NGINX=RESERVED SRS_SSL=RESERVED SRS_FFMPEG=RESERVED SRS_HTTP_CALLBACK=RESERVED @@ -54,6 +55,7 @@ do --with-ssl) SRS_SSL=YES ;; --with-hls) SRS_HLS=YES ;; + --with-nginx) SRS_NGINX=YES ;; --with-ffmpeg) SRS_FFMPEG=YES ;; --with-http-callback) SRS_HTTP_CALLBACK=YES ;; --with-librtmp) SRS_LIBRTMP=YES ;; @@ -69,6 +71,7 @@ do --without-ssl) SRS_SSL=NO ;; --without-hls) SRS_HLS=NO ;; + --without-nginx) SRS_NGINX=NO ;; --without-ffmpeg) SRS_FFMPEG=NO ;; --without-http-callback) SRS_HTTP_CALLBACK=NO ;; --without-librtmp) SRS_LIBRTMP=NO ;; @@ -98,6 +101,7 @@ done # if arm specified, set some default to disabled. if [ $SRS_ARM_UBUNTU12 = YES ]; then if [ $SRS_HLS = RESERVED ]; then SRS_HLS=NO; fi + if [ $SRS_NGINX = RESERVED ]; then SRS_NGINX=NO; fi if [ $SRS_SSL = RESERVED ]; then SRS_SSL=NO; fi if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=NO; fi @@ -115,6 +119,7 @@ if [ $SRS_ARM_UBUNTU12 = YES ]; then SRS_STATIC=YES else if [ $SRS_HLS = RESERVED ]; then SRS_HLS=YES; fi + if [ $SRS_NGINX = RESERVED ]; then SRS_NGINX=NO; fi if [ $SRS_SSL = RESERVED ]; then SRS_SSL=YES; fi if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=NO; fi @@ -232,6 +237,7 @@ fi # check variable neccessary if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi +if [ $SRS_NGINX = RESERVED ]; then echo "you must specifies the nginx, see: ./configure --help"; __check_ok=NO; fi if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi if [ $SRS_FFMPEG = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi if [ $SRS_HTTP_CALLBACK = RESERVED ]; then echo "you must specifies the http, see: ./configure --help"; __check_ok=NO; fi @@ -252,6 +258,7 @@ fi # regenerate the options for default values. SRS_CONFIGURE="" if [ $SRS_HLS = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-hls"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-hls"; fi +if [ $SRS_NGINX = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-nginx"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-nginx"; fi if [ $SRS_SSL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ssl"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ssl"; fi if [ $SRS_FFMPEG = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ffmpeg"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ffmpeg"; fi if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-callback"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-callback"; fi diff --git a/trunk/configure b/trunk/configure index 80d39f613..2b5fd89e6 100755 --- a/trunk/configure +++ b/trunk/configure @@ -16,7 +16,7 @@ BLACK="\\e[0m" ##################################################################################### # parse user options, set the variables like: -# srs features: SRS_SSL/SRS_HLS/SRS_FFMPEG/SRS_HTTP_CALLBACK/SRS_RESEARCH/SRS_UTEST +# srs features: SRS_SSL/SRS_HLS/SRS_NGINX/SRS_FFMPEG/SRS_HTTP_CALLBACK/SRS_RESEARCH/SRS_UTEST # build options: SRS_JOBS ##################################################################################### SRS_AUTO_HEADERS_H="${SRS_OBJS}/srs_auto_headers.hpp" @@ -78,6 +78,7 @@ if [ $SRS_UTEST = YES ]; then SrsUtestMakeEntry="(cd ${SRS_OBJS}/utest; \$(MAKE) ##################################################################################### # colorful summary SrsHlsSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HLS = YES ]; then SrsHlsSummaryColor="\${GREEN}"; fi +SrsNginxSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_NGINX = YES ]; then SrsNginxSummaryColor="\${GREEN}"; fi SrsSslSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_SSL = YES ]; then SrsSslSummaryColor="\${GREEN}"; fi SrsFfmpegSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_FFMPEG = YES ]; then SrsFfmpegSummaryColor="\${GREEN}"; fi SrsHttpCallbackSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_CALLBACK = YES ]; then SrsHttpCallbackSummaryColor="\${GREEN}"; fi @@ -139,7 +140,9 @@ echo -e " | ${SrsLibrtmpSummaryColor}librtmp-sample: ./research/librtmp, echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}" echo -e " |\${GREEN}server: ./objs/srs -c conf/srs.conf, start the srs server\${BLACK}" echo -e " | ${SrsHlsSummaryColor}hls @see: https://github.com/winlinvip/simple-rtmp-server/wiki/DeliveryHLS\${BLACK}" -echo -e " | ${SrsHlsSummaryColor}hls: generate m3u8 and ts, delivery HLS stream by nginx\${BLACK}" +echo -e " | ${SrsHlsSummaryColor}hls: generate m3u8 and ts from rtmp stream\${BLACK}" +echo -e " | ${SrsNginxSummaryColor}nginx @see: https://github.com/winlinvip/simple-rtmp-server/wiki/DeliveryHLS\${BLACK}" +echo -e " | ${SrsNginxSummaryColor}nginx: delivery HLS stream by nginx\${BLACK}" echo -e " | ${SrsSslSummaryColor}ssl @see: https://github.com/winlinvip/simple-rtmp-server/wiki/RTMPHandshake\${BLACK}" echo -e " | ${SrsSslSummaryColor}ssl: support RTMP complex handshake for client required, for instance, flash\${BLACK}" echo -e " | ${SrsFfmpegSummaryColor}ffmpeg @see: https://github.com/winlinvip/simple-rtmp-server/wiki/FFMPEG\${BLACK}" @@ -428,6 +431,15 @@ if [ $SRS_HLS = YES ]; then else echo -e "${YELLOW}warning: without HLS support${BLACK}" fi +if [ $SRS_NGINX = YES ]; then + echo -e "${GREEN}Nginx http server is enabled${BLACK}" +else + if [ $SRS_HLS = YES ]; then + echo -e "${YELLOW}warning: HLS without Nginx support${BLACK}" + else + echo -e "${GREEN}note: HLS without Nginx support${BLACK}" + fi +fi if [ $SRS_SSL = YES ]; then echo -e "${GREEN}rtmp complex handshake is enabled${BLACK}" else @@ -502,7 +514,7 @@ echo "" echo "you can:" echo "\" make \" to build the srs(simple rtmp server)." echo "\" make help \" to get the usage of make" -if [ $SRS_HLS = YES ]; then +if [ $SRS_NGINX = YES ]; then echo "\" sudo ./objs/nginx/sbin/nginx \" to start the nginx http server for hls" echo "\" http://$ip \" rtmp players(OSMF/JWPlayer)" fi diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index a64bc09eb..a4507b74a 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR "0" #define VERSION_MINOR "9" -#define VERSION_REVISION "22" +#define VERSION_REVISION "23" #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION // server info. #define RTMP_SIG_SRS_KEY "srs"