From 72f4c54e5e23cc2cd560c6ed21522e1b35b69aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 23 Mar 2025 12:08:27 +0200 Subject: [PATCH] bufferpool: Add setters to BufferPoolAcquireParams Part-of: --- gstreamer/src/buffer_pool.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gstreamer/src/buffer_pool.rs b/gstreamer/src/buffer_pool.rs index 0533945ba..6ef355df3 100644 --- a/gstreamer/src/buffer_pool.rs +++ b/gstreamer/src/buffer_pool.rs @@ -301,6 +301,24 @@ impl BufferPoolAcquireParams { pub fn stop(&self) -> crate::GenericFormattedValue { unsafe { crate::GenericFormattedValue::new(from_glib(self.0.format), self.0.stop) } } + + pub fn set_flags(&mut self, flags: crate::BufferPoolAcquireFlags) { + self.0.flags = flags.into_glib(); + } + + pub fn set_format(&mut self, format: crate::Format) { + self.0.format = format.into_glib(); + } + + pub fn set_start(&mut self, start: crate::GenericFormattedValue) { + assert_eq!(self.format(), start.format()); + self.0.start = start.value(); + } + + pub fn set_stop(&mut self, stop: crate::GenericFormattedValue) { + assert_eq!(self.format(), stop.format()); + self.0.stop = stop.value(); + } } impl PartialEq for BufferPoolAcquireParams {