Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qcvimagevideobuffer_p.h
Go to the documentation of this file.
1// Copyright (C) 2025 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 QCVIMAGEVIDEOBUFFER_P_H
5#define QCVIMAGEVIDEOBUFFER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qtconfigmacros.h>
19
20#include <QtMultimedia/private/qavfhelpers_p.h>
21#include <QtMultimedia/qabstractvideobuffer.h>
22
23#include <CoreVideo/CoreVideo.h>
24
25QT_BEGIN_NAMESPACE
26
27namespace QFFmpeg {
28
30{
31public:
32 explicit CVImageVideoBuffer(QAVFHelpers::QSharedCVPixelBuffer &&);
33
35
36 CVImageVideoBuffer::MapData map(QVideoFrame::MapMode mode) override;
37
38 void unmap() override;
39
40 QVideoFrameFormat format() const override { return {}; }
41
42private:
43 QAVFHelpers::QSharedCVPixelBuffer m_buffer;
44 QVideoFrame::MapMode m_mode = QVideoFrame::NotMapped;
45};
46
47}
48
49QT_END_NAMESPACE
50
51#endif // QCVIMAGEVIDEOBUFFER_P_H
QVideoFrameFormat format() const override
Gets \l QVideoFrameFormat of the underlying video buffer.
CVImageVideoBuffer::MapData map(QVideoFrame::MapMode mode) override
Maps the planes of a video buffer to memory.
CVImageVideoBuffer(QAVFHelpers::QSharedCVPixelBuffer &&)
void unmap() override
Releases the memory mapped by the map() function.
std::conditional_t< QT_FFMPEG_AVIO_WRITE_CONST, const uint8_t *, uint8_t * > AvioWriteBufferType