mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
session-manager: remove obsolte _set_id
media-session: Wait for devices to appear and be bound before setting the profile on the device. Then wait for all the nodes to appear before attempting the create endpoints on the device.
This commit is contained in:
parent
e1ef01c860
commit
125fcb5660
9 changed files with 748 additions and 490 deletions
|
|
@ -340,7 +340,6 @@ int endpoint_init(struct endpoint *this,
|
|||
this->info.props = &this->props->dict;
|
||||
|
||||
pw_resource_bound_id(client_ep->resource, this->global->id);
|
||||
pw_client_endpoint_resource_set_id(client_ep->resource, this->global->id);
|
||||
|
||||
return pw_global_register(this->global);
|
||||
|
||||
|
|
|
|||
|
|
@ -308,20 +308,6 @@ do { \
|
|||
* CLIENT ENDPOINT
|
||||
***********************************************/
|
||||
|
||||
static int client_endpoint_marshal_set_id (void *object, uint32_t id)
|
||||
{
|
||||
struct pw_resource *resource = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource,
|
||||
PW_CLIENT_ENDPOINT_PROXY_EVENT_SET_ID, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(id));
|
||||
|
||||
return pw_protocol_native_end_resource(resource, b);
|
||||
}
|
||||
|
||||
static int client_endpoint_marshal_set_session_id (void *object, uint32_t id)
|
||||
{
|
||||
struct pw_resource *resource = object;
|
||||
|
|
@ -465,22 +451,6 @@ static int client_endpoint_marshal_stream_update(void *object,
|
|||
return pw_protocol_native_end_proxy(proxy, b);
|
||||
}
|
||||
|
||||
static int client_endpoint_demarshal_set_id(void *object,
|
||||
const struct pw_protocol_native_message *msg)
|
||||
{
|
||||
struct pw_proxy *proxy = object;
|
||||
struct spa_pod_parser prs;
|
||||
uint32_t id;
|
||||
|
||||
spa_pod_parser_init(&prs, msg->data, msg->size);
|
||||
if (spa_pod_parser_get_struct(&prs,
|
||||
SPA_POD_Int(&id)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_proxy_notify(proxy, struct pw_client_endpoint_proxy_events,
|
||||
set_id, 0, id);
|
||||
}
|
||||
|
||||
static int client_endpoint_demarshal_set_session_id(void *object,
|
||||
const struct pw_protocol_native_message *msg)
|
||||
{
|
||||
|
|
@ -633,7 +603,6 @@ static int client_endpoint_demarshal_stream_update(void *object,
|
|||
|
||||
static const struct pw_client_endpoint_proxy_events pw_protocol_native_client_endpoint_event_marshal = {
|
||||
PW_VERSION_CLIENT_ENDPOINT_PROXY_EVENTS,
|
||||
.set_id = client_endpoint_marshal_set_id,
|
||||
.set_session_id = client_endpoint_marshal_set_session_id,
|
||||
.set_param = client_endpoint_marshal_set_param,
|
||||
.stream_set_param = client_endpoint_marshal_stream_set_param,
|
||||
|
|
@ -643,7 +612,6 @@ static const struct pw_client_endpoint_proxy_events pw_protocol_native_client_en
|
|||
static const struct pw_protocol_native_demarshal
|
||||
pw_protocol_native_client_endpoint_event_demarshal[PW_CLIENT_ENDPOINT_PROXY_EVENT_NUM] =
|
||||
{
|
||||
[PW_CLIENT_ENDPOINT_PROXY_EVENT_SET_ID] = { client_endpoint_demarshal_set_id, 0 },
|
||||
[PW_CLIENT_ENDPOINT_PROXY_EVENT_SET_SESSION_ID] = { client_endpoint_demarshal_set_session_id, 0 },
|
||||
[PW_CLIENT_ENDPOINT_PROXY_EVENT_SET_PARAM] = { client_endpoint_demarshal_set_param, 0 },
|
||||
[PW_CLIENT_ENDPOINT_PROXY_EVENT_STREAM_SET_PARAM] = { client_endpoint_demarshal_stream_set_param, 0 },
|
||||
|
|
@ -681,20 +649,6 @@ static const struct pw_protocol_marshal pw_protocol_native_client_endpoint_marsh
|
|||
* CLIENT SESSION
|
||||
***********************************************/
|
||||
|
||||
static int client_session_marshal_set_id (void *object, uint32_t id)
|
||||
{
|
||||
struct pw_resource *resource = object;
|
||||
struct spa_pod_builder *b;
|
||||
|
||||
b = pw_protocol_native_begin_resource(resource,
|
||||
PW_CLIENT_SESSION_PROXY_EVENT_SET_ID, NULL);
|
||||
|
||||
spa_pod_builder_add_struct(b,
|
||||
SPA_POD_Int(id));
|
||||
|
||||
return pw_protocol_native_end_resource(resource, b);
|
||||
}
|
||||
|
||||
static int client_session_marshal_set_param (void *object,
|
||||
uint32_t id, uint32_t flags,
|
||||
const struct spa_pod *param)
|
||||
|
|
@ -826,22 +780,6 @@ static int client_session_marshal_link_update(void *object,
|
|||
return pw_protocol_native_end_proxy(proxy, b);
|
||||
}
|
||||
|
||||
static int client_session_demarshal_set_id(void *object,
|
||||
const struct pw_protocol_native_message *msg)
|
||||
{
|
||||
struct pw_proxy *proxy = object;
|
||||
struct spa_pod_parser prs;
|
||||
uint32_t id;
|
||||
|
||||
spa_pod_parser_init(&prs, msg->data, msg->size);
|
||||
if (spa_pod_parser_get_struct(&prs,
|
||||
SPA_POD_Int(&id)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pw_proxy_notify(proxy, struct pw_client_session_proxy_events,
|
||||
set_id, 0, id);
|
||||
}
|
||||
|
||||
static int client_session_demarshal_set_param(void *object,
|
||||
const struct pw_protocol_native_message *msg)
|
||||
{
|
||||
|
|
@ -979,7 +917,6 @@ static int client_session_demarshal_link_update(void *object,
|
|||
|
||||
static const struct pw_client_session_proxy_events pw_protocol_native_client_session_event_marshal = {
|
||||
PW_VERSION_CLIENT_SESSION_PROXY_EVENTS,
|
||||
.set_id = client_session_marshal_set_id,
|
||||
.set_param = client_session_marshal_set_param,
|
||||
.link_set_param = client_session_marshal_link_set_param,
|
||||
.link_request_state = client_session_marshal_link_request_state,
|
||||
|
|
@ -988,7 +925,6 @@ static const struct pw_client_session_proxy_events pw_protocol_native_client_ses
|
|||
static const struct pw_protocol_native_demarshal
|
||||
pw_protocol_native_client_session_event_demarshal[PW_CLIENT_SESSION_PROXY_EVENT_NUM] =
|
||||
{
|
||||
[PW_CLIENT_SESSION_PROXY_EVENT_SET_ID] = { client_session_demarshal_set_id, 0 },
|
||||
[PW_CLIENT_SESSION_PROXY_EVENT_SET_PARAM] = { client_session_demarshal_set_param, 0 },
|
||||
[PW_CLIENT_SESSION_PROXY_EVENT_LINK_SET_PARAM] = { client_session_demarshal_link_set_param, 0 },
|
||||
[PW_CLIENT_SESSION_PROXY_EVENT_LINK_REQUEST_STATE] = { client_session_demarshal_link_request_state, 0 },
|
||||
|
|
|
|||
|
|
@ -301,7 +301,6 @@ int session_init(struct session *this,
|
|||
this->info.props = &this->props->dict;
|
||||
|
||||
pw_resource_bound_id(client_sess->resource, this->global->id);
|
||||
pw_client_session_resource_set_id(client_sess->resource, this->global->id);
|
||||
|
||||
return pw_global_register(this->global);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue