Repository navigation
Conversation
… tick Videos played at 15 to 25 frames/s. Refs Cimbali#365.
With the GPU scaling of the previous commit the frame size is fixed when playback starts. A preview that starts in a small window and is maximized afterwards is then stretched (blurry text), and so is a paused frame or the last frame held at the end of a clip. Let the size grow with the widget. Shrinking the caps of a playing gtksink is avoided on purpose (it can freeze, see gst-plugins-good work item 1082), so the frame only gets bigger: - the target is the video widget's allocation in device pixels at the clip's aspect ratio, capped at the clip's own size; - when the allocation exceeds the current frame by more than 5 %, the capsfilter is updated after 250 ms without a further resize; - when the pipeline is paused or the clip has ended, the caps change alone produces no new buffer, so a flush seek to the current position (kept 5 ms inside the clip: a seek to the very end decodes no frame) makes d3d11convert deliver one at the new size. Builds on Cimbali#365.
youms
force-pushed
the
fix/gst-dynamic-preview
branch
from
October 28, 2026 13:41
ca3d13e to
adf9c18
Compare
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.
Refs #365. Builds on #370: the first of the two commits in this branch is the commit of that PR, and the change here is the second. It stays a draft until #370 is merged, then I will rebase it so only that commit remains.
With the GPU scaling of #370 the frame size is fixed when playback starts. A preview that starts in a small window and is maximized afterwards is stretched, so its text is blurry. The same goes for a paused frame and for the last frame held at the end of a clip.
Now the frame size grows with the video widget:
d3d11convertdeliver one at the new size. The position is kept 5 ms inside the clip, because a seek to the very end decodes no frame.Changes
media_overlays/gst_backend.pyonly.Tested on Windows 11, MSYS2 UCRT64, Python 3.14.9, GTK 3.24.52, GStreamer 1.28.8, Intel UHD 620, in the real app. After maximizing the presenter window, the preview text is blocky with #370 alone and clear with this branch, while playing, paused and on a held last frame.
#373 and this PR both change
__init__andupdate_gpu_target()ingst_backend.py, but git merges them without a conflict. Whichever merges second only needs the shared #370 commit dropped.Not tested: other GPUs.