utils: streamproducer: Add ConsumptionLink::appsrc() getter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1189>
This commit is contained in:
Sebastian Dröge 2023-01-14 19:19:47 +02:00
parent 0a6ed3c717
commit 094d74e391

View file

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