Documentation
¶
Index ¶
- type Buffer
- func (b *Buffer) Close()
- func (b *Buffer) Push(pkt *rtp.Packet)
- func (b *Buffer) PushAt(pkt *rtp.Packet, receivedAt time.Time)
- func (b *Buffer) PushExtPacket(extPkt ExtPacket)
- func (b *Buffer) PushExtPacketBatch(extPktBatch []ExtPacket)
- func (b *Buffer) Size() int
- func (b *Buffer) Stats() *BufferStats
- func (b *Buffer) UpdateLatency(latency time.Duration)
- func (b *Buffer) WithLogger(logger logger.Logger) *Buffer
- type BufferStats
- type ExtPacket
- type Option
- type PacketFunc
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) PushExtPacket ¶
func (*Buffer) PushExtPacketBatch ¶
func (*Buffer) Stats ¶
func (b *Buffer) Stats() *BufferStats
func (*Buffer) UpdateLatency ¶
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 WithPacketLossHandler ¶
func WithPacketLossHandler(handler func()) Option
type PacketFunc ¶
type PacketFunc func(packets []ExtPacket)
Click to show internal directories.
Click to hide internal directories.