fix(recording): keep Windows screen frames in sync#2002
Draft
hyuhan666-art wants to merge 1 commit into
Draft
Conversation
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.
Summary
This PR stabilizes Windows screen recordings by keeping encoded screen frames close to the latest captured frame instead of preserving a stale backlog.
Root cause
On Windows, the screen-frame channel could buffer several seconds of frames under encoder or muxer backpressure. Cursor events continued to follow wall-clock recording time, while the video encoder could still be consuming older screen frames. That made exported recordings look like the cursor was ahead of the screen content, and it also made recordings feel laggy under load.
Windows multi-segment studio recordings also already use recording-epoch timestamps for video packets. Applying
latest_start_timeagain during rendering double-counted capture startup delay and could push the rendered cursor ahead of the screen.What changed
latest_start_timeoffset for Windows multi-segment studio recordings.crates/recordingin the desktop sidecar rebuild dependency list so recording pipeline changes rebuild the binary.Validation
cargo fmt --all --checkcargo check -p cap-recording --libcargo test --lib -p cap-rendering -p cap-project -p cap-recording