chore(calls): call report shows share quantizer and bytes
- Share stats line gains average QP and received bytes, to tell a coarse sender encode from a bandwidth limit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@@ -3557,13 +3557,28 @@ struct ShareReceive {
3557
3557
pli_count: u32,
3558
3558
fir_count: u32,
3559
3559
freeze_count: u32,
3560
qp_sum: u64,
3561
bytes_received: u64,
3560
3562
}
3561
3563
3562
3564
impl ShareReceive {
3565
fn average_qp(&self) -> u64 {
3566
self.qp_sum.checked_div(u64::from(self.frames_decoded)).unwrap_or(0)
3567
}
3568
3563
3569
fn summary(&self) -> String {
3564
3570
format!(
3565
" share in decoded={} keyframes={} {}x{} fps={:.0} pli={} fir={} freezes={}",
3566
self.frames_decoded, self.key_frames_decoded, self.width, self.height, self.frames_per_second, self.pli_count, self.fir_count, self.freeze_count
3571
" share in decoded={} keyframes={} {}x{} fps={:.0} qp={} bytes={} pli={} fir={} freezes={}",
3572
self.frames_decoded,
3573
self.key_frames_decoded,
3574
self.width,
3575
self.height,
3576
self.frames_per_second,
3577
self.average_qp(),
3578
self.bytes_received,
3579
self.pli_count,
3580
self.fir_count,
3581
self.freeze_count
3567
3582
)
3568
3583
}
3569
3584
}
@@ -3604,6 +3619,8 @@ async fn collect_stats(peer: &PeerConnection, share_mids: &[String]) -> StatsSna
3604
3619
pli_count: inbound.inbound.pli_count,
3605
3620
fir_count: inbound.inbound.fir_count,
3606
3621
freeze_count: inbound.inbound.freeze_count,
3622
qp_sum: inbound.inbound.qp_sum,
3623
bytes_received: inbound.inbound.bytes_received,
3607
3624
});
3608
3625
}
3609
3626
snapshot.video.inbound_frames_decoded += u64::from(inbound.inbound.frames_decoded);
@@ -3557,13 +3557,28 @@ struct ShareReceive {3557
pli_count: u32,3557
pli_count: u32,3558
fir_count: u32,3558
fir_count: u32,3559
freeze_count: u32,3559
freeze_count: u32,3560
qp_sum: u64,3561
bytes_received: u64,3560
}3562
}3561
3563
3562
impl ShareReceive {3564
impl ShareReceive {3565
fn average_qp(&self) -> u64 {3566
self.qp_sum.checked_div(u64::from(self.frames_decoded)).unwrap_or(0)3567
}3568
3563
fn summary(&self) -> String {3569
fn summary(&self) -> String {3564
format!(3570
format!(3565
" share in decoded={} keyframes={} {}x{} fps={:.0} pli={} fir={} freezes={}",3571
" share in decoded={} keyframes={} {}x{} fps={:.0} qp={} bytes={} pli={} fir={} freezes={}",3566
self.frames_decoded, self.key_frames_decoded, self.width, self.height, self.frames_per_second, self.pli_count, self.fir_count, self.freeze_count3572
self.frames_decoded,3573
self.key_frames_decoded,3574
self.width,3575
self.height,3576
self.frames_per_second,3577
self.average_qp(),3578
self.bytes_received,3579
self.pli_count,3580
self.fir_count,3581
self.freeze_count3567
)3582
)3568
}3583
}3569
}3584
}@@ -3604,6 +3619,8 @@ async fn collect_stats(peer: &PeerConnection, share_mids: &[String]) -> StatsSna3604
pli_count: inbound.inbound.pli_count,3619
pli_count: inbound.inbound.pli_count,3605
fir_count: inbound.inbound.fir_count,3620
fir_count: inbound.inbound.fir_count,3606
freeze_count: inbound.inbound.freeze_count,3621
freeze_count: inbound.inbound.freeze_count,3622
qp_sum: inbound.inbound.qp_sum,3623
bytes_received: inbound.inbound.bytes_received,3607
});3624
});3608
}3625
}3609
snapshot.video.inbound_frames_decoded += u64::from(inbound.inbound.frames_decoded);3626
snapshot.video.inbound_frames_decoded += u64::from(inbound.inbound.frames_decoded);