mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
module-rtp: improve logging priorities
Previous state was useless for real debug at the current implementation level
This commit is contained in:
parent
c75f6219dc
commit
1fe6feac56
6 changed files with 23 additions and 23 deletions
|
|
@ -1079,7 +1079,7 @@ static int parse_sdp_a_rtpmap(struct impl *impl, char *c, struct sdp_info *info)
|
||||||
} else
|
} else
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
pw_log_debug("rate: %d, ch: %d", info->rate, info->channels);
|
pw_log_debug("a=rtpmap: rate: %d, ch: %d", info->rate, info->channels);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -1134,7 +1134,7 @@ static int parse_sdp(struct impl *impl, char *sdp, struct sdp_info *info)
|
||||||
goto too_short;
|
goto too_short;
|
||||||
|
|
||||||
s[l] = 0;
|
s[l] = 0;
|
||||||
pw_log_debug("%d: %s", count, s);
|
pw_log_debug("SDP line: %d: %s", count, s);
|
||||||
|
|
||||||
if (count++ == 0 && strcmp(s, "v=0") != 0)
|
if (count++ == 0 && strcmp(s, "v=0") != 0)
|
||||||
goto invalid_version;
|
goto invalid_version;
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,7 @@ static ssize_t send_packet(int fd, struct msghdr *msg)
|
||||||
ssize_t n;
|
ssize_t n;
|
||||||
n = sendmsg(fd, msg, MSG_NOSIGNAL);
|
n = sendmsg(fd, msg, MSG_NOSIGNAL);
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
pw_log_debug("sendmsg() failed: %m");
|
pw_log_warn("sendmsg() failed: %m");
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -791,7 +791,7 @@ static void parse_apple_midi_cmd_in(struct impl *impl, bool ctrl, uint8_t *buffe
|
||||||
msg.msg_iov = iov;
|
msg.msg_iov = iov;
|
||||||
msg.msg_iovlen = 2;
|
msg.msg_iovlen = 2;
|
||||||
|
|
||||||
pw_log_debug("send %p %u", msg.msg_name, msg.msg_namelen);
|
pw_log_trace("send %p %u", msg.msg_name, msg.msg_namelen);
|
||||||
|
|
||||||
send_packet(ctrl ? impl->ctrl_source->fd : impl->data_source->fd, &msg);
|
send_packet(ctrl ? impl->ctrl_source->fd : impl->data_source->fd, &msg);
|
||||||
}
|
}
|
||||||
|
|
@ -866,7 +866,7 @@ static void parse_apple_midi_cmd_ck(struct impl *impl, bool ctrl, uint8_t *buffe
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pw_log_debug("got CK count %d", hdr->count);
|
pw_log_trace("got CK count %d", hdr->count);
|
||||||
|
|
||||||
now = current_time_ns() / 10000;
|
now = current_time_ns() / 10000;
|
||||||
reply = *hdr;
|
reply = *hdr;
|
||||||
|
|
@ -896,7 +896,7 @@ static void parse_apple_midi_cmd_ck(struct impl *impl, bool ctrl, uint8_t *buffe
|
||||||
latency = t3 - t1;
|
latency = t3 - t1;
|
||||||
offset = ((t3 + t1) / 2) - t2;
|
offset = ((t3 + t1) / 2) - t2;
|
||||||
|
|
||||||
pw_log_debug("latency:%f offset:%f", latency / 1e5, offset / 1e5);
|
pw_log_trace("latency:%f offset:%f", latency / 1e5, offset / 1e5);
|
||||||
if (hdr->count >= 2)
|
if (hdr->count >= 2)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -912,7 +912,7 @@ static void parse_apple_midi_cmd_ck(struct impl *impl, bool ctrl, uint8_t *buffe
|
||||||
msg.msg_iov = iov;
|
msg.msg_iov = iov;
|
||||||
msg.msg_iovlen = 1;
|
msg.msg_iovlen = 1;
|
||||||
|
|
||||||
pw_log_debug("send %p %u", msg.msg_name, msg.msg_namelen);
|
pw_log_trace("send %p %u", msg.msg_name, msg.msg_namelen);
|
||||||
|
|
||||||
send_packet(ctrl ? impl->ctrl_source->fd : impl->data_source->fd, &msg);
|
send_packet(ctrl ? impl->ctrl_source->fd : impl->data_source->fd, &msg);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@ static void stream_send_packet(void *data, struct iovec *iov, size_t iovlen)
|
||||||
|
|
||||||
n = sendmsg(impl->rtp_fd, &msg, MSG_NOSIGNAL);
|
n = sendmsg(impl->rtp_fd, &msg, MSG_NOSIGNAL);
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
pw_log_debug("sendmsg() failed: %m");
|
pw_log_warn("sendmsg() failed: %m");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void stream_state_changed(void *data, bool started, const char *error)
|
static void stream_state_changed(void *data, bool started, const char *error)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ static void rtp_audio_process_playback(void *data)
|
||||||
int32_t avail;
|
int32_t avail;
|
||||||
|
|
||||||
if ((buf = pw_stream_dequeue_buffer(impl->stream)) == NULL) {
|
if ((buf = pw_stream_dequeue_buffer(impl->stream)) == NULL) {
|
||||||
pw_log_debug("Out of stream buffers: %m");
|
pw_log_info("Out of stream buffers: %m");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
d = buf->buffer->datas;
|
d = buf->buffer->datas;
|
||||||
|
|
@ -68,7 +68,7 @@ static void rtp_audio_process_playback(void *data)
|
||||||
|
|
||||||
corr = spa_dll_update(&impl->dll, error);
|
corr = spa_dll_update(&impl->dll, error);
|
||||||
|
|
||||||
pw_log_debug("avail:%u target:%u error:%f corr:%f", avail,
|
pw_log_trace("avail:%u target:%u error:%f corr:%f", avail,
|
||||||
target_buffer, error, corr);
|
target_buffer, error, corr);
|
||||||
|
|
||||||
if (impl->io_rate_match) {
|
if (impl->io_rate_match) {
|
||||||
|
|
@ -165,7 +165,7 @@ static int rtp_audio_receive(struct impl *impl, uint8_t *buffer, ssize_t len)
|
||||||
BUFFER_SIZE / stride);
|
BUFFER_SIZE / stride);
|
||||||
impl->have_sync = false;
|
impl->have_sync = false;
|
||||||
} else {
|
} else {
|
||||||
pw_log_debug("got samples:%u", samples);
|
pw_log_trace("got samples:%u", samples);
|
||||||
spa_ringbuffer_write_data(&impl->ring,
|
spa_ringbuffer_write_data(&impl->ring,
|
||||||
impl->buffer,
|
impl->buffer,
|
||||||
BUFFER_SIZE,
|
BUFFER_SIZE,
|
||||||
|
|
@ -259,7 +259,7 @@ static void rtp_audio_process_capture(void *data)
|
||||||
int32_t filled, wanted;
|
int32_t filled, wanted;
|
||||||
|
|
||||||
if ((buf = pw_stream_dequeue_buffer(impl->stream)) == NULL) {
|
if ((buf = pw_stream_dequeue_buffer(impl->stream)) == NULL) {
|
||||||
pw_log_debug("Out of stream buffers: %m");
|
pw_log_info("Out of stream buffers: %m");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
d = buf->buffer->datas;
|
d = buf->buffer->datas;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ static void rtp_midi_process_playback(void *data)
|
||||||
struct spa_pod_control *c;
|
struct spa_pod_control *c;
|
||||||
|
|
||||||
if ((buf = pw_stream_dequeue_buffer(impl->stream)) == NULL) {
|
if ((buf = pw_stream_dequeue_buffer(impl->stream)) == NULL) {
|
||||||
pw_log_debug("Out of stream buffers: %m");
|
pw_log_info("Out of stream buffers: %m");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
d = buf->buffer->datas;
|
d = buf->buffer->datas;
|
||||||
|
|
@ -204,7 +204,7 @@ static int rtp_midi_receive_midi(struct impl *impl, uint8_t *packet, uint32_t ti
|
||||||
/* our current time is now the estimated time */
|
/* our current time is now the estimated time */
|
||||||
t = estimated;
|
t = estimated;
|
||||||
}
|
}
|
||||||
pw_log_debug("%f %f %f %f", t, estimated, diff, impl->corr);
|
pw_log_trace("%f %f %f %f", t, estimated, diff, impl->corr);
|
||||||
|
|
||||||
timestamp = t * impl->rate;
|
timestamp = t * impl->rate;
|
||||||
|
|
||||||
|
|
@ -400,7 +400,7 @@ static void rtp_midi_flush_packets(struct impl *impl,
|
||||||
}
|
}
|
||||||
iov[2].iov_len = len;
|
iov[2].iov_len = len;
|
||||||
|
|
||||||
pw_log_debug("sending %d timestamp:%d %u %u",
|
pw_log_trace("sending %d timestamp:%d %u %u",
|
||||||
len, timestamp + base,
|
len, timestamp + base,
|
||||||
offset, impl->psamples);
|
offset, impl->psamples);
|
||||||
rtp_stream_emit_send_packet(impl, iov, 3);
|
rtp_stream_emit_send_packet(impl, iov, 3);
|
||||||
|
|
@ -436,7 +436,7 @@ static void rtp_midi_flush_packets(struct impl *impl,
|
||||||
}
|
}
|
||||||
iov[2].iov_len = len;
|
iov[2].iov_len = len;
|
||||||
|
|
||||||
pw_log_debug("sending %d timestamp:%d", len, base);
|
pw_log_trace("sending %d timestamp:%d", len, base);
|
||||||
rtp_stream_emit_send_packet(impl, iov, 3);
|
rtp_stream_emit_send_packet(impl, iov, 3);
|
||||||
impl->seq++;
|
impl->seq++;
|
||||||
}
|
}
|
||||||
|
|
@ -452,7 +452,7 @@ static void rtp_midi_process_capture(void *data)
|
||||||
void *ptr;
|
void *ptr;
|
||||||
|
|
||||||
if ((buf = pw_stream_dequeue_buffer(impl->stream)) == NULL) {
|
if ((buf = pw_stream_dequeue_buffer(impl->stream)) == NULL) {
|
||||||
pw_log_debug("Out of stream buffers: %m");
|
pw_log_info("Out of stream buffers: %m");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
d = buf->buffer->datas;
|
d = buf->buffer->datas;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ static void rtp_opus_process_playback(void *data)
|
||||||
int32_t avail;
|
int32_t avail;
|
||||||
|
|
||||||
if ((buf = pw_stream_dequeue_buffer(impl->stream)) == NULL) {
|
if ((buf = pw_stream_dequeue_buffer(impl->stream)) == NULL) {
|
||||||
pw_log_debug("Out of stream buffers: %m");
|
pw_log_info("Out of stream buffers: %m");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
d = buf->buffer->datas;
|
d = buf->buffer->datas;
|
||||||
|
|
@ -73,7 +73,7 @@ static void rtp_opus_process_playback(void *data)
|
||||||
|
|
||||||
corr = spa_dll_update(&impl->dll, error);
|
corr = spa_dll_update(&impl->dll, error);
|
||||||
|
|
||||||
pw_log_debug("avail:%u target:%u error:%f corr:%f", avail,
|
pw_log_trace("avail:%u target:%u error:%f corr:%f", avail,
|
||||||
target_buffer, error, corr);
|
target_buffer, error, corr);
|
||||||
|
|
||||||
if (impl->io_rate_match) {
|
if (impl->io_rate_match) {
|
||||||
|
|
@ -183,7 +183,7 @@ static int rtp_opus_receive(struct impl *impl, uint8_t *buffer, ssize_t len)
|
||||||
if (end > BUFFER_SIZE2)
|
if (end > BUFFER_SIZE2)
|
||||||
memmove(impl->buffer, &impl->buffer[BUFFER_SIZE2], end - BUFFER_SIZE2);
|
memmove(impl->buffer, &impl->buffer[BUFFER_SIZE2], end - BUFFER_SIZE2);
|
||||||
|
|
||||||
pw_log_debug("receiving %zd len:%d timestamp:%d %u", plen, res, timestamp, index);
|
pw_log_info("receiving %zd len:%d timestamp:%d %u", plen, res, timestamp, index);
|
||||||
samples = res;
|
samples = res;
|
||||||
|
|
||||||
write += samples;
|
write += samples;
|
||||||
|
|
@ -244,7 +244,7 @@ static void rtp_opus_flush_packets(struct impl *impl)
|
||||||
(const float*)&impl->buffer[offset * stride], tosend,
|
(const float*)&impl->buffer[offset * stride], tosend,
|
||||||
out, sizeof(out));
|
out, sizeof(out));
|
||||||
|
|
||||||
pw_log_debug("sending %d len:%d timestamp:%d", tosend, res, timestamp);
|
pw_log_trace("sending %d len:%d timestamp:%d", tosend, res, timestamp);
|
||||||
iov[1].iov_len = res;
|
iov[1].iov_len = res;
|
||||||
|
|
||||||
rtp_stream_emit_send_packet(impl, iov, 2);
|
rtp_stream_emit_send_packet(impl, iov, 2);
|
||||||
|
|
@ -255,7 +255,7 @@ static void rtp_opus_flush_packets(struct impl *impl)
|
||||||
avail -= tosend;
|
avail -= tosend;
|
||||||
}
|
}
|
||||||
|
|
||||||
pw_log_debug("move %d offset:%d", avail, offset);
|
pw_log_trace("move %d offset:%d", avail, offset);
|
||||||
memmove(impl->buffer, &impl->buffer[offset * stride], avail * stride);
|
memmove(impl->buffer, &impl->buffer[offset * stride], avail * stride);
|
||||||
|
|
||||||
spa_ringbuffer_read_update(&impl->ring, timestamp);
|
spa_ringbuffer_read_update(&impl->ring, timestamp);
|
||||||
|
|
@ -270,7 +270,7 @@ static void rtp_opus_process_capture(void *data)
|
||||||
int32_t filled, wanted;
|
int32_t filled, wanted;
|
||||||
|
|
||||||
if ((buf = pw_stream_dequeue_buffer(impl->stream)) == NULL) {
|
if ((buf = pw_stream_dequeue_buffer(impl->stream)) == NULL) {
|
||||||
pw_log_debug("Out of stream buffers: %m");
|
pw_log_info("Out of stream buffers: %m");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
d = buf->buffer->datas;
|
d = buf->buffer->datas;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue