mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
audioconvert: forward follower node errors
If the follower of the adapter emits an error event, the adapter needs to forward it to upper levels so that they know the node has errored, and handle the situation.
This commit is contained in:
parent
c248091528
commit
fc4f831afa
1 changed files with 18 additions and 0 deletions
|
|
@ -1098,11 +1098,29 @@ static void follower_result(void *data, int seq, int res, uint32_t type, const v
|
|||
spa_node_emit_result(&this->hooks, seq, res, type, result);
|
||||
}
|
||||
|
||||
static void follower_event(void *data, const struct spa_event *event)
|
||||
{
|
||||
struct impl *this = data;
|
||||
|
||||
spa_log_trace(this->log, "%p: event %d", this, SPA_EVENT_TYPE(event));
|
||||
|
||||
switch (SPA_NODE_EVENT_ID(event)) {
|
||||
case SPA_NODE_EVENT_Error:
|
||||
/* Forward errors */
|
||||
spa_node_emit_event(&this->hooks, event);
|
||||
break;
|
||||
default:
|
||||
/* Ignore other events */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static const struct spa_node_events follower_node_events = {
|
||||
SPA_VERSION_NODE_EVENTS,
|
||||
.info = follower_info,
|
||||
.port_info = follower_port_info,
|
||||
.result = follower_result,
|
||||
.event = follower_event,
|
||||
};
|
||||
|
||||
static int follower_ready(void *data, int status)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue