ratelimit: missed -> suppressed

To avoid confusing with missed samples.
This commit is contained in:
Wim Taymans 2023-09-08 12:18:23 +02:00
parent 1837654a4b
commit 016d15e598
6 changed files with 50 additions and 50 deletions

View file

@ -216,11 +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;
int suppressed;
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);
if ((suppressed = spa_ratelimit_test(&impl->rate_limit, stream->timestamp)) >= 0) {
pw_log_info("[%s]: UNDERFLOW channel:%u offset:%" PRIi64" (%d suppressed)",
client->name, stream->channel, offset, suppressed);
}
reply = message_alloc(impl, -1, 0);

View file

@ -672,22 +672,22 @@ static void stream_underflow_cb(pa_stream *s, void *userdata)
{
struct impl *impl = userdata;
struct timespec ts;
int missed;
int suppressed;
clock_gettime(CLOCK_MONOTONIC, &ts);
if ((missed = spa_ratelimit_test(&impl->rate_limit, SPA_TIMESPEC_TO_NSEC(&ts))) >= 0)
pw_log_warn("underflow (%d missed)", missed);
if ((suppressed = spa_ratelimit_test(&impl->rate_limit, SPA_TIMESPEC_TO_NSEC(&ts))) >= 0)
pw_log_warn("underflow (%d suppressed)", suppressed);
impl->resync = true;
}
static void stream_overflow_cb(pa_stream *s, void *userdata)
{
struct impl *impl = userdata;
struct timespec ts;
int missed;
int suppressed;
clock_gettime(CLOCK_MONOTONIC, &ts);
if ((missed = spa_ratelimit_test(&impl->rate_limit, SPA_TIMESPEC_TO_NSEC(&ts))) >= 0)
pw_log_warn("overflow (%d missed)", missed);
if ((suppressed = spa_ratelimit_test(&impl->rate_limit, SPA_TIMESPEC_TO_NSEC(&ts))) >= 0)
pw_log_warn("overflow (%d suppressed)", suppressed);
impl->resync = true;
}