mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
channelmix: implement per channel volume
Implement per channel volume on channelmix. Extend control on stream to take an array of values when possible. Remove name argument from pw_node_new and pw_device_new. We can pass this as a property instead. Improve properties on nodes to more closely match what pulseaudio does. Don't let the monitor do too much with the udev properties but let the session manager set the description and icon-names. Remove some change_mask flags for things that don't change in introspect. Use the flags to mark changes in -cli and -monitor.
This commit is contained in:
parent
1c27f48992
commit
c6a7b3eedb
45 changed files with 737 additions and 367 deletions
|
|
@ -99,6 +99,8 @@ static int impl_node_enum_params(void *object, int seq,
|
|||
next:
|
||||
result.index = result.next;
|
||||
|
||||
spa_log_debug(this->log, NAME" %p: %d id:%u", this, seq, id);
|
||||
|
||||
spa_pod_builder_init(&b, buffer, sizeof(buffer));
|
||||
|
||||
switch (id) {
|
||||
|
|
@ -190,7 +192,6 @@ static void emit_node_info(struct impl *this, bool full)
|
|||
if (this->info.change_mask) {
|
||||
struct spa_dict_item items[1];
|
||||
|
||||
this->info.change_mask |= SPA_NODE_CHANGE_MASK_PROPS;
|
||||
items[0] = SPA_DICT_ITEM_INIT(SPA_KEY_NODE_DRIVER, this->driver ? "1" : "0");
|
||||
this->info.props = &SPA_DICT_INIT(items, 1);
|
||||
|
||||
|
|
@ -228,10 +229,6 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
if (this->target != this->slave) {
|
||||
if ((res = spa_node_set_param(this->target, id, flags, param)) < 0)
|
||||
return res;
|
||||
|
||||
this->info.change_mask = SPA_NODE_CHANGE_MASK_PARAMS;
|
||||
this->params[2].flags ^= SPA_PARAM_INFO_SERIAL;
|
||||
emit_node_info(this, false);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
@ -366,8 +363,10 @@ static void slave_info(void *data, const struct spa_node_info *info)
|
|||
"Input" : "Output");
|
||||
|
||||
if (info->props) {
|
||||
if ((str = spa_dict_lookup(info->props, SPA_KEY_NODE_DRIVER)) != NULL)
|
||||
if ((str = spa_dict_lookup(info->props, SPA_KEY_NODE_DRIVER)) != NULL) {
|
||||
this->driver = strcmp(str, "true") == 0 || atoi(str) == 1;
|
||||
this->info.change_mask |= SPA_NODE_CHANGE_MASK_PROPS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue