ffmpeg

package
v0.0.0-...-31c1c1e Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWrappedCollector

func NewWrappedCollector(prefix, reference string, collector session.Collector) session.Collector

Types

type Config

type Config struct {
	Binary           string
	MaxProc          int64
	MaxLogLines      int
	LogHistoryLength int
	ValidatorInput   Validator
	ValidatorOutput  Validator
	Portrange        net.Portranger
	Collector        session.Collector
}

Config is the configuration for ffmpeg that is part of the configuration for the restreamer instance.

type FFmpeg

type FFmpeg interface {
	New(config ProcessConfig) (process.Process, error)
	NewProcessParser(logger log.Logger, id, reference string) parse.Parser
	NewProbeParser(logger log.Logger) probe.Parser
	ValidateInputAddress(address string) bool
	ValidateOutputAddress(address string) bool
	Skills() skills.Skills
	ReloadSkills() error
	GetPort() (int, error)
	PutPort(port int)
	States() process.States
}

func New

func New(config Config) (FFmpeg, error)

type ProcessConfig

type ProcessConfig struct {
	Reconnect      bool
	ReconnectDelay time.Duration
	StaleTimeout   time.Duration
	Command        []string
	Parser         process.Parser
	Logger         log.Logger
	OnExit         func()
	OnStart        func()
	OnStateChange  func(from, to string)
}

type Validator

type Validator interface {
	// IsValid tests whether a text matches any expression of inputs
	IsValid(text string) bool
}

The Validator interface is for validating strings whether they are eligible as input or output for a ffmpeg process

func NewValidator

func NewValidator(allow, block []string) (Validator, error)

NewValidator creates a new Validator with the given input and output expressions. Empty expressions will be ignored. Returns an error if an expression can't be compiled.

Directories

Path Synopsis
Package skills provides an easy way to find out which codec, de/muxers, filters, and formats ffmpeg supports and which devices are available for ffmpeg on the system.
Package skills provides an easy way to find out which codec, de/muxers, filters, and formats ffmpeg supports and which devices are available for ffmpeg on the system.

Jump to

Keyboard shortcuts

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