0001-Make-it-compile-with-no-opengl.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. qt5multimedia: Make it compile with no-opengl
  2. Backport an upstream patch to make it compile with no-opengl. Otherwise
  3. it will fail showing an error message like this one:
  4. qpaintervideosurface.cpp:99:47: error: 'QOpenGLContext' has not been
  5. declared
  6. Upstream commit:
  7. https://qt.gitorious.org/qt/qtmultimedia/commit/2b181d546970d18a48a0f36f5d1a22418b61cd4d
  8. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.org>
  9. From 2b181d546970d18a48a0f36f5d1a22418b61cd4d Mon Sep 17 00:00:00 2001
  10. From: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
  11. Date: Tue, 9 Dec 2014 15:34:10 +0100
  12. Subject: [PATCH] Make it compile with no-opengl
  13. Change-Id: I71358bb1268e5b28b66b1817a3ec0cd98459cfd2
  14. Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
  15. Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
  16. ---
  17. src/multimediawidgets/qpaintervideosurface.cpp | 4 ++++
  18. 1 files changed, 4 insertions(+), 0 deletions(-)
  19. diff --git a/src/multimediawidgets/qpaintervideosurface.cpp b/src/multimediawidgets/qpaintervideosurface.cpp
  20. index 3a880de..2ab5dcb 100644
  21. --- a/src/multimediawidgets/qpaintervideosurface.cpp
  22. +++ b/src/multimediawidgets/qpaintervideosurface.cpp
  23. @@ -96,7 +96,9 @@ QVideoSurfaceGenericPainter::QVideoSurfaceGenericPainter()
  24. << QVideoFrame::Format_ARGB32
  25. << QVideoFrame::Format_RGB565;
  26. // The raster formats should be a subset of the GL formats.
  27. +#ifndef QT_NO_OPENGL
  28. if (QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGLES)
  29. +#endif
  30. m_imagePixelFormats << QVideoFrame::Format_RGB24;
  31. }
  32. @@ -137,7 +139,9 @@ QAbstractVideoSurface::Error QVideoSurfaceGenericPainter::start(const QVideoSurf
  33. const QAbstractVideoBuffer::HandleType t = format.handleType();
  34. if (t == QAbstractVideoBuffer::NoHandle) {
  35. bool ok = m_imageFormat != QImage::Format_Invalid && !m_imageSize.isEmpty();
  36. +#ifndef QT_NO_OPENGL
  37. if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES)
  38. +#endif
  39. ok &= format.pixelFormat() != QVideoFrame::Format_RGB24;
  40. if (ok)
  41. return QAbstractVideoSurface::NoError;
  42. --
  43. 1.7.1