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
qdmabufvideobuffer_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 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#ifndef QDMABUFVIDEOBUFFER_P_H
4#define QDMABUFVIDEOBUFFER_P_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17
18#include <QtMultimedia/qvideoframeformat.h>
19#include <QtMultimedia/private/qdmabuftextureimporter_p.h>
20#include <QtMultimedia/private/qhwvideobuffer_p.h>
21#include <QtMultimedia/private/qtmultimediaglobal_p.h>
22#include <QtCore/qsize.h>
23#include <QtCore/qspan.h>
24#include <QtCore/qvarlengtharray.h>
25#include <array>
26#include <memory>
27
28static_assert(QT_CONFIG(linux_dmabuf));
29
30QT_BEGIN_NAMESPACE
31
32class QRhi;
33
34namespace QtMultimediaPrivate {
35
36class Q_MULTIMEDIA_EXPORT QDmaBufVideoBuffer final : public QHwVideoBuffer
37{
38public:
40 QSpan<const DmaBufPlane> planes, std::shared_ptr<void> keepAlive = {});
42
43 bool isDmaBuf() const override { return true; }
44
46
48 void unmap() override;
49
51 QSize size() const { return m_size; }
52
53private:
55 const QSize m_size;
57 const int m_planeCount = 0;
58
59 const std::shared_ptr<void> m_keepAlive;
60
63};
64
65} // namespace QtMultimediaPrivate
66
67QT_END_NAMESPACE
68
69#endif // QDMABUFVIDEOBUFFER_P_H
static QRhiValueMapper< DmaBufEglContext > g_eglContexts
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)
#define MAP_FAILED