small cleanups

This commit is contained in:
Wim Taymans 2018-05-17 17:26:09 +02:00
parent 65e00631da
commit c61d579d99
9 changed files with 34 additions and 19 deletions

View file

@ -333,6 +333,8 @@ static int link_session_dsp(struct session *session)
struct pw_port *op, *ip;
char *error = NULL;
pw_log_debug("module %p: link session dsp '%d'", impl, session->id);
if (session->direction == PW_DIRECTION_OUTPUT) {
op = session->dsp_port;
ip = session->node_port;

View file

@ -226,7 +226,7 @@ process_messages(struct client_data *data)
goto invalid_message;
if (debug_messages) {
printf("<<<<<<<<< in: %d %d %d\n", id, opcode, size);
fprintf(stderr, "<<<<<<<<< in: %d %d %d\n", id, opcode, size);
spa_debug_pod((struct spa_pod *)message, 0);
}
if (demarshal[opcode].func(resource, message, size) < 0)
@ -560,7 +560,7 @@ on_remote_data(void *data, int fd, enum spa_io mask)
}
}
if (debug_messages) {
printf("<<<<<<<<< in: %d %d %d\n", id, opcode, size);
fprintf(stderr, "<<<<<<<<< in: %d %d %d\n", id, opcode, size);
spa_debug_pod((struct spa_pod *)message, 0);
}
if (demarshal[opcode].func(proxy, message, size) < 0) {

View file

@ -431,10 +431,11 @@ pw_protocol_native_connection_end(struct pw_protocol_native_connection *conn,
buf->buffer_size += 8 + size;
if (debug_messages) {
printf(">>>>>>>>> out: %d %d %d\n", impl->dest_id, impl->opcode, size);
fprintf(stderr, ">>>>>>>>> out: %d %d %d\n", impl->dest_id, impl->opcode, size);
spa_debug_pod((struct spa_pod *)p, 0);
}
spa_hook_list_call(&conn->listener_list, struct pw_protocol_native_connection_events, need_flush);
spa_hook_list_call(&conn->listener_list,
struct pw_protocol_native_connection_events, need_flush);
}
/** Flush the connection object

View file

@ -224,6 +224,7 @@ static int configure_converter(struct stream *impl)
return -ENOTSUP;
if (impl->io != &impl->conv_io) {
pw_log_debug("stream %p: update io %p %p", impl, impl->io, &impl->conv_io);
res = spa_node_port_set_io(impl->convert,
impl->direction, 0,
t->io.Buffers,
@ -751,11 +752,11 @@ static int impl_node_process_output(struct spa_node *node)
if ((b = pop_queue(impl, &impl->queued)) != NULL) {
io->buffer_id = b->id;
io->status = SPA_STATUS_HAVE_BUFFER;
pw_log_trace("stream %p: pop %d", stream, b->id);
pw_log_trace("stream %p: pop %d %p", stream, b->id, io);
} else {
io->buffer_id = SPA_ID_INVALID;
io->status = SPA_STATUS_NEED_BUFFER;
pw_log_trace("stream %p: no more buffers", stream);
pw_log_trace("stream %p: no more buffers %p", stream, io);
}
}
if (io->status == SPA_STATUS_HAVE_BUFFER && impl->use_converter) {