正在显示
4 个修改的文件
包含
30 行增加
和
5 行删除
@@ -272,7 +272,7 @@ function write_nginx_html5() | @@ -272,7 +272,7 @@ function write_nginx_html5() | ||
272 | </video> | 272 | </video> |
273 | END | 273 | END |
274 | } | 274 | } |
275 | -__SRS_BUILD_NGINX=NO; if [ $SRS_ARM_UBUNTU12 = NO ]; then if [ $SRS_HLS = YES ]; then __SRS_BUILD_NGINX=YES; fi fi | 275 | +__SRS_BUILD_NGINX=NO; if [ $SRS_ARM_UBUNTU12 = NO ]; then if [ $SRS_NGINX = YES ]; then __SRS_BUILD_NGINX=YES; fi fi |
276 | if [ $__SRS_BUILD_NGINX = YES ]; then | 276 | if [ $__SRS_BUILD_NGINX = YES ]; then |
277 | if [[ -f ${SRS_OBJS}/nginx/sbin/nginx ]]; then | 277 | if [[ -f ${SRS_OBJS}/nginx/sbin/nginx ]]; then |
278 | echo "nginx-1.5.7 is ok."; | 278 | echo "nginx-1.5.7 is ok."; |
@@ -317,6 +317,12 @@ if [ $__SRS_BUILD_NGINX = YES ]; then | @@ -317,6 +317,12 @@ if [ $__SRS_BUILD_NGINX = YES ]; then | ||
317 | echo "nginx is ok" > ${SRS_OBJS}/nginx/html/nginx.html | 317 | echo "nginx is ok" > ${SRS_OBJS}/nginx/html/nginx.html |
318 | fi | 318 | fi |
319 | 319 | ||
320 | +if [ $SRS_NGINX = YES ]; then | ||
321 | + echo "#define SRS_NGINX" >> $SRS_AUTO_HEADERS_H | ||
322 | +else | ||
323 | + echo "#undef SRS_NGINX" >> $SRS_AUTO_HEADERS_H | ||
324 | +fi | ||
325 | + | ||
320 | if [ $SRS_HLS = YES ]; then | 326 | if [ $SRS_HLS = YES ]; then |
321 | echo "#define SRS_HLS" >> $SRS_AUTO_HEADERS_H | 327 | echo "#define SRS_HLS" >> $SRS_AUTO_HEADERS_H |
322 | else | 328 | else |
@@ -15,6 +15,7 @@ | @@ -15,6 +15,7 @@ | ||
15 | help=no | 15 | help=no |
16 | 16 | ||
17 | SRS_HLS=RESERVED | 17 | SRS_HLS=RESERVED |
18 | +SRS_NGINX=RESERVED | ||
18 | SRS_SSL=RESERVED | 19 | SRS_SSL=RESERVED |
19 | SRS_FFMPEG=RESERVED | 20 | SRS_FFMPEG=RESERVED |
20 | SRS_HTTP_CALLBACK=RESERVED | 21 | SRS_HTTP_CALLBACK=RESERVED |
@@ -54,6 +55,7 @@ do | @@ -54,6 +55,7 @@ do | ||
54 | 55 | ||
55 | --with-ssl) SRS_SSL=YES ;; | 56 | --with-ssl) SRS_SSL=YES ;; |
56 | --with-hls) SRS_HLS=YES ;; | 57 | --with-hls) SRS_HLS=YES ;; |
58 | + --with-nginx) SRS_NGINX=YES ;; | ||
57 | --with-ffmpeg) SRS_FFMPEG=YES ;; | 59 | --with-ffmpeg) SRS_FFMPEG=YES ;; |
58 | --with-http-callback) SRS_HTTP_CALLBACK=YES ;; | 60 | --with-http-callback) SRS_HTTP_CALLBACK=YES ;; |
59 | --with-librtmp) SRS_LIBRTMP=YES ;; | 61 | --with-librtmp) SRS_LIBRTMP=YES ;; |
@@ -69,6 +71,7 @@ do | @@ -69,6 +71,7 @@ do | ||
69 | 71 | ||
70 | --without-ssl) SRS_SSL=NO ;; | 72 | --without-ssl) SRS_SSL=NO ;; |
71 | --without-hls) SRS_HLS=NO ;; | 73 | --without-hls) SRS_HLS=NO ;; |
74 | + --without-nginx) SRS_NGINX=NO ;; | ||
72 | --without-ffmpeg) SRS_FFMPEG=NO ;; | 75 | --without-ffmpeg) SRS_FFMPEG=NO ;; |
73 | --without-http-callback) SRS_HTTP_CALLBACK=NO ;; | 76 | --without-http-callback) SRS_HTTP_CALLBACK=NO ;; |
74 | --without-librtmp) SRS_LIBRTMP=NO ;; | 77 | --without-librtmp) SRS_LIBRTMP=NO ;; |
@@ -98,6 +101,7 @@ done | @@ -98,6 +101,7 @@ done | ||
98 | # if arm specified, set some default to disabled. | 101 | # if arm specified, set some default to disabled. |
99 | if [ $SRS_ARM_UBUNTU12 = YES ]; then | 102 | if [ $SRS_ARM_UBUNTU12 = YES ]; then |
100 | if [ $SRS_HLS = RESERVED ]; then SRS_HLS=NO; fi | 103 | if [ $SRS_HLS = RESERVED ]; then SRS_HLS=NO; fi |
104 | + if [ $SRS_NGINX = RESERVED ]; then SRS_NGINX=NO; fi | ||
101 | if [ $SRS_SSL = RESERVED ]; then SRS_SSL=NO; fi | 105 | if [ $SRS_SSL = RESERVED ]; then SRS_SSL=NO; fi |
102 | if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi | 106 | if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi |
103 | if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=NO; fi | 107 | if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=NO; fi |
@@ -115,6 +119,7 @@ if [ $SRS_ARM_UBUNTU12 = YES ]; then | @@ -115,6 +119,7 @@ if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
115 | SRS_STATIC=YES | 119 | SRS_STATIC=YES |
116 | else | 120 | else |
117 | if [ $SRS_HLS = RESERVED ]; then SRS_HLS=YES; fi | 121 | if [ $SRS_HLS = RESERVED ]; then SRS_HLS=YES; fi |
122 | + if [ $SRS_NGINX = RESERVED ]; then SRS_NGINX=NO; fi | ||
118 | if [ $SRS_SSL = RESERVED ]; then SRS_SSL=YES; fi | 123 | if [ $SRS_SSL = RESERVED ]; then SRS_SSL=YES; fi |
119 | if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi | 124 | if [ $SRS_FFMPEG = RESERVED ]; then SRS_FFMPEG=NO; fi |
120 | if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=NO; fi | 125 | if [ $SRS_HTTP_CALLBACK = RESERVED ]; then SRS_HTTP_CALLBACK=NO; fi |
@@ -232,6 +237,7 @@ fi | @@ -232,6 +237,7 @@ fi | ||
232 | 237 | ||
233 | # check variable neccessary | 238 | # check variable neccessary |
234 | if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi | 239 | if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi |
240 | +if [ $SRS_NGINX = RESERVED ]; then echo "you must specifies the nginx, see: ./configure --help"; __check_ok=NO; fi | ||
235 | if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi | 241 | if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi |
236 | if [ $SRS_FFMPEG = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi | 242 | if [ $SRS_FFMPEG = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi |
237 | if [ $SRS_HTTP_CALLBACK = RESERVED ]; then echo "you must specifies the http, see: ./configure --help"; __check_ok=NO; fi | 243 | if [ $SRS_HTTP_CALLBACK = RESERVED ]; then echo "you must specifies the http, see: ./configure --help"; __check_ok=NO; fi |
@@ -252,6 +258,7 @@ fi | @@ -252,6 +258,7 @@ fi | ||
252 | # regenerate the options for default values. | 258 | # regenerate the options for default values. |
253 | SRS_CONFIGURE="" | 259 | SRS_CONFIGURE="" |
254 | if [ $SRS_HLS = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-hls"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-hls"; fi | 260 | if [ $SRS_HLS = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-hls"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-hls"; fi |
261 | +if [ $SRS_NGINX = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-nginx"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-nginx"; fi | ||
255 | if [ $SRS_SSL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ssl"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ssl"; fi | 262 | if [ $SRS_SSL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ssl"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ssl"; fi |
256 | if [ $SRS_FFMPEG = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ffmpeg"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ffmpeg"; fi | 263 | if [ $SRS_FFMPEG = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ffmpeg"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ffmpeg"; fi |
257 | if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-callback"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-callback"; fi | 264 | if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-callback"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-callback"; fi |
@@ -16,7 +16,7 @@ BLACK="\\e[0m" | @@ -16,7 +16,7 @@ BLACK="\\e[0m" | ||
16 | 16 | ||
17 | ##################################################################################### | 17 | ##################################################################################### |
18 | # parse user options, set the variables like: | 18 | # parse user options, set the variables like: |
19 | -# srs features: SRS_SSL/SRS_HLS/SRS_FFMPEG/SRS_HTTP_CALLBACK/SRS_RESEARCH/SRS_UTEST | 19 | +# srs features: SRS_SSL/SRS_HLS/SRS_NGINX/SRS_FFMPEG/SRS_HTTP_CALLBACK/SRS_RESEARCH/SRS_UTEST |
20 | # build options: SRS_JOBS | 20 | # build options: SRS_JOBS |
21 | ##################################################################################### | 21 | ##################################################################################### |
22 | SRS_AUTO_HEADERS_H="${SRS_OBJS}/srs_auto_headers.hpp" | 22 | 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) | @@ -78,6 +78,7 @@ if [ $SRS_UTEST = YES ]; then SrsUtestMakeEntry="(cd ${SRS_OBJS}/utest; \$(MAKE) | ||
78 | ##################################################################################### | 78 | ##################################################################################### |
79 | # colorful summary | 79 | # colorful summary |
80 | SrsHlsSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HLS = YES ]; then SrsHlsSummaryColor="\${GREEN}"; fi | 80 | SrsHlsSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HLS = YES ]; then SrsHlsSummaryColor="\${GREEN}"; fi |
81 | +SrsNginxSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_NGINX = YES ]; then SrsNginxSummaryColor="\${GREEN}"; fi | ||
81 | SrsSslSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_SSL = YES ]; then SrsSslSummaryColor="\${GREEN}"; fi | 82 | SrsSslSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_SSL = YES ]; then SrsSslSummaryColor="\${GREEN}"; fi |
82 | SrsFfmpegSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_FFMPEG = YES ]; then SrsFfmpegSummaryColor="\${GREEN}"; fi | 83 | SrsFfmpegSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_FFMPEG = YES ]; then SrsFfmpegSummaryColor="\${GREEN}"; fi |
83 | SrsHttpCallbackSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_CALLBACK = YES ]; then SrsHttpCallbackSummaryColor="\${GREEN}"; fi | 84 | SrsHttpCallbackSummaryColor="\${YELLOW}{disabled} "; if [ $SRS_HTTP_CALLBACK = YES ]; then SrsHttpCallbackSummaryColor="\${GREEN}"; fi |
@@ -139,7 +140,9 @@ echo -e " | ${SrsLibrtmpSummaryColor}librtmp-sample: ./research/librtmp, | @@ -139,7 +140,9 @@ echo -e " | ${SrsLibrtmpSummaryColor}librtmp-sample: ./research/librtmp, | ||
139 | echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}" | 140 | echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}" |
140 | echo -e " |\${GREEN}server: ./objs/srs -c conf/srs.conf, start the srs server\${BLACK}" | 141 | echo -e " |\${GREEN}server: ./objs/srs -c conf/srs.conf, start the srs server\${BLACK}" |
141 | echo -e " | ${SrsHlsSummaryColor}hls @see: https://github.com/winlinvip/simple-rtmp-server/wiki/DeliveryHLS\${BLACK}" | 142 | echo -e " | ${SrsHlsSummaryColor}hls @see: https://github.com/winlinvip/simple-rtmp-server/wiki/DeliveryHLS\${BLACK}" |
142 | -echo -e " | ${SrsHlsSummaryColor}hls: generate m3u8 and ts, delivery HLS stream by nginx\${BLACK}" | 143 | +echo -e " | ${SrsHlsSummaryColor}hls: generate m3u8 and ts from rtmp stream\${BLACK}" |
144 | +echo -e " | ${SrsNginxSummaryColor}nginx @see: https://github.com/winlinvip/simple-rtmp-server/wiki/DeliveryHLS\${BLACK}" | ||
145 | +echo -e " | ${SrsNginxSummaryColor}nginx: delivery HLS stream by nginx\${BLACK}" | ||
143 | echo -e " | ${SrsSslSummaryColor}ssl @see: https://github.com/winlinvip/simple-rtmp-server/wiki/RTMPHandshake\${BLACK}" | 146 | echo -e " | ${SrsSslSummaryColor}ssl @see: https://github.com/winlinvip/simple-rtmp-server/wiki/RTMPHandshake\${BLACK}" |
144 | echo -e " | ${SrsSslSummaryColor}ssl: support RTMP complex handshake for client required, for instance, flash\${BLACK}" | 147 | echo -e " | ${SrsSslSummaryColor}ssl: support RTMP complex handshake for client required, for instance, flash\${BLACK}" |
145 | echo -e " | ${SrsFfmpegSummaryColor}ffmpeg @see: https://github.com/winlinvip/simple-rtmp-server/wiki/FFMPEG\${BLACK}" | 148 | echo -e " | ${SrsFfmpegSummaryColor}ffmpeg @see: https://github.com/winlinvip/simple-rtmp-server/wiki/FFMPEG\${BLACK}" |
@@ -428,6 +431,15 @@ if [ $SRS_HLS = YES ]; then | @@ -428,6 +431,15 @@ if [ $SRS_HLS = YES ]; then | ||
428 | else | 431 | else |
429 | echo -e "${YELLOW}warning: without HLS support${BLACK}" | 432 | echo -e "${YELLOW}warning: without HLS support${BLACK}" |
430 | fi | 433 | fi |
434 | +if [ $SRS_NGINX = YES ]; then | ||
435 | + echo -e "${GREEN}Nginx http server is enabled${BLACK}" | ||
436 | +else | ||
437 | + if [ $SRS_HLS = YES ]; then | ||
438 | + echo -e "${YELLOW}warning: HLS without Nginx support${BLACK}" | ||
439 | + else | ||
440 | + echo -e "${GREEN}note: HLS without Nginx support${BLACK}" | ||
441 | + fi | ||
442 | +fi | ||
431 | if [ $SRS_SSL = YES ]; then | 443 | if [ $SRS_SSL = YES ]; then |
432 | echo -e "${GREEN}rtmp complex handshake is enabled${BLACK}" | 444 | echo -e "${GREEN}rtmp complex handshake is enabled${BLACK}" |
433 | else | 445 | else |
@@ -502,7 +514,7 @@ echo "" | @@ -502,7 +514,7 @@ echo "" | ||
502 | echo "you can:" | 514 | echo "you can:" |
503 | echo "\" make \" to build the srs(simple rtmp server)." | 515 | echo "\" make \" to build the srs(simple rtmp server)." |
504 | echo "\" make help \" to get the usage of make" | 516 | echo "\" make help \" to get the usage of make" |
505 | -if [ $SRS_HLS = YES ]; then | 517 | +if [ $SRS_NGINX = YES ]; then |
506 | echo "\" sudo ./objs/nginx/sbin/nginx \" to start the nginx http server for hls" | 518 | echo "\" sudo ./objs/nginx/sbin/nginx \" to start the nginx http server for hls" |
507 | echo "\" http://$ip \" rtmp players(OSMF/JWPlayer)" | 519 | echo "\" http://$ip \" rtmp players(OSMF/JWPlayer)" |
508 | fi | 520 | fi |
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
31 | // current release version | 31 | // current release version |
32 | #define VERSION_MAJOR "0" | 32 | #define VERSION_MAJOR "0" |
33 | #define VERSION_MINOR "9" | 33 | #define VERSION_MINOR "9" |
34 | -#define VERSION_REVISION "22" | 34 | +#define VERSION_REVISION "23" |
35 | #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION | 35 | #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION |
36 | // server info. | 36 | // server info. |
37 | #define RTMP_SIG_SRS_KEY "srs" | 37 | #define RTMP_SIG_SRS_KEY "srs" |
-
请 注册 或 登录 后发表评论