From bf82f54945b6e46620b178ea97eddc94439ab225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 25 Apr 2025 14:33:54 +0300 Subject: [PATCH] streamproducer: Add getter for the stream producer to the consumption link Part-of: --- gstreamer-utils/src/streamproducer.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gstreamer-utils/src/streamproducer.rs b/gstreamer-utils/src/streamproducer.rs index 29aa819ec..4980f00b6 100644 --- a/gstreamer-utils/src/streamproducer.rs +++ b/gstreamer-utils/src/streamproducer.rs @@ -202,6 +202,11 @@ impl ConsumptionLink { pub fn appsrc(&self) -> &gst_app::AppSrc { &self.consumer } + + /// Get the `StreamProducer` currently by this link, if any. + pub fn stream_producer(&self) -> Option<&StreamProducer> { + self.producer.as_ref() + } } impl Drop for ConsumptionLink {