diff options
Diffstat (limited to 'src/multimedia/recording/qvideoframeinput.h')
-rw-r--r-- | src/multimedia/recording/qvideoframeinput.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/multimedia/recording/qvideoframeinput.h b/src/multimedia/recording/qvideoframeinput.h new file mode 100644 index 000000000..fbe56b7db --- /dev/null +++ b/src/multimedia/recording/qvideoframeinput.h @@ -0,0 +1,48 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QVIDEOFRAMEINPUT_H +#define QVIDEOFRAMEINPUT_H + +#include <QtMultimedia/qtmultimediaexports.h> +#include <QtMultimedia/qvideoframe.h> +#include <QtCore/qobject.h> + +QT_BEGIN_NAMESPACE + +class QPlatformVideoFrameInput; +class QVideoFrameInputPrivate; +class QMediaCaptureSession; + +class Q_MULTIMEDIA_EXPORT QVideoFrameInput : public QObject +{ + Q_OBJECT +public: + explicit QVideoFrameInput(QObject *parent = nullptr); + + explicit QVideoFrameInput(const QVideoFrameFormat &format, QObject *parent = nullptr); + + ~QVideoFrameInput() override; + + bool sendVideoFrame(const QVideoFrame &frame); + + QVideoFrameFormat format() const; + + QMediaCaptureSession *captureSession() const; + +Q_SIGNALS: + void readyToSendVideoFrame(); + +private: + void setCaptureSession(QMediaCaptureSession *captureSession); + + QPlatformVideoFrameInput *platformVideoFrameInput() const; + + friend class QMediaCaptureSession; + Q_DISABLE_COPY(QVideoFrameInput) + Q_DECLARE_PRIVATE(QVideoFrameInput) +}; + +QT_END_NAMESPACE + +#endif // QVIDEOFRAMEINPUT_H |