summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2019-11-20 11:27:00 +0100
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2019-12-09 07:47:02 +0100
commitd17801df092f6776eaffb7428ba420fba3a45b4b (patch)
tree7fa7e5948a8cc79d6fe952ffce2b444b9a9da5f7 /src
parentfa66653d99052f6fce74824ab12e0148922e27bc (diff)
downloadqtmultimedia-d17801df092f6776eaffb7428ba420fba3a45b4b.tar.gz
Don't load the specialist videonode plugins when using webgl
When the webgl platform is being used then we do not want to load the videonode plugins because this will cause it to potentially use a backend that is not going to be supported by WebGL. This is due to the fact that it will potentially use extensions to OpenGL (such as the imx6 ones). But since the rendering is not happening on the device, but in the browser then the standard backends will work fine in this case. Fixes: QTBUG-79181 Change-Id: I03021d4ec01d9447dd1ca3815d32a167392ac781 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/videonode/imx6/qsgvivantevideonodefactory.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/videonode/imx6/qsgvivantevideonodefactory.cpp b/src/plugins/videonode/imx6/qsgvivantevideonodefactory.cpp
index e1c8d803a..55ed57c10 100644
--- a/src/plugins/videonode/imx6/qsgvivantevideonodefactory.cpp
+++ b/src/plugins/videonode/imx6/qsgvivantevideonodefactory.cpp
@@ -39,11 +39,13 @@
#include "qsgvivantevideonodefactory.h"
#include "qsgvivantevideonode.h"
+#include <QtGui/QGuiApplication>
QList<QVideoFrame::PixelFormat> QSGVivanteVideoNodeFactory::supportedPixelFormats(
QAbstractVideoBuffer::HandleType handleType) const
{
- if (handleType == QAbstractVideoBuffer::NoHandle)
+ const bool isWebGl = QGuiApplication::platformName() == QLatin1String("webgl");
+ if (!isWebGl && handleType == QAbstractVideoBuffer::NoHandle)
return QSGVivanteVideoNode::getVideoFormat2GLFormatMap().keys();
else
return QList<QVideoFrame::PixelFormat>();