Skip to main content

deepshrink_core/
lib.rs

1//! `deepshrink-core` — the pure, testable core of DeepShrink.
2//!
3//! No I/O side effects: size/preset parsing, file-type detection and the engine
4//! contract (`Engine`). The heavy lifting (invoking ffmpeg) happens in a
5//! concrete engine's `run` layer; here we keep the math and types, unit-tested.
6#![forbid(unsafe_code)]
7
8pub mod budget;
9pub mod detect;
10pub mod engine;
11pub mod options;
12pub mod size;
13
14pub use detect::{detect_kind, MediaKind};
15#[cfg(feature = "ffmpeg")]
16pub use engine::media::MediaEngine;
17pub use engine::{not_worth_it, MIN_SAVING};
18pub use engine::{
19    AudioSpec, CaptureMeta, EncodePlan, EncodeSpec, Engine, EngineError, Hdr, MediaInfo, Outcome,
20    ShrinkOpts, SizeGoal, VideoSpec,
21};
22pub use options::{AudioChoice, AudioCodec, FpsOpt, QualityPreset, ResolutionOpt, VideoCodec};
23pub use size::{parse_percent, parse_size, preset, Preset, SizeError};