mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -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
|
|
@ -462,7 +462,6 @@ static int port_get_format(struct spa_node *node,
|
|||
struct spa_pod_builder *builder)
|
||||
{
|
||||
struct impl *this = SPA_CONTAINER_OF(node, struct impl, node);
|
||||
struct spa_pod_frame f[1];
|
||||
struct type *t = &this->type;
|
||||
struct port *port = &this->out_ports[port_id];
|
||||
|
||||
|
|
@ -471,8 +470,7 @@ static int port_get_format(struct spa_node *node,
|
|||
if (*index > 0)
|
||||
return SPA_RESULT_ENUM_END;
|
||||
|
||||
spa_pod_builder_push_object(builder, &f[0],
|
||||
t->param.idFormat, t->format);
|
||||
spa_pod_builder_push_object(builder, t->param.idFormat, t->format);
|
||||
|
||||
spa_pod_builder_add(builder,
|
||||
"I", port->current_format.media_type,
|
||||
|
|
@ -495,7 +493,7 @@ static int port_get_format(struct spa_node *node,
|
|||
} else
|
||||
return SPA_RESULT_NO_FORMAT;
|
||||
|
||||
spa_pod_builder_pop(builder, &f[0]);
|
||||
spa_pod_builder_pop(builder);
|
||||
|
||||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue