Use rtcscore-go to calculate audio/video score (#689)
* Use rtcscore-go to calculate audio/video score Signed-off-by: shishir gowda <shishir@livekit.io> * Get max expected layer and find max actual layer from stream Signed-off-by: shishir gowda <shishir@livekit.io> * Cleanup unused methods Signed-off-by: shishir gowda <shishir@livekit.io> * Cleanup code - address review comments Signed-off-by: shishir gowda <shishir@livekit.io> * get expected layer info instead of just quality Signed-off-by: shishir gowda <shishir@livekit.io> * Move SpatialLayerForQuality to utils/helpers method is required in rtc,sfu and connectionstats pkg Moved to utils/helpers.go to remove cyclic deps Signed-off-by: shishir gowda <shishir@livekit.io> * update tests Signed-off-by: shishir gowda <shishir@livekit.io> * Pick stream stats with max layer Signed-off-by: shishir gowda <shishir@livekit.io> * Update rtcscore-go pkg to make rtt/jitter optional when passing 0, rtcscore-go was setting default values Signed-off-by: shishir gowda <shishir@livekit.io> * update score to rating Signed-off-by: shishir gowda <shishir@livekit.io> * Update rtcscore-go pkg to use simulcast layer info for score Signed-off-by: shishir gowda <shishir@livekit.io> * Update score ratings to reflect rtcscore range Signed-off-by: shishir gowda <shishir@livekit.io> * update test params for new rtcscore Signed-off-by: shishir gowda <shishir@livekit.io> * Delay sending scores to connections only till full data is available first interval can have partial data leading to lower scores Signed-off-by: shishir gowda <shishir@livekit.io> * Check for inf values in quality params Signed-off-by: shishir gowda <shishir@livekit.io> * Clean up initial score calculation. Default to 5 Signed-off-by: shishir gowda <shishir@livekit.io> Co-authored-by: David Zhao <dz@livekit.io>
This commit is contained in:
+13
-1
@@ -220,7 +220,19 @@ func NewDownTrack(
|
||||
GetIsReducedQuality: func() bool {
|
||||
return d.GetForwardingStatus() != ForwardingStatusOptimal
|
||||
},
|
||||
Logger: d.logger,
|
||||
GetLayerDimension: func(quality int32) (uint32, uint32) {
|
||||
if d.receiver != nil {
|
||||
return d.receiver.GetLayerDimension(quality)
|
||||
}
|
||||
return 0, 0
|
||||
},
|
||||
GetMaxExpectedLayer: func() livekit.VideoLayer {
|
||||
quality := d.forwarder.MaxLayers().Spatial
|
||||
width, height := d.receiver.GetLayerDimension(quality)
|
||||
return livekit.VideoLayer{Quality: livekit.VideoQuality(quality), Width: width, Height: height}
|
||||
},
|
||||
Logger: d.logger,
|
||||
CodecName: getCodecNameFromMime(codecs[0].MimeType),
|
||||
})
|
||||
d.connectionStats.OnStatsUpdate(func(_cs *connectionquality.ConnectionStats, stat *livekit.AnalyticsStat) {
|
||||
if d.onStatsUpdate != nil {
|
||||
|
||||
Reference in New Issue
Block a user