mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	mem: MAPPABLE -> UNMAPPABLE
Change the flag from MAPPABLE to UNMAPPABLE to ease compatibility. Older servers with newer client will not set the flag and so memory is mappable for the client. Newer server will set the flag but the client will ignore it and act like before.
This commit is contained in:
		
							parent
							
								
									8115bf3eeb
								
							
						
					
					
						commit
						39ca1bb9ed
					
				
					 9 changed files with 7 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -859,8 +859,8 @@ do_port_use_buffers(struct impl *impl,
 | 
			
		|||
			{
 | 
			
		||||
				uint32_t flags = PW_MEMBLOCK_FLAG_DONT_CLOSE;
 | 
			
		||||
 | 
			
		||||
				if (d->flags & SPA_DATA_FLAG_MAPPABLE)
 | 
			
		||||
					flags |= PW_MEMBLOCK_FLAG_MAPPABLE;
 | 
			
		||||
				if (!(d->flags & SPA_DATA_FLAG_MAPPABLE))
 | 
			
		||||
					flags |= PW_MEMBLOCK_FLAG_UNMAPPABLE;
 | 
			
		||||
				if (d->flags & SPA_DATA_FLAG_READABLE)
 | 
			
		||||
					flags |= PW_MEMBLOCK_FLAG_READABLE;
 | 
			
		||||
				if (d->flags & SPA_DATA_FLAG_WRITABLE)
 | 
			
		||||
| 
						 | 
				
			
			@ -1357,7 +1357,6 @@ static int add_area(struct impl *impl)
 | 
			
		|||
	area = pw_mempool_alloc(impl->context_pool,
 | 
			
		||||
			PW_MEMBLOCK_FLAG_READWRITE |
 | 
			
		||||
			PW_MEMBLOCK_FLAG_SEAL |
 | 
			
		||||
			PW_MEMBLOCK_FLAG_MAPPABLE |
 | 
			
		||||
			PW_MEMBLOCK_FLAG_MAP,
 | 
			
		||||
			SPA_DATA_MemFd, size);
 | 
			
		||||
	if (area == NULL)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -192,7 +192,6 @@ pw_client_node0_transport_new(struct pw_context *context,
 | 
			
		|||
	impl->mem = pw_mempool_alloc(pw_context_get_mempool(context),
 | 
			
		||||
			PW_MEMBLOCK_FLAG_READWRITE |
 | 
			
		||||
			PW_MEMBLOCK_FLAG_SEAL |
 | 
			
		||||
			PW_MEMBLOCK_FLAG_MAPPABLE |
 | 
			
		||||
			PW_MEMBLOCK_FLAG_MAP,
 | 
			
		||||
			SPA_DATA_MemFd, area_get_size(&area));
 | 
			
		||||
	if (impl->mem == NULL) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue