app

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AVstream

type AVstream struct {
	Input       AVstreamIO
	Output      AVstreamIO
	Aqueue      uint64
	Queue       uint64
	Dup         uint64
	Drop        uint64
	Enc         uint64
	Looping     bool
	Duplicating bool
	GOP         string
}

type AVstreamIO

type AVstreamIO struct {
	State  string
	Packet uint64
	Time   uint64
	Size   uint64
}

type Config

type Config struct {
	ID             string     `json:"id"`
	Reference      string     `json:"reference"`
	Input          []ConfigIO `json:"input"`
	Output         []ConfigIO `json:"output"`
	Options        []string   `json:"options"`
	Reconnect      bool       `json:"reconnect"`
	ReconnectDelay uint64     `json:"reconnect_delay_seconds"` // seconds
	Autostart      bool       `json:"autostart"`
	StaleTimeout   uint64     `json:"stale_timeout_seconds"` // seconds
	LimitCPU       float64    `json:"limit_cpu_usage"`       // percent
	LimitMemory    uint64     `json:"limit_memory_bytes"`    // bytes
	LimitWaitFor   uint64     `json:"limit_waitfor_seconds"` // seconds
}

func (*Config) Clone

func (config *Config) Clone() *Config

type ConfigIO

type ConfigIO struct {
	ID      string            `json:"id"`
	Address string            `json:"address"`
	Options []string          `json:"options"`
	Cleanup []ConfigIOCleanup `json:"cleanup"`
}

func (ConfigIO) Clone

func (io ConfigIO) Clone() ConfigIO

type ConfigIOCleanup

type ConfigIOCleanup struct {
	Pattern       string `json:"pattern"`
	MaxFiles      uint   `json:"max_files"`
	MaxFileAge    uint   `json:"max_file_age_seconds"`
	PurgeOnDelete bool   `json:"purge_on_delete"`
}

type Log

type Log struct {
	LogHistoryEntry
	History []LogHistoryEntry
}

type LogEntry

type LogEntry struct {
	Timestamp time.Time
	Data      string
}

type LogHistoryEntry

type LogHistoryEntry struct {
	CreatedAt time.Time
	Prelude   []string
	Log       []LogEntry
}

type Probe

type Probe struct {
	Streams []ProbeIO
	Log     []string
}

type ProbeIO

type ProbeIO struct {
	Address string

	// General
	Index    uint64
	Stream   uint64
	Language string
	Format   string
	Type     string
	Codec    string
	Coder    string
	Bitrate  float64 // kbit/s
	Duration float64

	// Video
	Pixfmt string
	Width  uint64
	Height uint64
	FPS    float64

	// Audio
	Sampling uint64
	Layout   string
	Channels uint64
}

type Process

type Process struct {
	ID        string  `json:"id"`
	Reference string  `json:"reference"`
	Config    *Config `json:"config"`
	CreatedAt int64   `json:"created_at"`
	Order     string  `json:"order"`
}

func (*Process) Clone

func (process *Process) Clone() *Process

type ProcessStates

type ProcessStates struct {
	Finished  uint64
	Starting  uint64
	Running   uint64
	Finishing uint64
	Failed    uint64
	Killed    uint64
}

func (*ProcessStates) Marshal

func (p *ProcessStates) Marshal(s process.States)

type Progress

type Progress struct {
	Input     []ProgressIO
	Output    []ProgressIO
	Frame     uint64
	Packet    uint64
	FPS       float64
	PPS       float64
	Quantizer float64
	Size      uint64 // bytes
	Time      float64
	Bitrate   float64 // bit/s
	Speed     float64
	Drop      uint64
	Dup       uint64
}

type ProgressIO

type ProgressIO struct {
	ID      string
	Address string

	// General
	Index   uint64
	Stream  uint64
	Format  string
	Type    string
	Codec   string
	Coder   string
	Frame   uint64
	FPS     float64
	Packet  uint64
	PPS     float64
	Size    uint64  // bytes
	Bitrate float64 // bit/s

	// Video
	Pixfmt    string
	Quantizer float64
	Width     uint64
	Height    uint64

	// Audio
	Sampling uint64
	Layout   string
	Channels uint64

	// avstream
	AVstream *AVstream
}

type State

type State struct {
	Order     string        // Current order, e.g. "start", "stop"
	State     string        // Current state, e.g. "running"
	States    ProcessStates // Cumulated process states
	Time      int64         // Unix timestamp of last status change
	Duration  float64       // Runtime in seconds since last status change
	Reconnect float64       // Seconds until next reconnect, negative if not reconnecting
	LastLog   string        // Last recorded line from the process
	Progress  Progress      // Progress data of the process
	Memory    uint64        // Current memory consumption in bytes
	CPU       float64       // Current CPU consumption in percent
	Command   []string      // ffmpeg command line parameters
}

Jump to

Keyboard shortcuts

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