Add media-info-wdx: media-metadata content plugin (WDX)#11
Merged
Conversation
A native Double Commander WDX content plugin that surfaces per-file media metadata as custom-column / tooltip fields, so image/video resolution, audio/ video duration, and PDF page count are visible directly in the file listing (filling a gap: the bundled MacPreview/QuickLook never shows pixel dimensions). - Fields: adaptive Summary plus Dimensions, Width, Height, Megapixels, DPI, bit depth, Duration (+ sortable seconds), frame rate, bitrate, sample rate, channels, video/audio codec, PDF page count, plugin version. Empty for files a field doesn't apply to, so one column serves every type. - Backends are all macOS system frameworks (ImageIO header reads, AVFoundation, CoreGraphics/CGPDF) — no third-party libraries, no network. AVI is read with a self-contained RIFF avih parser since AVFoundation can't open it on macOS. - Robust under DC's Lazarus/FPC runtime, which enables FP-exception traps: the plugin masks FP exceptions around every framework call and restores the host environment, fixing an "Access violation" crash triggered by ImageIO's RAW/ MakerNote path on camera JPEGs (root-caused deterministically). - Non-blocking: AVFoundation path honors CONTENT_DELAYIFSLOW; values cached per path+mtime. Universal (arm64 + x86_64), ad-hoc signed. - Real-artifact harness dlopens the built .wdx and asserts field values against a synthesized PNG/PDF/WAV/AVI, the deferral protocol, and survival under FPC-style FP-exception traps (26/26). CI builds + runs it headlessly; release workflow on media-info-wdx-v* tags. Pre-commit hook builds + verifies its ABI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Code-review follow-up. ContentGetValue previously returned ft_numeric_32 / ft_numeric_floating even when maxlen was smaller than the value width (so it skipped the store but still claimed success, leaving DC to read a stale buffer). Return ft_fieldempty in that case. Latent in practice (DC always passes an adequate buffer) but the ABI contract is now correct. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Adds
media-info-wdx, a native macOS Double Commander WDX content plugin that surfaces per-file media metadata as custom-column / tooltip fields — so image & video resolution, audio & video duration, and PDF page count are visible right in the file listing. This fills a real gap: the bundled MacPreview/QuickLook previews images but never shows pixel dimensions, and DC ships no image/video content plugin on macOS.Motivated by a concrete friction (needing image resolution without dropping to XnView), generalized to a single adaptive column across media types.
Changes
media-info-wdx/(source, ABI header, build/install/registrar, real-artifact test harness, README, third-party manifest).Summary(image→W × H, video→W × H · m:ss, audio→m:ss, pdf→N pages) plus Dimensions, Width, Height, Megapixels, DPI, Bit depth, Duration (+ sortable seconds), Frame rate, Bitrate, Sample rate, Channels, Video/Audio codec, Page count, Plugin version. Empty for non-applicable files, so one column serves every type.avihparser (AVFoundation can't open AVI on macOS).READMEtable + layout,CHANGELOG, CI (build + headless harness), release workflow (media-info-wdx-v*), and the pre-commit hook all extended for the new plugin.Two host-dependent bugs found & fixed during live testing in real DC
doublecmd.xml;register_plugin.pywas missingAVI(a substring check had been fooled byAVIF). Fix: add AVI to the registrar and verify the exact(EXT="AVI")clause.Verification
./build.sh→ universal (arm64 + x86_64), ad-hoc signed; all 6 WDX exports presentdlopens the built.wdxand asserts field values on a synthesized PNG/PDF/WAV/AVI, theCONTENT_DELAYIFSLOWdeferral protocol, and survival under FPC-style FP-exception traps — 26/26 PASS (CI runs it headlessly)bash scripts/leak-guard.shclean/code-reviewrun by a fresh reviewer (not the author): no Critical/High; one Low contract nit (numeric return when buffer too small) fixed in a follow-up commit🤖 Generated with Claude Code