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
//! Library helpers used by the `direct_play_nice` CLI.
//!
//! This crate primarily ships a CLI binary. The public items here support
//! device-profile resolution and hardware probing used by that CLI.
//! For end-user usage, prefer the project manual in `docs/` (mdBook) and the
//! top-level `README.md`.
/// Streaming-device definitions and compatibility helpers.
/// Hardware acceleration detection and codec probing helpers.
/// Creates a sortable score tuple for primary-video selection.
///
/// The tuple order depends on `criteria`:
/// - `"resolution"` => `(area, bitrate, fps)`
/// - `"bitrate"` => `(bitrate, area, fps)`
/// - `"fps"` => `(fps, area, bitrate)`
/// - any other value defaults to the `"resolution"` order
///
/// # Examples
///
/// ```rust
/// let score = direct_play_nice::score_video("resolution", 1920, 1080, 8_000_000, 30000, 1001);
/// assert!(score.0 > 0);
/// ```