mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
spa: add spa_ratelimit
This commit is contained in:
parent
17bc9d520e
commit
dc07c2321b
8 changed files with 76 additions and 69 deletions
|
|
@ -216,10 +216,11 @@ int stream_send_underflow(struct stream *stream, int64_t offset)
|
|||
struct client *client = stream->client;
|
||||
struct impl *impl = client->impl;
|
||||
struct message *reply;
|
||||
int missed;
|
||||
|
||||
if (ratelimit_test(&impl->rate_limit, stream->timestamp, SPA_LOG_LEVEL_INFO)) {
|
||||
pw_log_info("[%s]: UNDERFLOW channel:%u offset:%" PRIi64,
|
||||
client->name, stream->channel, offset);
|
||||
if ((missed = spa_ratelimit_test(&impl->rate_limit, stream->timestamp)) >= 0) {
|
||||
pw_log_info("[%s]: UNDERFLOW channel:%u offset:%" PRIi64" (%d missed)",
|
||||
client->name, stream->channel, offset, missed);
|
||||
}
|
||||
|
||||
reply = message_alloc(impl, -1, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue