diff options
author | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2020-06-08 10:42:03 +0200 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2020-06-10 14:33:49 +0200 |
commit | 3d909ba8ac0f43af6d70830a5c95df3e741f1221 (patch) | |
tree | 7802b0c29b6dc19c65640e8d46f8dad70c148786 /src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h | |
parent | 22ae5eec6314b59c8a969b743a9c05fb184cc9b2 (diff) |
Quick: Allow to build with -no-opengl
Change-Id: I927998b9ffa80a324636855c5dcc92cb57e9d520
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h')
-rw-r--r-- | src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h b/src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h index c69e74150..445c5a01a 100644 --- a/src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h +++ b/src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h @@ -83,7 +83,10 @@ public: QSGNode *updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *data) override; QAbstractVideoSurface *videoSurface() const override; QRectF adjustedViewport() const override; + +#if QT_CONFIG(opengl) QOpenGLContext *glContext() const; +#endif friend class QSGVideoItemSurface; void present(const QVideoFrame &frame); @@ -101,7 +104,11 @@ private: QList<QSGVideoNodeFactoryInterface*> m_videoNodeFactories; QSGVideoItemSurface *m_surface; QVideoSurfaceFormat m_surfaceFormat; - QOpenGLContext *m_glContext; + +#if QT_CONFIG(opengl) + QOpenGLContext *m_glContext = nullptr; +#endif + QVideoFrame m_frame; QVideoFrame m_frameOnFlush; bool m_frameChanged; @@ -131,10 +138,12 @@ public: bool start(const QVideoSurfaceFormat &format) override; void stop() override; bool present(const QVideoFrame &frame) override; - void scheduleOpenGLContextUpdate(); +#if QT_CONFIG(opengl) + void scheduleOpenGLContextUpdate(); private slots: void updateOpenGLContext(); +#endif private: QDeclarativeVideoRendererBackend *m_backend; |