Provide a default RTT for audio NACK.
This is used until the first RTT measurement becomes available. 100ms is a reasonable default and used in other places. Bug: webrtc:10178 Change-Id: I14f530504a4866fbe75f025dfe184fd6e296b75e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256861 Reviewed-by: Minyue Li <minyue@webrtc.org> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36384}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
b2be4eff92
commit
4d5eb6507a
@ -225,8 +225,12 @@ int64_t NackTracker::TimeToPlay(uint32_t timestamp) const {
|
||||
std::vector<uint16_t> NackTracker::GetNackList(int64_t round_trip_time_ms) {
|
||||
RTC_DCHECK_GE(round_trip_time_ms, 0);
|
||||
std::vector<uint16_t> sequence_numbers;
|
||||
if (config_.require_valid_rtt && round_trip_time_ms == 0) {
|
||||
if (round_trip_time_ms == 0) {
|
||||
if (config_.require_valid_rtt) {
|
||||
return sequence_numbers;
|
||||
} else {
|
||||
round_trip_time_ms = config_.default_rtt_ms;
|
||||
}
|
||||
}
|
||||
if (packet_loss_rate_ >
|
||||
static_cast<uint32_t>(config_.max_loss_rate * (1 << 30))) {
|
||||
|
@ -111,6 +111,8 @@ class NackTracker {
|
||||
bool never_nack_multiple_times = false;
|
||||
// Only nack if the RTT is valid.
|
||||
bool require_valid_rtt = false;
|
||||
// Default RTT to use unless `require_valid_rtt` is set.
|
||||
int default_rtt_ms = 100;
|
||||
// Do not nack if the loss rate is above this value.
|
||||
double max_loss_rate = 1.0;
|
||||
};
|
||||
|
Reference in New Issue
Block a user