mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
port: schedule reuse-buffer
Handle reuse-buffer in output-port tee nodes and input-port mix nodes. In both cases, reuse-buffer is forwarded to the input ports of the tee/mix node. Change-Id: Ifbe8bcf07f0adc6400accc64a9bfb63a5c70e215
This commit is contained in:
parent
d96d40e30a
commit
ed9851ab0f
1 changed files with 18 additions and 0 deletions
|
|
@ -83,6 +83,15 @@ static int schedule_tee_output(struct spa_node *data)
|
|||
|
||||
static int schedule_tee_reuse_buffer(struct spa_node *data, uint32_t port_id, uint32_t buffer_id)
|
||||
{
|
||||
struct impl *impl = SPA_CONTAINER_OF(data, struct impl, mix_node);
|
||||
struct pw_port *this = &impl->this;
|
||||
struct spa_graph_node *node = &this->rt.mix_node;
|
||||
struct spa_graph_port *p, *pp;
|
||||
|
||||
spa_list_for_each(p, &node->ports[SPA_DIRECTION_INPUT], link)
|
||||
if ((pp = p->peer) != NULL)
|
||||
spa_node_port_reuse_buffer(pp->node->implementation, port_id, buffer_id);
|
||||
|
||||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
|
|
@ -131,6 +140,15 @@ static int schedule_mix_output(struct spa_node *data)
|
|||
|
||||
static int schedule_mix_reuse_buffer(struct spa_node *data, uint32_t port_id, uint32_t buffer_id)
|
||||
{
|
||||
struct impl *impl = SPA_CONTAINER_OF(data, struct impl, mix_node);
|
||||
struct pw_port *this = &impl->this;
|
||||
struct spa_graph_node *node = &this->rt.mix_node;
|
||||
struct spa_graph_port *p, *pp;
|
||||
|
||||
spa_list_for_each(p, &node->ports[SPA_DIRECTION_INPUT], link)
|
||||
if ((pp = p->peer) != NULL)
|
||||
spa_node_port_reuse_buffer(pp->node->implementation, port_id, buffer_id);
|
||||
|
||||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue