PipeWire  0.3.49
type-info.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_TYPE_INFO_H
26 #define SPA_TYPE_INFO_H
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #include <spa/utils/defs.h>
33 
39 #ifndef SPA_TYPE_ROOT
40 #define SPA_TYPE_ROOT spa_types
41 #endif
42 
43 static inline bool spa_type_is_a(const char *type, const char *parent)
44 {
45  return type != NULL && parent != NULL && strncmp(type, parent, strlen(parent)) == 0;
46 }
47 
48 #include <spa/utils/type.h>
49 
50 /* base for parameter object enumerations */
51 #define SPA_TYPE_INFO_Direction SPA_TYPE_INFO_ENUM_BASE "Direction"
52 #define SPA_TYPE_INFO_DIRECTION_BASE SPA_TYPE_INFO_Direction ":"
53 
54 static const struct spa_type_info spa_type_direction[] = {
57  { 0, 0, NULL, NULL }
58 };
59 
61 #include <spa/node/type-info.h>
63 #include <spa/control/type-info.h>
64 
65 /* base for parameter object enumerations */
66 #define SPA_TYPE_INFO_Choice SPA_TYPE_INFO_ENUM_BASE "Choice"
67 #define SPA_TYPE_INFO_CHOICE_BASE SPA_TYPE_INFO_Choice ":"
68 
69 static const struct spa_type_info spa_type_choice[] = {
75  { 0, 0, NULL, NULL }
76 };
77 
78 static const struct spa_type_info spa_types[] = {
79  /* Basic types */
101 
106 
110 
114 
128 
129  { 0, 0, NULL, NULL }
130 };
131 
136 #ifdef __cplusplus
137 } /* extern "C" */
138 #endif
139 
140 #endif /* SPA_TYPE_INFO_H */
Definition: type.h:93
#define SPA_TYPE_INFO_Event
Definition: type.h:153
uint32_t type
Definition: type.h:163
#define SPA_TYPE_INFO_PARAM_Route
Definition: type-info.h:423
Definition: type.h:87
Definition: type.h:50
Definition: defs.h:91
static const struct spa_type_info spa_type_param_route[]
Definition: type-info.h:427
Definition: type.h:67
Definition: type.h:76
#define SPA_TYPE_INFO_PARAM_Meta
Definition: type-info.h:184
Definition: type.h:61
#define SPA_TYPE_INFO_COMMAND_BASE
Definition: type.h:160
#define SPA_TYPE_INFO_POINTER_BASE
Definition: type.h:145
Definition: type.h:89
Definition: type.h:104
Definition: type.h:59
#define SPA_TYPE_INFO_BASE
Definition: type.h:115
Definition: type.h:66
spa/monitor/type-info.h
static const struct spa_type_info spa_type_device_event[]
Definition: type-info.h:61
flags: default, possible flags,...
Definition: pod.h:171
#define SPA_TYPE_INFO_Pointer
Definition: type.h:143
#define SPA_TYPE_INFO_PARAM_Buffers
Definition: type-info.h:343
Definition: type.h:58
#define SPA_TYPE_INFO_PARAM_Latency
Definition: type-info.h:462
Definition: type.h:83
spa/utils/defs.h
#define SPA_TYPE_INFO_PARAM_Profile
Definition: type-info.h:376
spa/utils/type.h
static const struct spa_type_info spa_type_param_meta[]
Definition: type-info.h:188
Definition: type.h:99
#define SPA_TYPE_INFO_Format
Definition: type-info.h:211
Definition: type.h:162
static const struct spa_type_info spa_type_props[]
Definition: type-info.h:116
static const struct spa_type_info spa_types[]
Definition: type-info.h:88
#define SPA_TYPE_INFO_Pod
Definition: type.h:128
#define SPA_TYPE_INFO_PARAM_ProcessLatency
Definition: type-info.h:479
Definition: type.h:62
static const struct spa_type_info spa_type_node_command[]
Definition: type-info.h:105
Definition: type.h:103
Definition: type.h:102
#define SPA_TYPE_INFO_Command
Definition: type.h:158
#define SPA_TYPE_INFO_Struct
Definition: type.h:133
static const struct spa_type_info spa_type_param_latency[]
Definition: type-info.h:466
static const struct spa_type_info spa_type_format[]
Definition: type-info.h:294
static const struct spa_type_info spa_type_param_io[]
Definition: type-info.h:203
Definition: type.h:63
spa/param/type-info.h
Definition: type.h:52
Definition: type.h:95
#define SPA_TYPE_INFO_DIRECTION_BASE
Definition: type-info.h:60
#define SPA_TYPE_INFO_PARAM_IO
Base for parameters that describe IO areas to exchange data, control and properties with a node...
Definition: type-info.h:199
Definition: type.h:97
uint32_t parent
Definition: type.h:164
Definition: type.h:56
#define SPA_TYPE_INFO_Profiler
Definition: type-info.h:448
#define SPA_TYPE_INFO_PARAM_PortConfig
Definition: type-info.h:407
Definition: type.h:75
Definition: type.h:77
no choice, first value is current
Definition: pod.h:167
Definition: type.h:57
list: default, alternative,...
Definition: pod.h:170
Definition: type.h:96
range: default, min, max
Definition: pod.h:168
static const struct spa_type_info spa_type_param_buffers[]
Definition: type-info.h:352
Definition: type.h:98
static const struct spa_type_info spa_type_direction[]
Definition: type-info.h:62
Definition: type.h:70
Definition: type.h:53
Definition: type.h:65
#define SPA_TYPE_INFO_CHOICE_BASE
Definition: type-info.h:77
range with step: default, min, max, step
Definition: pod.h:169
static const struct spa_type_info spa_type_choice[]
Definition: type-info.h:79
static const struct spa_type_info spa_type_param_process_latency[]
Definition: type-info.h:483
Definition: type.h:54
Definition: defs.h:92
Definition: type.h:88
static const struct spa_type_info spa_type_profiler[]
Definition: type-info.h:452
#define SPA_TYPE_INFO_PropInfo
Enum Property info.
Definition: type-info.h:167
Definition: type.h:74
static const struct spa_type_info spa_type_node_event[]
Definition: type-info.h:80
Definition: type.h:94
Definition: type.h:100
spa/node/type-info.h
static bool spa_type_is_a(const char *type, const char *parent)
Definition: type-info.h:49
Definition: type.h:101
Definition: type.h:64
#define SPA_TYPE_INFO_Object
Definition: type.h:138
static const struct spa_type_info spa_type_param_port_config[]
Definition: type-info.h:411
spa/control/type-info.h
static const struct spa_type_info spa_type_prop_info[]
Definition: type-info.h:171
Definition: type.h:82
#define SPA_TYPE_INFO_POD_BASE
Definition: type.h:130
Definition: type.h:69
#define SPA_TYPE_INFO_EVENT_BASE
Definition: type.h:155
Definition: type.h:55
Definition: type.h:51
Definition: type.h:68
Definition: type.h:81
#define SPA_TYPE_INFO_Props
Definition: type-info.h:81
static const struct spa_type_info spa_type_param_profile[]
Definition: type-info.h:380
Definition: type.h:60