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
				
			
		| 
						 | 
				
			
			@ -51,7 +51,7 @@ static const struct spa_dict_item module_props[] = {
 | 
			
		|||
};
 | 
			
		||||
 | 
			
		||||
struct factory_data {
 | 
			
		||||
	struct pw_factory *this;
 | 
			
		||||
	struct pw_impl_factory *this;
 | 
			
		||||
 | 
			
		||||
	struct spa_list node_list;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -238,8 +238,8 @@ error_cleanup:
 | 
			
		|||
	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,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -253,23 +253,23 @@ static void module_destroy(void *data)
 | 
			
		|||
	spa_list_for_each_safe(nd, t, &d->node_list, link)
 | 
			
		||||
		pw_node_destroy(nd->adapter);
 | 
			
		||||
 | 
			
		||||
	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", module->global->id);
 | 
			
		||||
	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));
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -284,10 +284,10 @@ 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;
 | 
			
		||||
 | 
			
		||||
	factory = pw_factory_new(context,
 | 
			
		||||
	factory = pw_impl_factory_new(context,
 | 
			
		||||
				 "adapter",
 | 
			
		||||
				 PW_TYPE_INTERFACE_Node,
 | 
			
		||||
				 PW_VERSION_NODE_PROXY,
 | 
			
		||||
| 
						 | 
				
			
			@ -298,7 +298,7 @@ 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->context = context;
 | 
			
		||||
	data->module = module;
 | 
			
		||||
| 
						 | 
				
			
			@ -306,7 +306,7 @@ int pipewire__module_init(struct pw_module *module, const char *args)
 | 
			
		|||
 | 
			
		||||
	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