summaryrefslogtreecommitdiffstats
path: root/src/multimedia/video/qvideoframe.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-03-24 13:05:41 +0100
committerLars Knoll <lars.knoll@qt.io>2021-04-06 08:20:31 +0000
commit3c4be415b55e0ea67eb17b30cc50f9f3e64a775d (patch)
tree92ea2d1bcb74d338f1e978854fac091a388312b9 /src/multimedia/video/qvideoframe.h
parent80c24e91131362d33555465ca4675a2cb009add4 (diff)
Start adding infrastructure to retrieve video frames as texture
We're using RHI here, as that's what we need for Qt Quick anyway. You can now set a QRhi object on QVideoSink. This can then be used internally to create textures of the required format instead of memory buffers. QVideoSurfaceFormat will now tell you how many planes are required for the format, and you can retrieve the textures for each plane from QVideoFrame. Change-Id: I86430db60a8f1aba07ec3b38e22b977cdaefaa0a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/multimedia/video/qvideoframe.h')
-rw-r--r--src/multimedia/video/qvideoframe.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/multimedia/video/qvideoframe.h b/src/multimedia/video/qvideoframe.h
index c3eba5585..5e90b6ca1 100644
--- a/src/multimedia/video/qvideoframe.h
+++ b/src/multimedia/video/qvideoframe.h
@@ -61,8 +61,7 @@ public:
enum HandleType
{
NoHandle,
- GLTextureHandle,
- MTLTextureHandle,
+ RhiTextureHandle
};
enum MapMode
@@ -114,6 +113,8 @@ public:
int mappedBytes() const;
int planeCount() const;
+ quint64 textureHandle(int plane);
+
QVariant handle() const;
qint64 startTime() const;