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
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
46 quint64 index() const { return m_index; }
49
50private:
51 void setOnFrameAvailableListener(const QJniObject &listener);
52
53 QJniObject m_surfaceTexture;
54 QJniObject m_surface;
55 QJniObject m_surfaceHolder;
56 const quint64 m_index = 0;
57};
58
60
61#endif // ANDROIDSURFACETEXTURE_H
AndroidSurfaceTexture(quint32 texName)
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:103
Combined button and popup list for selecting options.
#define Q_OBJECT
#define Q_SIGNALS
unsigned int quint32
Definition qtypes.h:50
unsigned long long quint64
Definition qtypes.h:61