refactor(encode): drop the crate-wide allow(dead_code)
Inherited from the pre-extraction host crate root as scaffolding for backend
paths defined ahead of the build that used them. A census across every feature
combination on both platforms (flip it to `warn`, rebuild) found it was hiding
exactly two items — so it bought nothing while blinding the crate to future rot:
- `vaapi::fourcc` — superseded by `pf_frame::drm_fourcc`; no call sites left.
- `vulkan_video::open_opts` — test-only (the smoke tests use it to pass the
RGB-direct request explicitly rather than through the env), now `#[cfg(test)]`.
Removing it surfaced a real latent defect the Linux census could not see:
`amf.rs`'s `percentile` / `drive_and_measure` helpers are used only by the
`#[cfg(feature = "amf-qsv")]` latency A/B benchmark, so a `--features nvenc,qsv`
build compiled the helpers with their caller gated out. They now carry the same
gate as their caller.
Verified `--all-targets -D warnings` on Linux (no features; shipped
nvenc+vulkan-encode+pyrowave) and Windows (no features; pyrowave; qsv; nvenc,qsv).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -524,7 +524,9 @@ impl VulkanVideoEncoder {
|
||||
/// `open` with the RGB-direct request explicit instead of read from the env — the smoke
|
||||
/// tests use this (env mutation races parallel tests). `want_rgb` engages the RGB-direct
|
||||
/// source only if [`probe_rgb_direct`] also passes; otherwise the session opens on the CSC
|
||||
/// path with the verdict logged.
|
||||
/// path with the verdict logged. Test-only: the production entry point is [`Self::open`],
|
||||
/// which resolves `want_rgb` from the env + the `cursor_blend` hint.
|
||||
#[cfg(test)]
|
||||
pub(crate) fn open_opts(
|
||||
codec: Codec,
|
||||
width: u32,
|
||||
|
||||
Reference in New Issue
Block a user