提交 ad8fc279 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

New RTP values

上级 780b2aaa
...@@ -9,10 +9,10 @@ namespace RTC ...@@ -9,10 +9,10 @@ namespace RTC
{ {
/* Static. */ /* Static. */
constexpr uint32_t MaxPacketAge{ 2500 }; constexpr uint32_t MaxPacketAge{ 1500 };
constexpr size_t MaxNackPackets{ 300 }; constexpr size_t MaxNackPackets{ 500 };
constexpr uint32_t DefaultRtt{ 100 }; constexpr uint32_t DefaultRtt{ 100 };
constexpr uint8_t MaxNackRetries{ 3 }; constexpr uint8_t MaxNackRetries{ 8 };
constexpr uint64_t TimerInterval{ 50 }; constexpr uint64_t TimerInterval{ 50 };
/* Instance methods. */ /* Instance methods. */
...@@ -111,17 +111,33 @@ namespace RTC ...@@ -111,17 +111,33 @@ namespace RTC
{ {
MS_TRACE(); MS_TRACE();
uint32_t numItemsBefore = this->nackList.size();
// Remove old packets. // Remove old packets.
auto it = this->nackList.lower_bound(seq32End - MaxPacketAge); auto it = this->nackList.lower_bound(seq32End - MaxPacketAge);
this->nackList.erase(this->nackList.begin(), it); this->nackList.erase(this->nackList.begin(), it);
uint32_t numItemsRemoved = numItemsBefore - this->nackList.size();
if (numItemsRemoved > 0)
{
MS_DEBUG_TAG(
rtx,
"removed %" PRIu32 " NACK items due to too old seq number [seq32End:%" PRIu32 "]",
numItemsRemoved,
seq32End);
}
// If the nack list is too large, clear it and request a key frame. // If the nack list is too large, clear it and request a key frame.
uint32_t numNewNacks = seq32End - seq32Start; uint32_t numNewNacks = seq32End - seq32Start;
if (this->nackList.size() + numNewNacks > MaxNackPackets) if (this->nackList.size() + numNewNacks > MaxNackPackets)
{ {
MS_DEBUG_TAG(rtx, "NACK list too large, clearing it and requesting a key frame"); MS_DEBUG_TAG(
rtx,
"NACK list too large, clearing it and requesting a key frame [seq32End:%" PRIu32 "]",
seq32End);
this->nackList.clear(); this->nackList.clear();
this->listener->OnNackGeneratorKeyFrameRequired(); this->listener->OnNackGeneratorKeyFrameRequired();
......
...@@ -12,7 +12,7 @@ namespace RTC ...@@ -12,7 +12,7 @@ namespace RTC
/* Static. */ /* Static. */
static constexpr uint16_t MaxDropout{ 3000 }; static constexpr uint16_t MaxDropout{ 3000 };
static constexpr uint16_t MaxMisorder{ 300 }; static constexpr uint16_t MaxMisorder{ 1500 };
static constexpr uint32_t RtpSeqMod{ 1 << 16 }; static constexpr uint32_t RtpSeqMod{ 1 << 16 };
static constexpr uint16_t HealthCheckPeriod{ 1000 }; static constexpr uint16_t HealthCheckPeriod{ 1000 };
......
...@@ -12,7 +12,7 @@ namespace RTC ...@@ -12,7 +12,7 @@ namespace RTC
static constexpr uint32_t RtpSeqMod{ 1 << 16 }; static constexpr uint32_t RtpSeqMod{ 1 << 16 };
// Don't retransmit packets older than this (ms). // Don't retransmit packets older than this (ms).
static constexpr uint32_t MaxRetransmissionAge{ 500 }; static constexpr uint32_t MaxRetransmissionAge{ 1000 };
static constexpr uint32_t DefaultRtt{ 100 }; static constexpr uint32_t DefaultRtt{ 100 };
/* Instance methods. */ /* Instance methods. */
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论