From 43fbdd54a79741a2199d37bfabfc99b6c2af6e8f 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 e0a9d8142..e2b3ca39f 100644 --- a/gstreamer-utils/src/streamproducer.rs +++ b/gstreamer-utils/src/streamproducer.rs @@ -349,6 +349,7 @@ impl StreamProducer { .is_ok() || latency_updated { + gst::info!(CAT, obj = appsink, "setting new latency: {latency}"); consumer.appsrc.set_latency(latency, gst::ClockTime::NONE); } } @@ -626,6 +627,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 }