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_spa_pod_support_p.h
Go to the documentation of this file.
1
// Copyright (C) 2025 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_SPA_POD_SUPPORT_P_H
5
#
define
QPIPEWIRE_SPA_POD_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
/
qaudio_qspan_support_p
.
h
>
19
#
include
<
QtMultimedia
/
private
/
qpipewire_spa_pod_parser_support_p
.
h
>
20
#
include
<
QtMultimedia
/
qaudioformat
.
h
>
21
#
include
<
QtMultimedia
/
qtmultimediaglobal
.
h
>
22
#
include
<
QtCore
/
qglobal
.
h
>
23
#
include
<
QtCore
/
qlist
.
h
>
24
#
include
<
QtCore
/
qspan
.
h
>
25
26
#
if
__has_include
(
<
spa
/
param
/
audio
/
iec958
.
h
>
)
27
#
include
<
spa
/
param
/
audio
/
iec958
.
h
>
28
#
else
29
#
include
<
QtMultimedia
/
private
/
qpipewire_spa_compat_p
.
h
>
30
#
endif
31
#
include
<
spa
/
param
/
audio
/
raw
.
h
>
32
#
include
<
spa
/
pod
/
pod
.
h
>
33
34
QT_BEGIN_NAMESPACE
35
36
namespace
QtPipeWire
{
37
38
struct
Q_MULTIMEDIA_EXPORT
SpaObjectAudioFormat
39
{
40
static
std
::
optional
<
SpaObjectAudioFormat
>
parse
(
const
struct
spa_pod_object
*
obj
);
41
static
std
::
optional
<
SpaObjectAudioFormat
>
parse
(
const
struct
spa_pod
*
pod
);
42
43
int
channelCount
= 0;
44
std
::
optional
<
std
::
variant
<
int
,
std
::
vector
<
int
>,
SpaRange
<
int
>>>
rates
;
45
std
::
variant
<
spa_audio_format
,
SpaEnum
<
spa_audio_format
>,
spa_audio_iec958_codec
>
sampleTypes
;
46
std
::
optional
<
QList
<
spa_audio_channel
>>
channelPositions
;
// COW-able
47
};
48
49
Q_MULTIMEDIA_EXPORT spa_audio_info_raw
asSpaAudioInfoRaw
(
const
QAudioFormat
&);
50
51
inline
constexpr
std
::
array
channelPositionsMono
{
SPA_AUDIO_CHANNEL_MONO
};
52
inline
constexpr
std
::
array
channelPositionsStereo
{
SPA_AUDIO_CHANNEL_FL
,
SPA_AUDIO_CHANNEL_FR
};
53
inline
constexpr
std
::
array
channelPositions2Dot1
{
SPA_AUDIO_CHANNEL_FL
,
SPA_AUDIO_CHANNEL_FR
,
54
SPA_AUDIO_CHANNEL_LFE
};
55
inline
constexpr
std
::
array
channelPositions3Dot0
{
SPA_AUDIO_CHANNEL_FL
,
SPA_AUDIO_CHANNEL_FR
,
56
SPA_AUDIO_CHANNEL_FC
};
57
inline
constexpr
std
::
array
channelPositions3Dot1
{
SPA_AUDIO_CHANNEL_FL
,
SPA_AUDIO_CHANNEL_FR
,
58
SPA_AUDIO_CHANNEL_FC
,
SPA_AUDIO_CHANNEL_LFE
};
59
inline
constexpr
std
::
array
channelPositions5Dot0
{
SPA_AUDIO_CHANNEL_FL
,
SPA_AUDIO_CHANNEL_FR
,
60
SPA_AUDIO_CHANNEL_FC
,
SPA_AUDIO_CHANNEL_RL
,
61
SPA_AUDIO_CHANNEL_RR
};
62
inline
constexpr
std
::
array
channelPositions5Dot1
{
SPA_AUDIO_CHANNEL_FL
,
SPA_AUDIO_CHANNEL_FR
,
63
SPA_AUDIO_CHANNEL_FC
,
SPA_AUDIO_CHANNEL_LFE
,
64
SPA_AUDIO_CHANNEL_RL
,
SPA_AUDIO_CHANNEL_RR
};
65
inline
constexpr
std
::
array
channelPositions7Dot0
{
SPA_AUDIO_CHANNEL_FL
,
SPA_AUDIO_CHANNEL_FR
,
66
SPA_AUDIO_CHANNEL_FC
,
SPA_AUDIO_CHANNEL_RL
,
67
SPA_AUDIO_CHANNEL_RR
,
SPA_AUDIO_CHANNEL_SL
,
68
SPA_AUDIO_CHANNEL_SR
};
69
inline
constexpr
std
::
array
channelPositions7Dot1
{
SPA_AUDIO_CHANNEL_FL
,
SPA_AUDIO_CHANNEL_FR
,
70
SPA_AUDIO_CHANNEL_FC
,
SPA_AUDIO_CHANNEL_LFE
,
71
SPA_AUDIO_CHANNEL_RL
,
SPA_AUDIO_CHANNEL_RR
,
72
SPA_AUDIO_CHANNEL_SL
,
SPA_AUDIO_CHANNEL_SR
};
73
74
}
// namespace QtPipeWire
75
76
QT_END_NAMESPACE
77
78
#
endif
// QPIPEWIRE_SPA_POD_SUPPORT_P_H
QtPipeWire
Definition
qpipewire_async_support.cpp:10
QtPipeWire::channelPositions7Dot1
constexpr std::array channelPositions7Dot1
Definition
qpipewire_spa_pod_support_p.h:69
QtPipeWire::channelPositions3Dot1
constexpr std::array channelPositions3Dot1
Definition
qpipewire_spa_pod_support_p.h:57
QtPipeWire::channelPositions5Dot0
constexpr std::array channelPositions5Dot0
Definition
qpipewire_spa_pod_support_p.h:59
QtPipeWire::channelPositions5Dot1
constexpr std::array channelPositions5Dot1
Definition
qpipewire_spa_pod_support_p.h:62
QtPipeWire::channelPositionsStereo
constexpr std::array channelPositionsStereo
Definition
qpipewire_spa_pod_support_p.h:52
QtPipeWire::channelPositions7Dot0
constexpr std::array channelPositions7Dot0
Definition
qpipewire_spa_pod_support_p.h:65
QtPipeWire::channelPositionsMono
constexpr std::array channelPositionsMono
Definition
qpipewire_spa_pod_support_p.h:51
QtPipeWire::asSpaAudioInfoRaw
spa_audio_info_raw asSpaAudioInfoRaw(const QAudioFormat &fmt)
Definition
qpipewire_spa_pod_support.cpp:219
QtPipeWire::channelPositions2Dot1
constexpr std::array channelPositions2Dot1
Definition
qpipewire_spa_pod_support_p.h:53
QtPipeWire::channelPositions3Dot0
constexpr std::array channelPositions3Dot0
Definition
qpipewire_spa_pod_support_p.h:55
__has_include
#define __has_include(x)
Definition
qcompilerdetection.h:459
SPA_MEDIA_SUBTYPE_iec958
static constexpr spa_media_subtype SPA_MEDIA_SUBTYPE_iec958
Definition
qpipewire_spa_pod_support.cpp:23
SPA_FORMAT_AUDIO_iec958Codec
static constexpr spa_format SPA_FORMAT_AUDIO_iec958Codec
Definition
qpipewire_spa_pod_support.cpp:22
QtPipeWire::SpaObjectAudioFormat
Definition
qpipewire_spa_pod_support_p.h:39
qtmultimedia
src
multimedia
pipewire
qpipewire_spa_pod_support_p.h
Generated on
for Qt by
1.18.0