Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qandroidvideooutput_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QANDROIDVIDEOOUTPUT_H
5#define QANDROIDVIDEOOUTPUT_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 <qsize.h>
19#include <qmutex.h>
20#include <qreadwritelock.h>
21#include <private/qabstractvideobuffer_p.h>
22#include <qmatrix4x4.h>
23#include <qoffscreensurface.h>
24#include <rhi/qrhi.h>
25
27
30class QVideoSink;
31
33{
35public:
37
38 virtual AndroidSurfaceTexture *surfaceTexture() { return 0; }
39 virtual AndroidSurfaceHolder *surfaceHolder() { return 0; }
40
41 virtual bool isReady() { return true; }
42
43 virtual void setVideoSize(const QSize &) { }
44 virtual void start() { }
45 virtual void stop() { }
46 virtual void reset() { }
47 virtual QSize getVideoSize() const { return QSize(0, 0); }
48
50 void readyChanged(bool);
51
52protected:
54};
55
57{
59public:
62
63 QVideoSink *surface() const { return m_sink; }
64 bool shouldTextureBeUpdated() const;
65
67
68 void setVideoSize(const QSize &) override;
69 void stop() override;
70 void reset() override;
71 QSize getVideoSize() const override { return m_nativeSize; }
72
73 void setSubtitle(const QString &subtitle);
74private Q_SLOTS:
75 void newFrame(const QVideoFrame &);
76
77private:
78 QVideoSink *m_sink = nullptr;
79 QSize m_nativeSize;
80 bool m_surfaceCreatedWithoutRhi = false;
81
82 std::unique_ptr<class AndroidTextureThread> m_surfaceThread;
83};
84
86
89
90#endif // QANDROIDVIDEOOUTPUT_H
QSize getVideoSize() const override
void setSubtitle(const QString &subtitle)
void setVideoSize(const QSize &) override
AndroidSurfaceTexture * surfaceTexture() override
virtual AndroidSurfaceHolder * surfaceHolder()
QAndroidVideoOutput(QObject *parent)
virtual void setVideoSize(const QSize &)
void readyChanged(bool)
virtual QSize getVideoSize() const
virtual AndroidSurfaceTexture * surfaceTexture()
Definition qlist.h:74
\inmodule QtCore
Definition qobject.h:90
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:311
\inmodule QtGui
Definition qrhi.h:1767
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
The QVideoFrame class represents a frame of video data.
Definition qvideoframe.h:26
The QVideoSink class represents a generic sink for video data.
Definition qvideosink.h:22
Combined button and popup list for selecting options.
#define Q_DECLARE_METATYPE(TYPE)
Definition qmetatype.h:1504
GLsizei GLenum GLboolean sink
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS