"Prefer hardware" is offered as a distinct choice and routes identically to Automatic #178

Open
opened 2026-09-02 02:15:23 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-09-02 02:15:23 +00:00 (Migrated from github.com)

"Prefer hardware" is offered as a distinct choice and routes identically to Automatic

ConversionRouter.kt:73-78:

when (request.enginePreference) {
    EnginePreference.FORCE_SOFTWARE -> return Decision(Engine.FFMPEG, Reason.USER_FORCED_SOFTWARE)
    else -> Unit
}

EnginePreference.PREFER_HARDWARE falls into else -> Unit, which is exactly what AUTO does.

Meanwhile ConverterScreen.kt:590-603 renders all three EnginePreference.entries in a picker,
labelled "Prefer hardware" — a real, selectable option that reads as different from
"Automatic".

ConversionRouterTest never constructs a request with PREFER_HARDWARE; only AUTO (by default)
and FORCE_SOFTWARE appear.

Why this is filed as a question rather than closed with a test

Both readings are defensible and the repo records neither:

  • If the identity is intentional — the control is aspirational, or "prefer" is honestly a no-op
    because the router already prefers hardware whenever it can — then the picker is offering a
    distinction that does not exist, and the fix is to the UI or the KDoc.
  • If it is a missed wiring, the fix is in the router.

A test written now would freeze whichever answer the author happened to assume, which is the failure
mode docs/coverage-read-findings.md names for F1 and F5. The decision comes first.

Related in shape: #68 (a KDoc promising a switch that does not exist) and F2 in
docs/coverage-read-findings.md.

## "Prefer hardware" is offered as a distinct choice and routes identically to Automatic `ConversionRouter.kt:73-78`: ```kotlin when (request.enginePreference) { EnginePreference.FORCE_SOFTWARE -> return Decision(Engine.FFMPEG, Reason.USER_FORCED_SOFTWARE) else -> Unit } ``` `EnginePreference.PREFER_HARDWARE` falls into `else -> Unit`, which is exactly what `AUTO` does. Meanwhile `ConverterScreen.kt:590-603` renders all three `EnginePreference.entries` in a picker, labelled **"Prefer hardware"** — a real, selectable option that reads as different from "Automatic". `ConversionRouterTest` never constructs a request with `PREFER_HARDWARE`; only `AUTO` (by default) and `FORCE_SOFTWARE` appear. ## Why this is filed as a question rather than closed with a test Both readings are defensible and the repo records neither: - If the identity is **intentional** — the control is aspirational, or "prefer" is honestly a no-op because the router already prefers hardware whenever it can — then the picker is offering a distinction that does not exist, and the fix is to the UI or the KDoc. - If it is a **missed wiring**, the fix is in the router. A test written now would freeze whichever answer the author happened to assume, which is the failure mode `docs/coverage-read-findings.md` names for F1 and F5. **The decision comes first.** Related in shape: **#68** (a KDoc promising a switch that does not exist) and F2 in `docs/coverage-read-findings.md`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMediaConverter#178