media-session: simplify target node handling + fix priorities

Handle all node.target behavior in rescan_node.

Make distinction between target nodes set in session manager via
metadata or via restore-stream; priorities are
metadata > client's node.target > restore-stream.
Allow metadata override to also remove the target node setting.
This commit is contained in:
Pauli Virtanen 2021-08-07 20:51:46 +03:00
parent e2d810a9b9
commit 8c6b111ea6
3 changed files with 81 additions and 118 deletions

View file

@ -155,8 +155,8 @@ struct sm_node {
struct pw_node_info *info;
struct spa_list port_list;
char *target_node; /** desired target node from stored
* preferences */
char *target_node; /**< desired target node */
unsigned int fixed_target:1; /**< target_node has priority over node.target */
};
struct sm_port {