profiler: add followerClock block

Add a new followerClock block in the profiler info. This is only set
when the follower could be a driver and it contains the clock info used
for following the driver, mostly the rate difference and delay.

Dump this info in pw-profiler -J

Make sure we always set the info in the clock, especially also when we
are following.
This commit is contained in:
Wim Taymans 2024-10-09 11:27:23 +02:00
parent d605a820d2
commit fa1ec61cf0
6 changed files with 95 additions and 8 deletions

View file

@ -2826,7 +2826,7 @@ static int update_time(struct state *state, uint64_t current_time, snd_pcm_sfram
state->next_time += (uint64_t)(state->threshold / corr * 1e9 / state->rate);
if (SPA_LIKELY(!follower && state->clock)) {
if (SPA_LIKELY(state->clock)) {
state->clock->nsec = current_time;
state->clock->rate = state->driver_rate;
state->clock->position += state->clock->duration;