1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
//! Show an image or a video on a specific monitor — or on a specific
//! quadrilateral of one — without FFmpeg and without a codec anyone charges
//! for.
//!
//! ```text
//! file.mp4 ──demux──▶ H.264 ──platform decode──▶ ┌─────────┐ ──▶ GPU ──▶ corner-pinned quad
//! │ Frame │ on monitor 2
//! file.webm ─demux──▶ AV1 ──────software────────▶ │ (YUV + │
//! │ colour)│ ──▶ AV1 out (transcode)
//! image.png ──────────────image─────────────────▶└─────────┘
//! ```
//!
//! # What this is for
//!
//! Putting a picture where you want it: on the second monitor, in a rectangle
//! of the third, or into four arbitrary corners because the projector is not
//! square to the wall. [`geometry::Quad`] is that last one, and it is
//! perspective-correct — see its documentation for why the obvious
//! implementation leaves a crease down the diagonal.
//!
//! Audio is deliberately absent. `atome` is the audio engine; a player here
//! slaves its clock to one (see [`clock`]) rather than opening a device.
//!
//! # Royalty-free, which is a design constraint rather than a preference
//!
//! vtome *writes* AV1 and VP9, both AOMedia/Google royalty-free. It never
//! writes H.264 or HEVC. It *reads* them through the decoder the operating
//! system already ships and already licensed — VideoToolbox, Media Foundation,
//! MediaCodec, VA-API — which is also the fastest path, since those are the
//! hardware decoders. [`identify::Encoding::is_royalty_free`] is the same rule
//! in code.
//!
//! # Everything heavy is optional
//!
//! A build that only decodes frames and hands them to somebody else's renderer
//! must not compile a windowing library, a GPU abstraction, or a C toolchain.
//!
//! | Feature | What it adds |
//! |---|---|
//! | `demux` | MP4 and Matroska/WebM parsing (pure Rust) |
//! | `image` | Still images |
//! | `render` | GPU presentation via wgpu — a surface, not a window |
//! | `window` | `render` plus winit, so vtome opens its own windows |
//! | `embed` | `render` against a surface someone else owns — the Tauri path |
//! | `decode-*` | One decoder backend each |
//! | `encode-av1`, `mux`, `transcode` | Writing AV1 into WebM |
//!
//! # A first look
//!
//! ```no_run
//! use vtome::{identify, Placement, MonitorSelector};
//!
//! // What is this file, really? The extension is a claim; the bytes are not.
//! let container = identify::identify_path("clip.mp4")?;
//! println!("{container}");
//!
//! // Second monitor, top-left quarter of it.
//! let placement = Placement::new(MonitorSelector::Index(1))
//! .area(vtome::geometry::Rect::from_size(960.0, 540.0));
//! # Ok::<(), vtome::Error>(())
//! ```
pub use ;
pub use ColorSpace;
pub use Decoder;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use load_image;