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
10QT_BEGIN_NAMESPACE
11
12class QPlatformVideoFrameInput;
13class QVideoFrameInputPrivate;
14class QMediaCaptureSession;
15class QVideoFrame;
16class QVideoFrameFormat;
17
18class Q_MULTIMEDIA_EXPORT QVideoFrameInput : public QObject
19{
20 Q_OBJECT
21public:
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
34Q_SIGNALS:
35 void readyToSendVideoFrame();
36
37private:
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
47QT_END_NAMESPACE
48
49#endif // QVIDEOFRAMEINPUT_H
50

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

source code of qtmultimedia/src/multimedia/recording/qvideoframeinput.h