From e42657f03003b5de1524d38cfc7a3bc8e858cde4 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 30 Jun 2026 12:29:48 +0200 Subject: [PATCH] io: flesh out the node IO_Latency Make this more useful by adding the capture and playback latency. This structure can be used to say how much latency there is between the capture and playback hardware. --- spa/include/spa/node/io.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/spa/include/spa/node/io.h b/spa/include/spa/node/io.h index c03ef3e02..c3e288a69 100644 --- a/spa/include/spa/node/io.h +++ b/spa/include/spa/node/io.h @@ -33,8 +33,7 @@ enum spa_io_type { SPA_IO_Buffers, /**< area to exchange buffers, struct spa_io_buffers */ SPA_IO_Range, /**< expected byte range, struct spa_io_range (currently not used in PipeWire) */ SPA_IO_Clock, /**< area to update clock information, struct spa_io_clock */ - SPA_IO_Latency, /**< latency reporting, struct spa_io_latency (currently not used in - * PipeWire). \see spa_param_latency */ + SPA_IO_Latency, /**< latency reporting, struct spa_io_latency */ SPA_IO_Control, /**< area for control messages, struct spa_io_sequence */ SPA_IO_Notify, /**< area for notify messages, struct spa_io_sequence */ SPA_IO_Position, /**< position information in the graph, struct spa_io_position */ @@ -207,12 +206,12 @@ struct spa_io_video_size { /** * Latency reporting * - * Currently not used in PipeWire. Instead, \see spa_param_latency + * This gives the latency to the capture and playback hardware. */ struct spa_io_latency { - struct spa_fraction rate; /**< rate for min/max */ - uint64_t min; /**< min latency */ - uint64_t max; /**< max latency */ + struct spa_fraction rate; /**< rate for latencies */ + int64_t capture_latency; /**< capture latency */ + int64_t playback_latency; /**< playback latency */ }; /** control stream, io area for SPA_IO_Control and SPA_IO_Notify */