mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa: set port flags on port info
This commit is contained in:
		
							parent
							
								
									16f1d6349d
								
							
						
					
					
						commit
						9071678643
					
				
					 5 changed files with 22 additions and 14 deletions
				
			
		| 
						 | 
				
			
			@ -225,6 +225,7 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
 | 
			
		|||
	case SPA_PARAM_Props:
 | 
			
		||||
	{
 | 
			
		||||
		struct props *p = &this->props;
 | 
			
		||||
		struct port *port = &this->port;
 | 
			
		||||
 | 
			
		||||
		if (param == NULL) {
 | 
			
		||||
			reset_props(p);
 | 
			
		||||
| 
						 | 
				
			
			@ -235,9 +236,9 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
 | 
			
		|||
			SPA_PROP_live,        SPA_POD_OPT_Bool(&p->live));
 | 
			
		||||
 | 
			
		||||
		if (p->live)
 | 
			
		||||
			this->info.flags |= SPA_PORT_FLAG_LIVE;
 | 
			
		||||
			port->info.flags |= SPA_PORT_FLAG_LIVE;
 | 
			
		||||
		else
 | 
			
		||||
			this->info.flags &= ~SPA_PORT_FLAG_LIVE;
 | 
			
		||||
			port->info.flags &= ~SPA_PORT_FLAG_LIVE;
 | 
			
		||||
		break;
 | 
			
		||||
	}
 | 
			
		||||
	default:
 | 
			
		||||
| 
						 | 
				
			
			@ -945,7 +946,7 @@ impl_init(const struct spa_handle_factory *factory,
 | 
			
		|||
	port->info = SPA_PORT_INFO_INIT();
 | 
			
		||||
	port->info.flags = SPA_PORT_FLAG_NO_REF | SPA_PORT_FLAG_CAN_ALLOC_BUFFERS;
 | 
			
		||||
	if (this->props.live)
 | 
			
		||||
		this->info.flags |= SPA_PORT_FLAG_LIVE;
 | 
			
		||||
		port->info.flags |= SPA_PORT_FLAG_LIVE;
 | 
			
		||||
	port->params[0] = SPA_PARAM_INFO(SPA_PARAM_EnumFormat, SPA_PARAM_INFO_READ);
 | 
			
		||||
	port->params[1] = SPA_PARAM_INFO(SPA_PARAM_Meta, SPA_PARAM_INFO_READ);
 | 
			
		||||
	port->params[2] = SPA_PARAM_INFO(SPA_PARAM_IO, SPA_PARAM_INFO_READ);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue