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