From 00cbd499232a2fae5af86fa2dd0806cecd1f54f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 29 Jan 2019 15:53:44 +0200 Subject: [PATCH] Regenerate with latest gir --- Gir_Gst.toml | 45 ++++ gstreamer-app/src/auto/app_sink.rs | 66 +++--- gstreamer-app/src/auto/app_src.rs | 130 +++++------ gstreamer-app/src/auto/versions.txt | 2 +- gstreamer-audio/src/auto/stream_volume.rs | 16 +- gstreamer-audio/src/auto/versions.txt | 2 +- gstreamer-base/src/auto/aggregator.rs | 16 +- gstreamer-base/src/auto/base_sink.rs | 88 +++---- gstreamer-base/src/auto/base_src.rs | 32 +-- gstreamer-base/src/auto/base_transform.rs | 8 +- gstreamer-base/src/auto/functions.rs | 4 +- gstreamer-base/src/auto/versions.txt | 2 +- gstreamer-check/src/auto/test_clock.rs | 8 +- gstreamer-check/src/auto/versions.txt | 2 +- gstreamer-editing-services/src/auto/asset.rs | 23 +- gstreamer-editing-services/src/auto/clip.rs | 16 +- .../src/auto/container.rs | 24 +- gstreamer-editing-services/src/auto/effect.rs | 2 +- gstreamer-editing-services/src/auto/group.rs | 40 ++-- gstreamer-editing-services/src/auto/layer.rs | 32 +-- .../src/auto/pipeline.rs | 48 ++-- .../src/auto/project.rs | 48 ++-- .../src/auto/timeline.rs | 88 +++---- .../src/auto/timeline_element.rs | 88 +++---- gstreamer-editing-services/src/auto/track.rs | 52 ++--- .../src/auto/track_element.rs | 28 +-- .../src/auto/uri_clip.rs | 26 +-- .../src/auto/uri_clip_asset.rs | 10 +- .../src/auto/versions.txt | 2 +- gstreamer-gl/src/auto/gl_base_filter.rs | 8 +- gstreamer-gl/src/auto/gl_display.rs | 8 +- gstreamer-gl/src/auto/gl_display_egl.rs | 2 +- gstreamer-gl/src/auto/gl_framebuffer.rs | 4 +- gstreamer-gl/src/auto/gl_shader.rs | 8 +- gstreamer-gl/src/auto/gl_view_convert.rs | 40 ++-- gstreamer-gl/src/auto/gl_window.rs | 16 +- gstreamer-gl/src/auto/versions.txt | 2 +- gstreamer-net/src/auto/net_client_clock.rs | 56 ++--- gstreamer-net/src/auto/net_time_provider.rs | 16 +- gstreamer-net/src/auto/ptp_clock.rs | 24 +- gstreamer-net/src/auto/versions.txt | 2 +- gstreamer-pbutils/src/auto/discoverer.rs | 32 +-- gstreamer-pbutils/src/auto/versions.txt | 2 +- gstreamer-player/src/auto/player.rs | 200 ++++++++-------- .../player_video_overlay_video_renderer.rs | 22 +- gstreamer-player/src/auto/versions.txt | 2 +- gstreamer-rtsp-server/src/auto/rtsp_auth.rs | 8 +- gstreamer-rtsp-server/src/auto/rtsp_client.rs | 216 +++++++++--------- gstreamer-rtsp-server/src/auto/rtsp_media.rs | 152 ++++++------ .../src/auto/rtsp_media_factory.rs | 108 ++++----- .../src/auto/rtsp_media_factory_uri.rs | 16 +- gstreamer-rtsp-server/src/auto/rtsp_server.rs | 60 ++--- .../src/auto/rtsp_session.rs | 20 +- .../src/auto/rtsp_session_pool.rs | 20 +- gstreamer-rtsp-server/src/auto/rtsp_stream.rs | 44 ++-- .../src/auto/rtsp_stream_transport.rs | 26 ++- .../src/auto/rtsp_thread_pool.rs | 8 +- gstreamer-rtsp-server/src/auto/versions.txt | 2 +- gstreamer-rtsp/src/auto/versions.txt | 2 +- gstreamer-sdp/src/auto/mikey_payload.rs | 2 +- gstreamer-sdp/src/auto/versions.txt | 2 +- gstreamer-video/src/auto/versions.txt | 2 +- gstreamer-webrtc/src/auto/versions.txt | 2 +- .../src/auto/web_rtcdtls_transport.rs | 40 ++-- .../src/auto/web_rtcice_transport.rs | 32 +-- gstreamer/src/auto/bin.rs | 48 ++-- gstreamer/src/auto/bus.rs | 32 +-- gstreamer/src/auto/child_proxy.rs | 16 +- gstreamer/src/auto/clock.rs | 36 +-- gstreamer/src/auto/date_time.rs | 4 +- gstreamer/src/auto/device.rs | 8 +- gstreamer/src/auto/device_monitor.rs | 8 +- gstreamer/src/auto/device_provider.rs | 16 +- gstreamer/src/auto/element.rs | 104 ++++++--- gstreamer/src/auto/ghost_pad.rs | 8 +- gstreamer/src/auto/object.rs | 32 +-- gstreamer/src/auto/pad.rs | 147 +++--------- gstreamer/src/auto/pad_template.rs | 12 +- gstreamer/src/auto/pipeline.rs | 24 +- gstreamer/src/auto/plugin.rs | 8 - gstreamer/src/auto/registry.rs | 50 ++-- gstreamer/src/auto/stream.rs | 32 +-- gstreamer/src/auto/stream_collection.rs | 8 +- gstreamer/src/auto/system_clock.rs | 8 +- gstreamer/src/auto/versions.txt | 2 +- 85 files changed, 1386 insertions(+), 1371 deletions(-) diff --git a/Gir_Gst.toml b/Gir_Gst.toml index 59109de49..0c7a83f27 100644 --- a/Gir_Gst.toml +++ b/Gir_Gst.toml @@ -116,6 +116,11 @@ trait_name = "GstBinExt" name = "Gst.Bus" status = "generate" final_type = true + [[object.function]] + name = "set_sync_handler" + # Into> makes this hard to use + ignore = true + [[object.function]] name = "add_signal_watch_full" # Priority @@ -139,6 +144,16 @@ final_type = true # More convenient manual implementation ignore = true + [[object.function]] + name = "add_watch" + # More specific trait bounds possible for the closure + ignore = true + + [[object.function]] + name = "add_watch_full" + # More specific trait bounds possible for the closure + ignore = true + [[object.function]] name = "remove_watch" [object.function.return] @@ -337,6 +352,11 @@ status = "generate" # It is already a Result nullable = false + [[object.function]] + name = "call_async" + # more specific closure type possible + ignore = true + [[object.function]] name = "add_pad" [object.function.return] @@ -796,6 +816,26 @@ status = "generate" # Wrong place ignore = true + [[object.function]] + pattern = "set_.*_function_full" + # More specific closure trait bounds possible + ignore = true + + [[object.function]] + name = "start_task" + # More specific closure trait bounds possible + ignore = true + + [[object.function]] + name = "sticky_events_foreach" + # Complex closure argument handling + ignore = true + + [[object.function]] + name = "add_probe" + # Complex closure argument handling + ignore = true + [[object]] name = "Gst.PadTemplate" status = "generate" @@ -883,6 +923,11 @@ name = "Gst.Plugin" status = "generate" final_type = true + [[object.function]] + pattern = "register_static.*" + # Needs manual implementation + ignore = true + [[object.function]] name = "list_free" # useless and unsafe diff --git a/gstreamer-app/src/auto/app_sink.rs b/gstreamer-app/src/auto/app_sink.rs index 06f45b84c..e69ae7c6d 100644 --- a/gstreamer-app/src/auto/app_sink.rs +++ b/gstreamer-app/src/auto/app_sink.rs @@ -87,7 +87,7 @@ impl AppSink { } } - //pub fn set_callbacks(&self, callbacks: /*Ignored*/&mut AppSinkCallbacks, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { + //pub fn set_callbacks(&self, callbacks: /*Ignored*/&mut AppSinkCallbacks, user_data: /*Unimplemented*/Option) { // unsafe { TODO: call ffi::gst_app_sink_set_callbacks() } //} @@ -160,65 +160,65 @@ impl AppSink { pub fn connect_eos(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"eos\0".as_ptr() as *const _, - transmute(eos_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(eos_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_buffer_list_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::buffer-list\0".as_ptr() as *const _, - transmute(notify_buffer_list_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_buffer_list_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_caps_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::caps\0".as_ptr() as *const _, - transmute(notify_caps_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_caps_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_drop_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::drop\0".as_ptr() as *const _, - transmute(notify_drop_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_drop_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_emit_signals_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::emit-signals\0".as_ptr() as *const _, - transmute(notify_emit_signals_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_emit_signals_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_eos_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::eos\0".as_ptr() as *const _, - transmute(notify_eos_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_eos_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_max_buffers_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::max-buffers\0".as_ptr() as *const _, - transmute(notify_max_buffers_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_max_buffers_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_wait_on_eos_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::wait-on-eos\0".as_ptr() as *const _, - transmute(notify_wait_on_eos_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_wait_on_eos_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -226,42 +226,42 @@ impl AppSink { unsafe impl Send for AppSink {} unsafe impl Sync for AppSink {} -unsafe extern "C" fn eos_trampoline(this: *mut ffi::GstAppSink, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn eos_trampoline(this: *mut ffi::GstAppSink, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_buffer_list_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_buffer_list_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_drop_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_drop_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_emit_signals_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_emit_signals_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_eos_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_eos_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_max_buffers_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_max_buffers_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_wait_on_eos_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_wait_on_eos_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-app/src/auto/app_src.rs b/gstreamer-app/src/auto/app_src.rs index 357e1e63c..3f5fbcaa2 100644 --- a/gstreamer-app/src/auto/app_src.rs +++ b/gstreamer-app/src/auto/app_src.rs @@ -70,7 +70,7 @@ impl AppSrc { } } - //pub fn set_callbacks(&self, callbacks: /*Ignored*/&mut AppSrcCallbacks, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { + //pub fn set_callbacks(&self, callbacks: /*Ignored*/&mut AppSrcCallbacks, user_data: /*Unimplemented*/Option) { // unsafe { TODO: call ffi::gst_app_src_set_callbacks() } //} @@ -212,129 +212,129 @@ impl AppSrc { pub fn connect_enough_data(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"enough-data\0".as_ptr() as *const _, - transmute(enough_data_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(enough_data_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_need_data(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"need-data\0".as_ptr() as *const _, - transmute(need_data_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(need_data_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_seek_data bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_ bool + Send + Sync + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"seek-data\0".as_ptr() as *const _, - transmute(seek_data_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(seek_data_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_block_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::block\0".as_ptr() as *const _, - transmute(notify_block_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_block_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_caps_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::caps\0".as_ptr() as *const _, - transmute(notify_caps_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_caps_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_current_level_bytes_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::current-level-bytes\0".as_ptr() as *const _, - transmute(notify_current_level_bytes_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_current_level_bytes_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, - transmute(notify_duration_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_duration_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_emit_signals_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::emit-signals\0".as_ptr() as *const _, - transmute(notify_emit_signals_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_emit_signals_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_format_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::format\0".as_ptr() as *const _, - transmute(notify_format_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_format_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_is_live_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::is-live\0".as_ptr() as *const _, - transmute(notify_is_live_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_is_live_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_max_bytes_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::max-bytes\0".as_ptr() as *const _, - transmute(notify_max_bytes_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_max_bytes_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_max_latency_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::max-latency\0".as_ptr() as *const _, - transmute(notify_max_latency_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_max_latency_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_min_latency_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::min-latency\0".as_ptr() as *const _, - transmute(notify_min_latency_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_min_latency_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_min_percent_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::min-percent\0".as_ptr() as *const _, - transmute(notify_min_percent_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_min_percent_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_size_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::size\0".as_ptr() as *const _, - transmute(notify_size_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_size_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_stream_type_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::stream-type\0".as_ptr() as *const _, - transmute(notify_stream_type_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_stream_type_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -342,82 +342,82 @@ impl AppSrc { unsafe impl Send for AppSrc {} unsafe impl Sync for AppSrc {} -unsafe extern "C" fn enough_data_trampoline(this: *mut ffi::GstAppSrc, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn enough_data_trampoline(this: *mut ffi::GstAppSrc, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn need_data_trampoline(this: *mut ffi::GstAppSrc, length: libc::c_uint, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc, u32) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn need_data_trampoline(this: *mut ffi::GstAppSrc, length: libc::c_uint, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), length) } -unsafe extern "C" fn seek_data_trampoline(this: *mut ffi::GstAppSrc, offset: u64, f: glib_ffi::gpointer) -> glib_ffi::gboolean { - let f: &&(Fn(&AppSrc, u64) -> bool + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn seek_data_trampoline bool + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, offset: u64, f: glib_ffi::gpointer) -> glib_ffi::gboolean { + let f: &F = transmute(f); f(&from_glib_borrow(this), offset).to_glib() } -unsafe extern "C" fn notify_block_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_block_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_current_level_bytes_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_current_level_bytes_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_emit_signals_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_emit_signals_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_format_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_format_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_is_live_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_is_live_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_max_bytes_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_max_bytes_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_max_latency_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_max_latency_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_min_latency_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_min_latency_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_min_percent_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_min_percent_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_size_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_size_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_stream_type_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_stream_type_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-app/src/auto/versions.txt b/gstreamer-app/src/auto/versions.txt index 502cec64b..48014f977 100644 --- a/gstreamer-app/src/auto/versions.txt +++ b/gstreamer-app/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-audio/src/auto/stream_volume.rs b/gstreamer-audio/src/auto/stream_volume.rs index 3d9de8f98..370d7da72 100644 --- a/gstreamer-audio/src/auto/stream_volume.rs +++ b/gstreamer-audio/src/auto/stream_volume.rs @@ -76,29 +76,29 @@ impl> StreamVolumeExt for O { fn connect_property_mute_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::mute\0".as_ptr() as *const _, - transmute(notify_mute_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_mute_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_volume_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::volume\0".as_ptr() as *const _, - transmute(notify_volume_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_volume_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_mute_trampoline

(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_mute_trampoline(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&StreamVolume::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_volume_trampoline

(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_volume_trampoline(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&StreamVolume::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-audio/src/auto/versions.txt b/gstreamer-audio/src/auto/versions.txt index 502cec64b..48014f977 100644 --- a/gstreamer-audio/src/auto/versions.txt +++ b/gstreamer-audio/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-base/src/auto/aggregator.rs b/gstreamer-base/src/auto/aggregator.rs index a96237851..ee9bf0695 100644 --- a/gstreamer-base/src/auto/aggregator.rs +++ b/gstreamer-base/src/auto/aggregator.rs @@ -106,30 +106,30 @@ impl> AggregatorExt for O { #[cfg(any(feature = "v1_14", feature = "dox"))] fn connect_property_latency_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::latency\0".as_ptr() as *const _, - transmute(notify_latency_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_latency_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_start_time_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::start-time\0".as_ptr() as *const _, - transmute(notify_start_time_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_start_time_trampoline:: as usize)), Box_::into_raw(f)) } } } #[cfg(any(feature = "v1_14", feature = "dox"))] -unsafe extern "C" fn notify_latency_trampoline

(this: *mut ffi::GstAggregator, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_latency_trampoline(this: *mut ffi::GstAggregator, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Aggregator::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_start_time_trampoline

(this: *mut ffi::GstAggregator, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_start_time_trampoline(this: *mut ffi::GstAggregator, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Aggregator::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-base/src/auto/base_sink.rs b/gstreamer-base/src/auto/base_sink.rs index 641f0ea02..8703bcdc1 100644 --- a/gstreamer-base/src/auto/base_sink.rs +++ b/gstreamer-base/src/auto/base_sink.rs @@ -336,155 +336,155 @@ impl> BaseSinkExt for O { fn connect_property_async_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::async\0".as_ptr() as *const _, - transmute(notify_async_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_async_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_blocksize_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::blocksize\0".as_ptr() as *const _, - transmute(notify_blocksize_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_blocksize_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_enable_last_sample_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::enable-last-sample\0".as_ptr() as *const _, - transmute(notify_enable_last_sample_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_enable_last_sample_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_last_sample_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::last-sample\0".as_ptr() as *const _, - transmute(notify_last_sample_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_last_sample_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_max_bitrate_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::max-bitrate\0".as_ptr() as *const _, - transmute(notify_max_bitrate_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_max_bitrate_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_max_lateness_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::max-lateness\0".as_ptr() as *const _, - transmute(notify_max_lateness_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_max_lateness_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_qos_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::qos\0".as_ptr() as *const _, - transmute(notify_qos_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_qos_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_render_delay_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::render-delay\0".as_ptr() as *const _, - transmute(notify_render_delay_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_render_delay_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_sync_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::sync\0".as_ptr() as *const _, - transmute(notify_sync_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_sync_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_throttle_time_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::throttle-time\0".as_ptr() as *const _, - transmute(notify_throttle_time_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_throttle_time_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_ts_offset_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::ts-offset\0".as_ptr() as *const _, - transmute(notify_ts_offset_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_ts_offset_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_async_trampoline

(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_async_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_blocksize_trampoline

(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_blocksize_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_enable_last_sample_trampoline

(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_enable_last_sample_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_last_sample_trampoline

(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_last_sample_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_max_bitrate_trampoline

(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_max_bitrate_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_max_lateness_trampoline

(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_max_lateness_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_qos_trampoline

(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_qos_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_render_delay_trampoline

(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_render_delay_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_sync_trampoline

(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_sync_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_throttle_time_trampoline

(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_throttle_time_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_ts_offset_trampoline

(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_ts_offset_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-base/src/auto/base_src.rs b/gstreamer-base/src/auto/base_src.rs index 3ca63ebed..d2cbadcf0 100644 --- a/gstreamer-base/src/auto/base_src.rs +++ b/gstreamer-base/src/auto/base_src.rs @@ -210,57 +210,57 @@ impl> BaseSrcExt for O { fn connect_property_blocksize_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::blocksize\0".as_ptr() as *const _, - transmute(notify_blocksize_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_blocksize_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_do_timestamp_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::do-timestamp\0".as_ptr() as *const _, - transmute(notify_do_timestamp_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_do_timestamp_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_num_buffers_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::num-buffers\0".as_ptr() as *const _, - transmute(notify_num_buffers_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_num_buffers_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_typefind_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::typefind\0".as_ptr() as *const _, - transmute(notify_typefind_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_typefind_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_blocksize_trampoline

(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_blocksize_trampoline(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSrc::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_do_timestamp_trampoline

(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_do_timestamp_trampoline(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSrc::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_num_buffers_trampoline

(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_num_buffers_trampoline(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSrc::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_typefind_trampoline

(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_typefind_trampoline(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseSrc::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-base/src/auto/base_transform.rs b/gstreamer-base/src/auto/base_transform.rs index e38682980..4e9ea4743 100644 --- a/gstreamer-base/src/auto/base_transform.rs +++ b/gstreamer-base/src/auto/base_transform.rs @@ -165,15 +165,15 @@ impl> BaseTransformExt for O { fn connect_property_qos_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::qos\0".as_ptr() as *const _, - transmute(notify_qos_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_qos_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_qos_trampoline

(this: *mut ffi::GstBaseTransform, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_qos_trampoline(this: *mut ffi::GstBaseTransform, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&BaseTransform::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-base/src/auto/functions.rs b/gstreamer-base/src/auto/functions.rs index 66a5f2ce1..c4ceb86ad 100644 --- a/gstreamer-base/src/auto/functions.rs +++ b/gstreamer-base/src/auto/functions.rs @@ -34,11 +34,11 @@ pub fn type_find_helper_for_extension<'a, P: IsA + 'a, Q: Into, Q: IsA + 'a, R: Into>>(obj: &P, parent: R, func: /*Unknown conversion*//*Unimplemented*/TypeFindHelperGetRangeFunction, size: u64, extension: &str) -> (Option, gst::TypeFindProbability) { +//pub fn type_find_helper_get_range<'a, P: IsA, Q: IsA + 'a, R: Into>, S: FnMut(&gst::Object, &gst::Object, u64, u32, &gst::Buffer) -> gst::FlowReturn>(obj: &P, parent: R, func: S, size: u64, extension: &str) -> (Option, gst::TypeFindProbability) { // unsafe { TODO: call ffi::gst_type_find_helper_get_range() } //} //#[cfg(any(feature = "v1_14_3", feature = "dox"))] -//pub fn type_find_helper_get_range_full<'a, 'b, P: IsA, Q: IsA + 'a, R: Into>, S: Into>>(obj: &P, parent: R, func: /*Unknown conversion*//*Unimplemented*/TypeFindHelperGetRangeFunction, size: u64, extension: S) -> (gst::FlowReturn, gst::Caps, gst::TypeFindProbability) { +//pub fn type_find_helper_get_range_full<'a, 'b, P: IsA, Q: IsA + 'a, R: Into>, S: FnMut(&gst::Object, &gst::Object, u64, u32, &gst::Buffer) -> gst::FlowReturn, T: Into>>(obj: &P, parent: R, func: S, size: u64, extension: T) -> (gst::FlowReturn, gst::Caps, gst::TypeFindProbability) { // unsafe { TODO: call ffi::gst_type_find_helper_get_range_full() } //} diff --git a/gstreamer-base/src/auto/versions.txt b/gstreamer-base/src/auto/versions.txt index 502cec64b..48014f977 100644 --- a/gstreamer-base/src/auto/versions.txt +++ b/gstreamer-base/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-check/src/auto/test_clock.rs b/gstreamer-check/src/auto/test_clock.rs index ddae351fc..a28edafc5 100644 --- a/gstreamer-check/src/auto/test_clock.rs +++ b/gstreamer-check/src/auto/test_clock.rs @@ -127,9 +127,9 @@ impl TestClock { pub fn connect_property_clock_type_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::clock-type\0".as_ptr() as *const _, - transmute(notify_clock_type_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_clock_type_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -143,7 +143,7 @@ impl Default for TestClock { unsafe impl Send for TestClock {} unsafe impl Sync for TestClock {} -unsafe extern "C" fn notify_clock_type_trampoline(this: *mut ffi::GstTestClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&TestClock) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_clock_type_trampoline(this: *mut ffi::GstTestClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-check/src/auto/versions.txt b/gstreamer-check/src/auto/versions.txt index 502cec64b..48014f977 100644 --- a/gstreamer-check/src/auto/versions.txt +++ b/gstreamer-check/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-editing-services/src/auto/asset.rs b/gstreamer-editing-services/src/auto/asset.rs index 7e0ca33fd..8036cd71f 100644 --- a/gstreamer-editing-services/src/auto/asset.rs +++ b/gstreamer-editing-services/src/auto/asset.rs @@ -52,13 +52,12 @@ impl Asset { pub fn request_async<'a, P: IsA + 'a, Q: Into>, R: FnOnce(Result) + Send + 'static>(extractable_type: glib::types::Type, id: &str, cancellable: Q, callback: R) { assert_initialized_main_thread!(); let cancellable = cancellable.into(); - let user_data: Box> = Box::new(Box::new(callback)); - unsafe extern "C" fn request_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut gio_ffi::GAsyncResult, user_data: glib_ffi::gpointer) - { + let user_data: Box = Box::new(callback); + unsafe extern "C" fn request_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut gio_ffi::GAsyncResult, user_data: glib_ffi::gpointer) { let mut error = ptr::null_mut(); let ret = ffi::ges_asset_request_finish(res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; - let callback: Box> = Box::from_raw(user_data as *mut _); + let callback: Box = Box::from_raw(user_data as *mut _); callback(result); } let callback = request_async_trampoline::; @@ -184,29 +183,29 @@ impl> AssetExt for O { fn connect_property_proxy_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::proxy\0".as_ptr() as *const _, - transmute(notify_proxy_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_proxy_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_proxy_target_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::proxy-target\0".as_ptr() as *const _, - transmute(notify_proxy_target_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_proxy_target_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_proxy_trampoline

(this: *mut ffi::GESAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_proxy_trampoline(this: *mut ffi::GESAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Asset::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_proxy_target_trampoline

(this: *mut ffi::GESAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_proxy_target_trampoline(this: *mut ffi::GESAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Asset::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-editing-services/src/auto/clip.rs b/gstreamer-editing-services/src/auto/clip.rs index 6423e8507..d5eef9021 100644 --- a/gstreamer-editing-services/src/auto/clip.rs +++ b/gstreamer-editing-services/src/auto/clip.rs @@ -147,29 +147,29 @@ impl> ClipExt for O { fn connect_property_layer_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::layer\0".as_ptr() as *const _, - transmute(notify_layer_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_layer_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_supported_formats_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::supported-formats\0".as_ptr() as *const _, - transmute(notify_supported_formats_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_supported_formats_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_layer_trampoline

(this: *mut ffi::GESClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_layer_trampoline(this: *mut ffi::GESClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Clip::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_supported_formats_trampoline

(this: *mut ffi::GESClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_supported_formats_trampoline(this: *mut ffi::GESClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Clip::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-editing-services/src/auto/container.rs b/gstreamer-editing-services/src/auto/container.rs index 33a0310af..08a03c749 100644 --- a/gstreamer-editing-services/src/auto/container.rs +++ b/gstreamer-editing-services/src/auto/container.rs @@ -101,43 +101,43 @@ impl> GESContainerExt for O { fn connect_child_added(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"child-added\0".as_ptr() as *const _, - transmute(child_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(child_added_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_child_removed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"child-removed\0".as_ptr() as *const _, - transmute(child_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(child_removed_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_height_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::height\0".as_ptr() as *const _, - transmute(notify_height_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_height_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn child_added_trampoline

(this: *mut ffi::GESContainer, element: *mut ffi::GESTimelineElement, f: glib_ffi::gpointer) +unsafe extern "C" fn child_added_trampoline(this: *mut ffi::GESContainer, element: *mut ffi::GESTimelineElement, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &TimelineElement) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Container::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(element)) } -unsafe extern "C" fn child_removed_trampoline

(this: *mut ffi::GESContainer, element: *mut ffi::GESTimelineElement, f: glib_ffi::gpointer) +unsafe extern "C" fn child_removed_trampoline(this: *mut ffi::GESContainer, element: *mut ffi::GESTimelineElement, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &TimelineElement) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Container::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(element)) } -unsafe extern "C" fn notify_height_trampoline

(this: *mut ffi::GESContainer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_height_trampoline(this: *mut ffi::GESContainer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Container::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-editing-services/src/auto/effect.rs b/gstreamer-editing-services/src/auto/effect.rs index 38d58c6df..18030e9df 100644 --- a/gstreamer-editing-services/src/auto/effect.rs +++ b/gstreamer-editing-services/src/auto/effect.rs @@ -23,7 +23,7 @@ glib_wrapper! { } impl Effect { - pub fn new(bin_description: &str) -> Effect { + pub fn new(bin_description: &str) -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::ges_effect_new(bin_description.to_glib_none().0)) diff --git a/gstreamer-editing-services/src/auto/group.rs b/gstreamer-editing-services/src/auto/group.rs index 7267d56db..2d1dd060f 100644 --- a/gstreamer-editing-services/src/auto/group.rs +++ b/gstreamer-editing-services/src/auto/group.rs @@ -148,71 +148,71 @@ impl> GroupExt for O { fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, - transmute(notify_duration_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_duration_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_in_point_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::in-point\0".as_ptr() as *const _, - transmute(notify_in_point_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_in_point_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_max_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::max-duration\0".as_ptr() as *const _, - transmute(notify_max_duration_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_max_duration_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_priority_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::priority\0".as_ptr() as *const _, - transmute(notify_priority_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_priority_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_start_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::start\0".as_ptr() as *const _, - transmute(notify_start_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_start_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_duration_trampoline

(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Group::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_in_point_trampoline

(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_in_point_trampoline(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Group::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_max_duration_trampoline

(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_max_duration_trampoline(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Group::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_priority_trampoline

(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_priority_trampoline(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Group::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_start_trampoline

(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_start_trampoline(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Group::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-editing-services/src/auto/layer.rs b/gstreamer-editing-services/src/auto/layer.rs index f256bd095..876361c73 100644 --- a/gstreamer-editing-services/src/auto/layer.rs +++ b/gstreamer-editing-services/src/auto/layer.rs @@ -162,57 +162,57 @@ impl> LayerExt for O { fn connect_clip_added(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"clip-added\0".as_ptr() as *const _, - transmute(clip_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(clip_added_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_clip_removed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"clip-removed\0".as_ptr() as *const _, - transmute(clip_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(clip_removed_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_auto_transition_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::auto-transition\0".as_ptr() as *const _, - transmute(notify_auto_transition_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_auto_transition_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_priority_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::priority\0".as_ptr() as *const _, - transmute(notify_priority_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_priority_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn clip_added_trampoline

(this: *mut ffi::GESLayer, clip: *mut ffi::GESClip, f: glib_ffi::gpointer) +unsafe extern "C" fn clip_added_trampoline(this: *mut ffi::GESLayer, clip: *mut ffi::GESClip, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Clip) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Layer::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(clip)) } -unsafe extern "C" fn clip_removed_trampoline

(this: *mut ffi::GESLayer, clip: *mut ffi::GESClip, f: glib_ffi::gpointer) +unsafe extern "C" fn clip_removed_trampoline(this: *mut ffi::GESLayer, clip: *mut ffi::GESClip, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Clip) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Layer::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(clip)) } -unsafe extern "C" fn notify_auto_transition_trampoline

(this: *mut ffi::GESLayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_auto_transition_trampoline(this: *mut ffi::GESLayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Layer::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_priority_trampoline

(this: *mut ffi::GESLayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_priority_trampoline(this: *mut ffi::GESLayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Layer::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-editing-services/src/auto/pipeline.rs b/gstreamer-editing-services/src/auto/pipeline.rs index 75feef662..61b8caf2a 100644 --- a/gstreamer-editing-services/src/auto/pipeline.rs +++ b/gstreamer-editing-services/src/auto/pipeline.rs @@ -236,85 +236,85 @@ impl> GESPipelineExt for O { fn connect_property_audio_filter_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::audio-filter\0".as_ptr() as *const _, - transmute(notify_audio_filter_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_audio_filter_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_audio_sink_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::audio-sink\0".as_ptr() as *const _, - transmute(notify_audio_sink_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_audio_sink_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_mode_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::mode\0".as_ptr() as *const _, - transmute(notify_mode_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_mode_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_timeline_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::timeline\0".as_ptr() as *const _, - transmute(notify_timeline_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_timeline_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_video_filter_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::video-filter\0".as_ptr() as *const _, - transmute(notify_video_filter_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_video_filter_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_video_sink_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::video-sink\0".as_ptr() as *const _, - transmute(notify_video_sink_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_video_sink_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_audio_filter_trampoline

(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_audio_filter_trampoline(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_audio_sink_trampoline

(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_audio_sink_trampoline(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_mode_trampoline

(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_mode_trampoline(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_timeline_trampoline

(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_timeline_trampoline(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_video_filter_trampoline

(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_video_filter_trampoline(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_video_sink_trampoline

(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_video_sink_trampoline(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-editing-services/src/auto/project.rs b/gstreamer-editing-services/src/auto/project.rs index 794c53fa6..95c326402 100644 --- a/gstreamer-editing-services/src/auto/project.rs +++ b/gstreamer-editing-services/src/auto/project.rs @@ -162,85 +162,85 @@ impl> ProjectExt for O { fn connect_asset_added(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"asset-added\0".as_ptr() as *const _, - transmute(asset_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(asset_added_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_asset_loading(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"asset-loading\0".as_ptr() as *const _, - transmute(asset_loading_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(asset_loading_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_asset_removed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"asset-removed\0".as_ptr() as *const _, - transmute(asset_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(asset_removed_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_error_loading_asset(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"error-loading-asset\0".as_ptr() as *const _, - transmute(error_loading_asset_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(error_loading_asset_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_loaded(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"loaded\0".as_ptr() as *const _, - transmute(loaded_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(loaded_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_missing_uri Option + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_ Option + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"missing-uri\0".as_ptr() as *const _, - transmute(missing_uri_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(missing_uri_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn asset_added_trampoline

(this: *mut ffi::GESProject, asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) +unsafe extern "C" fn asset_added_trampoline(this: *mut ffi::GESProject, asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Asset) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(asset)) } -unsafe extern "C" fn asset_loading_trampoline

(this: *mut ffi::GESProject, asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) +unsafe extern "C" fn asset_loading_trampoline(this: *mut ffi::GESProject, asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Asset) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(asset)) } -unsafe extern "C" fn asset_removed_trampoline

(this: *mut ffi::GESProject, asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) +unsafe extern "C" fn asset_removed_trampoline(this: *mut ffi::GESProject, asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Asset) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(asset)) } -unsafe extern "C" fn error_loading_asset_trampoline

(this: *mut ffi::GESProject, error: *mut glib_ffi::GError, id: *mut libc::c_char, extractable_type: glib_ffi::GType, f: glib_ffi::gpointer) +unsafe extern "C" fn error_loading_asset_trampoline(this: *mut ffi::GESProject, error: *mut glib_ffi::GError, id: *mut libc::c_char, extractable_type: glib_ffi::GType, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Error, &str, glib::types::Type) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(error), &GString::from_glib_borrow(id), from_glib(extractable_type)) } -unsafe extern "C" fn loaded_trampoline

(this: *mut ffi::GESProject, timeline: *mut ffi::GESTimeline, f: glib_ffi::gpointer) +unsafe extern "C" fn loaded_trampoline(this: *mut ffi::GESProject, timeline: *mut ffi::GESTimeline, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Timeline) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(timeline)) } -unsafe extern "C" fn missing_uri_trampoline

(this: *mut ffi::GESProject, error: *mut glib_ffi::GError, wrong_asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) -> *mut libc::c_char +unsafe extern "C" fn missing_uri_trampoline Option + 'static>(this: *mut ffi::GESProject, error: *mut glib_ffi::GError, wrong_asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) -> *mut libc::c_char where P: IsA { - let f: &&(Fn(&P, &Error, &Asset) -> Option + 'static) = transmute(f); + let f: &F = transmute(f); f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(error), &from_glib_borrow(wrong_asset)).to_glib_full() } diff --git a/gstreamer-editing-services/src/auto/timeline.rs b/gstreamer-editing-services/src/auto/timeline.rs index a1dfda0e6..d6366e45d 100644 --- a/gstreamer-editing-services/src/auto/timeline.rs +++ b/gstreamer-editing-services/src/auto/timeline.rs @@ -292,17 +292,17 @@ impl> TimelineExt for O { fn connect_commited(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"commited\0".as_ptr() as *const _, - transmute(commited_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(commited_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_group_added(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"group-added\0".as_ptr() as *const _, - transmute(group_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(group_added_trampoline:: as usize)), Box_::into_raw(f)) } } @@ -312,17 +312,17 @@ impl> TimelineExt for O { fn connect_layer_added(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"layer-added\0".as_ptr() as *const _, - transmute(layer_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(layer_added_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_layer_removed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"layer-removed\0".as_ptr() as *const _, - transmute(layer_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(layer_removed_trampoline:: as usize)), Box_::into_raw(f)) } } @@ -332,123 +332,123 @@ impl> TimelineExt for O { fn connect_snapping_ended(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"snapping-ended\0".as_ptr() as *const _, - transmute(snapping_ended_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(snapping_ended_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_snapping_started(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"snapping-started\0".as_ptr() as *const _, - transmute(snapping_started_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(snapping_started_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_track_added(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"track-added\0".as_ptr() as *const _, - transmute(track_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(track_added_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_track_removed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"track-removed\0".as_ptr() as *const _, - transmute(track_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(track_removed_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_auto_transition_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::auto-transition\0".as_ptr() as *const _, - transmute(notify_auto_transition_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_auto_transition_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, - transmute(notify_duration_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_duration_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_snapping_distance_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::snapping-distance\0".as_ptr() as *const _, - transmute(notify_snapping_distance_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_snapping_distance_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn commited_trampoline

(this: *mut ffi::GESTimeline, f: glib_ffi::gpointer) +unsafe extern "C" fn commited_trampoline(this: *mut ffi::GESTimeline, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Timeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn group_added_trampoline

(this: *mut ffi::GESTimeline, group: *mut ffi::GESGroup, f: glib_ffi::gpointer) +unsafe extern "C" fn group_added_trampoline(this: *mut ffi::GESTimeline, group: *mut ffi::GESGroup, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Group) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(group)) } -unsafe extern "C" fn layer_added_trampoline

(this: *mut ffi::GESTimeline, layer: *mut ffi::GESLayer, f: glib_ffi::gpointer) +unsafe extern "C" fn layer_added_trampoline(this: *mut ffi::GESTimeline, layer: *mut ffi::GESLayer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Layer) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(layer)) } -unsafe extern "C" fn layer_removed_trampoline

(this: *mut ffi::GESTimeline, layer: *mut ffi::GESLayer, f: glib_ffi::gpointer) +unsafe extern "C" fn layer_removed_trampoline(this: *mut ffi::GESTimeline, layer: *mut ffi::GESLayer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Layer) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(layer)) } -unsafe extern "C" fn snapping_ended_trampoline

(this: *mut ffi::GESTimeline, object: *mut ffi::GESTrackElement, p0: *mut ffi::GESTrackElement, p1: u64, f: glib_ffi::gpointer) +unsafe extern "C" fn snapping_ended_trampoline(this: *mut ffi::GESTimeline, object: *mut ffi::GESTrackElement, p0: *mut ffi::GESTrackElement, p1: u64, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &TrackElement, &TrackElement, u64) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object), &from_glib_borrow(p0), p1) } -unsafe extern "C" fn snapping_started_trampoline

(this: *mut ffi::GESTimeline, object: *mut ffi::GESTrackElement, p0: *mut ffi::GESTrackElement, p1: u64, f: glib_ffi::gpointer) +unsafe extern "C" fn snapping_started_trampoline(this: *mut ffi::GESTimeline, object: *mut ffi::GESTrackElement, p0: *mut ffi::GESTrackElement, p1: u64, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &TrackElement, &TrackElement, u64) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object), &from_glib_borrow(p0), p1) } -unsafe extern "C" fn track_added_trampoline

(this: *mut ffi::GESTimeline, track: *mut ffi::GESTrack, f: glib_ffi::gpointer) +unsafe extern "C" fn track_added_trampoline(this: *mut ffi::GESTimeline, track: *mut ffi::GESTrack, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Track) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(track)) } -unsafe extern "C" fn track_removed_trampoline

(this: *mut ffi::GESTimeline, track: *mut ffi::GESTrack, f: glib_ffi::gpointer) +unsafe extern "C" fn track_removed_trampoline(this: *mut ffi::GESTimeline, track: *mut ffi::GESTrack, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Track) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(track)) } -unsafe extern "C" fn notify_auto_transition_trampoline

(this: *mut ffi::GESTimeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_auto_transition_trampoline(this: *mut ffi::GESTimeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Timeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_duration_trampoline

(this: *mut ffi::GESTimeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GESTimeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Timeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_snapping_distance_trampoline

(this: *mut ffi::GESTimeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_snapping_distance_trampoline(this: *mut ffi::GESTimeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Timeline::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-editing-services/src/auto/timeline_element.rs b/gstreamer-editing-services/src/auto/timeline_element.rs index 96a72f77c..dbb88d9ab 100644 --- a/gstreamer-editing-services/src/auto/timeline_element.rs +++ b/gstreamer-editing-services/src/auto/timeline_element.rs @@ -31,7 +31,7 @@ glib_wrapper! { pub const NONE_TIMELINE_ELEMENT: Option<&TimelineElement> = None; pub trait TimelineElementExt: 'static { - //fn add_child_property, Q: IsA>(&self, pspec: &P, child: &Q) -> bool; + //fn add_child_property>(&self, pspec: /*Ignored*/&glib::ParamSpec, child: &P) -> bool; fn copy(&self, deep: bool) -> Option; @@ -39,7 +39,7 @@ pub trait TimelineElementExt: 'static { //fn get_child_property(&self, property_name: &str, value: /*Ignored*/glib::Value) -> bool; - //fn get_child_property_by_pspec>(&self, pspec: &P, value: /*Ignored*/glib::Value); + //fn get_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/glib::Value); //fn get_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); @@ -69,7 +69,7 @@ pub trait TimelineElementExt: 'static { fn paste(&self, paste_position: gst::ClockTime) -> Option; - //fn remove_child_property>(&self, pspec: &P) -> bool; + //fn remove_child_property(&self, pspec: /*Ignored*/&glib::ParamSpec) -> bool; fn ripple(&self, start: gst::ClockTime) -> bool; @@ -83,7 +83,7 @@ pub trait TimelineElementExt: 'static { //fn set_child_property(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> bool; - //fn set_child_property_by_pspec>(&self, pspec: &P, value: /*Ignored*/&glib::Value); + //fn set_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/&glib::Value); //fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); @@ -135,7 +135,7 @@ pub trait TimelineElementExt: 'static { } impl> TimelineElementExt for O { - //fn add_child_property, Q: IsA>(&self, pspec: &P, child: &Q) -> bool { + //fn add_child_property>(&self, pspec: /*Ignored*/&glib::ParamSpec, child: &P) -> bool { // unsafe { TODO: call ffi::ges_timeline_element_add_child_property() } //} @@ -153,7 +153,7 @@ impl> TimelineElementExt for O { // unsafe { TODO: call ffi::ges_timeline_element_get_child_property() } //} - //fn get_child_property_by_pspec>(&self, pspec: &P, value: /*Ignored*/glib::Value) { + //fn get_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/glib::Value) { // unsafe { TODO: call ffi::ges_timeline_element_get_child_property_by_pspec() } //} @@ -235,7 +235,7 @@ impl> TimelineElementExt for O { } } - //fn remove_child_property>(&self, pspec: &P) -> bool { + //fn remove_child_property(&self, pspec: /*Ignored*/&glib::ParamSpec) -> bool { // unsafe { TODO: call ffi::ges_timeline_element_remove_child_property() } //} @@ -271,7 +271,7 @@ impl> TimelineElementExt for O { // unsafe { TODO: call ffi::ges_timeline_element_set_child_property() } //} - //fn set_child_property_by_pspec>(&self, pspec: &P, value: /*Ignored*/&glib::Value) { + //fn set_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/&glib::Value) { // unsafe { TODO: call ffi::ges_timeline_element_set_child_property_by_pspec() } //} @@ -368,127 +368,127 @@ impl> TimelineElementExt for O { fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, - transmute(notify_duration_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_duration_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_in_point_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::in-point\0".as_ptr() as *const _, - transmute(notify_in_point_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_in_point_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_max_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::max-duration\0".as_ptr() as *const _, - transmute(notify_max_duration_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_max_duration_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_name_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::name\0".as_ptr() as *const _, - transmute(notify_name_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_name_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_parent_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::parent\0".as_ptr() as *const _, - transmute(notify_parent_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_parent_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_priority_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::priority\0".as_ptr() as *const _, - transmute(notify_priority_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_priority_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_serialize_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::serialize\0".as_ptr() as *const _, - transmute(notify_serialize_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_serialize_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_start_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::start\0".as_ptr() as *const _, - transmute(notify_start_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_start_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_timeline_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::timeline\0".as_ptr() as *const _, - transmute(notify_timeline_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_timeline_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_duration_trampoline

(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_in_point_trampoline

(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_in_point_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_max_duration_trampoline

(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_max_duration_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_name_trampoline

(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_name_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_parent_trampoline

(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_parent_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_priority_trampoline

(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_priority_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_serialize_trampoline

(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_serialize_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_start_trampoline

(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_start_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_timeline_trampoline

(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_timeline_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-editing-services/src/auto/track.rs b/gstreamer-editing-services/src/auto/track.rs index 01894523b..5de333269 100644 --- a/gstreamer-editing-services/src/auto/track.rs +++ b/gstreamer-editing-services/src/auto/track.rs @@ -54,7 +54,7 @@ pub trait GESTrackExt: 'static { fn remove_element>(&self, object: &P) -> Result<(), glib::error::BoolError>; - //fn set_create_element_for_gap_func(&self, func: /*Unknown conversion*//*Unimplemented*/CreateElementForGapFunc); + //fn set_create_element_for_gap_func gst::Element + 'static>(&self, func: P); fn set_mixing(&self, mixing: bool); @@ -126,7 +126,7 @@ impl> GESTrackExt for O { } } - //fn set_create_element_for_gap_func(&self, func: /*Unknown conversion*//*Unimplemented*/CreateElementForGapFunc) { + //fn set_create_element_for_gap_func gst::Element + 'static>(&self, func: P) { // unsafe { TODO: call ffi::ges_track_set_create_element_for_gap_func() } //} @@ -180,85 +180,85 @@ impl> GESTrackExt for O { fn connect_commited(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"commited\0".as_ptr() as *const _, - transmute(commited_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(commited_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_track_element_added(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"track-element-added\0".as_ptr() as *const _, - transmute(track_element_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(track_element_added_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_track_element_removed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"track-element-removed\0".as_ptr() as *const _, - transmute(track_element_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(track_element_removed_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, - transmute(notify_duration_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_duration_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_mixing_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::mixing\0".as_ptr() as *const _, - transmute(notify_mixing_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_mixing_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_restriction_caps_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::restriction-caps\0".as_ptr() as *const _, - transmute(notify_restriction_caps_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_restriction_caps_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn commited_trampoline

(this: *mut ffi::GESTrack, f: glib_ffi::gpointer) +unsafe extern "C" fn commited_trampoline(this: *mut ffi::GESTrack, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Track::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn track_element_added_trampoline

(this: *mut ffi::GESTrack, effect: *mut ffi::GESTrackElement, f: glib_ffi::gpointer) +unsafe extern "C" fn track_element_added_trampoline(this: *mut ffi::GESTrack, effect: *mut ffi::GESTrackElement, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &TrackElement) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Track::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(effect)) } -unsafe extern "C" fn track_element_removed_trampoline

(this: *mut ffi::GESTrack, effect: *mut ffi::GESTrackElement, f: glib_ffi::gpointer) +unsafe extern "C" fn track_element_removed_trampoline(this: *mut ffi::GESTrack, effect: *mut ffi::GESTrackElement, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &TrackElement) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Track::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(effect)) } -unsafe extern "C" fn notify_duration_trampoline

(this: *mut ffi::GESTrack, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GESTrack, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Track::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_mixing_trampoline

(this: *mut ffi::GESTrack, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_mixing_trampoline(this: *mut ffi::GESTrack, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Track::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_restriction_caps_trampoline

(this: *mut ffi::GESTrack, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_restriction_caps_trampoline(this: *mut ffi::GESTrack, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&Track::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-editing-services/src/auto/track_element.rs b/gstreamer-editing-services/src/auto/track_element.rs index 14ca637e7..2cb9356b3 100644 --- a/gstreamer-editing-services/src/auto/track_element.rs +++ b/gstreamer-editing-services/src/auto/track_element.rs @@ -61,7 +61,7 @@ pub trait TrackElementExt: 'static { fn set_active(&self, active: bool) -> bool; - //fn set_control_source>(&self, source: &P, property_name: &str, binding_type: &str) -> bool; + //fn set_control_source(&self, source: /*Ignored*/&gst::ControlSource, property_name: &str, binding_type: &str) -> bool; fn set_track_type(&self, type_: TrackType); @@ -151,7 +151,7 @@ impl> TrackElementExt for O { } } - //fn set_control_source>(&self, source: &P, property_name: &str, binding_type: &str) -> bool { + //fn set_control_source(&self, source: /*Ignored*/&gst::ControlSource, property_name: &str, binding_type: &str) -> bool { // unsafe { TODO: call ffi::ges_track_element_set_control_source() } //} @@ -179,43 +179,43 @@ impl> TrackElementExt for O { fn connect_property_active_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::active\0".as_ptr() as *const _, - transmute(notify_active_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_active_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_track_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::track\0".as_ptr() as *const _, - transmute(notify_track_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_track_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_track_type_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::track-type\0".as_ptr() as *const _, - transmute(notify_track_type_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_track_type_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_active_trampoline

(this: *mut ffi::GESTrackElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_active_trampoline(this: *mut ffi::GESTrackElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&TrackElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_track_trampoline

(this: *mut ffi::GESTrackElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_track_trampoline(this: *mut ffi::GESTrackElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&TrackElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_track_type_trampoline

(this: *mut ffi::GESTrackElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_track_type_trampoline(this: *mut ffi::GESTrackElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&TrackElement::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-editing-services/src/auto/uri_clip.rs b/gstreamer-editing-services/src/auto/uri_clip.rs index 2cec8fd84..020508e51 100644 --- a/gstreamer-editing-services/src/auto/uri_clip.rs +++ b/gstreamer-editing-services/src/auto/uri_clip.rs @@ -29,7 +29,7 @@ glib_wrapper! { } impl UriClip { - pub fn new(uri: &str) -> UriClip { + pub fn new(uri: &str) -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::ges_uri_clip_new(uri.to_glib_none().0)) @@ -110,43 +110,43 @@ impl> UriClipExt for O { fn connect_property_is_image_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::is-image\0".as_ptr() as *const _, - transmute(notify_is_image_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_is_image_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_mute_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::mute\0".as_ptr() as *const _, - transmute(notify_mute_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_mute_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_supported_formats_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::supported-formats\0".as_ptr() as *const _, - transmute(notify_supported_formats_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_supported_formats_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_is_image_trampoline

(this: *mut ffi::GESUriClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_is_image_trampoline(this: *mut ffi::GESUriClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&UriClip::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_mute_trampoline

(this: *mut ffi::GESUriClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_mute_trampoline(this: *mut ffi::GESUriClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&UriClip::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_supported_formats_trampoline

(this: *mut ffi::GESUriClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_supported_formats_trampoline(this: *mut ffi::GESUriClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&UriClip::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-editing-services/src/auto/uri_clip_asset.rs b/gstreamer-editing-services/src/auto/uri_clip_asset.rs index 247d1c18d..4ff4d3389 100644 --- a/gstreamer-editing-services/src/auto/uri_clip_asset.rs +++ b/gstreamer-editing-services/src/auto/uri_clip_asset.rs @@ -29,7 +29,7 @@ glib_wrapper! { } impl UriClipAsset { - //pub fn new<'a, P: IsA + 'a, Q: Into>, R: /*Unimplemented*/gio::AsyncReadyCallback>(uri: &str, cancellable: Q, callback: R) { + //pub fn new<'a, P: IsA + 'a, Q: Into>, R: FnOnce(Result<(), Error>) + 'static>(uri: &str, cancellable: Q, callback: R) { // unsafe { TODO: call ffi::ges_uri_clip_asset_new() } //} @@ -92,15 +92,15 @@ impl> UriClipAssetExt for O { fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, - transmute(notify_duration_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_duration_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_duration_trampoline

(this: *mut ffi::GESUriClipAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GESUriClipAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + 'static) = transmute(f); + let f: &F = transmute(f); f(&UriClipAsset::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-editing-services/src/auto/versions.txt b/gstreamer-editing-services/src/auto/versions.txt index 502cec64b..48014f977 100644 --- a/gstreamer-editing-services/src/auto/versions.txt +++ b/gstreamer-editing-services/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-gl/src/auto/gl_base_filter.rs b/gstreamer-gl/src/auto/gl_base_filter.rs index 2d6aa8771..0346e5a71 100644 --- a/gstreamer-gl/src/auto/gl_base_filter.rs +++ b/gstreamer-gl/src/auto/gl_base_filter.rs @@ -47,15 +47,15 @@ impl> GLBaseFilterExt for O { fn connect_property_context_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::context\0".as_ptr() as *const _, - transmute(notify_context_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_context_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_context_trampoline

(this: *mut ffi::GstGLBaseFilter, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_context_trampoline(this: *mut ffi::GstGLBaseFilter, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&GLBaseFilter::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-gl/src/auto/gl_display.rs b/gstreamer-gl/src/auto/gl_display.rs index b98e236da..9da8c496c 100644 --- a/gstreamer-gl/src/auto/gl_display.rs +++ b/gstreamer-gl/src/auto/gl_display.rs @@ -122,15 +122,15 @@ impl> GLDisplayExt for O { fn connect_create_context GLContext + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_ GLContext + Send + Sync + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"create-context\0".as_ptr() as *const _, - transmute(create_context_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(create_context_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn create_context_trampoline

(this: *mut ffi::GstGLDisplay, context: *mut ffi::GstGLContext, f: glib_ffi::gpointer) -> *mut ffi::GstGLContext +unsafe extern "C" fn create_context_trampoline GLContext + Send + Sync + 'static>(this: *mut ffi::GstGLDisplay, context: *mut ffi::GstGLContext, f: glib_ffi::gpointer) -> *mut ffi::GstGLContext where P: IsA { - let f: &&(Fn(&P, &GLContext) -> GLContext + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&GLDisplay::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(context)).to_glib_full() } diff --git a/gstreamer-gl/src/auto/gl_display_egl.rs b/gstreamer-gl/src/auto/gl_display_egl.rs index 0a97f0880..18dfac41c 100644 --- a/gstreamer-gl/src/auto/gl_display_egl.rs +++ b/gstreamer-gl/src/auto/gl_display_egl.rs @@ -23,7 +23,7 @@ impl GLDisplayEGL { } } - //pub fn new_with_egl_display>>(display: P) -> GLDisplayEGL { + //pub fn new_with_egl_display(display: /*Unimplemented*/Option) -> GLDisplayEGL { // unsafe { TODO: call ffi::gst_gl_display_egl_new_with_egl_display() } //} diff --git a/gstreamer-gl/src/auto/gl_framebuffer.rs b/gstreamer-gl/src/auto/gl_framebuffer.rs index bad058750..5c5c7e219 100644 --- a/gstreamer-gl/src/auto/gl_framebuffer.rs +++ b/gstreamer-gl/src/auto/gl_framebuffer.rs @@ -43,7 +43,7 @@ pub trait GLFramebufferExt: 'static { fn bind(&self); - //fn draw_to_texture>>(&self, mem: /*Ignored*/&mut GLMemory, func: /*Unknown conversion*//*Unimplemented*/GLFramebufferFunc, user_data: P) -> bool; + //fn draw_to_texture(&self, mem: /*Ignored*/&mut GLMemory, func: /*Unimplemented*/Fn(/*Unimplemented*/Fundamental: Pointer) -> bool, user_data: /*Unimplemented*/Option) -> bool; fn get_effective_dimensions(&self) -> (u32, u32); @@ -61,7 +61,7 @@ impl> GLFramebufferExt for O { } } - //fn draw_to_texture>>(&self, mem: /*Ignored*/&mut GLMemory, func: /*Unknown conversion*//*Unimplemented*/GLFramebufferFunc, user_data: P) -> bool { + //fn draw_to_texture(&self, mem: /*Ignored*/&mut GLMemory, func: /*Unimplemented*/Fn(/*Unimplemented*/Fundamental: Pointer) -> bool, user_data: /*Unimplemented*/Option) -> bool { // unsafe { TODO: call ffi::gst_gl_framebuffer_draw_to_texture() } //} diff --git a/gstreamer-gl/src/auto/gl_shader.rs b/gstreamer-gl/src/auto/gl_shader.rs index 2e9a9efe2..4b8a5bd51 100644 --- a/gstreamer-gl/src/auto/gl_shader.rs +++ b/gstreamer-gl/src/auto/gl_shader.rs @@ -255,9 +255,9 @@ impl GLShader { pub fn connect_property_linked_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::linked\0".as_ptr() as *const _, - transmute(notify_linked_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_linked_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -265,7 +265,7 @@ impl GLShader { unsafe impl Send for GLShader {} unsafe impl Sync for GLShader {} -unsafe extern "C" fn notify_linked_trampoline(this: *mut ffi::GstGLShader, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&GLShader) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_linked_trampoline(this: *mut ffi::GstGLShader, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-gl/src/auto/gl_view_convert.rs b/gstreamer-gl/src/auto/gl_view_convert.rs index 60cb5a1f1..c96124ba7 100644 --- a/gstreamer-gl/src/auto/gl_view_convert.rs +++ b/gstreamer-gl/src/auto/gl_view_convert.rs @@ -137,41 +137,41 @@ impl GLViewConvert { pub fn connect_property_downmix_mode_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::downmix-mode\0".as_ptr() as *const _, - transmute(notify_downmix_mode_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_downmix_mode_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_input_flags_override_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::input-flags-override\0".as_ptr() as *const _, - transmute(notify_input_flags_override_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_input_flags_override_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_input_mode_override_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::input-mode-override\0".as_ptr() as *const _, - transmute(notify_input_mode_override_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_input_mode_override_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_output_flags_override_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::output-flags-override\0".as_ptr() as *const _, - transmute(notify_output_flags_override_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_output_flags_override_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_output_mode_override_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::output-mode-override\0".as_ptr() as *const _, - transmute(notify_output_mode_override_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_output_mode_override_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -185,27 +185,27 @@ impl Default for GLViewConvert { unsafe impl Send for GLViewConvert {} unsafe impl Sync for GLViewConvert {} -unsafe extern "C" fn notify_downmix_mode_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&GLViewConvert) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_downmix_mode_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_input_flags_override_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&GLViewConvert) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_input_flags_override_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_input_mode_override_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&GLViewConvert) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_input_mode_override_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_output_flags_override_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&GLViewConvert) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_output_flags_override_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_output_mode_override_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&GLViewConvert) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_output_mode_override_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-gl/src/auto/gl_window.rs b/gstreamer-gl/src/auto/gl_window.rs index 1eda38a4f..182174e81 100644 --- a/gstreamer-gl/src/auto/gl_window.rs +++ b/gstreamer-gl/src/auto/gl_window.rs @@ -156,29 +156,29 @@ impl> GLWindowExt for O { fn connect_key_event(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"key-event\0".as_ptr() as *const _, - transmute(key_event_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(key_event_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_mouse_event(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"mouse-event\0".as_ptr() as *const _, - transmute(mouse_event_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(mouse_event_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn key_event_trampoline

(this: *mut ffi::GstGLWindow, id: *mut libc::c_char, key: *mut libc::c_char, f: glib_ffi::gpointer) +unsafe extern "C" fn key_event_trampoline(this: *mut ffi::GstGLWindow, id: *mut libc::c_char, key: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &str, &str) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&GLWindow::from_glib_borrow(this).unsafe_cast(), &GString::from_glib_borrow(id), &GString::from_glib_borrow(key)) } -unsafe extern "C" fn mouse_event_trampoline

(this: *mut ffi::GstGLWindow, id: *mut libc::c_char, button: libc::c_int, x: libc::c_double, y: libc::c_double, f: glib_ffi::gpointer) +unsafe extern "C" fn mouse_event_trampoline(this: *mut ffi::GstGLWindow, id: *mut libc::c_char, button: libc::c_int, x: libc::c_double, y: libc::c_double, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &str, i32, f64, f64) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&GLWindow::from_glib_borrow(this).unsafe_cast(), &GString::from_glib_borrow(id), button, x, y) } diff --git a/gstreamer-gl/src/auto/versions.txt b/gstreamer-gl/src/auto/versions.txt index 502cec64b..48014f977 100644 --- a/gstreamer-gl/src/auto/versions.txt +++ b/gstreamer-gl/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-net/src/auto/net_client_clock.rs b/gstreamer-net/src/auto/net_client_clock.rs index bf0534185..e3db228cb 100644 --- a/gstreamer-net/src/auto/net_client_clock.rs +++ b/gstreamer-net/src/auto/net_client_clock.rs @@ -130,57 +130,57 @@ impl NetClientClock { pub fn connect_property_address_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::address\0".as_ptr() as *const _, - transmute(notify_address_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_address_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_bus_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::bus\0".as_ptr() as *const _, - transmute(notify_bus_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_bus_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_internal_clock_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::internal-clock\0".as_ptr() as *const _, - transmute(notify_internal_clock_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_internal_clock_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_minimum_update_interval_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::minimum-update-interval\0".as_ptr() as *const _, - transmute(notify_minimum_update_interval_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_minimum_update_interval_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_port_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::port\0".as_ptr() as *const _, - transmute(notify_port_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_port_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_qos_dscp_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::qos-dscp\0".as_ptr() as *const _, - transmute(notify_qos_dscp_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_qos_dscp_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_round_trip_limit_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::round-trip-limit\0".as_ptr() as *const _, - transmute(notify_round_trip_limit_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_round_trip_limit_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -188,37 +188,37 @@ impl NetClientClock { unsafe impl Send for NetClientClock {} unsafe impl Sync for NetClientClock {} -unsafe extern "C" fn notify_address_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&NetClientClock) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_address_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_bus_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&NetClientClock) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_bus_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_internal_clock_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&NetClientClock) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_internal_clock_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_minimum_update_interval_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&NetClientClock) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_minimum_update_interval_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_port_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&NetClientClock) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_port_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_qos_dscp_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&NetClientClock) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_qos_dscp_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_round_trip_limit_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&NetClientClock) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_round_trip_limit_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(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 9b5fffddd..0f53d2f77 100644 --- a/gstreamer-net/src/auto/net_time_provider.rs +++ b/gstreamer-net/src/auto/net_time_provider.rs @@ -79,17 +79,17 @@ impl NetTimeProvider { pub fn connect_property_active_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::active\0".as_ptr() as *const _, - transmute(notify_active_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_active_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_qos_dscp_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::qos-dscp\0".as_ptr() as *const _, - transmute(notify_qos_dscp_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_qos_dscp_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -97,12 +97,12 @@ impl NetTimeProvider { unsafe impl Send for NetTimeProvider {} unsafe impl Sync for NetTimeProvider {} -unsafe extern "C" fn notify_active_trampoline(this: *mut ffi::GstNetTimeProvider, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&NetTimeProvider) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_active_trampoline(this: *mut ffi::GstNetTimeProvider, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_qos_dscp_trampoline(this: *mut ffi::GstNetTimeProvider, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&NetTimeProvider) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_qos_dscp_trampoline(this: *mut ffi::GstNetTimeProvider, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-net/src/auto/ptp_clock.rs b/gstreamer-net/src/auto/ptp_clock.rs index 84ca6ab39..ae220f732 100644 --- a/gstreamer-net/src/auto/ptp_clock.rs +++ b/gstreamer-net/src/auto/ptp_clock.rs @@ -58,25 +58,25 @@ impl PtpClock { pub fn connect_property_grandmaster_clock_id_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::grandmaster-clock-id\0".as_ptr() as *const _, - transmute(notify_grandmaster_clock_id_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_grandmaster_clock_id_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_internal_clock_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::internal-clock\0".as_ptr() as *const _, - transmute(notify_internal_clock_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_internal_clock_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_master_clock_id_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::master-clock-id\0".as_ptr() as *const _, - transmute(notify_master_clock_id_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_master_clock_id_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -84,17 +84,17 @@ impl PtpClock { unsafe impl Send for PtpClock {} unsafe impl Sync for PtpClock {} -unsafe extern "C" fn notify_grandmaster_clock_id_trampoline(this: *mut ffi::GstPtpClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&PtpClock) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_grandmaster_clock_id_trampoline(this: *mut ffi::GstPtpClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_internal_clock_trampoline(this: *mut ffi::GstPtpClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&PtpClock) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_internal_clock_trampoline(this: *mut ffi::GstPtpClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_master_clock_id_trampoline(this: *mut ffi::GstPtpClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&PtpClock) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_master_clock_id_trampoline(this: *mut ffi::GstPtpClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-net/src/auto/versions.txt b/gstreamer-net/src/auto/versions.txt index 502cec64b..48014f977 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 @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-pbutils/src/auto/discoverer.rs b/gstreamer-pbutils/src/auto/discoverer.rs index fcb5e02bc..b4939c3a0 100644 --- a/gstreamer-pbutils/src/auto/discoverer.rs +++ b/gstreamer-pbutils/src/auto/discoverer.rs @@ -63,33 +63,33 @@ impl Discoverer { pub fn connect_discovered) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_) + Send + Sync + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"discovered\0".as_ptr() as *const _, - transmute(discovered_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(discovered_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_finished(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"finished\0".as_ptr() as *const _, - transmute(finished_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(finished_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_source_setup(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"source-setup\0".as_ptr() as *const _, - transmute(source_setup_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(source_setup_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_starting(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"starting\0".as_ptr() as *const _, - transmute(starting_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(starting_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -97,22 +97,22 @@ impl Discoverer { unsafe impl Send for Discoverer {} unsafe impl Sync for Discoverer {} -unsafe extern "C" fn discovered_trampoline(this: *mut ffi::GstDiscoverer, info: *mut ffi::GstDiscovererInfo, error: *mut glib_ffi::GError, f: glib_ffi::gpointer) { - let f: &&(Fn(&Discoverer, &DiscovererInfo, &Option) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn discovered_trampoline) + Send + Sync + 'static>(this: *mut ffi::GstDiscoverer, info: *mut ffi::GstDiscovererInfo, error: *mut glib_ffi::GError, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), &from_glib_borrow(info), &from_glib_borrow(error)) } -unsafe extern "C" fn finished_trampoline(this: *mut ffi::GstDiscoverer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Discoverer) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn finished_trampoline(this: *mut ffi::GstDiscoverer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn source_setup_trampoline(this: *mut ffi::GstDiscoverer, source: *mut gst_ffi::GstElement, f: glib_ffi::gpointer) { - let f: &&(Fn(&Discoverer, &gst::Element) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn source_setup_trampoline(this: *mut ffi::GstDiscoverer, source: *mut gst_ffi::GstElement, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), &from_glib_borrow(source)) } -unsafe extern "C" fn starting_trampoline(this: *mut ffi::GstDiscoverer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Discoverer) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn starting_trampoline(this: *mut ffi::GstDiscoverer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-pbutils/src/auto/versions.txt b/gstreamer-pbutils/src/auto/versions.txt index 502cec64b..48014f977 100644 --- a/gstreamer-pbutils/src/auto/versions.txt +++ b/gstreamer-pbutils/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-player/src/auto/player.rs b/gstreamer-player/src/auto/player.rs index 2ab4d900b..c39225e71 100644 --- a/gstreamer-player/src/auto/player.rs +++ b/gstreamer-player/src/auto/player.rs @@ -352,201 +352,201 @@ impl Player { pub fn connect_buffering(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"buffering\0".as_ptr() as *const _, - transmute(buffering_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(buffering_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_end_of_stream(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"end-of-stream\0".as_ptr() as *const _, - transmute(end_of_stream_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(end_of_stream_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_error(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"error\0".as_ptr() as *const _, - transmute(error_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(error_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_media_info_updated(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"media-info-updated\0".as_ptr() as *const _, - transmute(media_info_updated_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(media_info_updated_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_mute_changed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"mute-changed\0".as_ptr() as *const _, - transmute(mute_changed_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(mute_changed_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_state_changed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"state-changed\0".as_ptr() as *const _, - transmute(state_changed_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(state_changed_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_uri_loaded(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"uri-loaded\0".as_ptr() as *const _, - transmute(uri_loaded_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(uri_loaded_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_video_dimensions_changed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"video-dimensions-changed\0".as_ptr() as *const _, - transmute(video_dimensions_changed_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(video_dimensions_changed_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_volume_changed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"volume-changed\0".as_ptr() as *const _, - transmute(volume_changed_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(volume_changed_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_warning(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"warning\0".as_ptr() as *const _, - transmute(warning_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(warning_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_audio_video_offset_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::audio-video-offset\0".as_ptr() as *const _, - transmute(notify_audio_video_offset_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_audio_video_offset_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_current_audio_track_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::current-audio-track\0".as_ptr() as *const _, - transmute(notify_current_audio_track_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_current_audio_track_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_current_subtitle_track_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::current-subtitle-track\0".as_ptr() as *const _, - transmute(notify_current_subtitle_track_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_current_subtitle_track_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_current_video_track_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::current-video-track\0".as_ptr() as *const _, - transmute(notify_current_video_track_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_current_video_track_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, - transmute(notify_duration_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_duration_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_media_info_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::media-info\0".as_ptr() as *const _, - transmute(notify_media_info_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_media_info_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_mute_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::mute\0".as_ptr() as *const _, - transmute(notify_mute_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_mute_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_pipeline_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::pipeline\0".as_ptr() as *const _, - transmute(notify_pipeline_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_pipeline_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_position_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::position\0".as_ptr() as *const _, - transmute(notify_position_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_position_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_rate_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::rate\0".as_ptr() as *const _, - transmute(notify_rate_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_rate_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_suburi_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::suburi\0".as_ptr() as *const _, - transmute(notify_suburi_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_suburi_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_uri_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::uri\0".as_ptr() as *const _, - transmute(notify_uri_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_uri_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_video_multiview_flags_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::video-multiview-flags\0".as_ptr() as *const _, - transmute(notify_video_multiview_flags_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_video_multiview_flags_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_video_multiview_mode_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::video-multiview-mode\0".as_ptr() as *const _, - transmute(notify_video_multiview_mode_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_video_multiview_mode_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_volume_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::volume\0".as_ptr() as *const _, - transmute(notify_volume_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_volume_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -554,127 +554,127 @@ impl Player { unsafe impl Send for Player {} unsafe impl Sync for Player {} -unsafe extern "C" fn buffering_trampoline(this: *mut ffi::GstPlayer, object: libc::c_int, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player, i32) + Send + 'static) = transmute(f); +unsafe extern "C" fn buffering_trampoline(this: *mut ffi::GstPlayer, object: libc::c_int, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), object) } -unsafe extern "C" fn end_of_stream_trampoline(this: *mut ffi::GstPlayer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + 'static) = transmute(f); +unsafe extern "C" fn end_of_stream_trampoline(this: *mut ffi::GstPlayer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn error_trampoline(this: *mut ffi::GstPlayer, object: *mut glib_ffi::GError, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player, &Error) + Send + 'static) = transmute(f); +unsafe extern "C" fn error_trampoline(this: *mut ffi::GstPlayer, object: *mut glib_ffi::GError, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), &from_glib_borrow(object)) } -unsafe extern "C" fn media_info_updated_trampoline(this: *mut ffi::GstPlayer, object: *mut ffi::GstPlayerMediaInfo, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player, &PlayerMediaInfo) + Send + 'static) = transmute(f); +unsafe extern "C" fn media_info_updated_trampoline(this: *mut ffi::GstPlayer, object: *mut ffi::GstPlayerMediaInfo, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), &from_glib_borrow(object)) } -unsafe extern "C" fn mute_changed_trampoline(this: *mut ffi::GstPlayer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + 'static) = transmute(f); +unsafe extern "C" fn mute_changed_trampoline(this: *mut ffi::GstPlayer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn state_changed_trampoline(this: *mut ffi::GstPlayer, object: ffi::GstPlayerState, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player, PlayerState) + Send + 'static) = transmute(f); +unsafe extern "C" fn state_changed_trampoline(this: *mut ffi::GstPlayer, object: ffi::GstPlayerState, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), from_glib(object)) } -unsafe extern "C" fn uri_loaded_trampoline(this: *mut ffi::GstPlayer, object: *mut libc::c_char, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player, &str) + Send + 'static) = transmute(f); +unsafe extern "C" fn uri_loaded_trampoline(this: *mut ffi::GstPlayer, object: *mut libc::c_char, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), &GString::from_glib_borrow(object)) } -unsafe extern "C" fn video_dimensions_changed_trampoline(this: *mut ffi::GstPlayer, object: libc::c_int, p0: libc::c_int, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player, i32, i32) + Send + 'static) = transmute(f); +unsafe extern "C" fn video_dimensions_changed_trampoline(this: *mut ffi::GstPlayer, object: libc::c_int, p0: libc::c_int, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), object, p0) } -unsafe extern "C" fn volume_changed_trampoline(this: *mut ffi::GstPlayer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + 'static) = transmute(f); +unsafe extern "C" fn volume_changed_trampoline(this: *mut ffi::GstPlayer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn warning_trampoline(this: *mut ffi::GstPlayer, object: *mut glib_ffi::GError, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player, &Error) + Send + 'static) = transmute(f); +unsafe extern "C" fn warning_trampoline(this: *mut ffi::GstPlayer, object: *mut glib_ffi::GError, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), &from_glib_borrow(object)) } -unsafe extern "C" fn notify_audio_video_offset_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_audio_video_offset_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_current_audio_track_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_current_audio_track_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_current_subtitle_track_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_current_subtitle_track_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_current_video_track_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_current_video_track_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_media_info_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_media_info_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_mute_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_mute_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_pipeline_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_pipeline_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_position_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_position_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_rate_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_rate_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_suburi_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_suburi_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_uri_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_uri_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_video_multiview_flags_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_video_multiview_flags_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_video_multiview_mode_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_video_multiview_mode_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_volume_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_volume_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs b/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs index 4846f5e87..faafa7738 100644 --- a/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs +++ b/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs @@ -55,7 +55,7 @@ impl PlayerVideoOverlayVideoRenderer { } } - //pub fn set_window_handle>>(&self, window_handle: P) { + //pub fn set_window_handle(&self, window_handle: /*Unimplemented*/Option) { // unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_set_window_handle() } //} @@ -73,27 +73,27 @@ impl PlayerVideoOverlayVideoRenderer { } } - //pub fn new>>(window_handle: P) -> Option { + //pub fn new(window_handle: /*Unimplemented*/Option) -> Option { // unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_new() } //} - //pub fn new_with_sink>, Q: IsA>(window_handle: P, video_sink: &Q) -> Option { + //pub fn new_with_sink>(window_handle: /*Unimplemented*/Option, video_sink: &P) -> Option { // unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_new_with_sink() } //} pub fn connect_property_video_sink_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::video-sink\0".as_ptr() as *const _, - transmute(notify_video_sink_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_video_sink_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_window_handle_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::window-handle\0".as_ptr() as *const _, - transmute(notify_window_handle_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_window_handle_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -101,12 +101,12 @@ impl PlayerVideoOverlayVideoRenderer { unsafe impl Send for PlayerVideoOverlayVideoRenderer {} unsafe impl Sync for PlayerVideoOverlayVideoRenderer {} -unsafe extern "C" fn notify_video_sink_trampoline(this: *mut ffi::GstPlayerVideoOverlayVideoRenderer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_video_sink_trampoline(this: *mut ffi::GstPlayerVideoOverlayVideoRenderer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_window_handle_trampoline(this: *mut ffi::GstPlayerVideoOverlayVideoRenderer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_window_handle_trampoline(this: *mut ffi::GstPlayerVideoOverlayVideoRenderer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-player/src/auto/versions.txt b/gstreamer-player/src/auto/versions.txt index 502cec64b..48014f977 100644 --- a/gstreamer-player/src/auto/versions.txt +++ b/gstreamer-player/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-rtsp-server/src/auto/rtsp_auth.rs b/gstreamer-rtsp-server/src/auto/rtsp_auth.rs index 4e9152c72..39f3f328d 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_auth.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_auth.rs @@ -181,15 +181,15 @@ impl> RTSPAuthExt for O { fn connect_accept_certificate bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_ bool + Send + Sync + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"accept-certificate\0".as_ptr() as *const _, - transmute(accept_certificate_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(accept_certificate_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn accept_certificate_trampoline

(this: *mut ffi::GstRTSPAuth, connection: *mut gio_ffi::GTlsConnection, peer_cert: *mut gio_ffi::GTlsCertificate, errors: gio_ffi::GTlsCertificateFlags, f: glib_ffi::gpointer) -> glib_ffi::gboolean +unsafe extern "C" fn accept_certificate_trampoline bool + Send + Sync + 'static>(this: *mut ffi::GstRTSPAuth, connection: *mut gio_ffi::GTlsConnection, peer_cert: *mut gio_ffi::GTlsCertificate, errors: gio_ffi::GTlsCertificateFlags, f: glib_ffi::gpointer) -> glib_ffi::gboolean where P: IsA { - let f: &&(Fn(&P, &gio::TlsConnection, &gio::TlsCertificate, gio::TlsCertificateFlags) -> bool + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPAuth::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(connection), &from_glib_borrow(peer_cert), from_glib(errors)).to_glib() } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_client.rs b/gstreamer-rtsp-server/src/auto/rtsp_client.rs index 0e0560331..ec095d26e 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_client.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_client.rs @@ -70,7 +70,7 @@ pub trait RTSPClientExt: 'static { //fn send_message<'a, P: IsA + 'a, Q: Into>>(&self, session: Q, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult; - //fn session_filter<'a, P: Into>, Q: Into>>(&self, func: P, user_data: Q) -> Vec; + //fn session_filter(&self, func: /*Unimplemented*/Fn(&RTSPClient, &RTSPSession) -> /*Ignored*/RTSPFilterResult, user_data: /*Unimplemented*/Option) -> Vec; fn set_auth<'a, P: IsA + 'a, Q: Into>>(&self, auth: Q); @@ -78,7 +78,7 @@ pub trait RTSPClientExt: 'static { fn set_mount_points<'a, P: IsA + 'a, Q: Into>>(&self, mounts: Q); - //fn set_send_func<'a, P: Into>>(&self, func: /*Unknown conversion*//*Unimplemented*/RTSPClientSendFunc, notify: P); + //fn set_send_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, bool) -> bool, user_data: /*Unimplemented*/Option); fn set_session_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q); @@ -198,7 +198,7 @@ impl> RTSPClientExt for O { // unsafe { TODO: call ffi::gst_rtsp_client_send_message() } //} - //fn session_filter<'a, P: Into>, Q: Into>>(&self, func: P, user_data: Q) -> Vec { + //fn session_filter(&self, func: /*Unimplemented*/Fn(&RTSPClient, &RTSPSession) -> /*Ignored*/RTSPFilterResult, user_data: /*Unimplemented*/Option) -> Vec { // unsafe { TODO: call ffi::gst_rtsp_client_session_filter() } //} @@ -220,7 +220,7 @@ impl> RTSPClientExt for O { } } - //fn set_send_func<'a, P: Into>>(&self, func: /*Unknown conversion*//*Unimplemented*/RTSPClientSendFunc, notify: P) { + //fn set_send_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, bool) -> bool, user_data: /*Unimplemented*/Option) { // unsafe { TODO: call ffi::gst_rtsp_client_set_send_func() } //} @@ -254,9 +254,9 @@ impl> RTSPClientExt for O { fn connect_announce_request(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"announce-request\0".as_ptr() as *const _, - transmute(announce_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(announce_request_trampoline:: as usize)), Box_::into_raw(f)) } } @@ -266,163 +266,163 @@ impl> RTSPClientExt for O { fn connect_closed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"closed\0".as_ptr() as *const _, - transmute(closed_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(closed_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_describe_request(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"describe-request\0".as_ptr() as *const _, - transmute(describe_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(describe_request_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_get_parameter_request(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"get-parameter-request\0".as_ptr() as *const _, - transmute(get_parameter_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(get_parameter_request_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_handle_response(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"handle-response\0".as_ptr() as *const _, - transmute(handle_response_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(handle_response_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_new_session(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"new-session\0".as_ptr() as *const _, - transmute(new_session_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(new_session_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_options_request(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"options-request\0".as_ptr() as *const _, - transmute(options_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(options_request_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_pause_request(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"pause-request\0".as_ptr() as *const _, - transmute(pause_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(pause_request_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_play_request(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"play-request\0".as_ptr() as *const _, - transmute(play_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(play_request_trampoline:: as usize)), Box_::into_raw(f)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn connect_pre_announce_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"pre-announce-request\0".as_ptr() as *const _, - transmute(pre_announce_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(pre_announce_request_trampoline:: as usize)), Box_::into_raw(f)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn connect_pre_describe_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"pre-describe-request\0".as_ptr() as *const _, - transmute(pre_describe_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(pre_describe_request_trampoline:: as usize)), Box_::into_raw(f)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn connect_pre_get_parameter_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"pre-get-parameter-request\0".as_ptr() as *const _, - transmute(pre_get_parameter_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(pre_get_parameter_request_trampoline:: as usize)), Box_::into_raw(f)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn connect_pre_options_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"pre-options-request\0".as_ptr() as *const _, - transmute(pre_options_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(pre_options_request_trampoline:: as usize)), Box_::into_raw(f)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn connect_pre_pause_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"pre-pause-request\0".as_ptr() as *const _, - transmute(pre_pause_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(pre_pause_request_trampoline:: as usize)), Box_::into_raw(f)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn connect_pre_play_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"pre-play-request\0".as_ptr() as *const _, - transmute(pre_play_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(pre_play_request_trampoline:: as usize)), Box_::into_raw(f)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn connect_pre_record_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"pre-record-request\0".as_ptr() as *const _, - transmute(pre_record_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(pre_record_request_trampoline:: as usize)), Box_::into_raw(f)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn connect_pre_set_parameter_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"pre-set-parameter-request\0".as_ptr() as *const _, - transmute(pre_set_parameter_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(pre_set_parameter_request_trampoline:: as usize)), Box_::into_raw(f)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn connect_pre_setup_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"pre-setup-request\0".as_ptr() as *const _, - transmute(pre_setup_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(pre_setup_request_trampoline:: as usize)), Box_::into_raw(f)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn connect_pre_teardown_request gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_ gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"pre-teardown-request\0".as_ptr() as *const _, - transmute(pre_teardown_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(pre_teardown_request_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_record_request(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"record-request\0".as_ptr() as *const _, - transmute(record_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(record_request_trampoline:: as usize)), Box_::into_raw(f)) } } @@ -432,215 +432,215 @@ impl> RTSPClientExt for O { fn connect_set_parameter_request(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"set-parameter-request\0".as_ptr() as *const _, - transmute(set_parameter_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(set_parameter_request_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_setup_request(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"setup-request\0".as_ptr() as *const _, - transmute(setup_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(setup_request_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_teardown_request(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"teardown-request\0".as_ptr() as *const _, - transmute(teardown_request_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(teardown_request_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_drop_backlog_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::drop-backlog\0".as_ptr() as *const _, - transmute(notify_drop_backlog_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_drop_backlog_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_mount_points_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::mount-points\0".as_ptr() as *const _, - transmute(notify_mount_points_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_mount_points_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_session_pool_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::session-pool\0".as_ptr() as *const _, - transmute(notify_session_pool_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_session_pool_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn announce_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn announce_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPContext) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn closed_trampoline

(this: *mut ffi::GstRTSPClient, f: glib_ffi::gpointer) +unsafe extern "C" fn closed_trampoline(this: *mut ffi::GstRTSPClient, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn describe_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn describe_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPContext) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn get_parameter_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn get_parameter_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPContext) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn handle_response_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn handle_response_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPContext) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn new_session_trampoline

(this: *mut ffi::GstRTSPClient, object: *mut ffi::GstRTSPSession, f: glib_ffi::gpointer) +unsafe extern "C" fn new_session_trampoline(this: *mut ffi::GstRTSPClient, object: *mut ffi::GstRTSPSession, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPSession) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn options_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn options_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPContext) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn pause_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn pause_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPContext) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn play_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn play_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPContext) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_announce_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_announce_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode where P: IsA { - let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_describe_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_describe_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode where P: IsA { - let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_get_parameter_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_get_parameter_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode where P: IsA { - let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_options_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_options_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode where P: IsA { - let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_pause_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_pause_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode where P: IsA { - let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_play_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_play_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode where P: IsA { - let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_record_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_record_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode where P: IsA { - let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_set_parameter_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_set_parameter_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode where P: IsA { - let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_setup_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_setup_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode where P: IsA { - let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_teardown_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_teardown_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode where P: IsA { - let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } -unsafe extern "C" fn record_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn record_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPContext) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn set_parameter_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn set_parameter_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPContext) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn setup_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn setup_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPContext) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn teardown_request_trampoline

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn teardown_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPContext) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn notify_drop_backlog_trampoline

(this: *mut ffi::GstRTSPClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_drop_backlog_trampoline(this: *mut ffi::GstRTSPClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_mount_points_trampoline

(this: *mut ffi::GstRTSPClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_mount_points_trampoline(this: *mut ffi::GstRTSPClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_session_pool_trampoline

(this: *mut ffi::GstRTSPClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_session_pool_trampoline(this: *mut ffi::GstRTSPClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPClient::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_media.rs index 554fd1ccb..66c0c6ac5 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media.rs @@ -107,7 +107,7 @@ pub trait RTSPMediaExt: 'static { fn n_streams(&self) -> u32; - //fn prepare<'a, P: Into>>(&self, thread: P) -> bool; + //fn prepare(&self, thread: /*Ignored*/Option<&mut RTSPThread>) -> bool; //fn seek(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange) -> bool; @@ -127,7 +127,7 @@ pub trait RTSPMediaExt: 'static { fn set_multicast_iface<'a, P: Into>>(&self, multicast_iface: P); - //fn set_permissions<'a, P: Into>>(&self, permissions: P); + //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>); fn set_pipeline_state(&self, state: gst::State); @@ -377,7 +377,7 @@ impl> RTSPMediaExt for O { } } - //fn prepare<'a, P: Into>>(&self, thread: P) -> bool { + //fn prepare(&self, thread: /*Ignored*/Option<&mut RTSPThread>) -> bool { // unsafe { TODO: call ffi::gst_rtsp_media_prepare() } //} @@ -432,7 +432,7 @@ impl> RTSPMediaExt for O { } } - //fn set_permissions<'a, P: Into>>(&self, permissions: P) { + //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>) { // unsafe { TODO: call ffi::gst_rtsp_media_set_permissions() } //} @@ -574,253 +574,253 @@ impl> RTSPMediaExt for O { fn connect_new_state(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"new-state\0".as_ptr() as *const _, - transmute(new_state_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(new_state_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_new_stream(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"new-stream\0".as_ptr() as *const _, - transmute(new_stream_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(new_stream_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_prepared(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"prepared\0".as_ptr() as *const _, - transmute(prepared_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(prepared_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_removed_stream(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"removed-stream\0".as_ptr() as *const _, - transmute(removed_stream_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(removed_stream_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_target_state(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"target-state\0".as_ptr() as *const _, - transmute(target_state_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(target_state_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_unprepared(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"unprepared\0".as_ptr() as *const _, - transmute(unprepared_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(unprepared_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_buffer_size_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::buffer-size\0".as_ptr() as *const _, - transmute(notify_buffer_size_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_buffer_size_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_clock_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::clock\0".as_ptr() as *const _, - transmute(notify_clock_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_clock_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_eos_shutdown_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::eos-shutdown\0".as_ptr() as *const _, - transmute(notify_eos_shutdown_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_eos_shutdown_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_latency_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::latency\0".as_ptr() as *const _, - transmute(notify_latency_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_latency_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_profiles_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::profiles\0".as_ptr() as *const _, - transmute(notify_profiles_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_profiles_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_protocols_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::protocols\0".as_ptr() as *const _, - transmute(notify_protocols_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_protocols_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_reusable_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::reusable\0".as_ptr() as *const _, - transmute(notify_reusable_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_reusable_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_shared_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::shared\0".as_ptr() as *const _, - transmute(notify_shared_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_shared_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_stop_on_disconnect_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::stop-on-disconnect\0".as_ptr() as *const _, - transmute(notify_stop_on_disconnect_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_stop_on_disconnect_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_suspend_mode_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::suspend-mode\0".as_ptr() as *const _, - transmute(notify_suspend_mode_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_suspend_mode_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_time_provider_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::time-provider\0".as_ptr() as *const _, - transmute(notify_time_provider_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_time_provider_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_transport_mode_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::transport-mode\0".as_ptr() as *const _, - transmute(notify_transport_mode_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_transport_mode_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn new_state_trampoline

(this: *mut ffi::GstRTSPMedia, object: libc::c_int, f: glib_ffi::gpointer) +unsafe extern "C" fn new_state_trampoline(this: *mut ffi::GstRTSPMedia, object: libc::c_int, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, i32) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast(), object) } -unsafe extern "C" fn new_stream_trampoline

(this: *mut ffi::GstRTSPMedia, object: *mut ffi::GstRTSPStream, f: glib_ffi::gpointer) +unsafe extern "C" fn new_stream_trampoline(this: *mut ffi::GstRTSPMedia, object: *mut ffi::GstRTSPStream, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPStream) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn prepared_trampoline

(this: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer) +unsafe extern "C" fn prepared_trampoline(this: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn removed_stream_trampoline

(this: *mut ffi::GstRTSPMedia, object: *mut ffi::GstRTSPStream, f: glib_ffi::gpointer) +unsafe extern "C" fn removed_stream_trampoline(this: *mut ffi::GstRTSPMedia, object: *mut ffi::GstRTSPStream, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPStream) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn target_state_trampoline

(this: *mut ffi::GstRTSPMedia, object: libc::c_int, f: glib_ffi::gpointer) +unsafe extern "C" fn target_state_trampoline(this: *mut ffi::GstRTSPMedia, object: libc::c_int, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, i32) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast(), object) } -unsafe extern "C" fn unprepared_trampoline

(this: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer) +unsafe extern "C" fn unprepared_trampoline(this: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_buffer_size_trampoline

(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_buffer_size_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_clock_trampoline

(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_clock_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_eos_shutdown_trampoline

(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_eos_shutdown_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_latency_trampoline

(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_latency_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_profiles_trampoline

(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_profiles_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_protocols_trampoline

(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_protocols_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_reusable_trampoline

(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_reusable_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_shared_trampoline

(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_shared_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_stop_on_disconnect_trampoline

(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_stop_on_disconnect_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_suspend_mode_trampoline

(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_suspend_mode_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_time_provider_trampoline

(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_time_provider_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_transport_mode_trampoline

(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_transport_mode_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs b/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs index ceffaddb2..fd3af286a 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs @@ -109,7 +109,7 @@ pub trait RTSPMediaFactoryExt: 'static { fn set_multicast_iface<'a, P: Into>>(&self, multicast_iface: P); - //fn set_permissions<'a, P: Into>>(&self, permissions: P); + //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>); fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile); @@ -328,7 +328,7 @@ impl> RTSPMediaFactoryExt for O { } } - //fn set_permissions<'a, P: Into>>(&self, permissions: P) { + //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>) { // unsafe { TODO: call ffi::gst_rtsp_media_factory_set_permissions() } //} @@ -406,183 +406,183 @@ impl> RTSPMediaFactoryExt for O { fn connect_media_configure(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"media-configure\0".as_ptr() as *const _, - transmute(media_configure_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(media_configure_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_media_constructed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"media-constructed\0".as_ptr() as *const _, - transmute(media_constructed_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(media_constructed_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_buffer_size_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::buffer-size\0".as_ptr() as *const _, - transmute(notify_buffer_size_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_buffer_size_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_clock_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::clock\0".as_ptr() as *const _, - transmute(notify_clock_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_clock_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_eos_shutdown_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::eos-shutdown\0".as_ptr() as *const _, - transmute(notify_eos_shutdown_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_eos_shutdown_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_latency_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::latency\0".as_ptr() as *const _, - transmute(notify_latency_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_latency_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_launch_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::launch\0".as_ptr() as *const _, - transmute(notify_launch_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_launch_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_profiles_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::profiles\0".as_ptr() as *const _, - transmute(notify_profiles_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_profiles_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_protocols_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::protocols\0".as_ptr() as *const _, - transmute(notify_protocols_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_protocols_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_shared_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::shared\0".as_ptr() as *const _, - transmute(notify_shared_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_shared_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_stop_on_disconnect_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::stop-on-disconnect\0".as_ptr() as *const _, - transmute(notify_stop_on_disconnect_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_stop_on_disconnect_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_suspend_mode_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::suspend-mode\0".as_ptr() as *const _, - transmute(notify_suspend_mode_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_suspend_mode_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_transport_mode_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::transport-mode\0".as_ptr() as *const _, - transmute(notify_transport_mode_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_transport_mode_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn media_configure_trampoline

(this: *mut ffi::GstRTSPMediaFactory, object: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer) +unsafe extern "C" fn media_configure_trampoline(this: *mut ffi::GstRTSPMediaFactory, object: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPMedia) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn media_constructed_trampoline

(this: *mut ffi::GstRTSPMediaFactory, object: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer) +unsafe extern "C" fn media_constructed_trampoline(this: *mut ffi::GstRTSPMediaFactory, object: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPMedia) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn notify_buffer_size_trampoline

(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_buffer_size_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_clock_trampoline

(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_clock_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_eos_shutdown_trampoline

(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_eos_shutdown_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_latency_trampoline

(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_latency_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_launch_trampoline

(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_launch_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_profiles_trampoline

(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_profiles_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_protocols_trampoline

(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_protocols_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_shared_trampoline

(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_shared_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_stop_on_disconnect_trampoline

(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_stop_on_disconnect_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_suspend_mode_trampoline

(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_suspend_mode_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_transport_mode_trampoline

(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_transport_mode_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs b/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs index f2df706e8..4f0ebe5c8 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs @@ -88,29 +88,29 @@ impl> RTSPMediaFactoryURIExt for O { fn connect_property_uri_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::uri\0".as_ptr() as *const _, - transmute(notify_uri_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_uri_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_use_gstpay_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::use-gstpay\0".as_ptr() as *const _, - transmute(notify_use_gstpay_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_use_gstpay_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_uri_trampoline

(this: *mut ffi::GstRTSPMediaFactoryURI, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_uri_trampoline(this: *mut ffi::GstRTSPMediaFactoryURI, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactoryURI::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_use_gstpay_trampoline

(this: *mut ffi::GstRTSPMediaFactoryURI, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_use_gstpay_trampoline(this: *mut ffi::GstRTSPMediaFactoryURI, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPMediaFactoryURI::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_server.rs b/gstreamer-rtsp-server/src/auto/rtsp_server.rs index d4af8cb77..03a491282 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_server.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_server.rs @@ -58,7 +58,7 @@ unsafe impl Sync for RTSPServer {} pub const NONE_RTSP_SERVER: Option<&RTSPServer> = None; pub trait RTSPServerExt: 'static { - //fn client_filter<'a, P: Into>, Q: Into>>(&self, func: P, user_data: Q) -> Vec; + //fn client_filter(&self, func: /*Unimplemented*/Fn(&RTSPServer, &RTSPClient) -> /*Ignored*/RTSPFilterResult, user_data: /*Unimplemented*/Option) -> Vec; fn create_socket<'a, P: IsA + 'a, Q: Into>>(&self, cancellable: Q) -> Result; @@ -112,7 +112,7 @@ pub trait RTSPServerExt: 'static { } impl> RTSPServerExt for O { - //fn client_filter<'a, P: Into>, Q: Into>>(&self, func: P, user_data: Q) -> Vec { + //fn client_filter(&self, func: /*Unimplemented*/Fn(&RTSPServer, &RTSPClient) -> /*Ignored*/RTSPFilterResult, user_data: /*Unimplemented*/Option) -> Vec { // unsafe { TODO: call ffi::gst_rtsp_server_client_filter() } //} @@ -237,99 +237,99 @@ impl> RTSPServerExt for O { fn connect_client_connected(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"client-connected\0".as_ptr() as *const _, - transmute(client_connected_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(client_connected_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_address_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::address\0".as_ptr() as *const _, - transmute(notify_address_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_address_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_backlog_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::backlog\0".as_ptr() as *const _, - transmute(notify_backlog_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_backlog_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_bound_port_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::bound-port\0".as_ptr() as *const _, - transmute(notify_bound_port_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_bound_port_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_mount_points_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::mount-points\0".as_ptr() as *const _, - transmute(notify_mount_points_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_mount_points_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_service_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::service\0".as_ptr() as *const _, - transmute(notify_service_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_service_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_session_pool_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::session-pool\0".as_ptr() as *const _, - transmute(notify_session_pool_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_session_pool_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn client_connected_trampoline

(this: *mut ffi::GstRTSPServer, object: *mut ffi::GstRTSPClient, f: glib_ffi::gpointer) +unsafe extern "C" fn client_connected_trampoline(this: *mut ffi::GstRTSPServer, object: *mut ffi::GstRTSPClient, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPClient) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPServer::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn notify_address_trampoline

(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_address_trampoline(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPServer::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_backlog_trampoline

(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_backlog_trampoline(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPServer::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_bound_port_trampoline

(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_bound_port_trampoline(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPServer::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_mount_points_trampoline

(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_mount_points_trampoline(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPServer::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_service_trampoline

(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_service_trampoline(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPServer::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_session_pool_trampoline

(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_session_pool_trampoline(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPServer::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session.rs b/gstreamer-rtsp-server/src/auto/rtsp_session.rs index 42e3e54c2..68461ae2f 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session.rs @@ -44,7 +44,7 @@ pub const NONE_RTSP_SESSION: Option<&RTSPSession> = None; pub trait RTSPSessionExt: 'static { fn allow_expire(&self); - //fn filter<'a, P: Into>, Q: Into>>(&self, func: P, user_data: Q) -> Vec; + //fn filter(&self, func: /*Unimplemented*/Fn(&RTSPSession, &RTSPSessionMedia) -> /*Ignored*/RTSPFilterResult, user_data: /*Unimplemented*/Option) -> Vec; fn get_header(&self) -> Option; @@ -88,7 +88,7 @@ impl> RTSPSessionExt for O { } } - //fn filter<'a, P: Into>, Q: Into>>(&self, func: P, user_data: Q) -> Vec { + //fn filter(&self, func: /*Unimplemented*/Fn(&RTSPSession, &RTSPSessionMedia) -> /*Ignored*/RTSPFilterResult, user_data: /*Unimplemented*/Option) -> Vec { // unsafe { TODO: call ffi::gst_rtsp_session_filter() } //} @@ -184,29 +184,29 @@ impl> RTSPSessionExt for O { fn connect_property_timeout_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::timeout\0".as_ptr() as *const _, - transmute(notify_timeout_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_timeout_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_timeout_always_visible_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::timeout-always-visible\0".as_ptr() as *const _, - transmute(notify_timeout_always_visible_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_timeout_always_visible_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_timeout_trampoline

(this: *mut ffi::GstRTSPSession, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_timeout_trampoline(this: *mut ffi::GstRTSPSession, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPSession::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_timeout_always_visible_trampoline

(this: *mut ffi::GstRTSPSession, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_timeout_always_visible_trampoline(this: *mut ffi::GstRTSPSession, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPSession::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs index 0071ce826..0dba71cac 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs @@ -47,7 +47,7 @@ pub trait RTSPSessionPoolExt: 'static { fn create(&self) -> Option; - //fn filter<'a, P: Into>, Q: Into>>(&self, func: P, user_data: Q) -> Vec; + //fn filter(&self, func: /*Unimplemented*/Fn(&RTSPSessionPool, &RTSPSession) -> /*Ignored*/RTSPFilterResult, user_data: /*Unimplemented*/Option) -> Vec; fn find(&self, sessionid: &str) -> Option; @@ -77,7 +77,7 @@ impl> RTSPSessionPoolExt for O { } } - //fn filter<'a, P: Into>, Q: Into>>(&self, func: P, user_data: Q) -> Vec { + //fn filter(&self, func: /*Unimplemented*/Fn(&RTSPSessionPool, &RTSPSession) -> /*Ignored*/RTSPFilterResult, user_data: /*Unimplemented*/Option) -> Vec { // unsafe { TODO: call ffi::gst_rtsp_session_pool_filter() } //} @@ -113,29 +113,29 @@ impl> RTSPSessionPoolExt for O { fn connect_session_removed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"session-removed\0".as_ptr() as *const _, - transmute(session_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(session_removed_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_max_sessions_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::max-sessions\0".as_ptr() as *const _, - transmute(notify_max_sessions_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_max_sessions_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn session_removed_trampoline

(this: *mut ffi::GstRTSPSessionPool, object: *mut ffi::GstRTSPSession, f: glib_ffi::gpointer) +unsafe extern "C" fn session_removed_trampoline(this: *mut ffi::GstRTSPSessionPool, object: *mut ffi::GstRTSPSession, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &RTSPSession) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPSessionPool::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn notify_max_sessions_trampoline

(this: *mut ffi::GstRTSPSessionPool, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_max_sessions_trampoline(this: *mut ffi::GstRTSPSessionPool, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPSessionPool::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs index 44d6ce099..501569a14 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs @@ -164,7 +164,7 @@ pub trait RTSPStreamExt: 'static { fn set_seqnum_offset(&self, seqnum: u16); - //fn transport_filter<'a, P: Into>, Q: Into>>(&self, func: P, user_data: Q) -> Vec; + //fn transport_filter(&self, func: /*Unimplemented*/Fn(&RTSPStream, &RTSPStreamTransport) -> /*Ignored*/RTSPFilterResult, user_data: /*Unimplemented*/Option) -> Vec; fn unblock_linked(&self) -> bool; @@ -539,7 +539,7 @@ impl> RTSPStreamExt for O { } } - //fn transport_filter<'a, P: Into>, Q: Into>>(&self, func: P, user_data: Q) -> Vec { + //fn transport_filter(&self, func: /*Unimplemented*/Fn(&RTSPStream, &RTSPStreamTransport) -> /*Ignored*/RTSPFilterResult, user_data: /*Unimplemented*/Option) -> Vec { // unsafe { TODO: call ffi::gst_rtsp_stream_transport_filter() } //} @@ -558,71 +558,71 @@ impl> RTSPStreamExt for O { fn connect_new_rtcp_encoder(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"new-rtcp-encoder\0".as_ptr() as *const _, - transmute(new_rtcp_encoder_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(new_rtcp_encoder_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_new_rtp_encoder(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"new-rtp-encoder\0".as_ptr() as *const _, - transmute(new_rtp_encoder_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(new_rtp_encoder_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_control_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::control\0".as_ptr() as *const _, - transmute(notify_control_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_control_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_profiles_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::profiles\0".as_ptr() as *const _, - transmute(notify_profiles_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_profiles_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_protocols_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::protocols\0".as_ptr() as *const _, - transmute(notify_protocols_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_protocols_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn new_rtcp_encoder_trampoline

(this: *mut ffi::GstRTSPStream, object: *mut gst_ffi::GstElement, f: glib_ffi::gpointer) +unsafe extern "C" fn new_rtcp_encoder_trampoline(this: *mut ffi::GstRTSPStream, object: *mut gst_ffi::GstElement, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &gst::Element) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPStream::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn new_rtp_encoder_trampoline

(this: *mut ffi::GstRTSPStream, object: *mut gst_ffi::GstElement, f: glib_ffi::gpointer) +unsafe extern "C" fn new_rtp_encoder_trampoline(this: *mut ffi::GstRTSPStream, object: *mut gst_ffi::GstElement, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &gst::Element) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPStream::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn notify_control_trampoline

(this: *mut ffi::GstRTSPStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_control_trampoline(this: *mut ffi::GstRTSPStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPStream::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_profiles_trampoline

(this: *mut ffi::GstRTSPStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_profiles_trampoline(this: *mut ffi::GstRTSPStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPStream::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_protocols_trampoline

(this: *mut ffi::GstRTSPStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_protocols_trampoline(this: *mut ffi::GstRTSPStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPStream::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs index ae71cd2bd..f6943edfa 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs @@ -10,6 +10,7 @@ use glib::object::IsA; use glib::translate::*; use gst; use gst_rtsp; +use std::boxed::Box as Box_; glib_wrapper! { pub struct RTSPStreamTransport(Object); @@ -46,9 +47,9 @@ pub trait RTSPStreamTransportExt: 'static { fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError>; - //fn set_callbacks<'a, P: Into>>(&self, send_rtp: /*Unknown conversion*//*Unimplemented*/RTSPSendFunc, send_rtcp: /*Unknown conversion*//*Unimplemented*/RTSPSendFunc, notify: P); + //fn set_callbacks bool + 'static, Q: Fn(&gst::Buffer, u8) -> bool + 'static>(&self, send_rtp: P, send_rtcp: Q); - //fn set_keepalive<'a, P: Into>>(&self, keep_alive: /*Unknown conversion*//*Unimplemented*/RTSPKeepAliveFunc, notify: P); + fn set_keepalive(&self, keep_alive: P); fn set_timed_out(&self, timedout: bool); @@ -110,13 +111,26 @@ impl> RTSPStreamTransportExt for O { } } - //fn set_callbacks<'a, P: Into>>(&self, send_rtp: /*Unknown conversion*//*Unimplemented*/RTSPSendFunc, send_rtcp: /*Unknown conversion*//*Unimplemented*/RTSPSendFunc, notify: P) { + //fn set_callbacks bool + 'static, Q: Fn(&gst::Buffer, u8) -> bool + 'static>(&self, send_rtp: P, send_rtcp: Q) { // unsafe { TODO: call ffi::gst_rtsp_stream_transport_set_callbacks() } //} - //fn set_keepalive<'a, P: Into>>(&self, keep_alive: /*Unknown conversion*//*Unimplemented*/RTSPKeepAliveFunc, notify: P) { - // unsafe { TODO: call ffi::gst_rtsp_stream_transport_set_keepalive() } - //} + fn set_keepalive(&self, keep_alive: P) { + let keep_alive_data: Box_

= Box::new(keep_alive); + unsafe extern "C" fn keep_alive_func(user_data: glib_ffi::gpointer) { + let callback: &P = &*(user_data as *mut _); + (*callback)(); + } + let keep_alive = Some(keep_alive_func::

as _); + unsafe extern "C" fn notify_func(data: glib_ffi::gpointer) { + let _callback: Box_

= Box_::from_raw(data as *mut _); + } + let destroy_call3 = Some(notify_func::

as _); + let super_callback0: Box_

= keep_alive_data; + unsafe { + ffi::gst_rtsp_stream_transport_set_keepalive(self.as_ref().to_glib_none().0, keep_alive, Box::into_raw(super_callback0) as *mut _, destroy_call3); + } + } fn set_timed_out(&self, timedout: bool) { unsafe { diff --git a/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs index 3be4853fc..ae0e5911c 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs @@ -76,15 +76,15 @@ impl> RTSPThreadPoolExt for O { fn connect_property_max_threads_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::max-threads\0".as_ptr() as *const _, - transmute(notify_max_threads_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_max_threads_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_max_threads_trampoline

(this: *mut ffi::GstRTSPThreadPool, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_max_threads_trampoline(this: *mut ffi::GstRTSPThreadPool, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&RTSPThreadPool::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer-rtsp-server/src/auto/versions.txt b/gstreamer-rtsp-server/src/auto/versions.txt index 502cec64b..48014f977 100644 --- a/gstreamer-rtsp-server/src/auto/versions.txt +++ b/gstreamer-rtsp-server/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-rtsp/src/auto/versions.txt b/gstreamer-rtsp/src/auto/versions.txt index 502cec64b..48014f977 100644 --- a/gstreamer-rtsp/src/auto/versions.txt +++ b/gstreamer-rtsp/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-sdp/src/auto/mikey_payload.rs b/gstreamer-sdp/src/auto/mikey_payload.rs index 3e1bd03e0..9a9968056 100644 --- a/gstreamer-sdp/src/auto/mikey_payload.rs +++ b/gstreamer-sdp/src/auto/mikey_payload.rs @@ -24,7 +24,7 @@ glib_wrapper! { } impl MIKEYPayload { - pub fn new(type_: MIKEYPayloadType) -> MIKEYPayload { + pub fn new(type_: MIKEYPayloadType) -> Option { assert_initialized_main_thread!(); unsafe { from_glib_full(ffi::gst_mikey_payload_new(type_.to_glib())) diff --git a/gstreamer-sdp/src/auto/versions.txt b/gstreamer-sdp/src/auto/versions.txt index 502cec64b..48014f977 100644 --- a/gstreamer-sdp/src/auto/versions.txt +++ b/gstreamer-sdp/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-video/src/auto/versions.txt b/gstreamer-video/src/auto/versions.txt index 502cec64b..48014f977 100644 --- a/gstreamer-video/src/auto/versions.txt +++ b/gstreamer-video/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-webrtc/src/auto/versions.txt b/gstreamer-webrtc/src/auto/versions.txt index 502cec64b..48014f977 100644 --- a/gstreamer-webrtc/src/auto/versions.txt +++ b/gstreamer-webrtc/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs b/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs index d2e04e9ac..678767e65 100644 --- a/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs +++ b/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs @@ -110,41 +110,41 @@ impl WebRTCDTLSTransport { pub fn connect_property_certificate_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::certificate\0".as_ptr() as *const _, - transmute(notify_certificate_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_certificate_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_client_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::client\0".as_ptr() as *const _, - transmute(notify_client_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_client_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_remote_certificate_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::remote-certificate\0".as_ptr() as *const _, - transmute(notify_remote_certificate_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_remote_certificate_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_state_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::state\0".as_ptr() as *const _, - transmute(notify_state_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_state_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_transport_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::transport\0".as_ptr() as *const _, - transmute(notify_transport_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_transport_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -152,27 +152,27 @@ impl WebRTCDTLSTransport { unsafe impl Send for WebRTCDTLSTransport {} unsafe impl Sync for WebRTCDTLSTransport {} -unsafe extern "C" fn notify_certificate_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&WebRTCDTLSTransport) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_certificate_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_client_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&WebRTCDTLSTransport) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_client_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_remote_certificate_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&WebRTCDTLSTransport) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_remote_certificate_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); 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) { - let f: &&(Fn(&WebRTCDTLSTransport) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_state_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = 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) { - let f: &&(Fn(&WebRTCDTLSTransport) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_transport_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-webrtc/src/auto/web_rtcice_transport.rs b/gstreamer-webrtc/src/auto/web_rtcice_transport.rs index 79284c1f9..cb4f6162d 100644 --- a/gstreamer-webrtc/src/auto/web_rtcice_transport.rs +++ b/gstreamer-webrtc/src/auto/web_rtcice_transport.rs @@ -78,33 +78,33 @@ impl WebRTCICETransport { pub fn connect_on_new_candidate(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"on-new-candidate\0".as_ptr() as *const _, - transmute(on_new_candidate_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(on_new_candidate_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_on_selected_candidate_pair_change(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"on-selected-candidate-pair-change\0".as_ptr() as *const _, - transmute(on_selected_candidate_pair_change_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(on_selected_candidate_pair_change_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_gathering_state_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::gathering-state\0".as_ptr() as *const _, - transmute(notify_gathering_state_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_gathering_state_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_state_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::state\0".as_ptr() as *const _, - transmute(notify_state_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_state_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -112,22 +112,22 @@ impl WebRTCICETransport { unsafe impl Send for WebRTCICETransport {} unsafe impl Sync for WebRTCICETransport {} -unsafe extern "C" fn on_new_candidate_trampoline(this: *mut ffi::GstWebRTCICETransport, object: *mut libc::c_char, f: glib_ffi::gpointer) { - let f: &&(Fn(&WebRTCICETransport, &str) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn on_new_candidate_trampoline(this: *mut ffi::GstWebRTCICETransport, object: *mut libc::c_char, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), &GString::from_glib_borrow(object)) } -unsafe extern "C" fn on_selected_candidate_pair_change_trampoline(this: *mut ffi::GstWebRTCICETransport, f: glib_ffi::gpointer) { - let f: &&(Fn(&WebRTCICETransport) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn on_selected_candidate_pair_change_trampoline(this: *mut ffi::GstWebRTCICETransport, f: glib_ffi::gpointer) { + let f: &F = 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) { - let f: &&(Fn(&WebRTCICETransport) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_gathering_state_trampoline(this: *mut ffi::GstWebRTCICETransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = 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) { - let f: &&(Fn(&WebRTCICETransport) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_state_trampoline(this: *mut ffi::GstWebRTCICETransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer/src/auto/bin.rs b/gstreamer/src/auto/bin.rs index b8d02d030..3f80bdd7a 100644 --- a/gstreamer/src/auto/bin.rs +++ b/gstreamer/src/auto/bin.rs @@ -234,88 +234,88 @@ impl> GstBinExt for O { #[cfg(any(feature = "v1_10", feature = "dox"))] fn connect_deep_element_added(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"deep-element-added\0".as_ptr() as *const _, - transmute(deep_element_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(deep_element_added_trampoline:: as usize)), Box_::into_raw(f)) } } #[cfg(any(feature = "v1_10", feature = "dox"))] fn connect_deep_element_removed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"deep-element-removed\0".as_ptr() as *const _, - transmute(deep_element_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(deep_element_removed_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_element_added(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"element-added\0".as_ptr() as *const _, - transmute(element_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(element_added_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_element_removed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"element-removed\0".as_ptr() as *const _, - transmute(element_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(element_removed_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_async_handling_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::async-handling\0".as_ptr() as *const _, - transmute(notify_async_handling_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_async_handling_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_message_forward_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::message-forward\0".as_ptr() as *const _, - transmute(notify_message_forward_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_message_forward_trampoline:: as usize)), Box_::into_raw(f)) } } } #[cfg(any(feature = "v1_10", feature = "dox"))] -unsafe extern "C" fn deep_element_added_trampoline

(this: *mut ffi::GstBin, sub_bin: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer) +unsafe extern "C" fn deep_element_added_trampoline(this: *mut ffi::GstBin, sub_bin: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Bin, &Element) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Bin::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(sub_bin), &from_glib_borrow(element)) } #[cfg(any(feature = "v1_10", feature = "dox"))] -unsafe extern "C" fn deep_element_removed_trampoline

(this: *mut ffi::GstBin, sub_bin: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer) +unsafe extern "C" fn deep_element_removed_trampoline(this: *mut ffi::GstBin, sub_bin: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Bin, &Element) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Bin::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(sub_bin), &from_glib_borrow(element)) } -unsafe extern "C" fn element_added_trampoline

(this: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer) +unsafe extern "C" fn element_added_trampoline(this: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Element) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Bin::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(element)) } -unsafe extern "C" fn element_removed_trampoline

(this: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer) +unsafe extern "C" fn element_removed_trampoline(this: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Element) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Bin::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(element)) } -unsafe extern "C" fn notify_async_handling_trampoline

(this: *mut ffi::GstBin, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_async_handling_trampoline(this: *mut ffi::GstBin, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Bin::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_message_forward_trampoline

(this: *mut ffi::GstBin, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_message_forward_trampoline(this: *mut ffi::GstBin, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Bin::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer/src/auto/bus.rs b/gstreamer/src/auto/bus.rs index 31dffe293..ada609423 100644 --- a/gstreamer/src/auto/bus.rs +++ b/gstreamer/src/auto/bus.rs @@ -37,15 +37,7 @@ impl Bus { } } - //pub fn add_watch>>(&self, func: /*Unknown conversion*//*Unimplemented*/BusFunc, user_data: P) -> u32 { - // unsafe { TODO: call ffi::gst_bus_add_watch() } - //} - - //pub fn add_watch_full(&self, priority: i32, func: /*Unknown conversion*//*Unimplemented*/BusFunc, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) -> u32 { - // unsafe { TODO: call ffi::gst_bus_add_watch_full() } - //} - - //pub fn async_signal_func>>(&self, message: &Message, data: P) -> bool { + //pub fn async_signal_func(&self, message: &Message, data: /*Unimplemented*/Option) -> bool { // unsafe { TODO: call ffi::gst_bus_async_signal_func() } //} @@ -108,11 +100,7 @@ impl Bus { } } - //pub fn set_sync_handler<'a, P: Into>>(&self, func: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { - // unsafe { TODO: call ffi::gst_bus_set_sync_handler() } - //} - - //pub fn sync_signal_handler>>(&self, message: &Message, data: P) -> BusSyncReply { + //pub fn sync_signal_handler(&self, message: &Message, data: /*Unimplemented*/Option) -> BusSyncReply { // unsafe { TODO: call ffi::gst_bus_sync_signal_handler() } //} @@ -124,17 +112,17 @@ impl Bus { pub fn connect_message(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"message\0".as_ptr() as *const _, - transmute(message_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(message_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_sync_message(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"sync-message\0".as_ptr() as *const _, - transmute(sync_message_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(sync_message_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -148,12 +136,12 @@ impl Default for Bus { unsafe impl Send for Bus {} unsafe impl Sync for Bus {} -unsafe extern "C" fn message_trampoline(this: *mut ffi::GstBus, message: *mut ffi::GstMessage, f: glib_ffi::gpointer) { - let f: &&(Fn(&Bus, &Message) + Send + 'static) = transmute(f); +unsafe extern "C" fn message_trampoline(this: *mut ffi::GstBus, message: *mut ffi::GstMessage, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), &from_glib_borrow(message)) } -unsafe extern "C" fn sync_message_trampoline(this: *mut ffi::GstBus, message: *mut ffi::GstMessage, f: glib_ffi::gpointer) { - let f: &&(Fn(&Bus, &Message) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn sync_message_trampoline(this: *mut ffi::GstBus, message: *mut ffi::GstMessage, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), &from_glib_borrow(message)) } diff --git a/gstreamer/src/auto/child_proxy.rs b/gstreamer/src/auto/child_proxy.rs index 4eb36565b..f82cae1ee 100644 --- a/gstreamer/src/auto/child_proxy.rs +++ b/gstreamer/src/auto/child_proxy.rs @@ -120,29 +120,29 @@ impl> ChildProxyExt for O { fn connect_child_added(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"child-added\0".as_ptr() as *const _, - transmute(child_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(child_added_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_child_removed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"child-removed\0".as_ptr() as *const _, - transmute(child_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(child_removed_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn child_added_trampoline

(this: *mut ffi::GstChildProxy, object: *mut gobject_ffi::GObject, name: *mut libc::c_char, f: glib_ffi::gpointer) +unsafe extern "C" fn child_added_trampoline(this: *mut ffi::GstChildProxy, object: *mut gobject_ffi::GObject, name: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &glib::Object, &str) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&ChildProxy::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object), &GString::from_glib_borrow(name)) } -unsafe extern "C" fn child_removed_trampoline

(this: *mut ffi::GstChildProxy, object: *mut gobject_ffi::GObject, name: *mut libc::c_char, f: glib_ffi::gpointer) +unsafe extern "C" fn child_removed_trampoline(this: *mut ffi::GstChildProxy, object: *mut gobject_ffi::GObject, name: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &glib::Object, &str) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&ChildProxy::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object), &GString::from_glib_borrow(name)) } diff --git a/gstreamer/src/auto/clock.rs b/gstreamer/src/auto/clock.rs index d84d83037..34e6a86a0 100644 --- a/gstreamer/src/auto/clock.rs +++ b/gstreamer/src/auto/clock.rs @@ -28,7 +28,7 @@ glib_wrapper! { } impl Clock { - //pub fn id_compare_func>, Q: Into>>(id1: P, id2: Q) -> i32 { + //pub fn id_compare_func(id1: /*Unimplemented*/Option, id2: /*Unimplemented*/Option) -> i32 { // unsafe { TODO: call ffi::gst_clock_id_compare_func() } //} @@ -52,7 +52,7 @@ impl Clock { // unsafe { TODO: call ffi::gst_clock_id_wait() } //} - //pub fn id_wait_async(id: /*Unimplemented*/ClockID, func: /*Unknown conversion*//*Unimplemented*/ClockCallback, destroy_data: /*Unknown conversion*//*Unimplemented*/DestroyNotify) -> ClockReturn { + //pub fn id_wait_async(id: /*Unimplemented*/ClockID, func: /*Unimplemented*/Fn(&Clock, ClockTime, /*Unimplemented*/ClockID) -> bool, user_data: /*Unimplemented*/Option) -> ClockReturn { // unsafe { TODO: call ffi::gst_clock_id_wait_async() } //} } @@ -285,57 +285,57 @@ impl> ClockExt for O { fn connect_synced(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"synced\0".as_ptr() as *const _, - transmute(synced_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(synced_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_timeout_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::timeout\0".as_ptr() as *const _, - transmute(notify_timeout_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_timeout_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_window_size_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::window-size\0".as_ptr() as *const _, - transmute(notify_window_size_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_window_size_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_window_threshold_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::window-threshold\0".as_ptr() as *const _, - transmute(notify_window_threshold_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_window_threshold_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn synced_trampoline

(this: *mut ffi::GstClock, synced: glib_ffi::gboolean, f: glib_ffi::gpointer) +unsafe extern "C" fn synced_trampoline(this: *mut ffi::GstClock, synced: glib_ffi::gboolean, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, bool) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Clock::from_glib_borrow(this).unsafe_cast(), from_glib(synced)) } -unsafe extern "C" fn notify_timeout_trampoline

(this: *mut ffi::GstClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_timeout_trampoline(this: *mut ffi::GstClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Clock::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_window_size_trampoline

(this: *mut ffi::GstClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_window_size_trampoline(this: *mut ffi::GstClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Clock::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_window_threshold_trampoline

(this: *mut ffi::GstClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_window_threshold_trampoline(this: *mut ffi::GstClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Clock::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer/src/auto/date_time.rs b/gstreamer/src/auto/date_time.rs index af6f05a79..f9d54c07c 100644 --- a/gstreamer/src/auto/date_time.rs +++ b/gstreamer/src/auto/date_time.rs @@ -26,14 +26,14 @@ impl DateTime { } } - pub fn new_from_g_date_time(dt: &glib::DateTime) -> DateTime { + pub fn new_from_g_date_time(dt: &glib::DateTime) -> Option { assert_initialized_main_thread!(); unsafe { from_glib_full(ffi::gst_date_time_new_from_g_date_time(dt.to_glib_full())) } } - pub fn new_from_iso8601_string(string: &str) -> DateTime { + pub fn new_from_iso8601_string(string: &str) -> Option { assert_initialized_main_thread!(); unsafe { from_glib_full(ffi::gst_date_time_new_from_iso8601_string(string.to_glib_none().0)) diff --git a/gstreamer/src/auto/device.rs b/gstreamer/src/auto/device.rs index 7073b2712..bbd479b45 100644 --- a/gstreamer/src/auto/device.rs +++ b/gstreamer/src/auto/device.rs @@ -103,15 +103,15 @@ impl> DeviceExt for O { fn connect_removed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"removed\0".as_ptr() as *const _, - transmute(removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(removed_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn removed_trampoline

(this: *mut ffi::GstDevice, f: glib_ffi::gpointer) +unsafe extern "C" fn removed_trampoline(this: *mut ffi::GstDevice, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Device::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer/src/auto/device_monitor.rs b/gstreamer/src/auto/device_monitor.rs index 3fbd365fd..05685c8d8 100644 --- a/gstreamer/src/auto/device_monitor.rs +++ b/gstreamer/src/auto/device_monitor.rs @@ -114,15 +114,15 @@ impl> DeviceMonitorExt for O { fn connect_property_show_all_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::show-all\0".as_ptr() as *const _, - transmute(notify_show_all_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_show_all_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_show_all_trampoline

(this: *mut ffi::GstDeviceMonitor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_show_all_trampoline(this: *mut ffi::GstDeviceMonitor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&DeviceMonitor::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer/src/auto/device_provider.rs b/gstreamer/src/auto/device_provider.rs index 5006e8cf1..41bd2cd43 100644 --- a/gstreamer/src/auto/device_provider.rs +++ b/gstreamer/src/auto/device_provider.rs @@ -140,29 +140,29 @@ impl> DeviceProviderExt for O { fn connect_provider_hidden(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"provider-hidden\0".as_ptr() as *const _, - transmute(provider_hidden_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(provider_hidden_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_provider_unhidden(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"provider-unhidden\0".as_ptr() as *const _, - transmute(provider_unhidden_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(provider_unhidden_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn provider_hidden_trampoline

(this: *mut ffi::GstDeviceProvider, object: *mut libc::c_char, f: glib_ffi::gpointer) +unsafe extern "C" fn provider_hidden_trampoline(this: *mut ffi::GstDeviceProvider, object: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &str) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&DeviceProvider::from_glib_borrow(this).unsafe_cast(), &GString::from_glib_borrow(object)) } -unsafe extern "C" fn provider_unhidden_trampoline

(this: *mut ffi::GstDeviceProvider, object: *mut libc::c_char, f: glib_ffi::gpointer) +unsafe extern "C" fn provider_unhidden_trampoline(this: *mut ffi::GstDeviceProvider, object: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &str) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&DeviceProvider::from_glib_borrow(this).unsafe_cast(), &GString::from_glib_borrow(object)) } diff --git a/gstreamer/src/auto/element.rs b/gstreamer/src/auto/element.rs index 098821e98..9c848343c 100644 --- a/gstreamer/src/auto/element.rs +++ b/gstreamer/src/auto/element.rs @@ -66,19 +66,16 @@ pub trait ElementExt: 'static { fn add_pad>(&self, pad: &P) -> Result<(), glib::error::BoolError>; - //#[cfg(any(feature = "v1_10", feature = "dox"))] - //fn call_async(&self, func: /*Unknown conversion*//*Unimplemented*/ElementCallAsyncFunc, destroy_notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); - fn create_all_pads(&self); - //#[cfg(any(feature = "v1_14", feature = "dox"))] - //fn foreach_pad>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool; + #[cfg(any(feature = "v1_14", feature = "dox"))] + fn foreach_pad bool>(&self, func: P) -> bool; - //#[cfg(any(feature = "v1_14", feature = "dox"))] - //fn foreach_sink_pad>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool; + #[cfg(any(feature = "v1_14", feature = "dox"))] + fn foreach_sink_pad bool>(&self, func: P) -> bool; - //#[cfg(any(feature = "v1_14", feature = "dox"))] - //fn foreach_src_pad>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool; + #[cfg(any(feature = "v1_14", feature = "dox"))] + fn foreach_src_pad bool>(&self, func: P) -> bool; fn get_base_time(&self) -> ClockTime; @@ -181,31 +178,62 @@ impl> ElementExt for O { } } - //#[cfg(any(feature = "v1_10", feature = "dox"))] - //fn call_async(&self, func: /*Unknown conversion*//*Unimplemented*/ElementCallAsyncFunc, destroy_notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { - // unsafe { TODO: call ffi::gst_element_call_async() } - //} - fn create_all_pads(&self) { unsafe { ffi::gst_element_create_all_pads(self.as_ref().to_glib_none().0); } } - //#[cfg(any(feature = "v1_14", feature = "dox"))] - //fn foreach_pad>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool { - // unsafe { TODO: call ffi::gst_element_foreach_pad() } - //} + #[cfg(any(feature = "v1_14", feature = "dox"))] + fn foreach_pad bool>(&self, func: P) -> bool { + let func_data: P = func; + unsafe extern "C" fn func_func bool>(element: *mut ffi::GstElement, pad: *mut ffi::GstPad, user_data: glib_ffi::gpointer) -> glib_ffi::gboolean { + let element = from_glib_borrow(element); + let pad = from_glib_borrow(pad); + let callback: *mut P = user_data as *const _ as usize as *mut P; + let res = (*callback)(&element, &pad); + res.to_glib() + } + let func = Some(func_func::

as _); + let super_callback0: &P = &func_data; + unsafe { + from_glib(ffi::gst_element_foreach_pad(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) + } + } - //#[cfg(any(feature = "v1_14", feature = "dox"))] - //fn foreach_sink_pad>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool { - // unsafe { TODO: call ffi::gst_element_foreach_sink_pad() } - //} + #[cfg(any(feature = "v1_14", feature = "dox"))] + fn foreach_sink_pad bool>(&self, func: P) -> bool { + let func_data: P = func; + unsafe extern "C" fn func_func bool>(element: *mut ffi::GstElement, pad: *mut ffi::GstPad, user_data: glib_ffi::gpointer) -> glib_ffi::gboolean { + let element = from_glib_borrow(element); + let pad = from_glib_borrow(pad); + let callback: *mut P = user_data as *const _ as usize as *mut P; + let res = (*callback)(&element, &pad); + res.to_glib() + } + let func = Some(func_func::

as _); + let super_callback0: &P = &func_data; + unsafe { + from_glib(ffi::gst_element_foreach_sink_pad(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) + } + } - //#[cfg(any(feature = "v1_14", feature = "dox"))] - //fn foreach_src_pad>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool { - // unsafe { TODO: call ffi::gst_element_foreach_src_pad() } - //} + #[cfg(any(feature = "v1_14", feature = "dox"))] + fn foreach_src_pad bool>(&self, func: P) -> bool { + let func_data: P = func; + unsafe extern "C" fn func_func bool>(element: *mut ffi::GstElement, pad: *mut ffi::GstPad, user_data: glib_ffi::gpointer) -> glib_ffi::gboolean { + let element = from_glib_borrow(element); + let pad = from_glib_borrow(pad); + let callback: *mut P = user_data as *const _ as usize as *mut P; + let res = (*callback)(&element, &pad); + res.to_glib() + } + let func = Some(func_func::

as _); + let super_callback0: &P = &func_data; + unsafe { + from_glib(ffi::gst_element_foreach_src_pad(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) + } + } fn get_base_time(&self) -> ClockTime { unsafe { @@ -449,43 +477,43 @@ impl> ElementExt for O { fn connect_no_more_pads(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"no-more-pads\0".as_ptr() as *const _, - transmute(no_more_pads_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(no_more_pads_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_pad_added(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"pad-added\0".as_ptr() as *const _, - transmute(pad_added_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(pad_added_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_pad_removed(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"pad-removed\0".as_ptr() as *const _, - transmute(pad_removed_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(pad_removed_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn no_more_pads_trampoline

(this: *mut ffi::GstElement, f: glib_ffi::gpointer) +unsafe extern "C" fn no_more_pads_trampoline(this: *mut ffi::GstElement, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Element::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn pad_added_trampoline

(this: *mut ffi::GstElement, new_pad: *mut ffi::GstPad, f: glib_ffi::gpointer) +unsafe extern "C" fn pad_added_trampoline(this: *mut ffi::GstElement, new_pad: *mut ffi::GstPad, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Pad) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Element::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(new_pad)) } -unsafe extern "C" fn pad_removed_trampoline

(this: *mut ffi::GstElement, old_pad: *mut ffi::GstPad, f: glib_ffi::gpointer) +unsafe extern "C" fn pad_removed_trampoline(this: *mut ffi::GstElement, old_pad: *mut ffi::GstPad, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Pad) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Element::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(old_pad)) } diff --git a/gstreamer/src/auto/ghost_pad.rs b/gstreamer/src/auto/ghost_pad.rs index 13612b84a..854c6e604 100644 --- a/gstreamer/src/auto/ghost_pad.rs +++ b/gstreamer/src/auto/ghost_pad.rs @@ -22,19 +22,19 @@ glib_wrapper! { } impl GhostPad { - pub fn new_no_target<'a, P: Into>>(name: P, dir: PadDirection) -> GhostPad { + pub fn new_no_target<'a, P: Into>>(name: P, dir: PadDirection) -> Option { assert_initialized_main_thread!(); let name = name.into(); unsafe { - Pad::from_glib_none(ffi::gst_ghost_pad_new_no_target(name.to_glib_none().0, dir.to_glib())).unsafe_cast() + Option::::from_glib_none(ffi::gst_ghost_pad_new_no_target(name.to_glib_none().0, dir.to_glib())).map(|o| o.unsafe_cast()) } } - pub fn new_no_target_from_template<'a, P: Into>>(name: P, templ: &PadTemplate) -> GhostPad { + pub fn new_no_target_from_template<'a, P: Into>>(name: P, templ: &PadTemplate) -> Option { skip_assert_initialized!(); let name = name.into(); unsafe { - Pad::from_glib_none(ffi::gst_ghost_pad_new_no_target_from_template(name.to_glib_none().0, templ.to_glib_none().0)).unsafe_cast() + Option::::from_glib_none(ffi::gst_ghost_pad_new_no_target_from_template(name.to_glib_none().0, templ.to_glib_none().0)).map(|o| o.unsafe_cast()) } } } diff --git a/gstreamer/src/auto/object.rs b/gstreamer/src/auto/object.rs index d7713fe02..bf4cb58b6 100644 --- a/gstreamer/src/auto/object.rs +++ b/gstreamer/src/auto/object.rs @@ -32,11 +32,11 @@ impl Object { } } - //pub fn default_deep_notify, Q: IsA, R: IsA>(object: &P, orig: &Q, pspec: &R, excluded_props: &[&str]) { + //pub fn default_deep_notify, Q: IsA>(object: &P, orig: &Q, pspec: /*Ignored*/&glib::ParamSpec, excluded_props: &[&str]) { // unsafe { TODO: call ffi::gst_object_default_deep_notify() } //} - //pub fn ref_sink>>(object: P) -> /*Unimplemented*/Option { + //pub fn ref_sink(object: /*Unimplemented*/Option) -> /*Unimplemented*/Option { // unsafe { TODO: call ffi::gst_object_ref_sink() } //} @@ -51,7 +51,7 @@ unsafe impl Sync for Object {} pub const NONE_OBJECT: Option<&Object> = None; pub trait GstObjectExt: 'static { - //fn add_control_binding>(&self, binding: &P) -> bool; + //fn add_control_binding(&self, binding: /*Ignored*/&ControlBinding) -> bool; fn default_error<'a, P: Into>>(&self, error: &Error, debug: P); @@ -69,7 +69,7 @@ pub trait GstObjectExt: 'static { //fn get_value(&self, property_name: &str, timestamp: ClockTime) -> /*Ignored*/Option; - //fn get_value_array>>(&self, property_name: &str, timestamp: ClockTime, interval: ClockTime, n_values: u32, values: P) -> bool; + //fn get_value_array(&self, property_name: &str, timestamp: ClockTime, interval: ClockTime, n_values: u32, values: /*Unimplemented*/Option) -> bool; fn has_active_control_bindings(&self) -> bool; @@ -79,7 +79,7 @@ pub trait GstObjectExt: 'static { fn has_as_parent>(&self, parent: &P) -> bool; - //fn remove_control_binding>(&self, binding: &P) -> bool; + //fn remove_control_binding(&self, binding: /*Ignored*/&ControlBinding) -> bool; fn set_control_binding_disabled(&self, property_name: &str, disabled: bool); @@ -105,7 +105,7 @@ pub trait GstObjectExt: 'static { } impl> GstObjectExt for O { - //fn add_control_binding>(&self, binding: &P) -> bool { + //fn add_control_binding(&self, binding: /*Ignored*/&ControlBinding) -> bool { // unsafe { TODO: call ffi::gst_object_add_control_binding() } //} @@ -152,7 +152,7 @@ impl> GstObjectExt for O { // unsafe { TODO: call ffi::gst_object_get_value() } //} - //fn get_value_array>>(&self, property_name: &str, timestamp: ClockTime, interval: ClockTime, n_values: u32, values: P) -> bool { + //fn get_value_array(&self, property_name: &str, timestamp: ClockTime, interval: ClockTime, n_values: u32, values: /*Unimplemented*/Option) -> bool { // unsafe { TODO: call ffi::gst_object_get_value_array() } //} @@ -180,7 +180,7 @@ impl> GstObjectExt for O { } } - //fn remove_control_binding>(&self, binding: &P) -> bool { + //fn remove_control_binding(&self, binding: /*Ignored*/&ControlBinding) -> bool { // unsafe { TODO: call ffi::gst_object_remove_control_binding() } //} @@ -238,29 +238,29 @@ impl> GstObjectExt for O { fn connect_property_name_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::name\0".as_ptr() as *const _, - transmute(notify_name_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_name_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_parent_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::parent\0".as_ptr() as *const _, - transmute(notify_parent_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_parent_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_name_trampoline

(this: *mut ffi::GstObject, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_name_trampoline(this: *mut ffi::GstObject, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Object::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_parent_trampoline

(this: *mut ffi::GstObject, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_parent_trampoline(this: *mut ffi::GstObject, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Object::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer/src/auto/pad.rs b/gstreamer/src/auto/pad.rs index e65065793..aa61bf032 100644 --- a/gstreamer/src/auto/pad.rs +++ b/gstreamer/src/auto/pad.rs @@ -65,8 +65,6 @@ pub const NONE_PAD: Option<&Pad> = None; pub trait PadExt: 'static { fn activate_mode(&self, mode: PadMode, active: bool) -> Result<(), glib::error::BoolError>; - //fn add_probe(&self, mask: PadProbeType, callback: /*Unknown conversion*//*Unimplemented*/PadProbeCallback, destroy_data: /*Unknown conversion*//*Unimplemented*/DestroyNotify) -> libc::c_ulong; - fn can_link>(&self, sinkpad: &P) -> bool; fn check_reconfigure(&self) -> bool; @@ -77,7 +75,7 @@ pub trait PadExt: 'static { //fn create_stream_id_printf_valist<'a, P: IsA, Q: Into>>(&self, parent: &P, stream_id: Q, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option; - //fn forward>>(&self, forward: /*Unknown conversion*//*Unimplemented*/PadForwardFunction, user_data: P) -> bool; + fn forward bool>(&self, forward: P) -> bool; fn get_allowed_caps(&self) -> Option; @@ -141,38 +139,12 @@ pub trait PadExt: 'static { fn query_caps<'a, P: Into>>(&self, filter: P) -> Option; - //fn set_activate_function_full(&self, activate: /*Unknown conversion*//*Unimplemented*/PadActivateFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); - - //fn set_activatemode_function_full(&self, activatemode: /*Unknown conversion*//*Unimplemented*/PadActivateModeFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); - fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError>; - //fn set_chain_function_full(&self, chain: /*Unknown conversion*//*Unimplemented*/PadChainFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); - - //fn set_chain_list_function_full(&self, chainlist: /*Unknown conversion*//*Unimplemented*/PadChainListFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); - - //fn set_element_private>>(&self, priv_: P); - - //fn set_event_full_function_full(&self, event: /*Unknown conversion*//*Unimplemented*/PadEventFullFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); - - //fn set_event_function_full(&self, event: /*Unknown conversion*//*Unimplemented*/PadEventFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); - - //fn set_getrange_function_full(&self, get: /*Unknown conversion*//*Unimplemented*/PadGetRangeFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); - - //fn set_iterate_internal_links_function_full(&self, iterintlink: /*Unknown conversion*//*Unimplemented*/PadIterIntLinkFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); - - //fn set_link_function_full(&self, link: /*Unknown conversion*//*Unimplemented*/PadLinkFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); + //fn set_element_private(&self, priv_: /*Unimplemented*/Option); fn set_offset(&self, offset: i64); - //fn set_query_function_full(&self, query: /*Unknown conversion*//*Unimplemented*/PadQueryFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); - - //fn set_unlink_function_full(&self, unlink: /*Unknown conversion*//*Unimplemented*/PadUnlinkFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); - - //fn start_task(&self, func: /*Unknown conversion*//*Unimplemented*/TaskFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) -> bool; - - //fn sticky_events_foreach>>(&self, foreach_func: /*Unknown conversion*//*Unimplemented*/PadStickyEventsForeachFunction, user_data: P); - fn stop_task(&self) -> Result<(), glib::error::BoolError>; fn unlink>(&self, sinkpad: &P) -> Result<(), glib::error::BoolError>; @@ -203,10 +175,6 @@ impl> PadExt for O { } } - //fn add_probe(&self, mask: PadProbeType, callback: /*Unknown conversion*//*Unimplemented*/PadProbeCallback, destroy_data: /*Unknown conversion*//*Unimplemented*/DestroyNotify) -> libc::c_ulong { - // unsafe { TODO: call ffi::gst_pad_add_probe() } - //} - fn can_link>(&self, sinkpad: &P) -> bool { unsafe { from_glib(ffi::gst_pad_can_link(self.as_ref().to_glib_none().0, sinkpad.as_ref().to_glib_none().0)) @@ -234,9 +202,20 @@ impl> PadExt for O { // unsafe { TODO: call ffi::gst_pad_create_stream_id_printf_valist() } //} - //fn forward>>(&self, forward: /*Unknown conversion*//*Unimplemented*/PadForwardFunction, user_data: P) -> bool { - // unsafe { TODO: call ffi::gst_pad_forward() } - //} + fn forward bool>(&self, forward: P) -> bool { + let forward_data: P = forward; + unsafe extern "C" fn forward_func bool>(pad: *mut ffi::GstPad, user_data: glib_ffi::gpointer) -> glib_ffi::gboolean { + let pad = from_glib_borrow(pad); + let callback: *mut P = user_data as *const _ as usize as *mut P; + let res = (*callback)(&pad); + res.to_glib() + } + let forward = Some(forward_func::

as _); + let super_callback0: &P = &forward_data; + unsafe { + from_glib(ffi::gst_pad_forward(self.as_ref().to_glib_none().0, forward, super_callback0 as *const _ as usize as *mut _)) + } + } fn get_allowed_caps(&self) -> Option { unsafe { @@ -412,74 +391,22 @@ impl> PadExt for O { } } - //fn set_activate_function_full(&self, activate: /*Unknown conversion*//*Unimplemented*/PadActivateFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { - // unsafe { TODO: call ffi::gst_pad_set_activate_function_full() } - //} - - //fn set_activatemode_function_full(&self, activatemode: /*Unknown conversion*//*Unimplemented*/PadActivateModeFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { - // unsafe { TODO: call ffi::gst_pad_set_activatemode_function_full() } - //} - fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> { unsafe { glib_result_from_gboolean!(ffi::gst_pad_set_active(self.as_ref().to_glib_none().0, active.to_glib()), "Failed to activate pad") } } - //fn set_chain_function_full(&self, chain: /*Unknown conversion*//*Unimplemented*/PadChainFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { - // unsafe { TODO: call ffi::gst_pad_set_chain_function_full() } - //} - - //fn set_chain_list_function_full(&self, chainlist: /*Unknown conversion*//*Unimplemented*/PadChainListFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { - // unsafe { TODO: call ffi::gst_pad_set_chain_list_function_full() } - //} - - //fn set_element_private>>(&self, priv_: P) { + //fn set_element_private(&self, priv_: /*Unimplemented*/Option) { // unsafe { TODO: call ffi::gst_pad_set_element_private() } //} - //fn set_event_full_function_full(&self, event: /*Unknown conversion*//*Unimplemented*/PadEventFullFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { - // unsafe { TODO: call ffi::gst_pad_set_event_full_function_full() } - //} - - //fn set_event_function_full(&self, event: /*Unknown conversion*//*Unimplemented*/PadEventFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { - // unsafe { TODO: call ffi::gst_pad_set_event_function_full() } - //} - - //fn set_getrange_function_full(&self, get: /*Unknown conversion*//*Unimplemented*/PadGetRangeFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { - // unsafe { TODO: call ffi::gst_pad_set_getrange_function_full() } - //} - - //fn set_iterate_internal_links_function_full(&self, iterintlink: /*Unknown conversion*//*Unimplemented*/PadIterIntLinkFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { - // unsafe { TODO: call ffi::gst_pad_set_iterate_internal_links_function_full() } - //} - - //fn set_link_function_full(&self, link: /*Unknown conversion*//*Unimplemented*/PadLinkFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { - // unsafe { TODO: call ffi::gst_pad_set_link_function_full() } - //} - fn set_offset(&self, offset: i64) { unsafe { ffi::gst_pad_set_offset(self.as_ref().to_glib_none().0, offset); } } - //fn set_query_function_full(&self, query: /*Unknown conversion*//*Unimplemented*/PadQueryFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { - // unsafe { TODO: call ffi::gst_pad_set_query_function_full() } - //} - - //fn set_unlink_function_full(&self, unlink: /*Unknown conversion*//*Unimplemented*/PadUnlinkFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { - // unsafe { TODO: call ffi::gst_pad_set_unlink_function_full() } - //} - - //fn start_task(&self, func: /*Unknown conversion*//*Unimplemented*/TaskFunction, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) -> bool { - // unsafe { TODO: call ffi::gst_pad_start_task() } - //} - - //fn sticky_events_foreach>>(&self, foreach_func: /*Unknown conversion*//*Unimplemented*/PadStickyEventsForeachFunction, user_data: P) { - // unsafe { TODO: call ffi::gst_pad_sticky_events_foreach() } - //} - fn stop_task(&self) -> Result<(), glib::error::BoolError> { unsafe { glib_result_from_gboolean!(ffi::gst_pad_stop_task(self.as_ref().to_glib_none().0), "Failed to stop pad task") @@ -522,71 +449,71 @@ impl> PadExt for O { fn connect_linked(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"linked\0".as_ptr() as *const _, - transmute(linked_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(linked_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_unlinked(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"unlinked\0".as_ptr() as *const _, - transmute(unlinked_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(unlinked_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_caps_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::caps\0".as_ptr() as *const _, - transmute(notify_caps_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_caps_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_offset_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::offset\0".as_ptr() as *const _, - transmute(notify_offset_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_offset_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_template_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::template\0".as_ptr() as *const _, - transmute(notify_template_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_template_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn linked_trampoline

(this: *mut ffi::GstPad, peer: *mut ffi::GstPad, f: glib_ffi::gpointer) +unsafe extern "C" fn linked_trampoline(this: *mut ffi::GstPad, peer: *mut ffi::GstPad, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Pad) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Pad::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(peer)) } -unsafe extern "C" fn unlinked_trampoline

(this: *mut ffi::GstPad, peer: *mut ffi::GstPad, f: glib_ffi::gpointer) +unsafe extern "C" fn unlinked_trampoline(this: *mut ffi::GstPad, peer: *mut ffi::GstPad, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P, &Pad) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Pad::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(peer)) } -unsafe extern "C" fn notify_caps_trampoline

(this: *mut ffi::GstPad, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstPad, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Pad::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_offset_trampoline

(this: *mut ffi::GstPad, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_offset_trampoline(this: *mut ffi::GstPad, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Pad::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_template_trampoline

(this: *mut ffi::GstPad, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_template_trampoline(this: *mut ffi::GstPad, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Pad::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer/src/auto/pad_template.rs b/gstreamer/src/auto/pad_template.rs index 3c2617639..a66454880 100644 --- a/gstreamer/src/auto/pad_template.rs +++ b/gstreamer/src/auto/pad_template.rs @@ -32,7 +32,7 @@ glib_wrapper! { } impl PadTemplate { - pub fn new(name_template: &str, direction: PadDirection, presence: PadPresence, caps: &Caps) -> PadTemplate { + pub fn new(name_template: &str, direction: PadDirection, presence: PadPresence, caps: &Caps) -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gst_pad_template_new(name_template.to_glib_none().0, direction.to_glib(), presence.to_glib(), caps.to_glib_none().0)) @@ -40,7 +40,7 @@ impl PadTemplate { } #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn new_with_gtype(name_template: &str, direction: PadDirection, presence: PadPresence, caps: &Caps, pad_type: glib::types::Type) -> PadTemplate { + pub fn new_with_gtype(name_template: &str, direction: PadDirection, presence: PadPresence, caps: &Caps, pad_type: glib::types::Type) -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gst_pad_template_new_with_gtype(name_template.to_glib_none().0, direction.to_glib(), presence.to_glib(), caps.to_glib_none().0, pad_type.to_glib())) @@ -94,9 +94,9 @@ impl PadTemplate { pub fn connect_pad_created(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"pad-created\0".as_ptr() as *const _, - transmute(pad_created_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(pad_created_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -104,7 +104,7 @@ impl PadTemplate { unsafe impl Send for PadTemplate {} unsafe impl Sync for PadTemplate {} -unsafe extern "C" fn pad_created_trampoline(this: *mut ffi::GstPadTemplate, pad: *mut ffi::GstPad, f: glib_ffi::gpointer) { - let f: &&(Fn(&PadTemplate, &Pad) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn pad_created_trampoline(this: *mut ffi::GstPadTemplate, pad: *mut ffi::GstPad, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), &from_glib_borrow(pad)) } diff --git a/gstreamer/src/auto/pipeline.rs b/gstreamer/src/auto/pipeline.rs index 1d89485b2..fb2afa99e 100644 --- a/gstreamer/src/auto/pipeline.rs +++ b/gstreamer/src/auto/pipeline.rs @@ -125,43 +125,43 @@ impl> PipelineExt for O { fn connect_property_auto_flush_bus_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::auto-flush-bus\0".as_ptr() as *const _, - transmute(notify_auto_flush_bus_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_auto_flush_bus_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_delay_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::delay\0".as_ptr() as *const _, - transmute(notify_delay_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_delay_trampoline:: as usize)), Box_::into_raw(f)) } } fn connect_property_latency_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::latency\0".as_ptr() as *const _, - transmute(notify_latency_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_latency_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_auto_flush_bus_trampoline

(this: *mut ffi::GstPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_auto_flush_bus_trampoline(this: *mut ffi::GstPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_delay_trampoline

(this: *mut ffi::GstPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_delay_trampoline(this: *mut ffi::GstPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_latency_trampoline

(this: *mut ffi::GstPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_latency_trampoline(this: *mut ffi::GstPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer/src/auto/plugin.rs b/gstreamer/src/auto/plugin.rs index 571a616a7..15e7689c4 100644 --- a/gstreamer/src/auto/plugin.rs +++ b/gstreamer/src/auto/plugin.rs @@ -110,14 +110,6 @@ impl Plugin { if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } - - //pub fn register_static(major_version: i32, minor_version: i32, name: &str, description: &str, init_func: /*Unknown conversion*//*Unimplemented*/PluginInitFunc, version: &str, license: &str, source: &str, package: &str, origin: &str) -> bool { - // unsafe { TODO: call ffi::gst_plugin_register_static() } - //} - - //pub fn register_static_full>>(major_version: i32, minor_version: i32, name: &str, description: &str, init_full_func: /*Unknown conversion*//*Unimplemented*/PluginInitFullFunc, version: &str, license: &str, source: &str, package: &str, origin: &str, user_data: P) -> bool { - // unsafe { TODO: call ffi::gst_plugin_register_static_full() } - //} } unsafe impl Send for Plugin {} diff --git a/gstreamer/src/auto/registry.rs b/gstreamer/src/auto/registry.rs index 7bbd58c48..d09b668bf 100644 --- a/gstreamer/src/auto/registry.rs +++ b/gstreamer/src/auto/registry.rs @@ -44,9 +44,20 @@ impl Registry { } } - //pub fn feature_filter>>(&self, filter: /*Unknown conversion*//*Unimplemented*/PluginFeatureFilter, first: bool, user_data: P) -> Vec { - // unsafe { TODO: call ffi::gst_registry_feature_filter() } - //} + pub fn feature_filter bool>(&self, filter: P, first: bool) -> Vec { + let filter_data: P = filter; + unsafe extern "C" fn filter_func bool>(feature: *mut ffi::GstPluginFeature, user_data: glib_ffi::gpointer) -> glib_ffi::gboolean { + let feature = from_glib_borrow(feature); + let callback: *mut P = user_data as *const _ as usize as *mut P; + let res = (*callback)(&feature); + res.to_glib() + } + let filter = Some(filter_func::

as _); + let super_callback0: &P = &filter_data; + unsafe { + FromGlibPtrContainer::from_glib_full(ffi::gst_registry_feature_filter(self.to_glib_none().0, filter, first.to_glib(), super_callback0 as *const _ as usize as *mut _)) + } + } pub fn find_feature(&self, name: &str, type_: glib::types::Type) -> Option { unsafe { @@ -96,9 +107,20 @@ impl Registry { } } - //pub fn plugin_filter>>(&self, filter: /*Unknown conversion*//*Unimplemented*/PluginFilter, first: bool, user_data: P) -> Vec { - // unsafe { TODO: call ffi::gst_registry_plugin_filter() } - //} + pub fn plugin_filter bool>(&self, filter: P, first: bool) -> Vec { + let filter_data: P = filter; + unsafe extern "C" fn filter_func bool>(plugin: *mut ffi::GstPlugin, user_data: glib_ffi::gpointer) -> glib_ffi::gboolean { + let plugin = from_glib_borrow(plugin); + let callback: *mut P = user_data as *const _ as usize as *mut P; + let res = (*callback)(&plugin); + res.to_glib() + } + let filter = Some(filter_func::

as _); + let super_callback0: &P = &filter_data; + unsafe { + FromGlibPtrContainer::from_glib_full(ffi::gst_registry_plugin_filter(self.to_glib_none().0, filter, first.to_glib(), super_callback0 as *const _ as usize as *mut _)) + } + } pub fn remove_feature>(&self, feature: &P) { unsafe { @@ -127,17 +149,17 @@ impl Registry { pub fn connect_feature_added(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"feature-added\0".as_ptr() as *const _, - transmute(feature_added_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(feature_added_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_plugin_added(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"plugin-added\0".as_ptr() as *const _, - transmute(plugin_added_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(plugin_added_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -145,12 +167,12 @@ impl Registry { unsafe impl Send for Registry {} unsafe impl Sync for Registry {} -unsafe extern "C" fn feature_added_trampoline(this: *mut ffi::GstRegistry, feature: *mut ffi::GstPluginFeature, f: glib_ffi::gpointer) { - let f: &&(Fn(&Registry, &PluginFeature) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn feature_added_trampoline(this: *mut ffi::GstRegistry, feature: *mut ffi::GstPluginFeature, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), &from_glib_borrow(feature)) } -unsafe extern "C" fn plugin_added_trampoline(this: *mut ffi::GstRegistry, plugin: *mut ffi::GstPlugin, f: glib_ffi::gpointer) { - let f: &&(Fn(&Registry, &Plugin) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn plugin_added_trampoline(this: *mut ffi::GstRegistry, plugin: *mut ffi::GstPlugin, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this), &from_glib_borrow(plugin)) } diff --git a/gstreamer/src/auto/stream.rs b/gstreamer/src/auto/stream.rs index f8039fd41..07ccfd9bb 100644 --- a/gstreamer/src/auto/stream.rs +++ b/gstreamer/src/auto/stream.rs @@ -160,33 +160,33 @@ impl Stream { pub fn connect_property_caps_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::caps\0".as_ptr() as *const _, - transmute(notify_caps_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_caps_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_stream_flags_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::stream-flags\0".as_ptr() as *const _, - transmute(notify_stream_flags_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_stream_flags_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_stream_type_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::stream-type\0".as_ptr() as *const _, - transmute(notify_stream_type_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_stream_type_trampoline:: as usize)), Box_::into_raw(f)) } } pub fn connect_property_tags_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::tags\0".as_ptr() as *const _, - transmute(notify_tags_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_tags_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -194,22 +194,22 @@ impl Stream { unsafe impl Send for Stream {} unsafe impl Sync for Stream {} -unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Stream) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_stream_flags_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Stream) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_stream_flags_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_stream_type_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Stream) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_stream_type_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_tags_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&Stream) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_tags_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer/src/auto/stream_collection.rs b/gstreamer/src/auto/stream_collection.rs index e660469d1..5eb2fbe45 100644 --- a/gstreamer/src/auto/stream_collection.rs +++ b/gstreamer/src/auto/stream_collection.rs @@ -69,9 +69,9 @@ impl StreamCollection { pub fn connect_property_upstream_id_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::upstream-id\0".as_ptr() as *const _, - transmute(notify_upstream_id_trampoline as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_upstream_id_trampoline:: as usize)), Box_::into_raw(f)) } } } @@ -79,7 +79,7 @@ impl StreamCollection { unsafe impl Send for StreamCollection {} unsafe impl Sync for StreamCollection {} -unsafe extern "C" fn notify_upstream_id_trampoline(this: *mut ffi::GstStreamCollection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &&(Fn(&StreamCollection) + Send + Sync + 'static) = transmute(f); +unsafe extern "C" fn notify_upstream_id_trampoline(this: *mut ffi::GstStreamCollection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + let f: &F = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer/src/auto/system_clock.rs b/gstreamer/src/auto/system_clock.rs index acc347086..0cd3dc3f5 100644 --- a/gstreamer/src/auto/system_clock.rs +++ b/gstreamer/src/auto/system_clock.rs @@ -73,15 +73,15 @@ impl> SystemClockExt for O { fn connect_property_clock_type_notify(&self, f: F) -> SignalHandlerId { unsafe { - let f: Box_> = Box_::new(Box_::new(f)); + let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"notify::clock-type\0".as_ptr() as *const _, - transmute(notify_clock_type_trampoline:: as usize), Box_::into_raw(f) as *mut _) + Some(transmute(notify_clock_type_trampoline:: as usize)), Box_::into_raw(f)) } } } -unsafe extern "C" fn notify_clock_type_trampoline

(this: *mut ffi::GstSystemClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_clock_type_trampoline(this: *mut ffi::GstSystemClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); + let f: &F = transmute(f); f(&SystemClock::from_glib_borrow(this).unsafe_cast()) } diff --git a/gstreamer/src/auto/versions.txt b/gstreamer/src/auto/versions.txt index 502cec64b..48014f977 100644 --- a/gstreamer/src/auto/versions.txt +++ b/gstreamer/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 4620f19) +Generated by gir (https://github.com/gtk-rs/gir @ eb84608) from gir-files (https://github.com/gtk-rs/gir-files @ ???)