engine

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: GPL-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package engine coordinates bounded DVD menu inventory, navigation-state discovery, exact FFmpeg background decoding, and Go subpicture composition.

Index

Constants

View Source
const (
	// Version identifies the bundled pure-Go DVD menu engine implementation.
	Version = "phase0a-1"
	// DefaultMaxMenuItems is the default selected-screen limit.
	DefaultMaxMenuItems = graph.DefaultMaxItems
	// DefaultProcessTimeout bounds each FFmpeg probe or frame operation.
	DefaultProcessTimeout = 30 * time.Second
)

Variables

View Source
var ErrCapture = errors.New("DVD menu capture failed")

ErrCapture identifies invalid setup or a failed DVD menu capture stage.

View Source
var ErrLiveState = errors.New("DVD menu live state unavailable")

ErrLiveState identifies missing, invalid, or unresolvable menu VOB/NAV/SPU state.

Functions

This section is empty.

Types

type Capture

type Capture struct {
	// Coordinate is the exact inventory location rendered by FFmpeg.
	Coordinate graph.Coordinate
	// Discovery records whether navigation or structural inventory found the screen.
	Discovery graph.Discovery
	// Image is the owned composed menu frame.
	Image *image.NRGBA
	// HasOverlay reports that decoded SPU state was composited.
	HasOverlay bool
	// HasHighlight reports that a selected-button highlight was composited.
	HasHighlight bool
}

Capture is one composed, non-black menu screen and its engine coordinate.

type Options

type Options struct {
	// Traversal controls deterministic graph discovery and selection limits.
	Traversal graph.Options
	// Scan controls bounded NAV and subpicture reads for each menu cell.
	Scan nav.CellScanOptions
	// ProcessTimeout bounds each FFmpeg probe and frame decode; zero uses the default.
	ProcessTimeout time.Duration
	// Deinterlace enables frame deinterlacing before SPU composition.
	Deinterlace bool
	// Capability reuses a prior successful FFmpeg probe when non-nil.
	Capability *render.Capability
	// Progress receives synchronous path-free phase and counter updates.
	Progress func(Progress)
	// Logger receives optional path-free discovery and rendering diagnostics.
	Logger graph.Logger
}

Options bound traversal, menu-VOB scanning, and each FFmpeg operation.

type Progress

type Progress struct {
	// Phase is discovering or capturing.
	Phase string
	// Inventoried is the number of structural menu programs.
	Inventoried int
	// VisitedStates is the number of distinct VM states evaluated.
	VisitedStates int
	// VisitedButtons is the number of button commands evaluated.
	VisitedButtons int
	// Captured is the number of composed non-black frames retained.
	Captured int
	// Warnings is the number of distinct coverage warnings.
	Warnings int
}

Progress reports the current engine phase and bounded capture counters.

type Result

type Result struct {
	// EngineVersion identifies the engine implementation that produced the result.
	EngineVersion string
	// Capability is the successful path-free FFmpeg probe result.
	Capability render.Capability
	// Captures contains composed non-black menu frames in selection order.
	Captures []Capture
	// Inventoried is the number of structural menu programs.
	Inventoried int
	// Selected is the number of distinct screens selected for rendering.
	Selected int
	// VisitedStates is the number of distinct VM states evaluated.
	VisitedStates int
	// VisitedButtons is the number of button commands evaluated.
	VisitedButtons int
	// Complete reports that every selected screen rendered without coverage warnings.
	Complete bool
	// Partial reports incomplete discovery, live-state, or rendering coverage.
	Partial bool
	// Truncated reports that the traversal item limit excluded eligible screens.
	Truncated bool
	// Warnings contains deduplicated path-free coverage diagnostics.
	Warnings []graph.Warning
}

Result reports capture output and bounded coverage state without local paths.

func CaptureDirectory

func CaptureDirectory(ctx context.Context, root string, runner render.Runner, executable string, opts Options) (Result, error)

CaptureDirectory inventories and captures menus from an extracted VIDEO_TS directory. The caller controls the FFmpeg executable and process runner. It returns partial counters and warnings when discovery or rendering fails.

Jump to

Keyboard shortcuts

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