From dba983d124e56e06a3ffb936a76a78e6623152e3 Mon Sep 17 00:00:00 2001 From: winlin Date: Tue, 3 Feb 2015 16:29:59 +0800 Subject: [PATCH] for #136, update the config for ram hls. --- README.md | 3 ++- trunk/conf/full.conf | 12 ++++++------ trunk/conf/ram.hls.conf | 20 ++++++++++++++++++++ trunk/src/app/srs_app_hls.hpp | 1 + 4 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 trunk/conf/ram.hls.conf diff --git a/README.md b/README.md index 9d94f39d0..4f78ce0da 100755 --- a/README.md +++ b/README.md @@ -501,7 +501,7 @@ Supported operating systems and hardware: ## Releases * 2015-01-15, [Release v1.0r1](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0r1), bug fixed, 1.0.21, 59472 lines.
-* 2014-12-05, [Release v1.0](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0), all bug fixed, 1.0.10, 59391 lines.
+* 2014-12-05, [Release v1.0r0](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0r0), all bug fixed, 1.0.10, 59391 lines.
* 2014-10-09, [Release v1.0-beta](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0.beta), all bug fixed, 1.0.0, 59316 lines.
* 2014-08-03, [Release v1.0-mainline7](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0.mainline7), config utest, all bug fixed. 57432 lines.
* 2014-07-13, [Release v1.0-mainline6](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0.mainline6), core/kernel/rtmp utest, refine bandwidth(as/js/srslibrtmp library). 50029 lines.
@@ -525,6 +525,7 @@ Supported operating systems and hardware: ### SRS 2.0 history +* v2.0, 2015-02-03, fix [#136](https://github.com/winlinvip/simple-rtmp-server/issues/136), support hls without io(in ram). 2.0.112 * v2.0, 2015-01-31, for [#250](https://github.com/winlinvip/simple-rtmp-server/issues/250), support push MPEGTS over UDP to SRS. 2.0.111 * v2.0, 2015-01-29, build libfdk-aac in ffmpeg. 2.0.108 * v2.0, 2015-01-25, for [#301](https://github.com/winlinvip/simple-rtmp-server/issues/301), hls support h.264+mp3, ok for vlc. 2.0.107 diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index aade09c8a..fb2675545 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -461,6 +461,12 @@ vhost with-hls.srs.com { # @see https://github.com/winlinvip/simple-rtmp-server/issues/264 # default: ignore hls_on_error ignore; + # the hls storage: disk, ram or both. + # disk, to write hls m3u8/ts to disk. + # ram, serve m3u8/ts in memory, which use embeded http server to delivery. + # both, disk and ram. + # default: disk + hls_storage disk; # the hls output path. # the app dir is auto created under the hls_path. # for example, for rtmp stream: @@ -473,12 +479,6 @@ vhost with-hls.srs.com { # in a word, the hls_path is for vhost. # default: ./objs/nginx/html hls_path ./objs/nginx/html; - # the hls storage: disk, ram or both. - # disk, to write hls m3u8/ts to disk. - # ram, serve m3u8/ts in memory, which use embeded http server to delivery. - # both, disk and ram. - # default: disk - hls_storage disk; # the hls mount for hls_storage ram, # which use srs embeded http server to delivery HLS, # where the mount specifies the HTTP url to mount. diff --git a/trunk/conf/ram.hls.conf b/trunk/conf/ram.hls.conf new file mode 100644 index 000000000..6b1aa1ad3 --- /dev/null +++ b/trunk/conf/ram.hls.conf @@ -0,0 +1,20 @@ +# the config for srs to delivery hls +# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_SampleHLS +# @see full.conf for detail config. + +listen 1935; +max_connections 1000; +http_server { + enabled on; + listen 8080; + dir ./objs/nginx/html; +} +vhost __defaultVhost__ { + hls { + enabled on; + hls_fragment 10; + hls_window 60; + hls_storage ram; + hls_mount /[app]/[stream].m3u8; + } +} diff --git a/trunk/src/app/srs_app_hls.hpp b/trunk/src/app/srs_app_hls.hpp index ae08431c8..c3a169630 100644 --- a/trunk/src/app/srs_app_hls.hpp +++ b/trunk/src/app/srs_app_hls.hpp @@ -175,6 +175,7 @@ private: std::string m3u8; private: ISrsHlsHandler* handler; + // TODO: FIXME: supports reload. bool should_write_cache; bool should_write_file; private: