From aabb011f5a38e72793393ddfb9df9129ac03363f Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Fri, 3 May 2024 11:31:31 +0200 Subject: [PATCH] rtpgccbwe: Log effective bitrate in more places While monitoring and debugging rtpgccbwe, it is very helpful to get continuous values of what it considers the effective bitrate. Right now such prints will stop coming once the algorithm stabilizes. Print it in more places so it keeps coming. Use the same format to make it simpler to extract the values by parsing the logs. Part-of: --- net/rtp/src/gcc/imp.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/net/rtp/src/gcc/imp.rs b/net/rtp/src/gcc/imp.rs index 8fea99c8..45cfad2d 100644 --- a/net/rtp/src/gcc/imp.rs +++ b/net/rtp/src/gcc/imp.rs @@ -879,8 +879,9 @@ impl State { gst::log!( CAT, obj: bwe, - "Increasing == received_max rate: {}ps", - human_kbits(received_max) + "Increasing == received_max rate: {}ps - effective bitrate: {}ps", + human_kbits(received_max), + human_kbits(effective_bitrate), ); self.last_control_op = BandwidthEstimationOp::Increase(format!( @@ -892,8 +893,9 @@ impl State { gst::log!( CAT, obj: bwe, - "Rate < target, returning {}ps", - human_kbits(self.target_bitrate_on_delay) + "Rate < target, returning {}ps - effective bitrate: {}ps", + human_kbits(self.target_bitrate_on_delay), + human_kbits(effective_bitrate), ); None @@ -901,9 +903,10 @@ impl State { gst::log!( CAT, obj: bwe, - "Increase mult {eta}x{}ps={}ps", + "Increase mult {eta}x{}ps={}ps - effective bitrate: {}ps", human_kbits(self.target_bitrate_on_delay), - human_kbits(rate) + human_kbits(rate), + human_kbits(effective_bitrate), ); self.last_control_op =