jitter

package
v2.2.3-free Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 5 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, clockRate uint32, maxLatency time.Duration, opts ...Option) *Buffer

func (*Buffer) PacketLoss

func (b *Buffer) PacketLoss() float64

func (*Buffer) Pop

func (b *Buffer) Pop(force bool) []*rtp.Packet

func (*Buffer) PopSamples

func (b *Buffer) PopSamples(force bool) [][]*rtp.Packet

func (*Buffer) Push

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

func (*Buffer) UpdateMaxLatency

func (b *Buffer) UpdateMaxLatency(maxLatency time.Duration)

type Option

type Option func(b *Buffer)

func WithLogger

func WithLogger(l logger.Logger) Option

WithLogger sets a logger which will log packets dropped

func WithPacketDroppedHandler

func WithPacketDroppedHandler(f func()) Option

WithPacketDroppedHandler sets a callback that's called when a packet is dropped. This signifies packet loss.

Jump to

Keyboard shortcuts

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