diff --git a/src/pipewire/context.c b/src/pipewire/context.c index 1349df28b..c5b7391db 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -1067,29 +1067,6 @@ error: return res; } -/** Find a factory by name - * - * \param context the context object - * \param name the name of the factory to find - * - * Find in the list of factories registered in \a context for one with - * the given \a name. - * - * \memberof pw_context - */ -SPA_EXPORT -struct pw_impl_factory *pw_context_find_factory(struct pw_context *context, - const char *name) -{ - struct pw_impl_factory *factory; - - spa_list_for_each(factory, &context->factory_list, link) { - if (strcmp(factory->info.name, name) == 0) - return factory; - } - return NULL; -} - static int collect_nodes(struct pw_impl_node *driver) { struct spa_list queue; diff --git a/src/pipewire/context.h b/src/pipewire/context.h index b012b8840..8f5373770 100644 --- a/src/pipewire/context.h +++ b/src/pipewire/context.h @@ -44,7 +44,6 @@ struct pw_context; struct pw_global; struct pw_impl_client; -struct pw_impl_factory; #include #include @@ -143,11 +142,6 @@ int pw_context_for_each_global(struct pw_context *context, /**< the context */ struct pw_global *pw_context_find_global(struct pw_context *context, /**< the context */ uint32_t id /**< the global id */); -/** Find a factory by name */ -struct pw_impl_factory * -pw_context_find_factory(struct pw_context *context /**< the context */, - const char *name /**< the factory name */); - /** add a spa library for the given factory_name regex */ int pw_context_add_spa_lib(struct pw_context *context, const char *factory_regex, const char *lib); diff --git a/src/pipewire/impl-factory.c b/src/pipewire/impl-factory.c index c7f471050..730679224 100644 --- a/src/pipewire/impl-factory.c +++ b/src/pipewire/impl-factory.c @@ -288,3 +288,26 @@ void *pw_impl_factory_create_object(struct pw_impl_factory *factory, resource, type, version, properties, new_id); return res; } + +/** Find a factory by name + * + * \param context the context object + * \param name the name of the factory to find + * + * Find in the list of factories registered in \a context for one with + * the given \a name. + * + * \memberof pw_context + */ +SPA_EXPORT +struct pw_impl_factory *pw_context_find_factory(struct pw_context *context, + const char *name) +{ + struct pw_impl_factory *factory; + + spa_list_for_each(factory, &context->factory_list, link) { + if (strcmp(factory->info.name, name) == 0) + return factory; + } + return NULL; +} diff --git a/src/pipewire/impl-factory.h b/src/pipewire/impl-factory.h index bcb36340b..2c71a6640 100644 --- a/src/pipewire/impl-factory.h +++ b/src/pipewire/impl-factory.h @@ -109,6 +109,11 @@ void *pw_impl_factory_create_object(struct pw_impl_factory *factory, struct pw_properties *properties, uint32_t new_id); +/** Find a factory by name */ +struct pw_impl_factory * +pw_context_find_factory(struct pw_context *context /**< the context */, + const char *name /**< the factory name */); + #ifdef __cplusplus } #endif