small cleanups

This commit is contained in:
Wim Taymans 2018-03-21 09:15:41 +01:00
parent 33a322b96e
commit 99d94044d1
4 changed files with 3 additions and 19 deletions

View file

@ -110,7 +110,7 @@ struct spa_graph_node {
struct spa_list link; /**< link in graph nodes list */
struct spa_graph *graph; /**< owner graph */
struct spa_list ports[2]; /**< list of input and output ports */
struct spa_list links; /**< list of links */
struct spa_list links; /**< list of links to next nodes */
uint32_t flags; /**< node flags */
struct spa_graph_state *state; /**< state of the node */
struct spa_graph_link graph_link; /**< link in graph */

View file

@ -95,8 +95,6 @@ struct data {
struct spa_pod_double *ctrl_volume;
uint8_t buffer[1024];
struct spa_audio_info_raw format;
struct buffer buffers[32];

View file

@ -135,6 +135,8 @@ on_stream_new_buffer(void *_data, uint32_t id)
buf = pw_stream_peek_buffer(stream, id);
pw_log_trace("new buffer %d", id);
pw_loop_invoke(pw_main_loop_get_loop(data->loop), do_render,
SPA_ID_INVALID, &buf, sizeof(struct spa_buffer *),
true, data);

View file

@ -772,20 +772,6 @@ static void client_node_event(void *object, const struct spa_event *event)
pw_log_warn("unhandled node event %d", SPA_EVENT_TYPE(event));
}
static void do_start(struct node_data *data)
{
struct mix *mix;
spa_list_for_each(mix, &data->mix[SPA_DIRECTION_INPUT], link) {
mix->mix.port.io->status = SPA_STATUS_NEED_BUFFER;
mix->mix.port.io->buffer_id = SPA_ID_INVALID;
}
spa_list_for_each(mix, &data->mix[SPA_DIRECTION_OUTPUT], link) {
mix->mix.port.io->status = SPA_STATUS_NEED_BUFFER;
mix->mix.port.io->buffer_id = SPA_ID_INVALID;
}
}
static void client_node_command(void *object, uint32_t seq, const struct spa_command *command)
{
struct pw_proxy *proxy = object;
@ -815,8 +801,6 @@ static void client_node_command(void *object, uint32_t seq, const struct spa_com
if ((res = spa_node_send_command(data->node->node, command)) < 0)
pw_log_warn("node %p: start failed", proxy);
do_start(data);
pw_client_node_proxy_done(data->node_proxy, seq, res);
}
else if (SPA_COMMAND_TYPE(command) == remote->core->type.command_node.ClockUpdate) {