mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
Merge branch v5.0.98 into develop.
1. Config: Add ENV tips for config. 5.0.97 2. SRT: Support transform tlpkdrop to tlpktdrop. 5.0.98
This commit is contained in:
commit
152099b734
7 changed files with 244 additions and 205 deletions
|
@ -339,7 +339,7 @@ srt_server {
|
|||
# SRT sender side will pack timestamp in each packet, When the network is congested,
|
||||
# the packet will drop if latency is bigger than the configuration in both sender side and receiver side.
|
||||
# And on the sender side, it also will be dropped because latency is bigger than configuration.
|
||||
# Overwrite by env SRS_SRT_SERVER_TLPKDROP_TLPKTDROP
|
||||
# Overwrite by env SRS_SRT_SERVER_TLPKTDROP
|
||||
# default: on
|
||||
tlpktdrop off;
|
||||
# The send buffer size of SRT.
|
||||
|
|
|
@ -18,6 +18,8 @@ The changelog for SRS.
|
|||
|
||||
## SRS 5.0 Changelog
|
||||
|
||||
* v5.0, 2022-11-25, SRT: Support transform tlpkdrop to tlpktdrop. 5.0.98
|
||||
* v5.0, 2022-11-25, Config: Add ENV tips for config. 5.0.97
|
||||
* v5.0, 2022-11-24, For [#299](https://github.com/ossrs/srs/issues/299), DASH: Fix number mode bug to make it run. 5.0.96
|
||||
* v5.0, 2022-11-23, For [#3176](https://github.com/ossrs/srs/pull/3176): GB28181: Error and logging for HEVC. v5.0.95
|
||||
* v5.0, 2022-11-22, Merge [#3236](https://github.com/ossrs/srs/pull/3236): Live: Limit cached max frames by gop_cache_max_frames. v5.0.93
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -90,7 +90,7 @@ srs_error_t SrsSrtAcceptor::set_srt_opt()
|
|||
}
|
||||
|
||||
if ((err = srs_srt_set_tlpktdrop(listener_->fd(), _srs_config->get_srto_tlpktdrop())) != srs_success) {
|
||||
return srs_error_wrap(err, "set opt tlpkdrop=%d failed", _srs_config->get_srto_tlpktdrop());
|
||||
return srs_error_wrap(err, "set opt tlpktdrop=%d failed", _srs_config->get_srto_tlpktdrop());
|
||||
}
|
||||
|
||||
if ((err = srs_srt_set_connect_timeout(listener_->fd(), srsu2msi(_srs_config->get_srto_conntimeout()))) != srs_success) {
|
||||
|
|
|
@ -295,7 +295,7 @@ srs_error_t SrsRtmpFromSrtBridge::on_packet(SrsSrtPacket *pkt)
|
|||
SrsAutoFree(SrsBuffer, stream);
|
||||
|
||||
// Process each ts packet. Note that the jitter of UDP may cause video glitch when packet loss or wrong seq. We
|
||||
// don't handle it because SRT will, see tlpkdrop at https://ossrs.net/lts/zh-cn/docs/v4/doc/srt-params
|
||||
// don't handle it because SRT will, see tlpktdrop at https://ossrs.net/lts/zh-cn/docs/v4/doc/srt-params
|
||||
if ((err = ts_ctx_->decode(stream, this)) != srs_success) {
|
||||
srs_warn("parse ts packet err=%s", srs_error_desc(err).c_str());
|
||||
srs_error_reset(err);
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 5
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 96
|
||||
#define VERSION_REVISION 98
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3865,3 +3865,27 @@ VOID TEST(ConfigMainTest, LogLevelV2)
|
|||
EXPECT_EQ(SrsLogLevelWarn, srs_get_log_level(conf.get_log_level_v2()));
|
||||
}
|
||||
}
|
||||
|
||||
VOID TEST(ConfigMainTest, SrtServerTlpktDrop)
|
||||
{
|
||||
srs_error_t err;
|
||||
|
||||
if (true) {
|
||||
MockSrsConfig conf;
|
||||
HELPER_ASSERT_SUCCESS(conf.parse(_MIN_OK_CONF));
|
||||
EXPECT_TRUE(conf.get_srto_tlpktdrop());
|
||||
}
|
||||
|
||||
if (true) {
|
||||
MockSrsConfig conf;
|
||||
HELPER_ASSERT_SUCCESS(conf.parse(_MIN_OK_CONF "srt_server{tlpktdrop off;}"));
|
||||
EXPECT_FALSE(conf.get_srto_tlpktdrop());
|
||||
}
|
||||
|
||||
if (true) {
|
||||
MockSrsConfig conf;
|
||||
HELPER_ASSERT_SUCCESS(conf.parse(_MIN_OK_CONF "srt_server{tlpkdrop off;}"));
|
||||
EXPECT_FALSE(conf.get_srto_tlpktdrop());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue