mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-09 18:55:27 +00:00
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/1234>
This commit is contained in:
parent
2002c54582
commit
60ae3fc0b9
1 changed files with 3 additions and 5 deletions
|
@ -1200,11 +1200,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 {
|
||||||
|
|
Loading…
Reference in a new issue