restream

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: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMetadataKeyNotFound = errors.New("unknown key")
View Source
var ErrProcessExists = errors.New("process already exists")
View Source
var ErrUnknownProcess = errors.New("unknown process")

Functions

This section is empty.

Types

type Config

type Config struct {
	ID           string
	Name         string
	Store        store.Store
	Filesystems  []fs.Filesystem
	Replace      replace.Replacer
	FFmpeg       ffmpeg.FFmpeg
	MaxProcesses int64
	Logger       log.Logger
}

Config is the required configuration for a new restreamer instance.

type Restreamer

type Restreamer interface {
	ID() string                                                  // ID of this instance
	Name() string                                                // Arbitrary name of this instance
	CreatedAt() time.Time                                        // Time of when this instance has been created
	Start()                                                      // Start all processes that have a "start" order
	Stop()                                                       // Stop all running process but keep their "start" order
	AddProcess(config *app.Config) error                         // Add a new process
	GetProcessIDs(idpattern, refpattern string) []string         // Get a list of process IDs based on patterns for ID and reference
	DeleteProcess(id string) error                               // Delete a process
	UpdateProcess(id string, config *app.Config) error           // Update a process
	StartProcess(id string) error                                // Start a process
	StopProcess(id string) error                                 // Stop a process
	RestartProcess(id string) error                              // Restart a process
	ReloadProcess(id string) error                               // Reload a process
	GetProcess(id string) (*app.Process, error)                  // Get a process
	GetProcessState(id string) (*app.State, error)               // Get the state of a process
	GetProcessLog(id string) (*app.Log, error)                   // Get the logs of a process
	GetPlayout(id, inputid string) (string, error)               // Get the URL of the playout API for a process
	Probe(id string) app.Probe                                   // Probe a process
	ProbeWithTimeout(id string, timeout time.Duration) app.Probe // Probe a process with specific timeout
	Skills() skills.Skills                                       // Get the ffmpeg skills
	ReloadSkills() error                                         // Reload the ffmpeg skills
	SetProcessMetadata(id, key string, data interface{}) error   // Set metatdata to a process
	GetProcessMetadata(id, key string) (interface{}, error)      // Get previously set metadata from a process
	SetMetadata(key string, data interface{}) error              // Set general metadata
	GetMetadata(key string) (interface{}, error)                 // Get previously set general metadata
}

The Restreamer interface

func New

func New(config Config) (Restreamer, error)

New returns a new instance that implements the Restreamer interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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