pacing

package
v0.0.0-...-beed344 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interceptor

type Interceptor struct {
	interceptor.NoOp
	// contains filtered or unexported fields
}

func (*Interceptor) BindLocalStream

func (p *Interceptor) BindLocalStream(info *interceptor.StreamInfo, writer interceptor.RTPWriter) interceptor.RTPWriter

func (*Interceptor) Close

func (p *Interceptor) Close() error

func (*Interceptor) SetTargetBitrate

func (p *Interceptor) SetTargetBitrate(target int64)

func (*Interceptor) UnbindLocalStream

func (p *Interceptor) UnbindLocalStream(info *interceptor.StreamInfo)

type InterceptorFactory

type InterceptorFactory struct {
	InitialBitrate    int64
	StepDuration      time.Duration
	MaxBucketDuration time.Duration
	// contains filtered or unexported fields
}

func NewInterceptorFactory

func NewInterceptorFactory(options ...Option) *InterceptorFactory

func (*InterceptorFactory) NewInterceptor

func (f *InterceptorFactory) NewInterceptor(_ string) (interceptor.Interceptor, error)

func (*InterceptorFactory) OnNewPeerConnection

func (f *InterceptorFactory) OnNewPeerConnection(cb NewPeerConnectionCallback)

OnNewPeerConnection sets a callback that is called when a new CC interceptor is created.

type NewPeerConnectionCallback

type NewPeerConnectionCallback func(pacer *Interceptor)

type Option

type Option func(*InterceptorFactory)

func WithInitialBitrate

func WithInitialBitrate(bitrate int64) Option

func WithMaxBucketDuration

func WithMaxBucketDuration(duration time.Duration) Option

func WithStepDuration

func WithStepDuration(step time.Duration) Option

Jump to

Keyboard shortcuts

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