Skip to content

Switch Windows capture to upstream windows-capture 2.0.1 - #277

Merged
bquenin merged 1 commit into
mainfrom
chore/upstream-windows-capture
Oct 25, 2026
Merged

bquenin merged 1 commit into
mainfrom
chore/upstream-windows-capture

Conversation

@bquenin

@bquenin bquenin commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace the windows-capture-interpreter fork with upstream windows-capture>=2.0.1. The fork only existed to carry the window_hwnd parameter while feat(python): add window_hwnd parameter for HWND-based capture NiiightmareXD/windows-capture#185 was pending; that PR merged and shipped in 2.0.
  • No code changes needed in WindowsCaptureStream: the upstream Python API is identical (WindowsCapture(window_hwnd=...), Frame.crop, frame_buffer, start_free_threaded), and the stream already copies the frame inside the callback, which 2.0's zero-copy frame_buffer requires.
  • Apply two pending ruff format fixes in the capture package.

Verification

  • uv lock / uv sync: fork removed, windows-capture 2.0.1 installed (cp39-abi3 win_amd64 wheel, covers 3.11 and 3.12).
  • ruff check, ruff format --check, pytest: 311 passed, 2 skipped.
  • Live smoke test on Windows 11: captured a real Notepad window through WindowsCaptureStream with the upstream package, got a 2556x1378 BGRA frame with the title bar cropped.

🤖 Generated with Claude Code

The window_hwnd parameter that interpreter needed was carried in the
windows-capture-interpreter fork while upstream PR
NiiightmareXD/windows-capture#185 was pending. That PR merged and shipped
in windows-capture 2.0, so depend on upstream again and retire the fork.

The Python API is unchanged (WindowsCapture(window_hwnd=...), Frame.crop,
frame_buffer, start_free_threaded), and the capture stream already copies
the frame inside the callback, which 2.0's zero-copy frame_buffer requires.

Also apply two pending ruff format fixes in the capture package.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable defects were found.

Summary

Replaces the Windows capture fork with upstream windows-capture>=2.0.1.

  • Windows capture now uses the upstream package for HWND-based window capture.
  • Capture source formatting changes without changing how capture runs.

Reviews (1) · Last reviewed commit: "Switch Windows capture to upstream windo..." · Reviewed by Greptile

@bquenin
bquenin merged commit 64744c8 into main Oct 25, 2026
7 checks passed
@bquenin
bquenin deleted the chore/upstream-windows-capture branch October 25, 2026 06:15
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