From a8325694f5a679d94b50bfb73db48fd533d509b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 22 Nov 2020 11:45:06 +0200 Subject: [PATCH] gstreamer-net: Regenerate --- gstreamer-net/src/auto/net_client_clock.rs | 113 ++++++++++---------- gstreamer-net/src/auto/net_time_provider.rs | 55 +++++----- gstreamer-net/src/auto/ntp_clock.rs | 10 +- gstreamer-net/src/auto/ptp_clock.rs | 44 ++++---- gstreamer-net/src/auto/versions.txt | 4 +- 5 files changed, 105 insertions(+), 121 deletions(-) diff --git a/gstreamer-net/src/auto/net_client_clock.rs b/gstreamer-net/src/auto/net_client_clock.rs index 8313e059e..ab95004ee 100644 --- a/gstreamer-net/src/auto/net_client_clock.rs +++ b/gstreamer-net/src/auto/net_client_clock.rs @@ -7,30 +7,25 @@ use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; -use glib::GString; use glib::StaticType; use glib::Value; -use glib_sys; -use gobject_sys; -use gst; -use gst_net_sys; use std::boxed::Box as Box_; use std::mem::transmute; -glib_wrapper! { - pub struct NetClientClock(Object) @extends gst::Clock, gst::Object; +glib::glib_wrapper! { + pub struct NetClientClock(Object) @extends gst::Clock, gst::Object; match fn { - get_type => || gst_net_sys::gst_net_client_clock_get_type(), + get_type => || ffi::gst_net_client_clock_get_type(), } } impl NetClientClock { - pub fn get_property_address(&self) -> Option { + pub fn get_property_address(&self) -> Option { unsafe { - let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + let mut value = Value::from_type(::static_type()); + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -42,8 +37,8 @@ impl NetClientClock { pub fn set_property_address(&self, address: Option<&str>) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"address\0".as_ptr() as *const _, Value::from(address).to_glib_none().0, ); @@ -53,8 +48,8 @@ impl NetClientClock { pub fn get_property_base_time(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"base-time\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -68,8 +63,8 @@ impl NetClientClock { pub fn get_property_bus(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"bus\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -79,8 +74,8 @@ impl NetClientClock { pub fn set_property_bus>(&self, bus: Option<&P>) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"bus\0".as_ptr() as *const _, Value::from(bus).to_glib_none().0, ); @@ -90,8 +85,8 @@ impl NetClientClock { pub fn get_property_internal_clock(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -104,8 +99,8 @@ impl NetClientClock { pub fn get_property_minimum_update_interval(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"minimum-update-interval\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -118,8 +113,8 @@ impl NetClientClock { pub fn set_property_minimum_update_interval(&self, minimum_update_interval: u64) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"minimum-update-interval\0".as_ptr() as *const _, Value::from(&minimum_update_interval).to_glib_none().0, ); @@ -129,8 +124,8 @@ impl NetClientClock { pub fn get_property_port(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"port\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -143,8 +138,8 @@ impl NetClientClock { pub fn set_property_port(&self, port: i32) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"port\0".as_ptr() as *const _, Value::from(&port).to_glib_none().0, ); @@ -154,8 +149,8 @@ impl NetClientClock { pub fn get_property_qos_dscp(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"qos-dscp\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -168,8 +163,8 @@ impl NetClientClock { pub fn set_property_qos_dscp(&self, qos_dscp: i32) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"qos-dscp\0".as_ptr() as *const _, Value::from(&qos_dscp).to_glib_none().0, ); @@ -179,8 +174,8 @@ impl NetClientClock { pub fn get_property_round_trip_limit(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"round-trip-limit\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -193,8 +188,8 @@ impl NetClientClock { pub fn set_property_round_trip_limit(&self, round_trip_limit: u64) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"round-trip-limit\0".as_ptr() as *const _, Value::from(&round_trip_limit).to_glib_none().0, ); @@ -208,9 +203,9 @@ impl NetClientClock { 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, + this: *mut ffi::GstNetClientClock, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -235,9 +230,9 @@ impl NetClientClock { 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, + this: *mut ffi::GstNetClientClock, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -264,9 +259,9 @@ impl NetClientClock { 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, + this: *mut ffi::GstNetClientClock, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -293,9 +288,9 @@ impl NetClientClock { 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, + this: *mut ffi::GstNetClientClock, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -320,9 +315,9 @@ impl NetClientClock { 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, + this: *mut ffi::GstNetClientClock, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -347,9 +342,9 @@ impl NetClientClock { 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, + this: *mut ffi::GstNetClientClock, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -376,9 +371,9 @@ impl NetClientClock { 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, + this: *mut ffi::GstNetClientClock, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) diff --git a/gstreamer-net/src/auto/net_time_provider.rs b/gstreamer-net/src/auto/net_time_provider.rs index 2bf1d3e56..f6c641185 100644 --- a/gstreamer-net/src/auto/net_time_provider.rs +++ b/gstreamer-net/src/auto/net_time_provider.rs @@ -6,21 +6,16 @@ use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; -use glib::GString; use glib::StaticType; use glib::Value; -use glib_sys; -use gobject_sys; -use gst; -use gst_net_sys; use std::boxed::Box as Box_; use std::mem::transmute; -glib_wrapper! { - pub struct NetTimeProvider(Object) @extends gst::Object; +glib::glib_wrapper! { + pub struct NetTimeProvider(Object) @extends gst::Object; 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 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"active\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -42,19 +37,19 @@ impl NetTimeProvider { pub fn set_property_active(&self, active: bool) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"active\0".as_ptr() as *const _, Value::from(&active).to_glib_none().0, ); } } - pub fn get_property_address(&self) -> Option { + pub fn get_property_address(&self) -> Option { unsafe { - let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + let mut value = Value::from_type(::static_type()); + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -67,8 +62,8 @@ impl NetTimeProvider { pub fn get_property_clock(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"clock\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -81,8 +76,8 @@ impl NetTimeProvider { pub fn get_property_port(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"port\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -96,8 +91,8 @@ impl NetTimeProvider { pub fn get_property_qos_dscp(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"qos-dscp\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -110,8 +105,8 @@ impl NetTimeProvider { pub fn set_property_qos_dscp(&self, qos_dscp: i32) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"qos-dscp\0".as_ptr() as *const _, Value::from(&qos_dscp).to_glib_none().0, ); @@ -125,9 +120,9 @@ impl NetTimeProvider { unsafe extern "C" fn notify_active_trampoline< F: Fn(&NetTimeProvider) + Send + Sync + 'static, >( - this: *mut gst_net_sys::GstNetTimeProvider, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstNetTimeProvider, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -152,9 +147,9 @@ impl NetTimeProvider { unsafe extern "C" fn notify_qos_dscp_trampoline< F: Fn(&NetTimeProvider) + Send + Sync + 'static, >( - this: *mut gst_net_sys::GstNetTimeProvider, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstNetTimeProvider, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) diff --git a/gstreamer-net/src/auto/ntp_clock.rs b/gstreamer-net/src/auto/ntp_clock.rs index ed1aa4660..9c08312df 100644 --- a/gstreamer-net/src/auto/ntp_clock.rs +++ b/gstreamer-net/src/auto/ntp_clock.rs @@ -2,16 +2,14 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +use crate::NetClientClock; use glib::translate::*; -use gst; -use gst_net_sys; -use NetClientClock; -glib_wrapper! { - pub struct NtpClock(Object) @extends NetClientClock, gst::Clock, gst::Object; +glib::glib_wrapper! { + pub struct NtpClock(Object) @extends NetClientClock, gst::Clock, gst::Object; match fn { - get_type => || gst_net_sys::gst_ntp_clock_get_type(), + get_type => || ffi::gst_ntp_clock_get_type(), } } diff --git a/gstreamer-net/src/auto/ptp_clock.rs b/gstreamer-net/src/auto/ptp_clock.rs index 5c54d1aa5..fa548d813 100644 --- a/gstreamer-net/src/auto/ptp_clock.rs +++ b/gstreamer-net/src/auto/ptp_clock.rs @@ -8,18 +8,14 @@ use glib::signal::SignalHandlerId; use glib::translate::*; use glib::StaticType; use glib::Value; -use glib_sys; -use gobject_sys; -use gst; -use gst_net_sys; use std::boxed::Box as Box_; use std::mem::transmute; -glib_wrapper! { - pub struct PtpClock(Object) @extends gst::Clock, gst::Object; +glib::glib_wrapper! { + pub struct PtpClock(Object) @extends gst::Clock, gst::Object; 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 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"domain\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -42,8 +38,8 @@ impl PtpClock { pub fn get_property_grandmaster_clock_id(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"grandmaster-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -57,8 +53,8 @@ impl PtpClock { pub fn get_property_internal_clock(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -71,8 +67,8 @@ impl PtpClock { pub fn get_property_master_clock_id(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"master-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -92,9 +88,9 @@ impl PtpClock { unsafe extern "C" fn notify_grandmaster_clock_id_trampoline< F: Fn(&PtpClock) + Send + Sync + 'static, >( - this: *mut gst_net_sys::GstPtpClock, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstPtpClock, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -119,9 +115,9 @@ impl PtpClock { unsafe extern "C" fn notify_internal_clock_trampoline< F: Fn(&PtpClock) + Send + Sync + 'static, >( - this: *mut gst_net_sys::GstPtpClock, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstPtpClock, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -146,9 +142,9 @@ impl PtpClock { unsafe extern "C" fn notify_master_clock_id_trampoline< F: Fn(&PtpClock) + Send + Sync + 'static, >( - this: *mut gst_net_sys::GstPtpClock, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstPtpClock, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) diff --git a/gstreamer-net/src/auto/versions.txt b/gstreamer-net/src/auto/versions.txt index bdfc6f381..b99a6671e 100644 --- a/gstreamer-net/src/auto/versions.txt +++ b/gstreamer-net/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 062b3d6) -from gir-files (https://github.com/gtk-rs/gir-files @ b84cead5) +Generated by gir (https://github.com/gtk-rs/gir @ 694b4b8) +from gir-files (https://github.com/gtk-rs/gir-files @ 520eb582)