mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	autolink: link to specified node unconditionally
This commit is contained in:
		
							parent
							
								
									bad8dac56e
								
							
						
					
					
						commit
						e9839bade6
					
				
					 1 changed files with 16 additions and 16 deletions
				
			
		| 
						 | 
					@ -255,13 +255,17 @@ static int find_global(void *data, struct pw_global *global)
 | 
				
			||||||
	struct pw_node *node;
 | 
						struct pw_node *node;
 | 
				
			||||||
	const struct pw_properties *props;
 | 
						const struct pw_properties *props;
 | 
				
			||||||
	const char *str;
 | 
						const char *str;
 | 
				
			||||||
	uint64_t plugged;
 | 
						uint64_t plugged = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (pw_global_get_type(global) != impl->t->node)
 | 
						if (pw_global_get_type(global) != impl->t->node)
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_log_debug("module %p: looking at node '%d'", impl, pw_global_get_id(global));
 | 
						pw_log_debug("module %p: looking at node '%d'", impl, pw_global_get_id(global));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (find->path_id != SPA_ID_INVALID && global->id != find->path_id)
 | 
				
			||||||
 | 
							return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (find->path_id == SPA_ID_INVALID) {
 | 
				
			||||||
		node = pw_global_get_object(global);
 | 
							node = pw_global_get_object(global);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if ((props = pw_node_get_properties(node)) == NULL)
 | 
							if ((props = pw_node_get_properties(node)) == NULL)
 | 
				
			||||||
| 
						 | 
					@ -273,13 +277,9 @@ static int find_global(void *data, struct pw_global *global)
 | 
				
			||||||
		if (strcmp(str, find->media_class) != 0)
 | 
							if (strcmp(str, find->media_class) != 0)
 | 
				
			||||||
			return 0;
 | 
								return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (find->path_id != SPA_ID_INVALID && global->id != find->path_id)
 | 
					 | 
				
			||||||
		return 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if ((str = pw_properties_get(props, "node.plugged")) != NULL)
 | 
							if ((str = pw_properties_get(props, "node.plugged")) != NULL)
 | 
				
			||||||
			plugged = pw_properties_parse_uint64(str);
 | 
								plugged = pw_properties_parse_uint64(str);
 | 
				
			||||||
	else
 | 
						}
 | 
				
			||||||
		plugged = 0;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_log_debug("module %p: found node '%d' %" PRIu64, impl,
 | 
						pw_log_debug("module %p: found node '%d' %" PRIu64, impl,
 | 
				
			||||||
			pw_global_get_id(global), plugged);
 | 
								pw_global_get_id(global), plugged);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue