| 1 | // Take a look at the license at the top of the repository in the LICENSE file. |
| 2 | |
| 3 | use glib::{prelude::*, translate::*}; |
| 4 | |
| 5 | use crate::{ClockTime, ControlBinding}; |
| 6 | |
| 7 | mod sealed { |
| 8 | pub trait Sealed {} |
| 9 | impl<T: super::IsA<super::ControlBinding>> Sealed for T {} |
| 10 | } |
| 11 | |
| 12 | pub trait ControlBindingExtManual: sealed::Sealed + IsA<ControlBinding> + 'static { |
| 13 | #[doc (alias = "get_g_value_array" )] |
| 14 | #[doc (alias = "gst_control_binding_get_g_value_array" )] |
| 15 | fn g_value_array( |
| 16 | &self, |
| 17 | timestamp: ClockTime, |
| 18 | interval: ClockTime, |
| 19 | values: &mut [glib::Value], |
| 20 | ) -> Result<(), glib::error::BoolError> { |
| 21 | let n_values: u32 = values.len() as u32; |
| 22 | unsafe { |
| 23 | glib::result_from_gboolean!( |
| 24 | crate::ffi::gst_control_binding_get_g_value_array( |
| 25 | self.as_ref().to_glib_none().0, |
| 26 | timestamp.into_glib(), |
| 27 | interval.into_glib(), |
| 28 | n_values, |
| 29 | values.as_mut_ptr() as *mut glib::gobject_ffi::GValue, |
| 30 | ), |
| 31 | "Failed to get value array" |
| 32 | ) |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | impl<O: IsA<ControlBinding>> ControlBindingExtManual for O {} |
| 38 | |