PipeWire: type.h Source File

PipeWire 0.3.80

Loading...
Searching...
No Matches
spa/include/spa/utils/type.h
Go to the documentation of this file.
1/* Simple Plugin API */
2/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef SPA_TYPE_H
6#define SPA_TYPE_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#include <spa/utils/defs.h>
13
23enum {
24 /* Basic types */
25 SPA_TYPE_START = 0x00000,
26 SPA_TYPE_None,
27 SPA_TYPE_Bool,
28 SPA_TYPE_Id,
29 SPA_TYPE_Int,
30 SPA_TYPE_Long,
31 SPA_TYPE_Float,
32 SPA_TYPE_Double,
33 SPA_TYPE_String,
34 SPA_TYPE_Bytes,
35 SPA_TYPE_Rectangle,
36 SPA_TYPE_Fraction,
37 SPA_TYPE_Bitmap,
38 SPA_TYPE_Array,
39 SPA_TYPE_Struct,
40 SPA_TYPE_Object,
41 SPA_TYPE_Sequence,
42 SPA_TYPE_Pointer,
43 SPA_TYPE_Fd,
44 SPA_TYPE_Choice,
45 SPA_TYPE_Pod,
46 _SPA_TYPE_LAST,
48 /* Pointers */
49 SPA_TYPE_POINTER_START = 0x10000,
50 SPA_TYPE_POINTER_Buffer,
51 SPA_TYPE_POINTER_Meta,
52 SPA_TYPE_POINTER_Dict,
53 _SPA_TYPE_POINTER_LAST,
55 /* Events */
56 SPA_TYPE_EVENT_START = 0x20000,
57 SPA_TYPE_EVENT_Device,
58 SPA_TYPE_EVENT_Node,
59 _SPA_TYPE_EVENT_LAST,
61 /* Commands */
62 SPA_TYPE_COMMAND_START = 0x30000,
63 SPA_TYPE_COMMAND_Device,
64 SPA_TYPE_COMMAND_Node,
65 _SPA_TYPE_COMMAND_LAST,
67 /* Objects */
68 SPA_TYPE_OBJECT_START = 0x40000,
69 SPA_TYPE_OBJECT_PropInfo,
70 SPA_TYPE_OBJECT_Props,
71 SPA_TYPE_OBJECT_Format,
72 SPA_TYPE_OBJECT_ParamBuffers,
73 SPA_TYPE_OBJECT_ParamMeta,
74 SPA_TYPE_OBJECT_ParamIO,
75 SPA_TYPE_OBJECT_ParamProfile,
76 SPA_TYPE_OBJECT_ParamPortConfig,
77 SPA_TYPE_OBJECT_ParamRoute,
78 SPA_TYPE_OBJECT_Profiler,
79 SPA_TYPE_OBJECT_ParamLatency,
80 SPA_TYPE_OBJECT_ParamProcessLatency,
81 SPA_TYPE_OBJECT_ParamTag,
82 _SPA_TYPE_OBJECT_LAST,
84 /* vendor extensions */
85 SPA_TYPE_VENDOR_PipeWire = 0x02000000,
86
87 SPA_TYPE_VENDOR_Other = 0x7f000000,
88};
89
90#define SPA_TYPE_INFO_BASE "Spa:"
91
92#define SPA_TYPE_INFO_Flags SPA_TYPE_INFO_BASE "Flags"
93#define SPA_TYPE_INFO_FLAGS_BASE SPA_TYPE_INFO_Flags ":"
94
95#define SPA_TYPE_INFO_Enum SPA_TYPE_INFO_BASE "Enum"
96#define SPA_TYPE_INFO_ENUM_BASE SPA_TYPE_INFO_Enum ":"
97
98#define SPA_TYPE_INFO_Pod SPA_TYPE_INFO_BASE "Pod"
99#define SPA_TYPE_INFO_POD_BASE SPA_TYPE_INFO_Pod ":"
100
101#define SPA_TYPE_INFO_Struct SPA_TYPE_INFO_POD_BASE "Struct"
102#define SPA_TYPE_INFO_STRUCT_BASE SPA_TYPE_INFO_Struct ":"
103
104#define SPA_TYPE_INFO_Object SPA_TYPE_INFO_POD_BASE "Object"
105#define SPA_TYPE_INFO_OBJECT_BASE SPA_TYPE_INFO_Object ":"
106
107#define SPA_TYPE_INFO_Pointer SPA_TYPE_INFO_BASE "Pointer"
108#define SPA_TYPE_INFO_POINTER_BASE SPA_TYPE_INFO_Pointer ":"
109
110#define SPA_TYPE_INFO_Interface SPA_TYPE_INFO_POINTER_BASE "Interface"
111#define SPA_TYPE_INFO_INTERFACE_BASE SPA_TYPE_INFO_Interface ":"
112
113#define SPA_TYPE_INFO_Event SPA_TYPE_INFO_OBJECT_BASE "Event"
114#define SPA_TYPE_INFO_EVENT_BASE SPA_TYPE_INFO_Event ":"
115
116#define SPA_TYPE_INFO_Command SPA_TYPE_INFO_OBJECT_BASE "Command"
117#define SPA_TYPE_INFO_COMMAND_BASE SPA_TYPE_INFO_Command ":"
118
119 struct spa_type_info {
120 uint32_t type;
121 uint32_t parent;
122 const char *name;
123 const struct spa_type_info *values;
124};
125
130#ifdef __cplusplus
131} /* extern "C" */
132#endif
133
134#endif /* SPA_TYPE_H */
defs.h
spa/utils/defs.h
SPA_TYPE_POINTER_Buffer
@ SPA_TYPE_POINTER_Buffer
Definition spa/include/spa/utils/type.h:55
SPA_TYPE_OBJECT_ParamPortConfig
@ SPA_TYPE_OBJECT_ParamPortConfig
Definition spa/include/spa/utils/type.h:81
SPA_TYPE_Int
@ SPA_TYPE_Int
Definition spa/include/spa/utils/type.h:34
SPA_TYPE_OBJECT_ParamProfile
@ SPA_TYPE_OBJECT_ParamProfile
Definition spa/include/spa/utils/type.h:80
SPA_TYPE_COMMAND_START
@ SPA_TYPE_COMMAND_START
Definition spa/include/spa/utils/type.h:67
SPA_TYPE_POINTER_START
@ SPA_TYPE_POINTER_START
Definition spa/include/spa/utils/type.h:54
SPA_TYPE_Rectangle
@ SPA_TYPE_Rectangle
Definition spa/include/spa/utils/type.h:40
SPA_TYPE_Long
@ SPA_TYPE_Long
Definition spa/include/spa/utils/type.h:35
SPA_TYPE_Bool
@ SPA_TYPE_Bool
Definition spa/include/spa/utils/type.h:32
SPA_TYPE_Bytes
@ SPA_TYPE_Bytes
Definition spa/include/spa/utils/type.h:39
SPA_TYPE_VENDOR_Other
@ SPA_TYPE_VENDOR_Other
Definition spa/include/spa/utils/type.h:92
SPA_TYPE_EVENT_Device
@ SPA_TYPE_EVENT_Device
Definition spa/include/spa/utils/type.h:62
SPA_TYPE_Pod
@ SPA_TYPE_Pod
Definition spa/include/spa/utils/type.h:50
SPA_TYPE_OBJECT_PropInfo
@ SPA_TYPE_OBJECT_PropInfo
Definition spa/include/spa/utils/type.h:74
SPA_TYPE_OBJECT_START
@ SPA_TYPE_OBJECT_START
Definition spa/include/spa/utils/type.h:73
SPA_TYPE_Bitmap
@ SPA_TYPE_Bitmap
Definition spa/include/spa/utils/type.h:42
SPA_TYPE_Object
@ SPA_TYPE_Object
Definition spa/include/spa/utils/type.h:45
SPA_TYPE_POINTER_Dict
@ SPA_TYPE_POINTER_Dict
Definition spa/include/spa/utils/type.h:57
SPA_TYPE_Float
@ SPA_TYPE_Float
Definition spa/include/spa/utils/type.h:36
SPA_TYPE_COMMAND_Device
@ SPA_TYPE_COMMAND_Device
Definition spa/include/spa/utils/type.h:68
SPA_TYPE_OBJECT_ParamBuffers
@ SPA_TYPE_OBJECT_ParamBuffers
Definition spa/include/spa/utils/type.h:77
SPA_TYPE_Fraction
@ SPA_TYPE_Fraction
Definition spa/include/spa/utils/type.h:41
SPA_TYPE_None
@ SPA_TYPE_None
Definition spa/include/spa/utils/type.h:31
SPA_TYPE_OBJECT_ParamIO
@ SPA_TYPE_OBJECT_ParamIO
Definition spa/include/spa/utils/type.h:79
_SPA_TYPE_LAST
@ _SPA_TYPE_LAST
not part of ABI
Definition spa/include/spa/utils/type.h:51
SPA_TYPE_OBJECT_Props
@ SPA_TYPE_OBJECT_Props
Definition spa/include/spa/utils/type.h:75
SPA_TYPE_Sequence
@ SPA_TYPE_Sequence
Definition spa/include/spa/utils/type.h:46
SPA_TYPE_Double
@ SPA_TYPE_Double
Definition spa/include/spa/utils/type.h:37
SPA_TYPE_OBJECT_Profiler
@ SPA_TYPE_OBJECT_Profiler
Definition spa/include/spa/utils/type.h:83
SPA_TYPE_OBJECT_ParamLatency
@ SPA_TYPE_OBJECT_ParamLatency
Definition spa/include/spa/utils/type.h:84
SPA_TYPE_Id
@ SPA_TYPE_Id
Definition spa/include/spa/utils/type.h:33
SPA_TYPE_EVENT_START
@ SPA_TYPE_EVENT_START
Definition spa/include/spa/utils/type.h:61
SPA_TYPE_Choice
@ SPA_TYPE_Choice
Definition spa/include/spa/utils/type.h:49
SPA_TYPE_EVENT_Node
@ SPA_TYPE_EVENT_Node
Definition spa/include/spa/utils/type.h:63
SPA_TYPE_Pointer
@ SPA_TYPE_Pointer
Definition spa/include/spa/utils/type.h:47
_SPA_TYPE_OBJECT_LAST
@ _SPA_TYPE_OBJECT_LAST
not part of ABI
Definition spa/include/spa/utils/type.h:87
SPA_TYPE_Array
@ SPA_TYPE_Array
Definition spa/include/spa/utils/type.h:43
_SPA_TYPE_EVENT_LAST
@ _SPA_TYPE_EVENT_LAST
not part of ABI
Definition spa/include/spa/utils/type.h:64
SPA_TYPE_String
@ SPA_TYPE_String
Definition spa/include/spa/utils/type.h:38
SPA_TYPE_VENDOR_PipeWire
@ SPA_TYPE_VENDOR_PipeWire
Definition spa/include/spa/utils/type.h:90
SPA_TYPE_POINTER_Meta
@ SPA_TYPE_POINTER_Meta
Definition spa/include/spa/utils/type.h:56
_SPA_TYPE_COMMAND_LAST
@ _SPA_TYPE_COMMAND_LAST
not part of ABI
Definition spa/include/spa/utils/type.h:70
SPA_TYPE_COMMAND_Node
@ SPA_TYPE_COMMAND_Node
Definition spa/include/spa/utils/type.h:69
SPA_TYPE_OBJECT_ParamProcessLatency
@ SPA_TYPE_OBJECT_ParamProcessLatency
Definition spa/include/spa/utils/type.h:85
SPA_TYPE_Fd
@ SPA_TYPE_Fd
Definition spa/include/spa/utils/type.h:48
SPA_TYPE_OBJECT_ParamMeta
@ SPA_TYPE_OBJECT_ParamMeta
Definition spa/include/spa/utils/type.h:78
SPA_TYPE_OBJECT_ParamTag
@ SPA_TYPE_OBJECT_ParamTag
Definition spa/include/spa/utils/type.h:86
SPA_TYPE_OBJECT_ParamRoute
@ SPA_TYPE_OBJECT_ParamRoute
Definition spa/include/spa/utils/type.h:82
_SPA_TYPE_POINTER_LAST
@ _SPA_TYPE_POINTER_LAST
not part of ABI
Definition spa/include/spa/utils/type.h:58
SPA_TYPE_Struct
@ SPA_TYPE_Struct
Definition spa/include/spa/utils/type.h:44
SPA_TYPE_OBJECT_Format
@ SPA_TYPE_OBJECT_Format
Definition spa/include/spa/utils/type.h:76
SPA_TYPE_START
@ SPA_TYPE_START
Definition spa/include/spa/utils/type.h:30
spa_type_info
Definition spa/include/spa/utils/type.h:143
spa_type_info::type
uint32_t type
Definition spa/include/spa/utils/type.h:144
spa_type_info::parent
uint32_t parent
Definition spa/include/spa/utils/type.h:145
spa_type_info::values
const struct spa_type_info * values
Definition spa/include/spa/utils/type.h:147