mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	videoconvert: Use converter direction from properties
This commit is contained in:
		
							parent
							
								
									df52086c47
								
							
						
					
					
						commit
						4dd98b4ff8
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -594,15 +594,9 @@ static int reconfigure_mode(struct impl *this, enum spa_param_port_config_mode m
 | 
			
		|||
		i = dir->n_ports++;
 | 
			
		||||
		init_port(this, direction, i, false, false, true);
 | 
			
		||||
	}
 | 
			
		||||
	/* when output is convert mode, we are in OUTPUT (merge) mode, we always output all
 | 
			
		||||
	 * the incoming data to output. When output is DSP, we need to output quantum size
 | 
			
		||||
	 * chunks. */
 | 
			
		||||
	this->direction = this->dir[SPA_DIRECTION_OUTPUT].mode == SPA_PARAM_PORT_CONFIG_MODE_convert ?
 | 
			
		||||
		SPA_DIRECTION_OUTPUT : SPA_DIRECTION_INPUT;
 | 
			
		||||
 | 
			
		||||
	this->info.change_mask |= SPA_NODE_CHANGE_MASK_FLAGS | SPA_NODE_CHANGE_MASK_PARAMS;
 | 
			
		||||
	this->info.flags &= ~SPA_NODE_FLAG_NEED_CONFIGURE;
 | 
			
		||||
	this->params[IDX_Props].user++;
 | 
			
		||||
	this->params[IDX_PortConfig].user++;
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -2115,6 +2109,12 @@ impl_init(const struct spa_handle_factory *factory,
 | 
			
		|||
			spa_scnprintf(this->group_name, sizeof(this->group_name), "%s", s);
 | 
			
		||||
		else if (spa_streq(k, "monitor.passthrough"))
 | 
			
		||||
			this->monitor_passthrough = spa_atob(s);
 | 
			
		||||
		else if (spa_streq(k, "convert.direction")) {
 | 
			
		||||
			if (spa_streq(s, "output"))
 | 
			
		||||
				this->direction = SPA_DIRECTION_OUTPUT;
 | 
			
		||||
			else
 | 
			
		||||
				this->direction = SPA_DIRECTION_INPUT;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
			videoconvert_set_param(this, k, s);
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue