From 094d74e391a14318926fcb25ed68ae3ff81c57d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 14 Jan 2023 19:19:47 +0200 Subject: [PATCH] utils: streamproducer: Add `ConsumptionLink::appsrc()` getter 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 5e648029d..e0b86b636 100644 --- a/gstreamer-utils/src/streamproducer.rs +++ b/gstreamer-utils/src/streamproducer.rs @@ -100,6 +100,11 @@ impl ConsumptionLink { pub fn set_discard(&self, discard: bool) { self.discard.store(discard, atomic::Ordering::SeqCst) } + + /// Get the GStreamer `appsrc` wrapped by this link + pub fn appsrc(&self) -> &gst_app::AppSrc { + &self.consumer + } } impl Drop for ConsumptionLink {