videoconvert: Enumerate follower params better

Make sure we increment the next counter even when we are in passthrough
mode or the property is not readable.
This commit is contained in:
Wim Taymans 2025-05-05 10:24:16 +02:00
parent faf5ae0c2f
commit 14eb03a821
2 changed files with 31 additions and 22 deletions

View file

@ -142,19 +142,23 @@ static int follower_enum_params(struct impl *this,
struct spa_pod_builder *builder) struct spa_pod_builder *builder)
{ {
int res; int res;
if (result->next < 0x100000 && if (result->next < 0x100000) {
this->follower != this->target) { if (this->follower != this->target &&
if ((res = node_enum_params_sync(this, this->target, this->convert_params_flags[idx] & SPA_PARAM_INFO_READ) {
id, &result->next, filter, &result->param, builder)) == 1) if ((res = node_enum_params_sync(this, this->target,
return res; id, &result->next, filter, &result->param, builder)) == 1)
return res;
}
result->next = 0x100000; result->next = 0x100000;
} }
if (result->next < 0x200000 && this->follower_params_flags[idx] & SPA_PARAM_INFO_READ) { if (result->next < 0x200000) {
result->next &= 0xfffff; if (this->follower_params_flags[idx] & SPA_PARAM_INFO_READ) {
if ((res = node_enum_params_sync(this, this->follower, result->next &= 0xfffff;
id, &result->next, filter, &result->param, builder)) == 1) { if ((res = node_enum_params_sync(this, this->follower,
result->next |= 0x100000; id, &result->next, filter, &result->param, builder)) == 1) {
return res; result->next |= 0x100000;
return res;
}
} }
result->next = 0x200000; result->next = 0x200000;
} }

View file

@ -142,19 +142,23 @@ static int follower_enum_params(struct impl *this,
struct spa_pod_builder *builder) struct spa_pod_builder *builder)
{ {
int res; int res;
if (result->next < 0x100000 && if (result->next < 0x100000) {
this->follower != this->target) { if (this->follower != this->target &&
if ((res = node_enum_params_sync(this, this->target, this->convert_params_flags[idx] & SPA_PARAM_INFO_READ) {
id, &result->next, filter, &result->param, builder)) == 1) if ((res = node_enum_params_sync(this, this->target,
return res; id, &result->next, filter, &result->param, builder)) == 1)
return res;
}
result->next = 0x100000; result->next = 0x100000;
} }
if (result->next < 0x200000 && this->follower_params_flags[idx] & SPA_PARAM_INFO_READ) { if (result->next < 0x200000) {
result->next &= 0xfffff; if (this->follower_params_flags[idx] & SPA_PARAM_INFO_READ) {
if ((res = node_enum_params_sync(this, this->follower, result->next &= 0xfffff;
id, &result->next, filter, &result->param, builder)) == 1) { if ((res = node_enum_params_sync(this, this->follower,
result->next |= 0x100000; id, &result->next, filter, &result->param, builder)) == 1) {
return res; result->next |= 0x100000;
return res;
}
} }
result->next = 0x200000; result->next = 0x200000;
} }
@ -763,6 +767,7 @@ static int reconfigure_mode(struct impl *this, enum spa_param_port_config_mode m
spa_node_add_listener(this->follower, &l, &follower_node_events, this); spa_node_add_listener(this->follower, &l, &follower_node_events, this);
spa_hook_remove(&l); spa_hook_remove(&l);
} else { } else {
/* add converter ports */
configure_convert(this, mode); configure_convert(this, mode);
} }
link_io(this); link_io(this);