connectionquality

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinScore = float32(1)
	MaxScore = float32(5)
)
View Source
const (
	UpdateInterval = 5 * time.Second
)

Variables

This section is empty.

Functions

func AudioTrackScore

func AudioTrackScore(params TrackScoreParams, normFactor float32) float32

func LossBasedTrackScore

func LossBasedTrackScore(params TrackScoreParams) float32

rtcmos gives lower score when screen share content is static. That is due to use of bits / pixel / frame in the model. Even though the frame rate is low, the bit rate is also low and the resolution is high. Till rtcmos model can be adapted to that scenario, use loss based scoring.

func Score2Rating

func Score2Rating(score float32) livekit.ConnectionQuality

func VideoTrackScore

func VideoTrackScore(params TrackScoreParams, normFactor float32) float32

Types

type ConnectionStats

type ConnectionStats struct {
	// contains filtered or unexported fields
}

func NewConnectionStats

func NewConnectionStats(params ConnectionStatsParams) *ConnectionStats

func (*ConnectionStats) Close

func (cs *ConnectionStats) Close()

func (*ConnectionStats) GetScore

func (cs *ConnectionStats) GetScore() float32

func (*ConnectionStats) OnStatsUpdate

func (cs *ConnectionStats) OnStatsUpdate(fn func(cs *ConnectionStats, stat *livekit.AnalyticsStat))

func (*ConnectionStats) Start

func (cs *ConnectionStats) Start(trackInfo *livekit.TrackInfo)

type ConnectionStatsParams

type ConnectionStatsParams struct {
	UpdateInterval         time.Duration
	MimeType               string
	GetDeltaStats          func() map[uint32]*buffer.StreamStatsWithLayers
	GetMaxExpectedLayer    func() int32
	GetCurrentLayerSpatial func() int32
	GetIsReducedQuality    func() (int32, bool)
	Logger                 logger.Logger
}

type TrackScoreParams

type TrackScoreParams struct {
	Duration          time.Duration
	Codec             string
	PacketsExpected   uint32
	PacketsLost       uint32
	Bytes             uint64
	Frames            uint32
	FrameRateExpected uint32
	Jitter            float64
	Rtt               uint32
	DtxEnabled        bool
	Width             uint32
	Height            uint32
	IsReducedQuality  bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL