winlin

for #328, support adobe hds. 2.0.138.

@@ -7,7 +7,7 @@ PRIMARY ordered by first contribution. @@ -7,7 +7,7 @@ PRIMARY ordered by first contribution.
7 * winlin<winlin@vip.126.com> "Plan, arch, implement SRS1.0 and SRS2.0" 7 * winlin<winlin@vip.126.com> "Plan, arch, implement SRS1.0 and SRS2.0"
8 8
9 AUTHORS ordered by first contribution. 9 AUTHORS ordered by first contribution.
10 -* wenjie.zhao<740936897@qq.com> "The bandwidth test module and bug fixed." 10 +* wenjie.zhao<740936897@qq.com> "The bandwidth test module, HDS and bug fixed."
11 11
12 CONTRIBUTORS ordered by first contribution. 12 CONTRIBUTORS ordered by first contribution.
13 * xiangcheng.liu<liuxc0116@foxmail.com> "Bug fixed" 13 * xiangcheng.liu<liuxc0116@foxmail.com> "Bug fixed"
@@ -37,7 +37,7 @@ Enjoy it! @@ -37,7 +37,7 @@ Enjoy it!
37 37
38 SRS(SIMPLE RTMP Server) over state-threads created in 2013.10. 38 SRS(SIMPLE RTMP Server) over state-threads created in 2013.10.
39 39
40 -SRS delivers rtmp/hls/http live on x86/x64/arm/mips linux/osx, 40 +SRS delivers rtmp/hls/http/hds live on x86/x64/arm/mips linux/osx,
41 supports origin/edge/vhost and transcode/ingest and dvr/forward 41 supports origin/edge/vhost and transcode/ingest and dvr/forward
42 and http-api/http-callback/reload, introduces tracable 42 and http-api/http-callback/reload, introduces tracable
43 session-oriented log, exports client srs-librtmp, 43 session-oriented log, exports client srs-librtmp,
@@ -56,6 +56,10 @@ HLS( @@ -56,6 +56,10 @@ HLS(
56 [CN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_DeliveryHLS), 56 [CN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_DeliveryHLS),
57 [EN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_EN_DeliveryHLS) 57 [EN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_EN_DeliveryHLS)
58 ), 58 ),
  59 +HDS(
  60 +[CN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_DeliveryHDS),
  61 +[EN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_EN_DeliveryHDS)
  62 +),
59 HTTP( 63 HTTP(
60 [CN](https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DeliveryHttpStream), 64 [CN](https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DeliveryHttpStream),
61 [EN](https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DeliveryHttpStream) 65 [EN](https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DeliveryHttpStream)
@@ -509,6 +513,10 @@ Supported operating systems and hardware: @@ -509,6 +513,10 @@ Supported operating systems and hardware:
509 [#301](https://github.com/winlinvip/simple-rtmp-server/issues/301). 513 [#301](https://github.com/winlinvip/simple-rtmp-server/issues/301).
510 1. Rewrite HLS(h.264+aac/mp3) streaming, read 514 1. Rewrite HLS(h.264+aac/mp3) streaming, read
511 [#304](https://github.com/winlinvip/simple-rtmp-server/issues/304). 515 [#304](https://github.com/winlinvip/simple-rtmp-server/issues/304).
  516 +1. Support Adobe HDS(f4m)(
  517 +[CN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_DeliveryHDS),
  518 +[EN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_EN_DeliveryHDS)
  519 +) dynamic streaming.
512 1. [experiment] Support push MPEG-TS over UDP to SRS, read 520 1. [experiment] Support push MPEG-TS over UDP to SRS, read
513 [#250](https://github.com/winlinvip/simple-rtmp-server/issues/250). 521 [#250](https://github.com/winlinvip/simple-rtmp-server/issues/250).
514 1. [experiment] Support push RTSP to SRS, read 522 1. [experiment] Support push RTSP to SRS, read
@@ -550,6 +558,7 @@ Supported operating systems and hardware: @@ -550,6 +558,7 @@ Supported operating systems and hardware:
550 558
551 ### SRS 2.0 history 559 ### SRS 2.0 history
552 560
  561 +* v2.0, 2015-03-12, fix [#328](https://github.com/winlinvip/simple-rtmp-server/issues/328), support adobe hds. 2.0.138.
553 * v2.0, 2015-03-10, fix [#155](https://github.com/winlinvip/simple-rtmp-server/issues/155), support osx(darwin) for mac pro. 2.0.137. 562 * v2.0, 2015-03-10, fix [#155](https://github.com/winlinvip/simple-rtmp-server/issues/155), support osx(darwin) for mac pro. 2.0.137.
554 * v2.0, 2015-03-08, fix [#316](https://github.com/winlinvip/simple-rtmp-server/issues/316), http api provides stream/vhost/srs/server bytes, codec and count. 2.0.136. 563 * v2.0, 2015-03-08, fix [#316](https://github.com/winlinvip/simple-rtmp-server/issues/316), http api provides stream/vhost/srs/server bytes, codec and count. 2.0.136.
555 * v2.0, 2015-03-08, fix [#310](https://github.com/winlinvip/simple-rtmp-server/issues/310), refine aac LC, support aac HE/HEv2. 2.0.134. 564 * v2.0, 2015-03-08, fix [#310](https://github.com/winlinvip/simple-rtmp-server/issues/310), refine aac LC, support aac HE/HEv2. 2.0.134.
@@ -118,6 +118,12 @@ else @@ -118,6 +118,12 @@ else
118 echo "#undef SRS_AUTO_HLS" >> $SRS_AUTO_HEADERS_H 118 echo "#undef SRS_AUTO_HLS" >> $SRS_AUTO_HEADERS_H
119 fi 119 fi
120 120
  121 +if [ $SRS_HDS = YES ]; then
  122 + echo "#define SRS_AUTO_HDS" >> $SRS_AUTO_HEADERS_H
  123 +else
  124 + echo "#undef SRS_AUTO_HDS" >> $SRS_AUTO_HEADERS_H
  125 +fi
  126 +
121 if [ $SRS_HTTP_CALLBACK = YES ]; then 127 if [ $SRS_HTTP_CALLBACK = YES ]; then
122 echo "#define SRS_AUTO_HTTP_CALLBACK" >> $SRS_AUTO_HEADERS_H 128 echo "#define SRS_AUTO_HTTP_CALLBACK" >> $SRS_AUTO_HEADERS_H
123 else 129 else
@@ -16,6 +16,7 @@ help=no @@ -16,6 +16,7 @@ help=no
16 ################################################################ 16 ################################################################
17 # feature options 17 # feature options
18 SRS_HLS=RESERVED 18 SRS_HLS=RESERVED
  19 +SRS_HDS=RESERVED
19 SRS_DVR=RESERVED 20 SRS_DVR=RESERVED
20 SRS_NGINX=RESERVED 21 SRS_NGINX=RESERVED
21 SRS_SSL=RESERVED 22 SRS_SSL=RESERVED
@@ -112,6 +113,7 @@ Options: @@ -112,6 +113,7 @@ Options:
112 --with-ssl enable rtmp complex handshake, requires openssl-devel installed. 113 --with-ssl enable rtmp complex handshake, requires openssl-devel installed.
113 to delivery h264 video and aac audio to flash player. 114 to delivery h264 video and aac audio to flash player.
114 --with-hls enable hls streaming, mux RTMP to m3u8/ts files. 115 --with-hls enable hls streaming, mux RTMP to m3u8/ts files.
  116 + --with-hds enable hds streaming, mux RTMP to f4m/f4v files.
115 --with-dvr enable dvr, mux RTMP to flv files. 117 --with-dvr enable dvr, mux RTMP to flv files.
116 --with-nginx enable delivery HTTP stream with nginx. 118 --with-nginx enable delivery HTTP stream with nginx.
117 build nginx at: ./objs/nginx/sbin/nginx 119 build nginx at: ./objs/nginx/sbin/nginx
@@ -137,7 +139,8 @@ Options: @@ -137,7 +139,8 @@ Options:
137 --with-arm-ubuntu12 build SRS on ubuntu12 for armhf(v7cpu). 139 --with-arm-ubuntu12 build SRS on ubuntu12 for armhf(v7cpu).
138 140
139 --without-ssl disable rtmp complex handshake. 141 --without-ssl disable rtmp complex handshake.
140 - --without-hls disable hls, rtmp streaming only. 142 + --without-hls disable hls, the apple http live streaming.
  143 + --without-hds disable hds, the adobe http dynamic streaming.
141 --without-dvr disable dvr, donot support record RTMP stream to flv. 144 --without-dvr disable dvr, donot support record RTMP stream to flv.
142 --without-nginx disable delivery HTTP stream with nginx. 145 --without-nginx disable delivery HTTP stream with nginx.
143 --without-http-callback disable http, http hooks callback. 146 --without-http-callback disable http, http hooks callback.
@@ -211,6 +214,7 @@ function parse_user_option() { @@ -211,6 +214,7 @@ function parse_user_option() {
211 214
212 --with-ssl) SRS_SSL=YES ;; 215 --with-ssl) SRS_SSL=YES ;;
213 --with-hls) SRS_HLS=YES ;; 216 --with-hls) SRS_HLS=YES ;;
  217 + --with-hds) SRS_HDS=YES ;;
214 --with-dvr) SRS_DVR=YES ;; 218 --with-dvr) SRS_DVR=YES ;;
215 --with-nginx) SRS_NGINX=YES ;; 219 --with-nginx) SRS_NGINX=YES ;;
216 --with-ffmpeg) SRS_FFMPEG_TOOL=YES ;; 220 --with-ffmpeg) SRS_FFMPEG_TOOL=YES ;;
@@ -234,6 +238,7 @@ function parse_user_option() { @@ -234,6 +238,7 @@ function parse_user_option() {
234 238
235 --without-ssl) SRS_SSL=NO ;; 239 --without-ssl) SRS_SSL=NO ;;
236 --without-hls) SRS_HLS=NO ;; 240 --without-hls) SRS_HLS=NO ;;
  241 + --without-hds) SRS_HDS=NO ;;
237 --without-dvr) SRS_DVR=NO ;; 242 --without-dvr) SRS_DVR=NO ;;
238 --without-nginx) SRS_NGINX=NO ;; 243 --without-nginx) SRS_NGINX=NO ;;
239 --without-ffmpeg) SRS_FFMPEG_TOOL=NO ;; 244 --without-ffmpeg) SRS_FFMPEG_TOOL=NO ;;
@@ -363,6 +368,7 @@ function apply_user_presets() { @@ -363,6 +368,7 @@ function apply_user_presets() {
363 # all disabled. 368 # all disabled.
364 if [ $SRS_DISABLE_ALL = YES ]; then 369 if [ $SRS_DISABLE_ALL = YES ]; then
365 SRS_HLS=NO 370 SRS_HLS=NO
  371 + SRS_HDS=NO
366 SRS_DVR=NO 372 SRS_DVR=NO
367 SRS_NGINX=NO 373 SRS_NGINX=NO
368 SRS_SSL=NO 374 SRS_SSL=NO
@@ -389,6 +395,7 @@ function apply_user_presets() { @@ -389,6 +395,7 @@ function apply_user_presets() {
389 # all enabled. 395 # all enabled.
390 if [ $SRS_ENABLE_ALL = YES ]; then 396 if [ $SRS_ENABLE_ALL = YES ]; then
391 SRS_HLS=YES 397 SRS_HLS=YES
  398 + SRS_HDS=YES
392 SRS_DVR=YES 399 SRS_DVR=YES
393 SRS_NGINX=YES 400 SRS_NGINX=YES
394 SRS_SSL=YES 401 SRS_SSL=YES
@@ -415,6 +422,7 @@ function apply_user_presets() { @@ -415,6 +422,7 @@ function apply_user_presets() {
415 # only rtmp vp6 422 # only rtmp vp6
416 if [ $SRS_FAST = YES ]; then 423 if [ $SRS_FAST = YES ]; then
417 SRS_HLS=NO 424 SRS_HLS=NO
  425 + SRS_HDS=NO
418 SRS_DVR=NO 426 SRS_DVR=NO
419 SRS_NGINX=NO 427 SRS_NGINX=NO
420 SRS_SSL=NO 428 SRS_SSL=NO
@@ -441,6 +449,7 @@ function apply_user_presets() { @@ -441,6 +449,7 @@ function apply_user_presets() {
441 # all disabled. 449 # all disabled.
442 if [ $SRS_RTMP_HLS = YES ]; then 450 if [ $SRS_RTMP_HLS = YES ]; then
443 SRS_HLS=YES 451 SRS_HLS=YES
  452 + SRS_HDS=YES
444 SRS_DVR=NO 453 SRS_DVR=NO
445 SRS_NGINX=NO 454 SRS_NGINX=NO
446 SRS_SSL=YES 455 SRS_SSL=YES
@@ -467,6 +476,7 @@ function apply_user_presets() { @@ -467,6 +476,7 @@ function apply_user_presets() {
467 # only ssl for RTMP with complex handshake. 476 # only ssl for RTMP with complex handshake.
468 if [ $SRS_PURE_RTMP = YES ]; then 477 if [ $SRS_PURE_RTMP = YES ]; then
469 SRS_HLS=NO 478 SRS_HLS=NO
  479 + SRS_HDS=NO
470 SRS_DVR=NO 480 SRS_DVR=NO
471 SRS_NGINX=NO 481 SRS_NGINX=NO
472 SRS_SSL=YES 482 SRS_SSL=YES
@@ -493,6 +503,7 @@ function apply_user_presets() { @@ -493,6 +503,7 @@ function apply_user_presets() {
493 # if arm specified, set some default to disabled. 503 # if arm specified, set some default to disabled.
494 if [ $SRS_ARM_UBUNTU12 = YES ]; then 504 if [ $SRS_ARM_UBUNTU12 = YES ]; then
495 SRS_HLS=YES 505 SRS_HLS=YES
  506 + SRS_HDS=YES
496 SRS_DVR=YES 507 SRS_DVR=YES
497 SRS_NGINX=NO 508 SRS_NGINX=NO
498 SRS_SSL=YES 509 SRS_SSL=YES
@@ -520,6 +531,7 @@ function apply_user_presets() { @@ -520,6 +531,7 @@ function apply_user_presets() {
520 # if mips specified, set some default to disabled. 531 # if mips specified, set some default to disabled.
521 if [ $SRS_MIPS_UBUNTU12 = YES ]; then 532 if [ $SRS_MIPS_UBUNTU12 = YES ]; then
522 SRS_HLS=YES 533 SRS_HLS=YES
  534 + SRS_HDS=YES
523 SRS_DVR=YES 535 SRS_DVR=YES
524 SRS_NGINX=NO 536 SRS_NGINX=NO
525 SRS_SSL=YES 537 SRS_SSL=YES
@@ -546,6 +558,7 @@ function apply_user_presets() { @@ -546,6 +558,7 @@ function apply_user_presets() {
546 # defaults for x86/x64 558 # defaults for x86/x64
547 if [ $SRS_X86_X64 = YES ]; then 559 if [ $SRS_X86_X64 = YES ]; then
548 SRS_HLS=YES 560 SRS_HLS=YES
  561 + SRS_HDS=YES
549 SRS_DVR=YES 562 SRS_DVR=YES
550 SRS_NGINX=NO 563 SRS_NGINX=NO
551 SRS_SSL=YES 564 SRS_SSL=YES
@@ -572,6 +585,7 @@ function apply_user_presets() { @@ -572,6 +585,7 @@ function apply_user_presets() {
572 # for osx(darwin) 585 # for osx(darwin)
573 if [ $SRS_OSX = YES ]; then 586 if [ $SRS_OSX = YES ]; then
574 SRS_HLS=YES 587 SRS_HLS=YES
  588 + SRS_HDS=YES
575 SRS_DVR=YES 589 SRS_DVR=YES
576 SRS_NGINX=NO 590 SRS_NGINX=NO
577 SRS_SSL=YES 591 SRS_SSL=YES
@@ -598,6 +612,7 @@ function apply_user_presets() { @@ -598,6 +612,7 @@ function apply_user_presets() {
598 # if dev specified, open features if possible. 612 # if dev specified, open features if possible.
599 if [ $SRS_DEV = YES ]; then 613 if [ $SRS_DEV = YES ]; then
600 SRS_HLS=YES 614 SRS_HLS=YES
  615 + SRS_HDS=YES
601 SRS_DVR=YES 616 SRS_DVR=YES
602 SRS_NGINX=NO 617 SRS_NGINX=NO
603 SRS_SSL=YES 618 SRS_SSL=YES
@@ -624,6 +639,7 @@ function apply_user_presets() { @@ -624,6 +639,7 @@ function apply_user_presets() {
624 # if fast dev specified, open main server features. 639 # if fast dev specified, open main server features.
625 if [ $SRS_FAST_DEV = YES ]; then 640 if [ $SRS_FAST_DEV = YES ]; then
626 SRS_HLS=YES 641 SRS_HLS=YES
  642 + SRS_HDS=YES
627 SRS_DVR=YES 643 SRS_DVR=YES
628 SRS_NGINX=NO 644 SRS_NGINX=NO
629 SRS_SSL=YES 645 SRS_SSL=YES
@@ -650,6 +666,7 @@ function apply_user_presets() { @@ -650,6 +666,7 @@ function apply_user_presets() {
650 # for srs demo 666 # for srs demo
651 if [ $SRS_DEMO = YES ]; then 667 if [ $SRS_DEMO = YES ]; then
652 SRS_HLS=YES 668 SRS_HLS=YES
  669 + SRS_HDS=YES
653 SRS_DVR=YES 670 SRS_DVR=YES
654 SRS_NGINX=NO 671 SRS_NGINX=NO
655 SRS_SSL=YES 672 SRS_SSL=YES
@@ -676,6 +693,7 @@ function apply_user_presets() { @@ -676,6 +693,7 @@ function apply_user_presets() {
676 # if raspberry-pi specified, open ssl/hls/static features 693 # if raspberry-pi specified, open ssl/hls/static features
677 if [ $SRS_PI = YES ]; then 694 if [ $SRS_PI = YES ]; then
678 SRS_HLS=YES 695 SRS_HLS=YES
  696 + SRS_HDS=YES
679 SRS_DVR=YES 697 SRS_DVR=YES
680 SRS_NGINX=NO 698 SRS_NGINX=NO
681 SRS_SSL=YES 699 SRS_SSL=YES
@@ -702,6 +720,7 @@ function apply_user_presets() { @@ -702,6 +720,7 @@ function apply_user_presets() {
702 # if cubieboard specified, open features except ffmpeg/nginx. 720 # if cubieboard specified, open features except ffmpeg/nginx.
703 if [ $SRS_CUBIE = YES ]; then 721 if [ $SRS_CUBIE = YES ]; then
704 SRS_HLS=YES 722 SRS_HLS=YES
  723 + SRS_HDS=YES
705 SRS_DVR=YES 724 SRS_DVR=YES
706 SRS_NGINX=NO 725 SRS_NGINX=NO
707 SRS_SSL=YES 726 SRS_SSL=YES
@@ -763,6 +782,7 @@ function apply_user_detail_options() { @@ -763,6 +782,7 @@ function apply_user_detail_options() {
763 # disable almost all features for export srs-librtmp. 782 # disable almost all features for export srs-librtmp.
764 if [ $SRS_EXPORT_LIBRTMP_PROJECT != NO ]; then 783 if [ $SRS_EXPORT_LIBRTMP_PROJECT != NO ]; then
765 SRS_HLS=NO 784 SRS_HLS=NO
  785 + SRS_HDS=NO
766 SRS_DVR=NO 786 SRS_DVR=NO
767 SRS_NGINX=NO 787 SRS_NGINX=NO
768 SRS_SSL=NO 788 SRS_SSL=NO
@@ -792,8 +812,9 @@ function regenerate_options() { @@ -792,8 +812,9 @@ function regenerate_options() {
792 # save all config options to macro to write to auto headers file 812 # save all config options to macro to write to auto headers file
793 SRS_AUTO_USER_CONFIGURE="$opt" 813 SRS_AUTO_USER_CONFIGURE="$opt"
794 # regenerate the options for default values. 814 # regenerate the options for default values.
795 - SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}" 815 +SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}"
796 if [ $SRS_HLS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-hls"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-hls"; fi 816 if [ $SRS_HLS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-hls"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-hls"; fi
  817 + if [ $SRS_HDS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-hds"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-hds"; fi
797 if [ $SRS_DVR = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-dvr"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-dvr"; fi 818 if [ $SRS_DVR = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-dvr"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-dvr"; fi
798 if [ $SRS_NGINX = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-nginx"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-nginx"; fi 819 if [ $SRS_NGINX = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-nginx"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-nginx"; fi
799 if [ $SRS_SSL = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ssl"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ssl"; fi 820 if [ $SRS_SSL = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ssl"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ssl"; fi
@@ -874,6 +895,7 @@ function check_option_conflicts() { @@ -874,6 +895,7 @@ function check_option_conflicts() {
874 895
875 # check variable neccessary 896 # check variable neccessary
876 if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi 897 if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi
  898 + if [ $SRS_HDS = RESERVED ]; then echo "you must specifies the hds, see: ./configure --help"; __check_ok=NO; fi
877 if [ $SRS_DVR = RESERVED ]; then echo "you must specifies the dvr, see: ./configure --help"; __check_ok=NO; fi 899 if [ $SRS_DVR = RESERVED ]; then echo "you must specifies the dvr, see: ./configure --help"; __check_ok=NO; fi
878 if [ $SRS_NGINX = RESERVED ]; then echo "you must specifies the nginx, see: ./configure --help"; __check_ok=NO; fi 900 if [ $SRS_NGINX = RESERVED ]; then echo "you must specifies the nginx, see: ./configure --help"; __check_ok=NO; fi
879 if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi 901 if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi
@@ -554,6 +554,24 @@ vhost no-hls.srs.com { @@ -554,6 +554,24 @@ vhost no-hls.srs.com {
554 } 554 }
555 } 555 }
556 556
  557 +# the vhost with adobe hds
  558 +vhost hds.srs.com {
  559 + hds {
  560 + # whether hds enabled
  561 + # default: off
  562 + enabled on;
  563 + # the hds fragment in seconds.
  564 + # default: 10
  565 + hds_fragment 10;
  566 + # the hds window in seconds, erase the segment when exceed the window.
  567 + # default: 60
  568 + hds_window 60;
  569 + # the path to store the hds files.
  570 + # default: ./objs/nginx/html
  571 + hds_path ./objs/nginx/html;
  572 + }
  573 +}
  574 +
557 # the http hook callback vhost, srs will invoke the hooks for specified events. 575 # the http hook callback vhost, srs will invoke the hooks for specified events.
558 vhost hooks.callback.srs.com { 576 vhost hooks.callback.srs.com {
559 http_hooks { 577 http_hooks {
@@ -493,6 +493,11 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then @@ -493,6 +493,11 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
493 else 493 else
494 echo -e "${YELLOW}warning: without HLS support${BLACK}" 494 echo -e "${YELLOW}warning: without HLS support${BLACK}"
495 fi 495 fi
  496 + if [ $SRS_HDS = YES ]; then
  497 + echo -e "${GREEN}HDS is enabled${BLACK}"
  498 + else
  499 + echo -e "${YELLOW}warning: without HDS support${BLACK}"
  500 + fi
496 if [ $SRS_NGINX = YES ]; then 501 if [ $SRS_NGINX = YES ]; then
497 echo -e "${GREEN}Nginx http server is enabled${BLACK}" 502 echo -e "${GREEN}Nginx http server is enabled${BLACK}"
498 else 503 else
@@ -74,6 +74,7 @@ @@ -74,6 +74,7 @@
74 3C1232EA1AAEA5D000CE8F6C /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C1232E81AAEA5D000CE8F6C /* libssl.a */; }; 74 3C1232EA1AAEA5D000CE8F6C /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C1232E81AAEA5D000CE8F6C /* libssl.a */; };
75 3C1232ED1AAEA70F00CE8F6C /* libhttp_parser.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C1232EC1AAEA70F00CE8F6C /* libhttp_parser.a */; }; 75 3C1232ED1AAEA70F00CE8F6C /* libhttp_parser.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C1232EC1AAEA70F00CE8F6C /* libhttp_parser.a */; };
76 3C1EE6AE1AB1055800576EE9 /* srs_app_hds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1EE6AC1AB1055800576EE9 /* srs_app_hds.cpp */; }; 76 3C1EE6AE1AB1055800576EE9 /* srs_app_hds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1EE6AC1AB1055800576EE9 /* srs_app_hds.cpp */; };
  77 + 3C1EE6D71AB1367D00576EE9 /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 3C1EE6D61AB1367D00576EE9 /* README.md */; };
77 3C663F0E1AB0155100286D8B /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F011AB0155100286D8B /* Makefile */; }; 78 3C663F0E1AB0155100286D8B /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F011AB0155100286D8B /* Makefile */; };
78 3C663F0F1AB0155100286D8B /* srs_aac_raw_publish.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F021AB0155100286D8B /* srs_aac_raw_publish.c */; }; 79 3C663F0F1AB0155100286D8B /* srs_aac_raw_publish.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F021AB0155100286D8B /* srs_aac_raw_publish.c */; };
79 3C663F101AB0155100286D8B /* srs_audio_raw_publish.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F031AB0155100286D8B /* srs_audio_raw_publish.c */; }; 80 3C663F101AB0155100286D8B /* srs_audio_raw_publish.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F031AB0155100286D8B /* srs_audio_raw_publish.c */; };
@@ -102,7 +103,7 @@ @@ -102,7 +103,7 @@
102 /* End PBXCopyFilesBuildPhase section */ 103 /* End PBXCopyFilesBuildPhase section */
103 104
104 /* Begin PBXFileReference section */ 105 /* Begin PBXFileReference section */
105 - 3C1231E51AAE64A400CE8F6C /* srs_xcode */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; includeInIndex = 0; path = srs_xcode; sourceTree = BUILT_PRODUCTS_DIR; }; 106 + 3C1231E51AAE64A400CE8F6C /* srs_xcode */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = srs_xcode; sourceTree = BUILT_PRODUCTS_DIR; };
106 3C1231F01AAE652C00CE8F6C /* srs_core_autofree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_core_autofree.cpp; path = ../../../src/core/srs_core_autofree.cpp; sourceTree = "<group>"; }; 107 3C1231F01AAE652C00CE8F6C /* srs_core_autofree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_core_autofree.cpp; path = ../../../src/core/srs_core_autofree.cpp; sourceTree = "<group>"; };
107 3C1231F11AAE652C00CE8F6C /* srs_core_autofree.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_core_autofree.hpp; path = ../../../src/core/srs_core_autofree.hpp; sourceTree = "<group>"; }; 108 3C1231F11AAE652C00CE8F6C /* srs_core_autofree.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_core_autofree.hpp; path = ../../../src/core/srs_core_autofree.hpp; sourceTree = "<group>"; };
108 3C1231F21AAE652C00CE8F6C /* srs_core_performance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_core_performance.cpp; path = ../../../src/core/srs_core_performance.cpp; sourceTree = "<group>"; }; 109 3C1231F21AAE652C00CE8F6C /* srs_core_performance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_core_performance.cpp; path = ../../../src/core/srs_core_performance.cpp; sourceTree = "<group>"; };
@@ -238,7 +239,7 @@ @@ -238,7 +239,7 @@
238 3C1232C21AAE827E00CE8F6C /* libs.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = libs.sh; path = ../../../auto/libs.sh; sourceTree = "<group>"; }; 239 3C1232C21AAE827E00CE8F6C /* libs.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = libs.sh; path = ../../../auto/libs.sh; sourceTree = "<group>"; };
239 3C1232C31AAE827E00CE8F6C /* local_ip.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = local_ip.sh; path = ../../../auto/local_ip.sh; sourceTree = "<group>"; }; 240 3C1232C31AAE827E00CE8F6C /* local_ip.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = local_ip.sh; path = ../../../auto/local_ip.sh; sourceTree = "<group>"; };
240 3C1232C41AAE827E00CE8F6C /* modules.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = modules.sh; path = ../../../auto/modules.sh; sourceTree = "<group>"; }; 241 3C1232C41AAE827E00CE8F6C /* modules.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = modules.sh; path = ../../../auto/modules.sh; sourceTree = "<group>"; };
241 - 3C1232C51AAE827E00CE8F6C /* options.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = options.sh; path = ../../../auto/options.sh; sourceTree = "<group>"; }; 242 + 3C1232C51AAE827E00CE8F6C /* options.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = options.sh; path = ../../../auto/options.sh; sourceTree = "<group>"; wrapsLines = 0; };
242 3C1232C61AAE827E00CE8F6C /* summary.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = summary.sh; path = ../../../auto/summary.sh; sourceTree = "<group>"; }; 243 3C1232C61AAE827E00CE8F6C /* summary.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = summary.sh; path = ../../../auto/summary.sh; sourceTree = "<group>"; };
243 3C1232C71AAE827E00CE8F6C /* utest.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = utest.sh; path = ../../../auto/utest.sh; sourceTree = "<group>"; }; 244 3C1232C71AAE827E00CE8F6C /* utest.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = utest.sh; path = ../../../auto/utest.sh; sourceTree = "<group>"; };
244 3C1232C81AAE833300CE8F6C /* _log.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = _log.sh; path = ../../../scripts/_log.sh; sourceTree = "<group>"; }; 245 3C1232C81AAE833300CE8F6C /* _log.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = _log.sh; path = ../../../scripts/_log.sh; sourceTree = "<group>"; };
@@ -261,6 +262,44 @@ @@ -261,6 +262,44 @@
261 3C1232F41AAEAC7000CE8F6C /* srs-demo-19350 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "srs-demo-19350"; path = "../../../etc/init.d/srs-demo-19350"; sourceTree = "<group>"; }; 262 3C1232F41AAEAC7000CE8F6C /* srs-demo-19350 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "srs-demo-19350"; path = "../../../etc/init.d/srs-demo-19350"; sourceTree = "<group>"; };
262 3C1EE6AC1AB1055800576EE9 /* srs_app_hds.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_hds.cpp; path = ../../../src/app/srs_app_hds.cpp; sourceTree = "<group>"; }; 263 3C1EE6AC1AB1055800576EE9 /* srs_app_hds.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_hds.cpp; path = ../../../src/app/srs_app_hds.cpp; sourceTree = "<group>"; };
263 3C1EE6AD1AB1055800576EE9 /* srs_app_hds.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_hds.hpp; path = ../../../src/app/srs_app_hds.hpp; sourceTree = "<group>"; }; 264 3C1EE6AD1AB1055800576EE9 /* srs_app_hds.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_hds.hpp; path = ../../../src/app/srs_app_hds.hpp; sourceTree = "<group>"; };
  265 + 3C1EE6B01AB1080900576EE9 /* bandwidth.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = bandwidth.conf; path = ../../../conf/bandwidth.conf; sourceTree = "<group>"; };
  266 + 3C1EE6B11AB1080900576EE9 /* console.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = console.conf; path = ../../../conf/console.conf; sourceTree = "<group>"; };
  267 + 3C1EE6B21AB1080900576EE9 /* demo.19350.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = demo.19350.conf; path = ../../../conf/demo.19350.conf; sourceTree = "<group>"; };
  268 + 3C1EE6B31AB1080900576EE9 /* demo.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = demo.conf; path = ../../../conf/demo.conf; sourceTree = "<group>"; };
  269 + 3C1EE6B41AB1080900576EE9 /* dvr.path.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = dvr.path.conf; path = ../../../conf/dvr.path.conf; sourceTree = "<group>"; };
  270 + 3C1EE6B51AB1080900576EE9 /* dvr.segment.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = dvr.segment.conf; path = ../../../conf/dvr.segment.conf; sourceTree = "<group>"; };
  271 + 3C1EE6B61AB1080900576EE9 /* dvr.session.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = dvr.session.conf; path = ../../../conf/dvr.session.conf; sourceTree = "<group>"; };
  272 + 3C1EE6B71AB1080900576EE9 /* edge.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = edge.conf; path = ../../../conf/edge.conf; sourceTree = "<group>"; };
  273 + 3C1EE6B81AB1080900576EE9 /* edge.token.traverse.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = edge.token.traverse.conf; path = ../../../conf/edge.token.traverse.conf; sourceTree = "<group>"; };
  274 + 3C1EE6B91AB1080900576EE9 /* ffmpeg.transcode.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ffmpeg.transcode.conf; path = ../../../conf/ffmpeg.transcode.conf; sourceTree = "<group>"; };
  275 + 3C1EE6BA1AB1080900576EE9 /* forward.master.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = forward.master.conf; path = ../../../conf/forward.master.conf; sourceTree = "<group>"; };
  276 + 3C1EE6BB1AB1080900576EE9 /* forward.slave.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = forward.slave.conf; path = ../../../conf/forward.slave.conf; sourceTree = "<group>"; };
  277 + 3C1EE6BC1AB1080900576EE9 /* full.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = full.conf; path = ../../../conf/full.conf; sourceTree = "<group>"; };
  278 + 3C1EE6BD1AB1080900576EE9 /* hds.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = hds.conf; path = ../../../conf/hds.conf; sourceTree = "<group>"; };
  279 + 3C1EE6BE1AB1080900576EE9 /* hls.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = hls.conf; path = ../../../conf/hls.conf; sourceTree = "<group>"; };
  280 + 3C1EE6BF1AB1080900576EE9 /* http.aac.live.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = http.aac.live.conf; path = ../../../conf/http.aac.live.conf; sourceTree = "<group>"; };
  281 + 3C1EE6C01AB1080900576EE9 /* http.flv.live.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = http.flv.live.conf; path = ../../../conf/http.flv.live.conf; sourceTree = "<group>"; };
  282 + 3C1EE6C11AB1080900576EE9 /* http.heartbeat.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = http.heartbeat.conf; path = ../../../conf/http.heartbeat.conf; sourceTree = "<group>"; };
  283 + 3C1EE6C21AB1080900576EE9 /* http.hls.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = http.hls.conf; path = ../../../conf/http.hls.conf; sourceTree = "<group>"; };
  284 + 3C1EE6C31AB1080900576EE9 /* http.hooks.callback.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = http.hooks.callback.conf; path = ../../../conf/http.hooks.callback.conf; sourceTree = "<group>"; };
  285 + 3C1EE6C41AB1080900576EE9 /* http.mp3.live.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = http.mp3.live.conf; path = ../../../conf/http.mp3.live.conf; sourceTree = "<group>"; };
  286 + 3C1EE6C51AB1080900576EE9 /* http.server.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = http.server.conf; path = ../../../conf/http.server.conf; sourceTree = "<group>"; };
  287 + 3C1EE6C61AB1080900576EE9 /* http.ts.live.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = http.ts.live.conf; path = ../../../conf/http.ts.live.conf; sourceTree = "<group>"; };
  288 + 3C1EE6C71AB1080900576EE9 /* ingest.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ingest.conf; path = ../../../conf/ingest.conf; sourceTree = "<group>"; };
  289 + 3C1EE6C81AB1080900576EE9 /* mac.dev.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = mac.dev.conf; path = ../../../conf/mac.dev.conf; sourceTree = "<group>"; };
  290 + 3C1EE6C91AB1080900576EE9 /* origin.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = origin.conf; path = ../../../conf/origin.conf; sourceTree = "<group>"; };
  291 + 3C1EE6CA1AB1080900576EE9 /* push.mpegts.over.udp.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = push.mpegts.over.udp.conf; path = ../../../conf/push.mpegts.over.udp.conf; sourceTree = "<group>"; };
  292 + 3C1EE6CB1AB1080900576EE9 /* push.rtsp.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = push.rtsp.conf; path = ../../../conf/push.rtsp.conf; sourceTree = "<group>"; };
  293 + 3C1EE6CC1AB1080900576EE9 /* ram.hls.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ram.hls.conf; path = ../../../conf/ram.hls.conf; sourceTree = "<group>"; };
  294 + 3C1EE6CD1AB1080900576EE9 /* realtime.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = realtime.conf; path = ../../../conf/realtime.conf; sourceTree = "<group>"; };
  295 + 3C1EE6CE1AB1080900576EE9 /* rtmp.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rtmp.conf; path = ../../../conf/rtmp.conf; sourceTree = "<group>"; };
  296 + 3C1EE6CF1AB1080900576EE9 /* security.deny.publish.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = security.deny.publish.conf; path = ../../../conf/security.deny.publish.conf; sourceTree = "<group>"; };
  297 + 3C1EE6D01AB1080900576EE9 /* srs.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = srs.conf; path = ../../../conf/srs.conf; sourceTree = "<group>"; };
  298 + 3C1EE6D11AB1080900576EE9 /* transcode2hls.audio.only.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = transcode2hls.audio.only.conf; path = ../../../conf/transcode2hls.audio.only.conf; sourceTree = "<group>"; };
  299 + 3C1EE6D31AB1367D00576EE9 /* AUTHORS.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = AUTHORS.txt; path = ../../../AUTHORS.txt; sourceTree = "<group>"; };
  300 + 3C1EE6D41AB1367D00576EE9 /* DONATIONS.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DONATIONS.txt; path = ../../../DONATIONS.txt; sourceTree = "<group>"; };
  301 + 3C1EE6D51AB1367D00576EE9 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE; path = ../../../LICENSE; sourceTree = "<group>"; };
  302 + 3C1EE6D61AB1367D00576EE9 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../../../README.md; sourceTree = "<group>"; wrapsLines = 0; };
264 3C663F011AB0155100286D8B /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../../../research/librtmp/Makefile; sourceTree = "<group>"; }; 303 3C663F011AB0155100286D8B /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../../../research/librtmp/Makefile; sourceTree = "<group>"; };
265 3C663F021AB0155100286D8B /* srs_aac_raw_publish.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_aac_raw_publish.c; path = ../../../research/librtmp/srs_aac_raw_publish.c; sourceTree = "<group>"; }; 304 3C663F021AB0155100286D8B /* srs_aac_raw_publish.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_aac_raw_publish.c; path = ../../../research/librtmp/srs_aac_raw_publish.c; sourceTree = "<group>"; };
266 3C663F031AB0155100286D8B /* srs_audio_raw_publish.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_audio_raw_publish.c; path = ../../../research/librtmp/srs_audio_raw_publish.c; sourceTree = "<group>"; }; 305 3C663F031AB0155100286D8B /* srs_audio_raw_publish.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_audio_raw_publish.c; path = ../../../research/librtmp/srs_audio_raw_publish.c; sourceTree = "<group>"; };
@@ -294,6 +333,7 @@ @@ -294,6 +333,7 @@
294 3C1231DC1AAE64A400CE8F6C = { 333 3C1231DC1AAE64A400CE8F6C = {
295 isa = PBXGroup; 334 isa = PBXGroup;
296 children = ( 335 children = (
  336 + 3C1EE6D21AB1366500576EE9 /* doc */,
297 3C1231E61AAE64A400CE8F6C /* Products */, 337 3C1231E61AAE64A400CE8F6C /* Products */,
298 3C1232EE1AAEA71C00CE8F6C /* links */, 338 3C1232EE1AAEA71C00CE8F6C /* links */,
299 3C1231E71AAE64A400CE8F6C /* srs_xcode */, 339 3C1231E71AAE64A400CE8F6C /* srs_xcode */,
@@ -313,6 +353,7 @@ @@ -313,6 +353,7 @@
313 isa = PBXGroup; 353 isa = PBXGroup;
314 children = ( 354 children = (
315 3C1232B81AAE824500CE8F6C /* configure */, 355 3C1232B81AAE824500CE8F6C /* configure */,
  356 + 3C1EE6AF1AB107EE00576EE9 /* conf */,
316 3C1232EF1AAEAC5800CE8F6C /* etc */, 357 3C1232EF1AAEAC5800CE8F6C /* etc */,
317 3C1232BA1AAE826F00CE8F6C /* auto */, 358 3C1232BA1AAE826F00CE8F6C /* auto */,
318 3C1232B91AAE825100CE8F6C /* scripts */, 359 3C1232B91AAE825100CE8F6C /* scripts */,
@@ -561,6 +602,58 @@ @@ -561,6 +602,58 @@
561 name = init.d; 602 name = init.d;
562 sourceTree = "<group>"; 603 sourceTree = "<group>";
563 }; 604 };
  605 + 3C1EE6AF1AB107EE00576EE9 /* conf */ = {
  606 + isa = PBXGroup;
  607 + children = (
  608 + 3C1EE6B01AB1080900576EE9 /* bandwidth.conf */,
  609 + 3C1EE6B11AB1080900576EE9 /* console.conf */,
  610 + 3C1EE6B21AB1080900576EE9 /* demo.19350.conf */,
  611 + 3C1EE6B31AB1080900576EE9 /* demo.conf */,
  612 + 3C1EE6B41AB1080900576EE9 /* dvr.path.conf */,
  613 + 3C1EE6B51AB1080900576EE9 /* dvr.segment.conf */,
  614 + 3C1EE6B61AB1080900576EE9 /* dvr.session.conf */,
  615 + 3C1EE6B71AB1080900576EE9 /* edge.conf */,
  616 + 3C1EE6B81AB1080900576EE9 /* edge.token.traverse.conf */,
  617 + 3C1EE6B91AB1080900576EE9 /* ffmpeg.transcode.conf */,
  618 + 3C1EE6BA1AB1080900576EE9 /* forward.master.conf */,
  619 + 3C1EE6BB1AB1080900576EE9 /* forward.slave.conf */,
  620 + 3C1EE6BC1AB1080900576EE9 /* full.conf */,
  621 + 3C1EE6BD1AB1080900576EE9 /* hds.conf */,
  622 + 3C1EE6BE1AB1080900576EE9 /* hls.conf */,
  623 + 3C1EE6BF1AB1080900576EE9 /* http.aac.live.conf */,
  624 + 3C1EE6C01AB1080900576EE9 /* http.flv.live.conf */,
  625 + 3C1EE6C11AB1080900576EE9 /* http.heartbeat.conf */,
  626 + 3C1EE6C21AB1080900576EE9 /* http.hls.conf */,
  627 + 3C1EE6C31AB1080900576EE9 /* http.hooks.callback.conf */,
  628 + 3C1EE6C41AB1080900576EE9 /* http.mp3.live.conf */,
  629 + 3C1EE6C51AB1080900576EE9 /* http.server.conf */,
  630 + 3C1EE6C61AB1080900576EE9 /* http.ts.live.conf */,
  631 + 3C1EE6C71AB1080900576EE9 /* ingest.conf */,
  632 + 3C1EE6C81AB1080900576EE9 /* mac.dev.conf */,
  633 + 3C1EE6C91AB1080900576EE9 /* origin.conf */,
  634 + 3C1EE6CA1AB1080900576EE9 /* push.mpegts.over.udp.conf */,
  635 + 3C1EE6CB1AB1080900576EE9 /* push.rtsp.conf */,
  636 + 3C1EE6CC1AB1080900576EE9 /* ram.hls.conf */,
  637 + 3C1EE6CD1AB1080900576EE9 /* realtime.conf */,
  638 + 3C1EE6CE1AB1080900576EE9 /* rtmp.conf */,
  639 + 3C1EE6CF1AB1080900576EE9 /* security.deny.publish.conf */,
  640 + 3C1EE6D01AB1080900576EE9 /* srs.conf */,
  641 + 3C1EE6D11AB1080900576EE9 /* transcode2hls.audio.only.conf */,
  642 + );
  643 + name = conf;
  644 + sourceTree = "<group>";
  645 + };
  646 + 3C1EE6D21AB1366500576EE9 /* doc */ = {
  647 + isa = PBXGroup;
  648 + children = (
  649 + 3C1EE6D31AB1367D00576EE9 /* AUTHORS.txt */,
  650 + 3C1EE6D41AB1367D00576EE9 /* DONATIONS.txt */,
  651 + 3C1EE6D51AB1367D00576EE9 /* LICENSE */,
  652 + 3C1EE6D61AB1367D00576EE9 /* README.md */,
  653 + );
  654 + name = doc;
  655 + sourceTree = "<group>";
  656 + };
564 3C663F001AB014B500286D8B /* research */ = { 657 3C663F001AB014B500286D8B /* research */ = {
565 isa = PBXGroup; 658 isa = PBXGroup;
566 children = ( 659 children = (
@@ -669,6 +762,7 @@ @@ -669,6 +762,7 @@
669 3C1232AB1AAE81D900CE8F6C /* srs_app_recv_thread.cpp in Sources */, 762 3C1232AB1AAE81D900CE8F6C /* srs_app_recv_thread.cpp in Sources */,
670 3C663F151AB0155100286D8B /* srs_h264_raw_publish.c in Sources */, 763 3C663F151AB0155100286D8B /* srs_h264_raw_publish.c in Sources */,
671 3C1231F61AAE652D00CE8F6C /* srs_core_autofree.cpp in Sources */, 764 3C1231F61AAE652D00CE8F6C /* srs_core_autofree.cpp in Sources */,
  765 + 3C1EE6D71AB1367D00576EE9 /* README.md in Sources */,
672 3C1232411AAE81A400CE8F6C /* srs_raw_avc.cpp in Sources */, 766 3C1232411AAE81A400CE8F6C /* srs_raw_avc.cpp in Sources */,
673 3C1232491AAE81A400CE8F6C /* srs_rtmp_utility.cpp in Sources */, 767 3C1232491AAE81A400CE8F6C /* srs_rtmp_utility.cpp in Sources */,
674 3C663F191AB0155100286D8B /* srs_publish.c in Sources */, 768 3C663F191AB0155100286D8B /* srs_publish.c in Sources */,
@@ -2,7 +2,6 @@ @@ -2,7 +2,6 @@
2 The MIT License (MIT) 2 The MIT License (MIT)
3 3
4 Copyright (c) 2013-2015 wenjiegit 4 Copyright (c) 2013-2015 wenjiegit
5 -Copyright (c) 2013-2015 winlin  
6 5
7 Permission is hereby granted, free of charge, to any person obtaining a copy of 6 Permission is hereby granted, free of charge, to any person obtaining a copy of
8 this software and associated documentation files (the "Software"), to deal in 7 this software and associated documentation files (the "Software"), to deal in
@@ -23,12 +22,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -23,12 +22,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */ 22 */
24 #include <srs_app_hds.hpp> 23 #include <srs_app_hds.hpp>
25 24
  25 +#ifdef SRS_AUTO_HDS
  26 +
26 #include <unistd.h> 27 #include <unistd.h>
27 #include <string> 28 #include <string>
28 #include <vector> 29 #include <vector>
29 #include <sys/types.h> 30 #include <sys/types.h>
30 #include <sys/stat.h> 31 #include <sys/stat.h>
31 #include <fcntl.h> 32 #include <fcntl.h>
  33 +using namespace std;
32 34
33 #include <srs_app_hds.hpp> 35 #include <srs_app_hds.hpp>
34 #include <srs_rtmp_sdk.hpp> 36 #include <srs_rtmp_sdk.hpp>
@@ -40,8 +42,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -40,8 +42,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40 #include <srs_kernel_utility.hpp> 42 #include <srs_kernel_utility.hpp>
41 #include <srs_app_config.hpp> 43 #include <srs_app_config.hpp>
42 44
43 -using namespace std;  
44 -  
45 static void update_box(char *start, int size) 45 static void update_box(char *start, int size)
46 { 46 {
47 char *p_size = (char*)&size; 47 char *p_size = (char*)&size;
@@ -720,3 +720,5 @@ void SrsHds::adjust_windows() @@ -720,3 +720,5 @@ void SrsHds::adjust_windows()
720 srs_freep(fragment); 720 srs_freep(fragment);
721 } 721 }
722 } 722 }
  723 +
  724 +#endif
@@ -2,7 +2,6 @@ @@ -2,7 +2,6 @@
2 The MIT License (MIT) 2 The MIT License (MIT)
3 3
4 Copyright (c) 2013-2015 wenjiegit 4 Copyright (c) 2013-2015 wenjiegit
5 -Copyright (c) 2013-2015 winlin  
6 5
7 Permission is hereby granted, free of charge, to any person obtaining a copy of 6 Permission is hereby granted, free of charge, to any person obtaining a copy of
8 this software and associated documentation files (the "Software"), to deal in 7 this software and associated documentation files (the "Software"), to deal in
@@ -27,6 +26,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -27,6 +26,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 26
28 #include <srs_core.hpp> 27 #include <srs_core.hpp>
29 28
  29 +#ifdef SRS_AUTO_HDS
  30 +
30 #include <list> 31 #include <list>
31 32
32 class SrsRequest; 33 class SrsRequest;
@@ -62,4 +63,6 @@ private: @@ -62,4 +63,6 @@ private:
62 SrsRequest *hds_req; 63 SrsRequest *hds_req;
63 }; 64 };
64 65
65 -#endif // SRS_APP_HDS_HPP 66 +#endif
  67 +
  68 +#endif
@@ -782,8 +782,9 @@ SrsSource::SrsSource() @@ -782,8 +782,9 @@ SrsSource::SrsSource()
782 #ifdef SRS_AUTO_TRANSCODE 782 #ifdef SRS_AUTO_TRANSCODE
783 encoder = new SrsEncoder(); 783 encoder = new SrsEncoder();
784 #endif 784 #endif
785 - 785 +#ifdef SRS_AUTO_HDS
786 hds = new SrsHds(this); 786 hds = new SrsHds(this);
  787 +#endif
787 788
788 cache_metadata = cache_sh_video = cache_sh_audio = NULL; 789 cache_metadata = cache_sh_video = cache_sh_audio = NULL;
789 790
@@ -835,6 +836,9 @@ SrsSource::~SrsSource() @@ -835,6 +836,9 @@ SrsSource::~SrsSource()
835 #ifdef SRS_AUTO_TRANSCODE 836 #ifdef SRS_AUTO_TRANSCODE
836 srs_freep(encoder); 837 srs_freep(encoder);
837 #endif 838 #endif
  839 +#ifdef SRS_AUTO_HDS
  840 + srs_freep(hds);
  841 +#endif
838 842
839 srs_freep(_req); 843 srs_freep(_req);
840 } 844 }
@@ -1349,14 +1353,16 @@ int SrsSource::on_audio(SrsCommonMessage* __audio) @@ -1349,14 +1353,16 @@ int SrsSource::on_audio(SrsCommonMessage* __audio)
1349 } 1353 }
1350 #endif 1354 #endif
1351 1355
  1356 +#ifdef SRS_AUTO_HDS
1352 if ((ret = hds->on_audio(&msg)) != ERROR_SUCCESS) { 1357 if ((ret = hds->on_audio(&msg)) != ERROR_SUCCESS) {
  1358 + srs_warn("hds process audio message failed, ignore and disable dvr. ret=%d", ret);
  1359 +
1353 // unpublish, ignore ret. 1360 // unpublish, ignore ret.
1354 hds->on_unpublish(); 1361 hds->on_unpublish();
1355 // ignore. 1362 // ignore.
1356 ret = ERROR_SUCCESS; 1363 ret = ERROR_SUCCESS;
1357 -  
1358 - srs_warn("hds process audio message failed, ignore and disable dvr. ret=%d", ret);  
1359 } 1364 }
  1365 +#endif
1360 1366
1361 // copy to all consumer 1367 // copy to all consumer
1362 int nb_consumers = (int)consumers.size(); 1368 int nb_consumers = (int)consumers.size();
@@ -1498,14 +1504,16 @@ int SrsSource::on_video(SrsCommonMessage* __video) @@ -1498,14 +1504,16 @@ int SrsSource::on_video(SrsCommonMessage* __video)
1498 } 1504 }
1499 #endif 1505 #endif
1500 1506
  1507 +#ifdef SRS_AUTO_HDS
1501 if ((ret = hds->on_video(&msg)) != ERROR_SUCCESS) { 1508 if ((ret = hds->on_video(&msg)) != ERROR_SUCCESS) {
  1509 + srs_warn("hds process video message failed, ignore and disable dvr. ret=%d", ret);
  1510 +
1502 // unpublish, ignore ret. 1511 // unpublish, ignore ret.
1503 hds->on_unpublish(); 1512 hds->on_unpublish();
1504 // ignore. 1513 // ignore.
1505 ret = ERROR_SUCCESS; 1514 ret = ERROR_SUCCESS;
1506 -  
1507 - srs_warn("hds process video message failed, ignore and disable dvr. ret=%d", ret);  
1508 } 1515 }
  1516 +#endif
1509 1517
1510 // copy to all consumer 1518 // copy to all consumer
1511 if (true) { 1519 if (true) {
@@ -1751,10 +1759,12 @@ int SrsSource::on_publish() @@ -1751,10 +1759,12 @@ int SrsSource::on_publish()
1751 } 1759 }
1752 #endif 1760 #endif
1753 1761
  1762 +#ifdef SRS_AUTO_HDS
1754 if ((ret = hds->on_publish(_req)) != ERROR_SUCCESS) { 1763 if ((ret = hds->on_publish(_req)) != ERROR_SUCCESS) {
1755 srs_error("start hds failed. ret=%d", ret); 1764 srs_error("start hds failed. ret=%d", ret);
1756 return ret; 1765 return ret;
1757 } 1766 }
  1767 +#endif
1758 1768
1759 // notify the handler. 1769 // notify the handler.
1760 srs_assert(handler); 1770 srs_assert(handler);
@@ -1783,7 +1793,9 @@ void SrsSource::on_unpublish() @@ -1783,7 +1793,9 @@ void SrsSource::on_unpublish()
1783 dvr->on_unpublish(); 1793 dvr->on_unpublish();
1784 #endif 1794 #endif
1785 1795
  1796 +#ifdef SRS_AUTO_HDS
1786 hds->on_unpublish(); 1797 hds->on_unpublish();
  1798 +#endif
1787 1799
1788 gop_cache->clear(); 1800 gop_cache->clear();
1789 1801
@@ -62,7 +62,9 @@ class SrsEncoder; @@ -62,7 +62,9 @@ class SrsEncoder;
62 #endif 62 #endif
63 class SrsStream; 63 class SrsStream;
64 class ISrsHlsHandler; 64 class ISrsHlsHandler;
  65 +#ifdef SRS_AUTO_HDS
65 class SrsHds; 66 class SrsHds;
  67 +#endif
66 68
67 /** 69 /**
68 * the time jitter algorithm: 70 * the time jitter algorithm:
@@ -417,7 +419,9 @@ private: @@ -417,7 +419,9 @@ private:
417 #ifdef SRS_AUTO_TRANSCODE 419 #ifdef SRS_AUTO_TRANSCODE
418 SrsEncoder* encoder; 420 SrsEncoder* encoder;
419 #endif 421 #endif
  422 +#ifdef SRS_AUTO_HDS
420 SrsHds *hds; 423 SrsHds *hds;
  424 +#endif
421 // edge control service 425 // edge control service
422 SrsPlayEdge* play_edge; 426 SrsPlayEdge* play_edge;
423 SrsPublishEdge* publish_edge; 427 SrsPublishEdge* publish_edge;
@@ -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 2 32 #define VERSION_MAJOR 2
33 #define VERSION_MINOR 0 33 #define VERSION_MINOR 0
34 -#define VERSION_REVISION 137 34 +#define VERSION_REVISION 138
35 35
36 // server info. 36 // server info.
37 #define RTMP_SIG_SRS_KEY "SRS" 37 #define RTMP_SIG_SRS_KEY "SRS"
@@ -72,6 +72,12 @@ void show_macro_features() @@ -72,6 +72,12 @@ void show_macro_features()
72 srs_warn("check feature hls: off"); 72 srs_warn("check feature hls: off");
73 #endif 73 #endif
74 74
  75 +#ifdef SRS_AUTO_HDS
  76 + srs_trace("check feature hds: on");
  77 +#else
  78 + srs_warn("check feature hds: off");
  79 +#endif
  80 +
75 #ifdef SRS_AUTO_HTTP_CALLBACK 81 #ifdef SRS_AUTO_HTTP_CALLBACK
76 srs_trace("check feature http callback: on"); 82 srs_trace("check feature http callback: on");
77 #else 83 #else