Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
androidsurfacetexture_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
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 ANDROIDSURFACETEXTURE_H
5#define ANDROIDSURFACETEXTURE_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <qobject.h>
19#include <QtCore/qjniobject.h>
20
21#include <QMatrix4x4>
22
24
26{
28public:
29 explicit AndroidSurfaceTexture(quint32 texName);
31
32 jobject surfaceTexture();
33 jobject surface();
34 jobject surfaceHolder();
35 inline bool isValid() const { return m_surfaceTexture.isValid(); }
36
38 void release(); // API level 14
39 void updateTexImage();
40
41 void attachToGLContext(quint32 texName); // API level 16
42 void detachFromGLContext(); // API level 16
43
44 static bool registerNativeMethods();
45
48
49private:
50 void setOnFrameAvailableListener(const QJniObject &listener);
51
52 QJniObject m_surfaceTexture;
53 QJniObject m_surface;
54 QJniObject m_surfaceHolder;
55};
56
58
59#endif // ANDROIDSURFACETEXTURE_H
void attachToGLContext(quint32 texName)
\inmodule QtCore
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition qmatrix4x4.h:25
\inmodule QtCore
Definition qobject.h:90
Combined button and popup list for selecting options.
#define Q_OBJECT
#define Q_SIGNALS
unsigned int quint32
Definition qtypes.h:45