bridge

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeSampleIVFTrack

func MakeSampleIVFTrack(ffmpegPath, Testsrc, Filter, Bandwidth string) (webrtc.TrackLocal, error)

Types

type Bridge

type Bridge struct {
	EntranceFactory // Bridge should have the ability to generate Entrance
	// But Bridge only have 1 Publisher in EntranceFactory, if this Publisher broken, the the bridge broken
	algorithms.Processor
	// contains filtered or unexported fields
}

func (Bridge) Lock

func (b Bridge) Lock(init util.Param, OnBroken func(badGay error)) error

func (Bridge) Remove

func (b Bridge) Remove()

func (Bridge) Repair

func (b Bridge) Repair(param util.Param) error

func (Bridge) Update

func (b Bridge) Update(param util.Param) error

type BridgeFactory

type BridgeFactory struct {
	PublisherFactory
	algorithms.ProcessorFactory
	// contains filtered or unexported fields
}

func NewBridgeFactory

func NewBridgeFactory(sfu *ion_sfu.SFU, fact algorithms.ProcessorFactory) BridgeFactory

func (BridgeFactory) NewDoor

func (b BridgeFactory) NewDoor() (util.UnblockedDoor, error)

type BridgePeer

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

func NewBridgePeer

func NewBridgePeer(peer *ion_sfu.PeerLocal, pc *webrtc.PeerConnection) BridgePeer

func (BridgePeer) Remove

func (p BridgePeer) Remove()

type Entrance

type Entrance struct {
	Subscriber // Subscriber is its entrance, Entrance is also a Subscriber
	// contains filtered or unexported fields
}

Entrance of a Bridge

func (Entrance) Lock

func (e Entrance) Lock(init util.Param, OnBroken func(badGay error)) error

func (Entrance) Remove

func (e Entrance) Remove()

func (Entrance) Repair

func (e Entrance) Repair(param util.Param) error

func (Entrance) Update

func (e Entrance) Update(param util.Param) error

type EntranceFactory

type EntranceFactory struct {
	SubscriberFactory
	// contains filtered or unexported fields
}

EntranceFactory create Entrance for a bridge All the Entrance(or in other words, Subscriber) should put their track into same Processor

func (EntranceFactory) NewDoor

func (e EntranceFactory) NewDoor() (util.UnblockedDoor, error)

type ProceedTrackParam

type ProceedTrackParam struct {
	*pb.ProceedTrack
}

func (ProceedTrackParam) Clone

func (t ProceedTrackParam) Clone() util.Param

type Publisher

type Publisher struct {
	BridgePeer
}

func (Publisher) AddTrack

func (p Publisher) AddTrack(track webrtc.TrackLocal) (*webrtc.RTPSender, error)

func (Publisher) Lock

func (p Publisher) Lock(sid util.Param, OnBroken func(badGay error)) error

func (Publisher) RemoveTrack

func (p Publisher) RemoveTrack(sender *webrtc.RTPSender) error

func (Publisher) Repair

func (p Publisher) Repair(util.Param) error

func (Publisher) Update

func (p Publisher) Update(util.Param) error

type PublisherFactory

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

func NewPublisherFactory

func NewPublisherFactory(sfu *ion_sfu.SFU) PublisherFactory

func (PublisherFactory) NewDoor

func (p PublisherFactory) NewDoor() (util.UnblockedDoor, error)

type SID

type SID string

func (SID) Clone

func (s SID) Clone() util.Param

type SimpleFFmpegTestsrcPublisher

type SimpleFFmpegTestsrcPublisher struct {
	PublisherFactory

	Filter    string
	Bandwidth string
	Testsrc   string
	// contains filtered or unexported fields
}

SimpleFFmpegTestsrcPublisher a Publisher get video from ffmpeg -f lavfi -i testsrc=XXX WARNING: 根本停不下来

func NewSimpleFFmpegTestsrcPublisher

func NewSimpleFFmpegTestsrcPublisher(ffmpegPath string, sfu *ion_sfu.SFU) SimpleFFmpegTestsrcPublisher

func (SimpleFFmpegTestsrcPublisher) NewDoor

type Subscriber

type Subscriber struct {
	BridgePeer
}

func (Subscriber) Lock

func (s Subscriber) Lock(sid util.Param, OnBroken func(badGay error)) error

func (Subscriber) OnTrack

func (s Subscriber) OnTrack(f func(*webrtc.TrackRemote, *webrtc.RTPReceiver))

func (Subscriber) Repair

func (s Subscriber) Repair(util.Param) error

func (Subscriber) Update

func (s Subscriber) Update(util.Param) error

type SubscriberFactory

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

func NewSubscriberFactory

func NewSubscriberFactory(sfu *ion_sfu.SFU) SubscriberFactory

func (SubscriberFactory) NewDoor

func (s SubscriberFactory) NewDoor() (util.UnblockedDoor, error)

Jump to

Keyboard shortcuts

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