Repository navigation
Conversation
…content size (CapSoftware#3594) Resolves issue CapSoftware#3594 where Windows desktop recording immediately stalls at 0 seconds and self-terminates after a 5-second timeout. - When follow_item_size is enabled, in-flight frame drops should discard frames whose surface texture dimensions do not match the expected pool dimensions before a pool recreation. - Comparing (surface_desc.Width, surface_desc.Height) against (content_width, content_height) erroneously dropped all window capture frames because Windows.Graphics.Capture window surfaces include drop shadows and invisible resize borders that differ from content bounds. - Replaces the content size comparison with the active pool_size, allowing valid window frames to be trimmed and processed rather than dropped.
Contributor
|
@ghazy2001 is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Fixes #3594 (CAP-959)
Problem
In Cap v0.6.2, recording immediately stalls at 0 seconds and self-terminates after roughly 3-5 seconds without producing any usable recording on Windows.
Root Cause
When \ollow_item_size\ was introduced in scap-direct3d, in-flight frame drops checked whether (surface_desc.Width, surface_desc.Height) != (content_width, content_height). On Windows, the \GraphicsCaptureItem\ texture surface for a window capture includes invisible resize borders / drop shadow margins, causing \surface_desc\ to not match \content_width\ and \content_height. Consequently, every single frame was dropped, preventing \on_frame_arrived\ from ever firing until the 5-second initial frame timeout expired and aborted the recording.
Fix
Compare (surface_desc.Width, surface_desc.Height)\ against the active \pool_size\ instead. This accurately drops only stale frames that were in-flight during a dynamic window resize before pool recreation, while allowing normal window frames to proceed to the content trimming and encoding pipeline.


Confidence Score: 5/5
The PR appears safe to merge.Summary
The PR checks incoming surface dimensions against the active frame pool rather than the frame’s content size.
Reviews (1) · Last reviewed commit: "fix(scap-direct3d): compare in-flight fr..." · Reviewed by Greptile