summaryrefslogtreecommitdiffstats
path: root/src/multimedia/video/qvideoframe.h
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-05-06 23:24:30 +0200
committerLars Knoll <lars.knoll@qt.io>2021-05-07 07:05:28 +0000
commit85947d16cd2766d13862f6ec9c43469bbcaf8aeb (patch)
treeee6b05d97354b909d883fa6d26b285c69fdb7068 /src/multimedia/video/qvideoframe.h
parent3bde26e1395c9dd1e477cf271daf4090463691a0 (diff)
Make QVideoFrame(Format) movable, smaller API cleanups
Rename nPlanes to planeCount, remove QVideoFrameFormat::sizeHint. Change-Id: Ib176934f4960d01f6bec5258e552e41140dc101a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/multimedia/video/qvideoframe.h')
-rw-r--r--src/multimedia/video/qvideoframe.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/multimedia/video/qvideoframe.h b/src/multimedia/video/qvideoframe.h
index 1ee2de622..b3549b0ae 100644
--- a/src/multimedia/video/qvideoframe.h
+++ b/src/multimedia/video/qvideoframe.h
@@ -45,7 +45,6 @@
#include <QtCore/qmetatype.h>
#include <QtCore/qshareddata.h>
-#include <QtCore/qvariant.h>
#include <QtGui/qimage.h>
QT_BEGIN_NAMESPACE
@@ -57,6 +56,8 @@ class QRhi;
class QRhiResourceUpdateBatch;
class QRhiTexture;
+QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT(QVideoFramePrivate, Q_MULTIMEDIA_EXPORT)
+
class Q_MULTIMEDIA_EXPORT QVideoFrame
{
public:
@@ -80,6 +81,12 @@ public:
QVideoFrame(const QVideoFrame &other);
~QVideoFrame();
+ QVideoFrame(QVideoFrame &&other) noexcept = default;
+ QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QVideoFrame)
+ void swap(QVideoFrame &other) noexcept
+ { qSwap(d, other.d); }
+
+
QVideoFrame &operator =(const QVideoFrame &other);
bool operator==(const QVideoFrame &other) const;
bool operator!=(const QVideoFrame &other) const;
@@ -129,7 +136,8 @@ private:
QExplicitlySharedDataPointer<QVideoFramePrivate> d;
};
-Q_DECLARE_METATYPE(QVideoFrame);
+Q_DECLARE_SHARED(QVideoFrame)
+Q_DECLARE_METATYPE(QVideoFrame)
#ifndef QT_NO_DEBUG_STREAM
Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug, const QVideoFrame&);