From d2a071f0412f7086f0fe7af8a80f039a7ea4535d Mon Sep 17 00:00:00 2001 From: winlin Date: Tue, 11 Feb 2020 19:32:46 +0800 Subject: [PATCH 01/11] Add TODO for incompatible APIs of librtmp --- trunk/src/libs/srs_librtmp.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trunk/src/libs/srs_librtmp.hpp b/trunk/src/libs/srs_librtmp.hpp index 9184c1840..9f2044647 100644 --- a/trunk/src/libs/srs_librtmp.hpp +++ b/trunk/src/libs/srs_librtmp.hpp @@ -1105,6 +1105,7 @@ extern void srs_hijack_io_destroy(srs_hijack_io_t ctx); * create socket, not connect yet. * @param owner, the rtmp context which create this socket. * @return 0, success; otherswise, failed. + * TODO: FIXME: Incompatible API for https://github.com/ossrs/srs/blob/2.0release/trunk/src/libs/srs_librtmp.hpp#L989 */ extern int srs_hijack_io_create_socket(srs_hijack_io_t ctx, srs_rtmp_t owner); /** @@ -1156,6 +1157,7 @@ extern int srs_hijack_io_writev(srs_hijack_io_t ctx, const iovec *iov, int iov_s /** * whether the timeout is never timeout in ms. * @return 0, with timeout specified; otherwise, never timeout. + * TODO: FIXME: Incompatible API for https://github.com/ossrs/srs/blob/2.0release/trunk/src/libs/srs_librtmp.hpp#L1039 */ extern int srs_hijack_io_is_never_timeout(srs_hijack_io_t ctx, int64_t tm); /** From 8b7fbac7d4bad5813811637a8923896c9f9a90ae Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Feb 2020 12:17:09 +0800 Subject: [PATCH 02/11] SRT supports detail config for DynamicConfig. 4.0.4 --- README.md | 1 + trunk/conf/full.conf | 7 +++++++ trunk/src/core/srs_core_version4.hpp | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 04ba70062..10ebf1aff 100755 --- a/README.md +++ b/README.md @@ -153,6 +153,7 @@ For previous versions, please read: ## V4 changes +* v4.0, 2020-02-13, SRT supports detail config for [DynamicEncoding](https://github.com/runner365/srt_encoder). 4.0.4 * v4.0, 2020-02-04, Update project code. 4.0.3 * v4.0, 2020-01-26, Allow use libsrt.so for SRT is MPL license. 4.0.2 * v4.0, 2020-01-24, Fix [#1147][bug #1147], support SRT(Secure Reliable Transport). 4.0.1 diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index 0348a9433..bbfce255f 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -262,6 +262,13 @@ srt_server { enabled on; # The UDP listen port for SRT. listen 10080; + # For detail parameters, please read wiki: + # https://github.com/ossrs/srs/wiki/v4_CN_SRTParams + # https://github.com/ossrs/srs/wiki/v4_EN_SRTParams + maxbw 1000000000; + connect_timeout 4000; + peerlatency 300; + recvlatency 300; } ############################################################################################# diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 747be972f..208807ee9 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -24,6 +24,6 @@ #ifndef SRS_CORE_VERSION4_HPP #define SRS_CORE_VERSION4_HPP -#define SRS_VERSION4_REVISION 3 +#define SRS_VERSION4_REVISION 4 #endif From 8e40f9cf22f86bf7f615b56cbc892b6c6fec8549 Mon Sep 17 00:00:00 2001 From: runner365 Date: Thu, 13 Feb 2020 16:52:26 +0800 Subject: [PATCH 03/11] update srt2rtmp about rtmp listen tcp port --- trunk/src/srt/srt_to_rtmp.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/trunk/src/srt/srt_to_rtmp.cpp b/trunk/src/srt/srt_to_rtmp.cpp index 729e3e970..79e2668be 100644 --- a/trunk/src/srt/srt_to_rtmp.cpp +++ b/trunk/src/srt/srt_to_rtmp.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -207,11 +208,22 @@ rtmp_client::rtmp_client(std::string key_path):_key_path(key_path) } char url_sz[128]; + std::vector ip_ports = _srs_config->get_listens(); + int port = 0; + std::string ip; + + for (auto item : ip_ports) { + srs_parse_endpoint(item, ip, port); + if (port != 0) { + break; + } + } + if (_vhost == DEF_VHOST) { - sprintf(url_sz, "rtmp://127.0.0.1/%s/%s", + sprintf(url_sz, "rtmp://127.0.0.1:%d/%s/%s", port, _appname.c_str(), _streamname.c_str()); } else { - sprintf(url_sz, "rtmp://127.0.0.1/%s?vhost=%s/%s", + sprintf(url_sz, "rtmp://127.0.0.1:%d/%s?vhost=%s/%s", port, _appname.c_str(), _vhost.c_str(), _streamname.c_str()); } From 94741c167643a143be8b004238620ab77e803c70 Mon Sep 17 00:00:00 2001 From: runner365 Date: Thu, 13 Feb 2020 16:58:35 +0800 Subject: [PATCH 04/11] update srt2rtmp about rtmp listen tcp port --- trunk/src/srt/srt_to_rtmp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/src/srt/srt_to_rtmp.cpp b/trunk/src/srt/srt_to_rtmp.cpp index 79e2668be..13e83056d 100644 --- a/trunk/src/srt/srt_to_rtmp.cpp +++ b/trunk/src/srt/srt_to_rtmp.cpp @@ -218,7 +218,7 @@ rtmp_client::rtmp_client(std::string key_path):_key_path(key_path) break; } } - + port = (port == 0) ? 1935 : port; if (_vhost == DEF_VHOST) { sprintf(url_sz, "rtmp://127.0.0.1:%d/%s/%s", port, _appname.c_str(), _streamname.c_str()); From ce4123f250faf06fc429db92889e5101daf2e074 Mon Sep 17 00:00:00 2001 From: "Alex.CR" Date: Thu, 13 Feb 2020 03:02:54 -0600 Subject: [PATCH 05/11] rtmp tcp listen port bugs in srt2rtmp (#1602) * update srt2rtmp about rtmp listen tcp port * update srt2rtmp about rtmp listen tcp port --- trunk/src/srt/srt_to_rtmp.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/trunk/src/srt/srt_to_rtmp.cpp b/trunk/src/srt/srt_to_rtmp.cpp index 729e3e970..13e83056d 100644 --- a/trunk/src/srt/srt_to_rtmp.cpp +++ b/trunk/src/srt/srt_to_rtmp.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -207,11 +208,22 @@ rtmp_client::rtmp_client(std::string key_path):_key_path(key_path) } char url_sz[128]; + std::vector ip_ports = _srs_config->get_listens(); + int port = 0; + std::string ip; + + for (auto item : ip_ports) { + srs_parse_endpoint(item, ip, port); + if (port != 0) { + break; + } + } + port = (port == 0) ? 1935 : port; if (_vhost == DEF_VHOST) { - sprintf(url_sz, "rtmp://127.0.0.1/%s/%s", + sprintf(url_sz, "rtmp://127.0.0.1:%d/%s/%s", port, _appname.c_str(), _streamname.c_str()); } else { - sprintf(url_sz, "rtmp://127.0.0.1/%s?vhost=%s/%s", + sprintf(url_sz, "rtmp://127.0.0.1:%d/%s?vhost=%s/%s", port, _appname.c_str(), _vhost.c_str(), _streamname.c_str()); } From 21c2cb6512fb93fd3f2ccb57ffe9ec6fd8081998 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 14 Feb 2020 11:17:19 +0800 Subject: [PATCH 06/11] Update issue template --- .github/ISSUE_TEMPLATE | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/ISSUE_TEMPLATE b/.github/ISSUE_TEMPLATE index a797cb02c..fa6f266ec 100644 --- a/.github/ISSUE_TEMPLATE +++ b/.github/ISSUE_TEMPLATE @@ -16,6 +16,10 @@ assignees: '' ``` xxxxxxxxxxxx ``` +1. SRS的配置如下(Config): +``` +xxxxxxxxxxxx +``` **重现(Replay)** From 23324cde31f9f2ec9909ca634675f1d289d21957 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 14 Feb 2020 21:57:02 +0800 Subject: [PATCH 07/11] Migrating streaming service from ossrs.net to r.ossrs.net --- trunk/research/players/js/srs.page.js | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/trunk/research/players/js/srs.page.js b/trunk/research/players/js/srs.page.js index 0fd37b2ad..be4f6ffeb 100755 --- a/trunk/research/players/js/srs.page.js +++ b/trunk/research/players/js/srs.page.js @@ -43,6 +43,12 @@ function user_extra_params(query, params) { var server = (query.server == undefined)? window.location.hostname:query.server; var vhost = (query.vhost == undefined)? window.location.hostname:query.vhost; + // Note that ossrs.net provides only web service, + // that is migrating to r.ossrs.net + if (vhost == "ossrs.net") { + vhost = "r.ossrs.net"; + } + for (var key in query.user_query) { if (key == 'app' || key == 'autostart' || key == 'dir' || key == 'filename' || key == 'host' || key == 'hostname' @@ -78,6 +84,12 @@ function build_default_rtmp_url() { var app = (!query.app)? "live":query.app; var stream = (!query.stream)? "livestream":query.stream; + // Note that ossrs.net provides only web service, + // that is migrating to r.ossrs.net + if (vhost == "ossrs.net") { + vhost = "r.ossrs.net"; + } + var queries = []; if (server != vhost && vhost != "__defaultVhost__") { queries.push("vhost=" + vhost); @@ -102,6 +114,12 @@ function build_default_publish_rtmp_url() { var app = (!query.app)? "live":query.app; var stream = (!query.stream)? "demo":query.stream; + // Note that ossrs.net provides only web service, + // that is migrating to r.ossrs.net + if (vhost == "ossrs.net") { + vhost = "r.ossrs.net"; + } + var queries = []; if (server != vhost && vhost != "__defaultVhost__") { queries.push("vhost=" + vhost); @@ -127,6 +145,12 @@ function build_default_bandwidth_rtmp_url() { var app = (!query.app)? "app":query.app; var key = (!query.key)? "35c9b402c12a7246868752e2878f7e0e":query.key; + // Note that ossrs.net provides only web service, + // that is migrating to r.ossrs.net + if (vhost == "ossrs.net") { + vhost = "r.ossrs.net"; + } + return "rtmp://" + server + ":" + port + "/" + app + "?key=" + key + "&vhost=" + vhost; } @@ -141,6 +165,12 @@ function build_default_bandwidth_rtmp_url() { function build_default_hls_url() { var query = parse_query_string(); + // Note that ossrs.net provides only web service, + // that is migrating to r.ossrs.net + if (query.hls_vhost == "ossrs.net") { + query.hls_vhost = "r.ossrs.net"; + } + // for http, use hls_vhost to override server if specified. var server = window.location.hostname; if (query.server != undefined) { From 4276bea4630e90b9ee3dcb0e205d1d163b843e32 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 14 Feb 2020 22:00:58 +0800 Subject: [PATCH 08/11] Migrating streaming service from ossrs.net to r.ossrs.net --- trunk/research/players/js/srs.page.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/trunk/research/players/js/srs.page.js b/trunk/research/players/js/srs.page.js index be4f6ffeb..cc9c9df59 100755 --- a/trunk/research/players/js/srs.page.js +++ b/trunk/research/players/js/srs.page.js @@ -48,6 +48,9 @@ function user_extra_params(query, params) { if (vhost == "ossrs.net") { vhost = "r.ossrs.net"; } + if (server == "ossrs.net") { + server = "r.ossrs.net"; + } for (var key in query.user_query) { if (key == 'app' || key == 'autostart' || key == 'dir' @@ -89,6 +92,9 @@ function build_default_rtmp_url() { if (vhost == "ossrs.net") { vhost = "r.ossrs.net"; } + if (server == "ossrs.net") { + server = "r.ossrs.net"; + } var queries = []; if (server != vhost && vhost != "__defaultVhost__") { @@ -119,6 +125,9 @@ function build_default_publish_rtmp_url() { if (vhost == "ossrs.net") { vhost = "r.ossrs.net"; } + if (server == "ossrs.net") { + server = "r.ossrs.net"; + } var queries = []; if (server != vhost && vhost != "__defaultVhost__") { @@ -150,6 +159,9 @@ function build_default_bandwidth_rtmp_url() { if (vhost == "ossrs.net") { vhost = "r.ossrs.net"; } + if (server == "ossrs.net") { + server = "r.ossrs.net"; + } return "rtmp://" + server + ":" + port + "/" + app + "?key=" + key + "&vhost=" + vhost; } From 131acf5bb014eb4883bbe13e2b9f836081602985 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 14 Feb 2020 23:04:01 +0800 Subject: [PATCH 09/11] For #1595, migrating streaming from ossrs.net to r.ossrs.net. 3.0.117 --- README.md | 2 ++ trunk/src/core/srs_core_version3.hpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2fb12cdf0..896e8ad90 100755 --- a/README.md +++ b/README.md @@ -146,6 +146,7 @@ For previous versions, please read: ## V3 changes +* v3.0, 2020-02-14, For [#1595][bug #1595], migrating streaming from ossrs.net to r.ossrs.net. 3.0.117 * v3.0, 2020-02-05, For [#665][bug #665], fix HTTP-FLV reloading bug. 3.0.116 * v3.0, 2020-02-05, For [#1592][bug #1592], fix terminal echo off by redirect process stdin. 3.0.115 * v3.0, 2020-02-04, For [#1186][bug #1186], refactor security check. 3.0.114 @@ -1646,6 +1647,7 @@ Winlin [bug #1186]: https://github.com/ossrs/srs/issues/1186 [bug #1592]: https://github.com/ossrs/srs/issues/1592 [bug #665]: https://github.com/ossrs/srs/issues/665 +[bug #1595]: https://github.com/ossrs/srs/issues/1595 [bug #xxxxxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxxxxx [exo #828]: https://github.com/google/ExoPlayer/pull/828 diff --git a/trunk/src/core/srs_core_version3.hpp b/trunk/src/core/srs_core_version3.hpp index 7b51a0991..c8793a0a8 100644 --- a/trunk/src/core/srs_core_version3.hpp +++ b/trunk/src/core/srs_core_version3.hpp @@ -24,6 +24,6 @@ #ifndef SRS_CORE_VERSION3_HPP #define SRS_CORE_VERSION3_HPP -#define SRS_VERSION3_REVISION 116 +#define SRS_VERSION3_REVISION 117 #endif From 16173194b93ff2a1c8b7d7ff791dd8a46af81c9a Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 14 Feb 2020 23:05:54 +0800 Subject: [PATCH 10/11] Release 3.0-beta1, r3.0b1, 3.0.117 --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 896e8ad90..905febbb7 100755 --- a/README.md +++ b/README.md @@ -146,6 +146,7 @@ For previous versions, please read: ## V3 changes +* v3.0, 2020-02-14, [3.0 beta1(3.0.117)][r3.0b1] released. 121964 lines. * v3.0, 2020-02-14, For [#1595][bug #1595], migrating streaming from ossrs.net to r.ossrs.net. 3.0.117 * v3.0, 2020-02-05, For [#665][bug #665], fix HTTP-FLV reloading bug. 3.0.116 * v3.0, 2020-02-05, For [#1592][bug #1592], fix terminal echo off by redirect process stdin. 3.0.115 @@ -738,6 +739,7 @@ For previous versions, please read: ## Releases +* 2020-02-14, [Release v3.0-b1][r3.0b1], 3.0 beta1, 3.0.117, 121964 lines. * 2020-02-02, [Release v3.0-b0][r3.0b0], 3.0 beta0, 3.0.112, 121709 lines. * 2020-01-21, [Release v3.0-a9][r3.0a9], 3.0 alpha9, 3.0.105, 121577 lines. * 2020-01-10, [Release v3.0-a8][r3.0a8], 3.0 alpha8, 3.0.97, 121555 lines. @@ -1652,6 +1654,7 @@ Winlin [exo #828]: https://github.com/google/ExoPlayer/pull/828 +[r3.0b1]: https://github.com/ossrs/srs/releases/tag/v3.0-b1 [r3.0b0]: https://github.com/ossrs/srs/releases/tag/v3.0-b0 [r3.0a9]: https://github.com/ossrs/srs/releases/tag/v3.0-a9 [r3.0a8]: https://github.com/ossrs/srs/releases/tag/v3.0-a8 From 1604fcf35af86ae72111de273b451cceaeb28cde Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 16 Feb 2020 13:31:03 +0800 Subject: [PATCH 11/11] Update authors --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 905febbb7..5d6f6b8d4 100755 --- a/README.md +++ b/README.md @@ -1085,21 +1085,20 @@ Remark: There are two types of people that have contributed to the SRS project: -* AUTHORS: Contribute important features. Names of all authors responsed in NetConnection.connect and metadata. -* CONTRIBUTORS: Submit patches, report bugs, add translations, help answer newbie questions, and generally make SRS much better. +* Maintainers: Contribute important features. Names of all authors responsed in NetConnection.connect and metadata. +* [Contributors][authors]: Submit patches, report bugs, add translations, help answer newbie questions, and generally make SRS much better. -About all AUTHORS and CONTRIBUTORS, read [AUTHORS.txt][authors]. +Maintainers of SRS project: + +* Winlin: All areas of streaming server and documents. +* Wenjie: The focus of his work is on the [HDS](https://github.com/simple-rtmp-server/srs/wiki/v2_CN_DeliveryHDS) module. +* Runner365: The focus of his work is on the [SRT](https://github.com/simple-rtmp-server/srs/wiki/v4_CN_SRTWiki) module. A big THANK YOU goes to: * All friends of SRS for [big supports][bigthanks]. * Genes amd Mabbott for creating [st][st]([state-threads][st2]). -* Michael Talyanksy for introducing us to use st. -* Roman Arutyunyan for creating [nginx-rtmp][nginx-rtmp] for SRS to refer to. -* Joyent for creating [http-parser][http-parser] for http-api for SRS. -* Igor Sysoev for creating [nginx][nginx] for SRS to refer to. -* [FFMPEG][FFMPEG] and [libx264][libx264] group for SRS to use as transcoder. -* Guido van Rossum for creating Python for api-server for SRS. +* Michael Talyanksy for introducing ST to us. ## Mirrors