Make done event on node

Replace the AsyncDone event with an explicit done callback in the node
to signal completion of an async operation.
Pass read and write fd together with the transport
This commit is contained in:
Wim Taymans 2017-06-09 17:24:18 +02:00
parent 0af8377d10
commit 34450ed7ed
24 changed files with 268 additions and 254 deletions

View file

@ -176,6 +176,11 @@ static void handle_events(struct data *data)
}
}
static void on_source_done(struct spa_node *node, int seq, int res, void *user_data)
{
printf("got done %d %d\n", seq, res);
}
static void on_source_event(struct spa_node *node, struct spa_event *event, void *user_data)
{
struct data *data = user_data;
@ -256,6 +261,7 @@ static void on_source_have_output(struct spa_node *node, void *user_data)
}
static const struct spa_node_callbacks source_callbacks = {
&on_source_done,
&on_source_event,
NULL,
&on_source_have_output,