mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
control: rework for spa_io_sequence
Put a pw_control object on all ports that support control messages. Allow linking of control objects (and thus ports). Make export-sink generate control messages to update the contrast property.
This commit is contained in:
parent
2631db14a8
commit
05d3502c84
7 changed files with 149 additions and 93 deletions
|
|
@ -559,7 +559,7 @@ static void try_link_controls(struct impl *impl, struct pw_port *port, struct pw
|
|||
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) {
|
||||
if (cin->prop_id == cout->prop_id) {
|
||||
if (cin->id != cout->id) {
|
||||
if ((res = pw_control_link(cout, cin)) < 0)
|
||||
pw_log_error("failed to link controls: %s", spa_strerror(res));
|
||||
}
|
||||
|
|
@ -567,7 +567,7 @@ static void try_link_controls(struct impl *impl, struct pw_port *port, struct pw
|
|||
}
|
||||
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 (cin->id != cout->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