mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	module: load and register in one go
Load and register the module in one go because we need to have the global set when calling the init function so that factories and nodes can use this as the parent global. Set the name in the global properties.
This commit is contained in:
		
							parent
							
								
									1ed63e7ba0
								
							
						
					
					
						commit
						5df5afd0a9
					
				
					 7 changed files with 50 additions and 45 deletions
				
			
		| 
						 | 
				
			
			@ -218,7 +218,7 @@ static bool do_load_module(struct data *data, const char *cmd, char *args, char
 | 
			
		|||
		return false;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	module = pw_module_load(data->core, a[0], n == 2 ? a[1] : NULL);
 | 
			
		||||
	module = pw_module_load(data->core, a[0], n == 2 ? a[1] : NULL, NULL, NULL, NULL);
 | 
			
		||||
	if (module == NULL) {
 | 
			
		||||
		asprintf(error, "Could not load module");
 | 
			
		||||
		return false;
 | 
			
		||||
| 
						 | 
				
			
			@ -1116,7 +1116,7 @@ int main(int argc, char *argv[])
 | 
			
		|||
	data.t = pw_core_get_type(data.core);
 | 
			
		||||
	info = pw_core_get_info(data.core);
 | 
			
		||||
 | 
			
		||||
	pw_module_load(data.core, "libpipewire-module-link-factory", NULL);
 | 
			
		||||
	pw_module_load(data.core, "libpipewire-module-link-factory", NULL, NULL, NULL, NULL);
 | 
			
		||||
 | 
			
		||||
	pw_loop_add_io(l, STDIN_FILENO, SPA_IO_IN|SPA_IO_HUP, false, do_input, &data);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue