rtpgccbwe: Improve packet handling

Both the delay-based *and* loss-based estimates should be computed instead of
just one. This ensures faster adaptation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1179>
This commit is contained in:
Edward Hervey 2023-04-14 10:42:51 +02:00 committed by Edward Hervey
parent 4cc2498c24
commit 31b06e52ea

View file

@ -1190,11 +1190,9 @@ impl ObjectSubclass for BandwidthEstimator {
let mut state = this.state.lock().unwrap(); let mut state = this.state.lock().unwrap();
state.detector.update(&mut packets); state.detector.update(&mut packets);
if !state.delay_control(&bwe) { let bitrate_updated_by_delay = state.delay_control(&bwe);
state.loss_control(&bwe) let bitrate_updated_by_loss = state.loss_control(&bwe);
} else { bitrate_updated_by_delay || bitrate_updated_by_loss
true
}
}; };
if bitrate_changed { if bitrate_changed {