stream: first prepare output io, then call the ready callback

It is assumed that the output io area is ready when the ready
callback is called so that the next elements in the graph can be
triggered immediately. When the graph finishes, the node that
triggered the ready (the driver) is scheduled to recycle and complete
the graph.
This commit is contained in:
Wim Taymans 2019-03-07 18:31:37 +01:00
parent b357b7a7da
commit 84bb897886

View file

@ -1337,8 +1337,10 @@ do_process(struct spa_loop *loop,
bool async, uint32_t seq, const void *data, size_t size, void *user_data)
{
struct stream *impl = user_data;
impl->callbacks->ready(impl->callbacks_data, SPA_STATUS_HAVE_BUFFER);
return 0;
int res;
res = impl_node_process_output(&impl->impl_node);
return impl->callbacks->ready(impl->callbacks_data, res);
}
static inline int call_trigger(struct stream *impl)