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
qmemoryvideobuffer_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 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
QMEMORYVIDEOBUFFER_P_H
5
#
define
QMEMORYVIDEOBUFFER_P_H
6
7
#
include
"qabstractvideobuffer.h"
8
9
#
include
<
QtCore
/
qbytearray
.
h
>
10
#
include
<
QtCore
/
qvarlengtharray
.
h
>
11
12
#
include
<
memory
>
13
14
//
15
// W A R N I N G
16
// -------------
17
//
18
// This file is not part of the Qt API. It exists purely as an
19
// implementation detail. This header file may change from version to
20
// version without notice, or even be removed.
21
//
22
// We mean it.
23
//
24
25
QT_BEGIN_NAMESPACE
26
27
class
Q_MULTIMEDIA_EXPORT
QMemoryVideoBuffer
:
public
QAbstractVideoBuffer
28
{
29
public
:
30
QMemoryVideoBuffer(QByteArray data,
int
bytesPerLine);
31
~QMemoryVideoBuffer() override;
32
33
MapData map(QVideoFrame::MapMode mode) override;
34
35
QVideoFrameFormat format()
const
override {
return
{}; }
36
37
private
:
38
int
m_bytesPerLine = 0;
39
QByteArray m_data;
40
};
41
42
class
Q_MULTIMEDIA_EXPORT
QMultiPlaneMemoryVideoBuffer
:
public
QAbstractVideoBuffer
43
{
44
public
:
45
struct
Plane
46
{
47
QByteArray data;
48
int
bytesPerLine = 0;
49
};
50
51
explicit
QMultiPlaneMemoryVideoBuffer(QVarLengthArray<Plane, 4> planes);
52
~QMultiPlaneMemoryVideoBuffer() override;
53
54
// Copies every plane reported by source.map(ReadOnly). Returns nullptr if the source has no data.
55
static
std::unique_ptr<QMultiPlaneMemoryVideoBuffer> copyFrom(QAbstractVideoBuffer &source);
56
57
MapData map(QVideoFrame::MapMode mode) override;
58
59
QVideoFrameFormat format()
const
override {
return
{}; }
60
61
private
:
62
QVarLengthArray<Plane, 4> m_planes;
63
};
64
65
QT_END_NAMESPACE
66
67
68
#
endif
QMemoryVideoBuffer
The QMemoryVideoBuffer class provides a system memory allocated video data buffer.
Definition
qmemoryvideobuffer_p.h:28
QMultiPlaneMemoryVideoBuffer
Holds the planes of a video frame in CPU memory, one QByteArray per plane.
Definition
qmemoryvideobuffer_p.h:43
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtmultimedia
src
multimedia
video
qmemoryvideobuffer_p.h
Generated on
for Qt by
1.18.0