mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pw-dump: print id-xxx for unknown ids
When the id has no info in the type system use id-xxx instead of "unknown".
This commit is contained in:
		
							parent
							
								
									4668b72312
								
							
						
					
					
						commit
						3b0b5cb55d
					
				
					 1 changed files with 9 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -436,9 +436,16 @@ static void put_pod_value(struct data *d, const char *key, const struct spa_type
 | 
			
		|||
		info = ti ? ti->values : info;
 | 
			
		||||
 | 
			
		||||
		SPA_POD_OBJECT_BODY_FOREACH(b, size, p) {
 | 
			
		||||
			char fallback[32];
 | 
			
		||||
			const char *name;
 | 
			
		||||
 | 
			
		||||
			ii = spa_debug_type_find(info, p->key);
 | 
			
		||||
			put_pod_value(d,
 | 
			
		||||
					ii ? spa_debug_type_short_name(ii->name) : "unknown",
 | 
			
		||||
			name = ii ? spa_debug_type_short_name(ii->name) : NULL;
 | 
			
		||||
			if (name == NULL) {
 | 
			
		||||
				snprintf(fallback, sizeof(fallback), "id-%08x", p->key);
 | 
			
		||||
				name = fallback;
 | 
			
		||||
			}
 | 
			
		||||
			put_pod_value(d, name,
 | 
			
		||||
					ii ? ii->values : NULL,
 | 
			
		||||
					p->value.type,
 | 
			
		||||
					SPA_POD_CONTENTS(struct spa_pod_prop, p),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue