mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
control: keep track of prop_id
Keep track of the property id which describes the property functionality. Link controls based on the property instead of the param_id.
This commit is contained in:
parent
053f251be8
commit
2fe6a8245d
3 changed files with 19 additions and 9 deletions
|
|
@ -148,15 +148,24 @@ static void try_link_controls(struct impl *impl, struct pw_port *port, struct pw
|
|||
struct pw_control *cin, *cout;
|
||||
int res;
|
||||
|
||||
pw_log_debug("module %p: trying controls", impl);
|
||||
spa_list_for_each(cout, &port->control_list[SPA_DIRECTION_OUTPUT], port_link) {
|
||||
spa_list_for_each(cin, &target->control_list[SPA_DIRECTION_INPUT], port_link) {
|
||||
pw_log_debug("controls %d <-> %d", cin->id, cout->id);
|
||||
if (cin->id == cout->id) {
|
||||
if (cin->prop_id == cout->prop_id) {
|
||||
if ((res = pw_control_link(cout, cin)) < 0)
|
||||
pw_log_error("failed to link controls: %s", spa_strerror(res));
|
||||
}
|
||||
}
|
||||
}
|
||||
spa_list_for_each(cin, &port->control_list[SPA_DIRECTION_INPUT], port_link) {
|
||||
spa_list_for_each(cout, &target->control_list[SPA_DIRECTION_OUTPUT], port_link) {
|
||||
if (cin->prop_id == cout->prop_id) {
|
||||
if ((res = pw_control_link(cout, cin)) < 0)
|
||||
pw_log_error("failed to link controls: %s", spa_strerror(res));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue