diff --git a/spa/include/spa/graph-scheduler3.h b/spa/include/spa/graph-scheduler3.h index 7a0f4a42c..29dbdaae4 100644 --- a/spa/include/spa/graph-scheduler3.h +++ b/spa/include/spa/graph-scheduler3.h @@ -48,7 +48,8 @@ static inline int spa_graph_impl_need_input(void *data, struct spa_graph_node *n if (pnode->ready_link.next == NULL) spa_list_append(&ready, &pnode->ready_link); } - else if (pport->io->status == SPA_RESULT_OK && !(pnode->flags & SPA_GRAPH_NODE_FLAG_ASYNC)) + else if (pport->io->status == SPA_RESULT_OK && + !(pnode->flags & SPA_GRAPH_NODE_FLAG_ASYNC)) node->ready[SPA_DIRECTION_INPUT]++; } @@ -69,7 +70,8 @@ static inline int spa_graph_impl_need_input(void *data, struct spa_graph_node *n spa_debug("node %p ready:%d required:%d", node, node->ready[SPA_DIRECTION_INPUT], node->required[SPA_DIRECTION_INPUT]); - if (node->required[SPA_DIRECTION_INPUT] > 0 && node->ready[SPA_DIRECTION_INPUT] == node->required[SPA_DIRECTION_INPUT]) { + if (node->required[SPA_DIRECTION_INPUT] > 0 && + node->ready[SPA_DIRECTION_INPUT] == node->required[SPA_DIRECTION_INPUT]) { node->state = spa_node_process_input(node->implementation); spa_debug("node %p processed in %d", node, node->state); if (node->state == SPA_RESULT_HAVE_BUFFER) { diff --git a/spa/plugins/volume/volume.c b/spa/plugins/volume/volume.c index efab73538..42a37e8ee 100644 --- a/spa/plugins/volume/volume.c +++ b/spa/plugins/volume/volume.c @@ -636,12 +636,6 @@ static struct spa_buffer *find_free_buffer(struct impl *this, struct port *port) return b->outbuf; } -static inline void release_buffer(struct impl *this, struct spa_buffer *buffer) -{ - if (this->callbacks && this->callbacks->reuse_buffer) - this->callbacks->reuse_buffer(this->callbacks_data, 0, buffer->id); -} - static void do_volume(struct impl *this, struct spa_buffer *dbuf, struct spa_buffer *sbuf) { uint32_t si, di, i, n_samples, n_bytes, soff, doff; @@ -703,7 +697,6 @@ static int impl_node_process_input(struct spa_node *node) if (output->status == SPA_RESULT_HAVE_BUFFER) return SPA_RESULT_HAVE_BUFFER; - in_port = &this->in_ports[0]; input = in_port->io; spa_return_val_if_fail(input != NULL, SPA_RESULT_ERROR); diff --git a/src/modules/module-client-node/client-node.c b/src/modules/module-client-node/client-node.c index e481dd7e5..e3a8c83cc 100644 --- a/src/modules/module-client-node/client-node.c +++ b/src/modules/module-client-node/client-node.c @@ -809,6 +809,7 @@ static int spa_proxy_node_process_output(struct spa_node *node) pw_client_node_transport_add_message(impl->transport, &PW_CLIENT_NODE_MESSAGE_INIT(PW_CLIENT_NODE_MESSAGE_PROCESS_OUTPUT)); do_flush(this); + return res; } @@ -848,7 +849,6 @@ client_node_done(void *data, int seq, int res) this->callbacks->done(this->callbacks_data, seq, res); } - static void client_node_update(void *data, uint32_t change_mask, diff --git a/src/pipewire/link.c b/src/pipewire/link.c index 677f73df0..d77dd6e70 100644 --- a/src/pipewire/link.c +++ b/src/pipewire/link.c @@ -1080,7 +1080,6 @@ struct pw_link *pw_link_new(struct pw_core *core, this->properties = properties; this->state = PW_LINK_STATE_INIT; - this->input = input; this->output = output; diff --git a/src/pipewire/node.c b/src/pipewire/node.c index a1abf5dc6..67db8b244 100644 --- a/src/pipewire/node.c +++ b/src/pipewire/node.c @@ -476,6 +476,7 @@ static void node_event(void *data, struct spa_event *event) static void node_need_input(void *data) { struct pw_node *node = data; + pw_log_trace("node %p: need input", node); spa_hook_list_call(&node->listener_list, struct pw_node_events, need_input); spa_graph_need_input(node->rt.graph, &node->rt.node); } @@ -483,6 +484,7 @@ static void node_need_input(void *data) static void node_have_output(void *data) { struct pw_node *node = data; + pw_log_trace("node %p: have output", node); spa_graph_have_output(node->rt.graph, &node->rt.node); spa_hook_list_call(&node->listener_list, struct pw_node_events, have_output); } diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index 89e439763..21a4e92e0 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -96,7 +96,6 @@ struct stream { bool in_order; bool client_reuse; - uint32_t *last_buffer_id; struct spa_list free; bool in_need_buffer; @@ -906,12 +905,9 @@ static void client_node_transport(void *data, uint32_t node_id, if (impl->trans) { pw_client_node_transport_destroy(impl->trans); - free (impl->last_buffer_id); } impl->trans = transport; - impl->last_buffer_id = malloc(impl->trans->area->max_input_ports * sizeof(uint32_t)); for (i = 0; i < impl->trans->area->max_input_ports; i++) { - impl->last_buffer_id[i] = SPA_ID_INVALID; } pw_log_info("stream %p: create client transport %p with fds %d %d for node %u", @@ -1042,8 +1038,6 @@ void pw_stream_disconnect(struct pw_stream *stream) if (impl->trans) { pw_client_node_transport_destroy(impl->trans); impl->trans = NULL; - free(impl->last_buffer_id); - impl->last_buffer_id = NULL; } } diff --git a/src/tools/pipewire-cli.c b/src/tools/pipewire-cli.c index 088b152c2..077530021 100644 --- a/src/tools/pipewire-cli.c +++ b/src/tools/pipewire-cli.c @@ -843,7 +843,7 @@ static bool do_info(struct data *data, const char *cmd, char *args, char **error n = pw_split_ip(args, WHITESPACE, 1, a); if (n < 1) { - asprintf(error, "%s ", cmd); + asprintf(error, "%s |all", cmd); return false; } if (!strcmp(a[0], "all")) {