mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
impl-node: update driver stats as well
If we have an underrun but are managed by another driver, also update the driver stats.
This commit is contained in:
parent
aee95e76bb
commit
df76501d39
1 changed files with 12 additions and 4 deletions
|
|
@ -1503,15 +1503,23 @@ static int node_reuse_buffer(void *data, uint32_t port_id, uint32_t buffer_id)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int node_xrun(void *data, uint64_t trigger, uint64_t delay, struct spa_pod *info)
|
static void update_xrun_stats(struct pw_node_activation *a, uint64_t trigger, uint64_t delay)
|
||||||
{
|
{
|
||||||
struct pw_impl_node *this = data;
|
|
||||||
struct pw_node_activation *a = this->rt.activation;
|
|
||||||
|
|
||||||
a->xrun_count++;
|
a->xrun_count++;
|
||||||
a->xrun_time = trigger;
|
a->xrun_time = trigger;
|
||||||
a->xrun_delay = delay;
|
a->xrun_delay = delay;
|
||||||
a->max_delay = SPA_MAX(a->max_delay, delay);
|
a->max_delay = SPA_MAX(a->max_delay, delay);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int node_xrun(void *data, uint64_t trigger, uint64_t delay, struct spa_pod *info)
|
||||||
|
{
|
||||||
|
struct pw_impl_node *this = data;
|
||||||
|
struct pw_node_activation *a = this->rt.activation;
|
||||||
|
struct pw_node_activation *da = this->rt.driver_target.activation;
|
||||||
|
|
||||||
|
update_xrun_stats(a, trigger, delay);
|
||||||
|
if (da && da != a)
|
||||||
|
update_xrun_stats(da, trigger, delay);
|
||||||
|
|
||||||
if (ratelimit_test(&this->rt.rate_limit, a->signal_time)) {
|
if (ratelimit_test(&this->rt.rate_limit, a->signal_time)) {
|
||||||
pw_log_error("(%s-%d) XRun! count:%u time:%"PRIu64" delay:%"PRIu64" max:%"PRIu64,
|
pw_log_error("(%s-%d) XRun! count:%u time:%"PRIu64" delay:%"PRIu64" max:%"PRIu64,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue