broadcast

package
v0.0.0-...-1794ea3 Latest Latest
Warning

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

Go to latest
Published: May 7, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broadcast

type Broadcast struct {
	StreamTrackInfo

	Closed bool

	RateMean float64
	RateVar  float64
	// contains filtered or unexported fields
}

func (*Broadcast) Close

func (cast *Broadcast) Close() error

func (*Broadcast) Connect

func (cast *Broadcast) Connect(ch chan<- []byte, skipHeaders bool)

func (*Broadcast) Disconnect

func (cast *Broadcast) Disconnect(ch chan<- []byte)

func (*Broadcast) Reset

func (cast *Broadcast) Reset()

func (*Broadcast) Write

func (cast *Broadcast) Write(data []byte) (int, error)

type BroadcastSet

type BroadcastSet struct {

	// How long to keep a stream alive after a call to `Close`.
	Timeout time.Duration
	// Called right after a stream is destroyed. (`Timeout` seconds after a `Close`.)
	OnStreamClose     func(id string)
	OnStreamTrackInfo func(id string, info *StreamTrackInfo)
	// contains filtered or unexported fields
}

func (*BroadcastSet) Readable

func (ctx *BroadcastSet) Readable(id string) (*Broadcast, bool)

func (*BroadcastSet) Writable

func (ctx *BroadcastSet) Writable(id string) (*Broadcast, bool)

type StreamTrackInfo

type StreamTrackInfo struct {
	HasVideo bool
	HasAudio bool
	Width    uint // Dimensions of the video track that came last in the `Tracks` tag.
	Height   uint // Hopefully, there's only one video track in the file.
}

Jump to

Keyboard shortcuts

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