From ff33940d904d9cca03c3f6597bad9ad5b27b77af Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 14 Nov 2021 21:59:37 +0800 Subject: [PATCH 1/5] WebRTC: Fail to publish RTC automatically for HTML5. --- 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 c4d6391ff..b5a6fb19e 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, 2021-11-14, Merge [#2732](https://github.com/ossrs/srs/pull/2732): WebRTC: Fail to publish RTC automatically for HTML5. (#2732). v4.0.197 * v4.0, 2021-11-13, Merge [#2729](https://github.com/ossrs/srs/pull/2729): RTC: check audio track exist when negotiate (#2729). v4.0.196 * v4.0, 2021-11-09, Merge [#2721](https://github.com/ossrs/srs/pull/2721): Rtc2Rtmp: Use RTP timestamp to identify video frames. v4.0.195 * v4.0, 2021-11-07, Merge [#2711](https://github.com/ossrs/srs/pull/2711): Config: Guess config files by [FHS](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard). v4.0.194 diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 8d1e12dc1..5f227577c 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 196 +#define VERSION_REVISION 197 #endif From 93964bb037d61a9605151db018796b0b3cf6eddd Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 15 Nov 2021 09:35:23 +0800 Subject: [PATCH 2/5] ST: Print log when multiple thread stop one coroutine. (#1708) --- trunk/src/app/srs_app_st.cpp | 10 ++++++++++ trunk/src/app/srs_app_st.hpp | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/trunk/src/app/srs_app_st.cpp b/trunk/src/app/srs_app_st.cpp index 04de607c7..523ca0651 100755 --- a/trunk/src/app/srs_app_st.cpp +++ b/trunk/src/app/srs_app_st.cpp @@ -125,6 +125,7 @@ SrsFastCoroutine::SrsFastCoroutine(string n, ISrsCoroutineHandler* h) trd = NULL; trd_err = srs_success; started = interrupted = disposed = cycle_done = false; + stopping_ = false; // 0 use default, default is 64K. stack_size = 0; @@ -138,6 +139,7 @@ SrsFastCoroutine::SrsFastCoroutine(string n, ISrsCoroutineHandler* h, SrsContext trd = NULL; trd_err = srs_success; started = interrupted = disposed = cycle_done = false; + stopping_ = false; // 0 use default, default is 64K. stack_size = 0; @@ -192,9 +194,14 @@ srs_error_t SrsFastCoroutine::start() void SrsFastCoroutine::stop() { if (disposed) { + if (stopping_) { + srs_error("thread is stopping by %s", stopping_cid_.c_str()); + srs_assert(!stopping_); + } return; } disposed = true; + stopping_ = true; interrupt(); @@ -225,6 +232,9 @@ void SrsFastCoroutine::stop() if (trd_err == srs_success && !cycle_done) { trd_err = srs_error_new(ERROR_THREAD_TERMINATED, "terminated"); } + + // Now, we'are stopped. + stopping_ = false; return; } diff --git a/trunk/src/app/srs_app_st.hpp b/trunk/src/app/srs_app_st.hpp index b881267c3..8357c4b9c 100644 --- a/trunk/src/app/srs_app_st.hpp +++ b/trunk/src/app/srs_app_st.hpp @@ -163,6 +163,10 @@ private: bool disposed; // Cycle done, no need to interrupt it. bool cycle_done; +private: + // Sub state in disposed, we need to wait for thread to quit. + bool stopping_; + SrsContextId stopping_cid_; public: SrsFastCoroutine(std::string n, ISrsCoroutineHandler* h); SrsFastCoroutine(std::string n, ISrsCoroutineHandler* h, SrsContextId cid); From 5e22b1929a7cc7a15877514a0084e04d9af407f2 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 15 Nov 2021 10:34:38 +0800 Subject: [PATCH 3/5] ST: Print log when multiple thread stop one coroutine. (#1708). v4.0.198 --- 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 b5a6fb19e..e2cf2937a 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, 2021-11-15, For [#1708](https://github.com/ossrs/srs/pull/1708): ST: Print log when multiple thread stop one coroutine. (#1708). v4.0.198 * v4.0, 2021-11-14, Merge [#2732](https://github.com/ossrs/srs/pull/2732): WebRTC: Fail to publish RTC automatically for HTML5. (#2732). v4.0.197 * v4.0, 2021-11-13, Merge [#2729](https://github.com/ossrs/srs/pull/2729): RTC: check audio track exist when negotiate (#2729). v4.0.196 * v4.0, 2021-11-09, Merge [#2721](https://github.com/ossrs/srs/pull/2721): Rtc2Rtmp: Use RTP timestamp to identify video frames. v4.0.195 diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 5f227577c..f11147d71 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 197 +#define VERSION_REVISION 198 #endif From 1b44238a6110327572cef58f64c5aa807f9a7b80 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 15 Nov 2021 10:55:47 +0800 Subject: [PATCH 4/5] Refine release description --- .github/workflows/release.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bcecbb82a..29eb6509a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -129,8 +129,18 @@ jobs: release_name: Release ${{ github.ref }} body: | ${{ github.event.head_commit.message }} - ${{ env.SRS_SOURCE_MD5 }} [${{ env.SRS_SOURCE_TAR }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_SOURCE_TAR }}) - ${{ env.SRS_PACKAGE_MD5 }} [${{ env.SRS_PACKAGE_ZIP }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_PACKAGE_ZIP }}) + ## Resource + * Source: ${{ env.SRS_SOURCE_MD5 }} [${{ env.SRS_SOURCE_TAR }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_SOURCE_TAR }}) + * Binary: ${{ env.SRS_PACKAGE_MD5 }} [${{ env.SRS_PACKAGE_ZIP }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_PACKAGE_ZIP }}) + ## Docker + * China: [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_MAJOR }}](https://github.com/ossrs/srs/wiki/v4_CN_Home#docker) + * China: [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_TAG }}](https://github.com/ossrs/srs/wiki/v4_CN_Home#docker) + * Global: [docker pull ossrs/srs:${{ env.SRS_MAJOR }}](https://github.com/ossrs/srs/wiki/v4_EN_Home#docker) + * Global: [docker pull ossrs/srs:${{ env.SRS_TAG }}](https://github.com/ossrs/srs/wiki/v4_EN_Home#docker) + ## Doc + * [快速入门](https://github.com/ossrs/srs/wiki/v4_CN_Home#getting-started) or [Getting Started](https://github.com/ossrs/srs/wiki/v4_EN_Home#getting-started) + * [中文Wiki首页](https://github.com/ossrs/srs/wiki/v4_CN_Home) or [Wiki home](https://github.com/ossrs/srs/wiki/v4_EN_Home) + * [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: true # Upload release source files From 93359a81cd5cea63548fd5599378ed503a81f797 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 15 Nov 2021 11:05:07 +0800 Subject: [PATCH 5/5] Release 4.0 dev8, v4.0.198 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 37510c3e5..21d7c77c5 100755 --- a/README.md +++ b/README.md @@ -97,6 +97,7 @@ A big THANK YOU goes to: ## Releases +* 2021-11-15, Release [v4.0.198](https://github.com/ossrs/srs/releases/tag/v4.0.198), 4.0 dev8, v4.0.198, 144010 lines. * 2021-11-02, Release [v4.0.191](https://github.com/ossrs/srs/releases/tag/v4.0.191), 4.0 dev7, v4.0.191, 143890 lines. * 2021-10-12, Release [v4.0.177](https://github.com/ossrs/srs/releases/tag/v4.0.177), 4.0 dev6, v4.0.177, 143686 lines. * 2021-09-05, Release [v4.0.161](https://github.com/ossrs/srs/releases/tag/v4.0.161), 4.0 dev5, v4.0.161, 145865 lines.