1 | // Copyright (C) 2024 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 QVIDEOFRAMEINPUT_H |
5 | #define QVIDEOFRAMEINPUT_H |
6 | |
7 | #include <QtMultimedia/qtmultimediaexports.h> |
8 | #include <QtCore/qobject.h> |
9 | |
10 | QT_BEGIN_NAMESPACE |
11 | |
12 | class QPlatformVideoFrameInput; |
13 | class QVideoFrameInputPrivate; |
14 | class QMediaCaptureSession; |
15 | class QVideoFrame; |
16 | class QVideoFrameFormat; |
17 | |
18 | class Q_MULTIMEDIA_EXPORT QVideoFrameInput : public QObject |
19 | { |
20 | Q_OBJECT |
21 | public: |
22 | explicit QVideoFrameInput(QObject *parent = nullptr); |
23 | |
24 | explicit QVideoFrameInput(const QVideoFrameFormat &format, QObject *parent = nullptr); |
25 | |
26 | ~QVideoFrameInput() override; |
27 | |
28 | bool sendVideoFrame(const QVideoFrame &frame); |
29 | |
30 | QVideoFrameFormat format() const; |
31 | |
32 | QMediaCaptureSession *captureSession() const; |
33 | |
34 | Q_SIGNALS: |
35 | void readyToSendVideoFrame(); |
36 | |
37 | private: |
38 | void setCaptureSession(QMediaCaptureSession *captureSession); |
39 | |
40 | QPlatformVideoFrameInput *platformVideoFrameInput() const; |
41 | |
42 | friend class QMediaCaptureSession; |
43 | Q_DISABLE_COPY(QVideoFrameInput) |
44 | Q_DECLARE_PRIVATE(QVideoFrameInput) |
45 | }; |
46 | |
47 | QT_END_NAMESPACE |
48 | |
49 | #endif // QVIDEOFRAMEINPUT_H |
50 |