Unverified 提交 30e0483b authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo 提交者: GitHub

Consumer: make IsActive() return true (even if Producer's score is 0) when DTX is enabled (#534)

- Should fix #532
上级 b80b90b8
......@@ -103,6 +103,10 @@ namespace RTC
{
return this->params.spatialLayers;
}
bool HasDtx() const
{
return this->params.useDtx;
}
uint8_t GetTemporalLayers() const
{
return this->params.temporalLayers;
......
......@@ -28,7 +28,7 @@ namespace RTC
return (
RTC::Consumer::IsActive() &&
this->producerRtpStream &&
this->producerRtpStream->GetScore() > 0u
(this->producerRtpStream->GetScore() > 0u || this->producerRtpStream->HasDtx())
);
// clang-format on
}
......
......@@ -42,7 +42,7 @@ namespace RTC
this->producerRtpStreams.end(),
[](const RTC::RtpStream* rtpStream)
{
return (rtpStream != nullptr && rtpStream->GetScore() > 0u);
return (rtpStream != nullptr && (rtpStream->GetScore() > 0u || rtpStream->HasDtx()));
}
)
);
......
......@@ -39,7 +39,7 @@ namespace RTC
return (
RTC::Consumer::IsActive() &&
this->producerRtpStream &&
this->producerRtpStream->GetScore() > 0u
(this->producerRtpStream->GetScore() > 0u || this->producerRtpStream->HasDtx())
);
// clang-format on
}
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论