pulse-server: rename obj_id -> id

Simply use id for the object id.
This commit is contained in:
Wim Taymans 2022-01-17 09:50:41 +01:00
parent 5a315d5351
commit b2d221a66c
2 changed files with 8 additions and 8 deletions

View file

@ -70,7 +70,7 @@ struct pw_manager_object *select_object(struct pw_manager *m, struct selector *s
return s->best; return s->best;
} }
bool collect_is_linked(struct pw_manager *m, uint32_t obj_id, enum pw_direction direction) bool collect_is_linked(struct pw_manager *m, uint32_t id, enum pw_direction direction)
{ {
struct pw_manager_object *o; struct pw_manager_object *o;
uint32_t in_node, out_node; uint32_t in_node, out_node;
@ -83,14 +83,14 @@ bool collect_is_linked(struct pw_manager *m, uint32_t obj_id, enum pw_direction
pw_properties_fetch_uint32(o->props, PW_KEY_LINK_INPUT_NODE, &in_node) != 0) pw_properties_fetch_uint32(o->props, PW_KEY_LINK_INPUT_NODE, &in_node) != 0)
continue; continue;
if ((direction == PW_DIRECTION_OUTPUT && obj_id == out_node) || if ((direction == PW_DIRECTION_OUTPUT && id == out_node) ||
(direction == PW_DIRECTION_INPUT && obj_id == in_node)) (direction == PW_DIRECTION_INPUT && id == in_node))
return true; return true;
} }
return false; return false;
} }
struct pw_manager_object *find_linked(struct pw_manager *m, uint32_t obj_id, enum pw_direction direction) struct pw_manager_object *find_linked(struct pw_manager *m, uint32_t id, enum pw_direction direction)
{ {
struct pw_manager_object *o, *p; struct pw_manager_object *o, *p;
uint32_t in_node, out_node; uint32_t in_node, out_node;
@ -103,12 +103,12 @@ struct pw_manager_object *find_linked(struct pw_manager *m, uint32_t obj_id, enu
pw_properties_fetch_uint32(o->props, PW_KEY_LINK_INPUT_NODE, &in_node) != 0) pw_properties_fetch_uint32(o->props, PW_KEY_LINK_INPUT_NODE, &in_node) != 0)
continue; continue;
if (direction == PW_DIRECTION_OUTPUT && obj_id == out_node) { if (direction == PW_DIRECTION_OUTPUT && id == out_node) {
struct selector sel = { .id = in_node, .type = pw_manager_object_is_sink, }; struct selector sel = { .id = in_node, .type = pw_manager_object_is_sink, };
if ((p = select_object(m, &sel)) != NULL) if ((p = select_object(m, &sel)) != NULL)
return p; return p;
} }
if (direction == PW_DIRECTION_INPUT && obj_id == in_node) { if (direction == PW_DIRECTION_INPUT && id == in_node) {
struct selector sel = { .id = out_node, .type = pw_manager_object_is_recordable, }; struct selector sel = { .id = out_node, .type = pw_manager_object_is_recordable, };
if ((p = select_object(m, &sel)) != NULL) if ((p = select_object(m, &sel)) != NULL)
return p; return p;

View file

@ -156,7 +156,7 @@ uint32_t collect_transport_codec_info(struct pw_manager_object *card,
struct spa_dict *collect_props(struct spa_pod *info, struct spa_dict *dict); 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_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); uint32_t find_port_index(struct pw_manager_object *card, uint32_t direction, const char *port_name);
struct pw_manager_object *find_linked(struct pw_manager *m, uint32_t obj_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 obj_id, enum pw_direction direction); bool collect_is_linked(struct pw_manager *m, uint32_t id, enum pw_direction direction);
#endif #endif