From 1192a027b40c5ad46cd998cfa7fd11bc527bd1a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 21 May 2018 11:41:37 +0300 Subject: [PATCH] Regenerated with latest GIR and GIR files --- gstreamer-app/src/auto/versions.txt | 4 +- gstreamer-audio/src/auto/versions.txt | 4 +- gstreamer-base/src/auto/versions.txt | 4 +- gstreamer-base/src/functions.rs | 2 +- gstreamer-net/src/auto/versions.txt | 4 +- gstreamer-pbutils/src/auto/versions.txt | 4 +- gstreamer-player/src/auto/versions.txt | 4 +- gstreamer-rtsp-server/src/auto/versions.txt | 4 +- gstreamer-rtsp/src/auto/versions.txt | 4 +- gstreamer-sdp/src/auto/versions.txt | 4 +- gstreamer-video/src/auto/versions.txt | 4 +- gstreamer-webrtc/src/auto/enums.rs | 151 ++++++++++++++++++ gstreamer-webrtc/src/auto/versions.txt | 4 +- .../src/auto/web_rtcdtls_transport.rs | 23 +++ .../src/auto/web_rtcice_transport.rs | 68 ++++++++ gstreamer/src/auto/versions.txt | 4 +- 16 files changed, 255 insertions(+), 37 deletions(-) diff --git a/gstreamer-app/src/auto/versions.txt b/gstreamer-app/src/auto/versions.txt index ea1a5cf00..980fc12b3 100644 --- a/gstreamer-app/src/auto/versions.txt +++ b/gstreamer-app/src/auto/versions.txt @@ -1,4 +1,2 @@ -All files in this directory -were generated by gir (https://github.com/gtk-rs/gir @ 1795530) +Generated by gir (https://github.com/gtk-rs/gir @ 1825132) from gir-files (https://github.com/gtk-rs/gir-files @ ???) -DO NOT EDIT THEM diff --git a/gstreamer-audio/src/auto/versions.txt b/gstreamer-audio/src/auto/versions.txt index ea1a5cf00..980fc12b3 100644 --- a/gstreamer-audio/src/auto/versions.txt +++ b/gstreamer-audio/src/auto/versions.txt @@ -1,4 +1,2 @@ -All files in this directory -were generated by gir (https://github.com/gtk-rs/gir @ 1795530) +Generated by gir (https://github.com/gtk-rs/gir @ 1825132) from gir-files (https://github.com/gtk-rs/gir-files @ ???) -DO NOT EDIT THEM diff --git a/gstreamer-base/src/auto/versions.txt b/gstreamer-base/src/auto/versions.txt index ea1a5cf00..980fc12b3 100644 --- a/gstreamer-base/src/auto/versions.txt +++ b/gstreamer-base/src/auto/versions.txt @@ -1,4 +1,2 @@ -All files in this directory -were generated by gir (https://github.com/gtk-rs/gir @ 1795530) +Generated by gir (https://github.com/gtk-rs/gir @ 1825132) from gir-files (https://github.com/gtk-rs/gir-files @ ???) -DO NOT EDIT THEM diff --git a/gstreamer-base/src/functions.rs b/gstreamer-base/src/functions.rs index f0a406150..9f0b24946 100644 --- a/gstreamer-base/src/functions.rs +++ b/gstreamer-base/src/functions.rs @@ -29,7 +29,7 @@ pub fn type_find_helper_for_data< let data = data.as_ref(); let (ptr, len) = (data.as_ptr(), data.len()); let ret = from_glib_full(ffi::gst_type_find_helper_for_data( - obj.0, ptr, len, &mut prob, + obj.0, mut_override(ptr), len, &mut prob, )); (ret, from_glib(prob)) } diff --git a/gstreamer-net/src/auto/versions.txt b/gstreamer-net/src/auto/versions.txt index ea1a5cf00..980fc12b3 100644 --- a/gstreamer-net/src/auto/versions.txt +++ b/gstreamer-net/src/auto/versions.txt @@ -1,4 +1,2 @@ -All files in this directory -were generated by gir (https://github.com/gtk-rs/gir @ 1795530) +Generated by gir (https://github.com/gtk-rs/gir @ 1825132) from gir-files (https://github.com/gtk-rs/gir-files @ ???) -DO NOT EDIT THEM diff --git a/gstreamer-pbutils/src/auto/versions.txt b/gstreamer-pbutils/src/auto/versions.txt index ea1a5cf00..980fc12b3 100644 --- a/gstreamer-pbutils/src/auto/versions.txt +++ b/gstreamer-pbutils/src/auto/versions.txt @@ -1,4 +1,2 @@ -All files in this directory -were generated by gir (https://github.com/gtk-rs/gir @ 1795530) +Generated by gir (https://github.com/gtk-rs/gir @ 1825132) from gir-files (https://github.com/gtk-rs/gir-files @ ???) -DO NOT EDIT THEM diff --git a/gstreamer-player/src/auto/versions.txt b/gstreamer-player/src/auto/versions.txt index ea1a5cf00..980fc12b3 100644 --- a/gstreamer-player/src/auto/versions.txt +++ b/gstreamer-player/src/auto/versions.txt @@ -1,4 +1,2 @@ -All files in this directory -were generated by gir (https://github.com/gtk-rs/gir @ 1795530) +Generated by gir (https://github.com/gtk-rs/gir @ 1825132) from gir-files (https://github.com/gtk-rs/gir-files @ ???) -DO NOT EDIT THEM diff --git a/gstreamer-rtsp-server/src/auto/versions.txt b/gstreamer-rtsp-server/src/auto/versions.txt index ea1a5cf00..980fc12b3 100644 --- a/gstreamer-rtsp-server/src/auto/versions.txt +++ b/gstreamer-rtsp-server/src/auto/versions.txt @@ -1,4 +1,2 @@ -All files in this directory -were generated by gir (https://github.com/gtk-rs/gir @ 1795530) +Generated by gir (https://github.com/gtk-rs/gir @ 1825132) from gir-files (https://github.com/gtk-rs/gir-files @ ???) -DO NOT EDIT THEM diff --git a/gstreamer-rtsp/src/auto/versions.txt b/gstreamer-rtsp/src/auto/versions.txt index ea1a5cf00..980fc12b3 100644 --- a/gstreamer-rtsp/src/auto/versions.txt +++ b/gstreamer-rtsp/src/auto/versions.txt @@ -1,4 +1,2 @@ -All files in this directory -were generated by gir (https://github.com/gtk-rs/gir @ 1795530) +Generated by gir (https://github.com/gtk-rs/gir @ 1825132) from gir-files (https://github.com/gtk-rs/gir-files @ ???) -DO NOT EDIT THEM diff --git a/gstreamer-sdp/src/auto/versions.txt b/gstreamer-sdp/src/auto/versions.txt index ea1a5cf00..980fc12b3 100644 --- a/gstreamer-sdp/src/auto/versions.txt +++ b/gstreamer-sdp/src/auto/versions.txt @@ -1,4 +1,2 @@ -All files in this directory -were generated by gir (https://github.com/gtk-rs/gir @ 1795530) +Generated by gir (https://github.com/gtk-rs/gir @ 1825132) from gir-files (https://github.com/gtk-rs/gir-files @ ???) -DO NOT EDIT THEM diff --git a/gstreamer-video/src/auto/versions.txt b/gstreamer-video/src/auto/versions.txt index ea1a5cf00..980fc12b3 100644 --- a/gstreamer-video/src/auto/versions.txt +++ b/gstreamer-video/src/auto/versions.txt @@ -1,4 +1,2 @@ -All files in this directory -were generated by gir (https://github.com/gtk-rs/gir @ 1795530) +Generated by gir (https://github.com/gtk-rs/gir @ 1825132) from gir-files (https://github.com/gtk-rs/gir-files @ ???) -DO NOT EDIT THEM diff --git a/gstreamer-webrtc/src/auto/enums.rs b/gstreamer-webrtc/src/auto/enums.rs index d5b381d4c..6339d9101 100644 --- a/gstreamer-webrtc/src/auto/enums.rs +++ b/gstreamer-webrtc/src/auto/enums.rs @@ -3,7 +3,14 @@ // DO NOT EDIT use ffi; +use glib::StaticType; +use glib::Type; use glib::translate::*; +use glib::value::FromValue; +use glib::value::FromValueOptional; +use glib::value::SetValue; +use glib::value::Value; +use gobject_ffi; #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum WebRTCDTLSTransportState { @@ -47,6 +54,30 @@ impl FromGlib for WebRTCDTLSTransportState { } } +impl StaticType for WebRTCDTLSTransportState { + fn static_type() -> Type { + unsafe { from_glib(ffi::gst_webrtc_dtls_transport_state_get_type()) } + } +} + +impl<'a> FromValueOptional<'a> for WebRTCDTLSTransportState { + unsafe fn from_value_optional(value: &Value) -> Option { + Some(FromValue::from_value(value)) + } +} + +impl<'a> FromValue<'a> for WebRTCDTLSTransportState { + unsafe fn from_value(value: &Value) -> Self { + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + } +} + +impl SetValue for WebRTCDTLSTransportState { + unsafe fn set_value(value: &mut Value, this: &Self) { + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + } +} + #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum WebRTCICEComponent { Rtp, @@ -80,6 +111,30 @@ impl FromGlib for WebRTCICEComponent { } } +impl StaticType for WebRTCICEComponent { + fn static_type() -> Type { + unsafe { from_glib(ffi::gst_webrtc_ice_component_get_type()) } + } +} + +impl<'a> FromValueOptional<'a> for WebRTCICEComponent { + unsafe fn from_value_optional(value: &Value) -> Option { + Some(FromValue::from_value(value)) + } +} + +impl<'a> FromValue<'a> for WebRTCICEComponent { + unsafe fn from_value(value: &Value) -> Self { + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + } +} + +impl SetValue for WebRTCICEComponent { + unsafe fn set_value(value: &mut Value, this: &Self) { + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + } +} + #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum WebRTCICEConnectionState { New, @@ -128,6 +183,30 @@ impl FromGlib for WebRTCICEConnectionState { } } +impl StaticType for WebRTCICEConnectionState { + fn static_type() -> Type { + unsafe { from_glib(ffi::gst_webrtc_ice_connection_state_get_type()) } + } +} + +impl<'a> FromValueOptional<'a> for WebRTCICEConnectionState { + unsafe fn from_value_optional(value: &Value) -> Option { + Some(FromValue::from_value(value)) + } +} + +impl<'a> FromValue<'a> for WebRTCICEConnectionState { + unsafe fn from_value(value: &Value) -> Self { + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + } +} + +impl SetValue for WebRTCICEConnectionState { + unsafe fn set_value(value: &mut Value, this: &Self) { + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + } +} + #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum WebRTCICEGatheringState { New, @@ -164,6 +243,30 @@ impl FromGlib for WebRTCICEGatheringState { } } +impl StaticType for WebRTCICEGatheringState { + fn static_type() -> Type { + unsafe { from_glib(ffi::gst_webrtc_ice_gathering_state_get_type()) } + } +} + +impl<'a> FromValueOptional<'a> for WebRTCICEGatheringState { + unsafe fn from_value_optional(value: &Value) -> Option { + Some(FromValue::from_value(value)) + } +} + +impl<'a> FromValue<'a> for WebRTCICEGatheringState { + unsafe fn from_value(value: &Value) -> Self { + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + } +} + +impl SetValue for WebRTCICEGatheringState { + unsafe fn set_value(value: &mut Value, this: &Self) { + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + } +} + #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum WebRTCICERole { Controlled, @@ -197,6 +300,30 @@ impl FromGlib for WebRTCICERole { } } +impl StaticType for WebRTCICERole { + fn static_type() -> Type { + unsafe { from_glib(ffi::gst_webrtc_ice_role_get_type()) } + } +} + +impl<'a> FromValueOptional<'a> for WebRTCICERole { + unsafe fn from_value_optional(value: &Value) -> Option { + Some(FromValue::from_value(value)) + } +} + +impl<'a> FromValue<'a> for WebRTCICERole { + unsafe fn from_value(value: &Value) -> Self { + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + } +} + +impl SetValue for WebRTCICERole { + unsafe fn set_value(value: &mut Value, this: &Self) { + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + } +} + #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum WebRTCSDPType { Offer, @@ -236,3 +363,27 @@ impl FromGlib for WebRTCSDPType { } } +impl StaticType for WebRTCSDPType { + fn static_type() -> Type { + unsafe { from_glib(ffi::gst_webrtc_sdp_type_get_type()) } + } +} + +impl<'a> FromValueOptional<'a> for WebRTCSDPType { + unsafe fn from_value_optional(value: &Value) -> Option { + Some(FromValue::from_value(value)) + } +} + +impl<'a> FromValue<'a> for WebRTCSDPType { + unsafe fn from_value(value: &Value) -> Self { + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + } +} + +impl SetValue for WebRTCSDPType { + unsafe fn set_value(value: &mut Value, this: &Self) { + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + } +} + diff --git a/gstreamer-webrtc/src/auto/versions.txt b/gstreamer-webrtc/src/auto/versions.txt index ea1a5cf00..980fc12b3 100644 --- a/gstreamer-webrtc/src/auto/versions.txt +++ b/gstreamer-webrtc/src/auto/versions.txt @@ -1,4 +1,2 @@ -All files in this directory -were generated by gir (https://github.com/gtk-rs/gir @ 1795530) +Generated by gir (https://github.com/gtk-rs/gir @ 1825132) from gir-files (https://github.com/gtk-rs/gir-files @ ???) -DO NOT EDIT THEM diff --git a/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs b/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs index f5c3b13d8..51f9bdfec 100644 --- a/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs +++ b/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs @@ -2,6 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +use WebRTCDTLSTransportState; use WebRTCICETransport; use ffi; use glib::StaticType; @@ -90,6 +91,14 @@ impl WebRTCDTLSTransport { } } + pub fn get_property_state(&self) -> WebRTCDTLSTransportState { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_ffi::g_object_get_property(self.to_glib_none().0, "state".to_glib_none().0, value.to_glib_none_mut().0); + value.get().unwrap() + } + } + pub fn get_property_transport(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); @@ -138,6 +147,14 @@ impl WebRTCDTLSTransport { } } + pub fn connect_property_state_notify(&self, f: F) -> SignalHandlerId { + unsafe { + let f: Box_> = Box_::new(Box_::new(f)); + connect(self.to_glib_none().0, "notify::state", + transmute(notify_state_trampoline as usize), Box_::into_raw(f) as *mut _) + } + } + pub fn connect_property_transport_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); @@ -180,6 +197,12 @@ unsafe extern "C" fn notify_session_id_trampoline(this: *mut ffi::GstWebRTCDTLST f(&from_glib_borrow(this)) } +unsafe extern "C" fn notify_state_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + callback_guard!(); + let f: &&(Fn(&WebRTCDTLSTransport) + Send + Sync + 'static) = transmute(f); + f(&from_glib_borrow(this)) +} + unsafe extern "C" fn notify_transport_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { callback_guard!(); let f: &&(Fn(&WebRTCDTLSTransport) + Send + Sync + 'static) = transmute(f); diff --git a/gstreamer-webrtc/src/auto/web_rtcice_transport.rs b/gstreamer-webrtc/src/auto/web_rtcice_transport.rs index b470a781d..388545d12 100644 --- a/gstreamer-webrtc/src/auto/web_rtcice_transport.rs +++ b/gstreamer-webrtc/src/auto/web_rtcice_transport.rs @@ -6,6 +6,8 @@ use WebRTCICEComponent; use WebRTCICEConnectionState; use WebRTCICEGatheringState; use ffi; +use glib::StaticType; +use glib::Value; use glib::signal::SignalHandlerId; use glib::signal::connect; use glib::translate::*; @@ -50,6 +52,30 @@ impl WebRTCICETransport { } } + pub fn get_property_component(&self) -> WebRTCICEComponent { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_ffi::g_object_get_property(self.to_glib_none().0, "component".to_glib_none().0, value.to_glib_none_mut().0); + value.get().unwrap() + } + } + + pub fn get_property_gathering_state(&self) -> WebRTCICEGatheringState { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_ffi::g_object_get_property(self.to_glib_none().0, "gathering-state".to_glib_none().0, value.to_glib_none_mut().0); + value.get().unwrap() + } + } + + pub fn get_property_state(&self) -> WebRTCICEConnectionState { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_ffi::g_object_get_property(self.to_glib_none().0, "state".to_glib_none().0, value.to_glib_none_mut().0); + value.get().unwrap() + } + } + pub fn connect_on_new_candidate(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); @@ -65,6 +91,30 @@ impl WebRTCICETransport { transmute(on_selected_candidate_pair_change_trampoline as usize), Box_::into_raw(f) as *mut _) } } + + pub fn connect_property_component_notify(&self, f: F) -> SignalHandlerId { + unsafe { + let f: Box_> = Box_::new(Box_::new(f)); + connect(self.to_glib_none().0, "notify::component", + transmute(notify_component_trampoline as usize), Box_::into_raw(f) as *mut _) + } + } + + pub fn connect_property_gathering_state_notify(&self, f: F) -> SignalHandlerId { + unsafe { + let f: Box_> = Box_::new(Box_::new(f)); + connect(self.to_glib_none().0, "notify::gathering-state", + transmute(notify_gathering_state_trampoline as usize), Box_::into_raw(f) as *mut _) + } + } + + pub fn connect_property_state_notify(&self, f: F) -> SignalHandlerId { + unsafe { + let f: Box_> = Box_::new(Box_::new(f)); + connect(self.to_glib_none().0, "notify::state", + transmute(notify_state_trampoline as usize), Box_::into_raw(f) as *mut _) + } + } } unsafe impl Send for WebRTCICETransport {} @@ -81,3 +131,21 @@ unsafe extern "C" fn on_selected_candidate_pair_change_trampoline(this: *mut ffi let f: &&(Fn(&WebRTCICETransport) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } + +unsafe extern "C" fn notify_component_trampoline(this: *mut ffi::GstWebRTCICETransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + callback_guard!(); + let f: &&(Fn(&WebRTCICETransport) + Send + Sync + 'static) = transmute(f); + f(&from_glib_borrow(this)) +} + +unsafe extern "C" fn notify_gathering_state_trampoline(this: *mut ffi::GstWebRTCICETransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + callback_guard!(); + let f: &&(Fn(&WebRTCICETransport) + Send + Sync + 'static) = transmute(f); + f(&from_glib_borrow(this)) +} + +unsafe extern "C" fn notify_state_trampoline(this: *mut ffi::GstWebRTCICETransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + callback_guard!(); + let f: &&(Fn(&WebRTCICETransport) + Send + Sync + 'static) = transmute(f); + f(&from_glib_borrow(this)) +} diff --git a/gstreamer/src/auto/versions.txt b/gstreamer/src/auto/versions.txt index ea1a5cf00..980fc12b3 100644 --- a/gstreamer/src/auto/versions.txt +++ b/gstreamer/src/auto/versions.txt @@ -1,4 +1,2 @@ -All files in this directory -were generated by gir (https://github.com/gtk-rs/gir @ 1795530) +Generated by gir (https://github.com/gtk-rs/gir @ 1825132) from gir-files (https://github.com/gtk-rs/gir-files @ ???) -DO NOT EDIT THEM