1 | // Copyright (C) 2023 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 QIMAGEVIDEOBUFFER_P_H |
5 | #define QIMAGEVIDEOBUFFER_P_H |
6 | |
7 | #include <qabstractvideobuffer.h> |
8 | #include <qimage.h> |
9 | |
10 | // |
11 | // W A R N I N G |
12 | // ------------- |
13 | // |
14 | // This file is not part of the Qt API. It exists purely as an |
15 | // implementation detail. This header file may change from version to |
16 | // version without notice, or even be removed. |
17 | // |
18 | // We mean it. |
19 | // |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | class Q_MULTIMEDIA_EXPORT QImageVideoBuffer : public QAbstractVideoBuffer |
24 | { |
25 | public: |
26 | QImageVideoBuffer(QImage image); |
27 | |
28 | MapData map(QVideoFrame::MapMode mode) override; |
29 | |
30 | QVideoFrameFormat format() const override { return {}; } |
31 | |
32 | QImage underlyingImage() const; |
33 | |
34 | private: |
35 | QImage m_image; |
36 | }; |
37 | |
38 | QT_END_NAMESPACE |
39 | |
40 | #endif // QIMAGEVIDEOBUFFER_P_H |
41 | |