mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 11:01:10 +00:00
gstreamer-net: Regenerate
This commit is contained in:
parent
240285ec0f
commit
a8325694f5
5 changed files with 105 additions and 121 deletions
|
@ -7,30 +7,25 @@ use glib::object::ObjectType as ObjectType_;
|
||||||
use glib::signal::connect_raw;
|
use glib::signal::connect_raw;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib::GString;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib_sys;
|
|
||||||
use gobject_sys;
|
|
||||||
use gst;
|
|
||||||
use gst_net_sys;
|
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
|
|
||||||
glib_wrapper! {
|
glib::glib_wrapper! {
|
||||||
pub struct NetClientClock(Object<gst_net_sys::GstNetClientClock, gst_net_sys::GstNetClientClockClass>) @extends gst::Clock, gst::Object;
|
pub struct NetClientClock(Object<ffi::GstNetClientClock, ffi::GstNetClientClockClass>) @extends gst::Clock, gst::Object;
|
||||||
|
|
||||||
match fn {
|
match fn {
|
||||||
get_type => || gst_net_sys::gst_net_client_clock_get_type(),
|
get_type => || ffi::gst_net_client_clock_get_type(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl NetClientClock {
|
impl NetClientClock {
|
||||||
pub fn get_property_address(&self) -> Option<GString> {
|
pub fn get_property_address(&self) -> Option<glib::GString> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
let mut value = Value::from_type(<glib::GString as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"address\0".as_ptr() as *const _,
|
b"address\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -42,8 +37,8 @@ impl NetClientClock {
|
||||||
|
|
||||||
pub fn set_property_address(&self, address: Option<&str>) {
|
pub fn set_property_address(&self, address: Option<&str>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"address\0".as_ptr() as *const _,
|
b"address\0".as_ptr() as *const _,
|
||||||
Value::from(address).to_glib_none().0,
|
Value::from(address).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -53,8 +48,8 @@ impl NetClientClock {
|
||||||
pub fn get_property_base_time(&self) -> u64 {
|
pub fn get_property_base_time(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"base-time\0".as_ptr() as *const _,
|
b"base-time\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -68,8 +63,8 @@ impl NetClientClock {
|
||||||
pub fn get_property_bus(&self) -> Option<gst::Bus> {
|
pub fn get_property_bus(&self) -> Option<gst::Bus> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Bus as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Bus as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"bus\0".as_ptr() as *const _,
|
b"bus\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -79,8 +74,8 @@ impl NetClientClock {
|
||||||
|
|
||||||
pub fn set_property_bus<P: IsA<gst::Bus>>(&self, bus: Option<&P>) {
|
pub fn set_property_bus<P: IsA<gst::Bus>>(&self, bus: Option<&P>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"bus\0".as_ptr() as *const _,
|
b"bus\0".as_ptr() as *const _,
|
||||||
Value::from(bus).to_glib_none().0,
|
Value::from(bus).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -90,8 +85,8 @@ impl NetClientClock {
|
||||||
pub fn get_property_internal_clock(&self) -> Option<gst::Clock> {
|
pub fn get_property_internal_clock(&self) -> Option<gst::Clock> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"internal-clock\0".as_ptr() as *const _,
|
b"internal-clock\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -104,8 +99,8 @@ impl NetClientClock {
|
||||||
pub fn get_property_minimum_update_interval(&self) -> u64 {
|
pub fn get_property_minimum_update_interval(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"minimum-update-interval\0".as_ptr() as *const _,
|
b"minimum-update-interval\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -118,8 +113,8 @@ impl NetClientClock {
|
||||||
|
|
||||||
pub fn set_property_minimum_update_interval(&self, minimum_update_interval: u64) {
|
pub fn set_property_minimum_update_interval(&self, minimum_update_interval: u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"minimum-update-interval\0".as_ptr() as *const _,
|
b"minimum-update-interval\0".as_ptr() as *const _,
|
||||||
Value::from(&minimum_update_interval).to_glib_none().0,
|
Value::from(&minimum_update_interval).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -129,8 +124,8 @@ impl NetClientClock {
|
||||||
pub fn get_property_port(&self) -> i32 {
|
pub fn get_property_port(&self) -> i32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"port\0".as_ptr() as *const _,
|
b"port\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -143,8 +138,8 @@ impl NetClientClock {
|
||||||
|
|
||||||
pub fn set_property_port(&self, port: i32) {
|
pub fn set_property_port(&self, port: i32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"port\0".as_ptr() as *const _,
|
b"port\0".as_ptr() as *const _,
|
||||||
Value::from(&port).to_glib_none().0,
|
Value::from(&port).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -154,8 +149,8 @@ impl NetClientClock {
|
||||||
pub fn get_property_qos_dscp(&self) -> i32 {
|
pub fn get_property_qos_dscp(&self) -> i32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"qos-dscp\0".as_ptr() as *const _,
|
b"qos-dscp\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -168,8 +163,8 @@ impl NetClientClock {
|
||||||
|
|
||||||
pub fn set_property_qos_dscp(&self, qos_dscp: i32) {
|
pub fn set_property_qos_dscp(&self, qos_dscp: i32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"qos-dscp\0".as_ptr() as *const _,
|
b"qos-dscp\0".as_ptr() as *const _,
|
||||||
Value::from(&qos_dscp).to_glib_none().0,
|
Value::from(&qos_dscp).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -179,8 +174,8 @@ impl NetClientClock {
|
||||||
pub fn get_property_round_trip_limit(&self) -> u64 {
|
pub fn get_property_round_trip_limit(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"round-trip-limit\0".as_ptr() as *const _,
|
b"round-trip-limit\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -193,8 +188,8 @@ impl NetClientClock {
|
||||||
|
|
||||||
pub fn set_property_round_trip_limit(&self, round_trip_limit: u64) {
|
pub fn set_property_round_trip_limit(&self, round_trip_limit: u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"round-trip-limit\0".as_ptr() as *const _,
|
b"round-trip-limit\0".as_ptr() as *const _,
|
||||||
Value::from(&round_trip_limit).to_glib_none().0,
|
Value::from(&round_trip_limit).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -208,9 +203,9 @@ impl NetClientClock {
|
||||||
unsafe extern "C" fn notify_address_trampoline<
|
unsafe extern "C" fn notify_address_trampoline<
|
||||||
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_net_sys::GstNetClientClock,
|
this: *mut ffi::GstNetClientClock,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -235,9 +230,9 @@ impl NetClientClock {
|
||||||
unsafe extern "C" fn notify_bus_trampoline<
|
unsafe extern "C" fn notify_bus_trampoline<
|
||||||
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_net_sys::GstNetClientClock,
|
this: *mut ffi::GstNetClientClock,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -264,9 +259,9 @@ impl NetClientClock {
|
||||||
unsafe extern "C" fn notify_internal_clock_trampoline<
|
unsafe extern "C" fn notify_internal_clock_trampoline<
|
||||||
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_net_sys::GstNetClientClock,
|
this: *mut ffi::GstNetClientClock,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -293,9 +288,9 @@ impl NetClientClock {
|
||||||
unsafe extern "C" fn notify_minimum_update_interval_trampoline<
|
unsafe extern "C" fn notify_minimum_update_interval_trampoline<
|
||||||
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_net_sys::GstNetClientClock,
|
this: *mut ffi::GstNetClientClock,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -320,9 +315,9 @@ impl NetClientClock {
|
||||||
unsafe extern "C" fn notify_port_trampoline<
|
unsafe extern "C" fn notify_port_trampoline<
|
||||||
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_net_sys::GstNetClientClock,
|
this: *mut ffi::GstNetClientClock,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -347,9 +342,9 @@ impl NetClientClock {
|
||||||
unsafe extern "C" fn notify_qos_dscp_trampoline<
|
unsafe extern "C" fn notify_qos_dscp_trampoline<
|
||||||
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_net_sys::GstNetClientClock,
|
this: *mut ffi::GstNetClientClock,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -376,9 +371,9 @@ impl NetClientClock {
|
||||||
unsafe extern "C" fn notify_round_trip_limit_trampoline<
|
unsafe extern "C" fn notify_round_trip_limit_trampoline<
|
||||||
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
F: Fn(&NetClientClock) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_net_sys::GstNetClientClock,
|
this: *mut ffi::GstNetClientClock,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
|
|
@ -6,21 +6,16 @@ use glib::object::ObjectType as ObjectType_;
|
||||||
use glib::signal::connect_raw;
|
use glib::signal::connect_raw;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib::GString;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib_sys;
|
|
||||||
use gobject_sys;
|
|
||||||
use gst;
|
|
||||||
use gst_net_sys;
|
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
|
|
||||||
glib_wrapper! {
|
glib::glib_wrapper! {
|
||||||
pub struct NetTimeProvider(Object<gst_net_sys::GstNetTimeProvider, gst_net_sys::GstNetTimeProviderClass>) @extends gst::Object;
|
pub struct NetTimeProvider(Object<ffi::GstNetTimeProvider, ffi::GstNetTimeProviderClass>) @extends gst::Object;
|
||||||
|
|
||||||
match fn {
|
match fn {
|
||||||
get_type => || gst_net_sys::gst_net_time_provider_get_type(),
|
get_type => || ffi::gst_net_time_provider_get_type(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,8 +23,8 @@ impl NetTimeProvider {
|
||||||
pub fn get_property_active(&self) -> bool {
|
pub fn get_property_active(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"active\0".as_ptr() as *const _,
|
b"active\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -42,19 +37,19 @@ impl NetTimeProvider {
|
||||||
|
|
||||||
pub fn set_property_active(&self, active: bool) {
|
pub fn set_property_active(&self, active: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"active\0".as_ptr() as *const _,
|
b"active\0".as_ptr() as *const _,
|
||||||
Value::from(&active).to_glib_none().0,
|
Value::from(&active).to_glib_none().0,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_address(&self) -> Option<GString> {
|
pub fn get_property_address(&self) -> Option<glib::GString> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
let mut value = Value::from_type(<glib::GString as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"address\0".as_ptr() as *const _,
|
b"address\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -67,8 +62,8 @@ impl NetTimeProvider {
|
||||||
pub fn get_property_clock(&self) -> Option<gst::Clock> {
|
pub fn get_property_clock(&self) -> Option<gst::Clock> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"clock\0".as_ptr() as *const _,
|
b"clock\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -81,8 +76,8 @@ impl NetTimeProvider {
|
||||||
pub fn get_property_port(&self) -> i32 {
|
pub fn get_property_port(&self) -> i32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"port\0".as_ptr() as *const _,
|
b"port\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -96,8 +91,8 @@ impl NetTimeProvider {
|
||||||
pub fn get_property_qos_dscp(&self) -> i32 {
|
pub fn get_property_qos_dscp(&self) -> i32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"qos-dscp\0".as_ptr() as *const _,
|
b"qos-dscp\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -110,8 +105,8 @@ impl NetTimeProvider {
|
||||||
|
|
||||||
pub fn set_property_qos_dscp(&self, qos_dscp: i32) {
|
pub fn set_property_qos_dscp(&self, qos_dscp: i32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"qos-dscp\0".as_ptr() as *const _,
|
b"qos-dscp\0".as_ptr() as *const _,
|
||||||
Value::from(&qos_dscp).to_glib_none().0,
|
Value::from(&qos_dscp).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -125,9 +120,9 @@ impl NetTimeProvider {
|
||||||
unsafe extern "C" fn notify_active_trampoline<
|
unsafe extern "C" fn notify_active_trampoline<
|
||||||
F: Fn(&NetTimeProvider) + Send + Sync + 'static,
|
F: Fn(&NetTimeProvider) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_net_sys::GstNetTimeProvider,
|
this: *mut ffi::GstNetTimeProvider,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -152,9 +147,9 @@ impl NetTimeProvider {
|
||||||
unsafe extern "C" fn notify_qos_dscp_trampoline<
|
unsafe extern "C" fn notify_qos_dscp_trampoline<
|
||||||
F: Fn(&NetTimeProvider) + Send + Sync + 'static,
|
F: Fn(&NetTimeProvider) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_net_sys::GstNetTimeProvider,
|
this: *mut ffi::GstNetTimeProvider,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
|
|
@ -2,16 +2,14 @@
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use crate::NetClientClock;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use gst;
|
|
||||||
use gst_net_sys;
|
|
||||||
use NetClientClock;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib::glib_wrapper! {
|
||||||
pub struct NtpClock(Object<gst_net_sys::GstNtpClock, gst_net_sys::GstNtpClockClass>) @extends NetClientClock, gst::Clock, gst::Object;
|
pub struct NtpClock(Object<ffi::GstNtpClock, ffi::GstNtpClockClass>) @extends NetClientClock, gst::Clock, gst::Object;
|
||||||
|
|
||||||
match fn {
|
match fn {
|
||||||
get_type => || gst_net_sys::gst_ntp_clock_get_type(),
|
get_type => || ffi::gst_ntp_clock_get_type(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,18 +8,14 @@ use glib::signal::SignalHandlerId;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib_sys;
|
|
||||||
use gobject_sys;
|
|
||||||
use gst;
|
|
||||||
use gst_net_sys;
|
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
|
|
||||||
glib_wrapper! {
|
glib::glib_wrapper! {
|
||||||
pub struct PtpClock(Object<gst_net_sys::GstPtpClock, gst_net_sys::GstPtpClockClass>) @extends gst::Clock, gst::Object;
|
pub struct PtpClock(Object<ffi::GstPtpClock, ffi::GstPtpClockClass>) @extends gst::Clock, gst::Object;
|
||||||
|
|
||||||
match fn {
|
match fn {
|
||||||
get_type => || gst_net_sys::gst_ptp_clock_get_type(),
|
get_type => || ffi::gst_ptp_clock_get_type(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,8 +23,8 @@ impl PtpClock {
|
||||||
pub fn get_property_domain(&self) -> u32 {
|
pub fn get_property_domain(&self) -> u32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"domain\0".as_ptr() as *const _,
|
b"domain\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -42,8 +38,8 @@ impl PtpClock {
|
||||||
pub fn get_property_grandmaster_clock_id(&self) -> u64 {
|
pub fn get_property_grandmaster_clock_id(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"grandmaster-clock-id\0".as_ptr() as *const _,
|
b"grandmaster-clock-id\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -57,8 +53,8 @@ impl PtpClock {
|
||||||
pub fn get_property_internal_clock(&self) -> Option<gst::Clock> {
|
pub fn get_property_internal_clock(&self) -> Option<gst::Clock> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"internal-clock\0".as_ptr() as *const _,
|
b"internal-clock\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -71,8 +67,8 @@ impl PtpClock {
|
||||||
pub fn get_property_master_clock_id(&self) -> u64 {
|
pub fn get_property_master_clock_id(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"master-clock-id\0".as_ptr() as *const _,
|
b"master-clock-id\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -92,9 +88,9 @@ impl PtpClock {
|
||||||
unsafe extern "C" fn notify_grandmaster_clock_id_trampoline<
|
unsafe extern "C" fn notify_grandmaster_clock_id_trampoline<
|
||||||
F: Fn(&PtpClock) + Send + Sync + 'static,
|
F: Fn(&PtpClock) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_net_sys::GstPtpClock,
|
this: *mut ffi::GstPtpClock,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -119,9 +115,9 @@ impl PtpClock {
|
||||||
unsafe extern "C" fn notify_internal_clock_trampoline<
|
unsafe extern "C" fn notify_internal_clock_trampoline<
|
||||||
F: Fn(&PtpClock) + Send + Sync + 'static,
|
F: Fn(&PtpClock) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_net_sys::GstPtpClock,
|
this: *mut ffi::GstPtpClock,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -146,9 +142,9 @@ impl PtpClock {
|
||||||
unsafe extern "C" fn notify_master_clock_id_trampoline<
|
unsafe extern "C" fn notify_master_clock_id_trampoline<
|
||||||
F: Fn(&PtpClock) + Send + Sync + 'static,
|
F: Fn(&PtpClock) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_net_sys::GstPtpClock,
|
this: *mut ffi::GstPtpClock,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 062b3d6)
|
Generated by gir (https://github.com/gtk-rs/gir @ 694b4b8)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ b84cead5)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 520eb582)
|
||||||
|
|
Loading…
Reference in a new issue