From a528189d26a4e9f41305e190e2b1aa7c692117f7 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 21 Feb 2020 10:47:32 +0100 Subject: slave -> follower We use master/follower terminology everywhere. --- src/modules/module-adapter.c | 24 ++++++++++++------------ src/modules/module-adapter/adapter.c | 20 ++++++++++---------- src/modules/module-adapter/adapter.h | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) (limited to 'src/modules') diff --git a/src/modules/module-adapter.c b/src/modules/module-adapter.c index 78849927..bb6db61e 100644 --- a/src/modules/module-adapter.c +++ b/src/modules/module-adapter.c @@ -64,7 +64,7 @@ struct node_data { struct factory_data *data; struct spa_list link; struct pw_impl_node *adapter; - struct pw_impl_node *slave; + struct pw_impl_node *follower; struct spa_hook adapter_listener; struct pw_resource *resource; struct spa_hook resource_listener; @@ -95,7 +95,7 @@ static void node_destroy(void *data) static void node_free(void *data) { struct node_data *nd = data; - pw_impl_node_destroy(nd->slave); + pw_impl_node_destroy(nd->follower); } static void node_initialized(void *data) @@ -145,7 +145,7 @@ static void *create_object(void *_data, { struct factory_data *d = _data; struct pw_impl_client *client; - struct pw_impl_node *adapter, *slave; + struct pw_impl_node *adapter, *follower; const char *str, *factory_name; int res; struct node_data *nd; @@ -163,30 +163,30 @@ static void *create_object(void *_data, pw_impl_client_get_info(client)->id); } - slave = NULL; - str = pw_properties_get(properties, "adapt.slave.node"); + follower = NULL; + str = pw_properties_get(properties, "adapt.follower.node"); if (str != NULL) { - if (sscanf(str, "pointer:%p", &slave) != 1) + if (sscanf(str, "pointer:%p", &follower) != 1) goto error_properties; - pw_properties_setf(properties, "audio.adapt.slave", "pointer:%p", slave); + pw_properties_setf(properties, "audio.adapt.follower", "pointer:%p", follower); } - if (slave == NULL) { + if (follower == NULL) { factory_name = pw_properties_get(properties, SPA_KEY_FACTORY_NAME); if (factory_name == NULL) goto error_properties; - slave = pw_spa_node_load(d->context, + follower = pw_spa_node_load(d->context, factory_name, PW_SPA_NODE_FLAG_ACTIVATE | PW_SPA_NODE_FLAG_NO_REGISTER, pw_properties_copy(properties), 0); - if (slave == NULL) + if (follower == NULL) goto error_no_mem; } adapter = pw_adapter_new(pw_impl_module_get_context(d->module), - slave, + follower, properties, sizeof(struct node_data)); properties = NULL; @@ -201,7 +201,7 @@ static void *create_object(void *_data, nd = pw_adapter_get_user_data(adapter); nd->data = d; nd->adapter = adapter; - nd->slave = slave; + nd->follower = follower; nd->resource = resource; nd->new_id = new_id; spa_list_append(&d->node_list, &nd->link); diff --git a/src/modules/module-adapter/adapter.c b/src/modules/module-adapter/adapter.c index 49e8aea6..32c423aa 100644 --- a/src/modules/module-adapter/adapter.c +++ b/src/modules/module-adapter/adapter.c @@ -60,7 +60,7 @@ struct node { struct pw_impl_node *node; struct spa_hook node_listener; - struct pw_impl_node *slave; + struct pw_impl_node *follower; void *user_data; enum pw_direction direction; @@ -186,7 +186,7 @@ static int find_format(struct pw_impl_node *node, enum pw_direction direction, struct pw_impl_node *pw_adapter_new(struct pw_context *context, - struct pw_impl_node *slave, + struct pw_impl_node *follower, struct pw_properties *props, size_t user_data_size) { @@ -198,13 +198,13 @@ struct pw_impl_node *pw_adapter_new(struct pw_context *context, int res; uint32_t media_type, media_subtype; - info = pw_impl_node_get_info(slave); + info = pw_impl_node_get_info(follower); if (info == NULL) { res = -EINVAL; goto error; } - pw_log_debug(NAME " %p: in %d/%d out %d/%d", slave, + pw_log_debug(NAME " %p: in %d/%d out %d/%d", follower, info->n_input_ports, info->max_input_ports, info->n_output_ports, info->max_output_ports); @@ -231,12 +231,12 @@ struct pw_impl_node *pw_adapter_new(struct pw_context *context, pw_properties_set(props, "factory.mode", str); } - if ((res = find_format(slave, direction, &media_type, &media_subtype)) < 0) + if ((res = find_format(follower, direction, &media_type, &media_subtype)) < 0) goto error; if (media_type == SPA_MEDIA_TYPE_audio) { - pw_properties_setf(props, "audio.adapt.slave", "pointer:%p", - pw_impl_node_get_implementation(slave)); + pw_properties_setf(props, "audio.adapt.follower", "pointer:%p", + pw_impl_node_get_implementation(follower)); pw_properties_set(props, SPA_KEY_LIBRARY_NAME, "audioconvert/libspa-audioconvert"); if (pw_properties_get(props, PW_KEY_MEDIA_CLASS) == NULL) pw_properties_setf(props, PW_KEY_MEDIA_CLASS, "Audio/%s", @@ -244,8 +244,8 @@ struct pw_impl_node *pw_adapter_new(struct pw_context *context, factory_name = SPA_NAME_AUDIO_ADAPT; } else if (media_type == SPA_MEDIA_TYPE_video) { - pw_properties_setf(props, "video.adapt.slave", "pointer:%p", - pw_impl_node_get_implementation(slave)); + pw_properties_setf(props, "video.adapt.follower", "pointer:%p", + pw_impl_node_get_implementation(follower)); pw_properties_set(props, SPA_KEY_LIBRARY_NAME, "videoconvert/libspa-videoconvert"); if (pw_properties_get(props, PW_KEY_MEDIA_CLASS) == NULL) pw_properties_setf(props, PW_KEY_MEDIA_CLASS, "Video/%s", @@ -270,7 +270,7 @@ struct pw_impl_node *pw_adapter_new(struct pw_context *context, n = pw_spa_node_get_user_data(node); n->context = context; n->node = node; - n->slave = slave; + n->follower = follower; n->direction = direction; n->props = props; n->media_type = media_type; diff --git a/src/modules/module-adapter/adapter.h b/src/modules/module-adapter/adapter.h index 113ab72f..110ed12f 100644 --- a/src/modules/module-adapter/adapter.h +++ b/src/modules/module-adapter/adapter.h @@ -35,7 +35,7 @@ extern "C" { struct pw_impl_node * pw_adapter_new(struct pw_context *context, - struct pw_impl_node *slave, + struct pw_impl_node *follower, struct pw_properties *properties, size_t user_data_size); -- cgit v1.2.3