Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
androidsurfaceview_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 ANDROIDSURFACEVIEW_H
5#define ANDROIDSURFACEVIEW_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 <QtCore/qjniobject.h>
19#include <qrect.h>
20#include <QtCore/qrunnable.h>
21#include <QtCore/qobject.h>
22
24
25class QWindow;
26
28{
30public:
32
33 jobject surfaceHolder() const;
34 bool isSurfaceCreated() const;
35
36 static bool registerNativeMethods();
37
40
41private:
42 AndroidSurfaceHolder(QJniObject object);
43
44 static void handleSurfaceCreated(JNIEnv*, jobject, jlong id);
45 static void handleSurfaceDestroyed(JNIEnv*, jobject, jlong id);
46
47 QJniObject m_surfaceHolder;
48 bool m_surfaceCreated;
49
50 friend class AndroidSurfaceView;
51};
52
54{
56public:
59
61
62 void setVisible(bool v);
63 void setGeometry(int x, int y, int width, int height);
64
67
68private:
69 QJniObject m_surfaceView;
70 QWindow *m_window;
71 AndroidSurfaceHolder *m_surfaceHolder;
72 int m_pendingVisible;
73 QRect m_pendingGeometry;
74};
75
76QT_END_NAMESPACE
77
78#endif // ANDROIDSURFACEVIEW_H
jobject surfaceHolder() const
static bool registerNativeMethods()
AndroidSurfaceHolder * holder() const
void setGeometry(int x, int y, int width, int height)
QPlatformVideoDevices * createVideoDevices() override
q23::expected< QPlatformAudioInput *, QString > createAudioInput(QAudioInput *audioInput) override
q23::expected< QPlatformVideoSink *, QString > createVideoSink(QVideoSink *) override
q23::expected< QPlatformAudioDecoder *, QString > createAudioDecoder(QAudioDecoder *decoder) override
q23::expected< QPlatformAudioOutput *, QString > createAudioOutput(QAudioOutput *q) override
q23::expected< QPlatformImageCapture *, QString > createImageCapture(QImageCapture *imageCapture) override
q23::expected< QPlatformMediaRecorder *, QString > createRecorder(QMediaRecorder *recorder) override
q23::expected< QPlatformMediaPlayer *, QString > createPlayer(QMediaPlayer *player) override
QPlatformMediaFormatInfo * createFormatInfo() override
q23::expected< QPlatformMediaCaptureSession *, QString > createCaptureSession() override
q23::expected< QPlatformCamera *, QString > createCamera(QCamera *camera) override
QList< QCameraDevice > findVideoInputs() const override
Q_DECLARE_JNI_CLASS(MotionEvent, "android/view/MotionEvent")