pionutil

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentPeerConnectionRTT

func CurrentPeerConnectionRTT(pc *webrtc.PeerConnection) (time.Duration, bool)

func NewAPI

func NewAPI(clientIP string, vp9PT uint8, opts ...Option) (*webrtc.API, error)

func NewSettingEngineMutator

func NewSettingEngineMutator(b *ImpairmentBinding) (func(*webrtc.SettingEngine), error)

func NewVP9RTPTrack

func NewVP9RTPTrack(streamID string) (*webrtc.TrackLocalStaticRTP, error)

func NewVP9SampleTrack

func NewVP9SampleTrack(streamID string) (*webrtc.TrackLocalStaticSample, error)

func PollPeerConnectionRTT

func PollPeerConnectionRTT(
	ctx context.Context,
	interval time.Duration,
	pcSource func() *webrtc.PeerConnection,
	observe func(time.Duration),
)

func RegisterLoggingCallbacks

func RegisterLoggingCallbacks(l *log.Logger, pc *webrtc.PeerConnection)

Types

type ImpairmentBinding

type ImpairmentBinding struct {
	Router  *ImpairmentRouter
	Profile *ImpairmentProfile
}

type ImpairmentProfile

type ImpairmentProfile struct {
	Name         string
	BandwidthBps int
	BaseLatency  time.Duration
	JitterStddev time.Duration
	LossPercent  int
	Seed         int64
}

type ImpairmentRouter

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

func NewImpairmentRouter

func NewImpairmentRouter(serverIP string, serverPort int) (*ImpairmentRouter, error)

func (*ImpairmentRouter) Start

func (r *ImpairmentRouter) Start() error

func (*ImpairmentRouter) Stop

func (r *ImpairmentRouter) Stop() error

type Option

type Option func(*apiConfig)

func WithAPIOption

func WithAPIOption(opt func(*webrtc.API)) Option

func WithForceActiveDTLS

func WithForceActiveDTLS() Option

func WithImpairment

func WithImpairment(b *ImpairmentBinding) Option

Jump to

Keyboard shortcuts

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