mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
node: make port for_each more powerful
Make an int return from pw_node_for_each_port() so that we can return errors or early exit. Add pw_port_for_each_param() to iterate params. And use this to collect the formats.
This commit is contained in:
parent
425073afd8
commit
91a3670610
6 changed files with 81 additions and 47 deletions
|
|
@ -234,10 +234,10 @@ static void node_port_removed(void *data, struct pw_port *port)
|
|||
{
|
||||
}
|
||||
|
||||
static bool on_node_port_added(void *data, struct pw_port *port)
|
||||
static int on_node_port_added(void *data, struct pw_port *port)
|
||||
{
|
||||
node_port_added(data, port);
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void on_node_created(struct pw_node *node, struct node_info *info)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue