diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-03-17 09:48:51 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-03-17 09:48:51 +0100 |
commit | 64b75cc1d7ab1c3a557c809e15154d5d3a03d1ad (patch) | |
tree | fc77380849c882da0dbc3c96f4fbbf92b0c21d33 /src/multimediawidgets | |
parent | d109e6dd5d6a18e715b979f3d3ef845946b1b787 (diff) | |
parent | d4208cc5a1c6d6bf114653b39b8880fe4c00c1f3 (diff) |
Merge remote-tracking branch 'origin/5.4' into 5.5
Change-Id: Id24f14bef17b86e7027e055473f0357854780979
Diffstat (limited to 'src/multimediawidgets')
-rw-r--r-- | src/multimediawidgets/qpaintervideosurface.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/multimediawidgets/qpaintervideosurface.cpp b/src/multimediawidgets/qpaintervideosurface.cpp index ea6e75e24..2dfbf3414 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) |