mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-23 09:28:09 +00:00
rtpgccbwe: Add increasing_duration and counter to existing gst::log!()
Add `self.increasing_duration` and `self.increasing_counter` to logs to provide more details of why `overuse_filter()` determines overuse of network. To get access to the latest values of those fields we need to move down the log call. But that is fine, since no other logged data is modified between the old and new location of `gst::log!()`. We do not bother logging `self.last_overuse_estimate` since that is simply the previously logged value of `estimate`. We must put the log call before we write the latest value to it though, in case we want to log it in the future. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1531>
This commit is contained in:
parent
d0461b190f
commit
0faa74b74d
1 changed files with 10 additions and 8 deletions
|
@ -619,14 +619,6 @@ impl Detector {
|
|||
let now = time::Instant::now();
|
||||
let delta = now - self.last_use_detector_update;
|
||||
self.last_use_detector_update = now;
|
||||
gst::log!(
|
||||
CAT,
|
||||
"{:?} - self.estimate {} - estimate: {} - th: {}",
|
||||
th_usage,
|
||||
self.estimate,
|
||||
estimate,
|
||||
self.threshold
|
||||
);
|
||||
match th_usage {
|
||||
NetworkUsage::Over => {
|
||||
self.increasing_duration += delta;
|
||||
|
@ -646,6 +638,16 @@ impl Detector {
|
|||
self.usage = th_usage;
|
||||
}
|
||||
}
|
||||
gst::log!(
|
||||
CAT,
|
||||
"{:?} - self.estimate {} - estimate: {} - th: {} - inc_dur: {} - inc_cnt: {}",
|
||||
th_usage,
|
||||
self.estimate,
|
||||
estimate,
|
||||
self.threshold,
|
||||
self.increasing_duration,
|
||||
self.increasing_counter,
|
||||
);
|
||||
self.last_overuse_estimate = estimate;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue