Skip to main content

Module engine

Module engine 

Source
Expand description

The compression engine contract and shared types.

Key architectural decision: core is designed around the Engine interface even while there is exactly one engine (media/ffmpeg). This lets us plug in images/PDF/office later without rewriting the skeleton.

Principle: Engine::plan is a pure, testable function (bitrate math); side effects are isolated in Engine::run.

Modules§

media
Media engine v0.1: video + audio via ffmpeg (external process).

Structs§

AudioSpec
Audio encoding parameters (absent means drop the track).
EncodePlan
The encode plan — the result of Engine::plan. Usable for --dry-run.
EncodeSpec
The full encode recipe.
MediaInfo
Source file metadata — the result of Engine::probe.
Outcome
The execution result — the result of Engine::run.
ShrinkOpts
Compression options passed to the engine — the decoded form of the flags.
VideoSpec
Video encoding parameters.

Enums§

EngineError
Engine errors.
SizeGoal
What the user wants in terms of size.

Traits§

Engine
The compression engine contract. The one v0.1 implementation is media::MediaEngine.