impl-node: set_io on the port mixers

This commit is contained in:
Wim Taymans 2024-04-05 15:39:36 +02:00
parent e9f4b55eb2
commit cb716bcce7
2 changed files with 12 additions and 0 deletions

View file

@ -724,6 +724,7 @@ SPA_EXPORT
int pw_impl_node_set_io(struct pw_impl_node *this, uint32_t id, void *data, size_t size) int pw_impl_node_set_io(struct pw_impl_node *this, uint32_t id, void *data, size_t size)
{ {
int res; int res;
struct pw_impl_port *port;
res = spa_node_set_io(this->node, id, data, size); res = spa_node_set_io(this->node, id, data, size);
@ -743,6 +744,11 @@ int pw_impl_node_set_io(struct pw_impl_node *this, uint32_t id, void *data, size
this->driving = this->rt.clock && this->rt.position && this->driving = this->rt.clock && this->rt.position &&
this->rt.position->clock.id == this->rt.clock->id; this->rt.position->clock.id == this->rt.clock->id;
spa_list_for_each(port, &this->input_ports, link)
spa_node_set_io(port->mix, id, data, size);
spa_list_for_each(port, &this->output_ports, link)
spa_node_set_io(port->mix, id, data, size);
return res; return res;
} }

View file

@ -698,6 +698,12 @@ int pw_impl_port_set_mix(struct pw_impl_port *port, struct spa_node *node, uint3
pw_direction_reverse(port->direction), 0, pw_direction_reverse(port->direction), 0,
SPA_IO_Buffers, SPA_IO_Buffers,
&port->rt.io, sizeof(port->rt.io)); &port->rt.io, sizeof(port->rt.io));
if (port->node && port->node->rt.position)
spa_node_set_io(port->mix,
SPA_IO_Position,
port->node->rt.position,
sizeof(struct spa_io_position));
} }
return 0; return 0;
} }