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
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
24QT_BEGIN_NAMESPACE
25
26namespace QtPipeWire {
27
29{
30 qreal fps; // Used as stream frame rate
31 spa_fraction frac; // Used as pipewire frame rate
32};
33
34Q_MULTIMEDIA_EXPORT FrameRate rateFromFps(qreal fps);
35
37Q_MULTIMEDIA_EXPORT spa_video_format toSpaVideoFormat(QVideoFrameFormat::PixelFormat);
38
39inline QSize toQSize(spa_rectangle rect)
40{
41 return QSize{
42 int(rect.width),
43 int(rect.height),
44 };
45}
46
47} // namespace QtPipeWire
48
49QT_END_NAMESPACE
50
51#endif // QPIPEWIRE_VIDEOFORMAT_SUPPORT_P_H
spa_video_format toSpaVideoFormat(QVideoFrameFormat::PixelFormat pixelFormat)
FrameRate rateFromFps(qreal fps)
QSize toQSize(spa_rectangle rect)
QVideoFrameFormat::PixelFormat toQtPixelFormat(spa_video_format spaVideoFormat)