pacer

package
v0.0.0-...-c2cc3df Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

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

func NewBase

func NewBase(logger logger.Logger) *Base

func (*Base) SendPacket

func (b *Base) SendPacket(p *Packet) (int, error)

func (*Base) SetBitrate

func (b *Base) SetBitrate(_bitrate int)

func (*Base) SetInterval

func (b *Base) SetInterval(_interval time.Duration)

type ExtensionData

type ExtensionData struct {
	ID      uint8
	Payload []byte
}

type LeakyBucket

type LeakyBucket struct {
	*Base
	// contains filtered or unexported fields
}

func NewLeakyBucket

func NewLeakyBucket(logger logger.Logger, interval time.Duration, bitrate int) *LeakyBucket

func (*LeakyBucket) Enqueue

func (l *LeakyBucket) Enqueue(p Packet)

func (*LeakyBucket) SetBitrate

func (l *LeakyBucket) SetBitrate(bitrate int)

func (*LeakyBucket) SetInterval

func (l *LeakyBucket) SetInterval(interval time.Duration)

func (*LeakyBucket) Stop

func (l *LeakyBucket) Stop()

type NoQueue

type NoQueue struct {
	*Base
	// contains filtered or unexported fields
}

func NewNoQueue

func NewNoQueue(logger logger.Logger) *NoQueue

func (*NoQueue) Enqueue

func (n *NoQueue) Enqueue(p Packet)

func (*NoQueue) Stop

func (n *NoQueue) Stop()

type Pacer

type Pacer interface {
	Enqueue(p Packet)
	Stop()

	SetInterval(interval time.Duration)
	SetBitrate(bitrate int)
}

type Packet

type Packet struct {
	Header             *rtp.Header
	Extensions         []ExtensionData
	Payload            []byte
	AbsSendTimeExtID   uint8
	TransportWideExtID uint8
	WriteStream        webrtc.TrackLocalWriter
	Pool               *sync.Pool
	PoolEntity         *[]byte
}

type PassThrough

type PassThrough struct {
	*Base
}

func NewPassThrough

func NewPassThrough(logger logger.Logger) *PassThrough

func (*PassThrough) Enqueue

func (p *PassThrough) Enqueue(pkt Packet)

func (*PassThrough) Stop

func (p *PassThrough) Stop()

Jump to

Keyboard shortcuts

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