mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
Add some more debug
This commit is contained in:
parent
1704c6756b
commit
b9880dbd5f
3 changed files with 14 additions and 11 deletions
|
|
@ -303,6 +303,7 @@ static int node_process_input(struct spa_node *node)
|
|||
struct buffer *in;
|
||||
int stride = 2;
|
||||
|
||||
pw_log_trace(NAME" %p: mix %d %p %d %d", this, i, inio, inio->buffer_id, n->buffer_size);
|
||||
if (inio->buffer_id < inp->n_buffers && inio->status == SPA_STATUS_HAVE_BUFFER) {
|
||||
in = &inp->buffers[inio->buffer_id];
|
||||
conv_f32_s16(op, in->ptr, n->buffer_size, stride);
|
||||
|
|
|
|||
|
|
@ -872,6 +872,7 @@ static int impl_node_process_input(struct spa_node *node)
|
|||
spa_node_port_reuse_buffer(pp->node->implementation,
|
||||
pp->port_id, io->buffer_id);
|
||||
}
|
||||
pw_log_trace("client-node %p: send process input", this);
|
||||
pw_client_node_transport_add_message(impl->transport,
|
||||
&PW_CLIENT_NODE_MESSAGE_INIT(PW_CLIENT_NODE_MESSAGE_PROCESS_INPUT));
|
||||
do_flush(this);
|
||||
|
|
@ -890,6 +891,12 @@ static int impl_node_process_output(struct spa_node *node)
|
|||
this = SPA_CONTAINER_OF(node, struct node, node);
|
||||
impl = this->impl;
|
||||
|
||||
if (impl->out_pending)
|
||||
return SPA_STATUS_OK;
|
||||
|
||||
impl->out_pending = true;
|
||||
|
||||
pw_log_trace("client-node %p: send process output", this);
|
||||
pw_client_node_transport_add_message(impl->transport,
|
||||
&PW_CLIENT_NODE_MESSAGE_INIT(PW_CLIENT_NODE_MESSAGE_PROCESS_OUTPUT));
|
||||
do_flush(this);
|
||||
|
|
@ -900,23 +907,16 @@ static int impl_node_process_output(struct spa_node *node)
|
|||
static int handle_node_message(struct node *this, struct pw_client_node_message *message)
|
||||
{
|
||||
struct impl *impl = SPA_CONTAINER_OF(this, struct impl, node);
|
||||
struct spa_graph_node *n;
|
||||
struct spa_graph_port *p;
|
||||
|
||||
n = &impl->this.node->rt.node;
|
||||
|
||||
switch (PW_CLIENT_NODE_MESSAGE_TYPE(message)) {
|
||||
case PW_CLIENT_NODE_MESSAGE_HAVE_OUTPUT:
|
||||
impl->out_pending = false;
|
||||
pw_log_trace("have output");
|
||||
this->callbacks->have_output(this->callbacks_data);
|
||||
break;
|
||||
|
||||
case PW_CLIENT_NODE_MESSAGE_NEED_INPUT:
|
||||
spa_list_for_each(p, &n->ports[SPA_DIRECTION_OUTPUT], link) {
|
||||
struct spa_graph_node *ni = p->peer->node;
|
||||
spa_node_process_output(ni->implementation);
|
||||
pw_log_trace("need input %p %d %d", p->io, p->io->status, p->io->buffer_id);
|
||||
}
|
||||
pw_log_trace("need input");
|
||||
impl->input_ready++;
|
||||
this->callbacks->need_input(this->callbacks_data);
|
||||
break;
|
||||
|
|
@ -1288,8 +1288,6 @@ static int mix_port_set_io(struct spa_node *node,
|
|||
struct pw_port *p = SPA_CONTAINER_OF(node, struct pw_port, mix_node);
|
||||
struct impl *impl = p->owner_data;
|
||||
|
||||
pw_log_debug("client-node %p: mix port %d set io %p, %zd", impl, port_id, data, size);
|
||||
|
||||
p->rt.port.io = data;
|
||||
p->rt.mix_port.io = data;
|
||||
|
||||
|
|
@ -1300,11 +1298,13 @@ static int mix_port_set_io(struct spa_node *node,
|
|||
|
||||
static int mix_port_process_input(struct spa_node *data)
|
||||
{
|
||||
pw_log_trace("client-node %p: pass", data);
|
||||
return SPA_STATUS_HAVE_BUFFER;
|
||||
}
|
||||
|
||||
static int mix_port_process_output(struct spa_node *data)
|
||||
{
|
||||
pw_log_trace("client-node %p: pass", data);
|
||||
return SPA_STATUS_NEED_BUFFER;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ static int schedule_tee_input(struct spa_node *data)
|
|||
if (!spa_list_is_empty(&node->ports[SPA_DIRECTION_OUTPUT])) {
|
||||
pw_log_trace("node %p: tee input %d %d", node, io->status, io->buffer_id);
|
||||
spa_list_for_each(p, &node->ports[SPA_DIRECTION_OUTPUT], link) {
|
||||
pw_log_trace("node %p: port %p %d %p->%p", node, p, p->flags, io, p->io);
|
||||
if (p->flags & SPA_GRAPH_PORT_FLAG_DISABLED)
|
||||
continue;
|
||||
*p->io = *io;
|
||||
|
|
@ -78,6 +79,7 @@ static int schedule_tee_output(struct spa_node *data)
|
|||
struct spa_io_buffers *io = this->rt.mix_port.io;
|
||||
|
||||
spa_list_for_each(p, &node->ports[SPA_DIRECTION_OUTPUT], link) {
|
||||
pw_log_trace("node %p: port %p %d %p->%p", node, p, p->flags, p->io, io);
|
||||
if (p->flags & SPA_GRAPH_PORT_FLAG_DISABLED)
|
||||
continue;
|
||||
*io = *p->io;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue