mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	interface: add an interface struct
The interface struct has the type,version and methods of the interface. Make spa interfaces extend from spa_interface and make a separate structure for the methods. Pass a generic void* as the first argument of methods, like we don in PipeWire. Bundle the methods + implementation in a versioned inteface and use that to invoke methods. This way we can do version checks on the methods. Make resource and proxy interfaces that we can can call. We can then make the core interfaces independent on proxy/resource and hide them in the lower layers. Add add_listener method to methods of core interfaces, just like SPA.
This commit is contained in:
		
							parent
							
								
									eb6481efb3
								
							
						
					
					
						commit
						ff946e3d4b
					
				
					 85 changed files with 3051 additions and 3000 deletions
				
			
		| 
						 | 
				
			
			@ -229,7 +229,7 @@ static void *create_object(void *_data,
 | 
			
		|||
	ld->global = pw_link_get_global(link);
 | 
			
		||||
	pw_global_add_listener(ld->global, &ld->global_listener, &global_events, ld);
 | 
			
		||||
 | 
			
		||||
	res = pw_global_bind(ld->global, client, PW_PERM_RWX, PW_VERSION_LINK, new_id);
 | 
			
		||||
	res = pw_global_bind(ld->global, client, PW_PERM_RWX, PW_VERSION_LINK_PROXY, new_id);
 | 
			
		||||
	if (res < 0)
 | 
			
		||||
		goto no_bind;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -312,7 +312,7 @@ static int module_init(struct pw_module *module, struct pw_properties *propertie
 | 
			
		|||
	factory = pw_factory_new(core,
 | 
			
		||||
				 "link-factory",
 | 
			
		||||
				 PW_TYPE_INTERFACE_Link,
 | 
			
		||||
				 PW_VERSION_LINK,
 | 
			
		||||
				 PW_VERSION_LINK_PROXY,
 | 
			
		||||
				 NULL,
 | 
			
		||||
				 sizeof(*data));
 | 
			
		||||
	if (factory == NULL)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue