ffmpeg-v4l2-request-fourier: export ff_h264_set_mb_inspect_cb (0016 amend, PKGREL 15) #108
Reference in New Issue
Block a user
Delete Branch "claude-noether/marfrit-packages:noether/h264-mb-inspect-export-symbol"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug-fix to 0016 (originally merged in #106) so dlsym-based consumers can resolve the inspection callback symbol.
Problem
The 0016 patch declared
ff_h264_set_mb_inspect_cbinh264dec.hand defined it inh264_mb.c, but didn't touchlibavcodec/libavcodec.v. FFmpeg's default version script exports onlyav_*,avcodec_*,avpriv_*, andavsubtitle_free; everything else is hidden as LOCAL behind a*glob. Result:The static-link CLI consumer (
daedalus_decode_h264, built viaDAEDALUS_FFMPEG_PREFIX) was unaffected — static linking doesn't care about symbol visibility. The daedalus-v4l2 daemonshadow_decoderpath (daedalus-v4l2 PR-Q3a.1, merged today) dlopenslibavcodec.so.62and resolves the callback viadlsym— that needs the symbol exported.Observable: running the daemon with
DAEDALUS_SHADOW_MODE=1against the freshly-published release -14 still loggedlibavcodec lacks ff_h264_set_mb_inspect_cb (stock build, no daedalus-fourier 0016 patch) — shadow-mode unavailable. The symbol IS in the .so as LOCAL; the daemon just can't reach it.Fix
Add
ff_h264_set_mb_inspect_cbto the global list inlibavcodec/libavcodec.v. Single-line addition to the 0016 patch. Mirrored across thearch/+debian/patch trees.PKGREL bump 14 → 15, changelog entry added (debian side). PKGBUILD pkgrel bumped on arch side too. No behaviour change to the decode path: the callback is still opt-in via the
H264Contextfunction pointer; only consumers that have explicitly installed a callback pay the one-load-one-branch cost per MB.Verified
patch -p1 --dry-runagainst the kwiboo b57fbbe source tree applies cleanly across all three files (h264dec.h, h264_mb.c, libavcodec.v).nm -D /opt/fourier/lib/libavcodec.so.62 | grep ff_h264_set_mb_inspect_cbshould return aT(GLOBAL TEXT) entry, and the daemon's startup log should switch from "shadow-mode unavailable" toshadow_decoder: enabled (DAEDALUS_SHADOW_MODE=1, daedalus-decoder version 0.0.1).dejavu-check
Fixing the existing 0016 observation-hook to actually work as a dlsym intercept (the architectural shape the patch was designed for). NOT adding new per-kernel substitution. Same shape, same patch number, same intent. Just hiding/exporting plumbing.