Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qsgvivantevideonodefactory.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 Pelagicore AG
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
6#include <QtGui/QGuiApplication>
7
10{
11 const bool isWebGl = QGuiApplication::platformName() == QLatin1String("webgl");
12 if (!isWebGl && handleType == QVideoFrame::NoHandle)
14 else
16}
17
19{
20 if (supportedPixelFormats(format.handleType()).contains(format.pixelFormat())) {
21 return new QSGVivanteVideoNode(format);
22 }
23 return 0;
24}
QString platformName
The name of the underlying platform plugin.
Definition qlist.h:74
QList< Key > keys() const
Definition qmap.h:382
QSGVideoNode * createNode(const QVideoFrameFormat &format)
QList< QVideoFrameFormat::PixelFormat > supportedPixelFormats(QVideoFrame::HandleType handleType) const
static const QMap< QVideoFrameFormat::PixelFormat, GLenum > & getVideoFormat2GLFormatMap()
The QVideoFrameFormat class specifies the stream format of a video presentation surface.
HandleType
Identifies the type of a video buffers handle.
Definition qvideoframe.h:30
GLuint64 GLenum handleType
GLint GLsizei GLsizei GLenum format
QLatin1StringView QLatin1String
Definition qstringfwd.h:31
bool contains(const AT &t) const noexcept
Definition qlist.h:44