mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-03 17:27:33 +08:00
refine: rename TwccContext::checkIfNeedSendTwcc to TwccContext::needSendTwcc.
This commit is contained in:
@@ -38,25 +38,17 @@ void TwccContext::onRtp(uint32_t ssrc, uint16_t twcc_ext_seq, uint64_t stamp_ms)
|
||||
_min_stamp = _max_stamp;
|
||||
}
|
||||
|
||||
if (checkIfNeedSendTwcc()) {
|
||||
if (needSendTwcc()) {
|
||||
//其他匹配条件立即发送twcc
|
||||
onSendTwcc(ssrc);
|
||||
}
|
||||
}
|
||||
|
||||
bool TwccContext::checkIfNeedSendTwcc() const {
|
||||
auto size = _rtp_recv_status.size();
|
||||
if (!size) {
|
||||
bool TwccContext::needSendTwcc() const {
|
||||
if (_rtp_recv_status.empty()) {
|
||||
return false;
|
||||
}
|
||||
if (size >= kMaxSeqDelta) {
|
||||
return true;
|
||||
}
|
||||
auto delta_ms = _max_stamp - _min_stamp;
|
||||
if (delta_ms >= kMaxTimeDelta) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return (_rtp_recv_status.size() >= kMaxSeqSize) || (_max_stamp - _min_stamp >= kMaxTimeDelta);
|
||||
}
|
||||
|
||||
int TwccContext::checkSeqStatus(uint16_t twcc_ext_seq) const {
|
||||
|
||||
Reference in New Issue
Block a user