mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
pulse-server: make separate index
Separate the id (the pipewire object id) from the index (what we send to the client to identify the objects).
This commit is contained in:
parent
955e4287ab
commit
0904a35ba8
19 changed files with 235 additions and 210 deletions
|
|
@ -58,18 +58,25 @@ struct pw_manager_object *select_object(struct pw_manager *m, struct selector *s
|
|||
continue;
|
||||
if (o->id == s->id)
|
||||
return o;
|
||||
if (o->index == s->index)
|
||||
return o;
|
||||
if (s->accumulate)
|
||||
s->accumulate(s, o);
|
||||
if (o->props && s->key != NULL && s->value != NULL &&
|
||||
(str = pw_properties_get(o->props, s->key)) != NULL &&
|
||||
spa_streq(str, s->value))
|
||||
return o;
|
||||
if (s->value != NULL && (uint32_t)atoi(s->value) == o->id)
|
||||
if (s->value != NULL && (uint32_t)atoi(s->value) == o->index)
|
||||
return o;
|
||||
}
|
||||
return s->best;
|
||||
}
|
||||
|
||||
uint32_t id_to_index(struct pw_manager *m, uint32_t id)
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
bool collect_is_linked(struct pw_manager *m, uint32_t id, enum pw_direction direction)
|
||||
{
|
||||
struct pw_manager_object *o;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue