summaryrefslogtreecommitdiffstats
path: root/src/multimedia/video/qvideosurfaceformat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/video/qvideosurfaceformat.h')
-rw-r--r--src/multimedia/video/qvideosurfaceformat.h58
1 files changed, 55 insertions, 3 deletions
diff --git a/src/multimedia/video/qvideosurfaceformat.h b/src/multimedia/video/qvideosurfaceformat.h
index 694dd9a79..5b9c9fcb8 100644
--- a/src/multimedia/video/qvideosurfaceformat.h
+++ b/src/multimedia/video/qvideosurfaceformat.h
@@ -40,12 +40,13 @@
#ifndef QVIDEOSURFACEFORMAT_H
#define QVIDEOSURFACEFORMAT_H
+#include <QtMultimedia/qtmultimediaglobal.h>
+
#include <QtCore/qlist.h>
#include <QtCore/qpair.h>
#include <QtCore/qshareddata.h>
#include <QtCore/qsize.h>
#include <QtGui/qimage.h>
-#include <QtMultimedia/qvideoframe.h>
QT_BEGIN_NAMESPACE
@@ -57,6 +58,53 @@ class QVideoSurfaceFormatPrivate;
class Q_MULTIMEDIA_EXPORT QVideoSurfaceFormat
{
public:
+ enum PixelFormat
+ {
+ Format_Invalid,
+ Format_ARGB32,
+ Format_ARGB32_Premultiplied,
+ Format_RGB32,
+ Format_RGB24,
+ Format_RGB565,
+ Format_RGB555,
+ Format_ARGB8565_Premultiplied,
+ Format_BGRA32,
+ Format_BGRA32_Premultiplied,
+ Format_ABGR32,
+ Format_BGR32,
+ Format_BGR24,
+ Format_BGR565,
+ Format_BGR555,
+ Format_BGRA5658_Premultiplied,
+
+ Format_AYUV444,
+ Format_AYUV444_Premultiplied,
+ Format_YUV444,
+ Format_YUV420P,
+ Format_YUV422P,
+ Format_YV12,
+ Format_UYVY,
+ Format_YUYV,
+ Format_NV12,
+ Format_NV21,
+ Format_IMC1,
+ Format_IMC2,
+ Format_IMC3,
+ Format_IMC4,
+ Format_Y8,
+ Format_Y16,
+
+ Format_P010LE,
+ Format_P010BE,
+ Format_P016LE,
+ Format_P016BE,
+
+ Format_Jpeg,
+ };
+#ifndef Q_QDOC
+ static constexpr int NPixelFormats = Format_Jpeg + 1;
+#endif
+
enum Direction
{
TopToBottom,
@@ -76,7 +124,7 @@ public:
QVideoSurfaceFormat();
QVideoSurfaceFormat(
const QSize &size,
- QVideoFrame::PixelFormat pixelFormat);
+ QVideoSurfaceFormat::PixelFormat pixelFormat);
QVideoSurfaceFormat(const QVideoSurfaceFormat &format);
~QVideoSurfaceFormat();
@@ -87,7 +135,7 @@ public:
bool isValid() const;
- QVideoFrame::PixelFormat pixelFormat() const;
+ QVideoSurfaceFormat::PixelFormat pixelFormat() const;
QSize frameSize() const;
void setFrameSize(const QSize &size);
@@ -113,6 +161,9 @@ public:
QSize sizeHint() const;
+ static PixelFormat pixelFormatFromImageFormat(QImage::Format format);
+ static QImage::Format imageFormatFromPixelFormat(PixelFormat format);
+
private:
QSharedDataPointer<QVideoSurfaceFormatPrivate> d;
};
@@ -121,6 +172,7 @@ private:
Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug, const QVideoSurfaceFormat &);
Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug, QVideoSurfaceFormat::Direction);
Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug, QVideoSurfaceFormat::YCbCrColorSpace);
+Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug, QVideoSurfaceFormat::PixelFormat);
#endif
QT_END_NAMESPACE