mediaproc

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package mediaproc runs bounded media tools and owns their entire process tree.

Index

Constants

View Source
const (
	ProbeTimeout  = 30 * time.Second
	EncodeTimeout = 15 * time.Minute
)

Variables

This section is empty.

Functions

func Own

func Own(*exec.Cmd) (func(), error)

func Prepare

func Prepare(cmd *exec.Cmd)

func PrepareGuardian

func PrepareGuardian(cmd *exec.Cmd)

PrepareGuardian additionally ties Linux parent death to the guardian's locked OS thread. Ordinary Go callers must not use Pdeathsig: scheduler threads can retire.

func Stop

func Stop(cmd *exec.Cmd)

Types

type Cmd

type Cmd struct {
	*exec.Cmd
	// contains filtered or unexported fields
}

Cmd preserves os/exec's streaming pipes while adding a deadline and tree cleanup. Callers must Wait after a successful Start, including on read/parse errors.

func CommandContext

func CommandContext(parent context.Context, timeout time.Duration, name string, args ...string) *Cmd

func (*Cmd) CombinedOutput

func (c *Cmd) CombinedOutput() ([]byte, error)

func (*Cmd) Output

func (c *Cmd) Output() ([]byte, error)

func (*Cmd) Run

func (c *Cmd) Run() error

func (*Cmd) Start

func (c *Cmd) Start() error

func (*Cmd) Wait

func (c *Cmd) Wait() error

Jump to

Keyboard shortcuts

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