jitter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

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

func NewBuffer

func NewBuffer(
	depacketizer rtp.Depacketizer,
	latency time.Duration,
	fnc PacketFunc,
	opts ...Option,
) *Buffer

func (*Buffer) Close

func (b *Buffer) Close()

func (*Buffer) Push

func (b *Buffer) Push(pkt *rtp.Packet)

func (*Buffer) Size

func (b *Buffer) Size() int

func (*Buffer) Stats

func (b *Buffer) Stats() *BufferStats

func (*Buffer) UpdateLatency

func (b *Buffer) UpdateLatency(latency time.Duration)

func (*Buffer) WithLogger

func (b *Buffer) WithLogger(logger logger.Logger) *Buffer

type BufferStats

type BufferStats struct {
	PacketsPushed  uint64 // total packets pushed
	PaddingPushed  uint64 // padding packets pushed
	PacketsLost    uint64 // packets lost
	PacketsDropped uint64 // packets dropped (incomplete)
	PacketsPopped  uint64 // packets sent to handler
	SamplesPopped  uint64 // samples sent to handler
}

func (*BufferStats) PacketLoss

func (s *BufferStats) PacketLoss() float64

type Option

type Option func(*Buffer)

func WithLogger

func WithLogger(logger logger.Logger) Option

func WithPacketLossHandler

func WithPacketLossHandler(handler func()) Option

type PacketFunc

type PacketFunc func(packets []*rtp.Packet)

Jump to

Keyboard shortcuts

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