Skip to content

Real cores enumerate real capture devices only (#739) - #755

Merged
iamfatness merged 2 commits into
mainfrom
fix/739-fake-capture-stub-only
Oct 2, 2026
Merged

iamfatness merged 2 commits into
mainfrom
fix/739-fake-capture-stub-only

Conversation

@iamfatness

Copy link
Copy Markdown
Owner

Fixes #739

Problem

createDefaultModules() carried the stub tier's FakeCaptureDevice into every build as the first member of the capture composite:

  • a "connected" DeckLink Mini Recorder 4K and a "detected" AJA Io 4K Plus that do not exist
  • a 640x360 test-pattern frame generated for capture:decklink-1 on every capture tick
  • hidden in the WinUI shell only by an id-prefix filter (MapCoreOwnedCaptureDevice); the mac shell lists the core's devices unfiltered, so it showed them

Change

  • The fake pair is added to the composite only under COREVIDEO_STUB.
  • A non-stub core starts from an empty NoCaptureDevice (MediaCore dereferences captureDevice without a null check) and holds whatever real adapters construct.
  • Two tests that exercised capture controls through a default core now use createStubModules(); a new test pins the rule in both tiers.

Verification

  • Local dev (non-stub, D3D11) build: full native suite 1,375 pass.
  • Live: the built corevideo-native.exe answered list-capture-devices with 17 real devices on this machine (6 UVC, 4 displays, 7 windows) and no decklink-1 / aja-io-1.
  • Not run inside the WinUI app.

The #739 BACKLOG row is removed in the follow-up PR for #742 to avoid a conflict with #753.

🤖 Generated with Claude Code

claude added 2 commits October 2, 2026 15:48
… pair is stub-tier (#739)

createDefaultModules() carried the stub's FakeCaptureDevice into every build as
the first member of the capture composite: a 'connected' DeckLink Mini Recorder
4K and an AJA Io 4K Plus that do not exist, with a 640x360 test pattern
generated on every capture tick. The WinUI shell hid them with an id-prefix
filter; the mac shell listed them.

The fake pair is now added only under COREVIDEO_STUB. A non-stub core starts
from an empty device (MediaCore dereferences captureDevice without a null
check) and holds whatever real adapters construct.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The range-for walked captureDevices().asArray() on a temporary that was already
destroyed, so the test read freed memory: it failed in the stub tier and passed
vacuously in the real build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iamfatness
iamfatness merged commit d55a0d3 into main Oct 2, 2026
17 checks passed
@iamfatness
iamfatness deleted the fix/739-fake-capture-stub-only branch October 2, 2026 21:14
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.

Production core registers FakeCaptureDevice (fake DeckLink / AJA) in every build

2 participants