From 4434bb1a2503bdc38bc400b6406b18737b0ab9f3 Mon Sep 17 00:00:00 2001 From: liuxiaoliang <37902979+liuxiaoliang8@users.noreply.github.com> Date: Thu, 6 Jan 2022 12:02:31 +0800 Subject: [PATCH 01/32] SRT: use const string to sprint rtmp url. (#2847) --- trunk/src/srt/srt_to_rtmp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/src/srt/srt_to_rtmp.cpp b/trunk/src/srt/srt_to_rtmp.cpp index 53ae3b01ae..268a1cbf40 100644 --- a/trunk/src/srt/srt_to_rtmp.cpp +++ b/trunk/src/srt/srt_to_rtmp.cpp @@ -268,10 +268,10 @@ rtmp_client::rtmp_client(std::string key_path):_key_path(key_path) break; } } - port = (port == 0) ? 1935 : port; + port = (port == 0) ? SRS_CONSTS_RTMP_DEFAULT_PORT : port; std::stringstream ss; - ss << "rtmp://127.0.0.1"; + ss << "rtmp://" << SRS_CONSTS_LOCALHOST; ss << ":" << port; ss << "/" << _appname; if (_vhost != DEF_VHOST) { From 623ca788aa1011cbbbfd9c7540e8cfa3091206cd Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 6 Jan 2022 21:56:41 +0800 Subject: [PATCH 02/32] Update for HTTPS server --- README.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e92a994e08..ef17ffc61b 100755 --- a/README.md +++ b/README.md @@ -32,12 +32,6 @@ SRS is licenced under [MIT][LICENSE], but some depended libraries are distribute ## Usage -> Highly recommend that directly run SRS by -> **docker([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#docker) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#docker))**, -> or **K8s([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#k8s) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#k8s))**, -> however it's also easy to build SRS from source code, for detail please see -> **Getting Started([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#getting-started) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#getting-started))**. - Build SRS from source: ``` @@ -52,8 +46,6 @@ by [FFmpeg](https://ffmpeg.org/download.html) or [OBS](https://obsproject.com/do ffmpeg -re -i ./doc/source.flv -c copy -f flv -y rtmp://localhost/live/livestream ``` -> Note: It's also able to [publish by H5](http://localhost:8080/players/rtc_publisher.html?autostart=true) if WebRTC is enabled. - Play the following streams by [players](https://ossrs.net): * RTMP (by [VLC](https://www.videolan.org/)): rtmp://localhost/live/livestream @@ -64,6 +56,20 @@ Note that if convert RTMP to WebRTC, please use [`rtmp2rtc.conf`](https://github * H5(WebRTC): [webrtc://localhost/live/livestream](http://localhost:8080/players/rtc_player.html?autostart=true) +> Note: Besides of FFmpeg or OBS, it's also able to [publish by H5](http://localhost:8080/players/rtc_publisher.html?autostart=true) +> if [WebRTC](https://github.com/ossrs/srs/issues/307) is enabled. + +> Highly recommend that directly run SRS by +> **docker([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#docker) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#docker))**, +> or **K8s([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#k8s) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#k8s))**, +> however it's also easy to build SRS from source code, for detail please see +> **Getting Started([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#getting-started) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#getting-started))**. + +> Note: If need HTTPS, by which WebRTC and modern browsers require, please read +> **HTTPS API([CN](https://github.com/ossrs/srs/wiki/v4_CN_HTTPApi#https-api) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_HTTPApi#https-api))** +> and **HTTPS Live Streaming([CN](https://github.com/ossrs/srs/wiki/v4_EN_DeliveryHttpStream#https-flv-live-stream) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_DeliveryHttpStream#https-flv-live-stream))**, +> however HTTPS proxy also works perfect with SRS such as Nginx. + From 2f6d6a0ac0fb5e9a1b9caf2c477174af0005200a Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 7 Jan 2022 16:41:02 +0800 Subject: [PATCH 03/32] Change warn to trace for release query --- trunk/src/app/srs_app_latest_version.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/src/app/srs_app_latest_version.cpp b/trunk/src/app/srs_app_latest_version.cpp index c2362e63c7..4ea8d5fdbc 100644 --- a/trunk/src/app/srs_app_latest_version.cpp +++ b/trunk/src/app/srs_app_latest_version.cpp @@ -222,7 +222,7 @@ srs_error_t SrsLatestVersion::cycle() string url; srs_utime_t starttime = srs_update_system_time(); if ((err = query_latest_version(url)) != srs_success) { - srs_warn("query err %s", srs_error_desc(err).c_str()); + srs_trace("query release err %s", srs_error_summary(err).c_str()); srs_freep(err); // Ignore any error. } From 08910e5cce08e085efca84a48b80222f00b068ad Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 8 Jan 2022 19:18:55 +0800 Subject: [PATCH 04/32] Update README --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index ef17ffc61b..ac198ac260 100755 --- a/README.md +++ b/README.md @@ -9,10 +9,7 @@ [![](https://ossrs.net/wiki/images/srs-faq.svg)](https://github.com/ossrs/srs/issues/2716) [![](https://ossrs.net/wiki/images/mulan-incubating.svg)](http://mulanos.cn) [![](https://ossrs.net/wiki/images/srs-alternativeto.svg)](https://alternativeto.net/software/srs/about/) -[![](https://ossrs.net/wiki/images/srs-facebook.svg)](https://www.facebook.com/winlinvip) -[![](https://badgen.net/twitter/follow/winlinvip)](https://twitter.com/winlinvip) [![](https://img.shields.io/youtube/channel/views/UCP6ZblCL_fIJoEyUzZxC1ng?style=social)](https://www.youtube.com/channel/UCP6ZblCL_fIJoEyUzZxC1ng) -[![](https://img.shields.io/twitch/status/winlinvip?style=social)](https://www.twitch.tv/winlinvip) [![](https://badgen.net/discord/members/yZ4BnPmHAd)](https://discord.gg/yZ4BnPmHAd) [![](https://opencollective.com/srs-server/tiers/badge.svg)](https://opencollective.com/srs-server/contribute) [![](https://badgen.net/badge/srs/stackoverflow/orange?icon=terminal)](https://stackoverflow.com/questions/tagged/simple-realtime-server) From f178d7aae0c3258e1308b5b488684d577d8cd3d1 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 10 Jan 2022 14:18:22 +0800 Subject: [PATCH 05/32] Update README for HTTPS Callback --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ac198ac260..32b84ddce4 100755 --- a/README.md +++ b/README.md @@ -62,8 +62,9 @@ Note that if convert RTMP to WebRTC, please use [`rtmp2rtc.conf`](https://github > however it's also easy to build SRS from source code, for detail please see > **Getting Started([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#getting-started) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#getting-started))**. -> Note: If need HTTPS, by which WebRTC and modern browsers require, please read -> **HTTPS API([CN](https://github.com/ossrs/srs/wiki/v4_CN_HTTPApi#https-api) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_HTTPApi#https-api))** +> Note: If need HTTPS, by which WebRTC and modern browsers require, please read +> **HTTPS API([CN](https://github.com/ossrs/srs/wiki/v4_CN_HTTPApi#https-api) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_HTTPApi#https-api))** +> and **HTTPS Callback([CN](https://github.com/ossrs/srs/wiki/v4_CN_HTTPCallback#https-callback) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_HTTPCallback#https-callback))** > and **HTTPS Live Streaming([CN](https://github.com/ossrs/srs/wiki/v4_EN_DeliveryHttpStream#https-flv-live-stream) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_DeliveryHttpStream#https-flv-live-stream))**, > however HTTPS proxy also works perfect with SRS such as Nginx. From c85daeb12d9ed33aa65539fab8946c729e6e6a4f Mon Sep 17 00:00:00 2001 From: chundonglinlin Date: Mon, 10 Jan 2022 19:14:11 +0800 Subject: [PATCH 06/32] RTC: fix play crash or no stream for rtmp2rtc tips.(#2728) (#2863) --- trunk/src/app/srs_app_rtc_api.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/src/app/srs_app_rtc_api.cpp b/trunk/src/app/srs_app_rtc_api.cpp index e9593ca90d..de5134b8b4 100644 --- a/trunk/src/app/srs_app_rtc_api.cpp +++ b/trunk/src/app/srs_app_rtc_api.cpp @@ -187,9 +187,9 @@ srs_error_t SrsGoApiRtcPlay::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMe } // For RTMP to RTC, fail if disabled and RTMP is active, see https://github.com/ossrs/srs/issues/2728 - if (!_srs_config->get_rtc_to_rtmp(ruc.req_->vhost)) { + if (!_srs_config->get_rtc_from_rtmp(ruc.req_->vhost)) { SrsLiveSource* rtmp = _srs_sources->fetch(ruc.req_); - if (!rtmp->inactive()) { + if (rtmp && rtmp->inactive()) { return srs_error_new(ERROR_RTC_DISABLED, "Disabled rtmp_to_rtc of %s, see #2728", ruc.req_->vhost.c_str()); } } From 2bc5e9a8b463d9a853b9daa151c4d7f63e26e1f7 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 10 Jan 2022 19:16:01 +0800 Subject: [PATCH 07/32] RTC: fix play crash or no stream for rtmp2rtc tips.(#2863). v4.0.220 --- trunk/doc/CHANGELOG.md | 9 +++++---- trunk/src/core/srs_core_version4.hpp | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 7eb0775d34..9ab0ff4f4b 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,10 +8,11 @@ The changelog for SRS. ## SRS 4.0 Changelog -* v4.0, 2021-01-05, For [#2717](https://github.com/ossrs/srs/issues/2717): When reopening segment, never update the duration. (#2717). v4.0.219 -* v4.0, 2021-01-04, Discover api server and ip as candidates. v4.0.218 -* v4.0, 2021-01-04, Install test-on self-sign certificate. v4.0.217 -* v4.0, 2021-01-03, For [#2824](https://github.com/ossrs/srs/issues/2824): Support config in_docker to fix the detect fail. (#2824). v4.0.216 +* v4.0, 2022-01-20, Merge [#2863](https://github.com/ossrs/srs/pull/2863): RTC: fix play crash or no stream for rtmp2rtc tips.(#2863). v4.0.220 +* v4.0, 2022-01-05, For [#2717](https://github.com/ossrs/srs/issues/2717): When reopening segment, never update the duration. (#2717). v4.0.219 +* v4.0, 2022-01-04, Discover api server and ip as candidates. v4.0.218 +* v4.0, 2022-01-04, Install test-on self-sign certificate. v4.0.217 +* v4.0, 2022-01-03, For [#2824](https://github.com/ossrs/srs/issues/2824): Support config in_docker to fix the detect fail. (#2824). v4.0.216 * v4.0, 2021-12-31, For [#2728](https://github.com/ossrs/srs/issues/2728): Refine error log for rtmp2rtc. (#2728). v4.0.215 * v4.0, 2021-12-29, Merge [#2770](https://github.com/ossrs/srs/pull/2770), [#2820](https://github.com/ossrs/srs/pull/2820): Bugs fixed. (#2770)(#2820). v4.0.214 * v4.0, 2021-12-27, Fix [#2811](https://github.com/ossrs/srs/issues/2811): Fix ulimit issue by detecting epoll on Ubuntu. (#2811). v4.0.213 diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 224d67031d..38880bf571 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 219 +#define VERSION_REVISION 220 #endif From 750c58beff5700c020a03cbf66d9b59940f363ac Mon Sep 17 00:00:00 2001 From: chundonglinlin Date: Tue, 11 Jan 2022 08:18:06 +0800 Subject: [PATCH 08/32] RTC: fix play rtc judge for rtmp inactive.(#2863) (#2867) --- trunk/src/app/srs_app_rtc_api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/src/app/srs_app_rtc_api.cpp b/trunk/src/app/srs_app_rtc_api.cpp index de5134b8b4..d72b192e1b 100644 --- a/trunk/src/app/srs_app_rtc_api.cpp +++ b/trunk/src/app/srs_app_rtc_api.cpp @@ -189,7 +189,7 @@ srs_error_t SrsGoApiRtcPlay::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMe // For RTMP to RTC, fail if disabled and RTMP is active, see https://github.com/ossrs/srs/issues/2728 if (!_srs_config->get_rtc_from_rtmp(ruc.req_->vhost)) { SrsLiveSource* rtmp = _srs_sources->fetch(ruc.req_); - if (rtmp && rtmp->inactive()) { + if (rtmp && !rtmp->inactive()) { return srs_error_new(ERROR_RTC_DISABLED, "Disabled rtmp_to_rtc of %s, see #2728", ruc.req_->vhost.c_str()); } } From e08c68b917abc5ff99c5ebbc24a74d3ad1f3c7fd Mon Sep 17 00:00:00 2001 From: winlin Date: Tue, 11 Jan 2022 08:26:21 +0800 Subject: [PATCH 09/32] Update contribution --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d17a7da131..b08e2cd72a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,5 @@ Welome to contribute to SRS! -1. Please read [FAQ](https://github.com/ossrs/srs/issues/2716) before file new PR. -2. Fix some [issues](https://github.com/ossrs/srs/issues), then follow the [guide](https://github.com/ossrs/srs/wiki/HowToFilePR). +1. Please read **Contribution([CN](https://github.com/ossrs/srs/issues/2866#contribution) EN)** before file new PR. +2. Please start from fixing some [issues](https://github.com/ossrs/srs/issues), then follow the [guide](https://github.com/ossrs/srs/wiki/HowToFilePR). 3. We will review your PR ASAP. From c30aa479a76a78b8bd4ea7bceb2df6cf44aa0f23 Mon Sep 17 00:00:00 2001 From: chundonglinlin Date: Wed, 12 Jan 2022 09:12:29 +0800 Subject: [PATCH 10/32] RTC: Fix both rtmp and rtc streams can be published at the same time. (#2875) --- trunk/src/app/srs_app_rtc_conn.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/trunk/src/app/srs_app_rtc_conn.cpp b/trunk/src/app/srs_app_rtc_conn.cpp index 5a4e32ab42..1fd5788385 100644 --- a/trunk/src/app/srs_app_rtc_conn.cpp +++ b/trunk/src/app/srs_app_rtc_conn.cpp @@ -1183,20 +1183,20 @@ srs_error_t SrsRtcPublishStream::initialize(SrsRequest* r, SrsRtcSourceDescripti } source->set_publish_stream(this); + // TODO: FIMXE: Check it in SrsRtcConnection::add_publisher? + SrsLiveSource *rtmp = _srs_sources->fetch(r); + if (rtmp && !rtmp->can_publish(false)) { + return srs_error_new(ERROR_SYSTEM_STREAM_BUSY, "rtmp stream %s busy", r->get_stream_url().c_str()); + } + // Bridge to rtmp #if defined(SRS_RTC) && defined(SRS_FFMPEG_FIT) bool rtc_to_rtmp = _srs_config->get_rtc_to_rtmp(req_->vhost); if (rtc_to_rtmp) { - SrsLiveSource *rtmp = NULL; if ((err = _srs_sources->fetch_or_create(r, _srs_hybrid->srs()->instance(), &rtmp)) != srs_success) { return srs_error_wrap(err, "create source"); } - // TODO: FIMXE: Check it in SrsRtcConnection::add_publisher? - if (!rtmp->can_publish(false)) { - return srs_error_new(ERROR_SYSTEM_STREAM_BUSY, "rtmp stream %s busy", r->get_stream_url().c_str()); - } - // Disable GOP cache for RTC2RTMP bridger, to keep the streams in sync, // especially for stream merging. rtmp->set_cache(false); From 7e25d0d7f4d2468814fd1623a922c2b6f9dbe5e1 Mon Sep 17 00:00:00 2001 From: winlin Date: Wed, 12 Jan 2022 22:03:46 +0800 Subject: [PATCH 11/32] Refine the running homepage. v4.0.221 --- trunk/doc/CHANGELOG.md | 3 +- .../research/api-server/static-dir/index.html | 67 ++++++++++++++----- trunk/src/core/srs_core_version4.hpp | 2 +- 3 files changed, 52 insertions(+), 20 deletions(-) diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 9ab0ff4f4b..0cfd30b9b2 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,7 +8,8 @@ The changelog for SRS. ## SRS 4.0 Changelog -* v4.0, 2022-01-20, Merge [#2863](https://github.com/ossrs/srs/pull/2863): RTC: fix play crash or no stream for rtmp2rtc tips.(#2863). v4.0.220 +* v4.0, 2022-01-12, Refine the running homepage. v4.0.221 +* v4.0, 2022-01-12, Merge [#2863](https://github.com/ossrs/srs/pull/2863): RTC: fix play crash or no stream for rtmp2rtc tips.(#2863). v4.0.220 * v4.0, 2022-01-05, For [#2717](https://github.com/ossrs/srs/issues/2717): When reopening segment, never update the duration. (#2717). v4.0.219 * v4.0, 2022-01-04, Discover api server and ip as candidates. v4.0.218 * v4.0, 2022-01-04, Install test-on self-sign certificate. v4.0.217 diff --git a/trunk/research/api-server/static-dir/index.html b/trunk/research/api-server/static-dir/index.html index e73a6e75b5..d155e15bfb 100755 --- a/trunk/research/api-server/static-dir/index.html +++ b/trunk/research/api-server/static-dir/index.html @@ -3,24 +3,55 @@ SRS + -

SRS works!

-

- Click here to enter SRS console.
- 点击进入SRS控制台 -

-

- Click here to start SRS player.
- 点击进入SRS播放器 -

-

SRS Team © 2021

- +
+

SRS works!

+

+ Click here to enter SRS console.
+ 点击进入SRS控制台 +

+

+ Publish stream by FFmpeg or OBS:
+ 请使用工具FFmpeg或者OBS推流到下面地址: +


+        

+

+ Click here to start SRS player.
+ 点击进入SRS播放器 +

+

SRS Team © 2022

+
+ diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 38880bf571..3ef0133b57 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 220 +#define VERSION_REVISION 221 #endif From 574afb43200f077cbe83802ce1e9f6c5bf503168 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 10:44:10 +0800 Subject: [PATCH 12/32] Refine the running homepage. v4.0.221 --- .../research/api-server/static-dir/index.html | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/trunk/research/api-server/static-dir/index.html b/trunk/research/api-server/static-dir/index.html index d155e15bfb..5611d5fbef 100755 --- a/trunk/research/api-server/static-dir/index.html +++ b/trunk/research/api-server/static-dir/index.html @@ -26,8 +26,8 @@

SRS works!

- Click here to enter SRS console.
- 点击进入SRS控制台 + Click here to enter SRS console.
+ 点击进入SRS控制台

Publish stream by FFmpeg or OBS:
@@ -35,23 +35,37 @@

SRS works!


         

- Click here to start SRS player.
- 点击进入SRS播放器 + Click here to start SRS player.
+ 点击进入SRS播放器

SRS Team © 2022

From fb93631407122a52767beba1380de8e5b95e07dd Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 11:00:11 +0800 Subject: [PATCH 13/32] Refine the running homepage. v4.0.221 --- trunk/research/api-server/static-dir/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/research/api-server/static-dir/index.html b/trunk/research/api-server/static-dir/index.html index 5611d5fbef..6c8f0f0e97 100755 --- a/trunk/research/api-server/static-dir/index.html +++ b/trunk/research/api-server/static-dir/index.html @@ -61,9 +61,9 @@

SRS works!

// The player url. if (true) { - const prefix = 'players/'; + const prefix = `players/?schema=${window.location.protocol.replace(':', '')}`; // If not 8080, user should proxy to the default port. - const query = parseInt(window.location.port) === 8080 ? '' : `?port=${window.location.port}`; + const query = parseInt(window.location.port) === 8080 ? '' : `&port=${window.location.port}`; document.getElementById("enPlayer").setAttribute('href', `${prefix}${query}`); document.getElementById("cnPlayer").setAttribute('href', `${prefix}${query}`); } From d47dd81f4624de81e6762549cd7d4c24d6a97d13 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 11:10:11 +0800 Subject: [PATCH 14/32] Refine the running homepage. v4.0.221 --- trunk/research/api-server/static-dir/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trunk/research/api-server/static-dir/index.html b/trunk/research/api-server/static-dir/index.html index 6c8f0f0e97..d54b702896 100755 --- a/trunk/research/api-server/static-dir/index.html +++ b/trunk/research/api-server/static-dir/index.html @@ -62,8 +62,9 @@

SRS works!

// The player url. if (true) { const prefix = `players/?schema=${window.location.protocol.replace(':', '')}`; + const httpPort = window.location.port || (window.location.protocol === 'http:' ? 80 : 443); // If not 8080, user should proxy to the default port. - const query = parseInt(window.location.port) === 8080 ? '' : `&port=${window.location.port}`; + const query = parseInt(window.location.port) === 8080 ? '' : `&port=${httpPort}`; document.getElementById("enPlayer").setAttribute('href', `${prefix}${query}`); document.getElementById("cnPlayer").setAttribute('href', `${prefix}${query}`); } From 71a4b3c3f7703951f307fbf810d9d3a9ad784283 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 11:38:25 +0800 Subject: [PATCH 15/32] Add conf/lighthouse.conf for LightHouse. v4.0.222 --- trunk/auto/auto_headers.sh | 1 + trunk/auto/options.sh | 4 +++ trunk/conf/lighthouse.conf | 43 ++++++++++++++++++++++++++++ trunk/doc/CHANGELOG.md | 1 + trunk/src/app/srs_app_config.cpp | 2 +- trunk/src/core/srs_core_version4.hpp | 2 +- 6 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 trunk/conf/lighthouse.conf diff --git a/trunk/auto/auto_headers.sh b/trunk/auto/auto_headers.sh index 2c5f406491..19448404db 100755 --- a/trunk/auto/auto_headers.sh +++ b/trunk/auto/auto_headers.sh @@ -177,6 +177,7 @@ fi # prefix echo "" >> $SRS_AUTO_HEADERS_H echo "#define SRS_PREFIX \"${SRS_PREFIX}\"" >> $SRS_AUTO_HEADERS_H +echo "#define SRS_DEFAULT_CONFIG \"${SRS_DEFAULT_CONFIG}\"" >> $SRS_AUTO_HEADERS_H echo "" >> $SRS_AUTO_HEADERS_H diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index 43100b148c..c33acb5f8c 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -36,6 +36,7 @@ SRS_FFMPEG_TOOL=NO SRS_FFMPEG_FIT=RESERVED # arguments SRS_PREFIX=/usr/local/srs +SRS_DEFAULT_CONFIG=conf/srs.conf SRS_JOBS=1 SRS_STATIC=NO # If enabled, link shared libraries for libst.so which uses MPL license. @@ -127,6 +128,7 @@ Features: --ffmpeg-fit=on|off Whether enable the FFmpeg fit(source code). Default: $(value2switch $SRS_FFMPEG_FIT) --prefix= The absolute installation path. Default: $SRS_PREFIX + --config= The default config file for SRS. Default: $SRS_DEFAULT_CONFIG --gcov=on|off Whether enable the GCOV compiler options. Default: $(value2switch $SRS_GCOV) --debug=on|off Whether enable the debug code, may hurt performance. Default: $(value2switch $SRS_DEBUG) --debug-stats=on|off Whether enable the debug stats, may hurt performance. Default: $(value2switch $SRS_DEBUG_STATS) @@ -220,6 +222,7 @@ function parse_user_option() { --jobs) SRS_JOBS=${value} ;; --prefix) SRS_PREFIX=${value} ;; + --config) SRS_DEFAULT_CONFIG=${value} ;; --static) SRS_STATIC=$(switch2value $value) ;; --cpu) SRS_CROSS_BUILD_CPU=${value} ;; @@ -492,6 +495,7 @@ function regenerate_options() { SRS_AUTO_USER_CONFIGURE=`echo $opt` # regenerate the options for default values. SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}" + SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --config=$SRS_DEFAULT_CONFIG" SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --hls=$(value2switch $SRS_HLS)" SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --hds=$(value2switch $SRS_HDS)" SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --dvr=$(value2switch $SRS_DVR)" diff --git a/trunk/conf/lighthouse.conf b/trunk/conf/lighthouse.conf new file mode 100644 index 0000000000..61e5ba5b0a --- /dev/null +++ b/trunk/conf/lighthouse.conf @@ -0,0 +1,43 @@ + +listen 1935; +max_connections 1000; +daemon on; +srs_log_tank file; + +http_server { + enabled on; + listen 8080; + dir ./objs/nginx/html; +} + +http_api { + enabled on; + listen 1985; +} +stats { + network 0; +} +rtc_server { + enabled on; + listen 8000; # UDP port + # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate + candidate $CANDIDATE; +} + +vhost __defaultVhost__ { + hls { + enabled on; + } + http_remux { + enabled on; + mount [vhost]/[app]/[stream].flv; + } + rtc { + enabled on; + # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtmp-to-rtc + rtmp_to_rtc on; + # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtc-to-rtmp + rtc_to_rtmp on; + } +} + diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 0cfd30b9b2..130d0bce10 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,6 +8,7 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2022-01-13, Add conf/lighthouse.conf for LightHouse. v4.0.222 * v4.0, 2022-01-12, Refine the running homepage. v4.0.221 * v4.0, 2022-01-12, Merge [#2863](https://github.com/ossrs/srs/pull/2863): RTC: fix play crash or no stream for rtmp2rtc tips.(#2863). v4.0.220 * v4.0, 2022-01-05, For [#2717](https://github.com/ossrs/srs/issues/2717): When reopening segment, never update the duration. (#2717). v4.0.219 diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index a984b4cd81..f7174dbd7f 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -50,7 +50,7 @@ const char* _srs_version = "XCORE-" RTMP_SIG_SRS_SERVER; #define SRS_CONF_PERFER_TRUE(conf_arg) conf_arg != "off" // default config file. -#define SRS_CONF_DEFAULT_COFNIG_FILE "conf/srs.conf" +#define SRS_CONF_DEFAULT_COFNIG_FILE SRS_DEFAULT_CONFIG // '\n' #define SRS_LF (char)SRS_CONSTS_LF diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 3ef0133b57..66794be67c 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 221 +#define VERSION_REVISION 222 #endif From 7580341a1e506713d5bb69c8dbd03193a7f13489 Mon Sep 17 00:00:00 2001 From: chundonglinlin Date: Thu, 13 Jan 2022 11:43:32 +0800 Subject: [PATCH 16/32] LiveSource/RtcSource: Refine fetch for external exposed interface. (#2873) --- trunk/src/app/srs_app_rtc_source.cpp | 9 ++++----- trunk/src/app/srs_app_rtc_source.hpp | 1 - trunk/src/app/srs_app_source.cpp | 9 ++++----- trunk/src/app/srs_app_source.hpp | 1 - 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/trunk/src/app/srs_app_rtc_source.cpp b/trunk/src/app/srs_app_rtc_source.cpp index 8e79f443a6..ea1082c319 100644 --- a/trunk/src/app/srs_app_rtc_source.cpp +++ b/trunk/src/app/srs_app_rtc_source.cpp @@ -256,6 +256,10 @@ srs_error_t SrsRtcSourceManager::fetch_or_create(SrsRequest* r, SrsRtcSource** p SrsRtcSource* source = NULL; if ((source = fetch(r)) != NULL) { + // we always update the request of resource, + // for origin auth is on, the token in request maybe invalid, + // and we only need to update the token of request, it's simple. + source->update_auth(r); *pps = source; return err; } @@ -291,11 +295,6 @@ SrsRtcSource* SrsRtcSourceManager::fetch(SrsRequest* r) source = pool[stream_url]; - // we always update the request of resource, - // for origin auth is on, the token in request maybe invalid, - // and we only need to update the token of request, it's simple. - source->update_auth(r); - return source; } diff --git a/trunk/src/app/srs_app_rtc_source.hpp b/trunk/src/app/srs_app_rtc_source.hpp index c98db95619..1b9555a049 100644 --- a/trunk/src/app/srs_app_rtc_source.hpp +++ b/trunk/src/app/srs_app_rtc_source.hpp @@ -114,7 +114,6 @@ class SrsRtcSourceManager virtual srs_error_t fetch_or_create(SrsRequest* r, SrsRtcSource** pps); private: // Get the exists source, NULL when not exists. - // update the request and return the exists source. virtual SrsRtcSource* fetch(SrsRequest* r); }; diff --git a/trunk/src/app/srs_app_source.cpp b/trunk/src/app/srs_app_source.cpp index d297f0f4aa..5705a13ac8 100755 --- a/trunk/src/app/srs_app_source.cpp +++ b/trunk/src/app/srs_app_source.cpp @@ -1713,6 +1713,10 @@ srs_error_t SrsLiveSourceManager::fetch_or_create(SrsRequest* r, ISrsLiveSourceH SrsLiveSource* source = NULL; if ((source = fetch(r)) != NULL) { + // we always update the request of resource, + // for origin auth is on, the token in request maybe invalid, + // and we only need to update the token of request, it's simple. + source->update_auth(r); *pps = source; return err; } @@ -1751,11 +1755,6 @@ SrsLiveSource* SrsLiveSourceManager::fetch(SrsRequest* r) source = pool[stream_url]; - // we always update the request of resource, - // for origin auth is on, the token in request maybe invalid, - // and we only need to update the token of request, it's simple. - source->update_auth(r); - return source; } diff --git a/trunk/src/app/srs_app_source.hpp b/trunk/src/app/srs_app_source.hpp index d1bf0b3dc3..78d04958d7 100644 --- a/trunk/src/app/srs_app_source.hpp +++ b/trunk/src/app/srs_app_source.hpp @@ -450,7 +450,6 @@ class SrsLiveSourceManager : public ISrsHourGlass virtual srs_error_t fetch_or_create(SrsRequest* r, ISrsLiveSourceHandler* h, SrsLiveSource** pps); public: // Get the exists source, NULL when not exists. - // update the request and return the exists source. virtual SrsLiveSource* fetch(SrsRequest* r); public: // dispose and cycle all sources. From e6ab5db1138526c546a044917575954fd8427c78 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 11:47:14 +0800 Subject: [PATCH 17/32] LiveSource: Refine fetch for external exposed interface. (#2873). v4.0.223 --- trunk/doc/CHANGELOG.md | 3 ++- trunk/src/core/srs_core_version4.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 130d0bce10..381f1d40b9 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,9 +8,10 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2022-01-13, Merge [#2873](https://github.com/ossrs/srs/pull/2873): LiveSource: Refine fetch for external exposed interface. (#2873). v4.0.223 * v4.0, 2022-01-13, Add conf/lighthouse.conf for LightHouse. v4.0.222 * v4.0, 2022-01-12, Refine the running homepage. v4.0.221 -* v4.0, 2022-01-12, Merge [#2863](https://github.com/ossrs/srs/pull/2863): RTC: fix play crash or no stream for rtmp2rtc tips.(#2863). v4.0.220 +* v4.0, 2022-01-12, Merge [#2863](https://github.com/ossrs/srs/pull/2863): RTC: fix play crash or no stream for rtmp2rtc tips. (#2863). v4.0.220 * v4.0, 2022-01-05, For [#2717](https://github.com/ossrs/srs/issues/2717): When reopening segment, never update the duration. (#2717). v4.0.219 * v4.0, 2022-01-04, Discover api server and ip as candidates. v4.0.218 * v4.0, 2022-01-04, Install test-on self-sign certificate. v4.0.217 diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 66794be67c..c67b5f8eeb 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 222 +#define VERSION_REVISION 223 #endif From db3ceb445bd2f2833b2cccba532ac2661cd422b3 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 12:07:34 +0800 Subject: [PATCH 18/32] Support api_port to specify the WebRTC API port. v4.0.224 --- trunk/doc/CHANGELOG.md | 1 + trunk/research/api-server/static-dir/index.html | 4 ++-- trunk/research/players/js/srs.sdk.js | 4 +++- trunk/src/core/srs_core_version4.hpp | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 381f1d40b9..a2436754f5 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,6 +8,7 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2022-01-14, Support api_port to specify the WebRTC API port. v4.0.224 * v4.0, 2022-01-13, Merge [#2873](https://github.com/ossrs/srs/pull/2873): LiveSource: Refine fetch for external exposed interface. (#2873). v4.0.223 * v4.0, 2022-01-13, Add conf/lighthouse.conf for LightHouse. v4.0.222 * v4.0, 2022-01-12, Refine the running homepage. v4.0.221 diff --git a/trunk/research/api-server/static-dir/index.html b/trunk/research/api-server/static-dir/index.html index d54b702896..684848da3c 100755 --- a/trunk/research/api-server/static-dir/index.html +++ b/trunk/research/api-server/static-dir/index.html @@ -63,8 +63,8 @@

SRS works!

if (true) { const prefix = `players/?schema=${window.location.protocol.replace(':', '')}`; const httpPort = window.location.port || (window.location.protocol === 'http:' ? 80 : 443); - // If not 8080, user should proxy to the default port. - const query = parseInt(window.location.port) === 8080 ? '' : `&port=${httpPort}`; + // If not 8080, user should proxy both stream and API to the default port. + const query = parseInt(window.location.port) === 8080 ? '' : `&port=${httpPort}&api_port=${httpPort}`; document.getElementById("enPlayer").setAttribute('href', `${prefix}${query}`); document.getElementById("cnPlayer").setAttribute('href', `${prefix}${query}`); } diff --git a/trunk/research/players/js/srs.sdk.js b/trunk/research/players/js/srs.sdk.js index ed5276b50c..af4f488378 100644 --- a/trunk/research/players/js/srs.sdk.js +++ b/trunk/research/players/js/srs.sdk.js @@ -267,6 +267,7 @@ function SrsRtcPlayerAsync() { // webrtc://r.ossrs.net/live/livestream // or specifies the API port: // webrtc://r.ossrs.net:11985/live/livestream + // webrtc://r.ossrs.net/live/livestream?api_port=11985 // or autostart the play: // webrtc://r.ossrs.net/live/livestream?autostart=true // or change the app from live to myapp: @@ -438,8 +439,9 @@ function SrsRtcPlayerAsync() { } else if (window.location.href.indexOf('https://') === 0) { ret.port = 443; } else { + // Allow use api_port to specify the WebRTC API port. // For WebRTC, SRS use 1985 as default API port. - ret.port = 1985; + ret.port = ret.user_query.api_port || 1985; } } } diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index c67b5f8eeb..c9415a6501 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 223 +#define VERSION_REVISION 224 #endif From c6c2e971899ebd774e64a080d3d34bcffb408b5f Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 12:16:45 +0800 Subject: [PATCH 19/32] Support api_port to specify the WebRTC API port. v4.0.225 --- trunk/research/players/js/srs.page.js | 10 ++++++++-- trunk/research/players/js/srs.sdk.js | 3 ++- trunk/src/core/srs_core_version4.hpp | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/trunk/research/players/js/srs.page.js b/trunk/research/players/js/srs.page.js index 26b3971e1c..ffc88cdfab 100755 --- a/trunk/research/players/js/srs.page.js +++ b/trunk/research/players/js/srs.page.js @@ -24,7 +24,7 @@ function update_nav() { } // Special extra params, such as auth_key. -function user_extra_params(query, params) { +function user_extra_params(query, params, rtc) { var queries = params || []; for (var key in query.user_query) { @@ -37,6 +37,10 @@ function user_extra_params(query, params) { continue; } + if (!rtc && key === 'api_port') { + continue; + } + if (query[key]) { queries.push(key + '=' + query[key]); } @@ -90,6 +94,8 @@ function build_default_flv_url() { function build_default_rtc_url(query) { // The format for query string to overwrite configs of server. console.log('?eip=x.x.x.x to overwrite candidate. 覆盖服务器candidate(外网IP)配置'); + console.log('?api_port=x to overwrite WebRTC API(1985).'); + console.log('?schema=http|https to overwrite WebRTC API protocol.'); var server = (!query.server)? window.location.hostname:query.server; var vhost = (!query.vhost)? window.location.hostname:query.vhost; @@ -104,7 +110,7 @@ function build_default_rtc_url(query) { if (query.schema && window.location.protocol !== query.schema + ':') { queries.push('schema=' + query.schema); } - queries = user_extra_params(query, queries); + queries = user_extra_params(query, queries, true); var uri = "webrtc://" + server + api + "/" + app + "/" + stream + "?" + queries.join('&'); while (uri.lastIndexOf("?") === uri.length - 1) { diff --git a/trunk/research/players/js/srs.sdk.js b/trunk/research/players/js/srs.sdk.js index af4f488378..5673aa045f 100644 --- a/trunk/research/players/js/srs.sdk.js +++ b/trunk/research/players/js/srs.sdk.js @@ -210,8 +210,9 @@ function SrsRtcPublisherAsync() { } else if (window.location.href.indexOf('https://') === 0) { ret.port = 443; } else { + // Allow use api_port to specify the WebRTC API port. // For WebRTC, SRS use 1985 as default API port. - ret.port = 1985; + ret.port = ret.user_query.api_port || 1985; } } } diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index c9415a6501..0999c7ba23 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 224 +#define VERSION_REVISION 225 #endif From 73d0ce1ceeaeaf4b2fe2deb78aa0a337eb2533a9 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 13:32:14 +0800 Subject: [PATCH 20/32] Support api to specify the WebRTC API port. v4.0.225 --- .../research/api-server/static-dir/index.html | 2 +- trunk/research/players/js/srs.page.js | 6 +----- trunk/research/players/js/srs.sdk.js | 20 ++++++++++++++----- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/trunk/research/api-server/static-dir/index.html b/trunk/research/api-server/static-dir/index.html index 684848da3c..8d92fc12cc 100755 --- a/trunk/research/api-server/static-dir/index.html +++ b/trunk/research/api-server/static-dir/index.html @@ -64,7 +64,7 @@

SRS works!

const prefix = `players/?schema=${window.location.protocol.replace(':', '')}`; const httpPort = window.location.port || (window.location.protocol === 'http:' ? 80 : 443); // If not 8080, user should proxy both stream and API to the default port. - const query = parseInt(window.location.port) === 8080 ? '' : `&port=${httpPort}&api_port=${httpPort}`; + const query = parseInt(window.location.port) === 8080 ? '' : `&port=${httpPort}&api=${httpPort}`; document.getElementById("enPlayer").setAttribute('href', `${prefix}${query}`); document.getElementById("cnPlayer").setAttribute('href', `${prefix}${query}`); } diff --git a/trunk/research/players/js/srs.page.js b/trunk/research/players/js/srs.page.js index ffc88cdfab..d680f3cbd6 100755 --- a/trunk/research/players/js/srs.page.js +++ b/trunk/research/players/js/srs.page.js @@ -37,10 +37,6 @@ function user_extra_params(query, params, rtc) { continue; } - if (!rtc && key === 'api_port') { - continue; - } - if (query[key]) { queries.push(key + '=' + query[key]); } @@ -94,7 +90,7 @@ function build_default_flv_url() { function build_default_rtc_url(query) { // The format for query string to overwrite configs of server. console.log('?eip=x.x.x.x to overwrite candidate. 覆盖服务器candidate(外网IP)配置'); - console.log('?api_port=x to overwrite WebRTC API(1985).'); + console.log('?api=x to overwrite WebRTC API(1985).'); console.log('?schema=http|https to overwrite WebRTC API protocol.'); var server = (!query.server)? window.location.hostname:query.server; diff --git a/trunk/research/players/js/srs.sdk.js b/trunk/research/players/js/srs.sdk.js index 5673aa045f..5cda7947cd 100644 --- a/trunk/research/players/js/srs.sdk.js +++ b/trunk/research/players/js/srs.sdk.js @@ -185,6 +185,12 @@ function SrsRtcPublisherAsync() { var port = a.port; if (!port) { + // Finger out by webrtc url, if contains http or https port, to overwrite default 1985. + if (schema === 'webrtc' && url.indexOf(`webrtc://${a.host}:`) === 0) { + port = (url.indexOf(`webrtc://${a.host}:80`) === 0) ? 80 : 443; + } + + // Guess by schema. if (schema === 'http') { port = 80; } else if (schema === 'https') { @@ -210,9 +216,8 @@ function SrsRtcPublisherAsync() { } else if (window.location.href.indexOf('https://') === 0) { ret.port = 443; } else { - // Allow use api_port to specify the WebRTC API port. // For WebRTC, SRS use 1985 as default API port. - ret.port = ret.user_query.api_port || 1985; + ret.port = 1985; } } } @@ -268,7 +273,7 @@ function SrsRtcPlayerAsync() { // webrtc://r.ossrs.net/live/livestream // or specifies the API port: // webrtc://r.ossrs.net:11985/live/livestream - // webrtc://r.ossrs.net/live/livestream?api_port=11985 + // webrtc://r.ossrs.net:80/live/livestream // or autostart the play: // webrtc://r.ossrs.net/live/livestream?autostart=true // or change the app from live to myapp: @@ -415,6 +420,12 @@ function SrsRtcPlayerAsync() { var port = a.port; if (!port) { + // Finger out by webrtc url, if contains http or https port, to overwrite default 1985. + if (schema === 'webrtc' && url.indexOf(`webrtc://${a.host}:`) === 0) { + port = (url.indexOf(`webrtc://${a.host}:80`) === 0) ? 80 : 443; + } + + // Guess by schema. if (schema === 'http') { port = 80; } else if (schema === 'https') { @@ -440,9 +451,8 @@ function SrsRtcPlayerAsync() { } else if (window.location.href.indexOf('https://') === 0) { ret.port = 443; } else { - // Allow use api_port to specify the WebRTC API port. // For WebRTC, SRS use 1985 as default API port. - ret.port = ret.user_query.api_port || 1985; + ret.port = 1985; } } } From 3881c4c77ed71a9fdb4ecde560dc1f8a16ed66a8 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 14:05:00 +0800 Subject: [PATCH 21/32] Add SrsAutoFreeH to release ptr with hooks. (#2880). v4.0.226 --- trunk/doc/CHANGELOG.md | 4 +++- trunk/src/core/srs_core_autofree.hpp | 18 ++++++++++++++---- trunk/src/core/srs_core_version4.hpp | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index a2436754f5..1d13b8e557 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,7 +8,9 @@ The changelog for SRS. ## SRS 4.0 Changelog -* v4.0, 2022-01-14, Support api_port to specify the WebRTC API port. v4.0.224 +* v4.0, 2022-01-13, For [#2880](https://github.com/ossrs/srs/pull/2880): Add SrsAutoFreeH to release ptr with hooks. (#2880). v4.0.226 +* v4.0, 2022-01-13, Support api_port to specify the WebRTC API port. v4.0.226 +* v4.0, 2022-01-13, Support api_port to specify the WebRTC API port. v4.0.224 * v4.0, 2022-01-13, Merge [#2873](https://github.com/ossrs/srs/pull/2873): LiveSource: Refine fetch for external exposed interface. (#2873). v4.0.223 * v4.0, 2022-01-13, Add conf/lighthouse.conf for LightHouse. v4.0.222 * v4.0, 2022-01-12, Refine the running homepage. v4.0.221 diff --git a/trunk/src/core/srs_core_autofree.hpp b/trunk/src/core/srs_core_autofree.hpp index 2212074b82..2159cfe4c9 100644 --- a/trunk/src/core/srs_core_autofree.hpp +++ b/trunk/src/core/srs_core_autofree.hpp @@ -30,13 +30,16 @@ // where the char* pstr = new char[size]. // To delete object. #define SrsAutoFree(className, instance) \ - impl_SrsAutoFree _auto_free_##instance(&instance, false, false) + impl_SrsAutoFree _auto_free_##instance(&instance, false, false, NULL) // To delete array. #define SrsAutoFreeA(className, instance) \ - impl_SrsAutoFree _auto_free_array_##instance(&instance, true, false) + impl_SrsAutoFree _auto_free_array_##instance(&instance, true, false, NULL) // Use free instead of delete. #define SrsAutoFreeF(className, instance) \ - impl_SrsAutoFree _auto_free_##instance(&instance, false, true) + impl_SrsAutoFree _auto_free_##instance(&instance, false, true, NULL) +// Use hook instead of delete. +#define SrsAutoFreeH(className, instance, hook) \ + impl_SrsAutoFree _auto_free_##instance(&instance, false, false, hook) // The template implementation. template class impl_SrsAutoFree @@ -45,11 +48,16 @@ class impl_SrsAutoFree T** ptr; bool is_array; bool _use_free; + void (*_hook)(T*); public: - impl_SrsAutoFree(T** p, bool array, bool use_free) { + // If use_free, use free(void*) to release the p. + // If specified hook, use hook(p) to release it. + // Use delete to release p, or delete[] if p is an array. + impl_SrsAutoFree(T** p, bool array, bool use_free, void (*hook)(T*)) { ptr = p; is_array = array; _use_free = use_free; + _hook = hook; } virtual ~impl_SrsAutoFree() { @@ -59,6 +67,8 @@ class impl_SrsAutoFree if (_use_free) { free(*ptr); + } else if (_hook) { + _hook(*ptr); } else { if (is_array) { delete[] *ptr; diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 0999c7ba23..32ef05add6 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 225 +#define VERSION_REVISION 226 #endif From 6a5bc27f9bca885969997e4b4fffec79ca2f69b3 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 15:16:54 +0800 Subject: [PATCH 22/32] Support configure with --config as default config file. v4.0.227 --- trunk/conf/lighthouse.conf | 5 ++ trunk/configure | 4 +- trunk/doc/CHANGELOG.md | 2 +- trunk/etc/init.d/srs-api | 127 --------------------------- trunk/scripts/install.sh | 2 +- trunk/src/core/srs_core_version4.hpp | 2 +- 6 files changed, 11 insertions(+), 131 deletions(-) delete mode 100755 trunk/etc/init.d/srs-api diff --git a/trunk/conf/lighthouse.conf b/trunk/conf/lighthouse.conf index 61e5ba5b0a..fd363e350c 100644 --- a/trunk/conf/lighthouse.conf +++ b/trunk/conf/lighthouse.conf @@ -4,6 +4,11 @@ max_connections 1000; daemon on; srs_log_tank file; +# For LightHouse VM to run SRS, never enable docker. +in_docker off; +disable_daemon_for_docker off; +auto_reload_for_docker off; + http_server { enabled on; listen 8080; diff --git a/trunk/configure b/trunk/configure index be64ac9bf4..5c28041be1 100755 --- a/trunk/configure +++ b/trunk/configure @@ -463,6 +463,7 @@ CXXFLAGS = ${CXXFLAGS} # install prefix. SRS_PREFIX=${SRS_PREFIX} +SRS_DEFAULT_CONFIG=${SRS_DEFAULT_CONFIG} __REAL_INSTALL=\$(DESTDIR)\$(SRS_PREFIX) default: server @@ -609,11 +610,12 @@ install: @mkdir -p \$(__REAL_INSTALL)/etc/init.d @cp -f etc/init.d/srs \$(__REAL_INSTALL)/etc/init.d @sed -i "s|^ROOT=.*|ROOT=\"\$(SRS_PREFIX)\"|g" \$(__REAL_INSTALL)/etc/init.d/srs + @sed -i "s|^CONFIG=.*|CONFIG=\"\$(SRS_DEFAULT_CONFIG)\"|g" \$(__REAL_INSTALL)/etc/init.d/srs @echo "Now copy systemctl service files" @mkdir -p \$(__REAL_INSTALL)/usr/lib/systemd/system @cp -f usr/lib/systemd/system/srs.service \$(__REAL_INSTALL)/usr/lib/systemd/system/srs.service @echo "" - @echo "@see: https://github.com/ossrs/srs/wiki/v3_CN_LinuxService" + @echo "@see: https://github.com/ossrs/srs/wiki/v4_CN_LinuxService" END diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 1d13b8e557..db13e5838a 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,8 +8,8 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2022-01-13, Support configure with --config as default config file. v4.0.227 * v4.0, 2022-01-13, For [#2880](https://github.com/ossrs/srs/pull/2880): Add SrsAutoFreeH to release ptr with hooks. (#2880). v4.0.226 -* v4.0, 2022-01-13, Support api_port to specify the WebRTC API port. v4.0.226 * v4.0, 2022-01-13, Support api_port to specify the WebRTC API port. v4.0.224 * v4.0, 2022-01-13, Merge [#2873](https://github.com/ossrs/srs/pull/2873): LiveSource: Refine fetch for external exposed interface. (#2873). v4.0.223 * v4.0, 2022-01-13, Add conf/lighthouse.conf for LightHouse. v4.0.222 diff --git a/trunk/etc/init.d/srs-api b/trunk/etc/init.d/srs-api deleted file mode 100755 index 64e5413c7f..0000000000 --- a/trunk/etc/init.d/srs-api +++ /dev/null @@ -1,127 +0,0 @@ -#!/bin/bash - -### BEGIN INIT INFO -# Provides: ossrs-api(srs-api) -# Required-Start: $all -# Required-Stop: $all -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: ossrs-api(srs-api) -# Description: https://github.com/ossrs/srs -### END INIT INFO - -# the config of ROOT, user must modify it when start srs from other directory, -# it's ok to use the script by command ./etc/init.d/ossrs -ROOT="./" -APP="python ./research/api-server/server.py" -CONFIG="8085" - -######################################################################## -# utility functions -######################################################################## -RED="\\033[31m" -GREEN="\\033[32m" -YELLOW="\\033[33m" -BLACK="\\033[0m" -POS="\\033[60G" - -ok_msg(){ - echo -e "${1}${POS}${BLACK}[${GREEN} OK ${BLACK}]" -} - -failed_msg(){ - echo -e "${1}${POS}${BLACK}[${RED}FAILED${BLACK}]" -} - -# load process info of srs-api -# @set variable $srs_api_id to the process id. -# @return 0, if process exists; otherwise: -# 1, for srs-api not exists. -# @set variable $error_msg if error. -load_process_info() { - srs_api_id=`ps aux|grep python|grep research|grep "api-server"|awk '{print $2}'` - if [[ -z $srs_api_id ]]; then error_msg="srs-api process does not exists"; return 1; fi - - return 0; -} - -start() { - # if exists, exit. - load_process_info - if [[ 0 -eq $? ]]; then failed_msg "SRS-api started(pid ${srs_api_id}), should not start it again."; return 0; fi - - # not exists, start server - ok_msg "Starting SRS-api..." - # TODO: FIXME: set limit by, for instance, "ulimit -HSn 10000" - # TODO: FIXME: write log to, for instance, the same dir of log. - # TODO: FIXME: support daemon, without nohup. - (cd ${ROOT}; nohup ${APP} ${CONFIG} >/dev/null 2>&1 &) - - # check again after start server - load_process_info - ret=$?; if [[ 0 -eq $? ]]; then ok_msg "SRS-api started(pid ${srs_api_id})"; return 0; fi - - failed_msg "SRS-api not started" - return $ret -} - -stop() { - # not start, exit - load_process_info - if [[ 0 -ne $? ]]; then failed_msg "SRS-api not start."; return 0; fi - - ok_msg "Stopping SRS-api(pid ${srs_api_id})..." - - # process exists, kill util stop - for((;;)); do - load_process_info - if [[ 0 -eq $? ]]; then - kill -s SIGKILL ${srs_api_id} 2>/dev/null - ret=$?; if [[ 0 -ne $ret ]]; then failed_msg "send signal SIGKILL failed ret=$ret"; return $ret; fi - sleep 0.1 - else - ok_msg "SRS-api stopped" - break; - fi - done - - sleep 0.1 - return 0 -} - -# get the status of srs-api process -# @return 0 if srs-api is running; otherwise, 1 for stopped. -status() { - load_process_info - ret=$?; if [[ 0 -eq $ret ]]; then echo "SRS-api(pid ${srs_api_id}) is running."; return 0; fi - - echo "SRS-api is stopped" - return 1 -} - -menu() { - case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop - start - ;; - status) - status - ;; - *) - echo "Usage: $0 {start|stop|status|restart}" - return 1 - ;; - esac -} - -menu $1 - -code=$? -exit ${code} diff --git a/trunk/scripts/install.sh b/trunk/scripts/install.sh index 6f161b13f8..416c6537d3 100755 --- a/trunk/scripts/install.sh +++ b/trunk/scripts/install.sh @@ -129,7 +129,7 @@ else fi echo "" -echo "see: https://github.com/ossrs/srs/wiki/v3_CN_LinuxService" +echo "see: https://github.com/ossrs/srs/wiki/v4_CN_LinuxService" echo "install success, you can start SRS on CentOS6:" echo -e "${GREEN} sudo /etc/init.d/srs start${BLACK}" echo "or CentOS7:" diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 32ef05add6..d3c84788e9 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 226 +#define VERSION_REVISION 227 #endif From 8830d267f299d8edca255f27d37157483ea8fc7e Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 16:20:03 +0800 Subject: [PATCH 23/32] Refine conf for vm.conf --- trunk/conf/{lighthouse.conf => vm.conf} | 0 trunk/doc/CHANGELOG.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename trunk/conf/{lighthouse.conf => vm.conf} (100%) diff --git a/trunk/conf/lighthouse.conf b/trunk/conf/vm.conf similarity index 100% rename from trunk/conf/lighthouse.conf rename to trunk/conf/vm.conf diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index db13e5838a..d1652f1693 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -12,7 +12,7 @@ The changelog for SRS. * v4.0, 2022-01-13, For [#2880](https://github.com/ossrs/srs/pull/2880): Add SrsAutoFreeH to release ptr with hooks. (#2880). v4.0.226 * v4.0, 2022-01-13, Support api_port to specify the WebRTC API port. v4.0.224 * v4.0, 2022-01-13, Merge [#2873](https://github.com/ossrs/srs/pull/2873): LiveSource: Refine fetch for external exposed interface. (#2873). v4.0.223 -* v4.0, 2022-01-13, Add conf/lighthouse.conf for LightHouse. v4.0.222 +* v4.0, 2022-01-13, Add conf/vm.conf for cloud virtual machine. v4.0.222 * v4.0, 2022-01-12, Refine the running homepage. v4.0.221 * v4.0, 2022-01-12, Merge [#2863](https://github.com/ossrs/srs/pull/2863): RTC: fix play crash or no stream for rtmp2rtc tips. (#2863). v4.0.220 * v4.0, 2022-01-05, For [#2717](https://github.com/ossrs/srs/issues/2717): When reopening segment, never update the duration. (#2717). v4.0.219 From 99ff853de9ed4cfff8c5d6afa67469a49210ae14 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 17:01:57 +0800 Subject: [PATCH 24/32] Refine package variables. v4.0.228 --- .github/workflows/release.yml | 8 ++++++-- trunk/Dockerfile.pkg | 3 --- trunk/src/core/srs_core_version4.hpp | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e86f11db4..9e0185715c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,8 +49,10 @@ jobs: # SRS_PACKAGE_ZIP=SRS-CentOS7-x86_64-4.0.145.zip # SRS_PACKAGE_MD5=3880a26e30b283edf05700a4e69956e5 - name: Create package zip + env: + PACKAGER: ${{ secrets.SRS_PACKAGER_BINARY }} run: | - docker build --tag srs:pkg --build-arg version=$SRS_VERSION -f trunk/Dockerfile.pkg . && + docker build --tag srs:pkg --build-arg version=$SRS_VERSION --build-arg SRS_AUTO_PACKAGER=$PACKAGER -f trunk/Dockerfile.pkg . && SRS_PACKAGE_ZIP=SRS-CentOS7-x86_64-$SRS_VERSION.zip && docker run --rm -v $(pwd):/output srs:pkg cp objs/$SRS_PACKAGE_ZIP /output/ && du -sh $SRS_PACKAGE_ZIP && @@ -72,9 +74,11 @@ jobs: # Build # Build SRS image - name: Build SRS docker image + env: + PACKAGER: ${{ secrets.SRS_PACKAGER_DOCKER }} run: | echo "Release ossrs/srs:$SRS_TAG" - docker build --tag ossrs/srs:$SRS_TAG -f trunk/Dockerfile . + docker build --tag ossrs/srs:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER -f trunk/Dockerfile . ################################################################ # Docker diff --git a/trunk/Dockerfile.pkg b/trunk/Dockerfile.pkg index ade5778cde..ca6602ef3b 100644 --- a/trunk/Dockerfile.pkg +++ b/trunk/Dockerfile.pkg @@ -6,9 +6,6 @@ ARG version # Install depends tools. RUN yum install -y zip -# Setup the packager env. -ENV SRS_AUTO_PACKAGER ossrs - # Build and install SRS. ADD srs-server-${version}.tar.gz /srs WORKDIR /srs/srs-server-${version}/trunk diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index d3c84788e9..10978e4cc1 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 227 +#define VERSION_REVISION 228 #endif From 584889754c4807fc95b6c0bddb275c9f1a65ca72 Mon Sep 17 00:00:00 2001 From: chundonglinlin Date: Thu, 13 Jan 2022 17:03:03 +0800 Subject: [PATCH 25/32] RTC: fix play rtc judge for config rtc2rtmp on.(#2863) (#2872) --- trunk/src/app/srs_app_rtc_api.cpp | 9 ++++++++- trunk/src/app/srs_app_rtc_source.hpp | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/trunk/src/app/srs_app_rtc_api.cpp b/trunk/src/app/srs_app_rtc_api.cpp index d72b192e1b..38fd28c76b 100644 --- a/trunk/src/app/srs_app_rtc_api.cpp +++ b/trunk/src/app/srs_app_rtc_api.cpp @@ -186,8 +186,15 @@ srs_error_t SrsGoApiRtcPlay::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMe server_enabled, rtc_enabled, ruc.req_->vhost.c_str()); } + // Whether RTC stream is active. + bool is_rtc_stream_active = false; + if (true) { + SrsRtcSource* source = _srs_rtc_sources->fetch(ruc.req_); + is_rtc_stream_active = (source && !source->can_publish()); + } + // For RTMP to RTC, fail if disabled and RTMP is active, see https://github.com/ossrs/srs/issues/2728 - if (!_srs_config->get_rtc_from_rtmp(ruc.req_->vhost)) { + if (!is_rtc_stream_active && !_srs_config->get_rtc_from_rtmp(ruc.req_->vhost)) { SrsLiveSource* rtmp = _srs_sources->fetch(ruc.req_); if (rtmp && !rtmp->inactive()) { return srs_error_new(ERROR_RTC_DISABLED, "Disabled rtmp_to_rtc of %s, see #2728", ruc.req_->vhost.c_str()); diff --git a/trunk/src/app/srs_app_rtc_source.hpp b/trunk/src/app/srs_app_rtc_source.hpp index 1b9555a049..c4095946dc 100644 --- a/trunk/src/app/srs_app_rtc_source.hpp +++ b/trunk/src/app/srs_app_rtc_source.hpp @@ -112,7 +112,7 @@ class SrsRtcSourceManager // @param r the client request. // @param pps the matched source, if success never be NULL. virtual srs_error_t fetch_or_create(SrsRequest* r, SrsRtcSource** pps); -private: +public: // Get the exists source, NULL when not exists. virtual SrsRtcSource* fetch(SrsRequest* r); }; From 7796083e9a6a5f9b5c9aa550b4146a1381ef4a2f Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 17:04:50 +0800 Subject: [PATCH 26/32] RTC: fix play rtc judge for config rtc2rtmp on. (#2872). v4.0.229 --- trunk/doc/CHANGELOG.md | 1 + trunk/src/core/srs_core_version4.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index d1652f1693..00c838483f 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,6 +8,7 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2022-01-13, Merge [#2872](https://github.com/ossrs/srs/pull/2872): RTC: fix play rtc judge for config rtc2rtmp on. (#2872). v4.0.229 * v4.0, 2022-01-13, Support configure with --config as default config file. v4.0.227 * v4.0, 2022-01-13, For [#2880](https://github.com/ossrs/srs/pull/2880): Add SrsAutoFreeH to release ptr with hooks. (#2880). v4.0.226 * v4.0, 2022-01-13, Support api_port to specify the WebRTC API port. v4.0.224 diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 10978e4cc1..32d01f087e 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 228 +#define VERSION_REVISION 229 #endif From 0dd6246c2fcacc7650b5b7615a077c1ceb0ea9d2 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 17:08:01 +0800 Subject: [PATCH 27/32] Release v4.0-b3, 4.0 beta3, v4.0.229, 144393 lines. --- README.md | 1 + trunk/Dockerfile | 2 ++ trunk/Dockerfile.pkg | 1 + trunk/src/main/srs_main_server.cpp | 4 ++-- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 32b84ddce4..fb93a06848 100755 --- a/README.md +++ b/README.md @@ -130,6 +130,7 @@ A big THANK YOU goes to: ## Releases +* 2022-01-13, Release [v4.0-b3](https://github.com/ossrs/srs/releases/tag/v4.0-b3), v4.0-b3, 4.0 beta3, v4.0.229, 144393 lines. * 2022-01-03, Release [v4.0-b2](https://github.com/ossrs/srs/releases/tag/v4.0-b2), v4.0-b2, 4.0 beta2, v4.0.215, 144278 lines. * 2021-12-19, Release [v4.0-b1](https://github.com/ossrs/srs/releases/tag/v4.0-b1), v4.0-b1, 4.0 beta1, v4.0.206, 144126 lines. * 2021-12-01, Release [v4.0-b0](https://github.com/ossrs/srs/releases/tag/v4.0-b0), v4.0-b0, 4.0 beta0, v4.0.201, 144022 lines. diff --git a/trunk/Dockerfile b/trunk/Dockerfile index bd37ef08c5..922cf2eedf 100644 --- a/trunk/Dockerfile +++ b/trunk/Dockerfile @@ -3,6 +3,8 @@ FROM ossrs/srs:dev AS build # Install depends tools. RUN yum install -y gcc make gcc-c++ patch unzip perl git +ARG SRS_AUTO_PACKAGER + # Build and install SRS. COPY . /srs WORKDIR /srs/trunk diff --git a/trunk/Dockerfile.pkg b/trunk/Dockerfile.pkg index ca6602ef3b..1fb3d600aa 100644 --- a/trunk/Dockerfile.pkg +++ b/trunk/Dockerfile.pkg @@ -2,6 +2,7 @@ FROM ossrs/srs:dev # version=4.0.145 ARG version +ARG SRS_AUTO_PACKAGER # Install depends tools. RUN yum install -y zip diff --git a/trunk/src/main/srs_main_server.cpp b/trunk/src/main/srs_main_server.cpp index 46465c62d5..c45bcf5ea1 100644 --- a/trunk/src/main/srs_main_server.cpp +++ b/trunk/src/main/srs_main_server.cpp @@ -127,8 +127,8 @@ srs_error_t do_main(int argc, char** argv) srs_trace2(TAG_MAIN, "%s, %s", RTMP_SIG_SRS_SERVER, RTMP_SIG_SRS_LICENSE); srs_trace("authors: %s", RTMP_SIG_SRS_AUTHORS); srs_trace("contributors: %s", SRS_CONSTRIBUTORS); - srs_trace("cwd=%s, work_dir=%s, build: %s, configure: %s, uname: %s, osx: %d", - _srs_config->cwd().c_str(), cwd.c_str(), SRS_BUILD_DATE, SRS_USER_CONFIGURE, SRS_UNAME, SRS_OSX_BOOL); + srs_trace("cwd=%s, work_dir=%s, build: %s, configure: %s, uname: %s, osx: %d, pkg: %s", + _srs_config->cwd().c_str(), cwd.c_str(), SRS_BUILD_DATE, SRS_USER_CONFIGURE, SRS_UNAME, SRS_OSX_BOOL, SRS_PACKAGER); srs_trace("configure detail: " SRS_CONFIGURE); #ifdef SRS_EMBEDED_TOOL_CHAIN srs_trace("crossbuild tool chain: " SRS_EMBEDED_TOOL_CHAIN); From 16f17848bb7b413ed5e5de0645ccf8e63e1b5d43 Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 16 Jan 2022 21:59:46 +0800 Subject: [PATCH 28/32] Update README for **Cloud Virtual Machine** --- README.md | 1 + trunk/doc/CHANGELOG.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index fb93a06848..b529ccad47 100755 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ Note that if convert RTMP to WebRTC, please use [`rtmp2rtc.conf`](https://github > Highly recommend that directly run SRS by > **docker([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#docker) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#docker))**, +> **Cloud Virtual Machine([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#cloud-virtual-machine) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#cloud-virtual-machine))**, > or **K8s([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#k8s) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#k8s))**, > however it's also easy to build SRS from source code, for detail please see > **Getting Started([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#getting-started) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#getting-started))**. diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 00c838483f..24ee26ca0e 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,6 +8,7 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2022-01-16, Update README for **Cloud Virtual Machine([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#cloud-virtual-machine) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#cloud-virtual-machine))** * v4.0, 2022-01-13, Merge [#2872](https://github.com/ossrs/srs/pull/2872): RTC: fix play rtc judge for config rtc2rtmp on. (#2872). v4.0.229 * v4.0, 2022-01-13, Support configure with --config as default config file. v4.0.227 * v4.0, 2022-01-13, For [#2880](https://github.com/ossrs/srs/pull/2880): Add SrsAutoFreeH to release ptr with hooks. (#2880). v4.0.226 From 2502726c390919e5cc45cc7d3c72b4a8cfead0e7 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 17 Jan 2022 09:45:08 +0800 Subject: [PATCH 29/32] Add label **good first issue** for issues --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b08e2cd72a..a68f10f3cf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,5 @@ Welome to contribute to SRS! 1. Please read **Contribution([CN](https://github.com/ossrs/srs/issues/2866#contribution) EN)** before file new PR. -2. Please start from fixing some [issues](https://github.com/ossrs/srs/issues), then follow the [guide](https://github.com/ossrs/srs/wiki/HowToFilePR). +2. Please start from fixing some [Issues: good first issue](https://github.com/ossrs/srs/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22), then follow the [guide](https://github.com/ossrs/srs/wiki/HowToFilePR). 3. We will review your PR ASAP. From b9bfe1882999e1190389006dfd4851eba7c10d52 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 17 Jan 2022 14:13:42 +0800 Subject: [PATCH 30/32] CICD: Refine release for droplet --- .github/workflows/release.yml | 131 +++++++++++++++------------ trunk/doc/CHANGELOG.md | 1 + trunk/src/core/srs_core_version4.hpp | 2 +- 3 files changed, 77 insertions(+), 57 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e0185715c..7736a7388e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,10 +12,13 @@ jobs: runs-on: ubuntu-20.04 steps: - ################################################################ + ################################################################################################################## + ################################################################################################################## + ################################################################################################################## # Git checkout - name: Checkout repository uses: actions/checkout@v2 + # The github.ref is, for example, refs/tags/v4.0.145 or refs/tags/v4.0-r8 # Generate variables like: # SRS_TAG=v4.0-r8 @@ -32,34 +35,7 @@ jobs: echo "SRS_VERSION=$SRS_VERSION" >> $GITHUB_ENV SRS_MAJOR=$(echo $SRS_TAG| cut -c 2) echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV - # Create source tar for release - # Generate variables like: - # SRS_SOURCE_TAR=srs-server-4.0.145.tar.gz - # SRS_SOURCE_MD5=83e38700a80a26e30b2df054e69956e5 - - name: Create source tar.gz - run: | - DEST_DIR=srs-server-$SRS_VERSION && mkdir -p $DEST_DIR && - cp README.md $DEST_DIR && cp LICENSE $DEST_DIR && cp -R trunk $DEST_DIR/trunk && - (cd $DEST_DIR/trunk/3rdparty && rm -rf *.zip openssl-*.gz srs-bench) && - tar zcf ${DEST_DIR}.tar.gz ${DEST_DIR} && du -sh ${DEST_DIR}* && rm -rf ${DEST_DIR} && - echo "SRS_SOURCE_TAR=${DEST_DIR}.tar.gz" >> $GITHUB_ENV && - echo "SRS_SOURCE_MD5=$(md5sum ${DEST_DIR}.tar.gz| awk '{print $1}')" >> $GITHUB_ENV - # Create package tar for release - # Generate variables like: - # SRS_PACKAGE_ZIP=SRS-CentOS7-x86_64-4.0.145.zip - # SRS_PACKAGE_MD5=3880a26e30b283edf05700a4e69956e5 - - name: Create package zip - env: - PACKAGER: ${{ secrets.SRS_PACKAGER_BINARY }} - run: | - docker build --tag srs:pkg --build-arg version=$SRS_VERSION --build-arg SRS_AUTO_PACKAGER=$PACKAGER -f trunk/Dockerfile.pkg . && - SRS_PACKAGE_ZIP=SRS-CentOS7-x86_64-$SRS_VERSION.zip && - docker run --rm -v $(pwd):/output srs:pkg cp objs/$SRS_PACKAGE_ZIP /output/ && - du -sh $SRS_PACKAGE_ZIP && - echo "SRS_PACKAGE_ZIP=$SRS_PACKAGE_ZIP" >> $GITHUB_ENV && - echo "SRS_PACKAGE_MD5=$(md5sum $SRS_PACKAGE_ZIP| awk '{print $1}')" >> $GITHUB_ENV - ################################################################ # Tests - name: Build test image run: docker build --tag srs:test -f trunk/Dockerfile.test . @@ -70,18 +46,21 @@ jobs: - name: Run SRS regression-test run: docker run --rm srs:test bash -c 'make && ./objs/srs -c conf/regression-test.conf && cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v' - ################################################################ - # Build - # Build SRS image + ################################################################################################################## + ################################################################################################################## + ################################################################################################################## + # Build SRS docker images - name: Build SRS docker image env: PACKAGER: ${{ secrets.SRS_PACKAGER_DOCKER }} + PACKAGER_DROPLET: ${{ secrets.SRS_PACKAGER_DROPLET }} run: | echo "Release ossrs/srs:$SRS_TAG" docker build --tag ossrs/srs:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER -f trunk/Dockerfile . + echo "Release ossrs/droplet:$SRS_TAG" + docker build --tag ossrs/droplet:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER_DROPLET -f trunk/Dockerfile . - ################################################################ - # Docker + # Docker hub - name: Login docker hub uses: docker/login-action@v1 with: @@ -89,12 +68,15 @@ jobs: password: "${{ secrets.DOCKER_PASSWORD }}" - name: Push to docker hub run: | - docker push ossrs/srs:$SRS_TAG docker tag ossrs/srs:$SRS_TAG ossrs/srs:$SRS_MAJOR - docker push ossrs/srs:$SRS_MAJOR docker tag ossrs/srs:$SRS_TAG ossrs/srs:latest - docker push ossrs/srs:latest - # Aliyun ACR + docker push --all-tags ossrs/srs + # + docker tag ossrs/droplet:$SRS_TAG ossrs/droplet:$SRS_MAJOR + docker tag ossrs/droplet:$SRS_TAG ossrs/droplet:latest + docker push --all-tags ossrs/droplet + + # Aliyun ACR hub - name: Login Aliyun docker hub uses: aliyun/acr-login@v1 with: @@ -104,31 +86,50 @@ jobs: - name: Push to Aliyun docker hub run: | docker tag ossrs/srs:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG - docker push registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG docker tag ossrs/srs:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_VERSION - docker push registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_VERSION docker tag ossrs/srs:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v$SRS_MAJOR - docker push registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v$SRS_MAJOR docker tag ossrs/srs:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_MAJOR - docker push registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_MAJOR docker tag ossrs/srs:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/srs:latest - docker push registry.cn-hangzhou.aliyuncs.com/ossrs/srs:latest + docker push --all-tags registry.cn-hangzhou.aliyuncs.com/ossrs/srs + # + docker tag ossrs/droplet:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:$SRS_TAG + docker tag ossrs/droplet:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:$SRS_VERSION + docker tag ossrs/droplet:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:v$SRS_MAJOR + docker tag ossrs/droplet:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:$SRS_MAJOR + docker tag ossrs/droplet:$SRS_TAG registry.cn-hangzhou.aliyuncs.com/ossrs/droplet:latest + docker push --all-tags registry.cn-hangzhou.aliyuncs.com/ossrs/droplet - ################################################################ - # K8S - - name: Setup KUBCONFIG for Aliyun ACK - run: |- - KUBECONFIG=$RUNNER_TEMP/kubeconfig_$(date +%s) - echo "${{ secrets.KUBCONFIG }}" > $KUBECONFIG - echo "KUBECONFIG=$KUBECONFIG" >> $GITHUB_ENV - # K8S for SRS 4.0 - - name: Release SRS 4.0 to Aliyun ACK - if: ${{ startsWith(github.ref, 'refs/tags/v4') }} - run: |- - kubectl set image deploy/srs4-deploy srs4=registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG - kubectl describe deploy/srs4-deploy + ################################################################################################################## + ################################################################################################################## + ################################################################################################################## + # Create source tar for release + # Generate variables like: + # SRS_SOURCE_TAR=srs-server-4.0.145.tar.gz + # SRS_SOURCE_MD5=83e38700a80a26e30b2df054e69956e5 + - name: Create source tar.gz + run: | + DEST_DIR=srs-server-$SRS_VERSION && mkdir -p $DEST_DIR && + cp README.md $DEST_DIR && cp LICENSE $DEST_DIR && cp -R trunk $DEST_DIR/trunk && + (cd $DEST_DIR/trunk/3rdparty && rm -rf *.zip openssl-*.gz srs-bench) && + tar zcf ${DEST_DIR}.tar.gz ${DEST_DIR} && du -sh ${DEST_DIR}* && rm -rf ${DEST_DIR} && + echo "SRS_SOURCE_TAR=${DEST_DIR}.tar.gz" >> $GITHUB_ENV && + echo "SRS_SOURCE_MD5=$(md5sum ${DEST_DIR}.tar.gz| awk '{print $1}')" >> $GITHUB_ENV + + # Create package tar for release + # Generate variables like: + # SRS_PACKAGE_ZIP=SRS-CentOS7-x86_64-4.0.145.zip + # SRS_PACKAGE_MD5=3880a26e30b283edf05700a4e69956e5 + - name: Create package zip + env: + PACKAGER: ${{ secrets.SRS_PACKAGER_BINARY }} + run: | + docker build --tag srs:pkg --build-arg version=$SRS_VERSION --build-arg SRS_AUTO_PACKAGER=$PACKAGER -f trunk/Dockerfile.pkg . && + SRS_PACKAGE_ZIP=SRS-CentOS7-x86_64-$SRS_VERSION.zip && + docker run --rm -v $(pwd):/output srs:pkg cp objs/$SRS_PACKAGE_ZIP /output/ && + du -sh $SRS_PACKAGE_ZIP && + echo "SRS_PACKAGE_ZIP=$SRS_PACKAGE_ZIP" >> $GITHUB_ENV && + echo "SRS_PACKAGE_MD5=$(md5sum $SRS_PACKAGE_ZIP| awk '{print $1}')" >> $GITHUB_ENV - ################################################################ # Create release. - name: Create release id: create_release @@ -156,6 +157,7 @@ jobs: * [FAQ](https://github.com/ossrs/srs/issues/2716), [Features](https://github.com/ossrs/srs/blob/4.0release/trunk/doc/Features.md#features) or [ChangeLogs](https://github.com/ossrs/srs/blob/4.0release/trunk/doc/CHANGELOG.md#changelog) draft: false prerelease: false + # Upload release source files - name: Upload Release Assets Source id: upload-release-assets-source @@ -165,6 +167,7 @@ jobs: with: release_id: ${{ steps.create_release.outputs.id }} assets_path: ${{ env.SRS_SOURCE_TAR }} + # Upload release package files - name: Upload Release Assets Package id: upload-release-assets-package @@ -175,3 +178,19 @@ jobs: release_id: ${{ steps.create_release.outputs.id }} assets_path: ${{ env.SRS_PACKAGE_ZIP }} + ################################################################################################################## + ################################################################################################################## + ################################################################################################################## + # K8S release to official website + - name: Setup KUBCONFIG for Aliyun ACK + run: |- + KUBECONFIG=$RUNNER_TEMP/kubeconfig_$(date +%s) + echo "${{ secrets.KUBCONFIG }}" > $KUBECONFIG + echo "KUBECONFIG=$KUBECONFIG" >> $GITHUB_ENV + # K8S for SRS 4.0 + - name: Release SRS 4.0 to Aliyun ACK + if: ${{ startsWith(github.ref, 'refs/tags/v4') }} + run: |- + kubectl set image deploy/srs4-deploy srs4=registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_TAG + kubectl describe deploy/srs4-deploy + diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 24ee26ca0e..6f2008801f 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,6 +8,7 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2022-01-17, Support docker image for [droplet](https://hub.docker.com/r/ossrs/droplet). v4.0.230 * v4.0, 2022-01-16, Update README for **Cloud Virtual Machine([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#cloud-virtual-machine) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#cloud-virtual-machine))** * v4.0, 2022-01-13, Merge [#2872](https://github.com/ossrs/srs/pull/2872): RTC: fix play rtc judge for config rtc2rtmp on. (#2872). v4.0.229 * v4.0, 2022-01-13, Support configure with --config as default config file. v4.0.227 diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 32d01f087e..1dbdd5f864 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 229 +#define VERSION_REVISION 230 #endif From 5d8b950a06cc2a0d00937d8f42c79dbd4a7b659b Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 17 Jan 2022 14:30:01 +0800 Subject: [PATCH 31/32] Update CHANGELOG --- README.md | 1 + trunk/doc/CHANGELOG.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index b529ccad47..9722a7c33b 100755 --- a/README.md +++ b/README.md @@ -131,6 +131,7 @@ A big THANK YOU goes to: ## Releases +* 2022-01-17, Release [v4.0-b4](https://github.com/ossrs/srs/releases/tag/v4.0-b4), v4.0-b4, 4.0 beta4, v4.0.230, 144393 lines. * 2022-01-13, Release [v4.0-b3](https://github.com/ossrs/srs/releases/tag/v4.0-b3), v4.0-b3, 4.0 beta3, v4.0.229, 144393 lines. * 2022-01-03, Release [v4.0-b2](https://github.com/ossrs/srs/releases/tag/v4.0-b2), v4.0-b2, 4.0 beta2, v4.0.215, 144278 lines. * 2021-12-19, Release [v4.0-b1](https://github.com/ossrs/srs/releases/tag/v4.0-b1), v4.0-b1, 4.0 beta1, v4.0.206, 144126 lines. diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 6f2008801f..636ae02e9d 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,6 +8,7 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2022-01-17, Release v4.0-b4, 4.0 beta4, v4.0.230, 144393 lines. * v4.0, 2022-01-17, Support docker image for [droplet](https://hub.docker.com/r/ossrs/droplet). v4.0.230 * v4.0, 2022-01-16, Update README for **Cloud Virtual Machine([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#cloud-virtual-machine) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#cloud-virtual-machine))** * v4.0, 2022-01-13, Merge [#2872](https://github.com/ossrs/srs/pull/2872): RTC: fix play rtc judge for config rtc2rtmp on. (#2872). v4.0.229 From dc43a11aed6f0199334d79425d4c0d5b517079c1 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 17 Jan 2022 21:37:57 +0800 Subject: [PATCH 32/32] Enable rtmp2rtc and rtc2rtmp for docker.conf --- trunk/conf/docker.conf | 4 ++-- trunk/doc/CHANGELOG.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/trunk/conf/docker.conf b/trunk/conf/docker.conf index 58a200442f..dc7a2368b5 100644 --- a/trunk/conf/docker.conf +++ b/trunk/conf/docker.conf @@ -31,8 +31,8 @@ vhost __defaultVhost__ { rtc { enabled on; # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtmp-to-rtc - rtmp_to_rtc off; + rtmp_to_rtc on; # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtc-to-rtmp - rtc_to_rtmp off; + rtc_to_rtmp on; } } diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 636ae02e9d..a9a70bd708 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -9,6 +9,7 @@ The changelog for SRS. ## SRS 4.0 Changelog * v4.0, 2022-01-17, Release v4.0-b4, 4.0 beta4, v4.0.230, 144393 lines. +* v4.0, 2022-01-17, Enable rtmp2rtc and rtc2rtmp for docker.conf * v4.0, 2022-01-17, Support docker image for [droplet](https://hub.docker.com/r/ossrs/droplet). v4.0.230 * v4.0, 2022-01-16, Update README for **Cloud Virtual Machine([CN](https://github.com/ossrs/srs/wiki/v4_CN_Home#cloud-virtual-machine) / [EN](https://github.com/ossrs/srs/wiki/v4_EN_Home#cloud-virtual-machine))** * v4.0, 2022-01-13, Merge [#2872](https://github.com/ossrs/srs/pull/2872): RTC: fix play rtc judge for config rtc2rtmp on. (#2872). v4.0.229