mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	merger/splitter: only dynamic ports are dsp ports
This commit is contained in:
		
							parent
							
								
									b2e84e85c6
								
							
						
					
					
						commit
						4764d69e26
					
				
					 2 changed files with 10 additions and 4 deletions
				
			
		| 
						 | 
					@ -54,6 +54,8 @@ struct port {
 | 
				
			||||||
	struct spa_io_range *ctrl;
 | 
						struct spa_io_range *ctrl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct spa_port_info info;
 | 
						struct spa_port_info info;
 | 
				
			||||||
 | 
						struct spa_dict info_props;
 | 
				
			||||||
 | 
						struct spa_dict_item info_props_items[2];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	bool have_format;
 | 
						bool have_format;
 | 
				
			||||||
	struct spa_audio_info format;
 | 
						struct spa_audio_info format;
 | 
				
			||||||
| 
						 | 
					@ -223,6 +225,9 @@ static int impl_node_add_port(struct spa_node *node, enum spa_direction directio
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	port->info.flags = SPA_PORT_INFO_FLAG_CAN_USE_BUFFERS |
 | 
						port->info.flags = SPA_PORT_INFO_FLAG_CAN_USE_BUFFERS |
 | 
				
			||||||
			   SPA_PORT_INFO_FLAG_REMOVABLE;
 | 
								   SPA_PORT_INFO_FLAG_REMOVABLE;
 | 
				
			||||||
 | 
						port->info_props_items[0] = SPA_DICT_ITEM_INIT("port.dsp", "32 bit float mono audio");
 | 
				
			||||||
 | 
						port->info_props = SPA_DICT_INIT(port->info_props_items, 1);
 | 
				
			||||||
 | 
						port->info.props = &port->info_props;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	this->port_count++;
 | 
						this->port_count++;
 | 
				
			||||||
	if (this->last_port <= port_id)
 | 
						if (this->last_port <= port_id)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -224,6 +224,11 @@ static int impl_node_add_port(struct spa_node *node, enum spa_direction directio
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	port->info.flags = SPA_PORT_INFO_FLAG_CAN_USE_BUFFERS |
 | 
						port->info.flags = SPA_PORT_INFO_FLAG_CAN_USE_BUFFERS |
 | 
				
			||||||
			   SPA_PORT_INFO_FLAG_REMOVABLE;
 | 
								   SPA_PORT_INFO_FLAG_REMOVABLE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						port->info_props_items[0] = SPA_DICT_ITEM_INIT("port.dsp", "32 bit float mono audio");
 | 
				
			||||||
 | 
						port->info_props = SPA_DICT_INIT(port->info_props_items, 1);
 | 
				
			||||||
 | 
						port->info.props = &port->info_props;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	spa_list_init(&port->queue);
 | 
						spa_list_init(&port->queue);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	this->port_count++;
 | 
						this->port_count++;
 | 
				
			||||||
| 
						 | 
					@ -294,10 +299,6 @@ impl_node_port_get_info(struct spa_node *node,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	port = GET_PORT(this, direction, port_id);
 | 
						port = GET_PORT(this, direction, port_id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	port->info_props_items[0] = SPA_DICT_ITEM_INIT("port.dsp", "32 bit float mono audio");
 | 
					 | 
				
			||||||
	port->info_props = SPA_DICT_INIT(port->info_props_items, 1);
 | 
					 | 
				
			||||||
	port->info.props = &port->info_props;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	*info = &port->info;
 | 
						*info = &port->info;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue