rtclib

package
v0.0.0-...-6470968 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FactoryImpl

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

func (*FactoryImpl) NewLocalStream

func (f *FactoryImpl) NewLocalStream(params LocalStreamParams) (*LocalStream, error)

func (*FactoryImpl) NewRemoteStream

func (f *FactoryImpl) NewRemoteStream(params RemoteStreamParams) (*RemoteStream, error)

type LocalStream

type LocalStream struct {
	*transport.Transport
	// contains filtered or unexported fields
}

func NewLocalStream

func NewLocalStream(transport *transport.Transport) (*LocalStream, error)

func (*LocalStream) AddTrack

func (ls *LocalStream) AddTrack(codec deliver.CodecType, clockRate uint32, logger logger.Logger) (track *TrackLocl, err error)

func (*LocalStream) Close

func (ls *LocalStream) Close()

type LocalStreamParams

type LocalStreamParams struct {
	AllowdCodecs []config.CodecConfig
	Ctx          context.Context
	Logger       logger.Logger
	PreferTCP    bool
}

type RemoteStream

type RemoteStream struct {
	*transport.Transport
	// contains filtered or unexported fields
}

func NewRemoteStream

func NewRemoteStream(transport *transport.Transport) (*RemoteStream, error)

func (*RemoteStream) Close

func (rs *RemoteStream) Close()

func (*RemoteStream) GatheringTracks

func (rs *RemoteStream) GatheringTracks(gatherAudioTrack, gatherVideoTrack bool, timeout time.Duration) ([]*TrackRemote, error)

type RemoteStreamParams

type RemoteStreamParams struct {
	AllowdCodecs []config.CodecConfig
	Ctx          context.Context
	Logger       logger.Logger
	PreferTCP    bool
}

type StreamFactory

type StreamFactory interface {
	NewRemoteStream(params RemoteStreamParams) (*RemoteStream, error)
	NewLocalStream(params LocalStreamParams) (*LocalStream, error)
}

func NewTransportFactory

func NewTransportFactory(settings config.Settings) StreamFactory

type TrackLocl

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

func NewTrackLocl

func NewTrackLocl(ctx context.Context, codec deliver.CodecType, clockRate uint32, addTrack addTrackFunc, logger logger.Logger) (*TrackLocl, error)

func (*TrackLocl) ReadRTCP

func (t *TrackLocl) ReadRTCP(buf []byte) (n int, a interceptor.Attributes, err error)

func (*TrackLocl) WriteRTP

func (t *TrackLocl) WriteRTP(pkt *rtp.Packet) error

type TrackRemote

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

func NewTrackRemote

func NewTrackRemote(ctx context.Context,
	track *webrtc.TrackRemote,
	receiver *webrtc.RTPReceiver,
	writeRTCP func([]rtcp.Packet) error,
	logger logger.Logger) *TrackRemote

func (*TrackRemote) IsAudio

func (t *TrackRemote) IsAudio() bool

func (*TrackRemote) IsVideo

func (t *TrackRemote) IsVideo() bool

func (*TrackRemote) Kind

func (t *TrackRemote) Kind() webrtc.RTPCodecType

func (*TrackRemote) ReadRTCP

func (t *TrackRemote) ReadRTCP(buf []byte) (n int, a interceptor.Attributes, err error)

func (*TrackRemote) ReadRTP

func (t *TrackRemote) ReadRTP() (*rtp.Packet, error)

func (*TrackRemote) SSRC

func (t *TrackRemote) SSRC() webrtc.SSRC

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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