Skip to content

Ergonomics and usability - #13

Merged
sbokatuk merged 6 commits into
mainfrom
ergonomics-and-usability
Jul 24, 2026
Merged

Ergonomics and usability#13
sbokatuk merged 6 commits into
mainfrom
ergonomics-and-usability

Conversation

@sbokatuk

Copy link
Copy Markdown
Owner

No description provided.

sbokatuk and others added 4 commits July 24, 2026 09:53
FetchJars.sh previously trusted TLS alone: no digest check on ~217 MB of
native code that gets linked into consumers' apps, even though the iOS and
Mac repos treat a checksum mismatch as fatal. Every download is now verified
against build/checksums/<ffmpegkit version>.sha256 before it replaces
anything, and --verify re-checks files already on disk (CI runs it on cache
hits, so a stale or poisoned cache fails the build instead of getting packed).

Baselines are recorded once per upstream line by build/update-checksums.sh,
preferring Maven Central's .sha256 sidecars over locally computed hashes; all
three published lines (6.0.3, 7.1.6, 8.1.7) are recorded, and the 8.1.7
digests match the .aars the green e2e runs used.

Also folded in:
- smart-exception version now lives once in Directory.Build.props
  (SmartExceptionVersion); the csproj and FetchJars.sh both read it, closing
  the one spot in the pipeline where versions could silently drift.
- curl --retry 3 on all fetches, so a transient blip no longer aborts the run.
- NativeVersionMapTests no longer hardcodes the mapping row count (adding a
  line used to fail CI until the test was edited); instead a new test requires
  every native-versions.tsv row to have a complete checksum baseline, which is
  the invariant that actually matters.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A consuming app that includes 32-bit RuntimeIdentifiers builds, packages and
installs without complaint, then crashes loading libffmpegkit.so on 32-bit
devices - the .aar simply has no armeabi-v7a/x86 libraries to miss at build
time. Every package now ships a build/buildTransitive .targets file that
warns from the consuming app's own build:

- FFMPEGKIT001: SupportedOSPlatformVersion below 24. The manifest merger
  already hard-errors on this (the .aar declares minSdk 24), but with a
  java-worded AMM0000; this precedes it with an actionable .NET message,
  and still fires when the merge error is silenced via tools:overrideLibrary.
- FFMPEGKIT002: 32-bit Android runtime identifiers in the build.

Warnings, not errors - an app may gate FFmpegKit calls at runtime - each
suppressible individually via NoWarn. Hooked BeforeTargets=PrepareForBuild
(BeforeTargets=Build would run after the failing packaging chain) and gated
to the RID-agnostic pass so multi-ABI builds warn once, not once per ABI.
Verified against a scratch app consuming the packed nupkg: both warnings
fire ahead of the AMM0000 error at minSdk 21, FFMPEGKIT002 alone with a
succeeding build at minSdk 24, and a package-layout test now pins the file's
presence in both build/ and buildTransitive/ for all eight variants.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The binding project ships with Nullable disabled because the generated
surface has no annotations, which also stripped them from the hand-written
Additions - the part of the API consumers touch most. Every Additions file
now opts in with #nullable enable; MediaValues' parsers take nullable
inputs, matching the Java strings and boxed Longs that actually arrive.

Clearing the global callbacks previously required knowing the magic
incantation EnableLogCallback((ILogCallback)null!) - the delegate overloads
deliberately reject null. DisableLogCallback()/DisableStatisticsCallback()
say the same thing by name; the device tests now use them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The quickstart showed bare FFmpegKit.Execute(...) with the namespace-shadowing
caveat explained only in the migration section further down - both first-party
consumers hit exactly that collision. The hint now sits at the point of use.
The two badge anchors pointed at headings that do not exist (#packages,
#licence); curated notes cover the next binding revision.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
sbokatuk and others added 2 commits July 24, 2026 11:56
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The iOS sample demonstrates cancelling a running command; this one did not,
despite the binding carrying the same CancellationToken support. Cancel
button + token wiring, and a cancelled run now reports as cancelled rather
than as a failure.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sbokatuk
sbokatuk merged commit ecd53a9 into main Jul 24, 2026
6 checks passed
@sbokatuk
sbokatuk deleted the ergonomics-and-usability branch July 24, 2026 09:44
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