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 {