From c02af3902602934ee3d844a5f5d62e18338e99de Mon Sep 17 00:00:00 2001 From: William Wedler Date: Mon, 22 Apr 2024 10:35:18 -0400 Subject: [PATCH] fix: qml6glsink: video content resizes to new item size Mark geometry dirty when the item rectangle changes in the QtGLVideoItem::updatePaintNode method. This allows changes in the bounding rectangle to be applied to the scene graph geometry node. Fixes #3493 Part-of: --- subprojects/gst-plugins-good/ext/qt6/qt6glitem.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subprojects/gst-plugins-good/ext/qt6/qt6glitem.cc b/subprojects/gst-plugins-good/ext/qt6/qt6glitem.cc index 5bc7003e6e..5314b01acd 100644 --- a/subprojects/gst-plugins-good/ext/qt6/qt6glitem.cc +++ b/subprojects/gst-plugins-good/ext/qt6/qt6glitem.cc @@ -73,6 +73,7 @@ struct _Qt6GLVideoItemPrivate GstCaps *caps; GstVideoInfo new_v_info; GstVideoInfo v_info; + GstVideoRectangle v_rect; gboolean initted; GstGLDisplay *display; @@ -374,6 +375,11 @@ Qt6GLVideoItem::updatePaintNode(QSGNode * oldNode, QRectF rect(result.x, result.y, result.w, result.h); QRectF sourceRect(0, 0, 1, 1); QSGGeometry::updateTexturedRectGeometry(geometry, rect, sourceRect); + if(priv->v_rect.x != result.x || priv->v_rect.y != result.y || + priv->v_rect.w != result.w || priv->v_rect.h != result.h) { + texNode->markDirty(QSGNode::DirtyGeometry); + priv->v_rect = result; + } g_mutex_unlock (&this->priv->lock);