rtpstats

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregateRTPStats

func AggregateRTPStats(statsList []*livekit.RTPStats) *livekit.RTPStats

func RTCPSenderReportPropagationDelay

func RTCPSenderReportPropagationDelay(rsrs *livekit.RTCPSenderReportState, passThrough bool) time.Duration

func ReconcileRTPStatsWithRTX added in v1.8.1

func ReconcileRTPStatsWithRTX(primaryStats *livekit.RTPStats, rtxStats *livekit.RTPStats) *livekit.RTPStats

Types

type RTPDeltaInfo

type RTPDeltaInfo struct {
	StartTime            time.Time
	EndTime              time.Time
	Packets              uint32
	Bytes                uint64
	HeaderBytes          uint64
	PacketsDuplicate     uint32
	BytesDuplicate       uint64
	HeaderBytesDuplicate uint64
	PacketsPadding       uint32
	BytesPadding         uint64
	HeaderBytesPadding   uint64
	PacketsLost          uint32
	PacketsMissing       uint32
	PacketsOutOfOrder    uint32
	Frames               uint32
	RttMax               uint32
	JitterMax            float64
	Nacks                uint32
	NackRepeated         uint32
	Plis                 uint32
	Firs                 uint32
}

func AggregateRTPDeltaInfo

func AggregateRTPDeltaInfo(deltaInfoList []*RTPDeltaInfo) *RTPDeltaInfo

func ReconcileRTPDeltaInfoWithRTX added in v1.8.1

func ReconcileRTPDeltaInfoWithRTX(primaryDeltaInfo *RTPDeltaInfo, rtxDeltaInfo *RTPDeltaInfo) *RTPDeltaInfo

func (*RTPDeltaInfo) MarshalLogObject added in v1.8.1

func (r *RTPDeltaInfo) MarshalLogObject(e zapcore.ObjectEncoder) error

type RTPDeltaInfoLite

type RTPDeltaInfoLite struct {
	StartTime         time.Time
	EndTime           time.Time
	Packets           uint32
	Bytes             uint64
	PacketsLost       uint32
	PacketsOutOfOrder uint32
	Nacks             uint32
}

func (*RTPDeltaInfoLite) MarshalLogObject added in v1.8.1

func (r *RTPDeltaInfoLite) MarshalLogObject(e zapcore.ObjectEncoder) error

type RTPFlowState

type RTPFlowState struct {
	IsNotHandled bool

	LossStartInclusive uint64
	LossEndExclusive   uint64

	IsDuplicate  bool
	IsOutOfOrder bool

	ExtSequenceNumber uint64
	ExtTimestamp      uint64
}

func (*RTPFlowState) MarshalLogObject

func (r *RTPFlowState) MarshalLogObject(e zapcore.ObjectEncoder) error

type RTPFlowStateLite

type RTPFlowStateLite struct {
	IsNotHandled bool

	LossStartInclusive uint64
	LossEndExclusive   uint64

	ExtSequenceNumber uint64
}

func (*RTPFlowStateLite) MarshalLogObject

func (r *RTPFlowStateLite) MarshalLogObject(e zapcore.ObjectEncoder) error

type RTPStatsParams

type RTPStatsParams struct {
	ClockRate uint32
	Logger    logger.Logger
}

type RTPStatsReceiver

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

func NewRTPStatsReceiver

func NewRTPStatsReceiver(params RTPStatsParams) *RTPStatsReceiver

func (*RTPStatsReceiver) DeltaInfo

func (r *RTPStatsReceiver) DeltaInfo(snapshotID uint32) *RTPDeltaInfo

func (*RTPStatsReceiver) ExtendedHighestSequenceNumber

func (r *RTPStatsReceiver) ExtendedHighestSequenceNumber() uint64

for testing only

func (*RTPStatsReceiver) GetRtcpReceptionReport

func (r *RTPStatsReceiver) GetRtcpReceptionReport(ssrc uint32, proxyFracLost uint8, snapshotID uint32) *rtcp.ReceptionReport

func (*RTPStatsReceiver) GetRtcpSenderReportData

func (r *RTPStatsReceiver) GetRtcpSenderReportData() *livekit.RTCPSenderReportState

func (RTPStatsReceiver) GetRtt

func (r RTPStatsReceiver) GetRtt() uint32

func (*RTPStatsReceiver) HighestSequenceNumber

func (r *RTPStatsReceiver) HighestSequenceNumber() uint16

for testing only

func (*RTPStatsReceiver) HighestTimestamp

func (r *RTPStatsReceiver) HighestTimestamp() uint32

func (*RTPStatsReceiver) LastSenderReportTime

func (r *RTPStatsReceiver) LastSenderReportTime() time.Time

func (*RTPStatsReceiver) MarshalLogObject

func (r *RTPStatsReceiver) MarshalLogObject(e zapcore.ObjectEncoder) error

func (*RTPStatsReceiver) NewSnapshotId

func (r *RTPStatsReceiver) NewSnapshotId() uint32

func (*RTPStatsReceiver) SetRtcpSenderReportData

func (r *RTPStatsReceiver) SetRtcpSenderReportData(srData *livekit.RTCPSenderReportState) bool

func (*RTPStatsReceiver) ToProto

func (r *RTPStatsReceiver) ToProto() *livekit.RTPStats

func (*RTPStatsReceiver) Update

func (r *RTPStatsReceiver) Update(
	packetTime int64,
	sequenceNumber uint16,
	timestamp uint32,
	marker bool,
	hdrSize int,
	payloadSize int,
	paddingSize int,
) (flowState RTPFlowState)

func (RTPStatsReceiver) UpdateFir

func (r RTPStatsReceiver) UpdateFir(firCount uint32)

func (RTPStatsReceiver) UpdateFirTime

func (r RTPStatsReceiver) UpdateFirTime()

func (RTPStatsReceiver) UpdateKeyFrame

func (r RTPStatsReceiver) UpdateKeyFrame(kfCount uint32)

func (RTPStatsReceiver) UpdateRtt

func (r RTPStatsReceiver) UpdateRtt(rtt uint32)

type RTPStatsReceiverLite

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

func NewRTPStatsReceiverLite

func NewRTPStatsReceiverLite(params RTPStatsParams) *RTPStatsReceiverLite

func (RTPStatsReceiverLite) CheckAndUpdatePli

func (r RTPStatsReceiverLite) CheckAndUpdatePli(throttle int64, force bool) bool

func (*RTPStatsReceiverLite) DeltaInfoLite

func (r *RTPStatsReceiverLite) DeltaInfoLite(snapshotLiteID uint32) *RTPDeltaInfoLite

func (RTPStatsReceiverLite) IsActive

func (r RTPStatsReceiverLite) IsActive() bool

func (RTPStatsReceiverLite) LastPli

func (r RTPStatsReceiverLite) LastPli() time.Time

func (*RTPStatsReceiverLite) MarshalLogObject

func (r *RTPStatsReceiverLite) MarshalLogObject(e zapcore.ObjectEncoder) error

func (*RTPStatsReceiverLite) NewSnapshotLiteId

func (r *RTPStatsReceiverLite) NewSnapshotLiteId() uint32

func (RTPStatsReceiverLite) SetLogger

func (r RTPStatsReceiverLite) SetLogger(logger logger.Logger)

func (RTPStatsReceiverLite) Stop

func (r RTPStatsReceiverLite) Stop()

func (*RTPStatsReceiverLite) ToProto

func (r *RTPStatsReceiverLite) ToProto() *livekit.RTPStats

func (*RTPStatsReceiverLite) Update

func (r *RTPStatsReceiverLite) Update(packetTime int64, packetSize int, sequenceNumber uint16) (flowStateLite RTPFlowStateLite)

func (RTPStatsReceiverLite) UpdateNack

func (r RTPStatsReceiverLite) UpdateNack(nackCount uint32)

func (RTPStatsReceiverLite) UpdateNackProcessed

func (r RTPStatsReceiverLite) UpdateNackProcessed(nackAckCount uint32, nackMissCount uint32, nackRepeatedCount uint32)

func (RTPStatsReceiverLite) UpdatePli

func (r RTPStatsReceiverLite) UpdatePli(pliCount uint32)

func (RTPStatsReceiverLite) UpdatePliAndTime

func (r RTPStatsReceiverLite) UpdatePliAndTime(pliCount uint32)

func (RTPStatsReceiverLite) UpdatePliTime

func (r RTPStatsReceiverLite) UpdatePliTime()

type RTPStatsSender

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

func NewRTPStatsSender

func NewRTPStatsSender(params RTPStatsParams, cacheSize int) *RTPStatsSender

func (*RTPStatsSender) DeltaInfo

func (r *RTPStatsSender) DeltaInfo(snapshotID uint32) *RTPDeltaInfo

func (*RTPStatsSender) DeltaInfoSender

func (r *RTPStatsSender) DeltaInfoSender(senderSnapshotID uint32) *RTPDeltaInfo

func (*RTPStatsSender) ExtHighestSequenceNumber

func (r *RTPStatsSender) ExtHighestSequenceNumber() uint64

func (*RTPStatsSender) GetExpectedRTPTimestamp

func (r *RTPStatsSender) GetExpectedRTPTimestamp(at time.Time) (expectedTSExt uint64, err error)

func (*RTPStatsSender) GetPacketsSeenMinusPadding

func (r *RTPStatsSender) GetPacketsSeenMinusPadding() uint64

func (*RTPStatsSender) GetRtcpSenderReport

func (r *RTPStatsSender) GetRtcpSenderReport(ssrc uint32, publisherSRData *livekit.RTCPSenderReportState, tsOffset uint64, passThrough bool) *rtcp.SenderReport

func (RTPStatsSender) GetRtt

func (r RTPStatsSender) GetRtt() uint32

func (*RTPStatsSender) LastReceiverReportTime

func (r *RTPStatsSender) LastReceiverReportTime() time.Time

func (*RTPStatsSender) MarshalLogObject

func (r *RTPStatsSender) MarshalLogObject(e zapcore.ObjectEncoder) error

func (*RTPStatsSender) MaybeAdjustFirstPacketTime

func (r *RTPStatsSender) MaybeAdjustFirstPacketTime(publisherSRData *livekit.RTCPSenderReportState, tsOffset uint64)

func (*RTPStatsSender) NewSenderSnapshotId

func (r *RTPStatsSender) NewSenderSnapshotId() uint32

func (*RTPStatsSender) NewSnapshotId

func (r *RTPStatsSender) NewSnapshotId() uint32

func (*RTPStatsSender) Seed

func (r *RTPStatsSender) Seed(from *RTPStatsSender)

func (*RTPStatsSender) ToProto

func (r *RTPStatsSender) ToProto() *livekit.RTPStats

func (*RTPStatsSender) Update

func (r *RTPStatsSender) Update(
	packetTime int64,
	extSequenceNumber uint64,
	extTimestamp uint64,
	marker bool,
	hdrSize int,
	payloadSize int,
	paddingSize int,
	isOutOfOrder bool,
)

func (RTPStatsSender) UpdateFir

func (r RTPStatsSender) UpdateFir(firCount uint32)

func (RTPStatsSender) UpdateFirTime

func (r RTPStatsSender) UpdateFirTime()

func (*RTPStatsSender) UpdateFromReceiverReport

func (r *RTPStatsSender) UpdateFromReceiverReport(rr rtcp.ReceptionReport) (rtt uint32, isRttChanged bool)

func (RTPStatsSender) UpdateKeyFrame

func (r RTPStatsSender) UpdateKeyFrame(kfCount uint32)

func (*RTPStatsSender) UpdateLayerLockPliAndTime

func (r *RTPStatsSender) UpdateLayerLockPliAndTime(pliCount uint32)

func (RTPStatsSender) UpdateRtt

func (r RTPStatsSender) UpdateRtt(rtt uint32)

type RTPStatsSenderLite

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

func NewRTPStatsSenderLite

func NewRTPStatsSenderLite(params RTPStatsParams) *RTPStatsSenderLite

func (RTPStatsSenderLite) CheckAndUpdatePli

func (r RTPStatsSenderLite) CheckAndUpdatePli(throttle int64, force bool) bool

func (*RTPStatsSenderLite) ExtHighestSequenceNumber

func (r *RTPStatsSenderLite) ExtHighestSequenceNumber() uint64

func (RTPStatsSenderLite) IsActive

func (r RTPStatsSenderLite) IsActive() bool

func (RTPStatsSenderLite) LastPli

func (r RTPStatsSenderLite) LastPli() time.Time

func (*RTPStatsSenderLite) MarshalLogObject

func (r *RTPStatsSenderLite) MarshalLogObject(e zapcore.ObjectEncoder) error

func (RTPStatsSenderLite) SetLogger

func (r RTPStatsSenderLite) SetLogger(logger logger.Logger)

func (RTPStatsSenderLite) Stop

func (r RTPStatsSenderLite) Stop()

func (*RTPStatsSenderLite) ToProto

func (r *RTPStatsSenderLite) ToProto() *livekit.RTPStats

func (*RTPStatsSenderLite) Update

func (r *RTPStatsSenderLite) Update(packetTime int64, packetSize int, extSequenceNumber uint64)

func (RTPStatsSenderLite) UpdateNack

func (r RTPStatsSenderLite) UpdateNack(nackCount uint32)

func (RTPStatsSenderLite) UpdateNackProcessed

func (r RTPStatsSenderLite) UpdateNackProcessed(nackAckCount uint32, nackMissCount uint32, nackRepeatedCount uint32)

func (RTPStatsSenderLite) UpdatePli

func (r RTPStatsSenderLite) UpdatePli(pliCount uint32)

func (RTPStatsSenderLite) UpdatePliAndTime

func (r RTPStatsSenderLite) UpdatePliAndTime(pliCount uint32)

func (RTPStatsSenderLite) UpdatePliTime

func (r RTPStatsSenderLite) UpdatePliTime()

type WrappedRTCPSenderReportStateLogger

type WrappedRTCPSenderReportStateLogger struct {
	*livekit.RTCPSenderReportState
}

func (WrappedRTCPSenderReportStateLogger) MarshalLogObject

Jump to

Keyboard shortcuts

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