policy-node: improve target device selection logic

-loop through all the linkable nodes, instead of using default nodes
-implement a priority scheme to pick the appropriate target linkables
-If both nodes support a passthrough format, check the intersection.
 If the intersection is empty and one of the node is passthrough only,
 skip the node as a target
-the logic now closely aligns with the media-session logic

Fixes #75
This commit is contained in:
Ashok Sidipotu
2021-11-04 22:17:17 +05:30
committed by George Kiagiadakis
parent 0446b4fe3d
commit 3122a61761
2 changed files with 85 additions and 37 deletions

View File

@@ -21,6 +21,7 @@ function configProperties(node)
["node.id"] = node["bound-id"],
["client.id"] = np["client.id"],
["object.path"] = np["object.path"],
["priority.session"] = np["priority.session"],
}
for k, v in pairs(np) do