fix: stop repeated Windows camera resource allocation - #2248
Merged
richiemcilroy merged 2 commits intoSep 8, 2026
Merged
Conversation
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
richiemcilroy
merged commit Sep 8, 2026
5cccfae
into
codex/desktop-release-readiness
18 of 20 checks passed
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.
GPUI's camera picker refreshes every two seconds. Each refresh previously reopened every camera to inspect its formats, reintroducing the native resource pressure behind #2214 even after the identity-enumeration fix in #2143. This follow-up to #2219 reuses capability metadata for unchanged connected cameras and queries new devices after an observed reconnect. Failed probes are retried explicitly from the format chooser; Automatic stays available, and a late background result cannot erase a successful retry. Delayed query results also validate the full device identity before updating capabilities or displaying choices.
Format-only Windows queries now retire their temporary Media Foundation sources after collecting formats. Capture ownership and asynchronous stop behavior remain unchanged. Debug formatting no longer opens cameras. The existing leak example also covers MF/DirectShow format probes and rejects runs without a usable camera.
Validation: 19 focused GPUI tests passed; root and GPUI formatting, scoped camera checks/Clippy on macOS, GPUI test compilation, and compilation of the isolated PR snapshot passed. A Windows cross-check on macOS stopped in ring because Windows SDK headers are unavailable. Native Windows handle/thread/private-memory soaks, capture after format-query shutdown, and camera reconnect/permission tests are still required before release.
Stacked on #2219 so this PR contains only the five-file amendment. Related to #2214; not a claim of completed Windows release validation.
The PR appears safe to merge; the asynchronous capability result now validates the full camera identity and no new actionable defect was identified.
Summary