mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	audioadapter: update flags
This commit is contained in:
		
							parent
							
								
									fb76f484a9
								
							
						
					
					
						commit
						2362953931
					
				
					 1 changed files with 19 additions and 13 deletions
				
			
		| 
						 | 
					@ -548,20 +548,26 @@ static void convert_node_info(void *data, const struct spa_node_info *info)
 | 
				
			||||||
	struct impl *this = data;
 | 
						struct impl *this = data;
 | 
				
			||||||
	uint32_t i;
 | 
						uint32_t i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (i = 0; i < info->n_params; i++) {
 | 
						if (info->change_mask & SPA_NODE_CHANGE_MASK_FLAGS) {
 | 
				
			||||||
		uint32_t idx = SPA_ID_INVALID;
 | 
							this->info.change_mask |= SPA_NODE_CHANGE_MASK_FLAGS;
 | 
				
			||||||
 | 
							this->info.flags = info->flags;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if (info->change_mask & SPA_NODE_CHANGE_MASK_PARAMS) {
 | 
				
			||||||
 | 
							for (i = 0; i < info->n_params; i++) {
 | 
				
			||||||
 | 
								uint32_t idx = SPA_ID_INVALID;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		switch (info->params[i].id) {
 | 
								switch (info->params[i].id) {
 | 
				
			||||||
		case SPA_PARAM_PropInfo:
 | 
								case SPA_PARAM_PropInfo:
 | 
				
			||||||
			idx = 1;
 | 
									idx = 1;
 | 
				
			||||||
			break;
 | 
									break;
 | 
				
			||||||
		case SPA_PARAM_Props:
 | 
								case SPA_PARAM_Props:
 | 
				
			||||||
			idx = 2;
 | 
									idx = 2;
 | 
				
			||||||
			break;
 | 
									break;
 | 
				
			||||||
		}
 | 
								}
 | 
				
			||||||
		if (idx != SPA_ID_INVALID) {
 | 
								if (idx != SPA_ID_INVALID) {
 | 
				
			||||||
			this->params[idx] = info->params[i];
 | 
									this->params[idx] = info->params[i];
 | 
				
			||||||
			this->info.change_mask |= SPA_NODE_CHANGE_MASK_PARAMS;
 | 
									this->info.change_mask |= SPA_NODE_CHANGE_MASK_PARAMS;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	emit_node_info(this, false);
 | 
						emit_node_info(this, false);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue