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

RtpStreamRecv: set score:0 when dtx:true is set and there is no RTP activity

- If DTX is set, also enable inactivityCheckPeriodicTimer but use a
  timeout of 5 seconds instead of 1.5 seconds.
- Fixes #415.
上级 adacad6a
...@@ -10,7 +10,8 @@ namespace RTC ...@@ -10,7 +10,8 @@ namespace RTC
{ {
/* Static. */ /* Static. */
static constexpr uint64_t InactivityCheckInterval{ 1500u }; // In ms. static constexpr uint64_t InactivityCheckInterval{ 1500u }; // In ms.
static constexpr uint64_t InactivityCheckIntervalWithDtx{ 5000u }; // In ms.
/* TransmissionCounter methods. */ /* TransmissionCounter methods. */
...@@ -187,14 +188,15 @@ namespace RTC ...@@ -187,14 +188,15 @@ namespace RTC
if (this->params.useNack) if (this->params.useNack)
this->nackGenerator.reset(new RTC::NackGenerator(this)); this->nackGenerator.reset(new RTC::NackGenerator(this));
// Run the RTP inactivity periodic timer (unless DTX is enabled). // Run the RTP inactivity periodic timer (use a different timeout if DTX is
if (!this->params.useDtx) // enabled).
{ this->inactivityCheckPeriodicTimer = new Timer(this);
this->inactivityCheckPeriodicTimer = new Timer(this); this->inactive = false;
if (!this->params.useDtx)
this->inactivityCheckPeriodicTimer->Start(InactivityCheckInterval); this->inactivityCheckPeriodicTimer->Start(InactivityCheckInterval);
this->inactive = false; else
} this->inactivityCheckPeriodicTimer->Start(InactivityCheckIntervalWithDtx);
} }
RtpStreamRecv::~RtpStreamRecv() RtpStreamRecv::~RtpStreamRecv()
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论