[feat] introduce fraction lost into congestion control module

This commit is contained in:
dijunkun
2025-03-04 17:39:54 +08:00
parent ebfeaf4754
commit cf374a0ff3
28 changed files with 187 additions and 107 deletions

View File

@@ -72,6 +72,18 @@ CongestionControl::CongestionControl()
CongestionControl::~CongestionControl() {}
NetworkControlUpdate CongestionControl::OnTransportLossReport(
TransportLossReport msg) {
if (packet_feedback_only_) {
return NetworkControlUpdate();
}
int64_t total_packets_delta =
msg.packets_received_delta + msg.packets_lost_delta;
bandwidth_estimation_->UpdatePacketsLost(
msg.packets_lost_delta, total_packets_delta, msg.receive_time);
return NetworkControlUpdate();
}
NetworkControlUpdate CongestionControl::OnTransportPacketsFeedback(
TransportPacketsFeedback report) {
if (report.packet_feedbacks.empty()) {