Documentation ¶
Index ¶
- Variables
- func NewVideoWriter(log logrus.FieldLogger, codec, filename string) *fileWriter
- type Control
- func (ctrl *Control) Authenticate(channelID types.ChannelID, streamKey types.StreamKey) error
- func (ctrl *Control) Context() context.Context
- func (ctrl *Control) ContextErr() error
- func (ctrl *Control) GetHmacKey(channelID types.ChannelID) (string, error)
- func (ctrl *Control) GetTracks(channelID types.ChannelID) ([]StreamTrack, error)
- func (ctrl *Control) HTTPServerURL() string
- func (ctrl *Control) RegisterHandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
- func (ctrl *Control) Shutdown()
- func (ctrl *Control) StartHTTPServer()
- func (ctrl *Control) StartStream(channelID types.ChannelID) (*Stream, error)
- func (ctrl *Control) StopStream(channelID types.ChannelID) error
- type FileWriter
- type Input
- type InputConfig
- type InputOption
- type InputType
- type Metadata
- func AudioCodecMetadata(codec string) Metadata
- func AudioPacketsMetadata(packets int) Metadata
- func ClientVendorNameMetadata(name string) Metadata
- func ClientVendorVersionMetadata(version string) Metadata
- func VideoCodecMetadata(codec string) Metadata
- func VideoHeightMetadata(height int) Metadata
- func VideoPacketsMetadata(packets int) Metadata
- func VideoWidthMetadata(width int) Metadata
- type Output
- type Pipe
- type Stream
- type StreamTrack
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewVideoWriter ¶
func NewVideoWriter(log logrus.FieldLogger, codec, filename string) *fileWriter
Types ¶
type Control ¶
type Control struct { Hostname string HTTPServerType string `mapstructure:"http_server_type"` HTTPAddress string `mapstructure:"http_address"` HTTPS bool HTTPSHostname string `mapstructure:"https_hostname"` HTTPSCert string `mapstructure:"https_cert"` HTTPSKey string `mapstructure:"https_key"` // Flag to enable saving video stream to file // Currently it's global flag toggled from the config file SaveVideo bool `mapstructure:"save_video"` // contains filtered or unexported fields }
func (*Control) Authenticate ¶
func (*Control) ContextErr ¶
func (*Control) GetHmacKey ¶
func (*Control) GetTracks ¶
func (ctrl *Control) GetTracks(channelID types.ChannelID) ([]StreamTrack, error)
func (*Control) HTTPServerURL ¶
func (*Control) RegisterHandleFunc ¶
func (*Control) StartHTTPServer ¶
func (ctrl *Control) StartHTTPServer()
func (*Control) StartStream ¶
type FileWriter ¶
type Input ¶
type Input interface { SetControl(ctrl *Control) SetLogger(log logrus.FieldLogger) Listen(ctx context.Context) }
type InputConfig ¶
type InputOption ¶
type InputType ¶
type InputType struct { Name string New func(*Control, interface{}) (Input, error) ReadConfig InputConfig[any] Options []InputOption Config interface{} }
type Metadata ¶
type Metadata func(*Stream)
func AudioCodecMetadata ¶
func AudioPacketsMetadata ¶
func VideoCodecMetadata ¶
func VideoHeightMetadata ¶
func VideoPacketsMetadata ¶
func VideoWidthMetadata ¶
type Output ¶
type Output interface { SetControl(ctrl *Control) SetLogger(log logrus.FieldLogger) Listen(ctx context.Context) }
type Stream ¶
type Stream struct { ChannelID types.ChannelID StreamID types.StreamID StreamKey types.StreamKey // contains filtered or unexported fields }
func (*Stream) ReportMetadata ¶
type StreamTrack ¶
type StreamTrack struct { Type webrtc.RTPCodecType Codec string Track webrtc.TrackLocal }
Click to show internal directories.
Click to hide internal directories.