pion

package
v0.0.0-...-61319d9 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructApi

func ConstructApi(handlerId uint32) *webrtc.API

Types

type PionPeer

type PionPeer struct {
	*webrtc.PeerConnection
	Callback PionPeerCallback
	// contains filtered or unexported fields
}

func (*PionPeer) AddIceCandidate

func (peer *PionPeer) AddIceCandidate(candidate string, sdpMid *string, sdpMLineIndex *uint16) error

func (*PionPeer) Close

func (peer *PionPeer) Close() error

func (*PionPeer) HandleOffer

func (peer *PionPeer) HandleOffer(sdp string) (string, error)

func (*PionPeer) Initialize

func (peer *PionPeer) Initialize(id string) error

func (*PionPeer) String

func (peer *PionPeer) String() string

type PionPeerCallback

type PionPeerCallback interface {
	OnIceCandidate(candidate string, sdpMid *string, sdpMLineIndex *uint16) error
	OnIceConnectionStateChange(state webrtc.ICEConnectionState) error
	OnConnectionStateChange(state webrtc.PeerConnectionState) error
	OnRemoteAudioTrack(sampleRate uint32, channels uint16) (PionTrackCallback, error)
	OnLocalAudioTrack(sampleRate uint32, channels uint16, callback PionTrackCallback) error
	OnError(err error)
}

type PionTrackCallback

type PionTrackCallback func(data []byte, duration time.Duration)

type SimplePionLogger

type SimplePionLogger struct {
	*log.Logger
	Prefix string
}

func (*SimplePionLogger) Debug

func (logger *SimplePionLogger) Debug(msg string)

func (*SimplePionLogger) Debugf

func (logger *SimplePionLogger) Debugf(format string, args ...any)

func (*SimplePionLogger) Error

func (logger *SimplePionLogger) Error(msg string)

func (*SimplePionLogger) Errorf

func (logger *SimplePionLogger) Errorf(format string, args ...any)

func (*SimplePionLogger) Info

func (logger *SimplePionLogger) Info(msg string)

func (*SimplePionLogger) Infof

func (logger *SimplePionLogger) Infof(format string, args ...any)

func (*SimplePionLogger) Trace

func (logger *SimplePionLogger) Trace(msg string)

func (*SimplePionLogger) Tracef

func (logger *SimplePionLogger) Tracef(format string, args ...any)

func (*SimplePionLogger) Warn

func (logger *SimplePionLogger) Warn(msg string)

func (*SimplePionLogger) Warnf

func (logger *SimplePionLogger) Warnf(format string, args ...any)

type SimplePionLoggerFactory

type SimplePionLoggerFactory struct {
	*log.Logger
	NameSuffix string
}

func (*SimplePionLoggerFactory) NewLogger

func (factory *SimplePionLoggerFactory) NewLogger(scope string) logging.LeveledLogger

Jump to

Keyboard shortcuts

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