mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
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:
parent
8bbfe876a7
commit
4ad7ce3aa2
11 changed files with 138 additions and 1365 deletions
|
|
@ -88,7 +88,6 @@ static int device_marshal_sync(void *object, int seq)
|
|||
struct pw_resource *resource = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
pw_client_set_busy(pw_resource_get_client(resource), false);
|
||||
b = pw_protocol_native_begin_resource(resource, SPA_DEVICE_METHOD_SYNC, &msg);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
|
|
|
|||
|
|
@ -1007,7 +1007,7 @@ int pipewire__module_init(struct pw_module *module, const char *args)
|
|||
pw_protocol_native_init(this);
|
||||
pw_protocol_native0_init(this);
|
||||
|
||||
pw_log_debug(NAME" %p: new %d", this, debug_messages);
|
||||
pw_log_debug(NAME" %p: new debug:%d", this, debug_messages);
|
||||
|
||||
d = pw_protocol_get_user_data(this);
|
||||
d->protocol = this;
|
||||
|
|
|
|||
|
|
@ -416,7 +416,6 @@ static void core_event_marshal_ping(void *object, uint32_t id, int seq)
|
|||
struct spa_pod_builder *b;
|
||||
struct pw_protocol_native_message *msg;
|
||||
|
||||
pw_client_set_busy(pw_resource_get_client(resource), false);
|
||||
b = pw_protocol_native_begin_resource(resource, PW_CORE_PROXY_EVENT_PING, &msg);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
|
|
|
|||
|
|
@ -85,6 +85,8 @@ static int client_endpoint_stream_update(void *object,
|
|||
PW_KEY_ENDPOINT_ID,
|
||||
PW_KEY_MEDIA_CLASS,
|
||||
PW_KEY_PRIORITY_SESSION,
|
||||
PW_KEY_STREAM_NAME,
|
||||
PW_KEY_STREAM_DESCRIPTION,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -288,6 +288,8 @@ int endpoint_init(struct endpoint *this,
|
|||
PW_KEY_CLIENT_ID,
|
||||
PW_KEY_DEVICE_ID,
|
||||
PW_KEY_MEDIA_CLASS,
|
||||
PW_KEY_ENDPOINT_NAME,
|
||||
PW_KEY_ENDPOINT_ICON_NAME,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue