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
qsgvivantevideomaterial.h
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
4#ifndef QSGVIDEOMATERIAL_VIVMAP_H
5#define QSGVIDEOMATERIAL_VIVMAP_H
6
7#include <QList>
8#include <QPair>
9
10#include <QSGMaterial>
11#include <QVideoFrame>
12#include <QMutex>
13
14#include <private/qsgvideonode_p.h>
15
17class QSGVideoTexture;
19{
20public:
23
24 QSGMaterialType *type() const override;
26 int compare(const QSGMaterial *other) const override;
27 void updateBlending();
28 void setCurrentFrame(const QVideoFrame &frame, QSGVideoNode::FrameFlags flags);
29
30 void bind();
31 GLuint vivanteMapping(QVideoFrame texIdVideoFramePair);
32
33 void setOpacity(float o) { mOpacity = o; }
34
35private:
36 void clearTextures();
37
38 qreal mOpacity;
39
40 int mWidth;
41 int mHeight;
43
44 QMap<const uchar*, GLuint> mBitsToTextureMap;
45 QVideoFrame mCurrentFrame;
46 GLuint mCurrentTexture;
47 bool mMappable;
48 QScopedPointer<QSGVideoTexture> mTexture;
49 GLenum mMapError = GL_NO_ERROR;
50
51 QMutex mFrameMutex;
52
53 GLuint mTexDirectTexture;
54 GLvoid *mTexDirectPlanes[3];
55
58};
59
60#endif // QSGVIDEOMATERIAL_VIVMAP_H
\inmodule QtCore
Definition qmutex.h:281
The QSGMaterialShader class represents a graphics API independent shader program.
The QSGMaterial class encapsulates rendering state for a shader program.
Definition qsgmaterial.h:15
RenderMode
\value RenderMode2D Normal 2D rendering \value RenderMode2DNoDepthBuffer Normal 2D rendering with dep...
void setCurrentFrame(const QVideoFrame &frame, QSGVideoNode::FrameFlags flags)
int compare(const QSGMaterial *other) const override
Compares this material to other and returns 0 if they are equal; -1 if this material should sort befo...
QSGMaterialType * type() const override
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
GLuint vivanteMapping(QVideoFrame texIdVideoFramePair)
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode) const override
This function returns a new instance of a the QSGMaterialShader implementation used to render geometr...
PixelFormat
Enumerates video data types.
The QVideoFrame class represents a frame of video data.
Definition qvideoframe.h:27
typedef GLenum(GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC)(void)
GLbitfield flags
#define GLuint
double qreal
Definition qtypes.h:187
QSharedPointer< T > other(t)
[5]
QFrame frame
[0]
The QSGMaterialType class is used as a unique type token in combination with QSGMaterial.