summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2014-12-09 15:34:10 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2014-12-11 16:22:34 +0100
commit2b181d546970d18a48a0f36f5d1a22418b61cd4d (patch)
tree7e96694a74df5b5eab39e193a30aa49c8e79eac3 /src
parent085362ab0f313f4e3947c39a008d801024f6f0b4 (diff)
Make it compile with no-opengl
Change-Id: I71358bb1268e5b28b66b1817a3ec0cd98459cfd2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/multimediawidgets/qpaintervideosurface.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/multimediawidgets/qpaintervideosurface.cpp b/src/multimediawidgets/qpaintervideosurface.cpp
index 3a880de2f..2ab5dcbf5 100644
--- a/src/multimediawidgets/qpaintervideosurface.cpp
+++ b/src/multimediawidgets/qpaintervideosurface.cpp
@@ -96,7 +96,9 @@ QVideoSurfaceGenericPainter::QVideoSurfaceGenericPainter()
<< QVideoFrame::Format_ARGB32
<< QVideoFrame::Format_RGB565;
// 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;
}
@@ -137,7 +139,9 @@ QAbstractVideoSurface::Error QVideoSurfaceGenericPainter::start(const QVideoSurf
const QAbstractVideoBuffer::HandleType t = format.handleType();
if (t == QAbstractVideoBuffer::NoHandle) {
bool ok = m_imageFormat != QImage::Format_Invalid && !m_imageSize.isEmpty();
+#ifndef QT_NO_OPENGL
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES)
+#endif
ok &= format.pixelFormat() != QVideoFrame::Format_RGB24;
if (ok)
return QAbstractVideoSurface::NoError;