提交 647eec31 authored 作者: José Luis Millán's avatar José Luis Millán

RtpStream: ResetHealthCheckTimer accepts now a given timeout

上级 cac04b86
......@@ -47,6 +47,9 @@ namespace RTC
bool usePli{ false };
};
public:
static constexpr uint16_t HealthCheckPeriod{ 1000 };
public:
explicit RtpStream(RTC::RtpStream::Params& params);
virtual ~RtpStream();
......@@ -58,7 +61,7 @@ namespace RTC
uint8_t GetPayloadType();
const RTC::RtpCodecMimeType& GetMimeType() const;
bool IsHealthy();
void ResetHealthCheckTimer();
void ResetHealthCheckTimer(uint16_t timeout = HealthCheckPeriod);
protected:
bool UpdateSeq(RTC::RtpPacket* packet);
......
......@@ -14,7 +14,6 @@ namespace RTC
static constexpr uint16_t MaxDropout{ 3000 };
static constexpr uint16_t MaxMisorder{ 1500 };
static constexpr uint32_t RtpSeqMod{ 1 << 16 };
static constexpr uint16_t HealthCheckPeriod{ 1000 };
/* Instance methods. */
......@@ -117,11 +116,11 @@ namespace RTC
return this->counter.GetRate(now);
}
void RtpStream::ResetHealthCheckTimer()
void RtpStream::ResetHealthCheckTimer(uint16_t timeout)
{
// Notify about next health status.
this->notifyHealth = true;
this->healthCheckTimer->Start(HealthCheckPeriod, HealthCheckPeriod);
this->healthCheckTimer->Start(timeout, HealthCheckPeriod);
}
void RtpStream::InitSeq(uint16_t seq)
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论