mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: move extension to modules
Add extension support to modules. This is a list of extension commands that can be performed on the module. Remove the custom registry of extensions and make proper modules that implement the extensions. This is more in line with what pulseaudio does. The advantage is that the modules actually show up in the module list and that we can use the module user_data to implement the extension later.
This commit is contained in:
parent
89077d16ec
commit
d71fb40989
13 changed files with 269 additions and 102 deletions
|
|
@ -375,3 +375,19 @@ error_free:
|
|||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
struct module *module_lookup(struct impl *impl, uint32_t index, const char *name)
|
||||
{
|
||||
union pw_map_item *item;
|
||||
|
||||
if (index != SPA_ID_INVALID)
|
||||
return pw_map_lookup(&impl->modules, index);
|
||||
|
||||
pw_array_for_each(item, &impl->modules.items) {
|
||||
struct module *m = item->data;
|
||||
if (!pw_map_item_is_free(item) &&
|
||||
spa_streq(m->info->name, name))
|
||||
return m;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue