improve debug

Improve log so that debug level 3 gives a reasonably readable overview
of what is going on.
This commit is contained in:
Wim Taymans 2020-04-22 12:47:18 +02:00
parent 8ab67c5fa0
commit aafd1e7298
33 changed files with 141 additions and 125 deletions

View file

@ -248,7 +248,7 @@ int jack_get_property(jack_uuid_t subject,
*value = strdup(prop->data); *value = strdup(prop->data);
*type = strdup(prop->type); *type = strdup(prop->type);
pw_log_info("subject:%"PRIu64" key:'%s' value:'%s' type:'%s'", pw_log_debug("subject:%"PRIu64" key:'%s' value:'%s' type:'%s'",
subject, key, *value, *type); subject, key, *value, *type);
return 0; return 0;

View file

@ -4108,7 +4108,7 @@ void jack_set_error_function (void (*func)(const char *))
SPA_EXPORT SPA_EXPORT
void default_jack_info_callback(const char *desc) void default_jack_info_callback(const char *desc)
{ {
pw_log_info("pw jack info: %s",desc); pw_log_info("pw jack info: %s", desc);
} }
SPA_EXPORT SPA_EXPORT
@ -4435,7 +4435,7 @@ int jack_client_create_thread (jack_client_t* client,
if (globals.creator == NULL) if (globals.creator == NULL)
globals.creator = pthread_create; globals.creator = pthread_create;
pw_log_info("client %p: create thread", client); pw_log_debug("client %p: create thread", client);
return globals.creator(thread, NULL, start_routine, arg); return globals.creator(thread, NULL, start_routine, arg);
} }

View file

@ -152,11 +152,11 @@ static inline pa_channel_position_t channel_id2pa(pa_stream *s, uint32_t id)
static void dump_buffer_attr(pa_stream *s, pa_buffer_attr *attr) static void dump_buffer_attr(pa_stream *s, pa_buffer_attr *attr)
{ {
pw_log_info("stream %p: maxlength: %u", s, attr->maxlength); pw_log_debug("stream %p: maxlength: %u", s, attr->maxlength);
pw_log_info("stream %p: tlength: %u", s, attr->tlength); pw_log_debug("stream %p: tlength: %u", s, attr->tlength);
pw_log_info("stream %p: minreq: %u", s, attr->minreq); pw_log_debug("stream %p: minreq: %u", s, attr->minreq);
pw_log_info("stream %p: prebuf: %u", s, attr->prebuf); pw_log_debug("stream %p: prebuf: %u", s, attr->prebuf);
pw_log_info("stream %p: fragsize: %u", s, attr->fragsize); pw_log_debug("stream %p: fragsize: %u", s, attr->fragsize);
} }
static void configure_buffers(pa_stream *s) static void configure_buffers(pa_stream *s)
@ -271,7 +271,7 @@ static const struct spa_pod *get_buffers_param(pa_stream *s, pa_buffer_attr *att
else else
buffers = SPA_CLAMP(attr->maxlength / (size * stride), 3u, MAX_BUFFERS); buffers = SPA_CLAMP(attr->maxlength / (size * stride), 3u, MAX_BUFFERS);
pw_log_info("stream %p: stride %d maxsize %d size %u buffers %d", s, stride, maxsize, pw_log_debug("stream %p: stride %d maxsize %d size %u buffers %d", s, stride, maxsize,
size, buffers); size, buffers);
param = spa_pod_builder_add_object(b, param = spa_pod_builder_add_object(b,

View file

@ -227,16 +227,16 @@ static int set_profile(struct impl *this, uint32_t id)
snd_ctl_t *ctl_hndl; snd_ctl_t *ctl_hndl;
int err; int err;
spa_log_info(this->log, "open card %s", this->props.device); spa_log_debug(this->log, "open card %s", this->props.device);
if ((err = snd_ctl_open(&ctl_hndl, this->props.device, 0)) < 0) { if ((err = snd_ctl_open(&ctl_hndl, this->props.device, 0)) < 0) {
spa_log_error(this->log, "can't open control for card %s: %s", spa_log_error(this->log, "can't open control for card %s: %s",
this->props.device, snd_strerror(err)); this->props.device, snd_strerror(err));
return err; return err;
} }
err = activate_profile(this, ctl_hndl, id); err = activate_profile(this, ctl_hndl, id);
spa_log_info(this->log, "close card %s", this->props.device); spa_log_debug(this->log, "close card %s", this->props.device);
snd_ctl_close(ctl_hndl); snd_ctl_close(ctl_hndl);
return err; return err;
@ -253,12 +253,12 @@ static int emit_info(struct impl *this, bool full)
struct spa_param_info params[2]; struct spa_param_info params[2];
char path[128]; char path[128];
spa_log_info(this->log, "open card %s", this->props.device); spa_log_debug(this->log, "open card %s", this->props.device);
if ((err = snd_ctl_open(&ctl_hndl, this->props.device, 0)) < 0) { if ((err = snd_ctl_open(&ctl_hndl, this->props.device, 0)) < 0) {
spa_log_error(this->log, "can't open control for card %s: %s", spa_log_error(this->log, "can't open control for card %s: %s",
this->props.device, snd_strerror(err)); this->props.device, snd_strerror(err));
return err; return err;
} }
snd_ctl_card_info_alloca(&info); snd_ctl_card_info_alloca(&info);
if ((err = snd_ctl_card_info(ctl_hndl, info)) < 0) { if ((err = snd_ctl_card_info(ctl_hndl, info)) < 0) {
@ -294,7 +294,7 @@ static int emit_info(struct impl *this, bool full)
spa_device_emit_info(&this->hooks, &dinfo); spa_device_emit_info(&this->hooks, &dinfo);
exit: exit:
spa_log_info(this->log, "close card %s", this->props.device); spa_log_debug(this->log, "close card %s", this->props.device);
snd_ctl_close(ctl_hndl); snd_ctl_close(ctl_hndl);
return err; return err;
} }

View file

@ -28,7 +28,7 @@ static int spa_alsa_open(struct state *state)
CHECK(snd_output_stdio_attach(&state->output, stderr, 0), "attach failed"); CHECK(snd_output_stdio_attach(&state->output, stderr, 0), "attach failed");
spa_log_info(state->log, NAME" %p: ALSA device open '%s' %s", state, props->device, spa_log_debug(state->log, NAME" %p: ALSA device open '%s' %s", state, props->device,
state->stream == SND_PCM_STREAM_CAPTURE ? "capture" : "playback"); state->stream == SND_PCM_STREAM_CAPTURE ? "capture" : "playback");
CHECK(snd_pcm_open(&state->hndl, CHECK(snd_pcm_open(&state->hndl,
props->device, props->device,
@ -71,7 +71,7 @@ int spa_alsa_close(struct state *state)
if (!state->opened) if (!state->opened)
return 0; return 0;
spa_log_info(state->log, NAME" %p: Device '%s' closing", state, state->props.device); spa_log_debug(state->log, NAME" %p: Device '%s' closing", state, state->props.device);
CHECK(snd_pcm_close(state->hndl), "close failed"); CHECK(snd_pcm_close(state->hndl), "close failed");
spa_system_close(state->data_system, state->timerfd); spa_system_close(state->data_system, state->timerfd);
@ -429,7 +429,7 @@ int spa_alsa_set_format(struct state *state, struct spa_audio_info *fmt, uint32_
return -EINVAL; return -EINVAL;
} }
spa_log_info(state->log, NAME" %p: Stream parameters are %iHz, %s, %i channels", spa_log_debug(state->log, NAME" %p: Stream parameters are %iHz, %s, %i channels",
state, info->rate, snd_pcm_format_name(format), info->channels); state, info->rate, snd_pcm_format_name(format), info->channels);
CHECK(snd_pcm_hw_params_set_format(hndl, params, format), "set_format"); CHECK(snd_pcm_hw_params_set_format(hndl, params, format), "set_format");
@ -470,9 +470,10 @@ int spa_alsa_set_format(struct state *state, struct spa_audio_info *fmt, uint32_
state->period_frames = period_size; state->period_frames = period_size;
periods = state->buffer_frames / state->period_frames; periods = state->buffer_frames / state->period_frames;
spa_log_info(state->log, NAME" %p: buffer frames %lu, period frames %lu, periods %u, frame_size %zd", spa_log_info(state->log, NAME" %p: format:%s rate:%d channels:%d "
state, state->buffer_frames, state->period_frames, "buffer frames %lu, period frames %lu, periods %u, frame_size %zd",
periods, state->frame_size); state, snd_pcm_format_name(state->format), state->rate, state->channels,
state->buffer_frames, state->period_frames, periods, state->frame_size);
/* write the parameters to device */ /* write the parameters to device */
CHECK(snd_pcm_hw_params(hndl, params), "set_hw_params"); CHECK(snd_pcm_hw_params(hndl, params), "set_hw_params");

View file

@ -50,7 +50,7 @@ static int seq_open(struct seq_state *state, struct seq_conn *conn)
snd_seq_port_info_t *pinfo; snd_seq_port_info_t *pinfo;
int res; int res;
spa_log_info(state->log, "%p: ALSA seq open '%s' duplex", state, props->device); spa_log_debug(state->log, "%p: ALSA seq open '%s' duplex", state, props->device);
if ((res = snd_seq_open(&conn->hndl, if ((res = snd_seq_open(&conn->hndl,
props->device, props->device,
@ -111,7 +111,7 @@ error_exit_close:
static int seq_close(struct seq_state *state, struct seq_conn *conn) static int seq_close(struct seq_state *state, struct seq_conn *conn)
{ {
int res; int res;
spa_log_info(state->log, "%p: Device '%s' closing", state, state->props.device); spa_log_debug(state->log, "%p: Device '%s' closing", state, state->props.device);
if ((res = snd_seq_close(conn->hndl)) < 0) { if ((res = snd_seq_close(conn->hndl)) < 0) {
spa_log_warn(state->log, "close failed: %s", snd_strerror(res)); spa_log_warn(state->log, "close failed: %s", snd_strerror(res));
} }
@ -407,13 +407,14 @@ int spa_alsa_seq_activate_port(struct seq_state *state, struct seq_port *port, b
port->addr.client, port->addr.port, snd_strerror(res)); port->addr.client, port->addr.port, snd_strerror(res));
active = false; active = false;
} }
spa_log_info(state->log, "subscribe: %d.%d", port->addr.client, port->addr.port);
} else { } else {
if ((res = snd_seq_unsubscribe_port(state->event.hndl, sub)) < 0) { if ((res = snd_seq_unsubscribe_port(state->event.hndl, sub)) < 0) {
spa_log_warn(state->log, "can't unsubscribe from %d:%d - %s", spa_log_warn(state->log, "can't unsubscribe from %d:%d - %s",
port->addr.client, port->addr.port, snd_strerror(res)); port->addr.client, port->addr.port, snd_strerror(res));
} }
spa_log_info(state->log, "unsubscribe: %d.%d", port->addr.client, port->addr.port);
} }
spa_log_info(state->log, "activate: %d.%d: %d", port->addr.client, port->addr.port, active);
port->active = active; port->active = active;
return res; return res;
} }

View file

@ -199,7 +199,7 @@ static int emit_object_info(struct impl *this, uint32_t id, struct udev_device *
snprintf(path, sizeof(path), "hw:%d", atoi(str)); snprintf(path, sizeof(path), "hw:%d", atoi(str));
spa_log_info(this->log, "open card %s", path); spa_log_debug(this->log, "open card %s", path);
if ((res = snd_ctl_open(&ctl_hndl, path, 0)) < 0) { if ((res = snd_ctl_open(&ctl_hndl, path, 0)) < 0) {
spa_log_error(this->log, "can't open control for card %s: %s", spa_log_error(this->log, "can't open control for card %s: %s",
@ -210,7 +210,7 @@ static int emit_object_info(struct impl *this, uint32_t id, struct udev_device *
pcm = -1; pcm = -1;
res = snd_ctl_pcm_next_device(ctl_hndl, &pcm); res = snd_ctl_pcm_next_device(ctl_hndl, &pcm);
spa_log_info(this->log, "close card %s", path); spa_log_debug(this->log, "close card %s", path);
snd_ctl_close(ctl_hndl); snd_ctl_close(ctl_hndl);
if (res < 0) { if (res < 0) {

View file

@ -605,7 +605,7 @@ static int port_set_format(void *object,
return -EINVAL; return -EINVAL;
if (other->have_format) { if (other->have_format) {
spa_log_info(this->log, NAME "%p: channels:%d<>%d rate:%d<>%d format:%d<>%d", this, spa_log_debug(this->log, NAME "%p: channels:%d<>%d rate:%d<>%d format:%d<>%d", this,
info.info.raw.channels, other->format.info.raw.channels, info.info.raw.channels, other->format.info.raw.channels,
info.info.raw.rate, other->format.info.raw.rate, info.info.raw.rate, other->format.info.raw.rate,
info.info.raw.format, other->format.info.raw.format); info.info.raw.format, other->format.info.raw.format);

View file

@ -260,7 +260,7 @@ static int impl_node_add_port(void *object, enum spa_direction direction, uint32
if (this->last_port <= port_id) if (this->last_port <= port_id)
this->last_port = port_id + 1; this->last_port = port_id + 1;
spa_log_info(this->log, NAME " %p: add port %d", this, port_id); spa_log_debug(this->log, NAME " %p: add port %d", this, port_id);
emit_port_info(this, port, true); emit_port_info(this, port, true);
return 0; return 0;
@ -293,7 +293,7 @@ impl_node_remove_port(void *object, enum spa_direction direction, uint32_t port_
this->last_port = i + 1; this->last_port = i + 1;
} }
spa_log_info(this->log, NAME " %p: remove port %d", this, port_id); spa_log_debug(this->log, NAME " %p: remove port %d", this, port_id);
spa_node_emit_port_info(&this->hooks, direction, port_id, NULL); spa_node_emit_port_info(&this->hooks, direction, port_id, NULL);
return 0; return 0;
@ -437,7 +437,7 @@ impl_node_port_enum_params(void *object, int seq,
static int clear_buffers(struct impl *this, struct port *port) static int clear_buffers(struct impl *this, struct port *port)
{ {
if (port->n_buffers > 0) { if (port->n_buffers > 0) {
spa_log_info(this->log, NAME " %p: clear buffers %p", this, port); spa_log_debug(this->log, NAME " %p: clear buffers %p", this, port);
port->n_buffers = 0; port->n_buffers = 0;
spa_list_init(&port->queue); spa_list_init(&port->queue);
} }
@ -493,7 +493,7 @@ static int port_set_format(void *object,
if (!port->have_format) { if (!port->have_format) {
this->n_formats++; this->n_formats++;
port->have_format = true; port->have_format = true;
spa_log_info(this->log, NAME " %p: set format on port %d", this, port_id); spa_log_debug(this->log, NAME " %p: set format on port %d", this, port_id);
} }
} }
port->info.change_mask |= SPA_PORT_CHANGE_MASK_PARAMS; port->info.change_mask |= SPA_PORT_CHANGE_MASK_PARAMS;
@ -547,7 +547,7 @@ impl_node_port_use_buffers(void *object,
spa_return_val_if_fail(port->have_format, -EIO); spa_return_val_if_fail(port->have_format, -EIO);
spa_log_info(this->log, NAME " %p: use buffers %d on port %d", this, n_buffers, port_id); spa_log_debug(this->log, NAME " %p: use buffers %d on port %d", this, n_buffers, port_id);
clear_buffers(this, port); clear_buffers(this, port);

View file

@ -1167,7 +1167,7 @@ static int port_set_format(struct impl *this, struct port *port,
int err; int err;
if (format == NULL) { if (format == NULL) {
spa_log_info(this->log, "clear format"); spa_log_debug(this->log, "clear format");
clear_buffers(this, port); clear_buffers(this, port);
port->have_format = false; port->have_format = false;
} else { } else {
@ -1245,7 +1245,7 @@ impl_node_port_use_buffers(void *object,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL); spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
port = &this->port; port = &this->port;
spa_log_info(this->log, "use buffers %d", n_buffers); spa_log_debug(this->log, "use buffers %d", n_buffers);
if (!port->have_format) if (!port->have_format)
return -EIO; return -EIO;

View file

@ -811,7 +811,7 @@ static int port_set_format(struct impl *this, struct port *port,
int err; int err;
if (format == NULL) { if (format == NULL) {
spa_log_info(this->log, "clear format"); spa_log_debug(this->log, "clear format");
clear_buffers(this, port); clear_buffers(this, port);
port->have_format = false; port->have_format = false;
} else { } else {
@ -890,7 +890,7 @@ impl_node_port_use_buffers(void *object,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL); spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
port = &this->port; port = &this->port;
spa_log_info(this->log, "use buffers %d", n_buffers); spa_log_debug(this->log, "use buffers %d", n_buffers);
if (!port->have_format) if (!port->have_format)
return -EIO; return -EIO;

View file

@ -1449,7 +1449,7 @@ static int sco_do_accept(struct spa_bt_transport *t)
memset(&addr, 0, sizeof(addr)); memset(&addr, 0, sizeof(addr));
optlen = sizeof(addr); optlen = sizeof(addr);
spa_log_info(monitor->log, "transport %p: doing accept", t); spa_log_debug(monitor->log, "transport %p: doing accept", t);
sock = accept(td->sco.fd, (struct sockaddr *) &addr, &optlen); sock = accept(td->sco.fd, (struct sockaddr *) &addr, &optlen);
if (sock < 0) { if (sock < 0) {
if (errno != EAGAIN) if (errno != EAGAIN)
@ -1505,7 +1505,7 @@ static int sco_do_connect(struct spa_bt_transport *t)
addr.sco_family = AF_BLUETOOTH; addr.sco_family = AF_BLUETOOTH;
bacpy(&addr.sco_bdaddr, &dst); bacpy(&addr.sco_bdaddr, &dst);
spa_log_info(monitor->log, "transport %p: doing connect", t); spa_log_debug(monitor->log, "transport %p: doing connect", t);
err = connect(sock, (struct sockaddr *) &addr, len); err = connect(sock, (struct sockaddr *) &addr, len);
if (err < 0 && !(errno == EAGAIN || errno == EINPROGRESS)) { if (err < 0 && !(errno == EAGAIN || errno == EINPROGRESS)) {
spa_log_error(monitor->log, "connect(): %s", strerror(errno)); spa_log_error(monitor->log, "connect(): %s", strerror(errno));
@ -1621,7 +1621,7 @@ static int sco_listen(struct spa_bt_transport *t)
goto fail_close; goto fail_close;
} }
spa_log_info(monitor->log, "transport %p: doing listen", t); spa_log_debug(monitor->log, "transport %p: doing listen", t);
if (listen(sock, 1) < 0) { if (listen(sock, 1) < 0) {
spa_log_error(monitor->log, "listen(): %m"); spa_log_error(monitor->log, "listen(): %m");
goto fail_close; goto fail_close;

View file

@ -841,7 +841,7 @@ static int port_set_format(struct impl *this, struct port *port,
int err; int err;
if (format == NULL) { if (format == NULL) {
spa_log_info(this->log, "clear format"); spa_log_debug(this->log, "clear format");
clear_buffers(this, port); clear_buffers(this, port);
port->have_format = false; port->have_format = false;
} else { } else {
@ -919,7 +919,7 @@ impl_node_port_use_buffers(void *object,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL); spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
port = &this->port; port = &this->port;
spa_log_info(this->log, "use buffers %d", n_buffers); spa_log_debug(this->log, "use buffers %d", n_buffers);
if (!port->have_format) if (!port->have_format)
return -EIO; return -EIO;

View file

@ -738,7 +738,7 @@ static int port_set_format(struct impl *this, struct port *port,
int err; int err;
if (format == NULL) { if (format == NULL) {
spa_log_info(this->log, "clear format"); spa_log_debug(this->log, "clear format");
clear_buffers(this, port); clear_buffers(this, port);
port->have_format = false; port->have_format = false;
} else { } else {
@ -817,7 +817,7 @@ impl_node_port_use_buffers(void *object,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL); spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
port = &this->port; port = &this->port;
spa_log_info(this->log, "use buffers %d", n_buffers); spa_log_debug(this->log, "use buffers %d", n_buffers);
if (!port->have_format) if (!port->have_format)
return -EIO; return -EIO;

View file

@ -599,7 +599,7 @@ impl_node_port_enum_params(void *object, int seq,
static int clear_buffers(struct impl *this, struct port *port) static int clear_buffers(struct impl *this, struct port *port)
{ {
if (port->n_buffers > 0) { if (port->n_buffers > 0) {
spa_log_info(this->log, NAME " %p: clear buffers", this); spa_log_debug(this->log, NAME " %p: clear buffers", this);
port->n_buffers = 0; port->n_buffers = 0;
this->started = false; this->started = false;
} }
@ -876,8 +876,6 @@ impl_init(const struct spa_handle_factory *factory,
init_ports(this); init_ports(this);
spa_log_info(this->log, NAME " %p: initialized", this);
return 0; return 0;
} }

View file

@ -598,7 +598,7 @@ impl_node_port_enum_params(void *object, int seq,
static int clear_buffers(struct impl *this, struct port *port) static int clear_buffers(struct impl *this, struct port *port)
{ {
if (port->n_buffers > 0) { if (port->n_buffers > 0) {
spa_log_info(this->log, NAME " %p: clear buffers", this); spa_log_debug(this->log, NAME " %p: clear buffers", this);
port->n_buffers = 0; port->n_buffers = 0;
spa_list_init(&port->empty); spa_list_init(&port->empty);
this->started = false; this->started = false;
@ -898,8 +898,6 @@ impl_init(const struct spa_handle_factory *factory,
init_ports(this); init_ports(this);
spa_log_info(this->log, NAME " %p: initialized", this);
return 0; return 0;
} }

View file

@ -512,7 +512,7 @@ impl_node_port_enum_params(void *object, int seq,
static int clear_buffers(struct impl *this, struct port *port) static int clear_buffers(struct impl *this, struct port *port)
{ {
if (port->n_buffers > 0) { if (port->n_buffers > 0) {
spa_log_info(this->log, NAME " %p: clear buffers", this); spa_log_debug(this->log, NAME " %p: clear buffers", this);
port->n_buffers = 0; port->n_buffers = 0;
spa_list_init(&port->ready); spa_list_init(&port->ready);
this->started = false; this->started = false;
@ -788,8 +788,6 @@ impl_init(const struct spa_handle_factory *factory,
spa_list_init(&port->ready); spa_list_init(&port->ready);
spa_log_info(this->log, NAME " %p: initialized", this);
return 0; return 0;
} }

View file

@ -528,7 +528,7 @@ impl_node_port_enum_params(void *object, int seq,
static int clear_buffers(struct impl *this, struct port *port) static int clear_buffers(struct impl *this, struct port *port)
{ {
if (port->n_buffers > 0) { if (port->n_buffers > 0) {
spa_log_info(this->log, NAME " %p: clear buffers", this); spa_log_debug(this->log, NAME " %p: clear buffers", this);
port->n_buffers = 0; port->n_buffers = 0;
spa_list_init(&port->empty); spa_list_init(&port->empty);
this->started = false; this->started = false;
@ -820,8 +820,6 @@ impl_init(const struct spa_handle_factory *factory,
spa_list_init(&port->empty); spa_list_init(&port->empty);
spa_log_info(this->log, NAME " %p: initialized", this);
return 0; return 0;
} }

View file

@ -57,7 +57,7 @@ int spa_v4l2_open(struct spa_v4l2_device *dev, const char *path)
return -EIO; return -EIO;
} }
spa_log_info(dev->log, "v4l2: Playback device is '%s'", path); spa_log_debug(dev->log, "v4l2: Playback device is '%s'", path);
if (stat(path, &st) < 0) { if (stat(path, &st) < 0) {
err = errno; err = errno;
@ -111,7 +111,7 @@ int spa_v4l2_close(struct spa_v4l2_device *dev)
if (dev->active || dev->have_format) if (dev->active || dev->have_format)
return 0; return 0;
spa_log_info(dev->log, "v4l2: close"); spa_log_debug(dev->log, "v4l2: close");
if (close(dev->fd)) if (close(dev->fd))
spa_log_warn(dev->log, "close: %m"); spa_log_warn(dev->log, "close: %m");
@ -159,7 +159,7 @@ static int spa_v4l2_clear_buffers(struct impl *this)
d = b->outbuf->datas; d = b->outbuf->datas;
if (SPA_FLAG_IS_SET(b->flags, BUFFER_FLAG_OUTSTANDING)) { if (SPA_FLAG_IS_SET(b->flags, BUFFER_FLAG_OUTSTANDING)) {
spa_log_info(this->log, "v4l2: queueing outstanding buffer %p", b); spa_log_debug(this->log, "v4l2: queueing outstanding buffer %p", b);
spa_v4l2_buffer_recycle(this, i); spa_v4l2_buffer_recycle(this, i);
} }
if (SPA_FLAG_IS_SET(b->flags, BUFFER_FLAG_MAPPED)) { if (SPA_FLAG_IS_SET(b->flags, BUFFER_FLAG_MAPPED)) {
@ -881,7 +881,7 @@ static int spa_v4l2_set_format(struct impl *this, struct spa_video_info *format,
streamparm.parm.capture.timeperframe.numerator = framerate->denom; streamparm.parm.capture.timeperframe.numerator = framerate->denom;
streamparm.parm.capture.timeperframe.denominator = framerate->num; streamparm.parm.capture.timeperframe.denominator = framerate->num;
spa_log_info(this->log, "v4l2: set %.4s %dx%d %d/%d", (char *)&fmt.fmt.pix.pixelformat, spa_log_debug(this->log, "v4l2: set %.4s %dx%d %d/%d", (char *)&fmt.fmt.pix.pixelformat,
fmt.fmt.pix.width, fmt.fmt.pix.height, fmt.fmt.pix.width, fmt.fmt.pix.height,
streamparm.parm.capture.timeperframe.denominator, streamparm.parm.capture.timeperframe.denominator,
streamparm.parm.capture.timeperframe.numerator); streamparm.parm.capture.timeperframe.numerator);
@ -1286,7 +1286,7 @@ static int spa_v4l2_use_buffers(struct impl *this, struct spa_buffer **buffers,
spa_log_error(this->log, "v4l2: VIDIOC_REQBUFS %m"); spa_log_error(this->log, "v4l2: VIDIOC_REQBUFS %m");
return -errno; return -errno;
} }
spa_log_info(this->log, "v4l2: got %d buffers", reqbuf.count); spa_log_debug(this->log, "v4l2: got %d buffers", reqbuf.count);
if (reqbuf.count < n_buffers) { if (reqbuf.count < n_buffers) {
spa_log_error(this->log, "v4l2: can't allocate enough buffers"); spa_log_error(this->log, "v4l2: can't allocate enough buffers");
return -ENOMEM; return -ENOMEM;
@ -1301,7 +1301,7 @@ static int spa_v4l2_use_buffers(struct impl *this, struct spa_buffer **buffers,
b->flags = BUFFER_FLAG_OUTSTANDING; b->flags = BUFFER_FLAG_OUTSTANDING;
b->h = spa_buffer_find_meta_data(buffers[i], SPA_META_Header, sizeof(*b->h)); b->h = spa_buffer_find_meta_data(buffers[i], SPA_META_Header, sizeof(*b->h));
spa_log_info(this->log, "v4l2: import buffer %p", buffers[i]); spa_log_debug(this->log, "v4l2: import buffer %p", buffers[i]);
if (buffers[i]->n_datas < 1) { if (buffers[i]->n_datas < 1) {
spa_log_error(this->log, "v4l2: invalid memory on buffer %p", buffers[i]); spa_log_error(this->log, "v4l2: invalid memory on buffer %p", buffers[i]);
@ -1369,7 +1369,7 @@ mmap_init(struct impl *this,
return -errno; return -errno;
} }
spa_log_info(this->log, "v4l2: got %d buffers", reqbuf.count); spa_log_debug(this->log, "v4l2: got %d buffers", reqbuf.count);
n_buffers = reqbuf.count; n_buffers = reqbuf.count;
if (reqbuf.count < 2) { if (reqbuf.count < 2) {
@ -1377,7 +1377,7 @@ mmap_init(struct impl *this,
return -ENOMEM; return -ENOMEM;
} }
if (port->export_buf) if (port->export_buf)
spa_log_info(this->log, "v4l2: using EXPBUF"); spa_log_debug(this->log, "v4l2: using EXPBUF");
for (i = 0; i < reqbuf.count; i++) { for (i = 0; i < reqbuf.count; i++) {
struct buffer *b; struct buffer *b;

View file

@ -602,7 +602,7 @@ impl_node_port_enum_params(void *object, int seq,
static int clear_buffers(struct impl *this, struct port *port) static int clear_buffers(struct impl *this, struct port *port)
{ {
if (port->n_buffers > 0) { if (port->n_buffers > 0) {
spa_log_info(this->log, NAME " %p: clear buffers", this); spa_log_debug(this->log, NAME " %p: clear buffers", this);
port->n_buffers = 0; port->n_buffers = 0;
spa_list_init(&port->empty); spa_list_init(&port->empty);
this->started = false; this->started = false;
@ -928,8 +928,6 @@ impl_init(const struct spa_handle_factory *factory,
port->info.n_params = 5; port->info.n_params = 5;
spa_list_init(&port->empty); spa_list_init(&port->empty);
spa_log_info(this->log, NAME " %p: initialized", this);
return 0; return 0;
} }

View file

@ -431,7 +431,7 @@ impl_node_port_enum_params(void *object, int seq,
static int clear_buffers(struct impl *this, struct port *port) static int clear_buffers(struct impl *this, struct port *port)
{ {
if (port->n_buffers > 0) { if (port->n_buffers > 0) {
spa_log_info(this->log, NAME " %p: clear buffers", this); spa_log_debug(this->log, NAME " %p: clear buffers", this);
port->n_buffers = 0; port->n_buffers = 0;
spa_list_init(&port->empty); spa_list_init(&port->empty);
} }

View file

@ -632,7 +632,7 @@ impl_node_port_enum_params(void *object, int seq,
static int clear_buffers(struct impl *this, struct port *port) static int clear_buffers(struct impl *this, struct port *port)
{ {
if (port->n_buffers > 0) { if (port->n_buffers > 0) {
spa_log_info(this->log, NAME " %p: clear buffers", this); spa_log_debug(this->log, NAME " %p: clear buffers", this);
spa_vulkan_use_buffers(&this->state, 0, 0, NULL); spa_vulkan_use_buffers(&this->state, 0, 0, NULL);
port->n_buffers = 0; port->n_buffers = 0;
spa_list_init(&port->empty); spa_list_init(&port->empty);
@ -948,8 +948,6 @@ impl_init(const struct spa_handle_factory *factory,
this->state.log = this->log; this->state.log = this->log;
spa_log_info(this->log, NAME " %p: initialized", this);
return 0; return 0;
} }

View file

@ -339,7 +339,7 @@ static int impl_port_use_buffers(void *object,
} }
b->id = i; b->id = i;
b->buffer = buffers[i]; b->buffer = buffers[i];
pw_log_info("got buffer %d size %d", i, datas[0].maxsize); pw_log_debug("got buffer %d size %d", i, datas[0].maxsize);
spa_list_append(&d->empty, &b->link); spa_list_append(&d->empty, &b->link);
} }
d->n_buffers = n_buffers; d->n_buffers = n_buffers;

View file

@ -419,14 +419,14 @@ static int rescan_endpoint(struct impl *impl, struct endpoint *ep)
find.ep = ep; find.ep = ep;
find.exclusive = exclusive; find.exclusive = exclusive;
pw_log_info(NAME " %p: exclusive:%d", impl, exclusive); pw_log_debug(NAME " %p: exclusive:%d", impl, exclusive);
str = spa_dict_lookup(props, PW_KEY_ENDPOINT_TARGET); str = spa_dict_lookup(props, PW_KEY_ENDPOINT_TARGET);
if (str == NULL) if (str == NULL)
str = spa_dict_lookup(props, PW_KEY_NODE_TARGET); str = spa_dict_lookup(props, PW_KEY_NODE_TARGET);
if (str != NULL) { if (str != NULL) {
uint32_t path_id = atoi(str); uint32_t path_id = atoi(str);
pw_log_info(NAME " %p: target:%d", impl, path_id); pw_log_debug(NAME " %p: target:%d", impl, path_id);
if ((obj = sm_media_session_find_object(impl->session, path_id)) != NULL) { if ((obj = sm_media_session_find_object(impl->session, path_id)) != NULL) {
if (strcmp(obj->type, PW_TYPE_INTERFACE_Endpoint) == 0) { if (strcmp(obj->type, PW_TYPE_INTERFACE_Endpoint) == 0) {

View file

@ -460,12 +460,12 @@ static int rescan_node(struct impl *impl, struct node *n)
find.target = n; find.target = n;
find.exclusive = exclusive; find.exclusive = exclusive;
pw_log_info(NAME " %p: exclusive:%d", impl, exclusive); pw_log_debug(NAME " %p: exclusive:%d", impl, exclusive);
str = spa_dict_lookup(props, PW_KEY_NODE_TARGET); str = spa_dict_lookup(props, PW_KEY_NODE_TARGET);
if (str != NULL) { if (str != NULL) {
uint32_t path_id = atoi(str); uint32_t path_id = atoi(str);
pw_log_info(NAME " %p: target:%d", impl, path_id); pw_log_debug(NAME " %p: target:%d", impl, path_id);
if ((obj = sm_media_session_find_object(impl->session, path_id)) != NULL) { if ((obj = sm_media_session_find_object(impl->session, path_id)) != NULL) {
if (strcmp(obj->type, PW_TYPE_INTERFACE_Node) == 0) { if (strcmp(obj->type, PW_TYPE_INTERFACE_Node) == 0) {

View file

@ -437,7 +437,7 @@ do_update_port(struct node *this,
port = GET_PORT(this, direction, port_id); port = GET_PORT(this, direction, port_id);
if (!port->valid) { if (!port->valid) {
spa_log_info(this->log, "node %p: adding port %d", this, port_id); spa_log_debug(this->log, "node %p: adding port %d", this, port_id);
port->id = port_id; port->id = port_id;
port->direction = direction; port->direction = direction;
port->have_format = false; port->have_format = false;
@ -454,7 +454,7 @@ do_update_port(struct node *this,
port->have_format = false; port->have_format = false;
spa_log_info(this->log, "node %p: port %u update %d params", this, port_id, n_params); spa_log_debug(this->log, "node %p: port %u update %d params", this, port_id, n_params);
for (i = 0; i < port->n_params; i++) for (i = 0; i < port->n_params; i++)
free(port->params[i]); free(port->params[i]);
port->n_params = n_params; port->n_params = n_params;
@ -504,7 +504,7 @@ static void do_uninit_port(struct node *this, enum spa_direction direction, uint
{ {
struct port *port; struct port *port;
spa_log_info(this->log, "node %p: removing port %d", this, port_id); spa_log_debug(this->log, "node %p: removing port %d", this, port_id);
if (direction == SPA_DIRECTION_INPUT) { if (direction == SPA_DIRECTION_INPUT) {
port = GET_IN_PORT(this, port_id); port = GET_IN_PORT(this, port_id);
@ -637,7 +637,7 @@ impl_node_port_set_io(void *object,
impl = this->impl; impl = this->impl;
spa_log_info(this->log, "node %p: port %d.%d set io %d %p", this, spa_log_debug(this->log, "node %p: port %d.%d set io %d %p", this,
direction, port_id, id, data); direction, port_id, id, data);
if (id == SPA_IO_Buffers) { if (id == SPA_IO_Buffers) {
@ -694,7 +694,7 @@ impl_node_port_use_buffers(void *object,
spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL); spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
impl = this->impl; impl = this->impl;
spa_log_info(this->log, "node %p: use buffers %p %u", this, buffers, n_buffers); spa_log_debug(this->log, "node %p: use buffers %p %u", this, buffers, n_buffers);
port = GET_PORT(this, direction, port_id); port = GET_PORT(this, direction, port_id);
@ -1010,7 +1010,7 @@ client_node0_update(void *data,
this->info.max_output_ports = max_output_ports; this->info.max_output_ports = max_output_ports;
if (change_mask & PW_CLIENT_NODE0_UPDATE_PARAMS) { if (change_mask & PW_CLIENT_NODE0_UPDATE_PARAMS) {
uint32_t i; uint32_t i;
spa_log_info(this->log, "node %p: update %d params", this, n_params); spa_log_debug(this->log, "node %p: update %d params", this, n_params);
for (i = 0; i < this->n_params; i++) for (i = 0; i < this->n_params; i++)
free(this->params[i]); free(this->params[i]);
@ -1024,7 +1024,7 @@ client_node0_update(void *data,
spa_node_emit_info(&this->hooks, &this->info); spa_node_emit_info(&this->hooks, &this->info);
} }
spa_log_info(this->log, "node %p: got node update max_in %u, max_out %u", this, spa_log_debug(this->log, "node %p: got node update max_in %u, max_out %u", this,
this->info.max_input_ports, this->info.max_output_ports); this->info.max_input_ports, this->info.max_output_ports);
} }
@ -1041,7 +1041,7 @@ client_node0_port_update(void *data,
struct node *this = &impl->node; struct node *this = &impl->node;
bool remove; bool remove;
spa_log_info(this->log, "node %p: got port update", this); spa_log_debug(this->log, "node %p: got port update", this);
if (!CHECK_PORT_ID(this, direction, port_id)) if (!CHECK_PORT_ID(this, direction, port_id))
return; return;

View file

@ -1012,7 +1012,7 @@ create_server(struct pw_protocol *protocol,
pw_loop_add_hook(pw_context_get_main_loop(context), &s->hook, &impl_hooks, s); pw_loop_add_hook(pw_context_get_main_loop(context), &s->hook, &impl_hooks, s);
pw_log_info(NAME" %p: created server %p", protocol, this); pw_log_debug(NAME" %p: created server %p", protocol, this);
return s; return s;
} }

View file

@ -187,7 +187,7 @@ setup_props(struct pw_context *context, struct spa_node *spa_node, struct pw_pro
if ((prop = spa_pod_find_prop(props, prop, type))) { if ((prop = spa_pod_find_prop(props, prop, type))) {
const char *value = pw_properties_get(pw_props, key); const char *value = pw_properties_get(pw_props, key);
pw_log_info("configure prop %s to %s", key, value); pw_log_debug("configure prop %s to %s", key, value);
switch(prop->value.type) { switch(prop->value.type) {
case SPA_TYPE_Bool: case SPA_TYPE_Bool:

View file

@ -876,8 +876,8 @@ int pw_context_recalc_graph(struct pw_context *context)
if (n->rt.position && n->quantum_current != n->rt.position->clock.duration) { if (n->rt.position && n->quantum_current != n->rt.position->clock.duration) {
n->rt.position->clock.duration = n->quantum_current; n->rt.position->clock.duration = n->quantum_current;
pw_log_info(NAME" %p: new quantum %u for master '%s'", context, pw_log_info("(%s-%u) new quantum:%u",
n->quantum_current, n->name); n->name, n->info.id, n->quantum_current);
} }
pw_log_debug(NAME" %p: master %p quantum:%u '%s'", context, n, pw_log_debug(NAME" %p: master %p quantum:%u '%s'", context, n,

View file

@ -116,10 +116,11 @@ static void check_properties(struct pw_impl_device *device)
{ {
const char *str; const char *str;
if ((str = pw_properties_get(device->properties, PW_KEY_DEVICE_NAME))) { if ((str = pw_properties_get(device->properties, PW_KEY_DEVICE_NAME)) &&
(device->name == NULL || strcmp(str, device->name) != 0)) {
free(device->name); free(device->name);
device->name = strdup(str); device->name = strdup(str);
pw_log_info(NAME" %p: name '%s'", device, device->name); pw_log_debug(NAME" %p: name '%s'", device, device->name);
} }
} }

View file

@ -114,12 +114,17 @@ static void pw_impl_link_update_state(struct pw_impl_link *link, enum pw_link_st
if (state == old) if (state == old)
return; return;
pw_log_debug(NAME" %p: %s -> %s (%s)", link,
pw_link_state_as_string(old),
pw_link_state_as_string(state), error);
if (state == PW_LINK_STATE_ERROR) { if (state == PW_LINK_STATE_ERROR) {
pw_log_error(NAME" %p: update state %s -> error (%s)", link, pw_log_error("(%s) %s -> error (%s)", link->name,
pw_link_state_as_string(old), error); pw_link_state_as_string(old), error);
} else { } else {
pw_log_debug(NAME" %p: update state %s -> %s", link, pw_log_info("(%s) %s -> %s", link->name,
pw_link_state_as_string(old), pw_link_state_as_string(state)); pw_link_state_as_string(old),
pw_link_state_as_string(state));
} }
link->info.state = state; link->info.state = state;
@ -1139,6 +1144,11 @@ struct pw_impl_link *pw_context_create_link(struct pw_context *context,
output_node, output->port_id, this->rt.out_mix.port.port_id, output_node, output->port_id, this->rt.out_mix.port.port_id,
input_node, input->port_id, this->rt.in_mix.port.port_id); input_node, input->port_id, this->rt.in_mix.port.port_id);
asprintf(&this->name, "%d.%d -> %d.%d",
output_node->info.id, output->port_id,
input_node->info.id, input->port_id);
pw_log_info("(%s) (%s) -> (%s)", this->name, output_node->name, input_node->name);
pw_impl_port_emit_link_added(output, this); pw_impl_port_emit_link_added(output, this);
pw_impl_port_emit_link_added(input, this); pw_impl_port_emit_link_added(input, this);
@ -1272,6 +1282,7 @@ void pw_impl_link_destroy(struct pw_impl_link *link)
struct impl *impl = SPA_CONTAINER_OF(link, struct impl, this); struct impl *impl = SPA_CONTAINER_OF(link, struct impl, this);
pw_log_debug(NAME" %p: destroy", impl); pw_log_debug(NAME" %p: destroy", impl);
pw_log_info("(%s) destroy", link->name);
pw_impl_link_emit_destroy(link); pw_impl_link_emit_destroy(link);
pw_impl_link_deactivate(link); pw_impl_link_deactivate(link);
@ -1300,6 +1311,7 @@ void pw_impl_link_destroy(struct pw_impl_link *link)
pw_context_recalc_graph(link->context); pw_context_recalc_graph(link->context);
free(link->name);
free(link->info.format); free(link->info.format);
free(impl); free(impl);
} }

View file

@ -195,8 +195,8 @@ static int start_node(struct pw_impl_node *this)
&SPA_NODE_COMMAND_INIT(SPA_NODE_COMMAND_Start)); &SPA_NODE_COMMAND_INIT(SPA_NODE_COMMAND_Start));
if (res < 0) if (res < 0)
pw_log_error(NAME" %p: start node error %d: %s", pw_log_error("(%s-%u) start node error %d: %s", this->name, this->info.id,
this, res, spa_strerror(res)); res, spa_strerror(res));
return res; return res;
} }
@ -296,11 +296,14 @@ static void node_update_state(struct pw_impl_node *node, enum pw_node_state stat
if (old == state) if (old == state)
return; return;
pw_log_debug(NAME" %p: (%s) %s -> %s (%s)", node, node->name,
pw_node_state_as_string(old), pw_node_state_as_string(state), error);
if (state == PW_NODE_STATE_ERROR) { if (state == PW_NODE_STATE_ERROR) {
pw_log_error(NAME" %p: update state from %s -> error (%s)", node, pw_log_error("(%s-%u) %s -> error (%s)", node->name, node->info.id,
pw_node_state_as_string(old), error); pw_node_state_as_string(old), error);
} else { } else {
pw_log_debug(NAME" %p: update state from %s -> %s", node, pw_log_info("(%s-%u) %s -> %s", node->name, node->info.id,
pw_node_state_as_string(old), pw_node_state_as_string(state)); pw_node_state_as_string(old), pw_node_state_as_string(state));
} }
@ -673,8 +676,11 @@ int pw_impl_node_set_driver(struct pw_impl_node *node, struct pw_impl_node *driv
remove_segment_master(old, node->info.id); remove_segment_master(old, node->info.id);
node->master = node->driver && driver == node; node->master = node->driver && driver == node;
pw_log_info(NAME" %p: driver %p (%s) quantum:%u master:%u", node, pw_log_debug(NAME" %p: driver %p quantum:%u master:%u", node,
driver, driver->name, driver->quantum_current, node->master); driver, driver->quantum_current, node->master);
pw_log_info("(%s-%u) -> driver (%s-%d) quantum:%u",
node->name, node->info.id, driver->name,
driver->info.id, driver->quantum_current);
node->driver_node = driver; node->driver_node = driver;
@ -715,14 +721,14 @@ static void check_properties(struct pw_impl_node *node)
if ((str = pw_properties_get(node->properties, PW_KEY_PRIORITY_MASTER))) { if ((str = pw_properties_get(node->properties, PW_KEY_PRIORITY_MASTER))) {
node->priority_master = pw_properties_parse_int(str); node->priority_master = pw_properties_parse_int(str);
pw_log_info(NAME" %p: priority master %d", node, node->priority_master); pw_log_debug(NAME" %p: priority master %d", node, node->priority_master);
} }
if ((str = pw_properties_get(node->properties, PW_KEY_NODE_NAME)) && if ((str = pw_properties_get(node->properties, PW_KEY_NODE_NAME)) &&
(node->name == NULL || strcmp(str, node->name) != 0)) { (node->name == NULL || strcmp(node->name, str) != 0)) {
free(node->name); free(node->name);
node->name = strdup(str); node->name = strdup(str);
pw_log_info(NAME" %p: name '%s'", node, node->name); pw_log_debug(NAME" %p: name '%s'", node, node->name);
} }
if ((str = pw_properties_get(node->properties, PW_KEY_NODE_PAUSE_ON_IDLE))) if ((str = pw_properties_get(node->properties, PW_KEY_NODE_PAUSE_ON_IDLE)))
@ -741,7 +747,7 @@ static void check_properties(struct pw_impl_node *node)
node->want_driver = false; node->want_driver = false;
if (node->driver != driver) { if (node->driver != driver) {
pw_log_info(NAME" %p: driver %d -> %d", node, node->driver, driver); pw_log_debug(NAME" %p: driver %d -> %d", node, node->driver, driver);
node->driver = driver; node->driver = driver;
if (node->registered) { if (node->registered) {
if (driver) if (driver)
@ -759,8 +765,10 @@ static void check_properties(struct pw_impl_node *node)
quantum_size = flp2((num * context->defaults.clock_rate / denom)); quantum_size = flp2((num * context->defaults.clock_rate / denom));
if (quantum_size != node->quantum_size) { if (quantum_size != node->quantum_size) {
pw_log_info(NAME" %p: latency '%s' quantum %u/%u", pw_log_debug(NAME" %p: latency '%s' quantum %u/%u",
node, str, quantum_size, context->defaults.clock_rate); node, str, quantum_size, context->defaults.clock_rate);
pw_log_info("(%s-%u) quantum %u/%u", node->name, node->info.id,
quantum_size, context->defaults.clock_rate);
node->quantum_size = quantum_size; node->quantum_size = quantum_size;
do_recalc |= node->active; do_recalc |= node->active;
} }
@ -796,9 +804,9 @@ static void dump_states(struct pw_impl_node *driver)
struct pw_node_activation_state *state = &a->state[0]; struct pw_node_activation_state *state = &a->state[0];
if (t->node == NULL) if (t->node == NULL)
continue; continue;
pw_log_warn(NAME" %p (%s): state:%p pending:%d/%d s:%"PRIu64" a:%"PRIu64" f:%"PRIu64 pw_log_warn("(%s-%u) state:%p pending:%d/%d s:%"PRIu64" a:%"PRIu64" f:%"PRIu64
" waiting:%"PRIu64" process:%"PRIu64" status:%s sync:%d", " waiting:%"PRIu64" process:%"PRIu64" status:%s sync:%d",
t->node, t->node->name, state, t->node->name, t->node->info.id, state,
state->pending, state->required, state->pending, state->required,
a->signal_time, a->signal_time,
a->awake_time, a->awake_time,
@ -1318,7 +1326,8 @@ static void update_position(struct pw_impl_node *node, int all_ready)
if (a->position.state == SPA_IO_POSITION_STATE_STARTING) { if (a->position.state == SPA_IO_POSITION_STATE_STARTING) {
if (!all_ready && --a->sync_left == 0) { if (!all_ready && --a->sync_left == 0) {
pw_log_warn(NAME" %p: sync timeout, going to RUNNING", node); pw_log_warn("(%s-%u) sync timeout, going to RUNNING",
node->name, node->info.id);
pw_context_driver_emit_timeout(node->context, node); pw_context_driver_emit_timeout(node->context, node);
dump_states(node); dump_states(node);
all_ready = true; all_ready = true;
@ -1348,8 +1357,9 @@ static int node_ready(void *data, int status)
uint64_t min_timeout = UINT64_MAX; uint64_t min_timeout = UINT64_MAX;
if (SPA_UNLIKELY(state->pending > 0)) { if (SPA_UNLIKELY(state->pending > 0)) {
pw_log_warn(NAME" %p: graph not finished: state:%p pending %d/%d", pw_log_warn("(%s-%u) graph not finished: state:%p pending %d/%d",
node, state, state->pending, state->required); node->name, node->info.id, state, state->pending,
state->required);
pw_context_driver_emit_incomplete(node->context, node); pw_context_driver_emit_incomplete(node->context, node);
dump_states(node); dump_states(node);
node->rt.target.signal(node->rt.target.data); node->rt.target.signal(node->rt.target.data);
@ -1517,6 +1527,7 @@ void pw_impl_node_destroy(struct pw_impl_node *node)
node->active = false; node->active = false;
pw_log_debug(NAME" %p: destroy", impl); pw_log_debug(NAME" %p: destroy", impl);
pw_log_info("(%s-%u) destroy", node->name, node->info.id);
pw_impl_node_emit_destroy(node); pw_impl_node_emit_destroy(node);
suspend_node(node); suspend_node(node);

View file

@ -704,19 +704,21 @@ struct pw_control_link {
struct pw_impl_link { struct pw_impl_link {
struct pw_context *context; /**< context object */ struct pw_context *context; /**< context object */
struct spa_list link; /**< link in context link_list */ struct spa_list link; /**< link in context link_list */
struct pw_global *global; /**< global for this link */ struct pw_global *global; /**< global for this link */
struct spa_hook global_listener; struct spa_hook global_listener;
struct pw_link_info info; /**< introspectable link info */ char *name;
struct pw_link_info info; /**< introspectable link info */
struct pw_properties *properties; /**< extra link properties */ struct pw_properties *properties; /**< extra link properties */
struct spa_io_buffers *io; /**< link io area */ struct spa_io_buffers *io; /**< link io area */
struct pw_impl_port *output; /**< output port */ struct pw_impl_port *output; /**< output port */
struct spa_list output_link; /**< link in output port links */ struct spa_list output_link; /**< link in output port links */
struct pw_impl_port *input; /**< input port */ struct pw_impl_port *input; /**< input port */
struct spa_list input_link; /**< link in input port links */ struct spa_list input_link; /**< link in input port links */
struct spa_hook_list listener_list; struct spa_hook_list listener_list;
@ -725,8 +727,8 @@ struct pw_impl_link {
struct { struct {
struct pw_impl_port_mix out_mix; /**< port added to the output mixer */ struct pw_impl_port_mix out_mix; /**< port added to the output mixer */
struct pw_impl_port_mix in_mix; /**< port added to the input mixer */ struct pw_impl_port_mix in_mix; /**< port added to the input mixer */
struct pw_node_target target; /**< target to trigger the input node */ struct pw_node_target target; /**< target to trigger the input node */
} rt; } rt;
void *user_data; void *user_data;