mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 19:11:06 +00:00
abbc85c3d0
For all these traits only the implementation that already exists is possible. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
32 lines
1,022 B
Rust
32 lines
1,022 B
Rust
// Take a look at the license at the top of the repository in the LICENSE file.
|
|
|
|
use glib::{prelude::*, translate::*};
|
|
|
|
use crate::{ClockTime, ControlSource};
|
|
|
|
pub trait ControlSourceExtManual: IsA<ControlSource> + '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> {
|
|
let n_values = values.len() as u32;
|
|
unsafe {
|
|
glib::result_from_gboolean!(
|
|
crate::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"
|
|
)
|
|
}
|
|
}
|
|
}
|
|
|
|
impl<O: IsA<ControlSource>> ControlSourceExtManual for O {}
|