Media3Engine's two MIME tables are untested, and one carries a "never reached" claim nothing checks #85
Closed
opened 2026-08-25 03:21:52 +00:00 by JMR-dev
·
2 comments
No Branch/Tag Specified
main
fix/102-picker-back-press-overshoot
fix/268-saf-picker-determinism
feat/ogg-vorbis-libvorbis
feat/expedited-conversion-work
fix/gate-cache-in-worktrees
chore/gate-runs-shellcheck
test/publish-delete-arm-real-provider
docs/e8-instrumented-coverage
docs/api37-carrier-count-drift
docs/e7-second-constraint
test/publish-to-a-real-saf-destination
fix/api37-report-match-line
fix/api37-task-snapshot-crash
test/join-failure-message-on-device
docs/e2e-read-findings-e7
test/cancelling-a-running-export
test/reattach-to-a-running-job
test/content-uri-reaches-ffmpeg
fix/launcher-wiring-waits-for-the-pick
fix/cancel-tests-need-a-slower-encode
test/cancelling-a-running-join
test/cancelling-a-running-session
test/notification-cancel-action
test/ffmpeg-progress-is-observed
test/fallback-asserts-the-path
test/flac-and-opus-assert-their-format
docs/e2e-read-findings
docs/wave4-coverage-numbers
fix/injectable-startup-sweep-scope
test/session-outcome-seam
test/launcher-callback-identity
test/theme-follows-system-dark
test/audio-drop-arm
fix/rotation-waits-for-recreation
fix/convert-guards-on-ready
test/retry-save-mime
test/hardware-progress-reaches-workmanager
test/ffprobe-mapping-seam
test/device-codec-enumeration-seam
test/unknown-container-row
test/null-message-fallbacks
test/cancel-reaches-workmanager
docs/coverage-wave3-recovery
test/concat-engine-seam
docs/coverage-wave3
test/mediaprobe-merge-seam
test/adaptive-shell-wiring
test/aac-audio-args
test/notification-progress-text
test/media3-muxer-guard
test/hardware-fallback-and-cancellation
test/unprobeable-join-clip
test/one-branch-outcomes
test/foreground-type-regimes
fix/bound-wedge-diagnostics
docs/coverage-wave2
test/screen-wiring
test/viewmodel-setters
test/join-state-mapping
test/conversion-state-mapping
test/dedupe-user-messages
fix/restore-stack-merges
test/refused-jobs
test/concatworker-failure-arms
test/container-capabilities-audio
test/readspec-enum-fallbacks
test/outputpublisher-seams
test/mediaprobe-track-seam
test/outputpublisher-partial-branches
test/fake-provider-scaffolding
docs/coverage-read-findings
chore/gitignore-kotlin
test/bound-the-hangs
docs/coverage-remeasure
ci/baseline-counter-precision
fix/invalid-suggestion-chip
ci/wedged-leg-report
fix/reattachment-overwrites-pick
test/theme-live-branches
fix/failed-save-retry
fix/empty-composition-crash
ci/advisory-failure-report
docs/seven-run-counts
test/release-permission-guard
ci/build-workflow-permissions
docs/api37-point-release
docs/benchmark-populate-path
fix/dead-assertion-probe-test
ci/actionlint
test/device-codecs-encode-consequence
fix/sdkmanager-pipefail
docs/readme-restart-claim
fix/saf-picker-root-discovery
fix/probe-dispatcher-seam
test/media3engine-mime-tables
test/mediaprobe-pure-helpers
fix/codec-vocabulary-drift
docs/robolectric-rationale-correction
docs/api37-advisory-counts
test/r38-8-saf-e2e
test/r38-7-join-states
test/r38-6-conversion-states
test/r38-5-state-seam
fix/jacoco-robolectric-coverage
docs/instrumented-tests-correction
test/r38-2-filecard
test/r38-4-advanced-picker
test/r38-3-pickers
tools/file-issue-script
tools/api-37-emulator
fix/review-app-gaps
docs/review-corrections
No results found.
Labels
Clear labels
above-cut
accessibility
backlog
bug
confirmed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
plausible
question
sev:high
sev:low
sev:medium
wontfix
Worked autonomously overnight: local, JVM-verifiable, no product decision
Barrier affecting people with disabilities
Held for manual review: product/UX call, CI/workflow, hardware, or unverifiable here
Something isn't working
Reviewer demonstrated the defect
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
This doesn't seem right
Reviewer could not fully demonstrate it; treat as unproven
Further information is requested
High severity
Low severity
Medium severity
This will not be worked on
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: JMR-dev/LibreMediaConverter#85
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Filed from a coverage read on
ad28293.Media3Enginereports 0/38 on the JVM — and most of that is correct and should stay.Most of this is device-only and already covered where it can be
transcode,buildTransformer,pollProgress,closeand the constructor drive Media3'sTransformeragainst real codecs.androidTest/Media3EngineTestandRemuxTestexercise them on a device; JaCoCo measurestestDebugUnitTestonly, so their 0% is a measurement boundary, not a gap. Do not chase it, and do not mockTransformerto make a number move.Two pure lookups are the real gap
Enum-to-MIME tables with no device dependency at all.
private, so widening tointernalis the #57 precedent.And one of them carries a claim nothing checks:
That is an assertion about callers, sitting in a branch. If it is true, a test should say so; if it stops being true, nothing currently notices.
audioMimeTypeForcarries a sibling claim — that MP3 and FLAC have no Android encoder so the router sends them to FFmpeg — which is checkable againstConversionRouter.Done means
Both tables tested arm by arm, including every
nullarm, and the "never reached" claim either proved against the router's Encode plans or rewritten to say what is actually guaranteed.Mutation: point
VideoCodec.H265atMimeTypes.VIDEO_H264and the test goes red naming H.265.Related
The same codec vocabulary is written out in at least four places across this codebase and they have already drifted — see the ticket on
CodecNamesvsAndroidDeviceCodecs. Fixing this one in isolation is fine; just do not add a fifth table.Read #87 before writing these tests. The tables this ticket covers have already drifted from
CodecNames— five codec names resolve in one and not the other, in both directions.Testing this table arm-by-arm in isolation would encode the disagreement rather than catch it. #87 carries the comparison and the mutation that actually bites (add an alias to one table only, and the cross-check goes red).
#87 and #74 landed together in PR #90.
Media3Engine.ktis untouched — this ticket's file, leftalone deliberately — but the cross-check it should join now exists, and audio has no partner
table without it.
What is there to join:
app/src/test/java/org/libremediaconverter/codec/CodecVocabularyTest.ktcross-checksCodecNames.VIDEO_ALIASES(now aninternalmap, not awhen, precisely so a test canenumerate it) against
AndroidDeviceCodecs.NAME_TO_MIME, in both directions and on meaning aswell as membership.
AndroidDeviceCodecs.mimeFor(codec: VideoCodec): String?is nowinternal. That is the sameshape as
videoMimeTypeFor— enum to MIME — so the video half of this ticket is one assertion:for every
VideoCodec, the two must return the same MIME wherever both are non-null. Ifthey disagree, one of the engines is being asked for a codec the device check was asked about
under a different name.
The audio half is the gap #90 could not close.
CodecNames.AUDIO_ALIASESexists and isenumerable, but
AndroidDeviceCodecsis video-only, so there is no second audio table in themodule to compare it against.
audioMimeTypeForis that second table. Widening it tointernal(the JVM test source set is a friend of
main;MainActivity.kt:36-38carries the reasoning) iswhat makes an audio cross-check possible at all.
Please do not add a fifth table. The pattern #90 settled on, if it helps: one legitimate asymmetry
is listed rather than implied (
AndroidDeviceCodecs.DECODE_ONLY_NAMES = {"mpeg4"}— decodableinput with no
VideoCodecto name it), and the list is itself checked in both directions, becauseotherwise it is an escape hatch for the next divergence. Mutation-checked: adding
"x265"to itgoes red.