summaryrefslogtreecommitdiffstats
path: root/src/multimediawidgets/qpaintervideosurface.cpp
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2015-03-12 16:06:26 +0100
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-03-13 10:06:01 +0000
commitd4208cc5a1c6d6bf114653b39b8880fe4c00c1f3 (patch)
tree6db1f614dd8d5393fde08319506ab4538fef356d /src/multimediawidgets/qpaintervideosurface.cpp
parente1d76e2df53b766f418e15282a2b908e91108b66 (diff)
QPainterVideoSurface: restore original order for the supported formats.
The formats returned by supportedPixelFormats() are supposed to be in descending order of preference. Some formats were changed positions in commit 66ba2197. Change-Id: Ib52e93ba3554d80fa388a01f0b47fa049ac046ec Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/multimediawidgets/qpaintervideosurface.cpp')
-rw-r--r--src/multimediawidgets/qpaintervideosurface.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/multimediawidgets/qpaintervideosurface.cpp b/src/multimediawidgets/qpaintervideosurface.cpp
index 13306fd87..3529ab7d6 100644
--- a/src/multimediawidgets/qpaintervideosurface.cpp
+++ b/src/multimediawidgets/qpaintervideosurface.cpp
@@ -91,15 +91,16 @@ QVideoSurfaceGenericPainter::QVideoSurfaceGenericPainter()
: m_imageFormat(QImage::Format_Invalid)
, m_scanLineDirection(QVideoSurfaceFormat::TopToBottom)
{
- m_imagePixelFormats
- << QVideoFrame::Format_RGB32
- << QVideoFrame::Format_ARGB32
- << QVideoFrame::Format_RGB565;
+ m_imagePixelFormats << QVideoFrame::Format_RGB32;
+
// The raster formats should be a subset of the GL formats.
#ifndef QT_NO_OPENGL
if (QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGLES)
#endif
m_imagePixelFormats << QVideoFrame::Format_RGB24;
+
+ m_imagePixelFormats << QVideoFrame::Format_ARGB32
+ << QVideoFrame::Format_RGB565;
}
QList<QVideoFrame::PixelFormat> QVideoSurfaceGenericPainter::supportedPixelFormats(
@@ -1055,7 +1056,13 @@ QVideoSurfaceGlslPainter::QVideoSurfaceGlslPainter(QGLContext *context)
m_imagePixelFormats
<< QVideoFrame::Format_RGB32
<< QVideoFrame::Format_BGR32
- << QVideoFrame::Format_ARGB32
+ << QVideoFrame::Format_ARGB32;
+ if (!context->contextHandle()->isOpenGLES()) {
+ m_imagePixelFormats
+ << QVideoFrame::Format_RGB24
+ << QVideoFrame::Format_BGR24;
+ }
+ m_imagePixelFormats
<< QVideoFrame::Format_RGB565
<< QVideoFrame::Format_YUV444
<< QVideoFrame::Format_AYUV444
@@ -1064,11 +1071,6 @@ QVideoSurfaceGlslPainter::QVideoSurfaceGlslPainter(QGLContext *context)
m_glPixelFormats
<< QVideoFrame::Format_RGB32
<< QVideoFrame::Format_ARGB32;
- if (!context->contextHandle()->isOpenGLES()) {
- m_imagePixelFormats
- << QVideoFrame::Format_RGB24
- << QVideoFrame::Format_BGR24;
- }
}
QAbstractVideoSurface::Error QVideoSurfaceGlslPainter::start(const QVideoSurfaceFormat &format)