Skip to content

Commit

Permalink
for ossrs#328, support adobe hds. 2.0.138.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Mar 12, 2015
1 parent da56e4f commit ffef629
Show file tree
Hide file tree
Showing 13 changed files with 198 additions and 17 deletions.
2 changes: 1 addition & 1 deletion AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PRIMARY ordered by first contribution.
* winlin<winlin@vip.126.com> "Plan, arch, implement SRS1.0 and SRS2.0"

AUTHORS ordered by first contribution.
* wenjie.zhao<740936897@qq.com> "The bandwidth test module and bug fixed."
* wenjie.zhao<740936897@qq.com> "The bandwidth test module, HDS and bug fixed."

CONTRIBUTORS ordered by first contribution.
* xiangcheng.liu<liuxc0116@foxmail.com> "Bug fixed"
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Enjoy it!

SRS(SIMPLE RTMP Server) over state-threads created in 2013.10.

SRS delivers rtmp/hls/http live on x86/x64/arm/mips linux/osx,
SRS delivers rtmp/hls/http/hds live on x86/x64/arm/mips linux/osx,
supports origin/edge/vhost and transcode/ingest and dvr/forward
and http-api/http-callback/reload, introduces tracable
session-oriented log, exports client srs-librtmp,
Expand All @@ -56,6 +56,10 @@ HLS(
[CN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_DeliveryHLS),
[EN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_EN_DeliveryHLS)
),
HDS(
[CN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_DeliveryHDS),
[EN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_EN_DeliveryHDS)
),
HTTP(
[CN](https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DeliveryHttpStream),
[EN](https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DeliveryHttpStream)
Expand Down Expand Up @@ -509,6 +513,10 @@ Supported operating systems and hardware:
[#301](https://github.com/winlinvip/simple-rtmp-server/issues/301).
1. Rewrite HLS(h.264+aac/mp3) streaming, read
[#304](https://github.com/winlinvip/simple-rtmp-server/issues/304).
1. Support Adobe HDS(f4m)(
[CN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_DeliveryHDS),
[EN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_EN_DeliveryHDS)
) dynamic streaming.
1. [experiment] Support push MPEG-TS over UDP to SRS, read
[#250](https://github.com/winlinvip/simple-rtmp-server/issues/250).
1. [experiment] Support push RTSP to SRS, read
Expand Down Expand Up @@ -550,6 +558,7 @@ Supported operating systems and hardware:

### SRS 2.0 history

* v2.0, 2015-03-12, fix [#328](https://github.com/winlinvip/simple-rtmp-server/issues/328), support adobe hds. 2.0.138.
* 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.
* 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.
* 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.
Expand Down
6 changes: 6 additions & 0 deletions trunk/auto/auto_headers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ else
echo "#undef SRS_AUTO_HLS" >> $SRS_AUTO_HEADERS_H
fi

if [ $SRS_HDS = YES ]; then
echo "#define SRS_AUTO_HDS" >> $SRS_AUTO_HEADERS_H
else
echo "#undef SRS_AUTO_HDS" >> $SRS_AUTO_HEADERS_H
fi

if [ $SRS_HTTP_CALLBACK = YES ]; then
echo "#define SRS_AUTO_HTTP_CALLBACK" >> $SRS_AUTO_HEADERS_H
else
Expand Down
26 changes: 24 additions & 2 deletions trunk/auto/options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ help=no
################################################################
# feature options
SRS_HLS=RESERVED
SRS_HDS=RESERVED
SRS_DVR=RESERVED
SRS_NGINX=RESERVED
SRS_SSL=RESERVED
Expand Down Expand Up @@ -112,6 +113,7 @@ Options:
--with-ssl enable rtmp complex handshake, requires openssl-devel installed.
to delivery h264 video and aac audio to flash player.
--with-hls enable hls streaming, mux RTMP to m3u8/ts files.
--with-hds enable hds streaming, mux RTMP to f4m/f4v files.
--with-dvr enable dvr, mux RTMP to flv files.
--with-nginx enable delivery HTTP stream with nginx.
build nginx at: ./objs/nginx/sbin/nginx
Expand All @@ -137,7 +139,8 @@ Options:
--with-arm-ubuntu12 build SRS on ubuntu12 for armhf(v7cpu).
--without-ssl disable rtmp complex handshake.
--without-hls disable hls, rtmp streaming only.
--without-hls disable hls, the apple http live streaming.
--without-hds disable hds, the adobe http dynamic streaming.
--without-dvr disable dvr, donot support record RTMP stream to flv.
--without-nginx disable delivery HTTP stream with nginx.
--without-http-callback disable http, http hooks callback.
Expand Down Expand Up @@ -211,6 +214,7 @@ function parse_user_option() {

--with-ssl) SRS_SSL=YES ;;
--with-hls) SRS_HLS=YES ;;
--with-hds) SRS_HDS=YES ;;
--with-dvr) SRS_DVR=YES ;;
--with-nginx) SRS_NGINX=YES ;;
--with-ffmpeg) SRS_FFMPEG_TOOL=YES ;;
Expand All @@ -234,6 +238,7 @@ function parse_user_option() {

--without-ssl) SRS_SSL=NO ;;
--without-hls) SRS_HLS=NO ;;
--without-hds) SRS_HDS=NO ;;
--without-dvr) SRS_DVR=NO ;;
--without-nginx) SRS_NGINX=NO ;;
--without-ffmpeg) SRS_FFMPEG_TOOL=NO ;;
Expand Down Expand Up @@ -363,6 +368,7 @@ function apply_user_presets() {
# all disabled.
if [ $SRS_DISABLE_ALL = YES ]; then
SRS_HLS=NO
SRS_HDS=NO
SRS_DVR=NO
SRS_NGINX=NO
SRS_SSL=NO
Expand All @@ -389,6 +395,7 @@ function apply_user_presets() {
# all enabled.
if [ $SRS_ENABLE_ALL = YES ]; then
SRS_HLS=YES
SRS_HDS=YES
SRS_DVR=YES
SRS_NGINX=YES
SRS_SSL=YES
Expand All @@ -415,6 +422,7 @@ function apply_user_presets() {
# only rtmp vp6
if [ $SRS_FAST = YES ]; then
SRS_HLS=NO
SRS_HDS=NO
SRS_DVR=NO
SRS_NGINX=NO
SRS_SSL=NO
Expand All @@ -441,6 +449,7 @@ function apply_user_presets() {
# all disabled.
if [ $SRS_RTMP_HLS = YES ]; then
SRS_HLS=YES
SRS_HDS=YES
SRS_DVR=NO
SRS_NGINX=NO
SRS_SSL=YES
Expand All @@ -467,6 +476,7 @@ function apply_user_presets() {
# only ssl for RTMP with complex handshake.
if [ $SRS_PURE_RTMP = YES ]; then
SRS_HLS=NO
SRS_HDS=NO
SRS_DVR=NO
SRS_NGINX=NO
SRS_SSL=YES
Expand All @@ -493,6 +503,7 @@ function apply_user_presets() {
# if arm specified, set some default to disabled.
if [ $SRS_ARM_UBUNTU12 = YES ]; then
SRS_HLS=YES
SRS_HDS=YES
SRS_DVR=YES
SRS_NGINX=NO
SRS_SSL=YES
Expand Down Expand Up @@ -520,6 +531,7 @@ function apply_user_presets() {
# if mips specified, set some default to disabled.
if [ $SRS_MIPS_UBUNTU12 = YES ]; then
SRS_HLS=YES
SRS_HDS=YES
SRS_DVR=YES
SRS_NGINX=NO
SRS_SSL=YES
Expand All @@ -546,6 +558,7 @@ function apply_user_presets() {
# defaults for x86/x64
if [ $SRS_X86_X64 = YES ]; then
SRS_HLS=YES
SRS_HDS=YES
SRS_DVR=YES
SRS_NGINX=NO
SRS_SSL=YES
Expand All @@ -572,6 +585,7 @@ function apply_user_presets() {
# for osx(darwin)
if [ $SRS_OSX = YES ]; then
SRS_HLS=YES
SRS_HDS=YES
SRS_DVR=YES
SRS_NGINX=NO
SRS_SSL=YES
Expand All @@ -598,6 +612,7 @@ function apply_user_presets() {
# if dev specified, open features if possible.
if [ $SRS_DEV = YES ]; then
SRS_HLS=YES
SRS_HDS=YES
SRS_DVR=YES
SRS_NGINX=NO
SRS_SSL=YES
Expand All @@ -624,6 +639,7 @@ function apply_user_presets() {
# if fast dev specified, open main server features.
if [ $SRS_FAST_DEV = YES ]; then
SRS_HLS=YES
SRS_HDS=YES
SRS_DVR=YES
SRS_NGINX=NO
SRS_SSL=YES
Expand All @@ -650,6 +666,7 @@ function apply_user_presets() {
# for srs demo
if [ $SRS_DEMO = YES ]; then
SRS_HLS=YES
SRS_HDS=YES
SRS_DVR=YES
SRS_NGINX=NO
SRS_SSL=YES
Expand All @@ -676,6 +693,7 @@ function apply_user_presets() {
# if raspberry-pi specified, open ssl/hls/static features
if [ $SRS_PI = YES ]; then
SRS_HLS=YES
SRS_HDS=YES
SRS_DVR=YES
SRS_NGINX=NO
SRS_SSL=YES
Expand All @@ -702,6 +720,7 @@ function apply_user_presets() {
# if cubieboard specified, open features except ffmpeg/nginx.
if [ $SRS_CUBIE = YES ]; then
SRS_HLS=YES
SRS_HDS=YES
SRS_DVR=YES
SRS_NGINX=NO
SRS_SSL=YES
Expand Down Expand Up @@ -763,6 +782,7 @@ function apply_user_detail_options() {
# disable almost all features for export srs-librtmp.
if [ $SRS_EXPORT_LIBRTMP_PROJECT != NO ]; then
SRS_HLS=NO
SRS_HDS=NO
SRS_DVR=NO
SRS_NGINX=NO
SRS_SSL=NO
Expand Down Expand Up @@ -792,8 +812,9 @@ function regenerate_options() {
# save all config options to macro to write to auto headers file
SRS_AUTO_USER_CONFIGURE="$opt"
# regenerate the options for default values.
SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}"
SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}"
if [ $SRS_HLS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-hls"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-hls"; fi
if [ $SRS_HDS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-hds"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-hds"; fi
if [ $SRS_DVR = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-dvr"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-dvr"; fi
if [ $SRS_NGINX = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-nginx"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-nginx"; fi
if [ $SRS_SSL = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ssl"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ssl"; fi
Expand Down Expand Up @@ -874,6 +895,7 @@ function check_option_conflicts() {

# check variable neccessary
if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi
if [ $SRS_HDS = RESERVED ]; then echo "you must specifies the hds, see: ./configure --help"; __check_ok=NO; fi
if [ $SRS_DVR = RESERVED ]; then echo "you must specifies the dvr, 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
Expand Down
18 changes: 18 additions & 0 deletions trunk/conf/full.conf
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,24 @@ vhost no-hls.srs.com {
}
}

# the vhost with adobe hds
vhost hds.srs.com {
hds {
# whether hds enabled
# default: off
enabled on;
# the hds fragment in seconds.
# default: 10
hds_fragment 10;
# the hds window in seconds, erase the segment when exceed the window.
# default: 60
hds_window 60;
# the path to store the hds files.
# default: ./objs/nginx/html
hds_path ./objs/nginx/html;
}
}

# the http hook callback vhost, srs will invoke the hooks for specified events.
vhost hooks.callback.srs.com {
http_hooks {
Expand Down
5 changes: 5 additions & 0 deletions trunk/configure
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,11 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
else
echo -e "${YELLOW}warning: without HLS support${BLACK}"
fi
if [ $SRS_HDS = YES ]; then
echo -e "${GREEN}HDS is enabled${BLACK}"
else
echo -e "${YELLOW}warning: without HDS support${BLACK}"
fi
if [ $SRS_NGINX = YES ]; then
echo -e "${GREEN}Nginx http server is enabled${BLACK}"
else
Expand Down
Loading

0 comments on commit ffef629

Please sign in to comment.