(
+ &self,
+ f: F,
+ ) -> SignalHandlerId {
+ unsafe extern "C" fn notify_mode_trampoline(
+ this: *mut gst_controller_sys::GstInterpolationControlSource,
+ _param_spec: glib_sys::gpointer,
+ f: glib_sys::gpointer,
+ ) where
+ P: IsA,
+ {
+ let f: &F = &*(f as *const F);
+ f(&InterpolationControlSource::from_glib_borrow(this).unsafe_cast_ref())
+ }
+ unsafe {
+ let f: Box_ = Box_::new(f);
+ connect_raw(
+ self.as_ptr() as *mut _,
+ b"notify::mode\0".as_ptr() as *const _,
+ Some(transmute::<_, unsafe extern "C" fn()>(
+ notify_mode_trampoline:: as *const (),
+ )),
+ Box_::into_raw(f),
+ )
+ }
+ }
+}
diff --git a/gstreamer-controller/src/auto/lfo_control_source.rs b/gstreamer-controller/src/auto/lfo_control_source.rs
new file mode 100644
index 000000000..422ea20ec
--- /dev/null
+++ b/gstreamer-controller/src/auto/lfo_control_source.rs
@@ -0,0 +1,356 @@
+// This file was generated by gir (https://github.com/gtk-rs/gir)
+// from gir-files (https://github.com/gtk-rs/gir-files)
+// DO NOT EDIT
+
+use glib::object::Cast;
+use glib::object::IsA;
+use glib::signal::connect_raw;
+use glib::signal::SignalHandlerId;
+use glib::translate::*;
+use glib::StaticType;
+use glib::Value;
+use glib_sys;
+use gobject_sys;
+use gst;
+use gst_controller_sys;
+use std::boxed::Box as Box_;
+use std::mem::transmute;
+use LFOWaveform;
+
+glib_wrapper! {
+ pub struct LFOControlSource(Object) @extends gst::ControlSource, gst::Object;
+
+ match fn {
+ get_type => || gst_controller_sys::gst_lfo_control_source_get_type(),
+ }
+}
+
+impl LFOControlSource {
+ pub fn new() -> LFOControlSource {
+ assert_initialized_main_thread!();
+ unsafe {
+ gst::ControlSource::from_glib_full(gst_controller_sys::gst_lfo_control_source_new())
+ .unsafe_cast()
+ }
+ }
+}
+
+impl Default for LFOControlSource {
+ fn default() -> Self {
+ Self::new()
+ }
+}
+
+unsafe impl Send for LFOControlSource {}
+unsafe impl Sync for LFOControlSource {}
+
+pub const NONE_LFO_CONTROL_SOURCE: Option<&LFOControlSource> = None;
+
+pub trait LFOControlSourceExt: 'static {
+ fn get_property_amplitude(&self) -> f64;
+
+ fn set_property_amplitude(&self, amplitude: f64);
+
+ fn get_property_frequency(&self) -> f64;
+
+ fn set_property_frequency(&self, frequency: f64);
+
+ fn get_property_offset(&self) -> f64;
+
+ fn set_property_offset(&self, offset: f64);
+
+ fn get_property_timeshift(&self) -> u64;
+
+ fn set_property_timeshift(&self, timeshift: u64);
+
+ fn get_property_waveform(&self) -> LFOWaveform;
+
+ fn set_property_waveform(&self, waveform: LFOWaveform);
+
+ fn connect_property_amplitude_notify(
+ &self,
+ f: F,
+ ) -> SignalHandlerId;
+
+ fn connect_property_frequency_notify(
+ &self,
+ f: F,
+ ) -> SignalHandlerId;
+
+ fn connect_property_offset_notify(
+ &self,
+ f: F,
+ ) -> SignalHandlerId;
+
+ fn connect_property_timeshift_notify(
+ &self,
+ f: F,
+ ) -> SignalHandlerId;
+
+ fn connect_property_waveform_notify(
+ &self,
+ f: F,
+ ) -> SignalHandlerId;
+}
+
+impl> LFOControlSourceExt for O {
+ fn get_property_amplitude(&self) -> f64 {
+ unsafe {
+ let mut value = Value::from_type(::static_type());
+ gobject_sys::g_object_get_property(
+ self.to_glib_none().0 as *mut gobject_sys::GObject,
+ b"amplitude\0".as_ptr() as *const _,
+ value.to_glib_none_mut().0,
+ );
+ value
+ .get()
+ .expect("Return Value for property `amplitude` getter")
+ .unwrap()
+ }
+ }
+
+ fn set_property_amplitude(&self, amplitude: f64) {
+ unsafe {
+ gobject_sys::g_object_set_property(
+ self.to_glib_none().0 as *mut gobject_sys::GObject,
+ b"amplitude\0".as_ptr() as *const _,
+ Value::from(&litude).to_glib_none().0,
+ );
+ }
+ }
+
+ fn get_property_frequency(&self) -> f64 {
+ unsafe {
+ let mut value = Value::from_type(::static_type());
+ gobject_sys::g_object_get_property(
+ self.to_glib_none().0 as *mut gobject_sys::GObject,
+ b"frequency\0".as_ptr() as *const _,
+ value.to_glib_none_mut().0,
+ );
+ value
+ .get()
+ .expect("Return Value for property `frequency` getter")
+ .unwrap()
+ }
+ }
+
+ fn set_property_frequency(&self, frequency: f64) {
+ unsafe {
+ gobject_sys::g_object_set_property(
+ self.to_glib_none().0 as *mut gobject_sys::GObject,
+ b"frequency\0".as_ptr() as *const _,
+ Value::from(&frequency).to_glib_none().0,
+ );
+ }
+ }
+
+ fn get_property_offset(&self) -> f64 {
+ unsafe {
+ let mut value = Value::from_type(::static_type());
+ gobject_sys::g_object_get_property(
+ self.to_glib_none().0 as *mut gobject_sys::GObject,
+ b"offset\0".as_ptr() as *const _,
+ value.to_glib_none_mut().0,
+ );
+ value
+ .get()
+ .expect("Return Value for property `offset` getter")
+ .unwrap()
+ }
+ }
+
+ fn set_property_offset(&self, offset: f64) {
+ unsafe {
+ gobject_sys::g_object_set_property(
+ self.to_glib_none().0 as *mut gobject_sys::GObject,
+ b"offset\0".as_ptr() as *const _,
+ Value::from(&offset).to_glib_none().0,
+ );
+ }
+ }
+
+ fn get_property_timeshift(&self) -> u64 {
+ unsafe {
+ let mut value = Value::from_type(::static_type());
+ gobject_sys::g_object_get_property(
+ self.to_glib_none().0 as *mut gobject_sys::GObject,
+ b"timeshift\0".as_ptr() as *const _,
+ value.to_glib_none_mut().0,
+ );
+ value
+ .get()
+ .expect("Return Value for property `timeshift` getter")
+ .unwrap()
+ }
+ }
+
+ fn set_property_timeshift(&self, timeshift: u64) {
+ unsafe {
+ gobject_sys::g_object_set_property(
+ self.to_glib_none().0 as *mut gobject_sys::GObject,
+ b"timeshift\0".as_ptr() as *const _,
+ Value::from(×hift).to_glib_none().0,
+ );
+ }
+ }
+
+ fn get_property_waveform(&self) -> LFOWaveform {
+ unsafe {
+ let mut value = Value::from_type(::static_type());
+ gobject_sys::g_object_get_property(
+ self.to_glib_none().0 as *mut gobject_sys::GObject,
+ b"waveform\0".as_ptr() as *const _,
+ value.to_glib_none_mut().0,
+ );
+ value
+ .get()
+ .expect("Return Value for property `waveform` getter")
+ .unwrap()
+ }
+ }
+
+ fn set_property_waveform(&self, waveform: LFOWaveform) {
+ unsafe {
+ gobject_sys::g_object_set_property(
+ self.to_glib_none().0 as *mut gobject_sys::GObject,
+ b"waveform\0".as_ptr() as *const _,
+ Value::from(&waveform).to_glib_none().0,
+ );
+ }
+ }
+
+ fn connect_property_amplitude_notify(
+ &self,
+ f: F,
+ ) -> SignalHandlerId {
+ unsafe extern "C" fn notify_amplitude_trampoline(
+ this: *mut gst_controller_sys::GstLFOControlSource,
+ _param_spec: glib_sys::gpointer,
+ f: glib_sys::gpointer,
+ ) where
+ P: IsA,
+ {
+ let f: &F = &*(f as *const F);
+ f(&LFOControlSource::from_glib_borrow(this).unsafe_cast_ref())
+ }
+ unsafe {
+ let f: Box_ = Box_::new(f);
+ connect_raw(
+ self.as_ptr() as *mut _,
+ b"notify::amplitude\0".as_ptr() as *const _,
+ Some(transmute::<_, unsafe extern "C" fn()>(
+ notify_amplitude_trampoline:: as *const (),
+ )),
+ Box_::into_raw(f),
+ )
+ }
+ }
+
+ fn connect_property_frequency_notify(
+ &self,
+ f: F,
+ ) -> SignalHandlerId {
+ unsafe extern "C" fn notify_frequency_trampoline(
+ this: *mut gst_controller_sys::GstLFOControlSource,
+ _param_spec: glib_sys::gpointer,
+ f: glib_sys::gpointer,
+ ) where
+ P: IsA,
+ {
+ let f: &F = &*(f as *const F);
+ f(&LFOControlSource::from_glib_borrow(this).unsafe_cast_ref())
+ }
+ unsafe {
+ let f: Box_ = Box_::new(f);
+ connect_raw(
+ self.as_ptr() as *mut _,
+ b"notify::frequency\0".as_ptr() as *const _,
+ Some(transmute::<_, unsafe extern "C" fn()>(
+ notify_frequency_trampoline:: as *const (),
+ )),
+ Box_::into_raw(f),
+ )
+ }
+ }
+
+ fn connect_property_offset_notify(
+ &self,
+ f: F,
+ ) -> SignalHandlerId {
+ unsafe extern "C" fn notify_offset_trampoline(
+ this: *mut gst_controller_sys::GstLFOControlSource,
+ _param_spec: glib_sys::gpointer,
+ f: glib_sys::gpointer,
+ ) where
+ P: IsA,
+ {
+ let f: &F = &*(f as *const F);
+ f(&LFOControlSource::from_glib_borrow(this).unsafe_cast_ref())
+ }
+ unsafe {
+ let f: Box_ = Box_::new(f);
+ connect_raw(
+ self.as_ptr() as *mut _,
+ b"notify::offset\0".as_ptr() as *const _,
+ Some(transmute::<_, unsafe extern "C" fn()>(
+ notify_offset_trampoline:: as *const (),
+ )),
+ Box_::into_raw(f),
+ )
+ }
+ }
+
+ fn connect_property_timeshift_notify(
+ &self,
+ f: F,
+ ) -> SignalHandlerId {
+ unsafe extern "C" fn notify_timeshift_trampoline(
+ this: *mut gst_controller_sys::GstLFOControlSource,
+ _param_spec: glib_sys::gpointer,
+ f: glib_sys::gpointer,
+ ) where
+ P: IsA,
+ {
+ let f: &F = &*(f as *const F);
+ f(&LFOControlSource::from_glib_borrow(this).unsafe_cast_ref())
+ }
+ unsafe {
+ let f: Box_ = Box_::new(f);
+ connect_raw(
+ self.as_ptr() as *mut _,
+ b"notify::timeshift\0".as_ptr() as *const _,
+ Some(transmute::<_, unsafe extern "C" fn()>(
+ notify_timeshift_trampoline:: as *const (),
+ )),
+ Box_::into_raw(f),
+ )
+ }
+ }
+
+ fn connect_property_waveform_notify(
+ &self,
+ f: F,
+ ) -> SignalHandlerId {
+ unsafe extern "C" fn notify_waveform_trampoline(
+ this: *mut gst_controller_sys::GstLFOControlSource,
+ _param_spec: glib_sys::gpointer,
+ f: glib_sys::gpointer,
+ ) where
+ P: IsA,
+ {
+ let f: &F = &*(f as *const F);
+ f(&LFOControlSource::from_glib_borrow(this).unsafe_cast_ref())
+ }
+ unsafe {
+ let f: Box_ = Box_::new(f);
+ connect_raw(
+ self.as_ptr() as *mut _,
+ b"notify::waveform\0".as_ptr() as *const _,
+ Some(transmute::<_, unsafe extern "C" fn()>(
+ notify_waveform_trampoline:: as *const (),
+ )),
+ Box_::into_raw(f),
+ )
+ }
+ }
+}
diff --git a/gstreamer-controller/src/auto/mod.rs b/gstreamer-controller/src/auto/mod.rs
new file mode 100644
index 000000000..c5797b8fd
--- /dev/null
+++ b/gstreamer-controller/src/auto/mod.rs
@@ -0,0 +1,60 @@
+// This file was generated by gir (https://github.com/gtk-rs/gir)
+// from gir-files (https://github.com/gtk-rs/gir-files)
+// DO NOT EDIT
+
+mod argb_control_binding;
+pub use self::argb_control_binding::ARGBControlBindingExt;
+pub use self::argb_control_binding::{
+ ARGBControlBinding, ARGBControlBindingClass, NONE_ARGB_CONTROL_BINDING,
+};
+
+mod direct_control_binding;
+pub use self::direct_control_binding::DirectControlBindingExt;
+pub use self::direct_control_binding::{
+ DirectControlBinding, DirectControlBindingClass, NONE_DIRECT_CONTROL_BINDING,
+};
+
+mod interpolation_control_source;
+pub use self::interpolation_control_source::InterpolationControlSourceExt;
+pub use self::interpolation_control_source::{
+ InterpolationControlSource, InterpolationControlSourceClass, NONE_INTERPOLATION_CONTROL_SOURCE,
+};
+
+mod lfo_control_source;
+pub use self::lfo_control_source::LFOControlSourceExt;
+pub use self::lfo_control_source::{
+ LFOControlSource, LFOControlSourceClass, NONE_LFO_CONTROL_SOURCE,
+};
+
+#[cfg(any(feature = "v1_12", feature = "dox"))]
+mod proxy_control_binding;
+#[cfg(any(feature = "v1_12", feature = "dox"))]
+pub use self::proxy_control_binding::{
+ ProxyControlBinding, ProxyControlBindingClass, NONE_PROXY_CONTROL_BINDING,
+};
+
+mod timed_value_control_source;
+pub use self::timed_value_control_source::TimedValueControlSourceExt;
+pub use self::timed_value_control_source::{
+ TimedValueControlSource, TimedValueControlSourceClass, NONE_TIMED_VALUE_CONTROL_SOURCE,
+};
+
+mod trigger_control_source;
+pub use self::trigger_control_source::TriggerControlSourceExt;
+pub use self::trigger_control_source::{
+ TriggerControlSource, TriggerControlSourceClass, NONE_TRIGGER_CONTROL_SOURCE,
+};
+
+mod enums;
+pub use self::enums::InterpolationMode;
+pub use self::enums::LFOWaveform;
+
+#[doc(hidden)]
+pub mod traits {
+ pub use super::ARGBControlBindingExt;
+ pub use super::DirectControlBindingExt;
+ pub use super::InterpolationControlSourceExt;
+ pub use super::LFOControlSourceExt;
+ pub use super::TimedValueControlSourceExt;
+ pub use super::TriggerControlSourceExt;
+}
diff --git a/gstreamer-controller/src/auto/proxy_control_binding.rs b/gstreamer-controller/src/auto/proxy_control_binding.rs
new file mode 100644
index 000000000..49034d6ca
--- /dev/null
+++ b/gstreamer-controller/src/auto/proxy_control_binding.rs
@@ -0,0 +1,45 @@
+// This file was generated by gir (https://github.com/gtk-rs/gir)
+// from gir-files (https://github.com/gtk-rs/gir-files)
+// DO NOT EDIT
+
+#[cfg(any(feature = "v1_12", feature = "dox"))]
+use glib::object::Cast;
+#[cfg(any(feature = "v1_12", feature = "dox"))]
+use glib::object::IsA;
+use glib::translate::*;
+use gst;
+use gst_controller_sys;
+
+glib_wrapper! {
+ pub struct ProxyControlBinding(Object) @extends gst::ControlBinding, gst::Object;
+
+ match fn {
+ get_type => || gst_controller_sys::gst_proxy_control_binding_get_type(),
+ }
+}
+
+impl ProxyControlBinding {
+ #[cfg(any(feature = "v1_12", feature = "dox"))]
+ pub fn new, Q: IsA>(
+ object: &P,
+ property_name: &str,
+ ref_object: &Q,
+ ref_property_name: &str,
+ ) -> ProxyControlBinding {
+ assert_initialized_main_thread!();
+ unsafe {
+ gst::ControlBinding::from_glib_none(gst_controller_sys::gst_proxy_control_binding_new(
+ object.as_ref().to_glib_none().0,
+ property_name.to_glib_none().0,
+ ref_object.as_ref().to_glib_none().0,
+ ref_property_name.to_glib_none().0,
+ ))
+ .unsafe_cast()
+ }
+ }
+}
+
+unsafe impl Send for ProxyControlBinding {}
+unsafe impl Sync for ProxyControlBinding {}
+
+pub const NONE_PROXY_CONTROL_BINDING: Option<&ProxyControlBinding> = None;
diff --git a/gstreamer-controller/src/auto/timed_value_control_source.rs b/gstreamer-controller/src/auto/timed_value_control_source.rs
new file mode 100644
index 000000000..a950d515b
--- /dev/null
+++ b/gstreamer-controller/src/auto/timed_value_control_source.rs
@@ -0,0 +1,207 @@
+// This file was generated by gir (https://github.com/gtk-rs/gir)
+// from gir-files (https://github.com/gtk-rs/gir-files)
+// DO NOT EDIT
+
+use glib::object::Cast;
+use glib::object::IsA;
+use glib::signal::connect_raw;
+use glib::signal::SignalHandlerId;
+use glib::translate::*;
+use glib_sys;
+use gst;
+use gst_controller_sys;
+use std::boxed::Box as Box_;
+use std::mem::transmute;
+use ControlPoint;
+
+glib_wrapper! {
+ pub struct TimedValueControlSource(Object) @extends gst::ControlSource, gst::Object;
+
+ match fn {
+ get_type => || gst_controller_sys::gst_timed_value_control_source_get_type(),
+ }
+}
+
+unsafe impl Send for TimedValueControlSource {}
+unsafe impl Sync for TimedValueControlSource {}
+
+pub const NONE_TIMED_VALUE_CONTROL_SOURCE: Option<&TimedValueControlSource> = None;
+
+pub trait TimedValueControlSourceExt: 'static {
+ //fn find_control_point_iter(&self, timestamp: gst::ClockTime) -> /*Ignored*/Option;
+
+ //fn get_all(&self) -> /*Ignored*/Vec;
+
+ fn get_count(&self) -> i32;
+
+ fn set(&self, timestamp: gst::ClockTime, value: f64) -> bool;
+
+ //fn set_from_list(&self, timedvalues: /*Ignored*/&[&gst::TimedValue]) -> bool;
+
+ fn unset(&self, timestamp: gst::ClockTime) -> bool;
+
+ fn unset_all(&self);
+
+ fn connect_value_added(
+ &self,
+ f: F,
+ ) -> SignalHandlerId;
+
+ fn connect_value_changed(
+ &self,
+ f: F,
+ ) -> SignalHandlerId;
+
+ fn connect_value_removed(
+ &self,
+ f: F,
+ ) -> SignalHandlerId;
+}
+
+impl> TimedValueControlSourceExt for O {
+ //fn find_control_point_iter(&self, timestamp: gst::ClockTime) -> /*Ignored*/Option {
+ // unsafe { TODO: call gst_controller_sys:gst_timed_value_control_source_find_control_point_iter() }
+ //}
+
+ //fn get_all(&self) -> /*Ignored*/Vec {
+ // unsafe { TODO: call gst_controller_sys:gst_timed_value_control_source_get_all() }
+ //}
+
+ fn get_count(&self) -> i32 {
+ unsafe {
+ gst_controller_sys::gst_timed_value_control_source_get_count(
+ self.as_ref().to_glib_none().0,
+ )
+ }
+ }
+
+ fn set(&self, timestamp: gst::ClockTime, value: f64) -> bool {
+ unsafe {
+ from_glib(gst_controller_sys::gst_timed_value_control_source_set(
+ self.as_ref().to_glib_none().0,
+ timestamp.to_glib(),
+ value,
+ ))
+ }
+ }
+
+ //fn set_from_list(&self, timedvalues: /*Ignored*/&[&gst::TimedValue]) -> bool {
+ // unsafe { TODO: call gst_controller_sys:gst_timed_value_control_source_set_from_list() }
+ //}
+
+ fn unset(&self, timestamp: gst::ClockTime) -> bool {
+ unsafe {
+ from_glib(gst_controller_sys::gst_timed_value_control_source_unset(
+ self.as_ref().to_glib_none().0,
+ timestamp.to_glib(),
+ ))
+ }
+ }
+
+ fn unset_all(&self) {
+ unsafe {
+ gst_controller_sys::gst_timed_value_control_source_unset_all(
+ self.as_ref().to_glib_none().0,
+ );
+ }
+ }
+
+ fn connect_value_added(
+ &self,
+ f: F,
+ ) -> SignalHandlerId {
+ unsafe extern "C" fn value_added_trampoline<
+ P,
+ F: Fn(&P, &ControlPoint) + Send + Sync + 'static,
+ >(
+ this: *mut gst_controller_sys::GstTimedValueControlSource,
+ timed_value: *mut gst_controller_sys::GstControlPoint,
+ f: glib_sys::gpointer,
+ ) where
+ P: IsA,
+ {
+ let f: &F = &*(f as *const F);
+ f(
+ &TimedValueControlSource::from_glib_borrow(this).unsafe_cast_ref(),
+ &from_glib_borrow(timed_value),
+ )
+ }
+ unsafe {
+ let f: Box_ = Box_::new(f);
+ connect_raw(
+ self.as_ptr() as *mut _,
+ b"value-added\0".as_ptr() as *const _,
+ Some(transmute::<_, unsafe extern "C" fn()>(
+ value_added_trampoline:: as *const (),
+ )),
+ Box_::into_raw(f),
+ )
+ }
+ }
+
+ fn connect_value_changed(
+ &self,
+ f: F,
+ ) -> SignalHandlerId {
+ unsafe extern "C" fn value_changed_trampoline<
+ P,
+ F: Fn(&P, &ControlPoint) + Send + Sync + 'static,
+ >(
+ this: *mut gst_controller_sys::GstTimedValueControlSource,
+ timed_value: *mut gst_controller_sys::GstControlPoint,
+ f: glib_sys::gpointer,
+ ) where
+ P: IsA,
+ {
+ let f: &F = &*(f as *const F);
+ f(
+ &TimedValueControlSource::from_glib_borrow(this).unsafe_cast_ref(),
+ &from_glib_borrow(timed_value),
+ )
+ }
+ unsafe {
+ let f: Box_ = Box_::new(f);
+ connect_raw(
+ self.as_ptr() as *mut _,
+ b"value-changed\0".as_ptr() as *const _,
+ Some(transmute::<_, unsafe extern "C" fn()>(
+ value_changed_trampoline:: as *const (),
+ )),
+ Box_::into_raw(f),
+ )
+ }
+ }
+
+ fn connect_value_removed(
+ &self,
+ f: F,
+ ) -> SignalHandlerId {
+ unsafe extern "C" fn value_removed_trampoline<
+ P,
+ F: Fn(&P, &ControlPoint) + Send + Sync + 'static,
+ >(
+ this: *mut gst_controller_sys::GstTimedValueControlSource,
+ timed_value: *mut gst_controller_sys::GstControlPoint,
+ f: glib_sys::gpointer,
+ ) where
+ P: IsA,
+ {
+ let f: &F = &*(f as *const F);
+ f(
+ &TimedValueControlSource::from_glib_borrow(this).unsafe_cast_ref(),
+ &from_glib_borrow(timed_value),
+ )
+ }
+ unsafe {
+ let f: Box_ = Box_::new(f);
+ connect_raw(
+ self.as_ptr() as *mut _,
+ b"value-removed\0".as_ptr() as *const _,
+ Some(transmute::<_, unsafe extern "C" fn()>(
+ value_removed_trampoline:: as *const (),
+ )),
+ Box_::into_raw(f),
+ )
+ }
+ }
+}
diff --git a/gstreamer-controller/src/auto/trigger_control_source.rs b/gstreamer-controller/src/auto/trigger_control_source.rs
new file mode 100644
index 000000000..c09f362a3
--- /dev/null
+++ b/gstreamer-controller/src/auto/trigger_control_source.rs
@@ -0,0 +1,112 @@
+// This file was generated by gir (https://github.com/gtk-rs/gir)
+// from gir-files (https://github.com/gtk-rs/gir-files)
+// DO NOT EDIT
+
+use glib::object::Cast;
+use glib::object::IsA;
+use glib::signal::connect_raw;
+use glib::signal::SignalHandlerId;
+use glib::translate::*;
+use glib::StaticType;
+use glib::Value;
+use glib_sys;
+use gobject_sys;
+use gst;
+use gst_controller_sys;
+use std::boxed::Box as Box_;
+use std::mem::transmute;
+use TimedValueControlSource;
+
+glib_wrapper! {
+ pub struct TriggerControlSource(Object) @extends TimedValueControlSource, gst::ControlSource, gst::Object;
+
+ match fn {
+ get_type => || gst_controller_sys::gst_trigger_control_source_get_type(),
+ }
+}
+
+impl TriggerControlSource {
+ pub fn new() -> TriggerControlSource {
+ assert_initialized_main_thread!();
+ unsafe {
+ gst::ControlSource::from_glib_full(gst_controller_sys::gst_trigger_control_source_new())
+ .unsafe_cast()
+ }
+ }
+}
+
+impl Default for TriggerControlSource {
+ fn default() -> Self {
+ Self::new()
+ }
+}
+
+unsafe impl Send for TriggerControlSource {}
+unsafe impl Sync for TriggerControlSource {}
+
+pub const NONE_TRIGGER_CONTROL_SOURCE: Option<&TriggerControlSource> = None;
+
+pub trait TriggerControlSourceExt: 'static {
+ fn get_property_tolerance(&self) -> i64;
+
+ fn set_property_tolerance(&self, tolerance: i64);
+
+ fn connect_property_tolerance_notify(
+ &self,
+ f: F,
+ ) -> SignalHandlerId;
+}
+
+impl> TriggerControlSourceExt for O {
+ fn get_property_tolerance(&self) -> i64 {
+ unsafe {
+ let mut value = Value::from_type(::static_type());
+ gobject_sys::g_object_get_property(
+ self.to_glib_none().0 as *mut gobject_sys::GObject,
+ b"tolerance\0".as_ptr() as *const _,
+ value.to_glib_none_mut().0,
+ );
+ value
+ .get()
+ .expect("Return Value for property `tolerance` getter")
+ .unwrap()
+ }
+ }
+
+ fn set_property_tolerance(&self, tolerance: i64) {
+ unsafe {
+ gobject_sys::g_object_set_property(
+ self.to_glib_none().0 as *mut gobject_sys::GObject,
+ b"tolerance\0".as_ptr() as *const _,
+ Value::from(&tolerance).to_glib_none().0,
+ );
+ }
+ }
+
+ fn connect_property_tolerance_notify(
+ &self,
+ f: F,
+ ) -> SignalHandlerId {
+ unsafe extern "C" fn notify_tolerance_trampoline(
+ this: *mut gst_controller_sys::GstTriggerControlSource,
+ _param_spec: glib_sys::gpointer,
+ f: glib_sys::gpointer,
+ ) where
+ P: IsA,
+ {
+ let f: &F = &*(f as *const F);
+ f(&TriggerControlSource::from_glib_borrow(this).unsafe_cast_ref())
+ }
+ unsafe {
+ let f: Box_ = Box_::new(f);
+ connect_raw(
+ self.as_ptr() as *mut _,
+ b"notify::tolerance\0".as_ptr() as *const _,
+ Some(transmute::<_, unsafe extern "C" fn()>(
+ notify_tolerance_trampoline:: as *const (),
+ )),
+ Box_::into_raw(f),
+ )
+ }
+ }
+}
diff --git a/gstreamer-controller/src/auto/versions.txt b/gstreamer-controller/src/auto/versions.txt
new file mode 100644
index 000000000..58b27f3ac
--- /dev/null
+++ b/gstreamer-controller/src/auto/versions.txt
@@ -0,0 +1,2 @@
+Generated by gir (https://github.com/gtk-rs/gir @ a6737c7)
+from gir-files (https://github.com/gtk-rs/gir-files @ f9bc6779)
diff --git a/gstreamer-controller/src/control_point.rs b/gstreamer-controller/src/control_point.rs
new file mode 100644
index 000000000..772f9b2b8
--- /dev/null
+++ b/gstreamer-controller/src/control_point.rs
@@ -0,0 +1,32 @@
+use glib::translate::*;
+use gst_controller_sys;
+
+glib_wrapper! {
+ #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
+ pub struct ControlPoint(Boxed);
+
+ match fn {
+ copy => |ptr| gst_controller_sys::gst_control_point_copy(mut_override(ptr)),
+ free => |ptr| gst_controller_sys::gst_control_point_free(ptr),
+ get_type => || gst_controller_sys::gst_control_point_get_type(),
+ }
+}
+
+impl ControlPoint {
+ pub fn timestamp(&self) -> gst::ClockTime {
+ unsafe {
+ let ptr = self.to_glib_none().0;
+ from_glib((*ptr).timestamp)
+ }
+ }
+
+ pub fn value(&self) -> f64 {
+ unsafe {
+ let ptr = self.to_glib_none().0;
+ (*ptr).value
+ }
+ }
+}
+
+unsafe impl Send for ControlPoint {}
+unsafe impl Sync for ControlPoint {}
diff --git a/gstreamer-controller/src/lib.rs b/gstreamer-controller/src/lib.rs
new file mode 100644
index 000000000..3a4f85ce0
--- /dev/null
+++ b/gstreamer-controller/src/lib.rs
@@ -0,0 +1,32 @@
+#[macro_use]
+extern crate glib;
+extern crate glib_sys;
+extern crate gobject_sys;
+extern crate gstreamer as gst;
+extern crate gstreamer_sys as gst_sys;
+
+extern crate gstreamer_controller_sys as gst_controller_sys;
+
+macro_rules! assert_initialized_main_thread {
+ () => {
+ if unsafe { ::gst_sys::gst_is_initialized() } != ::glib_sys::GTRUE {
+ panic!("GStreamer has not been initialized. Call `gst::init` first.");
+ }
+ };
+}
+
+macro_rules! skip_assert_initialized {
+ () => {};
+}
+
+#[allow(clippy::unreadable_literal)]
+#[allow(clippy::too_many_arguments)]
+#[allow(clippy::match_same_arms)]
+mod auto;
+mod control_point;
+pub use auto::*;
+use control_point::*;
+
+pub mod prelude {
+ pub use auto::traits::*;
+}
diff --git a/gstreamer/src/auto/child_proxy.rs b/gstreamer/src/auto/child_proxy.rs
index aa8ec552a..a4f0f52c6 100644
--- a/gstreamer/src/auto/child_proxy.rs
+++ b/gstreamer/src/auto/child_proxy.rs
@@ -42,16 +42,12 @@ pub trait ChildProxyExt: 'static {
fn get_children_count(&self) -> u32;
- //fn get_property(&self, name: &str, value: /*Ignored*/glib::Value);
-
//fn get_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported);
//fn lookup(&self, name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option;
//fn set(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs);
- //fn set_property(&self, name: &str, value: /*Ignored*/&glib::Value);
-
//fn set_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported);
fn connect_child_added(
@@ -112,10 +108,6 @@ impl> ChildProxyExt for O {
unsafe { gst_sys::gst_child_proxy_get_children_count(self.as_ref().to_glib_none().0) }
}
- //fn get_property(&self, name: &str, value: /*Ignored*/glib::Value) {
- // unsafe { TODO: call gst_sys:gst_child_proxy_get_property() }
- //}
-
//fn get_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) {
// unsafe { TODO: call gst_sys:gst_child_proxy_get_valist() }
//}
@@ -128,10 +120,6 @@ impl> ChildProxyExt for O {
// unsafe { TODO: call gst_sys:gst_child_proxy_set() }
//}
- //fn set_property(&self, name: &str, value: /*Ignored*/&glib::Value) {
- // unsafe { TODO: call gst_sys:gst_child_proxy_set_property() }
- //}
-
//fn set_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) {
// unsafe { TODO: call gst_sys:gst_child_proxy_set_valist() }
//}
diff --git a/gstreamer/src/auto/control_binding.rs b/gstreamer/src/auto/control_binding.rs
new file mode 100644
index 000000000..68a7f02ca
--- /dev/null
+++ b/gstreamer/src/auto/control_binding.rs
@@ -0,0 +1,107 @@
+// This file was generated by gir (https://github.com/gtk-rs/gir)
+// from gir-files (https://github.com/gtk-rs/gir-files)
+// DO NOT EDIT
+
+use glib;
+use glib::object::IsA;
+use glib::translate::*;
+use glib::StaticType;
+use glib::Value;
+use gobject_sys;
+use gst_sys;
+use ClockTime;
+use Object;
+
+glib_wrapper! {
+ pub struct ControlBinding(Object) @extends Object;
+
+ match fn {
+ get_type => || gst_sys::gst_control_binding_get_type(),
+ }
+}
+
+unsafe impl Send for ControlBinding {}
+unsafe impl Sync for ControlBinding {}
+
+pub const NONE_CONTROL_BINDING: Option<&ControlBinding> = None;
+
+pub trait ControlBindingExt: 'static {
+ fn get_value(&self, timestamp: ClockTime) -> Option;
+
+ //fn get_value_array(&self, timestamp: ClockTime, interval: ClockTime, values: /*Unimplemented*/&[&Fundamental: Pointer]) -> bool;
+
+ fn is_disabled(&self) -> bool;
+
+ fn set_disabled(&self, disabled: bool);
+
+ fn sync_values>(
+ &self,
+ object: &P,
+ timestamp: ClockTime,
+ last_sync: ClockTime,
+ ) -> bool;
+
+ fn get_property_object(&self) -> Option