diff options
-rw-r--r-- | src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp index f4efe47e7..de4cabfaf 100644 --- a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp +++ b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp @@ -420,6 +420,17 @@ QList<QVideoFrame::PixelFormat> QSGVideoItemSurface::supportedPixelFormats( { QList<QVideoFrame::PixelFormat> formats; + static bool noGLTextures = false; + static bool noGLTexturesChecked = false; + if (handleType == QAbstractVideoBuffer::GLTextureHandle) { + if (!noGLTexturesChecked) { + noGLTexturesChecked = true; + noGLTextures = qEnvironmentVariableIsSet("QT_QUICK_NO_TEXTURE_VIDEOFRAMES"); + } + if (noGLTextures) + return formats; + } + foreach (QSGVideoNodeFactoryInterface* factory, m_backend->m_videoNodeFactories) formats.append(factory->supportedPixelFormats(handleType)); |