streamproducer: Add getter for the stream producer to the consumption link

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1721>
This commit is contained in:
Sebastian Dröge 2025-04-25 14:33:54 +03:00 committed by Backport Bot
parent 7fa1de5862
commit 06af746f40

View file

@ -199,6 +199,11 @@ impl ConsumptionLink {
pub fn appsrc(&self) -> &gst_app::AppSrc { pub fn appsrc(&self) -> &gst_app::AppSrc {
&self.consumer &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 { impl Drop for ConsumptionLink {