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

@ -40,7 +40,9 @@ enum spa_profiler {
* Long : clock delay,
* Double : clock rate_diff,
* Long : clock next_nsec,
* Int : transport_state)) */
* Int : transport_state,
* Int : clock cycle,
* Long : xrun duration)) */
SPA_PROFILER_driverBlock, /**< generic driver info block
* (Struct(
* Int : driver_id,
@ -65,7 +67,18 @@ enum spa_profiler {
* Int : status,
* Fraction : latency,
* Int : xrun_count)) */
SPA_PROFILER_followerClock, /**< follower clock information
* (Struct(
* Int : clock id,
* String: clock name,
* Long : clock nsec,
* Fraction : clock rate,
* Long : clock position,
* Long : clock duration,
* Long : clock delay,
* Double : clock rate_diff,
* Long : clock next_nsec,
* Long : xrun duration)) */
SPA_PROFILER_START_CUSTOM = 0x1000000,
};