spa: revert peer_enum_params node event again

It's not used anymore because it does work so well.

The problem is that while it transparently proxies param enums on
ports to peers, it fails to emit events when those peer
params change in a way that would make the enum result change as well.
This makes it quite hard to use this correctly.
This commit is contained in:
Wim Taymans 2024-06-20 10:22:45 +02:00
parent 7b8b6d92d9
commit ea7e0e9152
7 changed files with 4 additions and 121 deletions

View file

@ -368,17 +368,6 @@ static int port_enum_formats(void *object, struct port *port,
return 1;
}
static void peer_result(void *data, int seq, int res, uint32_t type, const void *result)
{
struct impl *this = data;
spa_node_emit_result(&this->hooks, seq, res, type, result);
}
static const struct spa_node_events peer_node_events = {
SPA_VERSION_NODE_EVENTS,
.result = peer_result,
};
static int
impl_node_port_enum_params(void *object, int seq,
enum spa_direction direction, uint32_t port_id,
@ -468,12 +457,6 @@ impl_node_port_enum_params(void *object, int seq,
return 0;
}
break;
case SPA_PARAM_Latency:
case SPA_PARAM_Tag:
res = -ENOTSUP;
spa_node_emit_peer_enum_params(&this->hooks, seq, direction, port_id,
id, start, num, filter, &peer_node_events, this, &res);
return res;
default:
return -ENOENT;
}

View file

@ -343,17 +343,6 @@ static int port_enum_formats(void *object, struct port *port,
return 1;
}
static void peer_result(void *data, int seq, int res, uint32_t type, const void *result)
{
struct impl *this = data;
spa_node_emit_result(&this->hooks, seq, res, type, result);
}
static const struct spa_node_events peer_node_events = {
SPA_VERSION_NODE_EVENTS,
.result = peer_result,
};
static int
impl_node_port_enum_params(void *object, int seq,
enum spa_direction direction, uint32_t port_id,
@ -445,12 +434,6 @@ next:
return 0;
}
break;
case SPA_PARAM_Latency:
case SPA_PARAM_Tag:
res = -ENOTSUP;
spa_node_emit_peer_enum_params(&this->hooks, seq, direction, port_id,
id, start, num, filter, &peer_node_events, this, &res);
return res;
default:
return -ENOENT;
}