2020-12-15 10:53:31 +00:00
|
|
|
// Take a look at the license at the top of the repository in the LICENSE file.
|
2020-06-09 01:06:49 +00:00
|
|
|
|
2023-01-03 18:58:25 +00:00
|
|
|
use glib::{prelude::*, translate::*};
|
|
|
|
|
|
|
|
use crate::{ClockTime, ControlBinding};
|
2020-06-09 01:06:49 +00:00
|
|
|
|
|
|
|
pub trait ControlBindingExtManual: 'static {
|
2021-05-02 09:41:18 +00:00
|
|
|
#[doc(alias = "get_g_value_array")]
|
2021-05-19 20:35:47 +00:00
|
|
|
#[doc(alias = "gst_control_binding_get_g_value_array")]
|
2021-04-20 10:23:24 +00:00
|
|
|
fn g_value_array(
|
2020-06-09 01:06:49 +00:00
|
|
|
&self,
|
|
|
|
timestamp: ClockTime,
|
|
|
|
interval: ClockTime,
|
|
|
|
values: &mut [glib::Value],
|
|
|
|
) -> Result<(), glib::error::BoolError>;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<O: IsA<ControlBinding>> ControlBindingExtManual for O {
|
2021-04-20 10:23:24 +00:00
|
|
|
fn g_value_array(
|
2020-06-09 01:06:49 +00:00
|
|
|
&self,
|
|
|
|
timestamp: ClockTime,
|
|
|
|
interval: ClockTime,
|
|
|
|
values: &mut [glib::Value],
|
|
|
|
) -> Result<(), glib::error::BoolError> {
|
|
|
|
let n_values = values.len() as u32;
|
|
|
|
unsafe {
|
2020-12-17 22:38:06 +00:00
|
|
|
glib::result_from_gboolean!(
|
2020-11-21 13:46:48 +00:00
|
|
|
ffi::gst_control_binding_get_g_value_array(
|
2020-06-09 01:06:49 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
2021-04-27 15:15:46 +00:00
|
|
|
timestamp.into_glib(),
|
|
|
|
interval.into_glib(),
|
2020-06-09 01:06:49 +00:00
|
|
|
n_values,
|
2020-11-21 13:46:48 +00:00
|
|
|
values.as_mut_ptr() as *mut glib::gobject_ffi::GValue,
|
2020-06-09 01:06:49 +00:00
|
|
|
),
|
|
|
|
"Failed to get value array"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|