impl-port: add port.group property

Can be used to group ports together. Mostly because they are all from
the same stream and split into multiple ports by audioconvert/adapter.

Also useful for the alsa sequence to group client ports together.

Also interesting when pw-filter would be able to handle streams in the
future to find out what ports belong to what streams.
This commit is contained in:
Wim Taymans 2024-06-24 12:34:38 +02:00
parent 54c3fa06ed
commit 9d1d1fcbef
13 changed files with 62 additions and 23 deletions

View file

@ -2011,11 +2011,13 @@ impl_init(const struct spa_handle_factory *factory,
SPA_DICT_ITEM_INIT(SPA_KEY_FORMAT_DSP, "8 bit raw midi"),
SPA_DICT_ITEM_INIT(SPA_KEY_PORT_NAME, "in"),
SPA_DICT_ITEM_INIT(SPA_KEY_PORT_ALIAS, "in"),
SPA_DICT_ITEM_INIT(SPA_KEY_PORT_GROUP, "group.0"),
};
static const struct spa_dict_item out_port_items[] = {
SPA_DICT_ITEM_INIT(SPA_KEY_FORMAT_DSP, "8 bit raw midi"),
SPA_DICT_ITEM_INIT(SPA_KEY_PORT_NAME, "out"),
SPA_DICT_ITEM_INIT(SPA_KEY_PORT_ALIAS, "out"),
SPA_DICT_ITEM_INIT(SPA_KEY_PORT_GROUP, "group.0"),
};
static const struct spa_dict in_port_props = SPA_DICT_INIT_ARRAY(in_port_items);
static const struct spa_dict out_port_props = SPA_DICT_INIT_ARRAY(out_port_items);