streamproducer: add+expose get_forwarded_events

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1576>
This commit is contained in:
Thomas Goodwin 2024-10-23 13:53:13 +00:00 committed by Thomas Goodwin
parent ca0c7b8bfc
commit 93062673c7

View file

@ -450,6 +450,11 @@ impl StreamProducer {
self.consumers.lock().unwrap().events_to_forward = events_to_forward.into_iter().collect();
}
/// get event types the appsink should forward to all its consumers
pub fn get_forwarded_events(&self) -> Vec<gst::EventType> {
self.consumers.lock().unwrap().events_to_forward.clone()
}
/// configure whether the preroll sample should be forwarded (default: `true`)
pub fn set_forward_preroll(&self, forward_preroll: bool) {
self.consumers.lock().unwrap().forward_preroll = forward_preroll;