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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1720>
This commit is contained in:
Sebastian Dröge 2025-04-25 14:33:54 +03:00
parent f552a490b7
commit bf82f54945

View file

@ -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 {