pw_client_endpoint_proxy -> pw_client_endpoint

pw_client_session_proxy -> pw_client_session
This commit is contained in:
Wim Taymans 2019-12-11 16:31:58 +01:00
parent 743450a19f
commit 94ed9c8e38
9 changed files with 138 additions and 138 deletions

View file

@ -61,7 +61,7 @@ struct endpoint {
struct node *node;
struct spa_hook listener;
struct pw_client_endpoint_proxy *client_endpoint;
struct pw_client_endpoint *client_endpoint;
struct spa_hook proxy_listener;
struct spa_hook client_endpoint_listener;
struct pw_endpoint_info info;
@ -219,8 +219,8 @@ exit:
return res;
}
static const struct pw_client_endpoint_proxy_events client_endpoint_events = {
PW_VERSION_CLIENT_ENDPOINT_PROXY_EVENTS,
static const struct pw_client_endpoint_events client_endpoint_events = {
PW_VERSION_CLIENT_ENDPOINT_EVENTS,
.set_session_id = client_endpoint_set_session_id,
.set_param = client_endpoint_set_param,
.stream_set_param = client_endpoint_stream_set_param,
@ -261,7 +261,7 @@ static struct stream *endpoint_add_stream(struct endpoint *endpoint)
s->format = endpoint->format;
pw_log_debug("stream %d", s->info.id);
pw_client_endpoint_proxy_stream_update(endpoint->client_endpoint,
pw_client_endpoint_stream_update(endpoint->client_endpoint,
s->info.id,
PW_CLIENT_ENDPOINT_STREAM_UPDATE_INFO,
0, NULL,
@ -277,7 +277,7 @@ static void destroy_stream(struct stream *stream)
{
struct endpoint *endpoint = stream->endpoint;
pw_client_endpoint_proxy_stream_update(endpoint->client_endpoint,
pw_client_endpoint_stream_update(endpoint->client_endpoint,
stream->info.id,
PW_CLIENT_ENDPOINT_STREAM_UPDATE_DESTROYED,
0, NULL,
@ -313,7 +313,7 @@ static void update_params(void *data)
}
}
pw_client_endpoint_proxy_update(endpoint->client_endpoint,
pw_client_endpoint_update(endpoint->client_endpoint,
PW_CLIENT_ENDPOINT_UPDATE_PARAMS |
PW_CLIENT_ENDPOINT_UPDATE_INFO,
n_params, params,
@ -371,7 +371,7 @@ static void complete_endpoint(void *data)
endpoint->format = info;
}
pw_client_endpoint_proxy_update(endpoint->client_endpoint,
pw_client_endpoint_update(endpoint->client_endpoint,
PW_CLIENT_ENDPOINT_UPDATE_INFO,
0, NULL,
&endpoint->info);
@ -475,7 +475,7 @@ static struct endpoint *create_endpoint(struct node *node, struct endpoint *moni
proxy = sm_media_session_create_object(impl->session,
"client-endpoint",
PW_TYPE_INTERFACE_ClientEndpoint,
PW_VERSION_CLIENT_ENDPOINT_PROXY,
PW_VERSION_CLIENT_ENDPOINT,
&props->dict, sizeof(*endpoint));
if (proxy == NULL) {
pw_properties_free(props);
@ -487,7 +487,7 @@ static struct endpoint *create_endpoint(struct node *node, struct endpoint *moni
endpoint->node = node;
endpoint->monitor = monitor;
endpoint->props = props;
endpoint->client_endpoint = (struct pw_client_endpoint_proxy *) proxy;
endpoint->client_endpoint = (struct pw_client_endpoint *) proxy;
endpoint->info.version = PW_VERSION_ENDPOINT_INFO;
endpoint->info.name = (char*)pw_properties_get(endpoint->props, PW_KEY_ENDPOINT_NAME);
endpoint->info.media_class = (char*)pw_properties_get(endpoint->props, PW_KEY_MEDIA_CLASS);
@ -512,7 +512,7 @@ static struct endpoint *create_endpoint(struct node *node, struct endpoint *moni
&endpoint->proxy_listener,
&proxy_events, endpoint);
pw_client_endpoint_proxy_add_listener(endpoint->client_endpoint,
pw_client_endpoint_add_listener(endpoint->client_endpoint,
&endpoint->client_endpoint_listener,
&client_endpoint_events,
endpoint);

View file

@ -106,8 +106,8 @@ struct impl {
struct spa_hook_list hooks;
struct pw_client_session_proxy *client_session;
struct spa_hook client_session_proxy_listener;
struct pw_client_session *client_session;
struct spa_hook proxy_client_session_listener;
struct spa_hook client_session_listener;
struct spa_list endpoint_link_list; /** list of struct endpoint_link */
@ -1274,7 +1274,7 @@ static void check_endpoint_link(struct endpoint_link *link)
spa_list_remove(&link->link);
pw_map_remove(&link->impl->endpoint_links, link->id);
pw_client_session_proxy_link_update(link->impl->client_session,
pw_client_session_link_update(link->impl->client_session,
link->id,
PW_CLIENT_SESSION_LINK_UPDATE_DESTROYED,
0, NULL, NULL);
@ -1447,7 +1447,7 @@ int sm_media_session_create_links(struct sm_media_session *sess,
if (link != NULL) {
/* now create the endpoint link */
pw_client_session_proxy_link_update(impl->client_session,
pw_client_session_link_update(impl->client_session,
link->id,
PW_CLIENT_SESSION_UPDATE_INFO,
0, NULL,
@ -1482,14 +1482,14 @@ static int client_session_link_request_state(void *object, uint32_t link_id, uin
return -ENOTSUP;
}
static const struct pw_client_session_proxy_events client_session_events = {
PW_VERSION_CLIENT_SESSION_PROXY_METHODS,
static const struct pw_client_session_events client_session_events = {
PW_VERSION_CLIENT_SESSION_METHODS,
.set_param = client_session_set_param,
.link_set_param = client_session_link_set_param,
.link_request_state = client_session_link_request_state,
};
static void client_session_proxy_bound(void *data, uint32_t id)
static void proxy_client_session_bound(void *data, uint32_t id)
{
struct impl *impl = data;
struct pw_session_info info;
@ -1502,7 +1502,7 @@ static void client_session_proxy_bound(void *data, uint32_t id)
pw_log_debug("got sesssion id:%d", id);
pw_client_session_proxy_update(impl->client_session,
pw_client_session_update(impl->client_session,
PW_CLIENT_SESSION_UPDATE_INFO,
0, NULL,
&info);
@ -1517,9 +1517,9 @@ static void client_session_proxy_bound(void *data, uint32_t id)
sm_stream_monitor_start(&impl->this);
}
static const struct pw_proxy_events client_session_proxy_events = {
static const struct pw_proxy_events proxy_client_session_events = {
PW_VERSION_PROXY_EVENTS,
.bound = client_session_proxy_bound,
.bound = proxy_client_session_bound,
};
static int start_session(struct impl *impl)
@ -1533,14 +1533,14 @@ static int start_session(struct impl *impl)
impl->client_session = pw_core_create_object(impl->monitor_core,
"client-session",
PW_TYPE_INTERFACE_ClientSession,
PW_VERSION_CLIENT_SESSION_PROXY,
PW_VERSION_CLIENT_SESSION,
NULL, 0);
pw_proxy_add_listener((struct pw_proxy*)impl->client_session,
&impl->client_session_proxy_listener,
&client_session_proxy_events, impl);
&impl->proxy_client_session_listener,
&proxy_client_session_events, impl);
pw_client_session_proxy_add_listener(impl->client_session,
pw_client_session_add_listener(impl->client_session,
&impl->client_session_listener,
&client_session_events, impl);

View file

@ -87,7 +87,7 @@ struct endpoint {
struct pw_properties *props;
struct node *node;
struct pw_client_endpoint_proxy *client_endpoint;
struct pw_client_endpoint *client_endpoint;
struct spa_hook client_endpoint_listener;
struct spa_hook proxy_listener;
struct pw_endpoint_info info;
@ -216,8 +216,8 @@ exit:
return res;
}
static const struct pw_client_endpoint_proxy_events client_endpoint_events = {
PW_VERSION_CLIENT_ENDPOINT_PROXY_EVENTS,
static const struct pw_client_endpoint_events client_endpoint_events = {
PW_VERSION_CLIENT_ENDPOINT_EVENTS,
.set_session_id = client_endpoint_set_session_id,
.set_param = client_endpoint_set_param,
.stream_set_param = client_endpoint_stream_set_param,
@ -254,7 +254,7 @@ static struct stream *endpoint_add_stream(struct endpoint *endpoint)
spa_list_append(&endpoint->stream_list, &s->link);
pw_log_debug("stream %d", node->id);
pw_client_endpoint_proxy_stream_update(endpoint->client_endpoint,
pw_client_endpoint_stream_update(endpoint->client_endpoint,
s->info.id,
PW_CLIENT_ENDPOINT_STREAM_UPDATE_INFO,
0, NULL,
@ -266,7 +266,7 @@ static void destroy_stream(struct stream *stream)
{
struct endpoint *endpoint = stream->endpoint;
pw_client_endpoint_proxy_stream_update(endpoint->client_endpoint,
pw_client_endpoint_stream_update(endpoint->client_endpoint,
stream->info.id,
PW_CLIENT_ENDPOINT_STREAM_UPDATE_DESTROYED,
0, NULL,
@ -312,7 +312,7 @@ static void complete_endpoint(void *data)
break;
}
}
pw_client_endpoint_proxy_update(endpoint->client_endpoint,
pw_client_endpoint_update(endpoint->client_endpoint,
PW_CLIENT_ENDPOINT_UPDATE_INFO,
0, NULL,
&endpoint->info);
@ -344,7 +344,7 @@ static void update_params(void *data)
}
}
pw_client_endpoint_proxy_update(endpoint->client_endpoint,
pw_client_endpoint_update(endpoint->client_endpoint,
PW_CLIENT_ENDPOINT_UPDATE_PARAMS |
PW_CLIENT_ENDPOINT_UPDATE_INFO,
n_params, params,
@ -406,7 +406,7 @@ static struct endpoint *create_endpoint(struct node *node)
proxy = sm_media_session_create_object(impl->session,
"client-endpoint",
PW_TYPE_INTERFACE_ClientEndpoint,
PW_VERSION_CLIENT_ENDPOINT_PROXY,
PW_VERSION_CLIENT_ENDPOINT,
&props->dict, sizeof(*endpoint));
if (proxy == NULL) {
pw_properties_free(props);
@ -417,7 +417,7 @@ static struct endpoint *create_endpoint(struct node *node)
endpoint->impl = impl;
endpoint->node = node;
endpoint->props = props;
endpoint->client_endpoint = (struct pw_client_endpoint_proxy *) proxy;
endpoint->client_endpoint = (struct pw_client_endpoint *) proxy;
endpoint->info.version = PW_VERSION_ENDPOINT_INFO;
endpoint->info.name = (char*)pw_properties_get(props, PW_KEY_ENDPOINT_NAME);
endpoint->info.media_class = (char*)pw_properties_get(props, PW_KEY_MEDIA_CLASS);
@ -441,7 +441,7 @@ static struct endpoint *create_endpoint(struct node *node)
&endpoint->proxy_listener,
&proxy_events, endpoint);
pw_client_endpoint_proxy_add_listener(endpoint->client_endpoint,
pw_client_endpoint_add_listener(endpoint->client_endpoint,
&endpoint->client_endpoint_listener,
&client_endpoint_events,
endpoint);