mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
ratelimit: missed -> suppressed
To avoid confusing with missed samples.
This commit is contained in:
parent
1837654a4b
commit
016d15e598
6 changed files with 50 additions and 50 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1105,9 +1105,9 @@ static void check_states(struct pw_impl_node *driver, uint64_t nsec)
|
|||
struct pw_node_activation *na = driver->rt.target.activation;
|
||||
struct spa_io_clock *cl = &na->position.clock;
|
||||
enum spa_log_level level = SPA_LOG_LEVEL_DEBUG;
|
||||
int missed;
|
||||
int suppressed;
|
||||
|
||||
if ((missed = spa_ratelimit_test(&driver->rt.rate_limit, nsec)) >= 0)
|
||||
if ((suppressed = spa_ratelimit_test(&driver->rt.rate_limit, nsec)) >= 0)
|
||||
level = SPA_LOG_LEVEL_INFO;
|
||||
|
||||
spa_list_for_each(t, &driver->rt.target_list, link) {
|
||||
|
|
@ -1121,11 +1121,11 @@ static void check_states(struct pw_impl_node *driver, uint64_t nsec)
|
|||
a->status == PW_NODE_ACTIVATION_AWAKE) {
|
||||
update_xrun_stats(a, nsec / 1000, 0);
|
||||
|
||||
pw_log(level, "(%s-%u) client too slow! rate:%u/%u pos:%"PRIu64" status:%s (%u missed)",
|
||||
pw_log(level, "(%s-%u) client too slow! rate:%u/%u pos:%"PRIu64" status:%s (%u suppressed)",
|
||||
t->name, t->id,
|
||||
(uint32_t)(cl->rate.num * cl->duration), cl->rate.denom,
|
||||
cl->position, str_status(a->status),
|
||||
missed);
|
||||
suppressed);
|
||||
}
|
||||
pw_log_debug("(%s-%u) state:%p pending:%d/%d s:%"PRIu64" a:%"PRIu64" f:%"PRIu64
|
||||
" waiting:%"PRIu64" process:%"PRIu64" status:%s sync:%d",
|
||||
|
|
@ -1900,11 +1900,11 @@ static int node_xrun(void *data, uint64_t trigger, uint64_t delay, struct spa_po
|
|||
struct pw_node_activation *da = this->rt.driver_target.activation;
|
||||
struct spa_system *data_system = this->data_system;
|
||||
uint64_t nsec = get_time_ns(data_system);
|
||||
int missed;
|
||||
int suppressed;
|
||||
|
||||
update_xrun_stats(a, trigger, delay);
|
||||
|
||||
if ((missed = spa_ratelimit_test(&this->rt.rate_limit, nsec)) >= 0) {
|
||||
if ((suppressed = spa_ratelimit_test(&this->rt.rate_limit, nsec)) >= 0) {
|
||||
struct spa_fraction rate;
|
||||
if (da) {
|
||||
struct spa_io_clock *cl = &da->position.clock;
|
||||
|
|
@ -1914,11 +1914,11 @@ static int node_xrun(void *data, uint64_t trigger, uint64_t delay, struct spa_po
|
|||
rate = SPA_FRACTION(0,0);
|
||||
}
|
||||
pw_log_info("(%s-%d) XRun! rate:%u/%u count:%u time:%"PRIu64
|
||||
" delay:%"PRIu64" max:%"PRIu64" (%d missed)",
|
||||
" delay:%"PRIu64" max:%"PRIu64" (%d suppressed)",
|
||||
this->name, this->info.id,
|
||||
rate.num, rate.denom, a->xrun_count,
|
||||
trigger, delay, a->max_delay,
|
||||
missed);
|
||||
suppressed);
|
||||
}
|
||||
|
||||
pw_impl_node_rt_emit_xrun(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue