connectionquality

package
v0.0.0-...-cdb609d Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxMOS = float32(4.5)
	MinMOS = float32(1.0)
)
View Source
const (
	UpdateInterval = 5 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionStats

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

func NewConnectionStats

func NewConnectionStats(params ConnectionStatsParams) *ConnectionStats

func (*ConnectionStats) AddBitrateTransition

func (cs *ConnectionStats) AddBitrateTransition(bitrate int64)

func (*ConnectionStats) AddBitrateTransitionAt

func (cs *ConnectionStats) AddBitrateTransitionAt(bitrate int64, at time.Time)

func (*ConnectionStats) AddLayerTransition

func (cs *ConnectionStats) AddLayerTransition(distance float64)

func (*ConnectionStats) AddLayerTransitionAt

func (cs *ConnectionStats) AddLayerTransitionAt(distance float64, at time.Time)

func (*ConnectionStats) Close

func (cs *ConnectionStats) Close()

func (*ConnectionStats) GetScoreAndQuality

func (cs *ConnectionStats) GetScoreAndQuality() (float32, livekit.ConnectionQuality)

func (*ConnectionStats) OnStatsUpdate

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

func (*ConnectionStats) Start

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

func (*ConnectionStats) StartAt

func (cs *ConnectionStats) StartAt(trackInfo *livekit.TrackInfo, at time.Time)

func (*ConnectionStats) UpdateLayerMute

func (cs *ConnectionStats) UpdateLayerMute(isMuted bool)

func (*ConnectionStats) UpdateLayerMuteAt

func (cs *ConnectionStats) UpdateLayerMuteAt(isMuted bool, at time.Time)

func (*ConnectionStats) UpdateMute

func (cs *ConnectionStats) UpdateMute(isMuted bool)

func (*ConnectionStats) UpdateMuteAt

func (cs *ConnectionStats) UpdateMuteAt(isMuted bool, at time.Time)

func (*ConnectionStats) UpdatePause

func (cs *ConnectionStats) UpdatePause(isPaused bool)

func (*ConnectionStats) UpdatePauseAt

func (cs *ConnectionStats) UpdatePauseAt(isPaused bool, at time.Time)

type ConnectionStatsParams

type ConnectionStatsParams struct {
	UpdateInterval     time.Duration
	MimeType           string
	IsFECEnabled       bool
	IncludeRTT         bool
	IncludeJitter      bool
	EnableBitrateScore bool
	ReceiverProvider   ConnectionStatsReceiverProvider
	SenderProvider     ConnectionStatsSenderProvider
	Logger             logger.Logger
}

type ConnectionStatsReceiverProvider

type ConnectionStatsReceiverProvider interface {
	GetDeltaStats() map[uint32]*buffer.StreamStatsWithLayers
}

type ConnectionStatsSenderProvider

type ConnectionStatsSenderProvider interface {
	GetDeltaStatsSender() map[uint32]*buffer.StreamStatsWithLayers
	GetLastReceiverReportTime() time.Time
	GetTotalPacketsSent() uint64
}

Jump to

Keyboard shortcuts

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