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 18:48:08 +00:00
|
|
|
use crate::ControlPoint;
|
2020-06-09 01:06:49 +00:00
|
|
|
use glib::object::Cast;
|
|
|
|
use glib::object::IsA;
|
|
|
|
use glib::signal::connect_raw;
|
|
|
|
use glib::signal::SignalHandlerId;
|
|
|
|
use glib::translate::*;
|
|
|
|
use std::boxed::Box as Box_;
|
|
|
|
use std::mem::transmute;
|
|
|
|
|
2020-12-17 22:34:53 +00:00
|
|
|
glib::wrapper! {
|
2020-11-21 18:48:08 +00:00
|
|
|
pub struct TimedValueControlSource(Object<ffi::GstTimedValueControlSource, ffi::GstTimedValueControlSourceClass>) @extends gst::ControlSource, gst::Object;
|
2020-06-09 01:06:49 +00:00
|
|
|
|
|
|
|
match fn {
|
2021-04-19 19:55:01 +00:00
|
|
|
type_ => || ffi::gst_timed_value_control_source_get_type(),
|
2020-06-09 01:06:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
unsafe impl Send for TimedValueControlSource {}
|
|
|
|
unsafe impl Sync for TimedValueControlSource {}
|
|
|
|
|
|
|
|
pub const NONE_TIMED_VALUE_CONTROL_SOURCE: Option<&TimedValueControlSource> = None;
|
|
|
|
|
|
|
|
pub trait TimedValueControlSourceExt: 'static {
|
2020-12-08 13:00:17 +00:00
|
|
|
//#[doc(alias = "gst_timed_value_control_source_find_control_point_iter")]
|
2020-06-09 01:06:49 +00:00
|
|
|
//fn find_control_point_iter(&self, timestamp: gst::ClockTime) -> /*Ignored*/Option<glib::SequenceIter>;
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
//#[doc(alias = "gst_timed_value_control_source_get_all")]
|
2021-05-03 18:35:37 +00:00
|
|
|
//#[doc(alias = "get_all")]
|
2021-04-11 19:38:18 +00:00
|
|
|
//fn all(&self) -> /*Ignored*/Vec<gst::TimedValue>;
|
2020-06-09 01:06:49 +00:00
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_timed_value_control_source_get_count")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_count")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn count(&self) -> i32;
|
2020-06-09 01:06:49 +00:00
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_timed_value_control_source_set")]
|
2020-06-09 01:06:49 +00:00
|
|
|
fn set(&self, timestamp: gst::ClockTime, value: f64) -> bool;
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
//#[doc(alias = "gst_timed_value_control_source_set_from_list")]
|
2020-06-09 01:06:49 +00:00
|
|
|
//fn set_from_list(&self, timedvalues: /*Ignored*/&[&gst::TimedValue]) -> bool;
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_timed_value_control_source_unset")]
|
2020-06-09 01:06:49 +00:00
|
|
|
fn unset(&self, timestamp: gst::ClockTime) -> bool;
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_timed_value_control_source_unset_all")]
|
2020-06-09 01:06:49 +00:00
|
|
|
fn unset_all(&self);
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "value-added")]
|
2020-06-09 01:06:49 +00:00
|
|
|
fn connect_value_added<F: Fn(&Self, &ControlPoint) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "value-changed")]
|
2020-06-09 01:06:49 +00:00
|
|
|
fn connect_value_changed<F: Fn(&Self, &ControlPoint) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "value-removed")]
|
2020-06-09 01:06:49 +00:00
|
|
|
fn connect_value_removed<F: Fn(&Self, &ControlPoint) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<O: IsA<TimedValueControlSource>> TimedValueControlSourceExt for O {
|
|
|
|
//fn find_control_point_iter(&self, timestamp: gst::ClockTime) -> /*Ignored*/Option<glib::SequenceIter> {
|
2020-11-21 18:48:08 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_timed_value_control_source_find_control_point_iter() }
|
2020-06-09 01:06:49 +00:00
|
|
|
//}
|
|
|
|
|
2021-04-11 19:38:18 +00:00
|
|
|
//fn all(&self) -> /*Ignored*/Vec<gst::TimedValue> {
|
2020-11-21 18:48:08 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_timed_value_control_source_get_all() }
|
2020-06-09 01:06:49 +00:00
|
|
|
//}
|
|
|
|
|
2021-04-11 19:38:18 +00:00
|
|
|
fn count(&self) -> i32 {
|
2020-11-21 18:48:08 +00:00
|
|
|
unsafe { ffi::gst_timed_value_control_source_get_count(self.as_ref().to_glib_none().0) }
|
2020-06-09 01:06:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn set(&self, timestamp: gst::ClockTime, value: f64) -> bool {
|
|
|
|
unsafe {
|
2020-11-21 18:48:08 +00:00
|
|
|
from_glib(ffi::gst_timed_value_control_source_set(
|
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
|
|
|
value,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//fn set_from_list(&self, timedvalues: /*Ignored*/&[&gst::TimedValue]) -> bool {
|
2020-11-21 18:48:08 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_timed_value_control_source_set_from_list() }
|
2020-06-09 01:06:49 +00:00
|
|
|
//}
|
|
|
|
|
|
|
|
fn unset(&self, timestamp: gst::ClockTime) -> bool {
|
|
|
|
unsafe {
|
2020-11-21 18:48:08 +00:00
|
|
|
from_glib(ffi::gst_timed_value_control_source_unset(
|
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
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn unset_all(&self) {
|
|
|
|
unsafe {
|
2020-11-21 18:48:08 +00:00
|
|
|
ffi::gst_timed_value_control_source_unset_all(self.as_ref().to_glib_none().0);
|
2020-06-09 01:06:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "value-added")]
|
2020-06-09 01:06:49 +00:00
|
|
|
fn connect_value_added<F: Fn(&Self, &ControlPoint) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn value_added_trampoline<
|
|
|
|
P,
|
|
|
|
F: Fn(&P, &ControlPoint) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-21 18:48:08 +00:00
|
|
|
this: *mut ffi::GstTimedValueControlSource,
|
|
|
|
timed_value: *mut ffi::GstControlPoint,
|
|
|
|
f: glib::ffi::gpointer,
|
2020-06-09 01:06:49 +00:00
|
|
|
) where
|
|
|
|
P: IsA<TimedValueControlSource>,
|
|
|
|
{
|
|
|
|
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_<F> = 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::<Self, F> as *const (),
|
|
|
|
)),
|
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "value-changed")]
|
2020-06-09 01:06:49 +00:00
|
|
|
fn connect_value_changed<F: Fn(&Self, &ControlPoint) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn value_changed_trampoline<
|
|
|
|
P,
|
|
|
|
F: Fn(&P, &ControlPoint) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-21 18:48:08 +00:00
|
|
|
this: *mut ffi::GstTimedValueControlSource,
|
|
|
|
timed_value: *mut ffi::GstControlPoint,
|
|
|
|
f: glib::ffi::gpointer,
|
2020-06-09 01:06:49 +00:00
|
|
|
) where
|
|
|
|
P: IsA<TimedValueControlSource>,
|
|
|
|
{
|
|
|
|
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_<F> = 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::<Self, F> as *const (),
|
|
|
|
)),
|
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "value-removed")]
|
2020-06-09 01:06:49 +00:00
|
|
|
fn connect_value_removed<F: Fn(&Self, &ControlPoint) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn value_removed_trampoline<
|
|
|
|
P,
|
|
|
|
F: Fn(&P, &ControlPoint) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-21 18:48:08 +00:00
|
|
|
this: *mut ffi::GstTimedValueControlSource,
|
|
|
|
timed_value: *mut ffi::GstControlPoint,
|
|
|
|
f: glib::ffi::gpointer,
|
2020-06-09 01:06:49 +00:00
|
|
|
) where
|
|
|
|
P: IsA<TimedValueControlSource>,
|
|
|
|
{
|
|
|
|
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_<F> = 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::<Self, F> as *const (),
|
|
|
|
)),
|
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|