client-node: pass the ready status in the activation state

Pass the ready status to the client-node using the state array.

Don't just SPA_STATUS_HAVE_DATA on the server side but use the value
from the client.

This avoids some potential extra work when a driver sink pulls in data
with the NEED_DATA ready callback but then the server performs the
actions (tee) as if it were SPA_STATUS_HAVE_DATA.
This commit is contained in:
Wim Taymans 2023-04-26 15:56:29 +02:00
parent 989f597860
commit 5303fced50
2 changed files with 7 additions and 3 deletions

View file

@ -1189,8 +1189,9 @@ static int node_ready(void *d, int status)
spa_node_process(p->mix);
}
spa_system_clock_gettime(data_system, CLOCK_MONOTONIC, &ts);
a->state[0].status = status;
a->status = PW_NODE_ACTIVATION_TRIGGERED;
spa_system_clock_gettime(data_system, CLOCK_MONOTONIC, &ts);
a->signal_time = SPA_TIMESPEC_TO_NSEC(&ts);
if (SPA_UNLIKELY(spa_system_eventfd_write(data_system, data->rtwritefd, 1) < 0))