mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
pw_factory -> pw_impl_factory
This commit is contained in:
parent
73900eea1b
commit
815d4a8d20
17 changed files with 170 additions and 169 deletions
|
|
@ -52,7 +52,7 @@ struct pw_proxy *pw_core_metadata_export(struct pw_core *core,
|
|||
int pw_protocol_native_ext_metadata_init(struct pw_context *context);
|
||||
|
||||
struct factory_data {
|
||||
struct pw_factory *this;
|
||||
struct pw_impl_factory *this;
|
||||
|
||||
struct pw_module *module;
|
||||
struct spa_hook module_listener;
|
||||
|
|
@ -103,8 +103,8 @@ error_exit:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static const struct pw_factory_implementation impl_factory = {
|
||||
PW_VERSION_FACTORY_IMPLEMENTATION,
|
||||
static const struct pw_impl_factory_implementation impl_factory = {
|
||||
PW_VERSION_IMPL_FACTORY_IMPLEMENTATION,
|
||||
.create_object = create_object,
|
||||
};
|
||||
|
||||
|
|
@ -116,23 +116,23 @@ static void module_destroy(void *data)
|
|||
|
||||
spa_list_remove(&d->export_metadata.link);
|
||||
|
||||
pw_factory_destroy(d->this);
|
||||
pw_impl_factory_destroy(d->this);
|
||||
}
|
||||
|
||||
static void module_registered(void *data)
|
||||
{
|
||||
struct factory_data *d = data;
|
||||
struct pw_module *module = d->module;
|
||||
struct pw_factory *factory = d->this;
|
||||
struct pw_impl_factory *factory = d->this;
|
||||
struct spa_dict_item items[1];
|
||||
char id[16];
|
||||
int res;
|
||||
|
||||
snprintf(id, sizeof(id), "%d", pw_global_get_id(pw_module_get_global(module)));
|
||||
items[0] = SPA_DICT_ITEM_INIT(PW_KEY_MODULE_ID, id);
|
||||
pw_factory_update_properties(factory, &SPA_DICT_INIT(items, 1));
|
||||
pw_impl_factory_update_properties(factory, &SPA_DICT_INIT(items, 1));
|
||||
|
||||
if ((res = pw_factory_register(factory, NULL)) < 0) {
|
||||
if ((res = pw_impl_factory_register(factory, NULL)) < 0) {
|
||||
pw_log_error(NAME" %p: can't register factory: %s", factory, spa_strerror(res));
|
||||
}
|
||||
}
|
||||
|
|
@ -147,14 +147,14 @@ SPA_EXPORT
|
|||
int pipewire__module_init(struct pw_module *module, const char *args)
|
||||
{
|
||||
struct pw_context *context = pw_module_get_context(module);
|
||||
struct pw_factory *factory;
|
||||
struct pw_impl_factory *factory;
|
||||
struct factory_data *data;
|
||||
int res;
|
||||
|
||||
if ((res = pw_protocol_native_ext_metadata_init(context)) < 0)
|
||||
return res;
|
||||
|
||||
factory = pw_factory_new(context,
|
||||
factory = pw_impl_factory_new(context,
|
||||
"metadata",
|
||||
PW_TYPE_INTERFACE_Metadata,
|
||||
PW_VERSION_METADATA,
|
||||
|
|
@ -163,13 +163,13 @@ int pipewire__module_init(struct pw_module *module, const char *args)
|
|||
if (factory == NULL)
|
||||
return -errno;
|
||||
|
||||
data = pw_factory_get_user_data(factory);
|
||||
data = pw_impl_factory_get_user_data(factory);
|
||||
data->this = factory;
|
||||
data->module = module;
|
||||
|
||||
pw_log_debug("module %p: new", module);
|
||||
|
||||
pw_factory_set_implementation(factory,
|
||||
pw_impl_factory_set_implementation(factory,
|
||||
&impl_factory,
|
||||
data);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue