2018-04-23 17:34:22 +00:00
|
|
|
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
|
|
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
2017-12-16 12:48:29 +00:00
|
|
|
// DO NOT EDIT
|
|
|
|
|
2019-06-18 10:10:46 +00:00
|
|
|
use glib::object::ObjectType as ObjectType_;
|
2018-12-08 09:05:20 +00:00
|
|
|
use glib::signal::connect_raw;
|
2019-06-18 10:12:00 +00:00
|
|
|
use glib::signal::SignalHandlerId;
|
2017-12-16 12:48:29 +00:00
|
|
|
use glib::translate::*;
|
2019-06-18 10:12:00 +00:00
|
|
|
use glib::GString;
|
|
|
|
use glib::StaticType;
|
|
|
|
use glib::Value;
|
2019-03-19 07:40:05 +00:00
|
|
|
use glib_sys;
|
|
|
|
use gobject_sys;
|
2017-12-16 12:48:29 +00:00
|
|
|
use gst;
|
2019-03-19 07:40:05 +00:00
|
|
|
use gst_net_sys;
|
2017-12-16 12:48:29 +00:00
|
|
|
use std::boxed::Box as Box_;
|
|
|
|
use std::mem::transmute;
|
|
|
|
|
|
|
|
glib_wrapper! {
|
2019-03-19 07:40:05 +00:00
|
|
|
pub struct NetClientClock(Object<gst_net_sys::GstNetClientClock, gst_net_sys::GstNetClientClockClass, NetClientClockClass>) @extends gst::Clock, gst::Object;
|
2017-12-16 12:48:29 +00:00
|
|
|
|
|
|
|
match fn {
|
2019-03-19 07:40:05 +00:00
|
|
|
get_type => || gst_net_sys::gst_net_client_clock_get_type(),
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl NetClientClock {
|
2018-12-09 16:06:12 +00:00
|
|
|
pub fn get_property_address(&self) -> Option<GString> {
|
2017-12-16 12:48:29 +00:00
|
|
|
unsafe {
|
2018-12-09 16:06:12 +00:00
|
|
|
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
2019-06-18 10:12:00 +00:00
|
|
|
gobject_sys::g_object_get_property(
|
|
|
|
self.as_ptr() as *mut gobject_sys::GObject,
|
|
|
|
b"address\0".as_ptr() as *const _,
|
|
|
|
value.to_glib_none_mut().0,
|
|
|
|
);
|
2019-08-10 17:32:57 +00:00
|
|
|
value
|
|
|
|
.get()
|
|
|
|
.expect("Return Value for property `address` getter")
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-19 07:40:05 +00:00
|
|
|
pub fn set_property_address(&self, address: Option<&str>) {
|
2017-12-16 12:48:29 +00:00
|
|
|
unsafe {
|
2019-06-18 10:12:00 +00:00
|
|
|
gobject_sys::g_object_set_property(
|
|
|
|
self.as_ptr() as *mut gobject_sys::GObject,
|
|
|
|
b"address\0".as_ptr() as *const _,
|
|
|
|
Value::from(address).to_glib_none().0,
|
|
|
|
);
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn get_property_base_time(&self) -> u64 {
|
|
|
|
unsafe {
|
2018-02-06 14:42:34 +00:00
|
|
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
2019-06-18 10:12:00 +00:00
|
|
|
gobject_sys::g_object_get_property(
|
|
|
|
self.as_ptr() as *mut gobject_sys::GObject,
|
|
|
|
b"base-time\0".as_ptr() as *const _,
|
|
|
|
value.to_glib_none_mut().0,
|
|
|
|
);
|
2019-08-10 17:32:57 +00:00
|
|
|
value
|
|
|
|
.get()
|
|
|
|
.expect("Return Value for property `base-time` getter")
|
|
|
|
.unwrap()
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn get_property_bus(&self) -> Option<gst::Bus> {
|
|
|
|
unsafe {
|
2018-02-06 14:42:34 +00:00
|
|
|
let mut value = Value::from_type(<gst::Bus as StaticType>::static_type());
|
2019-06-18 10:12:00 +00:00
|
|
|
gobject_sys::g_object_get_property(
|
|
|
|
self.as_ptr() as *mut gobject_sys::GObject,
|
|
|
|
b"bus\0".as_ptr() as *const _,
|
|
|
|
value.to_glib_none_mut().0,
|
|
|
|
);
|
2019-08-10 17:32:57 +00:00
|
|
|
value.get().expect("Return Value for property `bus` getter")
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-19 07:40:05 +00:00
|
|
|
pub fn set_property_bus(&self, bus: Option<&gst::Bus>) {
|
2017-12-16 12:48:29 +00:00
|
|
|
unsafe {
|
2019-06-18 10:12:00 +00:00
|
|
|
gobject_sys::g_object_set_property(
|
|
|
|
self.as_ptr() as *mut gobject_sys::GObject,
|
|
|
|
b"bus\0".as_ptr() as *const _,
|
|
|
|
Value::from(bus).to_glib_none().0,
|
|
|
|
);
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn get_property_internal_clock(&self) -> Option<gst::Clock> {
|
|
|
|
unsafe {
|
2018-02-06 14:42:34 +00:00
|
|
|
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
2019-06-18 10:12:00 +00:00
|
|
|
gobject_sys::g_object_get_property(
|
|
|
|
self.as_ptr() as *mut gobject_sys::GObject,
|
|
|
|
b"internal-clock\0".as_ptr() as *const _,
|
|
|
|
value.to_glib_none_mut().0,
|
|
|
|
);
|
2019-08-10 17:32:57 +00:00
|
|
|
value
|
|
|
|
.get()
|
|
|
|
.expect("Return Value for property `internal-clock` getter")
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn get_property_minimum_update_interval(&self) -> u64 {
|
|
|
|
unsafe {
|
2018-02-06 14:42:34 +00:00
|
|
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
2019-06-18 10:12:00 +00:00
|
|
|
gobject_sys::g_object_get_property(
|
|
|
|
self.as_ptr() as *mut gobject_sys::GObject,
|
|
|
|
b"minimum-update-interval\0".as_ptr() as *const _,
|
|
|
|
value.to_glib_none_mut().0,
|
|
|
|
);
|
2019-08-10 17:32:57 +00:00
|
|
|
value
|
|
|
|
.get()
|
|
|
|
.expect("Return Value for property `minimum-update-interval` getter")
|
|
|
|
.unwrap()
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn set_property_minimum_update_interval(&self, minimum_update_interval: u64) {
|
|
|
|
unsafe {
|
2019-06-18 10:12:00 +00:00
|
|
|
gobject_sys::g_object_set_property(
|
|
|
|
self.as_ptr() as *mut gobject_sys::GObject,
|
|
|
|
b"minimum-update-interval\0".as_ptr() as *const _,
|
|
|
|
Value::from(&minimum_update_interval).to_glib_none().0,
|
|
|
|
);
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn get_property_port(&self) -> i32 {
|
|
|
|
unsafe {
|
2018-02-06 14:42:34 +00:00
|
|
|
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
2019-06-18 10:12:00 +00:00
|
|
|
gobject_sys::g_object_get_property(
|
|
|
|
self.as_ptr() as *mut gobject_sys::GObject,
|
|
|
|
b"port\0".as_ptr() as *const _,
|
|
|
|
value.to_glib_none_mut().0,
|
|
|
|
);
|
2019-08-10 17:32:57 +00:00
|
|
|
value
|
|
|
|
.get()
|
|
|
|
.expect("Return Value for property `port` getter")
|
|
|
|
.unwrap()
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn set_property_port(&self, port: i32) {
|
|
|
|
unsafe {
|
2019-06-18 10:12:00 +00:00
|
|
|
gobject_sys::g_object_set_property(
|
|
|
|
self.as_ptr() as *mut gobject_sys::GObject,
|
|
|
|
b"port\0".as_ptr() as *const _,
|
|
|
|
Value::from(&port).to_glib_none().0,
|
|
|
|
);
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-15 08:12:01 +00:00
|
|
|
pub fn get_property_qos_dscp(&self) -> i32 {
|
|
|
|
unsafe {
|
|
|
|
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
2019-06-18 10:12:00 +00:00
|
|
|
gobject_sys::g_object_get_property(
|
|
|
|
self.as_ptr() as *mut gobject_sys::GObject,
|
|
|
|
b"qos-dscp\0".as_ptr() as *const _,
|
|
|
|
value.to_glib_none_mut().0,
|
|
|
|
);
|
2019-08-10 17:32:57 +00:00
|
|
|
value
|
|
|
|
.get()
|
|
|
|
.expect("Return Value for property `qos-dscp` getter")
|
|
|
|
.unwrap()
|
2018-03-15 08:12:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn set_property_qos_dscp(&self, qos_dscp: i32) {
|
|
|
|
unsafe {
|
2019-06-18 10:12:00 +00:00
|
|
|
gobject_sys::g_object_set_property(
|
|
|
|
self.as_ptr() as *mut gobject_sys::GObject,
|
|
|
|
b"qos-dscp\0".as_ptr() as *const _,
|
|
|
|
Value::from(&qos_dscp).to_glib_none().0,
|
|
|
|
);
|
2018-03-15 08:12:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-16 12:48:29 +00:00
|
|
|
pub fn get_property_round_trip_limit(&self) -> u64 {
|
|
|
|
unsafe {
|
2018-02-06 14:42:34 +00:00
|
|
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
2019-06-18 10:12:00 +00:00
|
|
|
gobject_sys::g_object_get_property(
|
|
|
|
self.as_ptr() as *mut gobject_sys::GObject,
|
|
|
|
b"round-trip-limit\0".as_ptr() as *const _,
|
|
|
|
value.to_glib_none_mut().0,
|
|
|
|
);
|
2019-08-10 17:32:57 +00:00
|
|
|
value
|
|
|
|
.get()
|
|
|
|
.expect("Return Value for property `round-trip-limit` getter")
|
|
|
|
.unwrap()
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn set_property_round_trip_limit(&self, round_trip_limit: u64) {
|
|
|
|
unsafe {
|
2019-06-18 10:12:00 +00:00
|
|
|
gobject_sys::g_object_set_property(
|
|
|
|
self.as_ptr() as *mut gobject_sys::GObject,
|
|
|
|
b"round-trip-limit\0".as_ptr() as *const _,
|
|
|
|
Value::from(&round_trip_limit).to_glib_none().0,
|
|
|
|
);
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
pub fn connect_property_address_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn notify_address_trampoline<
|
|
|
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
this: *mut gst_net_sys::GstNetClientClock,
|
|
|
|
_param_spec: glib_sys::gpointer,
|
|
|
|
f: glib_sys::gpointer,
|
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
|
|
|
f(&from_glib_borrow(this))
|
|
|
|
}
|
2017-12-16 12:48:29 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::address\0".as_ptr() as *const _,
|
|
|
|
Some(transmute(notify_address_trampoline::<F> as usize)),
|
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
pub fn connect_property_bus_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn notify_bus_trampoline<
|
|
|
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
this: *mut gst_net_sys::GstNetClientClock,
|
|
|
|
_param_spec: glib_sys::gpointer,
|
|
|
|
f: glib_sys::gpointer,
|
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
|
|
|
f(&from_glib_borrow(this))
|
|
|
|
}
|
2017-12-16 12:48:29 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::bus\0".as_ptr() as *const _,
|
|
|
|
Some(transmute(notify_bus_trampoline::<F> as usize)),
|
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
pub fn connect_property_internal_clock_notify<
|
|
|
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn notify_internal_clock_trampoline<
|
|
|
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
this: *mut gst_net_sys::GstNetClientClock,
|
|
|
|
_param_spec: glib_sys::gpointer,
|
|
|
|
f: glib_sys::gpointer,
|
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
|
|
|
f(&from_glib_borrow(this))
|
|
|
|
}
|
2017-12-16 12:48:29 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::internal-clock\0".as_ptr() as *const _,
|
|
|
|
Some(transmute(notify_internal_clock_trampoline::<F> as usize)),
|
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
pub fn connect_property_minimum_update_interval_notify<
|
|
|
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn notify_minimum_update_interval_trampoline<
|
|
|
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
this: *mut gst_net_sys::GstNetClientClock,
|
|
|
|
_param_spec: glib_sys::gpointer,
|
|
|
|
f: glib_sys::gpointer,
|
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
|
|
|
f(&from_glib_borrow(this))
|
|
|
|
}
|
2017-12-16 12:48:29 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::minimum-update-interval\0".as_ptr() as *const _,
|
|
|
|
Some(transmute(
|
|
|
|
notify_minimum_update_interval_trampoline::<F> as usize,
|
|
|
|
)),
|
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
pub fn connect_property_port_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn notify_port_trampoline<
|
|
|
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
this: *mut gst_net_sys::GstNetClientClock,
|
|
|
|
_param_spec: glib_sys::gpointer,
|
|
|
|
f: glib_sys::gpointer,
|
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
|
|
|
f(&from_glib_borrow(this))
|
|
|
|
}
|
2017-12-16 12:48:29 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::port\0".as_ptr() as *const _,
|
|
|
|
Some(transmute(notify_port_trampoline::<F> as usize)),
|
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
pub fn connect_property_qos_dscp_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn notify_qos_dscp_trampoline<
|
|
|
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
this: *mut gst_net_sys::GstNetClientClock,
|
|
|
|
_param_spec: glib_sys::gpointer,
|
|
|
|
f: glib_sys::gpointer,
|
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
|
|
|
f(&from_glib_borrow(this))
|
|
|
|
}
|
2018-03-15 08:12:01 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::qos-dscp\0".as_ptr() as *const _,
|
|
|
|
Some(transmute(notify_qos_dscp_trampoline::<F> as usize)),
|
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-03-15 08:12:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
pub fn connect_property_round_trip_limit_notify<
|
|
|
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn notify_round_trip_limit_trampoline<
|
|
|
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
this: *mut gst_net_sys::GstNetClientClock,
|
|
|
|
_param_spec: glib_sys::gpointer,
|
|
|
|
f: glib_sys::gpointer,
|
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
|
|
|
f(&from_glib_borrow(this))
|
|
|
|
}
|
2017-12-16 12:48:29 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::round-trip-limit\0".as_ptr() as *const _,
|
|
|
|
Some(transmute(notify_round_trip_limit_trampoline::<F> as usize)),
|
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2017-12-16 12:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
unsafe impl Send for NetClientClock {}
|
|
|
|
unsafe impl Sync for NetClientClock {}
|