mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	module: also support global node.name
Support a global node.name and prefix it with input. and output. if no per-stream node.name is given. This might be less confusing.
This commit is contained in:
		
							parent
							
								
									32e957345d
								
							
						
					
					
						commit
						37ba52005b
					
				
					 2 changed files with 14 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -526,12 +526,17 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
 | 
			
		|||
	copy_props(impl, props, PW_KEY_NODE_VIRTUAL);
 | 
			
		||||
	copy_props(impl, props, PW_KEY_MEDIA_NAME);
 | 
			
		||||
 | 
			
		||||
	if ((str = pw_properties_get(props, PW_KEY_NODE_NAME)) == NULL) {
 | 
			
		||||
		pw_properties_setf(props, PW_KEY_NODE_NAME,
 | 
			
		||||
				"loopback-%u-%u", pid, id);
 | 
			
		||||
		str = pw_properties_get(props, PW_KEY_NODE_NAME);
 | 
			
		||||
	}
 | 
			
		||||
	if (pw_properties_get(impl->capture_props, PW_KEY_NODE_NAME) == NULL)
 | 
			
		||||
		pw_properties_setf(impl->capture_props, PW_KEY_NODE_NAME,
 | 
			
		||||
				"input.loopback-%u-%u", pid, id);
 | 
			
		||||
				"input.%s", str);
 | 
			
		||||
	if (pw_properties_get(impl->playback_props, PW_KEY_NODE_NAME) == NULL)
 | 
			
		||||
		pw_properties_setf(impl->playback_props, PW_KEY_NODE_NAME,
 | 
			
		||||
				"output.loopback-%u-%u", pid, id);
 | 
			
		||||
				"output.%s", str);
 | 
			
		||||
 | 
			
		||||
	parse_audio_info(impl->capture_props, &impl->capture_info);
 | 
			
		||||
	parse_audio_info(impl->playback_props, &impl->playback_info);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue