From 87b72f768bab2bbdbaa6ca72d127f353103bbbf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 22 Aug 2024 10:26:52 +0300 Subject: [PATCH] livesync: Report latency query results when handling latency query too Part-of: --- utils/livesync/src/livesync/imp.rs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/utils/livesync/src/livesync/imp.rs b/utils/livesync/src/livesync/imp.rs index 0eb1d1e4..105a982b 100644 --- a/utils/livesync/src/livesync/imp.rs +++ b/utils/livesync/src/livesync/imp.rs @@ -814,9 +814,28 @@ impl LiveSync { let mut state = self.state.lock(); let latency = state.latency; - let (_live, min, max) = q.result(); + let (live, min, max) = q.result(); + + gst::debug!( + CAT, + imp = self, + "Upstream latency query response: live {} min {} max {}", + live, + min, + max.display() + ); + q.set(true, min + latency, max.map(|max| max + latency)); + gst::debug!( + CAT, + imp = self, + "Reporting latency: live {} min {} max {}", + live, + min + latency, + max.map(|max| max + latency).display() + ); + state.upstream_latency = Some(min); true }