session-manager: split policy and monitor

Separate the session manager in a monitor and policy part.

The monitor manages the devices and endpoints.

The policy watches the nodes/ports/clients and applies the policy
of linking them.

Because both now have a separate connection, we can remove some
hacks in the protocol. When a remote was both the implementer and
user of an object we could get in a deadlock when the user was
blocked waiting and the implementator was blocked sending a reply.
We used to un-busy a client when it was expecting a reply from a
ping or sync for this reason.

Add and use some more keys for the endpoints and streams.
This commit is contained in:
Wim Taymans 2019-11-07 16:03:00 +01:00
parent 8bbfe876a7
commit 4ad7ce3aa2
11 changed files with 138 additions and 1365 deletions

View file

@ -34,9 +34,6 @@
extern "C" {
#endif
#define PW_KEY_ENDPOINT_ID "endpoint.id"
#define PW_KEY_SESSION_ID "session.id"
enum pw_endpoint_direction {
PW_ENDPOINT_DIRECTION_SINK_INPUT = SPA_DIRECTION_INPUT,
PW_ENDPOINT_DIRECTION_SOURCE_OUTPUT = SPA_DIRECTION_OUTPUT,

View file

@ -30,8 +30,16 @@
extern "C" {
#endif
#define PW_KEY_ENDPOINT_ID "endpoint.id"
#define PW_KEY_SESSION_ID "session.id"
#define PW_KEY_SESSION_ID "session.id" /**< id of a session manager */
#define PW_KEY_ENDPOINT_ID "endpoint.id" /**< id of an endpoint */
#define PW_KEY_ENDPOINT_NAME "endpoint.name" /**< the name of an endpoint */
#define PW_KEY_ENDPOINT_ICON_NAME "endpoint.icon-name" /**< an XDG icon name for the device.
* Ex. "sound-card-speakers-usb" */
#define PW_KEY_STREAM_ID "stream.id" /**< id of a stream */
#define PW_KEY_STREAM_NAME "stream.name" /**< unique name of a stream */
#define PW_KEY_STREAM_DESCRIPTION "stream.description" /**< description of a stream */
#ifdef __cplusplus
}