summaryrefslogtreecommitdiffstats
path: root/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-03-23 13:31:22 +0100
committerLars Knoll <lars.knoll@qt.io>2021-04-06 08:11:45 +0000
commitd6e52bea2da1d31bce91d1a175f9b9e84b8e37f5 (patch)
tree90e41da7f8a6abdd069da5e7fcd410d8accb8843 /src/qtmultimediaquicktools/qsgvideonode_rgb.cpp
parent9aaec39aef634a9f2d972f35484a566bdd01ecd6 (diff)
Move the PixelFormat enum from QVideoFrame to QVideoSurfaceFormat
Change-Id: Ifa888c74c397c640b19387a9ce624dfcf8269c2c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src/qtmultimediaquicktools/qsgvideonode_rgb.cpp')
-rw-r--r--src/qtmultimediaquicktools/qsgvideonode_rgb.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp b/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp
index 7345291c8..4a6c74573 100644
--- a/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp
+++ b/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp
@@ -43,18 +43,18 @@
QT_BEGIN_NAMESPACE
-QList<QVideoFrame::PixelFormat> QSGVideoNodeFactory_RGB::supportedPixelFormats(
+QList<QVideoSurfaceFormat::PixelFormat> QSGVideoNodeFactory_RGB::supportedPixelFormats(
QVideoFrame::HandleType handleType) const
{
- QList<QVideoFrame::PixelFormat> pixelFormats;
+ QList<QVideoSurfaceFormat::PixelFormat> pixelFormats;
if (handleType == QVideoFrame::NoHandle) {
- pixelFormats.append(QVideoFrame::Format_RGB32);
- pixelFormats.append(QVideoFrame::Format_ARGB32);
- pixelFormats.append(QVideoFrame::Format_ARGB32_Premultiplied);
- pixelFormats.append(QVideoFrame::Format_BGR32);
- pixelFormats.append(QVideoFrame::Format_BGRA32);
- pixelFormats.append(QVideoFrame::Format_RGB565);
+ pixelFormats.append(QVideoSurfaceFormat::Format_RGB32);
+ pixelFormats.append(QVideoSurfaceFormat::Format_ARGB32);
+ pixelFormats.append(QVideoSurfaceFormat::Format_ARGB32_Premultiplied);
+ pixelFormats.append(QVideoSurfaceFormat::Format_BGR32);
+ pixelFormats.append(QVideoSurfaceFormat::Format_BGRA32);
+ pixelFormats.append(QVideoSurfaceFormat::Format_RGB565);
}
return pixelFormats;
@@ -165,13 +165,13 @@ void QSGVideoMaterialRhiShader_RGB::updateSampledImage(RenderState &state, int b
m->m_frameMutex.lock();
auto frame = m->m_frame;
- if (frame.pixelFormat() == QVideoFrame::Format_RGB565) // Format_RGB565 requires GL_UNSIGNED_SHORT_5_6_5
+ if (frame.pixelFormat() == QVideoSurfaceFormat::Format_RGB565) // Format_RGB565 requires GL_UNSIGNED_SHORT_5_6_5
frame = frame.image().convertToFormat(QImage::Format_RGBA8888_Premultiplied);
auto format = QRhiTexture::RGBA8;
- if (frame.pixelFormat() == QVideoFrame::Format_RGB32
- || frame.pixelFormat() == QVideoFrame::Format_ARGB32
- || frame.pixelFormat() == QVideoFrame::Format_ARGB32_Premultiplied)
+ if (frame.pixelFormat() == QVideoSurfaceFormat::Format_RGB32
+ || frame.pixelFormat() == QVideoSurfaceFormat::Format_ARGB32
+ || frame.pixelFormat() == QVideoSurfaceFormat::Format_ARGB32_Premultiplied)
{
format = QRhiTexture::BGRA8;
}