From ceea56aa72758bf65814fef67da0988ba55517da Mon Sep 17 00:00:00 2001 From: "juan.adarve" Date: Thu, 17 Oct 2024 15:11:52 -0500 Subject: [PATCH] utils: streamproducer: update appsrc latency upon appsink latency event Part-of: --- gstreamer-utils/src/streamproducer.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gstreamer-utils/src/streamproducer.rs b/gstreamer-utils/src/streamproducer.rs index 1b89c64c6..c57b66ed0 100644 --- a/gstreamer-utils/src/streamproducer.rs +++ b/gstreamer-utils/src/streamproducer.rs @@ -327,6 +327,7 @@ impl StreamProducer { .is_ok() || latency_updated { + gst::info!(CAT, obj: appsink, "setting new latency: {latency}"); consumer.appsrc.set_latency(latency, gst::ClockTime::NONE); } } @@ -562,6 +563,7 @@ impl<'a> From<&'a gst_app::AppSink> for StreamProducer { let latency = event.latency(); let mut consumers = consumers.lock().unwrap(); consumers.current_latency = Some(latency); + consumers.latency_updated = true; gst::PadProbeReturn::Ok }),