Scale capture to the receiver's advertised display size - #25
Open
0xFerreira wants to merge 1 commit into
Open
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.
The receiver reports the largest frame its decoder accepts in
/info, but the capture is always encoded at the portal's native size. On a HiDPI panel that means a 2880x1800 stream sent to a receiver that advertised 1920x1080 — the receiver takes the first IDR, stops consuming, and the mirror freezes on frame one.ReceiverInfo.DisplaySize(), which was already parsed but only used for the codec headervapostprocdoes the downscale on the GPU;videoscaleis the fallback where VA-API is unavailableadd-borders=trueletterboxes so the aspect ratio survives when the two differ-no-scalekeeps the old behaviour for receivers known to accept the native sizeLikely fixes #21 — same symptom, and that reporter is on an Apple TV HD, which is 1080p-only.
Tested on a Samsung Q60AA (advertises 1920x1080) from a 2880x1800 laptop under Hyprland/PipeWire with VA-API. Before: one frame, then a stalled pipeline at ~0% encoder CPU. After: sustained mirroring, SPS reports 1920x1080.
Unrelated, noticed while here: the man page still documents
-width/-height, which the binary no longer accepts.This is not a revert of #5. Capture still runs at the screen's native resolution; only the encode is clamped, and
add-borders=truecentres rather than left-aligns — the behaviour #5 asked for.