mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	props: use macro for property alternatives
This commit is contained in:
		
							parent
							
								
									f039238288
								
							
						
					
					
						commit
						0e5a1b6327
					
				
					 15 changed files with 123 additions and 107 deletions
				
			
		| 
						 | 
				
			
			@ -233,7 +233,7 @@ static int impl_node_enum_params(struct spa_node *node,
 | 
			
		|||
				":", t->param.propId,   "I", t->prop_min_latency,
 | 
			
		||||
				":", t->param.propName, "s", "The minimum latency",
 | 
			
		||||
				":", t->param.propType, "ir", p->min_latency,
 | 
			
		||||
							2, 1, INT32_MAX);
 | 
			
		||||
					SPA_POD_PROP_MIN_MAX(1, INT32_MAX));
 | 
			
		||||
			break;
 | 
			
		||||
		case 1:
 | 
			
		||||
			param = spa_pod_builder_object(&b,
 | 
			
		||||
| 
						 | 
				
			
			@ -241,7 +241,7 @@ static int impl_node_enum_params(struct spa_node *node,
 | 
			
		|||
				":", t->param.propId,   "I", t->prop_max_latency,
 | 
			
		||||
				":", t->param.propName, "s", "The maximum latency",
 | 
			
		||||
				":", t->param.propType, "ir", p->max_latency,
 | 
			
		||||
							2, 1, INT32_MAX);
 | 
			
		||||
					SPA_POD_PROP_MIN_MAX(1, INT32_MAX));
 | 
			
		||||
			break;
 | 
			
		||||
		default:
 | 
			
		||||
			return 0;
 | 
			
		||||
| 
						 | 
				
			
			@ -1042,12 +1042,13 @@ impl_node_port_enum_params(struct spa_node *node,
 | 
			
		|||
 | 
			
		||||
		param = spa_pod_builder_object(&b,
 | 
			
		||||
			id, t->param_buffers.Buffers,
 | 
			
		||||
			":", t->param_buffers.size,    "iru", this->props.min_latency * this->frame_size,
 | 
			
		||||
							2, this->props.min_latency * this->frame_size,
 | 
			
		||||
							   INT32_MAX,
 | 
			
		||||
			":", t->param_buffers.size,    "iru", this->props.min_latency *
 | 
			
		||||
							      this->frame_size,
 | 
			
		||||
				SPA_POD_PROP_MIN_MAX(this->props.min_latency * this->frame_size,
 | 
			
		||||
						     INT32_MAX),
 | 
			
		||||
			":", t->param_buffers.stride,  "i", 0,
 | 
			
		||||
			":", t->param_buffers.buffers, "ir", 2,
 | 
			
		||||
								2, 2, MAX_BUFFERS,
 | 
			
		||||
				SPA_POD_PROP_MIN_MAX(2, MAX_BUFFERS),
 | 
			
		||||
			":", t->param_buffers.align,   "i", 16);
 | 
			
		||||
	}
 | 
			
		||||
	else if (id == t->param.idMeta) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue