mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	clean up pod_builder
Remove the frame argument from the builder, we can use the builder allocated frames. Add deref function to builder to make it more flexible later. Add some more recursion depth checks in the parser. Improve props filter, also filter other types.
This commit is contained in:
		
							parent
							
								
									30a4651c51
								
							
						
					
					
						commit
						cc47fb7e3a
					
				
					 31 changed files with 246 additions and 218 deletions
				
			
		| 
						 | 
				
			
			@ -1327,7 +1327,7 @@ static bool on_global(void *data, struct pw_global *global)
 | 
			
		|||
 | 
			
		||||
	if (spa_node_enum_params(node->node, SPA_ID_INVALID, &index, NULL, &b) == SPA_RESULT_OK) {
 | 
			
		||||
		int min_latency = -1;
 | 
			
		||||
		struct spa_pod_object *props = SPA_POD_BUILDER_DEREF(&b, 0, struct spa_pod_object);
 | 
			
		||||
		struct spa_pod_object *props = spa_pod_builder_deref(&b, 0);
 | 
			
		||||
 | 
			
		||||
		spa_pod_object_parse(props,
 | 
			
		||||
			":", impl->prop_min_latency, "?i", &min_latency, NULL);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -378,7 +378,7 @@ pw_protocol_native_connection_begin_resource(struct pw_protocol_native_connectio
 | 
			
		|||
 | 
			
		||||
	impl->dest_id = resource->id;
 | 
			
		||||
	impl->opcode = opcode;
 | 
			
		||||
	impl->builder = (struct spa_pod_builder) { NULL, 0, 0, NULL, write_pod };
 | 
			
		||||
	impl->builder = (struct spa_pod_builder) { NULL, 0, 0, write_pod };
 | 
			
		||||
 | 
			
		||||
	return &impl->builder;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -407,7 +407,7 @@ pw_protocol_native_connection_begin_proxy(struct pw_protocol_native_connection *
 | 
			
		|||
 | 
			
		||||
	impl->dest_id = proxy->id;
 | 
			
		||||
	impl->opcode = opcode;
 | 
			
		||||
	impl->builder = (struct spa_pod_builder) { NULL, 0, 0, NULL, write_pod };
 | 
			
		||||
	impl->builder = (struct spa_pod_builder) { NULL, 0, 0, write_pod };
 | 
			
		||||
 | 
			
		||||
	return &impl->builder;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -166,7 +166,7 @@ setup_props(struct pw_core *core, struct spa_node *spa_node, struct pw_propertie
 | 
			
		|||
		pw_log_debug("spa_node_get_props failed: %d", res);
 | 
			
		||||
		return SPA_RESULT_ERROR;
 | 
			
		||||
	}
 | 
			
		||||
	props = SPA_POD_BUILDER_DEREF(&b, 0, struct spa_pod_object);
 | 
			
		||||
	props = spa_pod_builder_deref(&b, 0);
 | 
			
		||||
 | 
			
		||||
	while ((key = pw_properties_iterate(pw_props, &state))) {
 | 
			
		||||
		struct spa_pod_prop *prop;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue