From 7b14281367819e0b2fa669b3e8e1adc8cf75fe6e Mon Sep 17 00:00:00 2001 From: Matin Zadeh Dolatabad Date: Sat, 28 Aug 2021 02:55:26 +0200 Subject: [PATCH 1/2] Enhancement: Add param and stream to on_connect (#1859) Add stream and param to hook call on_connect for better use --- trunk/src/app/srs_app_http_hooks.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trunk/src/app/srs_app_http_hooks.cpp b/trunk/src/app/srs_app_http_hooks.cpp index 4d642a862..aec4bd85a 100644 --- a/trunk/src/app/srs_app_http_hooks.cpp +++ b/trunk/src/app/srs_app_http_hooks.cpp @@ -54,6 +54,8 @@ srs_error_t SrsHttpHooks::on_connect(string url, SrsRequest* req) obj->set("ip", SrsJsonAny::str(req->ip.c_str())); obj->set("vhost", SrsJsonAny::str(req->vhost.c_str())); obj->set("app", SrsJsonAny::str(req->app.c_str())); + obj->set("stream", SrsJsonAny::str(req->stream.c_str())); + obj->set("param", SrsJsonAny::str(req->param.c_str())); obj->set("tcUrl", SrsJsonAny::str(req->tcUrl.c_str())); obj->set("pageUrl", SrsJsonAny::str(req->pageUrl.c_str())); From b6d0c73cdad83df74209d037530af48ee2b4f639 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 28 Aug 2021 09:00:25 +0800 Subject: [PATCH 2/2] For #1859, Enhancement: Add param and stream to on_connect. 4.0.159 --- 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 1543e7351..bfc932f6a 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-08-28, RTC: Merge [#1859](https://github.com/ossrs/srs/pull/1859), Enhancement: Add param and stream to on_connect. 4.0.159 * v4.0, 2021-08-27, RTC: Merge [#2544](https://github.com/ossrs/srs/pull/2544), Support for multiple SPS/PPS, then pick the first one. 4.0.158 * v4.0, 2021-08-17, RTC: Merge [#2470](https://github.com/ossrs/srs/pull/2470), RTC: Fix rtc to rtmp sync timestamp using sender report. 4.0.157 * v4.0, 2021-08-14, Support Github Actions to publish SRS. 4.0.155 diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 6c918046a..5b8d99e0b 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 158 +#define VERSION_REVISION 159 #endif