mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	daemon: use getenv(PIPEWIRE_CORE) for the core.name if it exists
As documented in pipewire/keys.h, PIPEWIRE_CORE is supposed to overwrite the default value.
This commit is contained in:
		
							parent
							
								
									f775547528
								
							
						
					
					
						commit
						2e6621fae0
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -65,6 +65,7 @@ int main(int argc, char *argv[])
 | 
			
		|||
	int c;
 | 
			
		||||
	char path[PATH_MAX];
 | 
			
		||||
	const char *config_name;
 | 
			
		||||
	const char *core_name;
 | 
			
		||||
 | 
			
		||||
	if (setenv("PIPEWIRE_INTERNAL", "1", 1) < 0)
 | 
			
		||||
		fprintf(stderr, "can't set PIPEWIRE_INTERNAL env: %m");
 | 
			
		||||
| 
						 | 
				
			
			@ -99,6 +100,11 @@ int main(int argc, char *argv[])
 | 
			
		|||
				PW_KEY_CONFIG_NAME, config_name,
 | 
			
		||||
				NULL);
 | 
			
		||||
 | 
			
		||||
	if ((core_name = getenv("PIPEWIRE_CORE"))) {
 | 
			
		||||
		pw_log_info("using core.name from environment: %s", core_name);
 | 
			
		||||
		pw_properties_set(properties, PW_KEY_CORE_NAME, core_name);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	loop = pw_main_loop_new(&properties->dict);
 | 
			
		||||
	if (loop == NULL) {
 | 
			
		||||
		pw_log_error("failed to create main-loop: %m");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue