mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	sco-source: add RateMatch IO
This commit is contained in:
		
							parent
							
								
									a459c1f226
								
							
						
					
					
						commit
						f743fff694
					
				
					 1 changed files with 25 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -74,6 +74,7 @@ struct port {
 | 
			
		|||
	uint64_t info_all;
 | 
			
		||||
	struct spa_port_info info;
 | 
			
		||||
	struct spa_io_buffers *io;
 | 
			
		||||
	struct spa_io_rate_match *rate_match;
 | 
			
		||||
	struct spa_param_info params[8];
 | 
			
		||||
 | 
			
		||||
	struct buffer buffers[MAX_BUFFERS];
 | 
			
		||||
| 
						 | 
				
			
			@ -706,6 +707,25 @@ impl_node_port_enum_params(void *object, int seq,
 | 
			
		|||
		}
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
	case SPA_PARAM_IO:
 | 
			
		||||
		switch (result.index) {
 | 
			
		||||
		case 0:
 | 
			
		||||
			param = spa_pod_builder_add_object(&b,
 | 
			
		||||
				SPA_TYPE_OBJECT_ParamIO, id,
 | 
			
		||||
				SPA_PARAM_IO_id,   SPA_POD_Id(SPA_IO_Buffers),
 | 
			
		||||
				SPA_PARAM_IO_size, SPA_POD_Int(sizeof(struct spa_io_buffers)));
 | 
			
		||||
			break;
 | 
			
		||||
		case 1:
 | 
			
		||||
			param = spa_pod_builder_add_object(&b,
 | 
			
		||||
				SPA_TYPE_OBJECT_ParamIO, id,
 | 
			
		||||
				SPA_PARAM_IO_id,   SPA_POD_Id(SPA_IO_RateMatch),
 | 
			
		||||
				SPA_PARAM_IO_size, SPA_POD_Int(sizeof(struct spa_io_rate_match)));
 | 
			
		||||
			break;
 | 
			
		||||
		default:
 | 
			
		||||
			return 0;
 | 
			
		||||
		}
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
	default:
 | 
			
		||||
		return -ENOENT;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -865,6 +885,9 @@ impl_node_port_set_io(void *object,
 | 
			
		|||
	case SPA_IO_Buffers:
 | 
			
		||||
		port->io = data;
 | 
			
		||||
		break;
 | 
			
		||||
	case SPA_IO_RateMatch:
 | 
			
		||||
		port->rate_match = data;
 | 
			
		||||
		break;
 | 
			
		||||
	default:
 | 
			
		||||
		return -ENOENT;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -1040,8 +1063,9 @@ impl_init(const struct spa_handle_factory *factory,
 | 
			
		|||
	this->info.flags = SPA_NODE_FLAG_RT;
 | 
			
		||||
	this->params[0] = SPA_PARAM_INFO(SPA_PARAM_PropInfo, SPA_PARAM_INFO_READ);
 | 
			
		||||
	this->params[1] = SPA_PARAM_INFO(SPA_PARAM_Props, SPA_PARAM_INFO_READWRITE);
 | 
			
		||||
	this->params[2] = SPA_PARAM_INFO(SPA_PARAM_IO, SPA_PARAM_INFO_READ);
 | 
			
		||||
	this->info.params = this->params;
 | 
			
		||||
	this->info.n_params = 2;
 | 
			
		||||
	this->info.n_params = 3;
 | 
			
		||||
 | 
			
		||||
	/* set the port info */
 | 
			
		||||
	port = &this->port;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue