mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
global: add properties
Add properties to global objects to make it easier to select what nodes and objects to bind too. They can also be used to implement permissions on the globals based on properties. Add more error handling in _register. Make more functions return a result code. Make a separate pw_module_register, like all other objects.
This commit is contained in:
parent
47dd97049c
commit
c593d868fb
45 changed files with 295 additions and 149 deletions
|
|
@ -53,7 +53,7 @@ struct proxy_data {
|
|||
struct spa_hook proxy_proxy_listener;
|
||||
};
|
||||
|
||||
static void print_properties(struct spa_dict *props, char mark)
|
||||
static void print_properties(const struct spa_dict *props, char mark)
|
||||
{
|
||||
const struct spa_dict_item *item;
|
||||
|
||||
|
|
@ -314,7 +314,8 @@ static const struct pw_proxy_events proxy_events = {
|
|||
};
|
||||
|
||||
static void registry_event_global(void *data, uint32_t id, uint32_t parent_id,
|
||||
uint32_t permissions, uint32_t type, uint32_t version)
|
||||
uint32_t permissions, uint32_t type, uint32_t version,
|
||||
const struct spa_dict *props)
|
||||
{
|
||||
struct data *d = data;
|
||||
struct pw_proxy *proxy;
|
||||
|
|
@ -358,6 +359,7 @@ static void registry_event_global(void *data, uint32_t id, uint32_t parent_id,
|
|||
permissions & PW_PERM_W ? 'w' : '-',
|
||||
permissions & PW_PERM_X ? 'x' : '-');
|
||||
printf("\ttype: %s (version %d)\n", spa_type_map_get_type(t->map, type), version);
|
||||
print_properties(props, ' ');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue