mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	v4l2: Add mmap fallback when USERPTR is not supported
When we don't support EXPBUF according to the probe, the host will allocate memory for us. We will then try to use USERPTR to import the memory into v4l2. If this is not supported, try to fall back to MMAP support, mmap the buffers and memcpy the MMAP buffer to the host allocated buffers.
This commit is contained in:
		
							parent
							
								
									7a0aea835a
								
							
						
					
					
						commit
						b409f5f5d1
					
				
					 2 changed files with 44 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -58,6 +58,7 @@ struct buffer {
 | 
			
		|||
	struct spa_meta_videotransform *vt;
 | 
			
		||||
	struct v4l2_buffer v4l2_buffer;
 | 
			
		||||
	void *ptr;
 | 
			
		||||
	void *mmap_ptr;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define MAX_CONTROLS	64
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue