only use periodic NAK

This commit is contained in:
xiongguangjie 2022-06-11 23:04:24 +08:00
parent 4b9f789c79
commit 2e097f13b1
2 changed files with 7 additions and 3 deletions

View File

@ -327,6 +327,7 @@ void SrtTransport::handleDropReq(uint8_t *buf, int len, struct sockaddr_storage
_last_pkt_seq = data->packet_seq_number;
onSRTData(std::move(data));
}
/*
_recv_nack.drop(max_seq);
auto lost = _recv_buf->getLostSeq();
@ -337,6 +338,7 @@ void SrtTransport::handleDropReq(uint8_t *buf, int len, struct sockaddr_storage
sendNAKPacket(lost);
// TraceL << "check lost send nack";
}
*/
auto nak_interval = (_rtt + _rtt_variance * 4) / 2;
if (nak_interval <= 20 * 1000) {
@ -467,9 +469,10 @@ void SrtTransport::handleDataPacket(uint8_t *buf, int len, struct sockaddr_stora
_last_pkt_seq = data->packet_seq_number;
onSRTData(std::move(data));
}
_recv_nack.drop(last_seq);
}
//_recv_nack.drop(last_seq);
}
/*
auto lost = _recv_buf->getLostSeq();
_recv_nack.update(_now, lost);
lost.clear();
@ -478,6 +481,7 @@ void SrtTransport::handleDataPacket(uint8_t *buf, int len, struct sockaddr_stora
// TraceL << "check lost send nack immediately";
sendNAKPacket(lost);
}
*/
auto nak_interval = (_rtt + _rtt_variance * 4) / 2;
if (nak_interval <= 20 * 1000) {

View File

@ -121,7 +121,7 @@ private:
PacketSendQueue::Ptr _send_buf;
uint32_t _buf_delay = 120;
PacketQueue::Ptr _recv_buf;
NackContext _recv_nack;
// NackContext _recv_nack;
uint32_t _rtt = 100 * 1000;
uint32_t _rtt_variance = 50 * 1000;
uint32_t _light_ack_pkt_count = 0;