PipeWire: type-info.h Source File

PipeWire 0.3.66

Loading...
Searching...
No Matches
node/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_NODE_TYPES_H
26#define SPA_NODE_TYPES_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
37#include <spa/utils/type.h>
38
39#include <spa/node/command.h>
40#include <spa/node/event.h>
41#include <spa/node/io.h>
42
43#define SPA_TYPE_INFO_IO SPA_TYPE_INFO_ENUM_BASE "IO"
44#define SPA_TYPE_INFO_IO_BASE SPA_TYPE_INFO_IO ":"
45
46static const struct spa_type_info spa_type_io[] = {
47 { SPA_IO_Invalid, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "Invalid", NULL },
48 { SPA_IO_Buffers, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "Buffers", NULL },
49 { SPA_IO_Range, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "Range", NULL },
50 { SPA_IO_Clock, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "Clock", NULL },
51 { SPA_IO_Latency, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "Latency", NULL },
52 { SPA_IO_Control, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "Control", NULL },
53 { SPA_IO_Notify, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "Notify", NULL },
54 { SPA_IO_Position, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "Position", NULL },
55 { SPA_IO_RateMatch, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "RateMatch", NULL },
56 { SPA_IO_Memory, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "Memory", NULL },
57 { 0, 0, NULL, NULL },
58};
59
60#define SPA_TYPE_INFO_NodeEvent SPA_TYPE_INFO_EVENT_BASE "Node"
61#define SPA_TYPE_INFO_NODE_EVENT_BASE SPA_TYPE_INFO_NodeEvent ":"
62
63static const struct spa_type_info spa_type_node_event_id[] = {
64 { SPA_NODE_EVENT_Error, SPA_TYPE_EVENT_Node, SPA_TYPE_INFO_NODE_EVENT_BASE "Error", NULL },
65 { SPA_NODE_EVENT_Buffering, SPA_TYPE_EVENT_Node, SPA_TYPE_INFO_NODE_EVENT_BASE "Buffering", NULL },
66 { SPA_NODE_EVENT_RequestRefresh, SPA_TYPE_EVENT_Node, SPA_TYPE_INFO_NODE_EVENT_BASE "RequestRefresh", NULL },
67 { SPA_NODE_EVENT_RequestProcess, SPA_TYPE_EVENT_Node, SPA_TYPE_INFO_NODE_EVENT_BASE "RequestProcess", NULL },
68 { 0, 0, NULL, NULL },
69};
70
71static const struct spa_type_info spa_type_node_event[] = {
72 { SPA_EVENT_NODE_START, SPA_TYPE_Id, SPA_TYPE_INFO_NODE_EVENT_BASE, spa_type_node_event_id },
73 { 0, 0, NULL, NULL },
74};
75
76#define SPA_TYPE_INFO_NodeCommand SPA_TYPE_INFO_COMMAND_BASE "Node"
77#define SPA_TYPE_INFO_NODE_COMMAND_BASE SPA_TYPE_INFO_NodeCommand ":"
78
79static const struct spa_type_info spa_type_node_command_id[] = {
80 { SPA_NODE_COMMAND_Suspend, SPA_TYPE_COMMAND_Node, SPA_TYPE_INFO_NODE_COMMAND_BASE "Suspend", NULL },
81 { SPA_NODE_COMMAND_Pause, SPA_TYPE_COMMAND_Node, SPA_TYPE_INFO_NODE_COMMAND_BASE "Pause", NULL },
82 { SPA_NODE_COMMAND_Start, SPA_TYPE_COMMAND_Node, SPA_TYPE_INFO_NODE_COMMAND_BASE "Start", NULL },
83 { SPA_NODE_COMMAND_Enable, SPA_TYPE_COMMAND_Node, SPA_TYPE_INFO_NODE_COMMAND_BASE "Enable", NULL },
84 { SPA_NODE_COMMAND_Disable, SPA_TYPE_COMMAND_Node, SPA_TYPE_INFO_NODE_COMMAND_BASE "Disable", NULL },
85 { SPA_NODE_COMMAND_Flush, SPA_TYPE_COMMAND_Node, SPA_TYPE_INFO_NODE_COMMAND_BASE "Flush", NULL },
86 { SPA_NODE_COMMAND_Drain, SPA_TYPE_COMMAND_Node, SPA_TYPE_INFO_NODE_COMMAND_BASE "Drain", NULL },
87 { SPA_NODE_COMMAND_Marker, SPA_TYPE_COMMAND_Node, SPA_TYPE_INFO_NODE_COMMAND_BASE "Marker", NULL },
88 { SPA_NODE_COMMAND_ParamBegin, SPA_TYPE_COMMAND_Node, SPA_TYPE_INFO_NODE_COMMAND_BASE "ParamBegin", NULL },
89 { SPA_NODE_COMMAND_ParamEnd, SPA_TYPE_COMMAND_Node, SPA_TYPE_INFO_NODE_COMMAND_BASE "ParamEnd", NULL },
90 { SPA_NODE_COMMAND_RequestProcess, SPA_TYPE_COMMAND_Node, SPA_TYPE_INFO_NODE_COMMAND_BASE "RequestProcess", NULL },
91 { 0, 0, NULL, NULL },
92};
93
94static const struct spa_type_info spa_type_node_command[] = {
95 { 0, SPA_TYPE_Id, SPA_TYPE_INFO_NODE_COMMAND_BASE, spa_type_node_command_id },
96 { 0, 0, NULL, NULL },
97};
98
103#ifdef __cplusplus
104} /* extern "C" */
105#endif
106
107#endif /* SPA_NODE_TYPES_H */
spa_type_node_command
static const struct spa_type_info spa_type_node_command[]
Definition: node/type-info.h:105
SPA_TYPE_INFO_NODE_EVENT_BASE
#define SPA_TYPE_INFO_NODE_EVENT_BASE
Definition: node/type-info.h:70
spa_type_node_event
static const struct spa_type_info spa_type_node_event[]
Definition: node/type-info.h:80
SPA_TYPE_INFO_IO_BASE
#define SPA_TYPE_INFO_IO_BASE
Definition: node/type-info.h:51
spa_type_node_command_id
static const struct spa_type_info spa_type_node_command_id[]
Definition: node/type-info.h:90
spa_type_node_event_id
static const struct spa_type_info spa_type_node_event_id[]
Definition: node/type-info.h:72
SPA_TYPE_INFO_NODE_COMMAND_BASE
#define SPA_TYPE_INFO_NODE_COMMAND_BASE
Definition: node/type-info.h:88
spa_type_io
static const struct spa_type_info spa_type_io[]
Definition: node/type-info.h:53
SPA_IO_Notify
@ SPA_IO_Notify
area for notify messages, struct spa_io_sequence
Definition: io.h:63
SPA_IO_Memory
@ SPA_IO_Memory
memory pointer, struct spa_io_memory
Definition: io.h:66
SPA_IO_Clock
@ SPA_IO_Clock
area to update clock information, struct spa_io_clock
Definition: io.h:60
SPA_IO_Control
@ SPA_IO_Control
area for control messages, struct spa_io_sequence
Definition: io.h:62
SPA_IO_Latency
@ SPA_IO_Latency
latency reporting, struct spa_io_latency
Definition: io.h:61
SPA_IO_Range
@ SPA_IO_Range
expected byte range, struct spa_io_range
Definition: io.h:59
SPA_IO_Invalid
@ SPA_IO_Invalid
Definition: io.h:57
SPA_IO_Position
@ SPA_IO_Position
position information in the graph, struct spa_io_position
Definition: io.h:64
SPA_IO_Buffers
@ SPA_IO_Buffers
area to exchange buffers, struct spa_io_buffers
Definition: io.h:58
SPA_IO_RateMatch
@ SPA_IO_RateMatch
rate matching between nodes, struct spa_io_rate_match
Definition: io.h:65
SPA_NODE_EVENT_RequestProcess
@ SPA_NODE_EVENT_RequestProcess
Definition: node/event.h:49
SPA_NODE_EVENT_Error
@ SPA_NODE_EVENT_Error
Definition: node/event.h:46
SPA_NODE_EVENT_Buffering
@ SPA_NODE_EVENT_Buffering
Definition: node/event.h:47
SPA_NODE_EVENT_RequestRefresh
@ SPA_NODE_EVENT_RequestRefresh
Definition: node/event.h:48
SPA_EVENT_NODE_START
@ SPA_EVENT_NODE_START
Definition: node/event.h:60
SPA_NODE_COMMAND_RequestProcess
@ SPA_NODE_COMMAND_RequestProcess
Sent to a driver when some other node emitted the RequestProcess event.
Definition: node/command.h:62
SPA_NODE_COMMAND_Disable
@ SPA_NODE_COMMAND_Disable
Definition: node/command.h:53
SPA_NODE_COMMAND_Flush
@ SPA_NODE_COMMAND_Flush
Definition: node/command.h:54
SPA_NODE_COMMAND_Enable
@ SPA_NODE_COMMAND_Enable
Definition: node/command.h:52
SPA_NODE_COMMAND_Suspend
@ SPA_NODE_COMMAND_Suspend
suspend a node, this removes all configured formats and closes any devices
Definition: node/command.h:46
SPA_NODE_COMMAND_Pause
@ SPA_NODE_COMMAND_Pause
pause a node.
Definition: node/command.h:48
SPA_NODE_COMMAND_Drain
@ SPA_NODE_COMMAND_Drain
Definition: node/command.h:55
SPA_NODE_COMMAND_Marker
@ SPA_NODE_COMMAND_Marker
Definition: node/command.h:56
SPA_NODE_COMMAND_ParamBegin
@ SPA_NODE_COMMAND_ParamBegin
begin a set of parameter enumerations or configuration that require the device to remain opened,...
Definition: node/command.h:57
SPA_NODE_COMMAND_Start
@ SPA_NODE_COMMAND_Start
start a node, this makes it start emitting scheduling events
Definition: node/command.h:50
SPA_NODE_COMMAND_ParamEnd
@ SPA_NODE_COMMAND_ParamEnd
end a transaction
Definition: node/command.h:61
SPA_TYPE_Int
@ SPA_TYPE_Int
Definition: spa/include/spa/utils/type.h:54
SPA_TYPE_Id
@ SPA_TYPE_Id
Definition: spa/include/spa/utils/type.h:53
SPA_TYPE_EVENT_Node
@ SPA_TYPE_EVENT_Node
Definition: spa/include/spa/utils/type.h:83
SPA_TYPE_COMMAND_Node
@ SPA_TYPE_COMMAND_Node
Definition: spa/include/spa/utils/type.h:89
io.h
spa/node/io.h
command.h
spa/node/command.h
event.h
spa/node/event.h
type.h
spa/utils/type.h
spa_type_info
Definition: spa/include/spa/utils/type.h:162