mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	examples: use dataType mask for consumers
Set the dataType mask to MemFd and MemPtr since we implemented the MemPtr API and get MemFd mapped by pipewire.
This commit is contained in:
		
							parent
							
								
									4f63db4936
								
							
						
					
					
						commit
						7ad1ee0cec
					
				
					 2 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
					@ -243,7 +243,8 @@ on_stream_param_changed(void *_data, uint32_t id, const struct spa_pod *param)
 | 
				
			||||||
		SPA_PARAM_BUFFERS_blocks,  SPA_POD_Int(1),
 | 
							SPA_PARAM_BUFFERS_blocks,  SPA_POD_Int(1),
 | 
				
			||||||
		SPA_PARAM_BUFFERS_size,    SPA_POD_Int(data->stride * data->size.height),
 | 
							SPA_PARAM_BUFFERS_size,    SPA_POD_Int(data->stride * data->size.height),
 | 
				
			||||||
		SPA_PARAM_BUFFERS_stride,  SPA_POD_Int(data->stride),
 | 
							SPA_PARAM_BUFFERS_stride,  SPA_POD_Int(data->stride),
 | 
				
			||||||
		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_MemFd) | (1<<SPA_DATA_MemPtr)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* we are done */
 | 
						/* we are done */
 | 
				
			||||||
	pw_stream_update_params(stream, params, 1);
 | 
						pw_stream_update_params(stream, params, 1);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -363,7 +363,8 @@ on_stream_param_changed(void *_data, uint32_t id, const struct spa_pod *param)
 | 
				
			||||||
		SPA_PARAM_BUFFERS_blocks,  SPA_POD_Int(1),
 | 
							SPA_PARAM_BUFFERS_blocks,  SPA_POD_Int(1),
 | 
				
			||||||
		SPA_PARAM_BUFFERS_size,    SPA_POD_Int(size * mult),
 | 
							SPA_PARAM_BUFFERS_size,    SPA_POD_Int(size * mult),
 | 
				
			||||||
		SPA_PARAM_BUFFERS_stride,  SPA_POD_Int(data->stride * mult),
 | 
							SPA_PARAM_BUFFERS_stride,  SPA_POD_Int(data->stride * mult),
 | 
				
			||||||
		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_MemFd) | (1<<SPA_DATA_MemPtr)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* a header metadata with timing information */
 | 
						/* a header metadata with timing information */
 | 
				
			||||||
	params[1] = spa_pod_builder_add_object(&b,
 | 
						params[1] = spa_pod_builder_add_object(&b,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue