mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
merger: fix enum_param
This commit is contained in:
parent
b27206c24a
commit
5e8d9fb196
2 changed files with 22 additions and 2 deletions
|
|
@ -135,11 +135,18 @@ static int init_port(struct impl *this, uint32_t port_id, uint32_t rate, uint32_
|
||||||
static int impl_node_enum_params(struct spa_node *node,
|
static int impl_node_enum_params(struct spa_node *node,
|
||||||
uint32_t id, uint32_t *index,
|
uint32_t id, uint32_t *index,
|
||||||
const struct spa_pod *filter,
|
const struct spa_pod *filter,
|
||||||
struct spa_pod **param,
|
struct spa_pod **result,
|
||||||
struct spa_pod_builder *builder)
|
struct spa_pod_builder *builder)
|
||||||
{
|
{
|
||||||
|
struct spa_pod *param;
|
||||||
|
struct spa_pod_builder b = { 0 };
|
||||||
|
uint8_t buffer[1024];
|
||||||
|
|
||||||
spa_return_val_if_fail(node != NULL, -EINVAL);
|
spa_return_val_if_fail(node != NULL, -EINVAL);
|
||||||
|
|
||||||
|
next:
|
||||||
|
spa_pod_builder_init(&b, buffer, sizeof(buffer));
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case SPA_PARAM_List:
|
case SPA_PARAM_List:
|
||||||
{
|
{
|
||||||
|
|
@ -159,6 +166,9 @@ static int impl_node_enum_params(struct spa_node *node,
|
||||||
}
|
}
|
||||||
(*index)++;
|
(*index)++;
|
||||||
|
|
||||||
|
if (spa_pod_filter(builder, result, param, filter) < 0)
|
||||||
|
goto next;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -139,11 +139,18 @@ static int init_port(struct impl *this, uint32_t port_id, uint32_t rate, uint32_
|
||||||
static int impl_node_enum_params(struct spa_node *node,
|
static int impl_node_enum_params(struct spa_node *node,
|
||||||
uint32_t id, uint32_t *index,
|
uint32_t id, uint32_t *index,
|
||||||
const struct spa_pod *filter,
|
const struct spa_pod *filter,
|
||||||
struct spa_pod **param,
|
struct spa_pod **result,
|
||||||
struct spa_pod_builder *builder)
|
struct spa_pod_builder *builder)
|
||||||
{
|
{
|
||||||
|
struct spa_pod *param;
|
||||||
|
struct spa_pod_builder b = { 0 };
|
||||||
|
uint8_t buffer[1024];
|
||||||
|
|
||||||
spa_return_val_if_fail(node != NULL, -EINVAL);
|
spa_return_val_if_fail(node != NULL, -EINVAL);
|
||||||
|
|
||||||
|
next:
|
||||||
|
spa_pod_builder_init(&b, buffer, sizeof(buffer));
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case SPA_PARAM_List:
|
case SPA_PARAM_List:
|
||||||
{
|
{
|
||||||
|
|
@ -163,6 +170,9 @@ static int impl_node_enum_params(struct spa_node *node,
|
||||||
}
|
}
|
||||||
(*index)++;
|
(*index)++;
|
||||||
|
|
||||||
|
if (spa_pod_filter(builder, result, param, filter) < 0)
|
||||||
|
goto next;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue