summaryrefslogtreecommitdiffstats
path: root/src/multimedia/platform
diff options
context:
space:
mode:
authorBartlomiej Moskal <bartlomiej.moskal@qt.io>2023-04-26 09:38:00 +0200
committerBartlomiej Moskal <bartlomiej.moskal@qt.io>2023-06-19 10:04:03 +0000
commit0389cb306ac17ec9dbbc5ee97ac89659ad4d02b5 (patch)
tree53ff60633705f57ea5f3848c743fe67713ee8eb0 /src/multimedia/platform
parentdce27a89060f5bfb30d2e341431b5eab56697ae5 (diff)
Android-backend: Fix not working camera preview
In case when the QML CaptureSession was opened from QuickWidget, it can be be started before Rhi was set in videoSink. In such case, surfaceTexture without Rhi will be used for setPreviewTexture. It may happen that Rhi will be set later, but CameraSession will not be informed about it. For this case, rhiChanged Signal is moved to QPlatformVideoSink. This allows to restart cameraSession when Rhi is set later. Pick-to: 6.6 6.5 Fixes: QTBUG-112226 Change-Id: If95fd7f390664e0b999e904a97e0d48c5b4b6c7c Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Diffstat (limited to 'src/multimedia/platform')
-rw-r--r--src/multimedia/platform/qplatformvideosink_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/multimedia/platform/qplatformvideosink_p.h b/src/multimedia/platform/qplatformvideosink_p.h
index 4477b28cb..53eca374f 100644
--- a/src/multimedia/platform/qplatformvideosink_p.h
+++ b/src/multimedia/platform/qplatformvideosink_p.h
@@ -67,6 +67,9 @@ public:
protected:
explicit QPlatformVideoSink(QVideoSink *parent);
+Q_SIGNALS:
+ void rhiChanged(QRhi *rhi);
+
private:
QVideoSink *m_sink = nullptr;
mutable QMutex m_mutex;