mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	gst: enable DMABUF explicitly to avoid mmap issues
PipeWire does not give DMABUF anymore to clients unless they explicitly ask for it. This results in v4l2 sending an fd and the mmapoffset + size fields in the buffer. GStreamer does not handle the mmapoffset in the fd allocator and thus runs into mmap problems when using the memory. Enable DMABuf explicitly to work around the problem until GStreamer is fixed. Fixes #1115
This commit is contained in:
		
							parent
							
								
									44f49a3ea0
								
							
						
					
					
						commit
						ec331f4e4c
					
				
					 2 changed files with 9 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -255,6 +255,10 @@ pool_activated (GstPipeWirePool *pool, GstPipeWireSink *sink)
 | 
			
		|||
	      SPA_MAX(MIN_BUFFERS, min_buffers),
 | 
			
		||||
	      max_buffers ? max_buffers : INT32_MAX),
 | 
			
		||||
      SPA_PARAM_BUFFERS_align,   SPA_POD_Int(16),
 | 
			
		||||
      SPA_PARAM_BUFFERS_dataType, SPA_POD_CHOICE_FLAGS_Int(
 | 
			
		||||
						(1<<SPA_DATA_DmaBuf) |
 | 
			
		||||
						(1<<SPA_DATA_MemFd) |
 | 
			
		||||
						(1<<SPA_DATA_MemPtr)),
 | 
			
		||||
      0);
 | 
			
		||||
  port_params[0] = spa_pod_builder_pop (&b, &f);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -787,7 +787,11 @@ on_param_changed (void *data, uint32_t id,
 | 
			
		|||
        SPA_PARAM_BUFFERS_blocks,  SPA_POD_CHOICE_RANGE_Int(0, 1, INT32_MAX),
 | 
			
		||||
        SPA_PARAM_BUFFERS_size,    SPA_POD_CHOICE_RANGE_Int(0, 0, INT32_MAX),
 | 
			
		||||
        SPA_PARAM_BUFFERS_stride,  SPA_POD_CHOICE_RANGE_Int(0, 0, INT32_MAX),
 | 
			
		||||
        SPA_PARAM_BUFFERS_align,   SPA_POD_Int(16));
 | 
			
		||||
        SPA_PARAM_BUFFERS_align,   SPA_POD_Int(16),
 | 
			
		||||
        SPA_PARAM_BUFFERS_dataType, SPA_POD_CHOICE_FLAGS_Int(
 | 
			
		||||
						(1<<SPA_DATA_DmaBuf) |
 | 
			
		||||
						(1<<SPA_DATA_MemFd) |
 | 
			
		||||
						(1<<SPA_DATA_MemPtr)));
 | 
			
		||||
 | 
			
		||||
    params[1] = spa_pod_builder_add_object (&b,
 | 
			
		||||
        SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue