summaryrefslogtreecommitdiffstats
path: root/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2019-09-04 12:37:12 +0200
committerAndy Shaw <andy.shaw@qt.io>2019-10-24 14:27:11 +0200
commita6ae689d636bfcb170333f27cddb0375aeea1dbf (patch)
tree3ef0bdffa25a28f64ae510c845232ae3ffaae7d4 /src/qtmultimediaquicktools/qdeclarativevideooutput.cpp
parent327e2c7a84e11420376a6257aeebed035d430833 (diff)
Build without OpenGL support
There is support for rendering video without OpenGL on most platforms although some features are unavailable as a result, so we can make sure that what is available can be used. Change-Id: I63938e8e4e8063fcc2064d0f9d8d5f10e0fb06f9 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Diffstat (limited to 'src/qtmultimediaquicktools/qdeclarativevideooutput.cpp')
-rw-r--r--src/qtmultimediaquicktools/qdeclarativevideooutput.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp b/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp
index 18cf0e927..74c83246f 100644
--- a/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp
+++ b/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp
@@ -206,6 +206,7 @@ void QDeclarativeVideoOutput::setSource(QObject *source)
}
m_sourceType = MediaObjectSource;
+#if QT_CONFIG(opengl)
} else if (metaObject->indexOfProperty("videoSurface") != -1) {
// Make sure our backend is a QDeclarativeVideoRendererBackend
m_backend.reset();
@@ -219,6 +220,7 @@ void QDeclarativeVideoOutput::setSource(QObject *source)
m_source.data()->setProperty("videoSurface",
QVariant::fromValue<QAbstractVideoSurface*>(surface));
m_sourceType = VideoSurfaceSource;
+#endif
} else {
m_sourceType = NoSource;
}
@@ -247,12 +249,13 @@ bool QDeclarativeVideoOutput::createBackend(QMediaService *service)
}
}
}
-
+#if QT_CONFIG(opengl)
if (!backendAvailable) {
m_backend.reset(new QDeclarativeVideoRendererBackend(this));
if (m_backend->init(service))
backendAvailable = true;
}
+#endif
// QDeclarativeVideoWindowBackend only works when there is a service with a QVideoWindowControl.
// Without service, the QDeclarativeVideoRendererBackend should always work.