mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
node: add port and node params
Add a new struct spa_param_info that lists the available params on a node/port and if they are readable/writable/updated. We can use this to replace and improve the PARAM_List and also to notify property change and updates. Update elements and code to deal with this new param stuff. Add port and node info to most elements and signal changes. Use async enum_params in -inspect and use the param info to know which ones to enumerate. Use the port info to know what parameters to update in the remote-node.
This commit is contained in:
parent
3d25adc598
commit
499dd3ff22
52 changed files with 1979 additions and 1461 deletions
|
|
@ -379,7 +379,7 @@ static int impl_node_enum_params(struct spa_node *node, int seq,
|
|||
|
||||
result.index = result.next++;
|
||||
if (result.index >= this->n_params)
|
||||
return 0;
|
||||
break;
|
||||
|
||||
param = this->params[result.index];
|
||||
|
||||
|
|
@ -390,10 +390,11 @@ static int impl_node_enum_params(struct spa_node *node, int seq,
|
|||
if (spa_pod_filter(&b, &result.param, param, filter) != 0)
|
||||
continue;
|
||||
|
||||
pw_log_debug("client-node %p: %d param %u", this, seq, result.index);
|
||||
if ((res = this->callbacks->result(this->callbacks_data, seq, 0, &result)) != 0)
|
||||
return res;
|
||||
|
||||
if (++count != num)
|
||||
if (++count == num)
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -668,7 +669,7 @@ impl_node_port_enum_params(struct spa_node *node, int seq,
|
|||
|
||||
result.index = result.next++;
|
||||
if (result.index >= port->n_params)
|
||||
return 0;
|
||||
break;
|
||||
|
||||
param = port->params[result.index];
|
||||
|
||||
|
|
@ -683,7 +684,7 @@ impl_node_port_enum_params(struct spa_node *node, int seq,
|
|||
if ((res = this->callbacks->result(this->callbacks_data, seq, 0, &result)) != 0)
|
||||
return res;
|
||||
|
||||
if (++count != num)
|
||||
if (++count == num)
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue