node: add a cycle counter to the position

So that we can count the number of times the graph is scheduled.
This commit is contained in:
Wim Taymans 2024-04-04 20:47:43 +02:00
parent f366167278
commit 0633be3c12
2 changed files with 5 additions and 3 deletions

View file

@ -148,7 +148,7 @@ struct spa_io_clock {
uint64_t target_duration; /**< Target duration of next cycle */
uint32_t target_seq; /**< Seq counter. must be equal at start and
* end of read and lower bit must be 0 */
uint32_t padding;
uint32_t cycle; /**< incremented each time the graph is started */
uint64_t xrun; /**< Estimated accumulated xrun duration */
};

View file

@ -1907,11 +1907,12 @@ again:
}
}
a->status = PW_NODE_ACTIVATION_TRIGGERED;
a->prev_signal_time = a->signal_time;
a->signal_time = nsec;
node->driver_start = nsec;
a->status = PW_NODE_ACTIVATION_TRIGGERED;
a->signal_time = nsec;
a->sync_timeout = SPA_MIN(min_timeout, DEFAULT_SYNC_TIMEOUT);
if (SPA_UNLIKELY(reposition_target != NULL)) {
@ -1925,6 +1926,7 @@ again:
update_position(node, all_ready, nsec);
pw_impl_node_rt_emit_start(node);
a->position.clock.cycle++;
}
/* this should not happen, driver nodes that are not currently driving
* should not emit the ready callback */