PipeWire: impl-node.h Source File

PipeWire 0.3.5

impl-node.h
Go to the documentation of this file.
1 /* PipeWire
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 PIPEWIRE_IMPL_NODE_H
26 #define PIPEWIRE_IMPL_NODE_H
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
44 struct pw_impl_node;
45 struct pw_impl_port;
46
47 #include <spa/node/node.h>
48 #include <spa/node/event.h>
49
50 #include <pipewire/impl.h>
51
53 struct pw_impl_node_events {
54 #define PW_VERSION_IMPL_NODE_EVENTS 0
55 uint32_t version;
56
58 void (*destroy) (void *data);
60 void (*free) (void *data);
62 void (*initialized) (void *data);
63
65 void (*port_init) (void *data, struct pw_impl_port *port);
67 void (*port_added) (void *data, struct pw_impl_port *port);
69 void (*port_removed) (void *data, struct pw_impl_port *port);
70
72 void (*info_changed) (void *data, const struct pw_node_info *info);
74 void (*port_info_changed) (void *data, struct pw_impl_port *port,
75 const struct pw_port_info *info);
77 void (*active_changed) (void *data, bool active);
78
80 void (*state_request) (void *data, enum pw_node_state state);
82 void (*state_changed) (void *data, enum pw_node_state old,
83 enum pw_node_state state, const char *error);
84
86 void (*result) (void *data, int seq, int res, uint32_t type, const void *result);
87
89 void (*event) (void *data, const struct spa_event *event);
90
92 void (*driver_changed) (void *data, struct pw_impl_node *old, struct pw_impl_node *driver);
93
95 void (*peer_added) (void *data, struct pw_impl_node *peer);
97 void (*peer_removed) (void *data, struct pw_impl_node *peer);
98 };
99
101 struct pw_impl_node *
102 pw_context_create_node(struct pw_context *context,
103 struct pw_properties *properties,
104 size_t user_data_size );
105
107 int pw_impl_node_register(struct pw_impl_node *node,
108 struct pw_properties *properties );
109
111 void pw_impl_node_destroy(struct pw_impl_node *node);
112
114 const struct pw_node_info *pw_impl_node_get_info(struct pw_impl_node *node);
115
117 void * pw_impl_node_get_user_data(struct pw_impl_node *node);
118
120 struct pw_context *pw_impl_node_get_context(struct pw_impl_node *node);
121
123 struct pw_global *pw_impl_node_get_global(struct pw_impl_node *node);
124
126 const struct pw_properties *pw_impl_node_get_properties(struct pw_impl_node *node);
127
129 int pw_impl_node_update_properties(struct pw_impl_node *node, const struct spa_dict *dict);
130
132 int pw_impl_node_set_implementation(struct pw_impl_node *node, struct spa_node *spa_node);
133
135 struct spa_node *pw_impl_node_get_implementation(struct pw_impl_node *node);
136
138 void pw_impl_node_add_listener(struct pw_impl_node *node,
139 struct spa_hook *listener,
140 const struct pw_impl_node_events *events,
141 void *data);
142
147 int pw_impl_node_for_each_port(struct pw_impl_node *node,
148 enum pw_direction direction,
149 int (*callback) (void *data, struct pw_impl_port *port),
150 void *data);
151
152 int pw_impl_node_for_each_param(struct pw_impl_node *node,
153 int seq, uint32_t param_id,
154 uint32_t index, uint32_t max,
155 const struct spa_pod *filter,
156 int (*callback) (void *data, int seq,
157 uint32_t id, uint32_t index, uint32_t next,
158 struct spa_pod *param),
159 void *data);
160
163 struct pw_impl_port *
164 pw_impl_node_find_port(struct pw_impl_node *node, enum pw_direction direction, uint32_t port_id);
165
167 uint32_t pw_impl_node_get_free_port_id(struct pw_impl_node *node, enum pw_direction direction);
168
169 int pw_impl_node_initialized(struct pw_impl_node *node);
170
173 int pw_impl_node_set_active(struct pw_impl_node *node, bool active);
174
176 bool pw_impl_node_is_active(struct pw_impl_node *node);
177
178 #ifdef __cplusplus
179 }
180 #endif
181
182 #endif /* PIPEWIRE_IMPL_NODE_H */
PW_MEMBLOCK_FLAG_READWRITE
@ PW_MEMBLOCK_FLAG_READWRITE
Definition: mem.h:43
res
static uint32_t int int res
Definition: core.h:323
pw_work_queue
id
static uint32_t id
Definition: core.h:322
resource_data::resource
struct pw_resource * resource
Definition: impl-device.c:52
PW_KEY_PRIORITY_MASTER
#define PW_KEY_PRIORITY_MASTER
priority to be a master
Definition: keys.h:86
pw_impl_node_for_each_port
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:1607
pw_map::pw_map_lookup
static void * pw_map_lookup(struct pw_map *map, uint32_t id)
Find an item in the map.
Definition: map.h:169
resource_data::subscribe_ids
uint32_t subscribe_ids[MAX_PARAMS]
Definition: impl-device.c:57
result_node_params_data
Definition: impl-node.c:1627
pw_impl_node_events::destroy
void(* destroy)(void *data)
the node is destroyed
Definition: impl-node.h:58
pw_work_queue::pw_work_queue_complete
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:243
pw_impl_node_register
SPA_EXPORT 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:548
pw_log::pw_log_error
#define pw_log_error(...)
pw_impl_node_set_implementation
SPA_EXPORT int pw_impl_node_set_implementation(struct pw_impl_node *node, struct spa_node *spa_node)
Set the node implementation.
Definition: impl-node.c:1471
PW_KEY_MEDIA_ROLE
#define PW_KEY_MEDIA_ROLE
Role: Movie, Music, Camera, Screen, Communication, Game, Notification, DSP, Production,...
Definition: keys.h:238
pw_global::pw_global_destroy
SPA_EXPORT void pw_global_destroy(struct pw_global *global)
Destroy a global.
Definition: global.c:367
PW_KEY_NODE_PAUSE_ON_IDLE
#define PW_KEY_NODE_PAUSE_ON_IDLE
pause the node when idle
Definition: keys.h:142
PW_TYPE_INTERFACE_Node
#define PW_TYPE_INTERFACE_Node
Definition: node.h:42
PW_NODE_CHANGE_MASK_ALL
#define PW_NODE_CHANGE_MASK_ALL
Definition: node.h:71
PW_MEMBLOCK_FLAG_MAP
@ PW_MEMBLOCK_FLAG_MAP
Definition: mem.h:40
pw_map::pw_map_init
static void pw_map_init(struct pw_map *map, size_t size, size_t extend)
Initialize a map.
Definition: map.h:76
PW_NODE_CHANGE_MASK_PROPS
#define PW_NODE_CHANGE_MASK_PROPS
Definition: node.h:69
resource_data
Definition: impl-core.c:37
resource_data::seq
int seq
Definition: impl-device.c:61
PW_KEY_OBJECT_ID
#define PW_KEY_OBJECT_ID
a global object id
Definition: keys.h:70
SYNC_CHECK
#define SYNC_CHECK
Definition: impl-node.c:1258
data
Definition: filter.c:70
pw_impl_node_set_param
SPA_EXPORT 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:1687
pw_work_queue::pw_work_queue_add
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:163
pw_impl_node_find_port
SPA_EXPORT 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:1697
pw_log_trace_fp
#define pw_log_trace_fp(...)
Definition: log.h:89
pw_global_events
Global events, use pw_global_add_listener.
Definition: global.h:65
pw_impl_client
PipeWire client object class.
pw_impl_node::pw_impl_node_destroy
SPA_EXPORT void pw_impl_node_destroy(struct pw_impl_node *node)
Destroy a node.
Definition: impl-node.c:1530
pw_direction
#define pw_direction
Definition: port.h:47
pw_impl_node_get_implementation
SPA_EXPORT struct spa_node * pw_impl_node_get_implementation(struct pw_impl_node *node)
Get the node implementation.
Definition: impl-node.c:1507
pw_resource_errorf
void pw_resource_errorf(struct pw_resource *resource, int res, const char *error,...) SPA_PRINTF_FUNC(3
pw_memblock::pw_mempool_alloc
SPA_EXPORT struct pw_memblock * pw_mempool_alloc(struct pw_mempool *pool, enum pw_memblock_flags flags, uint32_t type, size_t size)
Create a new memblock.
Definition: mem.c:440
pw_impl_port_register
int pw_impl_port_register(struct pw_impl_port *port, struct pw_properties *properties)
Definition: impl-port.c:770
pw_introspect::pw_direction_as_string
const char * pw_direction_as_string(enum pw_direction direction)
Convert a pw_direction to a readable string.
Definition: introspect.c:52
impl
Definition: control.c:33
PW_KEY_FACTORY_ID
#define PW_KEY_FACTORY_ID
Factory properties.
Definition: keys.h:215
result_node_params_data::data
void * data
Definition: impl-node.c:1628
PW_KEY_MODULE_ID
#define PW_KEY_MODULE_ID
module properties
Definition: keys.h:205
pw_global_add_listener
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:252
r
static uint32_t int int const char int r
Definition: core.h:335
pw_impl_node_events::peer_added
void(* peer_added)(void *data, struct pw_impl_node *peer)
a peer was added
Definition: impl-node.h:95
pw_work_queue::pw_work_queue_new
struct pw_work_queue * pw_work_queue_new(struct pw_loop *loop)
Create a new pw_work_queue.
Definition: work-queue.c:98
pw_impl_node_get_info
SPA_EXPORT const struct pw_node_info * pw_impl_node_get_info(struct pw_impl_node *node)
Get the node info.
Definition: impl-node.c:1085
pw_global
A global object visible to remote clients.
pw_impl_node_set_active
int pw_impl_node_set_active(struct pw_impl_node *node, bool active)
Set a node active.
Definition: impl-node.c:1867
PW_VERSION_NODE_METHODS
#define PW_VERSION_NODE_METHODS
Definition: node.h:128
pw_impl_node_events::version
uint32_t version
Definition: impl-node.h:55
PW_DIRECTION_INPUT
#define PW_DIRECTION_INPUT
Definition: port.h:48
pw_impl_node_set_implementation
int pw_impl_node_set_implementation(struct pw_impl_node *node, struct spa_node *spa_node)
Set the node implementation.
Definition: impl-node.c:1471
pw_map::pw_map_insert_new
static uint32_t pw_map_insert_new(struct pw_map *map, void *data)
Insert data in the map.
Definition: map.h:105
impl.h
pw_impl_node::pw_context_create_node
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:969
PW_KEY_PRIORITY_SESSION
#define PW_KEY_PRIORITY_SESSION
priority in session manager
Definition: keys.h:85
pw_properties::dict
struct spa_dict dict
dictionary of key/values
Definition: properties.h:46
PW_KEY_NODE_LATENCY
#define PW_KEY_NODE_LATENCY
the requested latency of the node as a fraction.
Definition: keys.h:138
pw_log::pw_log_info
#define pw_log_info(...)
PW_KEY_CLIENT_ID
#define PW_KEY_CLIENT_ID
Client properties.
Definition: keys.h:118
PW_MEMBLOCK_FLAG_SEAL
@ PW_MEMBLOCK_FLAG_SEAL
Definition: mem.h:39
pw_impl_node_get_properties
SPA_EXPORT const struct pw_properties * pw_impl_node_get_properties(struct pw_impl_node *node)
Get the node properties.
Definition: impl-node.c:1109
SYNC_START
#define SYNC_START
Definition: impl-node.c:1259
PW_KEY_MEDIA_CATEGORY
#define PW_KEY_MEDIA_CATEGORY
Media Category: Playback, Capture, Duplex, Monitor.
Definition: keys.h:236
pw_port_info
Definition: port.h:61
pw_impl_node
pw_impl_node_add_listener
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:1513
pw_properties::pw_properties_setf
SPA_EXPORT int pw_properties_setf(struct pw_properties *properties, const char *key, const char *format,...)
Set a property value by format.
Definition: properties.c:428
pw_impl_node_register
int pw_impl_node_register(struct pw_impl_node *node, struct pw_properties *properties)
Complete initialization of the node and register.
Definition: impl-node.c:548
pw_impl_node_events::port_added
void(* port_added)(void *data, struct pw_impl_port *port)
a port was added
Definition: impl-node.h:67
pw_impl_node_events::state_request
void(* state_request)(void *data, enum pw_node_state state)
a new state is requested on the node
Definition: impl-node.h:80
PW_KEY_OBJECT_PATH
#define PW_KEY_OBJECT_PATH
unique path to construct the object
Definition: keys.h:69
PW_NODE_STATE_RUNNING
@ PW_NODE_STATE_RUNNING
the node is running
Definition: node.h:55
port
Definition: buffers.c:43
pw_impl_port::pw_impl_port_add
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:819
PW_KEY_MEDIA_CLASS
#define PW_KEY_MEDIA_CLASS
class Ex: "Video/Source"
Definition: keys.h:242
pw_impl_node_update_properties
SPA_EXPORT int pw_impl_node_update_properties(struct pw_impl_node *node, const struct spa_dict *dict)
Update the node properties.
Definition: impl-node.c:1131
resource_data::object_listener
struct spa_hook object_listener
Definition: impl-core.c:39
pw_impl_node_get_user_data
SPA_EXPORT void * pw_impl_node_get_user_data(struct pw_impl_node *node)
Get node user_data.
Definition: impl-node.c:1091
pw_impl_node_events::port_info_changed
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:74
PW_KEY_DEVICE_ID
#define PW_KEY_DEVICE_ID
device properties
Definition: keys.h:167
filter
Definition: filter.c:112
pw_log::pw_log_debug
#define pw_log_debug(...)
result_node_params_data::callback
int(* callback)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, struct spa_pod *param)
Definition: impl-node.c:1629
pw_log::pw_log_warn
#define pw_log_warn(...)
pw_properties::pw_properties_update
SPA_EXPORT int pw_properties_update(struct pw_properties *props, const struct spa_dict *dict)
Update properties.
Definition: properties.c:258
pw_impl_node_events
Node events, listen to them with pw_impl_node_add_listener.
Definition: impl-node.h:53
pw_impl_node_events::info_changed
void(* info_changed)(void *data, const struct pw_node_info *info)
the node info changed
Definition: impl-node.h:72
pw_impl_node_is_active
SPA_EXPORT bool pw_impl_node_is_active(struct pw_impl_node *node)
Check if a node is active.
Definition: impl-node.c:1885
pw_work_queue::pw_work_queue_destroy
void pw_work_queue_destroy(struct pw_work_queue *queue)
Destroy a work queue.
Definition: work-queue.c:133
pw_node_methods
Node methods.
Definition: node.h:127
pw_resource_get_user_data
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:160
PW_NODE_STATE_CREATING
@ PW_NODE_STATE_CREATING
the node is being created
Definition: node.h:50
pw_impl_node_get_info
const struct pw_node_info * pw_impl_node_get_info(struct pw_impl_node *node)
Get the node info.
Definition: impl-node.c:1085
pw_impl_node_events::state_changed
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:82
pw_map::pw_map_clear
static void pw_map_clear(struct pw_map *map)
Clear a map.
Definition: map.h:87
PW_NODE_CHANGE_MASK_PARAMS
#define PW_NODE_CHANGE_MASK_PARAMS
Definition: node.h:70
pw_global_add_resource
int pw_global_add_resource(struct pw_global *global, struct pw_resource *resource)
Add a resource to a global.
Definition: global.c:227
PW_KEY_NODE_NAME
#define PW_KEY_NODE_NAME
node name
Definition: keys.h:125
PW_KEY_NODE_DESCRIPTION
#define PW_KEY_NODE_DESCRIPTION
localized human readable node one-line description.
Definition: keys.h:127
pw_context
the PipeWire context
SYNC_STOP
#define SYNC_STOP
Definition: impl-node.c:1260
pw_impl_node_get_context
struct pw_context * pw_impl_node_get_context(struct pw_impl_node *node)
Get the context of this node.
Definition: impl-node.c:1097
pw_impl_port_destroy
void pw_impl_port_destroy(struct pw_impl_port *port)
Definition: impl-port.c:969
pw_impl_node_is_active
bool pw_impl_node_is_active(struct pw_impl_node *node)
Check if a node is active.
Definition: impl-node.c:1885
resource_data::end
int end
Definition: impl-device.c:62
pw_impl_node_for_each_param
SPA_EXPORT 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:1652
param
Definition: filter.c:75
pw_resource
Client owned objects.
DEFAULT_SYNC_TIMEOUT
#define DEFAULT_SYNC_TIMEOUT
Definition: impl-node.c:42
pw_resource_add_object_listener
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:175
PW_NODE_STATE_SUSPENDED
@ PW_NODE_STATE_SUSPENDED
the node is suspended, the device might be closed
Definition: node.h:51
pw_impl_node_events::active_changed
void(* active_changed)(void *data, bool active)
the node active state changed
Definition: impl-node.h:77
PW_KEY_MEDIA_TYPE
#define PW_KEY_MEDIA_TYPE
Media.
Definition: keys.h:234
resource_data::n_subscribe_ids
uint32_t n_subscribe_ids
Definition: impl-device.c:58
PW_VERSION_GLOBAL_EVENTS
#define PW_VERSION_GLOBAL_EVENTS
Definition: global.h:66
pw_log::pw_log_trace
#define pw_log_trace(...)
pw_impl_node_events::result
void(* result)(void *data, int seq, int res, uint32_t type, const void *result)
a result was received
Definition: impl-node.h:86
resource_data::data
struct result_device_params_data data
Definition: impl-device.c:63
pw_impl_node_events::driver_changed
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:92
PW_KEY_NODE_SESSION
#define PW_KEY_NODE_SESSION
the session id this node is part of
Definition: keys.h:132
pw_node_state_as_string
SPA_EXPORT const char * pw_node_state_as_string(enum pw_node_state state)
Definition: introspect.c:34
pw_properties::pw_properties_get
SPA_EXPORT const char * pw_properties_get(const struct pw_properties *properties, const char *key)
Get a property.
Definition: properties.c:451
pw_impl_node_initialized
int pw_impl_node_initialized(struct pw_impl_node *node)
Definition: impl-node.c:626
pw_impl_node_set_driver
SPA_EXPORT int pw_impl_node_set_driver(struct pw_impl_node *node, struct pw_impl_node *driver)
Definition: impl-node.c:659
pw_impl_node_update_properties
int pw_impl_node_update_properties(struct pw_impl_node *node, const struct spa_dict *dict)
Update the node properties.
Definition: impl-node.c:1131
pw_impl_node_initialized
SPA_EXPORT int pw_impl_node_initialized(struct pw_impl_node *this)
Definition: impl-node.c:626
PW_NODE_CHANGE_MASK_STATE
#define PW_NODE_CHANGE_MASK_STATE
Definition: node.h:68
pw_impl_node_get_context
SPA_EXPORT struct pw_context * pw_impl_node_get_context(struct pw_impl_node *node)
Get the context of this node.
Definition: impl-node.c:1097
pw_resource_new
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
PW_KEY_NODE_DRIVER
#define PW_KEY_NODE_DRIVER
node can drive the graph
Definition: keys.h:143
pw_global::pw_global_new
SPA_EXPORT 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.
Definition: global.c:67
impl-node.h
impl::this
struct pw_control this
Definition: control.c:34
pw_map
A map.
Definition: map.h:50
pw_impl_node_for_each_param
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:1652
pw_impl_link_activate
int pw_impl_link_activate(struct pw_impl_link *this)
Definition: impl-link.c:518
pw_impl_node_find_port
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:1697
NAME
#define NAME
Definition: impl-node.c:40
pw_impl_node_events::free
void(* free)(void *data)
the node is about to be freed
Definition: impl-node.h:60
result_node_params_data::seq
int seq
Definition: impl-node.c:1632
pw_properties::pw_properties_new
SPA_EXPORT struct pw_properties * pw_properties_new(const char *key,...)
Make a new properties object.
Definition: properties.c:95
pw_impl_node_get_free_port_id
SPA_EXPORT 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:1732
seq
static uint32_t int seq
Definition: core.h:322
pw_impl_node_events::initialized
void(* initialized)(void *data)
the node is initialized
Definition: impl-node.h:62
PW_ID_ANY
#define PW_ID_ANY
Definition: core.h:49
pw_node_methods::version
uint32_t version
Definition: node.h:129
pw_impl_link
pw_impl_node_get_properties
const struct pw_properties * pw_impl_node_get_properties(struct pw_impl_node *node)
Get the node properties.
Definition: impl-node.c:1109
pw_impl_node_set_active
SPA_EXPORT int pw_impl_node_set_active(struct pw_impl_node *node, bool active)
Set a node active.
Definition: impl-node.c:1867
pw_global::pw_global_register
SPA_EXPORT int pw_global_register(struct pw_global *global)
register a global to the context registry
Definition: global.c:128
pw_impl_node_add_listener
SPA_EXPORT 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:1513
pw_loop_invoke
#define pw_loop_invoke(l,...)
Definition: loop.h:57
pw_impl_node_get_global
struct pw_global * pw_impl_node_get_global(struct pw_impl_node *node)
Get the global of this node.
Definition: impl-node.c:1103
PW_NODE_STATE_ERROR
@ PW_NODE_STATE_ERROR
error state
Definition: node.h:49
pw_impl_node_events::port_removed
void(* port_removed)(void *data, struct pw_impl_port *port)
a port was removed
Definition: impl-node.h:69
pw_impl_link_deactivate
int pw_impl_link_deactivate(struct pw_impl_link *this)
Definition: impl-link.c:721
pw_node_state
pw_node_state
Definition: node.h:48
resource_data::listener
struct spa_hook listener
Definition: impl-device.c:64
pw_impl_port_unlink
void pw_impl_port_unlink(struct pw_impl_port *port)
Definition: impl-port.c:921
pw_impl_node_events::peer_removed
void(* peer_removed)(void *data, struct pw_impl_node *peer)
a peer was removed
Definition: impl-node.h:97
PW_NODE_STATE_IDLE
@ PW_NODE_STATE_IDLE
the node is running but there is no active port
Definition: node.h:53
pw_impl_port_update_info
void pw_impl_port_update_info(struct pw_impl_port *port, const struct spa_port_info *info)
Definition: impl-port.c:587
pw_impl_node_get_global
SPA_EXPORT struct pw_global * pw_impl_node_get_global(struct pw_impl_node *node)
Get the global of this node.
Definition: impl-node.c:1103
pw_impl_node_for_each_port
SPA_EXPORT 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:1607
PW_KEY_NODE_NICK
#define PW_KEY_NODE_NICK
short node name
Definition: keys.h:126
pw_impl_node_get_free_port_id
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:1732
pw_node_info
The node information.
Definition: node.h:62
pw_impl_port_set_param
SPA_EXPORT 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:1134
pw_impl_client_set_busy
void pw_impl_client_set_busy(struct pw_impl_client *client, bool busy)
Mark the client busy.
Definition: impl-client.c:636
pw_impl_port
PW_KEY_NODE_ALWAYS_PROCESS
#define PW_KEY_NODE_ALWAYS_PROCESS
process even when unlinked
Definition: keys.h:141
pw_impl_node::pw_impl_node_set_state
SPA_EXPORT int pw_impl_node_set_state(struct pw_impl_node *node, enum pw_node_state state)
Set the node state.
Definition: impl-node.c:1816
pw_impl_node_get_implementation
struct spa_node * pw_impl_node_get_implementation(struct pw_impl_node *node)
Get the node implementation.
Definition: impl-node.c:1507
pw_impl_node_events::event
void(* event)(void *data, const struct spa_event *event)
an event is emited
Definition: impl-node.h:89
pw_impl_port::pw_context_create_port
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:358
PW_VERSION_NODE
#define PW_VERSION_NODE
Definition: node.h:44
pw_properties::pw_properties_update_keys
SPA_EXPORT int pw_properties_update_keys(struct pw_properties *props, const struct spa_dict *dict, const char *keys[])
Copy multiple keys from one property to another.
Definition: properties.c:215
pw_properties
A collection of key/value pairs.
Definition: properties.h:45
pw_impl_node_get_user_data
void * pw_impl_node_get_user_data(struct pw_impl_node *node)
Get node user_data.
Definition: impl-node.c:1091
pw_properties::pw_properties_free
SPA_EXPORT void pw_properties_free(struct pw_properties *properties)
Free a properties object.
Definition: properties.c:330
pw_impl_node_events::port_init
void(* port_init)(void *data, struct pw_impl_port *port)
a port is being initialized on the node
Definition: impl-node.h:65
PW_IMPL_PORT_STATE_CONFIGURE
@ PW_IMPL_PORT_STATE_CONFIGURE
the port is ready for format negotiation
Definition: impl-port.h:53