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