pw_impl_module_load -> pw_context_load_module

This commit is contained in:
Wim Taymans 2019-12-11 17:40:32 +01:00
parent 3084809bed
commit bc0dcd2e34
8 changed files with 16 additions and 16 deletions

View file

@ -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;

View file

@ -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) {

View file

@ -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) {

View file

@ -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());

View file

@ -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;
}

View file

@ -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)
{

View file

@ -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 */);

View file

@ -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);