graph: new scheduling model

Make explicit links between elements that are used to activate the
next element in the graph.
Make subgraphs a special regular node. Make a link from the
subgraph children to the parent so that the subgraph completes when
all the children completed.
Implement a single process function in plugins
Remove many messages in the client node
This commit is contained in:
Wim Taymans 2018-03-20 11:37:11 +01:00
parent 9b0a880afb
commit 33a322b96e
36 changed files with 401 additions and 750 deletions

View file

@ -312,7 +312,7 @@ static inline void try_pull(struct impl *this, uint32_t frames, bool do_pull)
this->range->min_size = this->threshold * this->frame_size;
this->range->max_size = frames * this->frame_size;
}
this->callbacks->need_input(this->callbacks_data);
this->callbacks->process(this->callbacks_data, SPA_STATUS_NEED_BUFFER);
}
}
@ -1257,7 +1257,7 @@ impl_node_port_send_command(struct spa_node *node,
return -ENOTSUP;
}
static int impl_node_process_input(struct spa_node *node)
static int impl_node_process(struct spa_node *node)
{
struct impl *this;
struct spa_io_buffers *input;
@ -1287,11 +1287,6 @@ static int impl_node_process_input(struct spa_node *node)
return SPA_STATUS_OK;
}
static int impl_node_process_output(struct spa_node *node)
{
return -ENOTSUP;
}
static const struct spa_dict_item node_info_items[] = {
{ "media.class", "Audio/Sink" },
};
@ -1320,8 +1315,7 @@ static const struct spa_node impl_node = {
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process_input,
impl_node_process_output,
impl_node_process,
};
static int impl_get_interface(struct spa_handle *handle, uint32_t interface_id, void **interface)