rtc

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: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMetadataFromSDP

func NewMetadataFromSDP(sdpStr string) (deliver.Metadata, error)

Types

type FrameDestination

type FrameDestination struct {
	deliver.FrameDestination
	*rtclib.LocalStream
	// contains filtered or unexported fields
}

func NewFrameDestination

func NewFrameDestination(ctx context.Context, streamFactory rtclib.StreamFactory, preferTCP bool, logger *logrus.Entry) (fd *FrameDestination, err error)

func (*FrameDestination) AddAudioTrack

func (fd *FrameDestination) AddAudioTrack(am *deliver.AudioMetadata) (err error)

func (*FrameDestination) AddVideoTrack

func (fd *FrameDestination) AddVideoTrack(vm *deliver.VideoMetadata) (err error)

func (*FrameDestination) Close

func (fd *FrameDestination) Close()

func (*FrameDestination) CreateAnswer

func (fd *FrameDestination) CreateAnswer(options *webrtc.AnswerOptions) (webrtc.SessionDescription, error)

func (*FrameDestination) CreateOffer

func (fd *FrameDestination) CreateOffer(options *webrtc.OfferOptions) (webrtc.SessionDescription, error)

func (*FrameDestination) OnFrame

func (fd *FrameDestination) OnFrame(frame deliver.Frame, attr deliver.Attributes)

func (*FrameDestination) OnSource

func (fd *FrameDestination) OnSource(src deliver.FrameSource) (err error)

func (*FrameDestination) SetRemoteDescription

func (fd *FrameDestination) SetRemoteDescription(remoteSdp webrtc.SessionDescription) (err error)

func (*FrameDestination) SourceCompletePromise

func (fd *FrameDestination) SourceCompletePromise() <-chan error

func (*FrameDestination) Start

func (fd *FrameDestination) Start() error

type FrameSource

type FrameSource struct {
	deliver.FrameSource

	*rtclib.RemoteStream
	// contains filtered or unexported fields
}

func NewFrameSource

func NewFrameSource(ctx context.Context, streamFactory rtclib.StreamFactory, preferTCP bool, keyFrameInterval time.Duration, logger *logrus.Entry) (fs *FrameSource, err error)

func (*FrameSource) Close

func (fs *FrameSource) Close()

func (*FrameSource) CreateAnswer

func (fs *FrameSource) CreateAnswer(options *webrtc.AnswerOptions) (webrtc.SessionDescription, error)

func (*FrameSource) Metadata

func (fs *FrameSource) Metadata() *deliver.Metadata

func (*FrameSource) OnFeedback

func (fs *FrameSource) OnFeedback(feedback deliver.FeedbackMsg)

func (*FrameSource) SetRemoteDescription

func (fs *FrameSource) SetRemoteDescription(remoteSdp webrtc.SessionDescription) (err error)

func (*FrameSource) Start

func (fs *FrameSource) Start() (err error)

type ServSession

type ServSession struct {
	router.Session
	// contains filtered or unexported fields
}

func NewServSession

func NewServSession(ctx context.Context, sf rtclib.StreamFactory, pm router.PeerParams, logger *logrus.Entry) *ServSession

func (*ServSession) Publish

func (s *ServSession) Publish(keyFrameInterval time.Duration, sdpOffer string) (*webrtc.SessionDescription, error)

func (*ServSession) Subscribe

func (s *ServSession) Subscribe(sdpOffer string, timeout time.Duration) (*webrtc.SessionDescription, error)

Jump to

Keyboard shortcuts

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