mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: log the amount of underrun bytes
This commit is contained in:
parent
0ccad38df1
commit
e172effe71
1 changed files with 4 additions and 4 deletions
|
|
@ -455,15 +455,15 @@ static int reply_error(struct client *client, uint32_t command, uint32_t tag, in
|
||||||
|
|
||||||
#include "extension.c"
|
#include "extension.c"
|
||||||
|
|
||||||
static int send_underflow(struct stream *stream, int64_t offset)
|
static int send_underflow(struct stream *stream, int64_t offset, uint32_t underrun_for)
|
||||||
{
|
{
|
||||||
struct client *client = stream->client;
|
struct client *client = stream->client;
|
||||||
struct impl *impl = client->impl;
|
struct impl *impl = client->impl;
|
||||||
struct message *reply;
|
struct message *reply;
|
||||||
|
|
||||||
if (ratelimit_test(&impl->rate_limit, stream->timestamp)) {
|
if (ratelimit_test(&impl->rate_limit, stream->timestamp)) {
|
||||||
pw_log_warn(NAME" %p: [%s] UNDERFLOW channel:%u offset:%"PRIi64,
|
pw_log_warn(NAME" %p: [%s] UNDERFLOW channel:%u offset:%"PRIi64" underrun:%u",
|
||||||
client, client->name, stream->channel, offset);
|
client, client->name, stream->channel, offset, underrun_for);
|
||||||
}
|
}
|
||||||
|
|
||||||
reply = message_alloc(impl, -1, 0);
|
reply = message_alloc(impl, -1, 0);
|
||||||
|
|
@ -1458,7 +1458,7 @@ do_process_done(struct spa_loop *loop,
|
||||||
stream->underrun_for = 0;
|
stream->underrun_for = 0;
|
||||||
stream->playing_for = 0;
|
stream->playing_for = 0;
|
||||||
if (pd->underrun)
|
if (pd->underrun)
|
||||||
send_underflow(stream, pd->read_index);
|
send_underflow(stream, pd->read_index, pd->underrun_for);
|
||||||
else
|
else
|
||||||
send_stream_started(stream);
|
send_stream_started(stream);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue