srt

package
v16.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrServerClosed = srt.ErrServerClosed

ErrServerClosed is returned by ListenAndServe if the server has been closed regularly with the Close() function.

Functions

This section is empty.

Types

type Channels

type Channels struct {
	Publisher   map[string]uint32
	Subscriber  map[string][]uint32
	Connections map[uint32]Connection
	Log         map[string][]Log
}

type Config

type Config struct {
	// The address the SRT server should listen on, e.g. ":1935"
	Addr string

	// A token that needs to be added to the URL as query string
	// in order push or pull a stream. The key for the query
	// parameter is "token". Optional. By default no token is
	// required.
	Token string

	Passphrase string

	// Logger. Optional.
	Logger log.Logger

	Collector session.Collector

	SRTLogTopics []string
}

Config for a new SRT server

type Connection

type Connection struct {
	Log   map[string][]Log
	Stats srt.Statistics
}

type Log

type Log struct {
	Timestamp time.Time
	Message   []string
}

type Server

type Server interface {
	// ListenAndServe starts the SRT server
	ListenAndServe() error

	// Close stops the RTMP server and closes all connections
	Close()

	// Channels return a list of currently publishing streams
	Channels() Channels
}

Server represents a SRT server

func New

func New(config Config) (Server, error)

Jump to

Keyboard shortcuts

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