forked from mirrors/gstreamer-rs
540062b97c
Using the same script as [1], called with: python3 add_doc_alias.py gstreamer*/**/src [1]: https://github.com/gtk-rs/gtk-rs-core/pull/83
40 lines
1.2 KiB
Rust
40 lines
1.2 KiB
Rust
// Take a look at the license at the top of the repository in the LICENSE file.
|
|
|
|
use crate::ClockTime;
|
|
use crate::ControlSource;
|
|
use glib::prelude::*;
|
|
use glib::translate::*;
|
|
|
|
pub trait ControlSourceExtManual: 'static {
|
|
#[doc(alias = "get_value_array")]
|
|
#[doc(alias = "gst_control_source_get_value_array")]
|
|
fn value_array(
|
|
&self,
|
|
timestamp: ClockTime,
|
|
interval: ClockTime,
|
|
values: &mut [f64],
|
|
) -> Result<(), glib::error::BoolError>;
|
|
}
|
|
|
|
impl<O: IsA<ControlSource>> ControlSourceExtManual for O {
|
|
fn value_array(
|
|
&self,
|
|
timestamp: ClockTime,
|
|
interval: ClockTime,
|
|
values: &mut [f64],
|
|
) -> Result<(), glib::error::BoolError> {
|
|
let n_values = values.len() as u32;
|
|
unsafe {
|
|
glib::result_from_gboolean!(
|
|
ffi::gst_control_source_get_value_array(
|
|
self.as_ref().to_glib_none().0,
|
|
timestamp.into_glib(),
|
|
interval.into_glib(),
|
|
n_values,
|
|
values.to_glib_none().0,
|
|
),
|
|
"Failed to get value array"
|
|
)
|
|
}
|
|
}
|
|
}
|