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)
|
2021-04-01 13:58:41 +00:00
|
|
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
2020-06-09 01:06:49 +00:00
|
|
|
// DO NOT EDIT
|
|
|
|
|
2020-11-21 13:46:33 +00:00
|
|
|
use crate::ClockTime;
|
|
|
|
use crate::Object;
|
2020-06-09 01:06:49 +00:00
|
|
|
use glib::object::IsA;
|
|
|
|
use glib::translate::*;
|
|
|
|
use glib::StaticType;
|
|
|
|
|
2020-12-17 22:34:53 +00:00
|
|
|
glib::wrapper! {
|
2021-06-02 07:47:51 +00:00
|
|
|
#[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 {
|
2021-04-19 19:55:01 +00:00
|
|
|
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")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[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")]
|
2021-05-03 18:35:37 +00:00
|
|
|
//#[doc(alias = "get_value_array")]
|
2021-04-05 10:48:30 +00:00
|
|
|
//fn is_value_array(&self, timestamp: impl Into<Option<ClockTime>>, interval: impl Into<Option<ClockTime>>, values: /*Unimplemented*/&[&Fundamental: 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")]
|
2021-05-23 19:22:45 +00:00
|
|
|
fn sync_values(
|
2020-06-09 01:06:49 +00:00
|
|
|
&self,
|
2021-05-23 19:22:45 +00:00
|
|
|
object: &impl IsA<Object>,
|
2020-06-09 01:06:49 +00:00
|
|
|
timestamp: ClockTime,
|
2021-04-05 10:48:30 +00:00
|
|
|
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,
|
2021-04-27 15:10:39 +00:00
|
|
|
timestamp.into_glib(),
|
2020-06-09 01:06:49 +00:00
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-05 10:48:30 +00:00
|
|
|
//fn is_value_array(&self, timestamp: impl Into<Option<ClockTime>>, interval: impl Into<Option<ClockTime>>, values: /*Unimplemented*/&[&Fundamental: 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,
|
2021-04-27 15:10:39 +00:00
|
|
|
disabled.into_glib(),
|
2020-06-09 01:06:49 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-23 19:22:45 +00:00
|
|
|
fn sync_values(
|
2020-06-09 01:06:49 +00:00
|
|
|
&self,
|
2021-05-23 19:22:45 +00:00
|
|
|
object: &impl IsA<Object>,
|
2020-06-09 01:06:49 +00:00
|
|
|
timestamp: ClockTime,
|
2021-04-05 10:48:30 +00:00
|
|
|
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,
|
2021-04-27 15:10:39 +00:00
|
|
|
timestamp.into_glib(),
|
2021-04-05 10:48:30 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|