PipeWire: spa/utils/type.h Source File

PipeWire 0.3.50

type.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_H
26#define SPA_TYPE_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32#include <spa/utils/defs.h>
33
43enum {
44 /* Basic types */
45 SPA_TYPE_START = 0x00000,
46 SPA_TYPE_None,
47 SPA_TYPE_Bool,
48 SPA_TYPE_Id,
49 SPA_TYPE_Int,
50 SPA_TYPE_Long,
51 SPA_TYPE_Float,
52 SPA_TYPE_Double,
53 SPA_TYPE_String,
54 SPA_TYPE_Bytes,
55 SPA_TYPE_Rectangle,
56 SPA_TYPE_Fraction,
57 SPA_TYPE_Bitmap,
58 SPA_TYPE_Array,
59 SPA_TYPE_Struct,
60 SPA_TYPE_Object,
61 SPA_TYPE_Sequence,
62 SPA_TYPE_Pointer,
63 SPA_TYPE_Fd,
64 SPA_TYPE_Choice,
65 SPA_TYPE_Pod,
66 _SPA_TYPE_LAST,
68 /* Pointers */
69 SPA_TYPE_POINTER_START = 0x10000,
70 SPA_TYPE_POINTER_Buffer,
71 SPA_TYPE_POINTER_Meta,
72 SPA_TYPE_POINTER_Dict,
73 _SPA_TYPE_POINTER_LAST,
75 /* Events */
76 SPA_TYPE_EVENT_START = 0x20000,
77 SPA_TYPE_EVENT_Device,
78 SPA_TYPE_EVENT_Node,
79 _SPA_TYPE_EVENT_LAST,
81 /* Commands */
82 SPA_TYPE_COMMAND_START = 0x30000,
83 SPA_TYPE_COMMAND_Device,
84 SPA_TYPE_COMMAND_Node,
85 _SPA_TYPE_COMMAND_LAST,
87 /* Objects */
88 SPA_TYPE_OBJECT_START = 0x40000,
89 SPA_TYPE_OBJECT_PropInfo,
90 SPA_TYPE_OBJECT_Props,
91 SPA_TYPE_OBJECT_Format,
92 SPA_TYPE_OBJECT_ParamBuffers,
93 SPA_TYPE_OBJECT_ParamMeta,
94 SPA_TYPE_OBJECT_ParamIO,
95 SPA_TYPE_OBJECT_ParamProfile,
96 SPA_TYPE_OBJECT_ParamPortConfig,
97 SPA_TYPE_OBJECT_ParamRoute,
98 SPA_TYPE_OBJECT_Profiler,
99 SPA_TYPE_OBJECT_ParamLatency,
100 SPA_TYPE_OBJECT_ParamProcessLatency,
101 _SPA_TYPE_OBJECT_LAST,
103 /* vendor extensions */
104 SPA_TYPE_VENDOR_PipeWire = 0x02000000,
105
106 SPA_TYPE_VENDOR_Other = 0x7f000000,
107};
108
109#define SPA_TYPE_INFO_BASE "Spa:"
110
111#define SPA_TYPE_INFO_Flags SPA_TYPE_INFO_BASE "Flags"
112#define SPA_TYPE_INFO_FLAGS_BASE SPA_TYPE_INFO_Flags ":"
113
114#define SPA_TYPE_INFO_Enum SPA_TYPE_INFO_BASE "Enum"
115#define SPA_TYPE_INFO_ENUM_BASE SPA_TYPE_INFO_Enum ":"
116
117#define SPA_TYPE_INFO_Pod SPA_TYPE_INFO_BASE "Pod"
118#define SPA_TYPE_INFO_POD_BASE SPA_TYPE_INFO_Pod ":"
119
120#define SPA_TYPE_INFO_Struct SPA_TYPE_INFO_POD_BASE "Struct"
121#define SPA_TYPE_INFO_STRUCT_BASE SPA_TYPE_INFO_Struct ":"
122
123#define SPA_TYPE_INFO_Object SPA_TYPE_INFO_POD_BASE "Object"
124#define SPA_TYPE_INFO_OBJECT_BASE SPA_TYPE_INFO_Object ":"
125
126#define SPA_TYPE_INFO_Pointer SPA_TYPE_INFO_BASE "Pointer"
127#define SPA_TYPE_INFO_POINTER_BASE SPA_TYPE_INFO_Pointer ":"
128
129#define SPA_TYPE_INFO_Interface SPA_TYPE_INFO_POINTER_BASE "Interface"
130#define SPA_TYPE_INFO_INTERFACE_BASE SPA_TYPE_INFO_Interface ":"
131
132#define SPA_TYPE_INFO_Event SPA_TYPE_INFO_OBJECT_BASE "Event"
133#define SPA_TYPE_INFO_EVENT_BASE SPA_TYPE_INFO_Event ":"
134
135#define SPA_TYPE_INFO_Command SPA_TYPE_INFO_OBJECT_BASE "Command"
136#define SPA_TYPE_INFO_COMMAND_BASE SPA_TYPE_INFO_Command ":"
137
138 struct spa_type_info {
139 uint32_t type;
140 uint32_t parent;
141 const char *name;
142 const struct spa_type_info *values;
143};
144
149#ifdef __cplusplus
150} /* extern "C" */
151#endif
152
153#endif /* SPA_TYPE_H */
defs.h
spa/utils/defs.h
SPA_TYPE_POINTER_Buffer
@ SPA_TYPE_POINTER_Buffer
Definition: type.h:75
SPA_TYPE_OBJECT_ParamPortConfig
@ SPA_TYPE_OBJECT_ParamPortConfig
Definition: type.h:101
SPA_TYPE_Int
@ SPA_TYPE_Int
Definition: type.h:54
SPA_TYPE_OBJECT_ParamProfile
@ SPA_TYPE_OBJECT_ParamProfile
Definition: type.h:100
SPA_TYPE_COMMAND_START
@ SPA_TYPE_COMMAND_START
Definition: type.h:87
SPA_TYPE_POINTER_START
@ SPA_TYPE_POINTER_START
Definition: type.h:74
SPA_TYPE_Rectangle
@ SPA_TYPE_Rectangle
Definition: type.h:60
SPA_TYPE_Long
@ SPA_TYPE_Long
Definition: type.h:55
SPA_TYPE_Bool
@ SPA_TYPE_Bool
Definition: type.h:52
SPA_TYPE_Bytes
@ SPA_TYPE_Bytes
Definition: type.h:59
SPA_TYPE_VENDOR_Other
@ SPA_TYPE_VENDOR_Other
Definition: type.h:111
SPA_TYPE_EVENT_Device
@ SPA_TYPE_EVENT_Device
Definition: type.h:82
SPA_TYPE_Pod
@ SPA_TYPE_Pod
Definition: type.h:70
SPA_TYPE_OBJECT_PropInfo
@ SPA_TYPE_OBJECT_PropInfo
Definition: type.h:94
SPA_TYPE_OBJECT_START
@ SPA_TYPE_OBJECT_START
Definition: type.h:93
SPA_TYPE_Bitmap
@ SPA_TYPE_Bitmap
Definition: type.h:62
SPA_TYPE_Object
@ SPA_TYPE_Object
Definition: type.h:65
SPA_TYPE_POINTER_Dict
@ SPA_TYPE_POINTER_Dict
Definition: type.h:77
SPA_TYPE_Float
@ SPA_TYPE_Float
Definition: type.h:56
SPA_TYPE_COMMAND_Device
@ SPA_TYPE_COMMAND_Device
Definition: type.h:88
SPA_TYPE_OBJECT_ParamBuffers
@ SPA_TYPE_OBJECT_ParamBuffers
Definition: type.h:97
SPA_TYPE_Fraction
@ SPA_TYPE_Fraction
Definition: type.h:61
SPA_TYPE_None
@ SPA_TYPE_None
Definition: type.h:51
SPA_TYPE_OBJECT_ParamIO
@ SPA_TYPE_OBJECT_ParamIO
Definition: type.h:99
_SPA_TYPE_LAST
@ _SPA_TYPE_LAST
not part of ABI
Definition: type.h:71
SPA_TYPE_OBJECT_Props
@ SPA_TYPE_OBJECT_Props
Definition: type.h:95
SPA_TYPE_Sequence
@ SPA_TYPE_Sequence
Definition: type.h:66
SPA_TYPE_Double
@ SPA_TYPE_Double
Definition: type.h:57
SPA_TYPE_OBJECT_Profiler
@ SPA_TYPE_OBJECT_Profiler
Definition: type.h:103
SPA_TYPE_OBJECT_ParamLatency
@ SPA_TYPE_OBJECT_ParamLatency
Definition: type.h:104
SPA_TYPE_Id
@ SPA_TYPE_Id
Definition: type.h:53
SPA_TYPE_EVENT_START
@ SPA_TYPE_EVENT_START
Definition: type.h:81
SPA_TYPE_Choice
@ SPA_TYPE_Choice
Definition: type.h:69
SPA_TYPE_EVENT_Node
@ SPA_TYPE_EVENT_Node
Definition: type.h:83
SPA_TYPE_Pointer
@ SPA_TYPE_Pointer
Definition: type.h:67
_SPA_TYPE_OBJECT_LAST
@ _SPA_TYPE_OBJECT_LAST
not part of ABI
Definition: type.h:106
SPA_TYPE_Array
@ SPA_TYPE_Array
Definition: type.h:63
_SPA_TYPE_EVENT_LAST
@ _SPA_TYPE_EVENT_LAST
not part of ABI
Definition: type.h:84
SPA_TYPE_String
@ SPA_TYPE_String
Definition: type.h:58
SPA_TYPE_VENDOR_PipeWire
@ SPA_TYPE_VENDOR_PipeWire
Definition: type.h:109
SPA_TYPE_POINTER_Meta
@ SPA_TYPE_POINTER_Meta
Definition: type.h:76
_SPA_TYPE_COMMAND_LAST
@ _SPA_TYPE_COMMAND_LAST
not part of ABI
Definition: type.h:90
SPA_TYPE_COMMAND_Node
@ SPA_TYPE_COMMAND_Node
Definition: type.h:89
SPA_TYPE_OBJECT_ParamProcessLatency
@ SPA_TYPE_OBJECT_ParamProcessLatency
Definition: type.h:105
SPA_TYPE_Fd
@ SPA_TYPE_Fd
Definition: type.h:68
SPA_TYPE_OBJECT_ParamMeta
@ SPA_TYPE_OBJECT_ParamMeta
Definition: type.h:98
SPA_TYPE_OBJECT_ParamRoute
@ SPA_TYPE_OBJECT_ParamRoute
Definition: type.h:102
_SPA_TYPE_POINTER_LAST
@ _SPA_TYPE_POINTER_LAST
not part of ABI
Definition: type.h:78
SPA_TYPE_Struct
@ SPA_TYPE_Struct
Definition: type.h:64
SPA_TYPE_OBJECT_Format
@ SPA_TYPE_OBJECT_Format
Definition: type.h:96
SPA_TYPE_START
@ SPA_TYPE_START
Definition: type.h:50
spa_type_info
Definition: type.h:162
spa_type_info::type
uint32_t type
Definition: type.h:163
spa_type_info::parent
uint32_t parent
Definition: type.h:164
spa_type_info::values
const struct spa_type_info * values
Definition: type.h:166