qmlglsink: Set qtitem's implicit width/height

This can be useful to let the layouts automatically resize qtitem
and also easily query a video's width/height from QML

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/802>
This commit is contained in:
Dinesh Manajipet 2020-11-01 18:36:49 +00:00
parent 917bf649cc
commit aa264e6b07

View file

@ -421,6 +421,9 @@ _calculate_par (QtGLVideoItem * widget, GstVideoInfo * info)
if (!ok) if (!ok)
return FALSE; return FALSE;
widget->setImplicitWidth (width);
widget->setImplicitHeight (height);
GST_LOG ("%p PAR: %u/%u DAR:%u/%u", widget, par_n, par_d, display_par_n, GST_LOG ("%p PAR: %u/%u DAR:%u/%u", widget, par_n, par_d, display_par_n,
display_par_d); display_par_d);