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,20 +142,24 @@ 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 &&
this->convert_params_flags[idx] & SPA_PARAM_INFO_READ) {
if ((res = node_enum_params_sync(this, this->target, if ((res = node_enum_params_sync(this, this->target,
id, &result->next, filter, &result->param, builder)) == 1) id, &result->next, filter, &result->param, builder)) == 1)
return res; 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) {
if (this->follower_params_flags[idx] & SPA_PARAM_INFO_READ) {
result->next &= 0xfffff; result->next &= 0xfffff;
if ((res = node_enum_params_sync(this, this->follower, if ((res = node_enum_params_sync(this, this->follower,
id, &result->next, filter, &result->param, builder)) == 1) { id, &result->next, filter, &result->param, builder)) == 1) {
result->next |= 0x100000; result->next |= 0x100000;
return res; return res;
} }
}
result->next = 0x200000; result->next = 0x200000;
} }
return 0; return 0;

View file

@ -142,20 +142,24 @@ 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 &&
this->convert_params_flags[idx] & SPA_PARAM_INFO_READ) {
if ((res = node_enum_params_sync(this, this->target, if ((res = node_enum_params_sync(this, this->target,
id, &result->next, filter, &result->param, builder)) == 1) id, &result->next, filter, &result->param, builder)) == 1)
return res; 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) {
if (this->follower_params_flags[idx] & SPA_PARAM_INFO_READ) {
result->next &= 0xfffff; result->next &= 0xfffff;
if ((res = node_enum_params_sync(this, this->follower, if ((res = node_enum_params_sync(this, this->follower,
id, &result->next, filter, &result->param, builder)) == 1) { id, &result->next, filter, &result->param, builder)) == 1) {
result->next |= 0x100000; result->next |= 0x100000;
return res; return res;
} }
}
result->next = 0x200000; result->next = 0x200000;
} }
return 0; return 0;
@ -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);