mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
port: select a mixer when we set a format
When the port receives a format, look if we can find a mixer for it and configure it. Use the float32 mono mixer when possible. Use the new pw_buffers in the link. Let the port allocate buffers between the mixer and node when requested. The client-node doesn't need a mixer because mixing is done on the client. Remove all mixer and buffer negotiation code from adapter because it is now done at the port level.
This commit is contained in:
parent
4a47bf4706
commit
5cfb6634f4
7 changed files with 211 additions and 431 deletions
|
|
@ -1379,13 +1379,7 @@ impl_mix_port_set_param(void *object,
|
|||
uint32_t id, uint32_t flags,
|
||||
const struct spa_pod *param)
|
||||
{
|
||||
struct port *port = object;
|
||||
|
||||
if (port->direction != direction)
|
||||
return -ENOTSUP;
|
||||
|
||||
return impl_node_port_set_param(&port->node->node, direction, port->id,
|
||||
id, flags, param);
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
@ -1507,6 +1501,8 @@ static void node_port_added(void *data, struct pw_port *port)
|
|||
PW_PORT_MIX_FLAG_MULTI |
|
||||
PW_PORT_MIX_FLAG_MIX_ONLY);
|
||||
|
||||
port->flags |= PW_PORT_FLAG_NO_MIXER;
|
||||
|
||||
port->impl = SPA_CALLBACKS_INIT(&port_impl, p);
|
||||
port->owner_data = impl;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue