pulse-server: optimize link finding

When we get a new link object, only check if a pending stream is linked
according to the new link instead of iterating all links.
This commit is contained in:
Wim Taymans 2022-06-03 15:48:08 +02:00
parent 6c310cf5e2
commit 258a203d74
3 changed files with 32 additions and 18 deletions

View file

@ -159,6 +159,8 @@ uint32_t collect_transport_codec_info(struct pw_manager_object *card,
struct spa_dict *collect_props(struct spa_pod *info, struct spa_dict *dict);
uint32_t find_profile_index(struct pw_manager_object *card, const char *name);
uint32_t find_port_index(struct pw_manager_object *card, uint32_t direction, const char *port_name);
struct pw_manager_object *find_peer_for_link(struct pw_manager *m,
struct pw_manager_object *o, uint32_t id, enum pw_direction direction);
struct pw_manager_object *find_linked(struct pw_manager *m, uint32_t id, enum pw_direction direction);
bool collect_is_linked(struct pw_manager *m, uint32_t id, enum pw_direction direction);