summaryrefslogtreecommitdiffstats
path: root/src/qtmultimediaquicktools
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-20 13:46:06 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-20 13:46:06 +0100
commit5c0cca78f410e8a89d3216aeba916d73070398f4 (patch)
treee21b54b36dde0825f9c07899c705dcbb91dcabbd /src/qtmultimediaquicktools
parent4e809d4be9bb60cb20e5c98e4b2664af8e1cc2f3 (diff)
parent49bf444b44dac10602af0af862f0951835ea5895 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Diffstat (limited to 'src/qtmultimediaquicktools')
-rw-r--r--src/qtmultimediaquicktools/qdeclarativevideooutput.cpp7
-rw-r--r--src/qtmultimediaquicktools/qtmultimediaquicktools.pro23
2 files changed, 18 insertions, 12 deletions
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp b/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp
index 18cf0e927..32166502d 100644
--- a/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp
+++ b/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp
@@ -57,7 +57,7 @@ Q_LOGGING_CATEGORY(qLcVideo, "qt.multimedia.video")
/*!
\qmltype VideoOutput
- \instantiates QDeclarativeVideoOutput
+ //! \instantiates QDeclarativeVideoOutput
\brief Render video or camera viewfinder.
\ingroup multimedia_qml
@@ -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.
diff --git a/src/qtmultimediaquicktools/qtmultimediaquicktools.pro b/src/qtmultimediaquicktools/qtmultimediaquicktools.pro
index 7c8d07647..cb1f8106b 100644
--- a/src/qtmultimediaquicktools/qtmultimediaquicktools.pro
+++ b/src/qtmultimediaquicktools/qtmultimediaquicktools.pro
@@ -11,20 +11,23 @@ PRIVATE_HEADERS += \
HEADERS += \
$$PRIVATE_HEADERS \
- qdeclarativevideooutput_render_p.h \
- qdeclarativevideooutput_window_p.h \
- qsgvideonode_yuv_p.h \
- qsgvideonode_rgb_p.h \
- qsgvideonode_texture_p.h
+ qdeclarativevideooutput_window_p.h
SOURCES += \
qsgvideonode_p.cpp \
qdeclarativevideooutput.cpp \
- qdeclarativevideooutput_render.cpp \
- qdeclarativevideooutput_window.cpp \
- qsgvideonode_yuv.cpp \
- qsgvideonode_rgb.cpp \
- qsgvideonode_texture.cpp
+ qdeclarativevideooutput_window.cpp
+
+qtConfig(opengl) {
+ SOURCES += qdeclarativevideooutput_render.cpp \
+ qsgvideonode_rgb.cpp \
+ qsgvideonode_yuv.cpp \
+ qsgvideonode_texture.cpp
+ HEADERS += qdeclarativevideooutput_render_p.h \
+ qsgvideonode_rgb_p.h \
+ qsgvideonode_yuv_p.h \
+ qsgvideonode_texture_p.h
+}
RESOURCES += \
qtmultimediaquicktools.qrc