Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
8QList<QVideoFrameFormat::PixelFormat> QSGVivanteVideoNodeFactory::supportedPixelFormats(
10{
11 const bool isWebGl = QGuiApplication::platformName() == QLatin1String("webgl");
12 if (!isWebGl && handleType == QVideoFrame::NoHandle)
14 else
15 return QList<QVideoFrameFormat::PixelFormat>();
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.
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:31
GLuint64 GLenum handleType
GLint GLsizei GLsizei GLenum format
QLatin1StringView QLatin1String
Definition qstringfwd.h:31