mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	filter: create mappable_dataTypes bitmask
This commit is contained in:
		
							parent
							
								
									51a7690cd1
								
							
						
					
					
						commit
						016287f8f2
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -53,6 +53,8 @@
 | 
				
			||||||
static float empty[MAX_SAMPLES];
 | 
					static float empty[MAX_SAMPLES];
 | 
				
			||||||
static bool mlock_warned = false;
 | 
					static bool mlock_warned = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static uint32_t mappable_dataTypes = (1<<SPA_DATA_MemFd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct buffer {
 | 
					struct buffer {
 | 
				
			||||||
	struct pw_buffer this;
 | 
						struct pw_buffer this;
 | 
				
			||||||
	uint32_t id;
 | 
						uint32_t id;
 | 
				
			||||||
| 
						 | 
					@ -679,7 +681,7 @@ static int impl_port_use_buffers(void *object,
 | 
				
			||||||
		if (SPA_FLAG_IS_SET(impl_flags, PW_FILTER_PORT_FLAG_MAP_BUFFERS)) {
 | 
							if (SPA_FLAG_IS_SET(impl_flags, PW_FILTER_PORT_FLAG_MAP_BUFFERS)) {
 | 
				
			||||||
			for (j = 0; j < buffers[i]->n_datas; j++) {
 | 
								for (j = 0; j < buffers[i]->n_datas; j++) {
 | 
				
			||||||
				struct spa_data *d = &buffers[i]->datas[j];
 | 
									struct spa_data *d = &buffers[i]->datas[j];
 | 
				
			||||||
				if (d->type == SPA_DATA_MemFd) {
 | 
									if ((mappable_dataTypes & (1<<d->type)) > 0) {
 | 
				
			||||||
					if ((res = map_data(impl, d, prot)) < 0)
 | 
										if ((res = map_data(impl, d, prot)) < 0)
 | 
				
			||||||
						return res;
 | 
											return res;
 | 
				
			||||||
					SPA_FLAG_SET(b->flags, BUFFER_FLAG_MAPPED);
 | 
										SPA_FLAG_SET(b->flags, BUFFER_FLAG_MAPPED);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue