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
28
static_assert
(QT_CONFIG(linux_dmabuf));
29
30
QT_BEGIN_NAMESPACE
31
32
class
QRhi;
33
34
namespace
QtMultimediaPrivate
{
35
36
class
Q_MULTIMEDIA_EXPORT QDmaBufVideoBuffer
final
:
public
QHwVideoBuffer
37
{
38
public
:
39
QDmaBufVideoBuffer
(
QVideoFrameFormat
::
PixelFormat
format
,
QSize
size
,
40
QSpan
<
const
DmaBufPlane
>
planes
,
std
::
shared_ptr
<
void
>
keepAlive
= {});
41
~
QDmaBufVideoBuffer
()
override
;
42
43
bool
isDmaBuf
()
const
override
{
return
true
; }
44
45
QVideoFrameTexturesUPtr
mapTextures
(
QRhi
&
rhi
,
QVideoFrameTexturesUPtr
&
oldTextures
)
override
;
46
47
MapData
map
(
QVideoFrame
::
MapMode
mode
)
override
;
48
void
unmap
()
override
;
49
50
QVideoFrameFormat
::
PixelFormat
pixelFormat
()
const
{
return
m_format
; }
51
QSize
size
()
const
{
return
m_size
; }
52
53
private
:
54
const
QVideoFrameFormat
::
PixelFormat
m_format
;
55
const
QSize
m_size
;
56
std
::
array
<
DmaBufPlane
, 4>
m_planes
;
57
const
int
m_planeCount
= 0;
58
59
const
std
::
shared_ptr
<
void
>
m_keepAlive
;
60
61
QVideoFrame
::
MapMode
m_mapMode
=
QVideoFrame
::
NotMapped
;
62
QVarLengthArray
<
std
::
pair
<
void
*,
size_t
>, 4>
m_mappedRegions
;
63
};
64
65
}
// namespace QtMultimediaPrivate
66
67
QT_END_NAMESPACE
68
69
#
endif
// QDMABUFVIDEOBUFFER_P_H
QtMultimediaPrivate
Definition
qaudiosystem_p.h:51
QtMultimediaPrivate::g_eglContexts
static QRhiValueMapper< DmaBufEglContext > g_eglContexts
Definition
qdmabufvideobuffer.cpp:25
Q_STATIC_LOGGING_CATEGORY
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)
MAP_FAILED
#define MAP_FAILED
Definition
qresource.cpp:1189
qtmultimedia
src
multimedia
video
qdmabufvideobuffer_p.h
Generated on
for Qt by
1.16.1