From 7d7e793148dc40242eb231aa0fbbf733755e8881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=96=E5=BF=97=E5=AE=8F?= Date: Tue, 10 Oct 2023 20:27:30 +0800 Subject: [PATCH] SRT: Fix the missing config mss. v5.0.188 (#3825) --------- Co-authored-by: john --- trunk/conf/full.conf | 6 ++++++ trunk/doc/CHANGELOG.md | 1 + trunk/src/app/srs_app_config.cpp | 4 ++-- trunk/src/core/srs_core_version5.hpp | 2 +- trunk/src/utest/srs_utest_config.cpp | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index 53ceeecad0..3046893d2c 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -316,6 +316,12 @@ srt_server { # Overwrite by env SRS_SRT_SERVER_MAXBW # default: -1 maxbw 1000000000; + # Maximum Segment Size. Used for buffer allocation and rate calculation using packet counter assuming fully + # filled packets. Each party can set its own MSS value independently. During a handshake the parties exchange + # MSS values, and the lowest is used. + # Overwrite by env SRS_SRT_SERVER_MSS + # default: 1500 + mss 1500; # The timeout time of the SRT connection on the sender side in ms. When SRT connects to a peer costs time # more than this config, it will be close. # Overwrite by env SRS_SRT_SERVER_CONNECT_TIMEOUT diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index fa35662a9f..bf180e9591 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -7,6 +7,7 @@ The changelog for SRS. ## SRS 5.0 Changelog +* v5.0, 2023-10-10, Merge [#3825](https://github.com/ossrs/srs/pull/3825): SRT: Fix the missing config mss. v5.0.188 (#3825) * v5.0, 2023-10-08, Merge [#3824](https://github.com/ossrs/srs/pull/3824): Solve the problem of inaccurate HLS TS duration. v5.0.187 (#3824) * v5.0, 2023-10-08, Merge [#3815](https://github.com/ossrs/srs/pull/3815): Use new cache image name. v5.0.186 (#3815) * v5.0, 2023-09-28, Merge [#3816](https://github.com/ossrs/srs/pull/3816): cherry-pick from develop, for srt utest. v5.0.185 (#3816) diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 21d759923f..b7a35fd983 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -7912,7 +7912,7 @@ int64_t SrsConfig::get_srto_maxbw() int SrsConfig::get_srto_mss() { - SRS_OVERWRITE_BY_ENV_INT("srs.srt_server.mms"); // SRS_SRT_SERVER_MMS + SRS_OVERWRITE_BY_ENV_INT("srs.srt_server.mss"); // SRS_SRT_SERVER_MSS static int DEFAULT = 1500; SrsConfDirective* conf = root->get("srt_server"); @@ -7920,7 +7920,7 @@ int SrsConfig::get_srto_mss() return DEFAULT; } - conf = conf->get("mms"); + conf = conf->get("mss"); if (!conf || conf->arg0().empty()) { return DEFAULT; } diff --git a/trunk/src/core/srs_core_version5.hpp b/trunk/src/core/srs_core_version5.hpp index 6f5942ec2f..2fa96adcc4 100644 --- a/trunk/src/core/srs_core_version5.hpp +++ b/trunk/src/core/srs_core_version5.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 0 -#define VERSION_REVISION 187 +#define VERSION_REVISION 188 #endif diff --git a/trunk/src/utest/srs_utest_config.cpp b/trunk/src/utest/srs_utest_config.cpp index 1c1f4fa188..a14882352a 100644 --- a/trunk/src/utest/srs_utest_config.cpp +++ b/trunk/src/utest/srs_utest_config.cpp @@ -4225,7 +4225,7 @@ VOID TEST(ConfigEnvTest, CheckEnvValuesSrtServer) SrsSetEnvConfig(srto_maxbw, "SRS_SRT_SERVER_MAXBW", "1000000000"); EXPECT_EQ(1000000000, conf.get_srto_maxbw()); - SrsSetEnvConfig(srto_mss, "SRS_SRT_SERVER_MMS", "1000"); + SrsSetEnvConfig(srto_mss, "SRS_SRT_SERVER_MSS", "1000"); EXPECT_EQ(1000, conf.get_srto_mss()); SrsSetEnvConfig(srto_conntimeout, "SRS_SRT_SERVER_CONNECT_TIMEOUT", "2000");