policy-node: use priority of the nodes

This commit is contained in:
Wim Taymans 2020-01-08 17:29:11 +01:00
parent 817f8fef07
commit 2bca786fff

View file

@ -233,6 +233,16 @@ handle_node(struct impl *impl, struct sm_object *object)
else else
return 0; return 0;
if ((str = pw_properties_get(object->props, PW_KEY_NODE_PLUGGED)) != NULL)
node->plugged = pw_properties_parse_uint64(str);
else
node->plugged = SPA_TIMESPEC_TO_NSEC(&impl->now);
if ((str = pw_properties_get(object->props, PW_KEY_PRIORITY_SESSION)) != NULL)
node->priority = pw_properties_parse_int(str);
else
node->priority = 0;
node->direction = direction; node->direction = direction;
node->type = NODE_TYPE_DEVICE; node->type = NODE_TYPE_DEVICE;
node->media = strdup(media); node->media = strdup(media);