mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05:00
Add new pod parser and builder
Add a new pod builder and parser that is less verbose and a little more powerful.
This commit is contained in:
parent
3e49aec61b
commit
24d80e5c00
54 changed files with 3616 additions and 2817 deletions
|
|
@ -387,13 +387,12 @@ static int negotiate_formats(struct data *data)
|
|||
int res;
|
||||
struct spa_format *format;
|
||||
struct spa_pod_builder b = { 0 };
|
||||
struct spa_pod_frame f[2];
|
||||
uint8_t buffer[256];
|
||||
|
||||
spa_pod_builder_init(&b, buffer, sizeof(buffer));
|
||||
spa_pod_builder_format(&b, &f[0], data->type.format,
|
||||
data->type.media_type.binary, data->type.media_subtype.raw, 0);
|
||||
format = SPA_POD_BUILDER_DEREF(&b, f[0].ref, struct spa_format);
|
||||
format = spa_pod_builder_format(&b,
|
||||
data->type.format,
|
||||
data->type.media_type.binary, data->type.media_subtype.raw);
|
||||
|
||||
if ((res = spa_node_port_set_format(data->sink, SPA_DIRECTION_INPUT, 0, 0, format)) < 0)
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue