PipeWire: type.h Source File

PipeWire 0.3.37

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