PipeWire: spa/param/param.h Source File

PipeWire 0.3.64

Loading...
Searching...
No Matches
param.h
Go to the documentation of this file.
1/* Simple Plugin API
2 *
3 * Copyright © 2018 Wim Taymans
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
14 * Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25#ifndef SPA_PARAM_H
26#define SPA_PARAM_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
41#include <spa/utils/defs.h>
42
44enum spa_param_type {
45 SPA_PARAM_Invalid,
46 SPA_PARAM_PropInfo,
47 SPA_PARAM_Props,
48 SPA_PARAM_EnumFormat,
49 SPA_PARAM_Format,
50 SPA_PARAM_Buffers,
51 SPA_PARAM_Meta,
52 SPA_PARAM_IO,
53 SPA_PARAM_EnumProfile,
54 SPA_PARAM_Profile,
55 SPA_PARAM_EnumPortConfig,
56 SPA_PARAM_PortConfig,
57 SPA_PARAM_EnumRoute,
58 SPA_PARAM_Route,
59 SPA_PARAM_Control,
60 SPA_PARAM_Latency,
61 SPA_PARAM_ProcessLatency,
62};
63
65 struct spa_param_info {
66 uint32_t id;
67#define SPA_PARAM_INFO_SERIAL (1<<0)
69#define SPA_PARAM_INFO_READ (1<<1)
70#define SPA_PARAM_INFO_WRITE (1<<2)
71#define SPA_PARAM_INFO_READWRITE (SPA_PARAM_INFO_WRITE|SPA_PARAM_INFO_READ)
72 uint32_t flags;
73 uint32_t user;
75 int32_t seq;
77 uint32_t padding[4];
78};
79
80#define SPA_PARAM_INFO(id,flags) ((struct spa_param_info){ (id), (flags) })
81
83enum spa_param_buffers {
84 SPA_PARAM_BUFFERS_START,
85 SPA_PARAM_BUFFERS_buffers,
86 SPA_PARAM_BUFFERS_blocks,
87 SPA_PARAM_BUFFERS_size,
88 SPA_PARAM_BUFFERS_stride,
89 SPA_PARAM_BUFFERS_align,
90 SPA_PARAM_BUFFERS_dataType,
91};
92
94 enum spa_param_meta {
95 SPA_PARAM_META_START,
96 SPA_PARAM_META_type,
97 SPA_PARAM_META_size,
98};
99
101enum spa_param_io {
102 SPA_PARAM_IO_START,
103 SPA_PARAM_IO_id,
104 SPA_PARAM_IO_size,
105};
106
107 enum spa_param_availability {
108 SPA_PARAM_AVAILABILITY_unknown,
109 SPA_PARAM_AVAILABILITY_no,
110 SPA_PARAM_AVAILABILITY_yes,
111};
112
114 enum spa_param_profile {
115 SPA_PARAM_PROFILE_START,
116 SPA_PARAM_PROFILE_index,
117 SPA_PARAM_PROFILE_name,
118 SPA_PARAM_PROFILE_description,
119 SPA_PARAM_PROFILE_priority,
120 SPA_PARAM_PROFILE_available,
122 SPA_PARAM_PROFILE_info,
126 SPA_PARAM_PROFILE_classes,
135 SPA_PARAM_PROFILE_save,
136};
137
138enum spa_param_port_config_mode {
139 SPA_PARAM_PORT_CONFIG_MODE_none,
140 SPA_PARAM_PORT_CONFIG_MODE_passthrough,
141 SPA_PARAM_PORT_CONFIG_MODE_convert,
142 SPA_PARAM_PORT_CONFIG_MODE_dsp,
145};
146
148 enum spa_param_port_config {
149 SPA_PARAM_PORT_CONFIG_START,
150 SPA_PARAM_PORT_CONFIG_direction,
151 SPA_PARAM_PORT_CONFIG_mode,
152 SPA_PARAM_PORT_CONFIG_monitor,
153 SPA_PARAM_PORT_CONFIG_control,
154 SPA_PARAM_PORT_CONFIG_format,
155};
156
158 enum spa_param_route {
159 SPA_PARAM_ROUTE_START,
160 SPA_PARAM_ROUTE_index,
161 SPA_PARAM_ROUTE_direction,
162 SPA_PARAM_ROUTE_device,
163 SPA_PARAM_ROUTE_name,
164 SPA_PARAM_ROUTE_description,
165 SPA_PARAM_ROUTE_priority,
166 SPA_PARAM_ROUTE_available,
168 SPA_PARAM_ROUTE_info,
172 SPA_PARAM_ROUTE_profiles,
173 SPA_PARAM_ROUTE_props,
174 SPA_PARAM_ROUTE_devices,
175 SPA_PARAM_ROUTE_profile,
176 SPA_PARAM_ROUTE_save,
177};
178
179
181 enum spa_param_latency {
182 SPA_PARAM_LATENCY_START,
183 SPA_PARAM_LATENCY_direction,
184 SPA_PARAM_LATENCY_minQuantum,
185 SPA_PARAM_LATENCY_maxQuantum,
186 SPA_PARAM_LATENCY_minRate,
187 SPA_PARAM_LATENCY_maxRate,
188 SPA_PARAM_LATENCY_minNs,
189 SPA_PARAM_LATENCY_maxNs,
190};
191
193 enum spa_param_process_latency {
194 SPA_PARAM_PROCESS_LATENCY_START,
195 SPA_PARAM_PROCESS_LATENCY_quantum,
196 SPA_PARAM_PROCESS_LATENCY_rate,
197 SPA_PARAM_PROCESS_LATENCY_ns,
198};
199
200enum spa_param_bitorder {
201 SPA_PARAM_BITORDER_unknown,
202 SPA_PARAM_BITORDER_msb,
203 SPA_PARAM_BITORDER_lsb,
204};
205
210#ifdef __cplusplus
211} /* extern "C" */
212#endif
213
214#endif /* SPA_PARAM_H */
defs.h
spa/utils/defs.h
spa_param_meta
spa_param_meta
properties for SPA_TYPE_OBJECT_ParamMeta
Definition: param.h:104
spa_param_bitorder
spa_param_bitorder
Definition: param.h:210
spa_param_port_config_mode
spa_param_port_config_mode
Definition: param.h:148
spa_param_type
spa_param_type
different parameter types that can be queried
Definition: param.h:49
spa_param_process_latency
spa_param_process_latency
properties for SPA_TYPE_OBJECT_ParamProcessLatency
Definition: param.h:203
spa_param_port_config
spa_param_port_config
properties for SPA_TYPE_OBJECT_ParamPortConfig
Definition: param.h:158
spa_param_latency
spa_param_latency
properties for SPA_TYPE_OBJECT_ParamLatency
Definition: param.h:191
spa_param_route
spa_param_route
properties for SPA_TYPE_OBJECT_ParamRoute
Definition: param.h:168
spa_param_io
spa_param_io
properties for SPA_TYPE_OBJECT_ParamIO
Definition: param.h:111
spa_param_profile
spa_param_profile
properties for SPA_TYPE_OBJECT_ParamProfile
Definition: param.h:124
spa_param_availability
spa_param_availability
Definition: param.h:117
spa_param_buffers
spa_param_buffers
properties for SPA_TYPE_OBJECT_ParamBuffers
Definition: param.h:93
SPA_PARAM_META_START
@ SPA_PARAM_META_START
Definition: param.h:105
SPA_PARAM_META_size
@ SPA_PARAM_META_size
the expected maximum size the meta (Int)
Definition: param.h:107
SPA_PARAM_META_type
@ SPA_PARAM_META_type
the metadata, one of enum spa_meta_type (Id enum spa_meta_type)
Definition: param.h:106
SPA_PARAM_BITORDER_unknown
@ SPA_PARAM_BITORDER_unknown
unknown bitorder
Definition: param.h:211
SPA_PARAM_BITORDER_msb
@ SPA_PARAM_BITORDER_msb
most significant bit
Definition: param.h:212
SPA_PARAM_BITORDER_lsb
@ SPA_PARAM_BITORDER_lsb
least significant bit
Definition: param.h:213
SPA_PARAM_PORT_CONFIG_MODE_convert
@ SPA_PARAM_PORT_CONFIG_MODE_convert
convert configuration
Definition: param.h:151
SPA_PARAM_PORT_CONFIG_MODE_none
@ SPA_PARAM_PORT_CONFIG_MODE_none
no configuration
Definition: param.h:149
SPA_PARAM_PORT_CONFIG_MODE_dsp
@ SPA_PARAM_PORT_CONFIG_MODE_dsp
dsp configuration, depending on the external format.
Definition: param.h:152
SPA_PARAM_PORT_CONFIG_MODE_passthrough
@ SPA_PARAM_PORT_CONFIG_MODE_passthrough
passthrough configuration
Definition: param.h:150
SPA_PARAM_Route
@ SPA_PARAM_Route
routing configuration as SPA_TYPE_OBJECT_ParamRoute
Definition: param.h:63
SPA_PARAM_Format
@ SPA_PARAM_Format
configured format as SPA_TYPE_OBJECT_Format
Definition: param.h:54
SPA_PARAM_EnumRoute
@ SPA_PARAM_EnumRoute
routing enumeration as SPA_TYPE_OBJECT_ParamRoute
Definition: param.h:62
SPA_PARAM_Meta
@ SPA_PARAM_Meta
allowed metadata for buffers as SPA_TYPE_OBJECT_ParamMeta
Definition: param.h:56
SPA_PARAM_IO
@ SPA_PARAM_IO
configurable IO areas as SPA_TYPE_OBJECT_ParamIO
Definition: param.h:57
SPA_PARAM_EnumProfile
@ SPA_PARAM_EnumProfile
profile enumeration as SPA_TYPE_OBJECT_ParamProfile
Definition: param.h:58
SPA_PARAM_EnumPortConfig
@ SPA_PARAM_EnumPortConfig
port configuration enumeration as SPA_TYPE_OBJECT_ParamPortConfig
Definition: param.h:60
SPA_PARAM_EnumFormat
@ SPA_PARAM_EnumFormat
available formats as SPA_TYPE_OBJECT_Format
Definition: param.h:53
SPA_PARAM_Profile
@ SPA_PARAM_Profile
profile configuration as SPA_TYPE_OBJECT_ParamProfile
Definition: param.h:59
SPA_PARAM_Latency
@ SPA_PARAM_Latency
latency reporting, a SPA_TYPE_OBJECT_ParamLatency
Definition: param.h:65
SPA_PARAM_PortConfig
@ SPA_PARAM_PortConfig
port configuration as SPA_TYPE_OBJECT_ParamPortConfig
Definition: param.h:61
SPA_PARAM_Control
@ SPA_PARAM_Control
Control parameter, a SPA_TYPE_Sequence.
Definition: param.h:64
SPA_PARAM_Props
@ SPA_PARAM_Props
properties as SPA_TYPE_OBJECT_Props
Definition: param.h:52
SPA_PARAM_PropInfo
@ SPA_PARAM_PropInfo
property information as SPA_TYPE_OBJECT_PropInfo
Definition: param.h:51
SPA_PARAM_Buffers
@ SPA_PARAM_Buffers
buffer configurations as SPA_TYPE_OBJECT_ParamBuffers
Definition: param.h:55
SPA_PARAM_ProcessLatency
@ SPA_PARAM_ProcessLatency
processing latency, a SPA_TYPE_OBJECT_ParamProcessLatency
Definition: param.h:66
SPA_PARAM_Invalid
@ SPA_PARAM_Invalid
invalid
Definition: param.h:50
SPA_PARAM_PROCESS_LATENCY_rate
@ SPA_PARAM_PROCESS_LATENCY_rate
latency (Int) relative to rate
Definition: param.h:206
SPA_PARAM_PROCESS_LATENCY_START
@ SPA_PARAM_PROCESS_LATENCY_START
Definition: param.h:204
SPA_PARAM_PROCESS_LATENCY_ns
@ SPA_PARAM_PROCESS_LATENCY_ns
latency (Long) in nanoseconds
Definition: param.h:207
SPA_PARAM_PROCESS_LATENCY_quantum
@ SPA_PARAM_PROCESS_LATENCY_quantum
latency relative to quantum (Float)
Definition: param.h:205
SPA_PARAM_PORT_CONFIG_mode
@ SPA_PARAM_PORT_CONFIG_mode
(Id enum spa_param_port_config_mode) mode
Definition: param.h:161
SPA_PARAM_PORT_CONFIG_format
@ SPA_PARAM_PORT_CONFIG_format
(Object) format filter
Definition: param.h:164
SPA_PARAM_PORT_CONFIG_monitor
@ SPA_PARAM_PORT_CONFIG_monitor
(Bool) enable monitor output ports on input ports
Definition: param.h:162
SPA_PARAM_PORT_CONFIG_control
@ SPA_PARAM_PORT_CONFIG_control
(Bool) enable control ports
Definition: param.h:163
SPA_PARAM_PORT_CONFIG_direction
@ SPA_PARAM_PORT_CONFIG_direction
direction, input/output (Id enum spa_direction)
Definition: param.h:160
SPA_PARAM_PORT_CONFIG_START
@ SPA_PARAM_PORT_CONFIG_START
Definition: param.h:159
SPA_PARAM_LATENCY_maxNs
@ SPA_PARAM_LATENCY_maxNs
max latency (Long) in nanoseconds
Definition: param.h:199
SPA_PARAM_LATENCY_minRate
@ SPA_PARAM_LATENCY_minRate
min latency (Int) relative to rate
Definition: param.h:196
SPA_PARAM_LATENCY_minQuantum
@ SPA_PARAM_LATENCY_minQuantum
min latency relative to quantum (Float)
Definition: param.h:194
SPA_PARAM_LATENCY_START
@ SPA_PARAM_LATENCY_START
Definition: param.h:192
SPA_PARAM_LATENCY_maxRate
@ SPA_PARAM_LATENCY_maxRate
max latency (Int) relative to rate
Definition: param.h:197
SPA_PARAM_LATENCY_maxQuantum
@ SPA_PARAM_LATENCY_maxQuantum
max latency relative to quantum (Float)
Definition: param.h:195
SPA_PARAM_LATENCY_direction
@ SPA_PARAM_LATENCY_direction
direction, input/output (Id enum spa_direction)
Definition: param.h:193
SPA_PARAM_LATENCY_minNs
@ SPA_PARAM_LATENCY_minNs
min latency (Long) in nanoseconds
Definition: param.h:198
SPA_PARAM_ROUTE_START
@ SPA_PARAM_ROUTE_START
Definition: param.h:169
SPA_PARAM_ROUTE_save
@ SPA_PARAM_ROUTE_save
If route should be saved (Bool)
Definition: param.h:186
SPA_PARAM_ROUTE_name
@ SPA_PARAM_ROUTE_name
name of the routing destination (String)
Definition: param.h:173
SPA_PARAM_ROUTE_available
@ SPA_PARAM_ROUTE_available
availability of the destination (Id enum spa_param_availability)
Definition: param.h:176
SPA_PARAM_ROUTE_props
@ SPA_PARAM_ROUTE_props
properties SPA_TYPE_OBJECT_Props
Definition: param.h:183
SPA_PARAM_ROUTE_device
@ SPA_PARAM_ROUTE_device
device id (Int)
Definition: param.h:172
SPA_PARAM_ROUTE_priority
@ SPA_PARAM_ROUTE_priority
priority of the destination (Int)
Definition: param.h:175
SPA_PARAM_ROUTE_index
@ SPA_PARAM_ROUTE_index
index of the routing destination (Int)
Definition: param.h:170
SPA_PARAM_ROUTE_direction
@ SPA_PARAM_ROUTE_direction
direction, input/output (Id enum spa_direction)
Definition: param.h:171
SPA_PARAM_ROUTE_profiles
@ SPA_PARAM_ROUTE_profiles
associated profile indexes (Array of Int)
Definition: param.h:182
SPA_PARAM_ROUTE_profile
@ SPA_PARAM_ROUTE_profile
profile id (Int)
Definition: param.h:185
SPA_PARAM_ROUTE_devices
@ SPA_PARAM_ROUTE_devices
associated device indexes (Array of Int)
Definition: param.h:184
SPA_PARAM_ROUTE_description
@ SPA_PARAM_ROUTE_description
description of the destination (String)
Definition: param.h:174
SPA_PARAM_ROUTE_info
@ SPA_PARAM_ROUTE_info
info (Struct( Int : n_items, (Str...
Definition: param.h:178
SPA_PARAM_IO_id
@ SPA_PARAM_IO_id
type ID, uniquely identifies the io area (Id enum spa_io_type)
Definition: param.h:113
SPA_PARAM_IO_START
@ SPA_PARAM_IO_START
Definition: param.h:112
SPA_PARAM_IO_size
@ SPA_PARAM_IO_size
size of the io area (Int)
Definition: param.h:114
SPA_PARAM_PROFILE_description
@ SPA_PARAM_PROFILE_description
profile description (String)
Definition: param.h:128
SPA_PARAM_PROFILE_save
@ SPA_PARAM_PROFILE_save
If profile should be saved (Bool)
Definition: param.h:145
SPA_PARAM_PROFILE_priority
@ SPA_PARAM_PROFILE_priority
profile priority (Int)
Definition: param.h:129
SPA_PARAM_PROFILE_info
@ SPA_PARAM_PROFILE_info
info (Struct( Int : n_items, (Str...
Definition: param.h:132
SPA_PARAM_PROFILE_START
@ SPA_PARAM_PROFILE_START
Definition: param.h:125
SPA_PARAM_PROFILE_classes
@ SPA_PARAM_PROFILE_classes
node classes provided by this profile (Struct( Int : number of items following Struct( String : class...
Definition: param.h:136
SPA_PARAM_PROFILE_available
@ SPA_PARAM_PROFILE_available
availability of the profile (Id enum spa_param_availability)
Definition: param.h:130
SPA_PARAM_PROFILE_name
@ SPA_PARAM_PROFILE_name
profile name (String)
Definition: param.h:127
SPA_PARAM_PROFILE_index
@ SPA_PARAM_PROFILE_index
profile index (Int)
Definition: param.h:126
SPA_PARAM_AVAILABILITY_unknown
@ SPA_PARAM_AVAILABILITY_unknown
unknown availability
Definition: param.h:118
SPA_PARAM_AVAILABILITY_yes
@ SPA_PARAM_AVAILABILITY_yes
available
Definition: param.h:120
SPA_PARAM_AVAILABILITY_no
@ SPA_PARAM_AVAILABILITY_no
not available
Definition: param.h:119
SPA_PARAM_BUFFERS_dataType
@ SPA_PARAM_BUFFERS_dataType
possible memory types (Int, mask of enum spa_data_type)
Definition: param.h:100
SPA_PARAM_BUFFERS_size
@ SPA_PARAM_BUFFERS_size
size of a data block memory (Int)
Definition: param.h:97
SPA_PARAM_BUFFERS_START
@ SPA_PARAM_BUFFERS_START
Definition: param.h:94
SPA_PARAM_BUFFERS_stride
@ SPA_PARAM_BUFFERS_stride
stride of data block memory (Int)
Definition: param.h:98
SPA_PARAM_BUFFERS_align
@ SPA_PARAM_BUFFERS_align
alignment of data block memory (Int)
Definition: param.h:99
SPA_PARAM_BUFFERS_blocks
@ SPA_PARAM_BUFFERS_blocks
number of data blocks per buffer (Int)
Definition: param.h:96
SPA_PARAM_BUFFERS_buffers
@ SPA_PARAM_BUFFERS_buffers
number of buffers (Int)
Definition: param.h:95
spa_param_info
information about a parameter
Definition: param.h:70
spa_param_info::flags
uint32_t flags
Definition: param.h:81
spa_param_info::padding
uint32_t padding[4]
Definition: param.h:86
spa_param_info::user
uint32_t user
private user field.
Definition: param.h:82
spa_param_info::id
uint32_t id
enum spa_param_type
Definition: param.h:71
spa_param_info::seq
int32_t seq
private seq field.
Definition: param.h:84