intervalpli

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package intervalpli is an interceptor that requests PLI on a static interval. Useful when bridging protocols that don't have receiver feedback

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneratorInterceptor

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

GeneratorInterceptor interceptor sends PLI packets. Implements PLI in a naive way: sends a PLI for each new track that support PLI, periodically.

func NewGeneratorInterceptor

func NewGeneratorInterceptor(opts ...GeneratorOption) (*GeneratorInterceptor, error)

NewGeneratorInterceptor returns a new GeneratorInterceptor interceptor.

func (*GeneratorInterceptor) BindRTCPReader

BindRTCPReader lets you modify any incoming RTCP packets. It is called once per sender/receiver, however this might change in the future. The returned method will be called once per packet batch.

func (*GeneratorInterceptor) BindRTCPWriter

BindRTCPWriter lets you modify any outgoing RTCP packets. It is called once per PeerConnection. The returned method will be called once per packet batch.

func (*GeneratorInterceptor) BindRemoteStream

BindRemoteStream lets you modify any incoming RTP packets. It is called once for per RemoteStream. The returned method will be called once per rtp packet.

func (*GeneratorInterceptor) Close

func (r *GeneratorInterceptor) Close() error

Close closes the interceptor.

func (*GeneratorInterceptor) ForcePLI

func (r *GeneratorInterceptor) ForcePLI(ssrc ...uint32)

ForcePLI sends a PLI request to the tracks matching the provided SSRCs.

func (*GeneratorInterceptor) UnbindLocalStream

func (r *GeneratorInterceptor) UnbindLocalStream(info *interceptor.StreamInfo)

UnbindLocalStream is called when the Stream is removed. It can be used to clean up any data related to that track.

type GeneratorOption

type GeneratorOption func(r *GeneratorInterceptor) error

GeneratorOption can be used to configure GeneratorInterceptor.

func GeneratorInterval

func GeneratorInterval(interval time.Duration) GeneratorOption

GeneratorInterval sets send interval for the interceptor.

func GeneratorLog

func GeneratorLog(log logging.LeveledLogger) GeneratorOption

GeneratorLog sets a logger for the interceptor.

type ReceiverInterceptorFactory

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

ReceiverInterceptorFactory is a interceptor.Factory for a ReceiverInterceptor

func NewReceiverInterceptor

func NewReceiverInterceptor(opts ...GeneratorOption) (*ReceiverInterceptorFactory, error)

NewReceiverInterceptor returns a new ReceiverInterceptor

func (*ReceiverInterceptorFactory) NewInterceptor

NewInterceptor returns a new ReceiverInterceptor interceptor.

Jump to

Keyboard shortcuts

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