summaryrefslogtreecommitdiffstats
path: root/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-03-23 13:38:05 +0100
committerLars Knoll <lars.knoll@qt.io>2021-04-06 08:11:57 +0000
commit2caff4509eba3f05785ff09a11abdb929c7bb392 (patch)
tree8d4b1bb77c95e2caccffa7dad1d2675f118e1ee5 /src/qtmultimediaquicktools/qsgvideonode_rgb.cpp
parentd6e52bea2da1d31bce91d1a175f9b9e84b8e37f5 (diff)
Smaller API cleanups in QVideoFrame
Get rid of the buffer method. It's not used, and QAbstractVideoBuffer is private anyway. Use map() to access the data. Rename image() to toImage() to make it explicit that we're doing a conversion here. Change-Id: Ie2735bc1a5131c09098fa80c9df7bf5b165b557c 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.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp b/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp
index 4a6c74573..204e5602f 100644
--- a/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp
+++ b/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp
@@ -166,7 +166,7 @@ void QSGVideoMaterialRhiShader_RGB::updateSampledImage(RenderState &state, int b
auto frame = m->m_frame;
if (frame.pixelFormat() == QVideoSurfaceFormat::Format_RGB565) // Format_RGB565 requires GL_UNSIGNED_SHORT_5_6_5
- frame = frame.image().convertToFormat(QImage::Format_RGBA8888_Premultiplied);
+ frame = frame.toImage().convertToFormat(QImage::Format_RGBA8888_Premultiplied);
auto format = QRhiTexture::RGBA8;
if (frame.pixelFormat() == QVideoSurfaceFormat::Format_RGB32