qml6glsrc: Reduce capture delay
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 13 Aug 2024 19:07:07 +0000 (15:07 -0400)
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>
Mon, 23 Sep 2024 20:04:03 +0000 (22:04 +0200)
commite3265375ef6c4b9726c0c59c6c5c844cf27557b2
tree669f703bf5a6026ae8ee7ebca7e7d0fa93100e29
parentb2a2c4c8406b0fe22280ffea4216ad0b31a07967
qml6glsrc: Reduce capture delay

In qml6glsrc, we capture the application by copying the back buffer into
our own FBO. The afterRendering() signal is too soon as from the apitrace, the
application has been rendered into a QT internal buffer, to be used as a cache
for refresh.

Use afterFrameEnd() signal instead. This works with no delay on GLES. With GL
it seems to reduce from 2 to 1 frame delay (this may be platform specific). A
different recording technique would need to be used to completely remove this
delay.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7562>
subprojects/gst-plugins-good/ext/qt6/qt6glwindow.cc
subprojects/gst-plugins-good/ext/qt6/qt6glwindow.h