Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
25
QT_BEGIN_NAMESPACE
26
27
namespace
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.
31
class
Q_MULTIMEDIA_EXPORT
QDmaBuf
32
{
33
public
:
34
QDmaBuf
(
QUniqueFileDescriptorHandle
fd
,
qsizetype
size
);
35
36
int
fd
()
const
{
return
m_fd
.
get
(); }
37
qsizetype
size
()
const
{
return
m_size
; }
38
39
private
:
40
QUniqueFileDescriptorHandle
m_fd
;
41
const
qsizetype
m_size
= 0;
42
};
43
44
class
Q_MULTIMEDIA_EXPORT
QDmaBufAllocator
45
{
46
public
:
47
static
q23
::
expected
<
QDmaBufAllocator
,
QString
>
create
();
48
49
q23
::
expected
<
std
::
shared_ptr
<
QDmaBuf
>,
QString
>
allocate
(
qsizetype
size
)
const
;
50
51
private
:
52
enum
class
Provider
:
uint8_t
{
53
DmaHeap
,
// /dev/dma_heap/system, may not be accessible as user
54
UDmaBuf
,
55
};
56
57
QDmaBufAllocator
(
QUniqueFileDescriptorHandle
providerFd
,
Provider
provider
);
58
59
QUniqueFileDescriptorHandle
m_providerFd
;
60
const
Provider
m_provider
;
61
};
62
63
}
// namespace QtMultimediaPrivate
64
65
QT_END_NAMESPACE
66
67
#
endif
// QDMABUFALLOCATOR_P_H
QtMultimediaPrivate::QDmaBufAllocator
Definition
qdmabufallocator_p.h:45
QtMultimediaPrivate::QDmaBuf
Definition
qdmabufallocator_p.h:32
QtMultimediaPrivate::impl
Definition
qaudiosystem_p.h:257
__has_include
#define __has_include(x)
Definition
qcompilerdetection.h:459
qtmultimedia
src
multimedia
video
qdmabufallocator_p.h
Generated on
for Qt by
1.18.0