From bc0dcd2e34739b3fb93c601fd908448e4dc17aa9 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 11 Dec 2019 17:40:32 +0100 Subject: [PATCH] pw_impl_module_load -> pw_context_load_module --- src/daemon/command.c | 2 +- src/examples/export-spa-device.c | 2 +- src/examples/export-spa.c | 2 +- src/examples/local-v4l2.c | 4 ++-- src/pipewire/context.c | 14 +++++++------- src/pipewire/impl-module.c | 2 +- src/pipewire/impl-module.h | 2 +- src/tools/pipewire-cli.c | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/daemon/command.c b/src/daemon/command.c index eaa0002b4..8d9cc5e49 100644 --- a/src/daemon/command.c +++ b/src/daemon/command.c @@ -179,7 +179,7 @@ execute_command_module_load(struct pw_command *command, struct pw_context *conte { struct pw_impl_module *module; - module = pw_impl_module_load(context, command->args[1], command->args[2], NULL); + module = pw_context_load_module(context, command->args[1], command->args[2], NULL); if (module == NULL) { asprintf(err, "could not load module \"%s\": %m", command->args[1]); return -errno; diff --git a/src/examples/export-spa-device.c b/src/examples/export-spa-device.c index 2050ca1aa..bc5681b3f 100644 --- a/src/examples/export-spa-device.c +++ b/src/examples/export-spa-device.c @@ -115,7 +115,7 @@ int main(int argc, char *argv[]) data.library = argv[1]; data.factory = argv[2]; - pw_impl_module_load(data.context, "libpipewire-module-spa-device-factory", NULL, NULL); + pw_context_load_module(data.context, "libpipewire-module-spa-device-factory", NULL, NULL); data.core = pw_context_connect(data.context, NULL, 0); if (data.core == NULL) { diff --git a/src/examples/export-spa.c b/src/examples/export-spa.c index 663584498..e2c52b2da 100644 --- a/src/examples/export-spa.c +++ b/src/examples/export-spa.c @@ -150,7 +150,7 @@ int main(int argc, char *argv[]) if (argc > 3) data.path = argv[3]; - pw_impl_module_load(data.context, "libpipewire-module-spa-node-factory", NULL, NULL); + pw_context_load_module(data.context, "libpipewire-module-spa-node-factory", NULL, NULL); data.core = pw_context_connect(data.context, NULL, 0); if (data.core == NULL) { diff --git a/src/examples/local-v4l2.c b/src/examples/local-v4l2.c index 082f434bb..a8e5ac356 100644 --- a/src/examples/local-v4l2.c +++ b/src/examples/local-v4l2.c @@ -409,8 +409,8 @@ int main(int argc, char *argv[]) spa_hook_list_init(&data.hooks); - pw_impl_module_load(data.context, "libpipewire-module-spa-node-factory", NULL, NULL); - pw_impl_module_load(data.context, "libpipewire-module-link-factory", NULL, NULL); + pw_context_load_module(data.context, "libpipewire-module-spa-node-factory", NULL, NULL); + pw_context_load_module(data.context, "libpipewire-module-link-factory", NULL, NULL); if (SDL_Init(SDL_INIT_VIDEO) < 0) { printf("can't initialize SDL: %s\n", SDL_GetError()); diff --git a/src/pipewire/context.c b/src/pipewire/context.c index c5b7391db..2ecf493b7 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -455,13 +455,13 @@ static int load_module_profile(struct pw_context *this, const char *profile) { pw_log_debug(NAME" %p: module profile %s", this, profile); if (strcmp(profile, "default") == 0) { - pw_impl_module_load(this, "libpipewire-module-rtkit", NULL, NULL); - pw_impl_module_load(this, "libpipewire-module-protocol-native", NULL, NULL); - pw_impl_module_load(this, "libpipewire-module-client-node", NULL, NULL); - pw_impl_module_load(this, "libpipewire-module-client-device", NULL, NULL); - pw_impl_module_load(this, "libpipewire-module-adapter", NULL, NULL); - pw_impl_module_load(this, "libpipewire-module-metadata", NULL, NULL); - pw_impl_module_load(this, "libpipewire-module-session-manager", NULL, NULL); + pw_context_load_module(this, "libpipewire-module-rtkit", NULL, NULL); + pw_context_load_module(this, "libpipewire-module-protocol-native", NULL, NULL); + pw_context_load_module(this, "libpipewire-module-client-node", NULL, NULL); + pw_context_load_module(this, "libpipewire-module-client-device", NULL, NULL); + pw_context_load_module(this, "libpipewire-module-adapter", NULL, NULL); + pw_context_load_module(this, "libpipewire-module-metadata", NULL, NULL); + pw_context_load_module(this, "libpipewire-module-session-manager", NULL, NULL); } return 0; } diff --git a/src/pipewire/impl-module.c b/src/pipewire/impl-module.c index 3f0275809..55fb9e7f7 100644 --- a/src/pipewire/impl-module.c +++ b/src/pipewire/impl-module.c @@ -173,7 +173,7 @@ static const struct pw_global_events global_events = { */ SPA_EXPORT struct pw_impl_module * -pw_impl_module_load(struct pw_context *context, +pw_context_load_module(struct pw_context *context, const char *name, const char *args, struct pw_properties *properties) { diff --git a/src/pipewire/impl-module.h b/src/pipewire/impl-module.h index 81a2115f1..52456a0b4 100644 --- a/src/pipewire/impl-module.h +++ b/src/pipewire/impl-module.h @@ -74,7 +74,7 @@ struct pw_impl_module_events { }; struct pw_impl_module * -pw_impl_module_load(struct pw_context *context, +pw_context_load_module(struct pw_context *context, const char *name, /**< name of the module */ const char *args /**< arguments of the module */, struct pw_properties *properties /**< extra global properties */); diff --git a/src/tools/pipewire-cli.c b/src/tools/pipewire-cli.c index 11fc2bdb5..7d148b9b3 100644 --- a/src/tools/pipewire-cli.c +++ b/src/tools/pipewire-cli.c @@ -249,7 +249,7 @@ static bool do_load_module(struct data *data, const char *cmd, char *args, char return false; } - module = pw_impl_module_load(data->context, a[0], n == 2 ? a[1] : NULL, NULL); + module = pw_context_load_module(data->context, a[0], n == 2 ? a[1] : NULL, NULL); if (module == NULL) { asprintf(error, "Could not load module"); return false; @@ -1648,7 +1648,7 @@ int main(int argc, char *argv[]) data.context = pw_context_new(l, pw_properties_new(PW_KEY_CORE_DAEMON, "1", NULL), 0); info = pw_context_get_info(data.context); - pw_impl_module_load(data.context, "libpipewire-module-link-factory", NULL, NULL); + pw_context_load_module(data.context, "libpipewire-module-link-factory", NULL, NULL); pw_loop_add_io(l, STDIN_FILENO, SPA_IO_IN|SPA_IO_HUP, false, do_input, &data);