Go to the documentation of this file.
25 #ifndef PIPEWIRE_IMPL_NODE_H
26 #define PIPEWIRE_IMPL_NODE_H
52 #define PW_VERSION_IMPL_NODE_EVENTS 0
102 size_t user_data_size );
147 int (*callback) (
void *
data,
struct pw_impl_port *
port),
151 int seq, uint32_t param_id,
152 uint32_t index, uint32_t max,
154 int (*callback) (
void *
data,
int seq,
155 uint32_t
id, uint32_t index, uint32_t next,
161 struct pw_impl_port *
#define SPA_MAX(a, b)
Definition: defs.h:129
#define PW_DIRECTION_INPUT
Definition: port.h:57
#define SPA_IO_SEGMENT_VIDEO_FLAG_VALID
Definition: io.h:188
uint32_t mask
Definition: build-12775836/doc/spa/support/loop.h:63
int int const char * pw_properties_get(const struct pw_properties *properties, const char *key)
Get a property.
Definition: properties.c:487
Definition: module-filter-chain.c:176
void pw_work_queue_destroy(struct pw_work_queue *queue)
Destroy a work queue.
Definition: work-queue.c:132
#define SPA_STATUS_DRAINED
Definition: io.h:98
uint32_t width
Definition: defs.h:87
uint32_t version
Definition: io.h:224
#define PW_KEY_NODE_SESSION
the session id this node is part of
Definition: src/pipewire/keys.h:145
int pw_impl_node_for_each_param(struct pw_impl_node *node, int seq, uint32_t param_id, uint32_t index, uint32_t max, const struct spa_pod *filter, int(*callback)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, struct spa_pod *param), void *data)
Definition: impl-node.c:1839
#define PW_KEY_MEDIA_ROLE
Role: Movie, Music, Camera, Screen, Communication, Game, Notification, DSP, Production,...
Definition: src/pipewire/keys.h:281
spa_direction
Definition: defs.h:78
struct pw_properties * props
Definition: alsa-monitor.c:74
Node callbacks.
Definition: build-12775836/doc/spa/node/node.h:207
uint32_t next
next index of iteration
Definition: build-12775836/doc/spa/node/node.h:140
#define SPA_VERSION_NODE_CALLBACKS
Definition: build-12775836/doc/spa/node/node.h:208
#define PW_VERSION_NODE
Definition: src/pipewire/node.h:52
uint32_t subscribe_ids[MAX_PARAMS]
Definition: impl-device.c:68
Definition: impl-node.c:1804
#define PW_NODE_CHANGE_MASK_ALL
Definition: src/pipewire/node.h:79
void(* destroy)(void *data)
the node is destroyed
Definition: impl-node.h:56
#define PW_KEY_NODE_PAUSE_ON_IDLE
pause the node when idle
Definition: src/pipewire/keys.h:169
Node information structure.
Definition: build-12775836/doc/spa/node/node.h:60
@ SPA_IO_Position
position information in the graph, struct spa_io_position
Definition: io.h:59
@ PW_MEMBLOCK_FLAG_READWRITE
Definition: src/pipewire/mem.h:53
#define spa_zero(x)
Definition: defs.h:303
#define PW_KEY_OBJECT_ID
a global object id
Definition: src/pipewire/keys.h:66
int pw_impl_port_set_param(struct pw_impl_port *port, uint32_t id, uint32_t flags, const struct spa_pod *param)
Definition: impl-port.c:1365
int pw_global_register(struct pw_global *global)
Register a global object to the context registry.
Definition: global.c:125
#define SPA_IO_POSITION_MAX_SEGMENTS
the maximum number of segments visible in the future
Definition: io.h:257
#define spa_node_set_io(n,...)
Definition: build-12775836/doc/spa/node/node.h:653
uint32_t pw_impl_node_get_free_port_id(struct pw_impl_node *node, enum pw_direction direction)
Get a free unused port_id from the node.
Definition: impl-node.c:1963
int pw_impl_node_initialized(struct pw_impl_node *this)
Definition: impl-node.c:727
struct pw_impl_port * pw_impl_node_find_port(struct pw_impl_node *node, enum pw_direction direction, uint32_t port_id)
Find the port with direction and port_id or NULL when not found.
Definition: impl-node.c:1928
const struct pw_properties * pw_impl_node_get_properties(struct pw_impl_node *node)
Get the node properties.
Definition: impl-node.c:1255
uint32_t flags
optional flags
Definition: io.h:153
#define PW_KEY_MODULE_ID
module properties
Definition: src/pipewire/keys.h:249
#define PW_KEY_NODE_RATE
the requested rate of the graph as a fraction.
Definition: src/pipewire/keys.h:160
char name[256]
Definition: module-filter-chain.c:161
Definition: impl-core.c:74
int seq
Definition: impl-device.c:72
@ PW_NODE_STATE_RUNNING
the node is running
Definition: src/pipewire/node.h:63
#define SYNC_CHECK
Definition: impl-node.c:1429
struct spa_dict * props
extra node properties
Definition: build-12775836/doc/spa/node/node.h:82
struct spa_list link
link in impl node_list
Definition: module-filter-chain.c:156
int pw_context_recalc_graph(struct pw_context *context, const char *reason)
Definition: context.c:1092
#define PW_VERSION_NODE_METHODS
Definition: src/pipewire/node.h:136
user data to add to an object
Definition: filter.c:75
#define SPA_FRACTION(num, denom)
Definition: defs.h:103
struct pw_global * pw_global_new(struct pw_context *context, const char *type, uint32_t version, struct pw_properties *properties, pw_global_bind_func_t func, void *object)
Create a new global object.
Definition: global.c:66
int pw_global_add_resource(struct pw_global *global, struct pw_resource *resource)
Add a resource to a global.
Definition: global.c:230
struct pw_memblock * pw_mempool_alloc(struct pw_mempool *pool, enum pw_memblock_flags flags, uint32_t type, size_t size)
Allocate a memory block from the pool.
Definition: mem.c:464
bool spa_streq(const char *s1, const char *s2)
Definition: string.h:50
#define PW_KEY_OBJECT_PATH
object properties
Definition: src/pipewire/keys.h:65
uint64_t duration
duration when this info becomes invalid expressed in running time.
Definition: io.h:235
struct spa_hook resource_listener
Definition: impl-core.c:76
#define spa_list_for_each(pos, head, member)
Definition: list.h:111
const char * pw_node_state_as_string(enum pw_node_state state)
Convert a pw_node_state to a readable string.
Definition: introspect.c:34
struct spa_list param_list
Definition: impl-device.c:40
int pw_impl_node_update_properties(struct pw_impl_node *node, const struct spa_dict *dict)
Update the node properties.
Definition: impl-node.c:1286
struct pw_impl_port * pw_context_create_port(struct pw_context *context, enum pw_direction direction, uint32_t port_id, const struct spa_port_info *info, size_t user_data_size)
Create a new port.
Definition: impl-port.c:443
#define spa_aprintf(_fmt,...)
Definition: defs.h:323
#define SPA_EXPORT
Definition: defs.h:208
@ PW_NODE_STATE_IDLE
the node is running but there is no active port
Definition: src/pipewire/node.h:61
bool pw_impl_node_is_active(struct pw_impl_node *node)
Check if a node is active.
Definition: impl-node.c:2133
Global events, use pw_global_add_listener.
Definition: global.h:68
int seq
Definition: policy-ep.c:65
uint32_t count
Definition: impl-node.c:1811
#define pw_log_trace(...)
Definition: src/pipewire/log.h:90
uint32_t id
id of parameter
Definition: build-12775836/doc/spa/node/node.h:138
#define spa_node_enum_params(n,...)
Definition: build-12775836/doc/spa/node/node.h:651
struct impl * impl
Definition: impl-node.c:1805
double rate
overall rate of the segment, can be negative for backwards time reporting.
Definition: io.h:240
#define SPA_EVENT_TYPE(ev)
Definition: pod/event.h:48
int fd
Definition: build-12775836/doc/spa/support/loop.h:62
Definition: module-filter-chain.c:155
struct spa_hook listener
Definition: bluez-autoswitch.c:81
@ PW_NODE_STATE_CREATING
the node is being created
Definition: src/pipewire/node.h:58
#define spa_loop_remove_source(l,...)
Definition: build-12775836/doc/spa/support/loop.h:117
int pw_impl_port_register(struct pw_impl_port *port, struct pw_properties *properties)
Definition: impl-port.c:877
struct spa_io_video_size video
size of the video in the current cycle
Definition: io.h:274
uint32_t index
index of parameter
Definition: build-12775836/doc/spa/node/node.h:139
The position information adds extra meaning to the raw clock times.
Definition: io.h:271
@ PW_NODE_STATE_ERROR
error state
Definition: src/pipewire/node.h:57
int pw_work_queue_complete(struct pw_work_queue *queue, void *obj, uint32_t seq, int res)
Complete a work item.
Definition: work-queue.c:247
#define PW_NODE_CHANGE_MASK_STATE
Definition: src/pipewire/node.h:76
#define SPA_PARAM_INFO_READ
Definition: param.h:68
int pw_impl_node_set_implementation(struct pw_impl_node *node, struct spa_node *spa_node)
Set the node implementation.
Definition: impl-node.c:1663
void * data
Definition: impl-node.c:1806
uint32_t flags
extra flags
Definition: io.h:230
#define spa_node_process(n)
Definition: build-12775836/doc/spa/node/node.h:663
#define SPA_NSEC_PER_SEC
Definition: defs.h:184
void spa_hook_list_append(struct spa_hook_list *list, struct spa_hook *hook, const void *funcs, void *data)
Append a hook.
Definition: hook.h:316
#define SPA_PTROFF(ptr_, offset_, type_)
Return the address (buffer + offset) as pointer of type.
Definition: defs.h:159
#define SPA_VERSION_NODE_EVENTS
Definition: build-12775836/doc/spa/node/node.h:157
void(* peer_added)(void *data, struct pw_impl_node *peer)
a peer was added
Definition: impl-node.h:93
#define SPA_NODE_FLAG_OUT_DYNAMIC_PORTS
output ports can be added/removed
Definition: build-12775836/doc/spa/node/node.h:70
#define SPA_RESULT_IS_ERROR(res)
Definition: result.h:45
uint32_t flags
flags
Definition: io.h:192
#define PW_NODE_CHANGE_MASK_PARAMS
Definition: src/pipewire/node.h:78
uint32_t id
Definition: module-echo-cancel.c:139
spa_source_func_t func
Definition: build-12775836/doc/spa/support/loop.h:60
uint32_t version
Definition: impl-node.h:53
Absolute time reporting.
Definition: io.h:132
struct spa_audio_info_raw info
Definition: module-echo-cancel.c:145
Definition: build-12775836/doc/spa/support/loop.h:58
Definition: build-12775836/doc/spa/support/loop.h:44
struct spa_dict dict
dictionary of key/values
Definition: properties.h:50
int spa_pod_filter(struct spa_pod_builder *b, struct spa_pod **result, const struct spa_pod *pod, const struct spa_pod *filter)
Definition: build-12775836/doc/spa/pod/filter.h:387
#define SPA_CONTAINER_OF(p, t, m)
Definition: defs.h:170
@ SPA_IO_POSITION_STATE_STARTING
Definition: io.h:252
#define SPA_LIKELY(x)
Definition: defs.h:234
@ SPA_PARAM_Format
configured format as SPA_TYPE_OBJECT_Format
Definition: param.h:48
uint32_t flags
Definition: param.h:71
#define spa_list_consume(pos, head, member)
Definition: list.h:96
uint32_t max_output_ports
Definition: build-12775836/doc/spa/node/node.h:62
#define PW_KEY_NODE_LOCK_QUANTUM
don't change quantum when this node is active
Definition: src/pipewire/keys.h:158
#define SYNC_START
Definition: impl-node.c:1430
#define PW_KEY_NODE_NICK
short node name
Definition: src/pipewire/keys.h:139
struct spa_io_segment segments[SPA_IO_POSITION_MAX_SEGMENTS]
segments
Definition: io.h:283
#define PW_KEY_NODE_GROUP
the group id this node is part of.
Definition: src/pipewire/keys.h:146
struct pw_global * pw_impl_node_get_global(struct pw_impl_node *node)
Get the global of this node.
Definition: impl-node.c:1249
int pw_impl_node_set_state(struct pw_impl_node *node, enum pw_node_state state)
Set the node state.
Definition: impl-node.c:2057
void pw_global_add_listener(struct pw_global *global, struct spa_hook *listener, const struct pw_global_events *events, void *data)
Add an event listener on the global.
Definition: global.c:255
struct spa_pod * param
the result param
Definition: build-12775836/doc/spa/node/node.h:141
void(* port_added)(void *data, struct pw_impl_port *port)
a port was added
Definition: impl-node.h:65
uint32_t stride
video stride in bytes
Definition: io.h:154
void(* state_request)(void *data, enum pw_node_state state)
a new state is requested on the node
Definition: impl-node.h:78
void * data
Definition: build-12775836/doc/spa/support/loop.h:61
unsigned char active
Definition: bluez-autoswitch.c:82
void spa_list_remove(struct spa_list *elem)
Definition: list.h:69
void pw_resource_add_object_listener(struct pw_resource *resource, struct spa_hook *listener, const void *funcs, void *data)
Set the resource implementation.
Definition: resource.c:174
#define spa_node_send_command(n,...)
Definition: build-12775836/doc/spa/node/node.h:654
@ SPA_IO_POSITION_STATE_RUNNING
Definition: io.h:253
#define SPA_N_ELEMENTS(arr)
Definition: defs.h:109
#define SPA_NODE_EVENT_ID(ev)
Definition: node/event.h:46
#define SPA_NODE_COMMAND_ID(cmd)
Definition: node/command.h:59
struct spa_hook object_listener
Definition: impl-core.c:77
#define PW_TYPE_INTERFACE_Node
Definition: src/pipewire/node.h:50
void(* port_info_changed)(void *data, struct pw_impl_port *port, const struct pw_port_info *info)
a port on the node changed info
Definition: impl-node.h:72
#define SPA_STATUS_HAVE_DATA
Definition: io.h:96
@ PW_MEMBLOCK_FLAG_SEAL
seal the fd
Definition: src/pipewire/mem.h:48
#define SPA_TIMESPEC_TO_NSEC(ts)
Definition: defs.h:191
#define PW_KEY_FACTORY_ID
Factory properties.
Definition: src/pipewire/keys.h:259
#define SPA_FD_NONBLOCK
Definition: system.h:62
#define PW_KEY_NODE_DESCRIPTION
localized human readable node one-line description.
Definition: src/pipewire/keys.h:140
#define SPA_NODE_FLAG_IN_DYNAMIC_PORTS
input ports can be added/removed
Definition: build-12775836/doc/spa/node/node.h:69
#define PW_KEY_NODE_NAME
node name
Definition: src/pipewire/keys.h:138
Definition: build-12775836/doc/spa/node/node.h:53
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:295
@ SPA_NODE_COMMAND_Suspend
suspend a node, this removes all configured formats and closes any devices
Definition: node/command.h:41
void pw_resource_errorf(struct pw_resource *resource, int res, const char *error,...) 1(3
int(* callback)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, struct spa_pod *param)
Definition: impl-node.c:1807
#define PW_KEY_NODE_LATENCY
the requested latency of the node as a fraction.
Definition: src/pipewire/keys.h:154
#define PW_KEY_APP_NAME
application keys
Definition: src/pipewire/keys.h:108
#define PW_VERSION_RESOURCE_EVENTS
Definition: resource.h:61
the result of enum_params or port_enum_params.
Definition: build-12775836/doc/spa/node/node.h:137
uint64_t position
current position
Definition: io.h:141
#define PW_KEY_NODE_WANT_DRIVER
the node wants to be grouped with a driver node in order to schedule the graph.
Definition: src/pipewire/keys.h:167
struct spa_rectangle size
the video size
Definition: io.h:155
#define SPA_IO_SEGMENT_BAR_FLAG_VALID
Definition: io.h:176
uint32_t n_params
number of items in params
Definition: build-12775836/doc/spa/node/node.h:84
#define SPA_NODE_COMMAND_INIT(id)
Definition: node/command.h:60
struct spa_node * pw_impl_node_get_implementation(struct pw_impl_node *node)
Get the node implementation.
Definition: impl-node.c:1686
int pw_impl_node_register(struct pw_impl_node *this, struct pw_properties *properties)
Complete initialization of the node and register.
Definition: impl-node.c:650
void pw_resource_add_listener(struct pw_resource *resource, struct spa_hook *listener, const struct pw_resource_events *events, void *data)
Add an event listener.
Definition: resource.c:165
uint32_t rmask
Definition: build-12775836/doc/spa/support/loop.h:64
#define SPA_RESULT_TYPE_NODE_PARAMS
Definition: build-12775836/doc/spa/node/node.h:129
@ SPA_IO_Clock
area to update clock information, struct spa_io_clock
Definition: io.h:55
Node events, listen to them with pw_impl_node_add_listener.
Definition: impl-node.h:51
#define SPA_IO_ERR
Definition: system.h:57
void(* info_changed)(void *data, const struct pw_node_info *info)
the node info changed
Definition: impl-node.h:70
#define spa_system_eventfd_read(s,...)
Definition: system.h:148
uint64_t duration
duration of current cycle
Definition: io.h:142
@ PW_MEMBLOCK_FLAG_MAP
mmap the fd
Definition: src/pipewire/mem.h:49
#define PW_KEY_PRIORITY_DRIVER
priority to be a driver
Definition: src/pipewire/keys.h:98
@ SPA_NODE_COMMAND_Pause
pause a node.
Definition: node/command.h:43
uint64_t position
The position when the running time == start.
Definition: io.h:242
@ SPA_LOG_LEVEL_DEBUG
Definition: build-12775836/doc/spa/support/log.h:51
#define SPA_FLAG_IS_SET(field, flag)
Definition: defs.h:73
#define spa_node_port_reuse_buffer(n,...)
Definition: build-12775836/doc/spa/node/node.h:662
Node methods.
Definition: src/pipewire/node.h:135
int pw_properties_update_ignore(struct pw_properties *props, const struct spa_dict *dict, const char *const ignore[])
Definition: properties.c:259
information about a parameter
Definition: param.h:64
void spa_list_init(struct spa_list *list)
Definition: list.h:44
struct spa_node * node
Definition: alsa-monitor.c:76
#define spa_list_for_each_safe(pos, tmp, head, member)
Definition: list.h:129
struct spa_list pending_list
Definition: impl-device.c:41
void spa_pod_builder_init(struct spa_pod_builder *builder, void *data, uint32_t size)
Definition: builder.h:96
#define PW_KEY_NODE_CACHE_PARAMS
cache the node params
Definition: src/pipewire/keys.h:170
Definition: utils/dict.h:48
#define spa_system_clock_gettime(s,...)
Definition: system.h:132
void(* state_changed)(void *data, enum pw_node_state old, enum pw_node_state state, const char *error)
the state of the node changed
Definition: impl-node.h:80
int pw_impl_node_set_param(struct pw_impl_node *node, uint32_t id, uint32_t flags, const struct spa_pod *param)
Definition: impl-node.c:1918
uint32_t n_segments
number of segments
Definition: io.h:282
struct spa_fraction framerate
the minimum framerate, the cycle duration is always smaller to ensure there is only one video frame p...
Definition: io.h:156
int pw_impl_port_add(struct pw_impl_port *port, struct pw_impl_node *node)
Add a port to a node.
Definition: impl-port.c:926
Port information structure.
Definition: build-12775836/doc/spa/node/node.h:94
#define SPA_RESULT_IS_ASYNC(res)
Definition: result.h:46
#define spa_node_set_param(n,...)
Definition: build-12775836/doc/spa/node/node.h:652
#define spa_node_set_callbacks(n,...)
Definition: build-12775836/doc/spa/node/node.h:649
#define PW_KEY_MEDIA_TYPE
Media.
Definition: src/pipewire/keys.h:277
int pw_impl_node_set_active(struct pw_impl_node *node, bool active)
Set a node active.
Definition: impl-node.c:2115
#define SPA_NODE_CHANGE_MASK_PARAMS
Definition: build-12775836/doc/spa/node/node.h:65
@ PW_NODE_STATE_SUSPENDED
the node is suspended, the device might be closed
Definition: src/pipewire/node.h:59
#define PW_KEY_MEDIA_CATEGORY
Media Category: Playback, Capture, Duplex, Monitor, Manager.
Definition: src/pipewire/keys.h:279
#define PW_KEY_NODE_MAX_LATENCY
the maximum supported latency of the node as a fraction.
Definition: src/pipewire/keys.h:156
#define SPA_RESULT_ASYNC_SEQ(res)
Definition: result.h:48
int pw_global_update_keys(struct pw_global *global, const struct spa_dict *dict, const char *const keys[])
Update the global properties, must be done when unregistered.
Definition: global.c:209
void pw_impl_client_set_busy(struct pw_impl_client *client, bool busy)
Mark the client busy.
Definition: impl-client.c:716
#define SYNC_STOP
Definition: impl-node.c:1431
struct spa_io_clock clock
clock position of driver, always valid and read only
Definition: io.h:272
unsigned int cache_params
Definition: impl-device.c:43
#define spa_strerror(err)
Definition: result.h:51
struct pw_work_queue * work
Definition: module-echo-cancel.c:136
uint32_t denom
Definition: defs.h:106
void pw_impl_port_destroy(struct pw_impl_port *port)
Definition: impl-port.c:1079
#define SPA_IO_IN
Definition: system.h:55
int end
Definition: impl-device.c:74
@ SPA_NODE_COMMAND_Start
start a node, this makes it start emitting scheduling events
Definition: node/command.h:45
struct pw_resource * pw_resource_new(struct pw_impl_client *client, uint32_t id, uint32_t permissions, const char *type, uint32_t version, size_t user_data_size)
Make a new resource for client.
Definition: resource.c:43
#define SPA_IO_VIDEO_SIZE_VALID
Definition: io.h:152
@ PW_IMPL_PORT_STATE_CONFIGURE
the port is ready for format negotiation
Definition: impl-port.h:52
unsigned int cache
Definition: impl-node.c:1812
uint32_t pw_work_queue_add(struct pw_work_queue *queue, void *obj, int res, pw_work_func_t func, void *data)
Add an item to the work queue.
Definition: work-queue.c:162
#define SPA_IO_HUP
Definition: system.h:58
#define pw_log_debug(...)
Definition: src/pipewire/log.h:89
const struct pw_node_info * pw_impl_node_get_info(struct pw_impl_node *node)
Get the node info.
Definition: impl-node.c:1231
#define DEFAULT_SYNC_TIMEOUT
Definition: impl-node.c:44
Definition: module-protocol-native.c:103
#define spa_node_sync(n,...)
Definition: build-12775836/doc/spa/node/node.h:650
void pw_global_destroy(struct pw_global *global)
Destroy a global.
Definition: global.c:369
void(* active_changed)(void *data, bool active)
the node active state changed
Definition: impl-node.h:75
void * pw_impl_node_get_user_data(struct pw_impl_node *node)
Get node user_data.
Definition: impl-node.c:1237
uint32_t n_subscribe_ids
Definition: impl-device.c:69
#define SPA_MIN(a, b)
Definition: defs.h:123
@ SPA_IO_POSITION_STATE_STOPPED
Definition: io.h:251
#define PW_KEY_NODE_ALWAYS_PROCESS
process even when unlinked
Definition: src/pipewire/keys.h:166
#define PW_VERSION_GLOBAL_EVENTS
Definition: global.h:69
#define SPA_ID_INVALID
Definition: defs.h:182
void(* result)(void *data, int seq, int res, uint32_t type, const void *result)
a result was received
Definition: impl-node.h:84
uint32_t user
private user field.
Definition: param.h:72
#define PW_KEY_MEDIA_CLASS
class Ex: "Video/Source"
Definition: src/pipewire/keys.h:285
#define spa_list_is_empty(l)
Definition: list.h:49
#define PW_KEY_CLIENT_ID
Client properties.
Definition: src/pipewire/keys.h:131
struct result_device_params_data data
Definition: impl-device.c:76
void(* driver_changed)(void *data, struct pw_impl_node *old, struct pw_impl_node *driver)
the driver of the node changed
Definition: impl-node.h:90
#define PW_ID_ANY
Definition: core.h:69
struct pw_impl_node * pw_context_create_node(struct pw_context *context, struct pw_properties *properties, size_t user_data_size)
Create a new node.
Definition: impl-node.c:1112
uint32_t type
Definition: pod/pod.h:52
#define SPA_NODE_CHANGE_MASK_PROPS
Definition: build-12775836/doc/spa/node/node.h:64
@ SPA_DATA_MemFd
generic fd, mmap to get to memory
Definition: buffer/buffer.h:49
#define PW_KEY_DEVICE_ID
device properties
Definition: src/pipewire/keys.h:210
uint32_t id
enum spa_param_type
Definition: param.h:65
uint64_t start
value of running time when this info is active.
Definition: io.h:231
struct spa_io_segment_bar bar
Definition: io.h:246
@ SPA_NODE_EVENT_Error
Definition: node/event.h:41
#define PW_NODE_CHANGE_MASK_PROPS
Definition: src/pipewire/node.h:77
void pw_resource_error(struct pw_resource *resource, int res, const char *error)
Generate an error for a resource.
Definition: resource.c:255
@ SPA_LOG_LEVEL_INFO
Definition: build-12775836/doc/spa/support/log.h:50
#define pw_log_warn(...)
Definition: src/pipewire/log.h:87
pw_node_state
The different node states.
Definition: src/pipewire/node.h:56
struct spa_fraction rate
rate for position/duration/delay
Definition: io.h:140
Definition: pod/command.h:44
A segment converts a running time to a segment (stream) position.
Definition: io.h:223
struct spa_io_segment_video video
Definition: io.h:247
#define SPA_INT_TO_PTR(u)
Definition: defs.h:175
#define spa_loop_add_source(l,...)
Definition: build-12775836/doc/spa/support/loop.h:115
struct pw_control this
Definition: control.c:34
A map.
Definition: map.h:55
Definition: pod/event.h:43
struct pw_context * pw_impl_node_get_context(struct pw_impl_node *node)
Get the context of this node.
Definition: impl-node.c:1243
#define pw_loop_invoke(l,...)
Definition: src/pipewire/loop.h:63
uint32_t max_input_ports
Definition: build-12775836/doc/spa/node/node.h:61
int64_t delay
delay between position and hardware, positive for capture, negative for playback
Definition: io.h:143
int pw_impl_link_activate(struct pw_impl_link *this)
Definition: impl-link.c:542
#define PW_KEY_NODE_LOCK_RATE
don't change rate when this node is active
Definition: src/pipewire/keys.h:162
const struct spa_type_info spa_type_param[]
Definition: param/type-info.h:46
void spa_hook_remove(struct spa_hook *hook)
Remove a hook.
Definition: hook.h:336
#define spa_system_close(s,...)
Definition: system.h:130
void * pw_resource_get_user_data(struct pw_resource *resource)
Get the user data for the resource, the size was given in pw_resource_new.
Definition: resource.c:159
#define spa_node_add_listener(n,...)
Definition: build-12775836/doc/spa/node/node.h:648
#define pw_log_info(...)
Definition: src/pipewire/log.h:88
events from the spa_node.
Definition: build-12775836/doc/spa/node/node.h:156
#define SPA_NODE_CHANGE_MASK_FLAGS
Definition: build-12775836/doc/spa/node/node.h:63
#define NAME
Definition: impl-node.c:42
void(* free)(void *data)
the node is about to be freed
Definition: impl-node.h:58
void pw_impl_node_destroy(struct pw_impl_node *node)
Destroy a node.
Definition: impl-node.c:1707
int seq
Definition: impl-node.c:1810
struct pw_work_queue * pw_work_queue_new(struct pw_loop *loop)
Create a new PipeWire Work Queue Object.
Definition: work-queue.c:98
#define pw_log_trace_fp(...)
Definition: src/pipewire/log.h:93
#define PW_KEY_NODE_DRIVER
node can drive the graph
Definition: src/pipewire/keys.h:171
int pw_impl_node_for_each_port(struct pw_impl_node *node, enum pw_direction direction, int(*callback)(void *data, struct pw_impl_port *port), void *data)
Iterate the ports in the given direction.
Definition: impl-node.c:1784
struct spa_param_info * params
parameter information
Definition: build-12775836/doc/spa/node/node.h:83
void(* initialized)(void *data)
the node is initialized
Definition: impl-node.h:60
struct pw_resource * resource
Definition: impl-core.c:75
void spa_hook_list_init(struct spa_hook_list *list)
Initialize a hook list to the empty list.
Definition: hook.h:305
void pw_impl_node_add_listener(struct pw_impl_node *node, struct spa_hook *listener, const struct pw_impl_node_events *events, void *data)
Add an event listener.
Definition: impl-node.c:1692
uint32_t flags
extra flags
Definition: io.h:177
int pw_impl_node_set_driver(struct pw_impl_node *node, struct pw_impl_node *driver)
Definition: impl-node.c:771
#define spa_system_eventfd_create(s,...)
Definition: system.h:146
int pw_work_queue_cancel(struct pw_work_queue *queue, void *obj, uint32_t id)
Cancel a work item.
Definition: work-queue.c:216
uint64_t change_mask
Definition: build-12775836/doc/spa/node/node.h:66
#define SPA_FD_CLOEXEC
Definition: system.h:61
int64_t offset
an offset to subtract from the clock position to get a running time.
Definition: io.h:275
const char * pw_direction_as_string(enum pw_direction direction)
Convert a pw_direction to a readable string.
Definition: introspect.c:52
uint32_t num
Definition: defs.h:105
void(* port_removed)(void *data, struct pw_impl_port *port)
a port was removed
Definition: impl-node.h:67
int pw_impl_link_deactivate(struct pw_impl_link *this)
Definition: impl-link.c:729
struct spa_hook listener
Definition: impl-device.c:77
void(* peer_removed)(void *data, struct pw_impl_node *peer)
a peer was removed
Definition: impl-node.h:95
#define SPA_PTR_TO_INT(p)
Definition: defs.h:174
#define PW_KEY_PRIORITY_SESSION
priority in session manager
Definition: src/pipewire/keys.h:97
void pw_impl_port_update_info(struct pw_impl_port *port, const struct spa_port_info *info)
Definition: impl-port.c:678
#define SPA_UNLIKELY(x)
Definition: defs.h:235
struct pw_properties * pw_properties_new(const char *key,...) 1
Make a new properties object.
Definition: properties.c:98
Resource events.
Definition: resource.h:60
#define SPA_STATUS_OK
Definition: io.h:94
int pw_properties_setf(struct pw_properties *properties, const char *key, const char *format,...) 1(3
The node information.
Definition: src/pipewire/node.h:70
uint32_t version
Definition: resource.h:62
uint64_t flags
Definition: build-12775836/doc/spa/node/node.h:81
#define pw_direction
The direction of a port.
Definition: port.h:56
void(* event)(void *data, const struct spa_event *event)
an event is emitted
Definition: impl-node.h:87
Definition: properties.h:49
void spa_hook_list_clean(struct spa_hook_list *list)
Remove all hooks from the list.
Definition: hook.h:344
void(* port_init)(void *data, struct pw_impl_port *port)
a port is being initialized on the node
Definition: impl-node.h:63
void pw_properties_free(struct pw_properties *properties)
Free a properties object.
Definition: properties.c:364
uint32_t id
Definition: alsa-monitor.c:72
#define pw_log_error(...)
Definition: src/pipewire/log.h:86
const char * spa_debug_type_find_name(const struct spa_type_info *info, uint32_t type)
Definition: types.h:68
#define spa_list_append(list, item)
Definition: list.h:81