streams

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProducer

func GetProducer(url string) (core.Producer, error)

func HandleFunc

func HandleFunc(scheme string, handler Handler)

func HasProducer

func HasProducer(url string) bool

func Init

func Init()

Types

type Handler

type Handler func(url string) (core.Producer, error)

type Producer

type Producer struct {
	core.Listener
	// contains filtered or unexported fields
}

func (*Producer) AddTrack added in v1.3.0

func (p *Producer) AddTrack(media *core.Media, codec *core.Codec, track *core.Receiver) error

func (*Producer) Dial added in v1.3.0

func (p *Producer) Dial() error

func (*Producer) GetMedias

func (p *Producer) GetMedias() []*core.Media

func (*Producer) GetTrack

func (p *Producer) GetTrack(media *core.Media, codec *core.Codec) (*core.Receiver, error)

func (*Producer) MarshalJSON

func (p *Producer) MarshalJSON() ([]byte, error)

func (*Producer) SetSource

func (p *Producer) SetSource(s string)

type Stream

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

func Get

func Get(name string) *Stream

func GetOrNew

func GetOrNew(src string) *Stream

func New

func New(name string, source any) *Stream

func NewStream

func NewStream(source any) *Stream

func NewTemplate added in v1.3.2

func NewTemplate(name string, source any) *Stream

func (*Stream) AddConsumer

func (s *Stream) AddConsumer(cons core.Consumer) (err error)

func (*Stream) AddInternalConsumer added in v1.2.0

func (s *Stream) AddInternalConsumer(conn core.Consumer)

func (*Stream) AddInternalProducer added in v1.2.0

func (s *Stream) AddInternalProducer(conn core.Producer)

func (*Stream) AddProducer

func (s *Stream) AddProducer(prod core.Producer)

func (*Stream) MarshalJSON

func (s *Stream) MarshalJSON() ([]byte, error)

func (*Stream) Play added in v1.2.0

func (s *Stream) Play(source string) error

func (*Stream) RemoveConsumer

func (s *Stream) RemoveConsumer(cons core.Consumer)

func (*Stream) RemoveInternalConsumer added in v1.2.0

func (s *Stream) RemoveInternalConsumer(conn core.Consumer)

func (*Stream) RemoveProducer

func (s *Stream) RemoveProducer(prod core.Producer)

func (*Stream) SetSource

func (s *Stream) SetSource(source string)

Jump to

Keyboard shortcuts

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