streams

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProducer

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

func HandleFunc

func HandleFunc(scheme string, handler Handler)

func HasProducer

func HasProducer(url string) bool

func Init

func Init()

Types

type Consumer

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

func (*Consumer) MarshalJSON

func (c *Consumer) MarshalJSON() ([]byte, error)

type Handler

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

type Producer

type Producer struct {
	streamer.Element
	// contains filtered or unexported fields
}

func (*Producer) GetMedias

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

func (*Producer) GetTrack

func (p *Producer) GetTrack(media *streamer.Media, codec *streamer.Codec) *streamer.Track

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 interface{}) *Stream

func NewStream

func NewStream(source interface{}) *Stream

func (*Stream) AddConsumer

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

func (*Stream) AddProducer

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

func (*Stream) MarshalJSON

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

func (*Stream) RemoveConsumer

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

func (*Stream) RemoveProducer

func (s *Stream) RemoveProducer(prod streamer.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