gstreamer-rs/gstreamer/src/auto/control_binding.rs

102 lines
3.1 KiB
Rust
Raw Normal View History

2020-06-09 01:06:49 +00:00
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
2020-06-09 01:06:49 +00:00
// DO NOT EDIT
use crate::{ClockTime, Object};
use glib::{prelude::*, translate::*};
2020-06-09 01:06:49 +00:00
2020-12-17 22:34:53 +00:00
glib::wrapper! {
#[doc(alias = "GstControlBinding")]
2020-11-21 13:46:33 +00:00
pub struct ControlBinding(Object<ffi::GstControlBinding, ffi::GstControlBindingClass>) @extends Object;
2020-06-09 01:06:49 +00:00
match fn {
type_ => || ffi::gst_control_binding_get_type(),
2020-06-09 01:06:49 +00:00
}
}
2021-11-03 17:28:46 +00:00
impl ControlBinding {
pub const NONE: Option<&'static ControlBinding> = None;
}
2020-06-09 01:06:49 +00:00
2021-11-16 14:02:58 +00:00
unsafe impl Send for ControlBinding {}
unsafe impl Sync for ControlBinding {}
2020-06-09 01:06:49 +00:00
pub trait ControlBindingExt: 'static {
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_control_binding_get_value")]
#[doc(alias = "get_value")]
2021-04-19 20:13:58 +00:00
fn value(&self, timestamp: ClockTime) -> Option<glib::Value>;
2020-06-09 01:06:49 +00:00
2020-12-08 13:00:17 +00:00
//#[doc(alias = "gst_control_binding_get_value_array")]
//#[doc(alias = "get_value_array")]
2022-06-30 05:22:05 +00:00
//fn is_value_array(&self, timestamp: impl Into<Option<ClockTime>>, interval: impl Into<Option<ClockTime>>, values: /*Unimplemented*/&[&Basic: Pointer]) -> bool;
2020-06-09 01:06:49 +00:00
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_control_binding_is_disabled")]
2020-06-09 01:06:49 +00:00
fn is_disabled(&self) -> bool;
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_control_binding_set_disabled")]
2020-06-09 01:06:49 +00:00
fn set_disabled(&self, disabled: bool);
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_control_binding_sync_values")]
fn sync_values(
2020-06-09 01:06:49 +00:00
&self,
object: &impl IsA<Object>,
2020-06-09 01:06:49 +00:00
timestamp: ClockTime,
last_sync: impl Into<Option<ClockTime>>,
2020-06-09 01:06:49 +00:00
) -> bool;
2021-04-11 19:38:18 +00:00
fn object(&self) -> Option<Object>;
2020-06-09 01:06:49 +00:00
}
impl<O: IsA<ControlBinding>> ControlBindingExt for O {
2021-04-19 20:13:58 +00:00
fn value(&self, timestamp: ClockTime) -> Option<glib::Value> {
2020-06-09 01:06:49 +00:00
unsafe {
2020-11-21 13:46:33 +00:00
from_glib_full(ffi::gst_control_binding_get_value(
2020-06-09 01:06:49 +00:00
self.as_ref().to_glib_none().0,
timestamp.into_glib(),
2020-06-09 01:06:49 +00:00
))
}
}
2022-06-30 05:22:05 +00:00
//fn is_value_array(&self, timestamp: impl Into<Option<ClockTime>>, interval: impl Into<Option<ClockTime>>, values: /*Unimplemented*/&[&Basic: Pointer]) -> bool {
2020-11-21 13:46:33 +00:00
// unsafe { TODO: call ffi:gst_control_binding_get_value_array() }
2020-06-09 01:06:49 +00:00
//}
fn is_disabled(&self) -> bool {
unsafe {
2020-11-21 13:46:33 +00:00
from_glib(ffi::gst_control_binding_is_disabled(
2020-06-09 01:06:49 +00:00
self.as_ref().to_glib_none().0,
))
}
}
fn set_disabled(&self, disabled: bool) {
unsafe {
2020-11-21 13:46:33 +00:00
ffi::gst_control_binding_set_disabled(
2020-06-09 01:06:49 +00:00
self.as_ref().to_glib_none().0,
disabled.into_glib(),
2020-06-09 01:06:49 +00:00
);
}
}
fn sync_values(
2020-06-09 01:06:49 +00:00
&self,
object: &impl IsA<Object>,
2020-06-09 01:06:49 +00:00
timestamp: ClockTime,
last_sync: impl Into<Option<ClockTime>>,
2020-06-09 01:06:49 +00:00
) -> bool {
unsafe {
2020-11-21 13:46:33 +00:00
from_glib(ffi::gst_control_binding_sync_values(
2020-06-09 01:06:49 +00:00
self.as_ref().to_glib_none().0,
object.as_ref().to_glib_none().0,
timestamp.into_glib(),
last_sync.into().into_glib(),
2020-06-09 01:06:49 +00:00
))
}
}
2021-04-11 19:38:18 +00:00
fn object(&self) -> Option<Object> {
2021-11-06 17:31:52 +00:00
glib::ObjectExt::property(self.as_ref(), "object")
2020-06-09 01:06:49 +00:00
}
}