summaryrefslogtreecommitdiffstats
path: root/src/multimedia/video/qvideoframe.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-03-23 13:20:26 +0100
committerLars Knoll <lars.knoll@qt.io>2021-04-06 08:11:39 +0000
commit9aaec39aef634a9f2d972f35484a566bdd01ecd6 (patch)
tree05263139a5c8121655ab846953d469e6dfdec137 /src/multimedia/video/qvideoframe.h
parent33d4ef6367ad49c40ec77af69ab1165989a65064 (diff)
QVideoFrame should be constructed with a QSurfaceFormat
This was inconsistent so far. QVideoFrame had half the properties of QVideoSurfaceFormat, but was missing some parts that are required to render the frame properly. Giving it a QVideoSurfaceFormat means that the QVideoFrame is self describing and can be rendered without additional information. Change-Id: Idb2757ee6a29020bd72c9c50891309ee8d8a8bfc 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.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/multimedia/video/qvideoframe.h b/src/multimedia/video/qvideoframe.h
index 650ad7537..bd69095da 100644
--- a/src/multimedia/video/qvideoframe.h
+++ b/src/multimedia/video/qvideoframe.h
@@ -52,6 +52,7 @@ QT_BEGIN_NAMESPACE
class QSize;
class QVideoFramePrivate;
class QAbstractVideoBuffer;
+class QVideoSurfaceFormat;
class Q_MULTIMEDIA_EXPORT QVideoFrame
{
@@ -119,8 +120,8 @@ public:
};
QVideoFrame();
- QVideoFrame(QAbstractVideoBuffer *buffer, const QSize &size, PixelFormat format);
- QVideoFrame(int bytes, const QSize &size, int bytesPerLine, PixelFormat format);
+ QVideoFrame(QAbstractVideoBuffer *buffer, const QVideoSurfaceFormat &format);
+ QVideoFrame(int bytes, int bytesPerLine, const QVideoSurfaceFormat &format);
QVideoFrame(const QImage &image);
QVideoFrame(const QVideoFrame &other);
~QVideoFrame();
@@ -134,6 +135,7 @@ public:
PixelFormat pixelFormat() const;
+ QVideoSurfaceFormat surfaceFormat() const;
QVideoFrame::HandleType handleType() const;
QSize size() const;