worker

package
v0.0.0-...-d0fda0e Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package worker provides types and utilities for parallel chunk encoding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncodeResult

type EncodeResult struct {
	ChunkIdx int
	Frames   int
	Size     uint64
	Error    error
}

EncodeResult contains the result of encoding a single chunk.

type Progress

type Progress struct {
	ChunksComplete int
	ChunksTotal    int
	FramesComplete int
	FramesTotal    int
	BytesComplete  uint64
	ActiveWorkers  int
	TargetWorkers  int
	MaxWorkers     int

	// InFlight is the number of chunks currently being worked on. In
	// target-quality mode a chunk stays in flight while it probes and scores,
	// even when its encode slot is released, so InFlight exceeds ActiveWorkers.
	// In fixed-CRF mode work is slot-bound, so InFlight equals ActiveWorkers.
	InFlight int

	// EncodeSlotWaitSeconds is the cumulative wall time workers have spent
	// blocked waiting to acquire an encode slot. It is monotonic across the
	// encode and aggregated over all workers, so it is a measure of slot
	// starvation, not a per-worker latency.
	EncodeSlotWaitSeconds float64
}

Progress represents encoding progress information.

func (Progress) Percent

func (p Progress) Percent() float64

Percent returns the completion percentage.

Jump to

Keyboard shortcuts

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