Skip to content

Fix Windows media corruption and capture lifecycle races - #1

Draft
08Robfin wants to merge 8 commits into
mainfrom
fix/failed-start-recovery
Draft

08Robfin wants to merge 8 commits into
mainfrom
fix/failed-start-recovery

Conversation

@08Robfin

@08Robfin 08Robfin commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Windows alpha.3 could corrupt media bytes: a read-only live test found adb shell -T returned 257 bytes for a 256-byte payload through LF-to-CRLF translation, while adb exec-out preserved every byte. Use exec-out for Windows video/audio and retain shell-v2 elsewhere. Hide worker ADB/FFmpeg consoles and handle aborted preview clients normally.

Failed explicit starts now clean up and stay stopped, preserving the diagnosis. A new explicit Start resets the retry budget; automatic recovery keeps its bounded budget. Stop signals cancellation before waiting for startup, and worker child creation is serialized with termination so cleanup cannot miss a late child. Startup/status must match the current session ID so a stale worker cannot supply false success or healthy frame counters. Invalid configuration leaves an existing stream undisturbed.

Validation: 35 unit/HTTP regressions passed on Windows, including threaded cancellation and foreign-worker tests. Byte-integrity and synthetic H.264 round-trip checks passed. Dev3 artifact at code commit 2db5db4 passed Windows packaging, dependency/HTTP/worker/media/ADB smoke tests and native shutdown checks.

The exact installed dev3 EXE, worker and native library matched that artifact byte-for-byte. With the owner's explicit permission, three bounded whole-TV Xbox-dashboard Start/Stop cycles passed with visually clean snapshots: 720p 28.61 fps/120 frames; 1080p 25.69 fps/121 frames; 720p 28.18 fps/122 frames. One capture process was present during each session, zero after each Stop, and Quit closed host, worker and private ADB ports. No input/settings changes were made by the tests. These short dashboard runs do not establish gameplay cadence, frame uniqueness, long-term stability, HDR fidelity or audio.

Apple TV/HDMI 2 corruption remains unresolved and source-dependent; protection is plausible but HDCP status is unconfirmed. A format comparison was confounded by source changes; on Xbox both RGB and NV12 were clean. The RGB experiment was reverted, preserving the validated faster NV12 implementation. No protected-capture workaround is included. Captures are stopped, and private frames/logs stayed local.

Windows artifact build: https://github.com/08Robfin/SharpCapture/actions/runs/46449268530 . This draft does not publish a release or replace alpha.3.

@08Robfin 08Robfin changed the title Keep failed capture starts stopped and reset manual retry budget Fix Windows green video corruption, child consoles and failed-start retries Nov 30, 2026
@08Robfin 08Robfin changed the title Fix Windows green video corruption, child consoles and failed-start retries Fix Windows media corruption and capture lifecycle races Nov 30, 2026
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