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
//! Encoder capability probe.
//!
//! Mirrors `mediaway-device`'s
//! [ADR-0003](../../mediaway-device/adr/0003-capability-and-permission-probe.md): ask
//! "would this backend work" without the app having to interpret an [`crate::EncodeError`]
//! from a real `AutoVideoEncoder` (`mediaway-encoder-windows/src/auto.rs`) open.
//! Platform crates implement `support(codec) -> Vec<EncoderCapability>`
//! (`mediaway_encoder_windows::auto::support` today); `mediaway::platform`
//! dispatches it the same way it dispatches `AutoEncoder::open`.
use crate;
/// Default probe width for [`crate::windows::auto::support`] and
/// [`crate::windows::auto::support_at`]'s convenience wrapper.
///
/// **Hardware encoders have minimum dimensions, so a probe resolution is part of the
/// question, not an implementation detail.** This value is not "small and cheap" — it is
/// the smallest round size measured to clear every backend's minimum. An earlier 64×64
/// fixture made NVENC report [`EncodeUnavailable::NoDevice`] on an RTX 4090 that encodes
/// AV1 and H.264 fine; measured 2026-09-18, `Explicit(Nvenc)` fails at 64×64 and 128×128
/// and succeeds at 256×256 and 1920×1080. See
/// `adr/0005-resolution-aware-capability-probe.md`.
///
/// A caller that knows its real capture size should pass it to
/// [`crate::windows::auto::support_at`] instead of trusting this default: support at
/// 256×256 does not imply support at 7680×4320.
pub const DEFAULT_PROBE_WIDTH: u32 = 256;
/// Default probe height — see [`DEFAULT_PROBE_WIDTH`].
pub const DEFAULT_PROBE_HEIGHT: u32 = 256;
/// Why a [`Backend`] is not usable for a codec on this machine right now.
/// Live availability of a [`Backend`] for a codec, measured on this machine right now —
/// not just "was this compiled in".
/// One row of "what encoding this codec could look like on this machine right now" —
/// the data behind a settings dropdown entry.