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
qpipewire_videoformat_support_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
QPIPEWIRE_VIDEOFORMAT_SUPPORT_P_H
5
#
define
QPIPEWIRE_VIDEOFORMAT_SUPPORT_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
<
QtMultimedia
/
qvideoframeformat
.
h
>
20
21
#
include
<
spa
/
param
/
video
/
raw
.
h
>
22
#
include
<
spa
/
utils
/
defs
.
h
>
23
24
QT_BEGIN_NAMESPACE
25
26
namespace
QtPipeWire
{
27
28
struct
FrameRate
29
{
30
qreal
fps
;
// Used as stream frame rate
31
spa_fraction
frac
;
// Used as pipewire frame rate
32
};
33
34
Q_MULTIMEDIA_EXPORT FrameRate
rateFromFps
(
qreal
fps
);
35
36
Q_MULTIMEDIA_EXPORT
QVideoFrameFormat
::
PixelFormat
toQtPixelFormat
(
spa_video_format
);
37
Q_MULTIMEDIA_EXPORT spa_video_format
toSpaVideoFormat
(
QVideoFrameFormat
::
PixelFormat
);
38
39
constexpr
QSize
toQSize
(spa_rectangle rect)
40
{
41
return
QSize{
42
int
(rect.width),
43
int
(rect.height),
44
};
45
}
46
47
constexpr
spa_rectangle
toSpaRectangle
(QSize size)
48
{
49
return
spa_rectangle{
50
.width = uint32_t(size.width()),
51
.height = uint32_t(size.height()),
52
};
53
}
54
55
}
// namespace QtPipeWire
56
57
QT_END_NAMESPACE
58
59
#
endif
// QPIPEWIRE_VIDEOFORMAT_SUPPORT_P_H
QtPipeWire
Definition
qpipewire_async_support.cpp:10
QtPipeWire::toSpaVideoFormat
spa_video_format toSpaVideoFormat(QVideoFrameFormat::PixelFormat pixelFormat)
Definition
qpipewire_videoformat_support.cpp:94
QtPipeWire::rateFromFps
FrameRate rateFromFps(qreal fps)
Definition
qpipewire_videoformat_support.cpp:13
QtPipeWire::toQtPixelFormat
QVideoFrameFormat::PixelFormat toQtPixelFormat(spa_video_format spaVideoFormat)
Definition
qpipewire_videoformat_support.cpp:39
QtPipeWire::toSpaRectangle
constexpr spa_rectangle toSpaRectangle(QSize size)
Definition
qpipewire_videoformat_support_p.h:47
QtPipeWire::toQSize
constexpr QSize toQSize(spa_rectangle rect)
Definition
qpipewire_videoformat_support_p.h:39
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
QtPipeWire::FrameRate
Definition
qpipewire_videoformat_support_p.h:29
QtPipeWire::FrameRate::fps
qreal fps
Definition
qpipewire_videoformat_support_p.h:30
QtPipeWire::FrameRate::frac
spa_fraction frac
Definition
qpipewire_videoformat_support_p.h:31
qtmultimedia
src
multimedia
pipewire
qpipewire_videoformat_support_p.h
Generated on
for Qt by
1.18.0