1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 23:35:46 +01:00

Display correct maxBitrate in statistics.

This commit is contained in:
Juliusz Chroboczek 2022-02-01 15:20:43 +01:00
parent 0b5e40bc7f
commit 6b54f14dfe

View file

@ -56,6 +56,7 @@ func (c *webClient) GetStats() *stats.Client {
tid := layer.tid
maxTid := layer.maxTid
rate, _ := t.rate.Estimate()
maxRate, _, _ := t.GetMaxBitrate()
rtt := rtptime.ToDuration(t.getRTT(),
rtptime.JiffiesPerSec)
loss, jitter := t.stats.Get(jiffies)
@ -67,7 +68,7 @@ func (c *webClient) GetStats() *stats.Client {
Sid: &sid,
MaxSid: &maxSid,
Bitrate: uint64(rate) * 8,
MaxBitrate: t.maxBitrate.Get(jiffies),
MaxBitrate: maxRate,
Loss: float64(loss) / 256.0,
Rtt: stats.Duration(rtt),
Jitter: stats.Duration(j),