From 235c889e14e8caa64cd5b9605369fda20de3e027 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 24 Jan 2020 15:35:14 +0800 Subject: [PATCH 1/3] Update config --- trunk/conf/dash.conf | 23 +++++++++++++++++++++++ trunk/conf/hls.conf | 5 +++++ 2 files changed, 28 insertions(+) create mode 100644 trunk/conf/dash.conf diff --git a/trunk/conf/dash.conf b/trunk/conf/dash.conf new file mode 100644 index 000000000..9d7f21fdd --- /dev/null +++ b/trunk/conf/dash.conf @@ -0,0 +1,23 @@ +# the config for srs to delivery dash +# @see https://github.com/ossrs/srs/wiki/v1_CN_SampleDASH +# @see full.conf for detail config. + +listen 1935; +max_connections 1000; +daemon off; +srs_log_tank console; +http_server { + enabled on; + listen 8080; + dir ./objs/nginx/html; +} +vhost __defaultVhost__ { + dash { + enabled on; + dash_fragment 30; + dash_update_period 150; + dash_timeshift 300; + dash_path ./objs/nginx/html; + dash_mpd_file [app]/[stream].mpd; + } +} diff --git a/trunk/conf/hls.conf b/trunk/conf/hls.conf index d0fa42397..17416a294 100644 --- a/trunk/conf/hls.conf +++ b/trunk/conf/hls.conf @@ -6,6 +6,11 @@ listen 1935; max_connections 1000; daemon off; srs_log_tank console; +http_server { + enabled on; + listen 8080; + dir ./objs/nginx/html; +} vhost __defaultVhost__ { hls { enabled on; From 6864e1ca6d3b6ef0a202af44b6db9563af0e56ef Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 25 Jan 2020 12:56:01 +0800 Subject: [PATCH 2/3] Release 2.0r8, 2.0.272 --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 5c8526662..f897a24bf 100755 --- a/README.md +++ b/README.md @@ -295,6 +295,7 @@ Remark: ## Releases +* 2020-01-25, [Release v2.0-r8][r2.0r8], 2.0 release8, 2.0.272, 87292 lines. * 2018-11-29, [Release v2.0-r7][r2.0r7], 2.0 release7, 2.0.265, 86994 lines. * 2018-10-28, [Release v2.0-r6][r2.0r6], 2.0 release6, 2.0.263, 86994 lines. * 2018-10-28, [Release v2.0-r5][r2.0r5], 2.0 release5, 2.0.258, 86916 lines. @@ -338,6 +339,7 @@ Remark: ## History +* v2.0, 2020-01-25, [2.0 release8(2.0.272)][r2.0r8] released. 87292 lines. * v2.0, 2020-01-08, Merge [#1554][bug #1554], support logrotate copytruncate. 2.0.272 * v2.0, 2020-01-05, Merge [#1551][bug #1551], fix memory leak in RTSP stack. 2.0.270 * v2.0, 2019-12-26, For [#1488][bug #1488], pass client ip to http callback. 2.0.269 @@ -1367,6 +1369,7 @@ Winlin [exo #828]: https://github.com/google/ExoPlayer/pull/828 +[r2.0r8]: https://github.com/ossrs/srs/releases/tag/v2.0-r8 [r2.0r7]: https://github.com/ossrs/srs/releases/tag/v2.0-r7 [r2.0r6]: https://github.com/ossrs/srs/releases/tag/v2.0-r6 [r2.0r5]: https://github.com/ossrs/srs/releases/tag/v2.0-r5 From 978d5e993b680635174b57d79585ecd4449ab871 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 25 Jan 2020 15:04:34 +0800 Subject: [PATCH 3/3] Fix #1108, reap DVR tmp file when unpublish. 3.0.106 --- README.md | 2 ++ trunk/src/app/srs_app_dvr.cpp | 9 +++++++++ trunk/src/core/srs_core.hpp | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4f926e33a..b0cf323d5 100755 --- a/README.md +++ b/README.md @@ -146,6 +146,7 @@ For previous versions, please read: ## V3 changes +* v3.0, 2020-01-25, Fix [#1108][bug #1108], reap DVR tmp file when unpublish. 3.0.106 * v3.0, 2020-01-21, [3.0 alpha9(3.0.105)][r3.0a9] released. 121577 lines. * v3.0, 2020-01-21, Fix [#1221][bug #1221], remove complex configure options. 3.0.104 * v3.0, 2020-01-21, Fix [#1547][bug #1547], support crossbuild for ARM/MIPS. @@ -1610,6 +1611,7 @@ Winlin [bug #1580]: https://github.com/ossrs/srs/issues/1580 [bug #1547]: https://github.com/ossrs/srs/issues/1547 [bug #1221]: https://github.com/ossrs/srs/issues/1221 +[bug #1108]: https://github.com/ossrs/srs/issues/1108 [bug #xxxxxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxxxxx [exo #828]: https://github.com/google/ExoPlayer/pull/828 diff --git a/trunk/src/app/srs_app_dvr.cpp b/trunk/src/app/srs_app_dvr.cpp index 507956aed..aca14581a 100644 --- a/trunk/src/app/srs_app_dvr.cpp +++ b/trunk/src/app/srs_app_dvr.cpp @@ -813,7 +813,16 @@ srs_error_t SrsDvrSegmentPlan::on_publish() void SrsDvrSegmentPlan::on_unpublish() { + srs_error_t err = srs_success; + SrsDvrPlan::on_unpublish(); + + if ((err = segment->close()) != srs_success) { + srs_warn("ignore err %s", srs_error_desc(err).c_str()); + srs_freep(err); + } + + dvr_enabled = false; } srs_error_t SrsDvrSegmentPlan::on_audio(SrsSharedPtrMessage* shared_audio, SrsFormat* format) diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 732f4b120..2bca91cdf 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -27,7 +27,7 @@ // The version config. #define VERSION_MAJOR 3 #define VERSION_MINOR 0 -#define VERSION_REVISION 105 +#define VERSION_REVISION 106 // The macros generated by configure script. #include