media-session: rework linking nodes

Rework how nodes are linked. score each port pair and link the
highest score taking into account the type, direction, channels,
and number of linked ports.
This commit is contained in:
Wim Taymans 2020-07-22 15:05:45 +02:00
parent 5f9a8a82ab
commit 03c2185efe
2 changed files with 85 additions and 38 deletions

View file

@ -163,6 +163,8 @@ struct sm_port {
#define SM_PORT_CHANGE_MASK_INFO (SM_OBJECT_CHANGE_MASK_LAST<<0)
struct pw_port_info *info;
unsigned int visited:1;
};
struct sm_session {