gstreamer-net: Regenerate

This commit is contained in:
Sebastian Dröge 2020-11-22 11:45:06 +02:00
parent 240285ec0f
commit a8325694f5
5 changed files with 105 additions and 121 deletions

View file

@ -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<gst_net_sys::GstNetClientClock, gst_net_sys::GstNetClientClockClass>) @extends gst::Clock, gst::Object;
glib::glib_wrapper! {
pub struct NetClientClock(Object<ffi::GstNetClientClock, ffi::GstNetClientClockClass>) @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<GString> {
pub fn get_property_address(&self) -> Option<glib::GString> {
unsafe {
let mut value = Value::from_type(<GString as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.as_ptr() as *mut gobject_sys::GObject,
let mut value = Value::from_type(<glib::GString as StaticType>::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(<u64 as StaticType>::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<gst::Bus> {
unsafe {
let mut value = Value::from_type(<gst::Bus as StaticType>::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<P: IsA<gst::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<gst::Clock> {
unsafe {
let mut value = Value::from_type(<gst::Clock as StaticType>::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(<u64 as StaticType>::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(<i32 as StaticType>::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(<i32 as StaticType>::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(<u64 as StaticType>::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))

View file

@ -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<gst_net_sys::GstNetTimeProvider, gst_net_sys::GstNetTimeProviderClass>) @extends gst::Object;
glib::glib_wrapper! {
pub struct NetTimeProvider(Object<ffi::GstNetTimeProvider, ffi::GstNetTimeProviderClass>) @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(<bool as StaticType>::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<GString> {
pub fn get_property_address(&self) -> Option<glib::GString> {
unsafe {
let mut value = Value::from_type(<GString as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.as_ptr() as *mut gobject_sys::GObject,
let mut value = Value::from_type(<glib::GString as StaticType>::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<gst::Clock> {
unsafe {
let mut value = Value::from_type(<gst::Clock as StaticType>::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(<i32 as StaticType>::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(<i32 as StaticType>::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))

View file

@ -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<gst_net_sys::GstNtpClock, gst_net_sys::GstNtpClockClass>) @extends NetClientClock, gst::Clock, gst::Object;
glib::glib_wrapper! {
pub struct NtpClock(Object<ffi::GstNtpClock, ffi::GstNtpClockClass>) @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(),
}
}

View file

@ -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<gst_net_sys::GstPtpClock, gst_net_sys::GstPtpClockClass>) @extends gst::Clock, gst::Object;
glib::glib_wrapper! {
pub struct PtpClock(Object<ffi::GstPtpClock, ffi::GstPtpClockClass>) @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(<u32 as StaticType>::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(<u64 as StaticType>::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<gst::Clock> {
unsafe {
let mut value = Value::from_type(<gst::Clock as StaticType>::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(<u64 as StaticType>::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))

View file

@ -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)