Skip to content

Audio dialog: offer only containers that hold the video codec too (task #132) - #285

Merged
StuartCameronCode merged 1 commit into
mainfrom
stuart/132-audio-compatibility-dialog-offers-contai
Nov 28, 2026
Merged

StuartCameronCode merged 1 commit into
mainfrom
stuart/132-audio-compatibility-dialog-offers-contai

Conversation

@StuartCameronCode

Copy link
Copy Markdown
Owner

Summary

The Passthrough audio dialog's "Change container format" option listed every container that could copy the sound, whatever the video codec. That included pairs the worker refuses: AV1 in MOV/AVI, and v210 or ProRes in MP4. It now offers only containers that copy the sound and are offered for the selected video codec. Both checks read the generated output-capabilities table and nothing restates it.

  • AudioCompatibilityService.compatibleContainers(codec, videoCodec) combines the audio copy table with the video verdict. MainWindow passes the job's codec.
  • The refusal text's "save as" list (copyProblem in Dart, audio_copy_problem in Rust) leaves out containers the video codec isn't offered in. The worker passes the job's codec, so the app and the worker word it the same way. Calls that pass no codec keep the old wording.
  • When no container holds both (e.g. WavPack + ProRes), the container option is hidden and the "save as" clause is dropped.
  • The dialog fixes an existing bug: the pre-selected first chip could never be picked, because a selected ChoiceChip reports a tap as onSelected(false). Chips now start unselected and pick their container on any tap.
  • The dialog's subtitle now says the container holds both the audio and the video codec. CLAUDE.md's "Output capabilities" section records the rule.

Found by task #131's in-app docs audit; this is task #132.

Testing

  • New app/test/audio_compatibility_containers_test.dart:
    • sweeps VideoCodec.values × copy codecs × containers
    • checks the cases named above (AV1 + PCM_U8 → MKV only, v210 + Opus → MKV only, WavPack + ProRes → none)
    • checks the refusal wording
    • two widget tests cover the chips, the text, the popped result, and the no-container case
  • New Rust test sweeps VideoCodec::ALL × ContainerFormat::ALL × codecs over audio_copy_problem.
  • Run locally:
    • cargo test (all green)
    • Flutter push gate (--exclude-tags heavy,gpu, green)
    • the heavy copy-refusal conformance case
    • in review: the targeted Flutter tests, cargo test --lib output_capabilities and flutter analyze on the changed files

🤖 Generated with Claude Code

…132)

The Passthrough audio dialog's "Change container format" listed every
container that could copy the sound, ignoring the video codec, so AV1 could
be switched into MOV/AVI and v210/ProRes/HuffYUV into MP4, pairs the worker
refuses. The service now filters by the video codec's verdict (offered) as
well as the audio copy table, and the refusal's "save as" list does the same
on both sides (Dart copyProblem, Rust audio_copy_problem take the codec).

Also fixes the dialog's chips: the first container was pre-selected, and a
selected ChoiceChip reports a tap as onSelected(false), so it could never be
picked. Each chip now pops on any tap.

Tests sweep VideoCodec x copy codec x container, pin named table cases and
pump the dialog; the Rust test sweeps the message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@StuartCameronCode
StuartCameronCode merged commit eb1d0d9 into main Nov 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant