Switching to layer based quality for camera tracks also. (#1520)
There are cases where the layer bit rate configuration is such that the expected bitrate difference is very high. For example, setting up layer 2 (f) layer for 1.7 Mbps and layer 1 (h) for 180 kbps. With bitrate based quality, a layer drop results in going to `POOR` quality rating. With layer based, it will drop one level only. Also, cleaning up the distance to desired calculation a bit.
This commit is contained in:
+2
-12
@@ -946,22 +946,12 @@ func (d *DownTrack) UpTrackMaxTemporalLayerSeenChange(maxTemporalLayerSeen int32
|
||||
d.forwarder.SetMaxTemporalLayerSeen(maxTemporalLayerSeen)
|
||||
}
|
||||
|
||||
func (d *DownTrack) maybeAddTransition(bitrate int64, distance float64) {
|
||||
func (d *DownTrack) maybeAddTransition(_bitrate int64, distance float64) {
|
||||
if d.kind == webrtc.RTPCodecTypeAudio {
|
||||
return
|
||||
}
|
||||
|
||||
ti := d.receiver.TrackInfo()
|
||||
if ti == nil {
|
||||
return
|
||||
}
|
||||
|
||||
if ti.Source == livekit.TrackSource_SCREEN_SHARE {
|
||||
d.connectionStats.AddLayerTransition(distance, time.Now())
|
||||
return
|
||||
}
|
||||
|
||||
d.connectionStats.AddBitrateTransition(bitrate, time.Now())
|
||||
d.connectionStats.AddLayerTransition(distance, time.Now())
|
||||
}
|
||||
|
||||
func (d *DownTrack) UpTrackBitrateReport(_availableLayers []int32, bitrates Bitrates) {
|
||||
|
||||
Reference in New Issue
Block a user