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
qdmabufallocator_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
4#ifndef QDMABUFALLOCATOR_P_H
5#define QDMABUFALLOCATOR_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 <QtMultimedia/private/qtmultimediaglobal_p.h>
19#include <QtCore/qstring.h>
20#include <QtCore/private/qexpected_p.h>
21#include <QtCore/private/quniquehandle_types_p.h>
22
23#include <memory>
24
25QT_BEGIN_NAMESPACE
26
27namespace QtMultimediaPrivate {
28
29// A DMA-BUF that owns its file descriptor. It does not refer to the allocator that
30// created it, so it can outlive the allocator.
31class Q_MULTIMEDIA_EXPORT QDmaBuf
32{
33public:
35
36 int fd() const { return m_fd.get(); }
37 qsizetype size() const { return m_size; }
38
39private:
41 const qsizetype m_size = 0;
42};
43
44class Q_MULTIMEDIA_EXPORT QDmaBufAllocator
45{
46public:
48
50
51private:
52 enum class Provider : uint8_t {
53 DmaHeap, // /dev/dma_heap/system, may not be accessible as user
54 UDmaBuf,
55 };
56
58
60 const Provider m_provider;
61};
62
63} // namespace QtMultimediaPrivate
64
65QT_END_NAMESPACE
66
67#endif // QDMABUFALLOCATOR_P_H
#define __has_include(x)