pacer

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: Apache-2.0 Imports: 8 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 added in v1.4.5

func (b *Base) SetBitrate(_bitrate int)

func (*Base) SetInterval added in v1.4.5

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

type ExtensionData

type ExtensionData struct {
	ID      uint8
	Payload []byte
}

type LeakyBucket added in v1.4.5

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

func NewLeakyBucket added in v1.4.5

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

func (*LeakyBucket) Enqueue added in v1.4.5

func (l *LeakyBucket) Enqueue(p Packet)

func (*LeakyBucket) SetBitrate added in v1.4.5

func (l *LeakyBucket) SetBitrate(bitrate int)

func (*LeakyBucket) SetInterval added in v1.4.5

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

func (*LeakyBucket) Stop added in v1.4.5

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 PacketTime

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

func NewPacketTime

func NewPacketTime() *PacketTime

func (*PacketTime) Get

func (p *PacketTime) Get() time.Time

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