From f1426c82ba7954f0f0830419a547e717fdad57e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 17 Feb 2018 19:58:41 +0200 Subject: [PATCH] Remove callback guards Since Rust 1.24 it is safe to let panics go to the FFI boundary --- gstreamer-app/src/app_sink.rs | 5 ---- gstreamer-app/src/app_src.rs | 5 ---- gstreamer-app/src/auto/app_sink.rs | 13 ++------ gstreamer-app/src/auto/app_src.rs | 19 ++---------- gstreamer-app/src/auto/enums.rs | 12 +++++--- gstreamer-app/src/auto/flags.rs | 3 +- gstreamer-app/src/auto/mod.rs | 3 +- gstreamer-app/src/lib.rs | 6 ---- gstreamer-audio/src/auto/enums.rs | 12 +++++--- gstreamer-audio/src/auto/flags.rs | 12 +++++--- gstreamer-audio/src/auto/mod.rs | 3 +- gstreamer-audio/src/auto/stream_volume.rs | 5 ++-- gstreamer-audio/src/lib.rs | 6 ---- gstreamer-base/src/auto/adapter.rs | 3 +- gstreamer-base/src/auto/base_sink.rs | 14 ++------- gstreamer-base/src/auto/base_src.rs | 7 ++--- gstreamer-base/src/auto/base_transform.rs | 4 +-- gstreamer-base/src/auto/enums.rs | 3 +- gstreamer-base/src/auto/flags.rs | 3 +- gstreamer-base/src/auto/functions.rs | 3 +- gstreamer-base/src/auto/mod.rs | 3 +- gstreamer-base/src/auto/push_src.rs | 3 +- gstreamer-base/src/lib.rs | 6 ---- gstreamer-net/src/auto/enums.rs | 3 +- gstreamer-net/src/auto/flags.rs | 3 +- gstreamer-net/src/auto/mod.rs | 3 +- gstreamer-net/src/auto/net_client_clock.rs | 10 ++----- gstreamer-net/src/auto/net_time_provider.rs | 7 ++--- gstreamer-net/src/auto/ntp_clock.rs | 3 +- gstreamer-net/src/auto/ptp_clock.rs | 7 ++--- gstreamer-net/src/lib.rs | 6 ---- gstreamer-player/src/auto/enums.rs | 16 ++++++---- gstreamer-player/src/auto/flags.rs | 3 +- gstreamer-player/src/auto/mod.rs | 3 +- gstreamer-player/src/auto/player.rs | 30 ++----------------- .../src/auto/player_audio_info.rs | 3 +- ...player_g_main_context_signal_dispatcher.rs | 4 +-- .../src/auto/player_media_info.rs | 3 +- .../src/auto/player_signal_dispatcher.rs | 3 +- .../src/auto/player_stream_info.rs | 3 +- .../src/auto/player_subtitle_info.rs | 3 +- .../src/auto/player_video_info.rs | 3 +- .../player_video_overlay_video_renderer.rs | 5 ++-- .../src/auto/player_video_renderer.rs | 3 +- .../src/auto/player_visualization.rs | 3 +- gstreamer-player/src/lib.rs | 6 ---- gstreamer-player/src/player.rs | 3 -- gstreamer-rtsp-server/src/auto/enums.rs | 2 +- gstreamer-rtsp-server/src/auto/flags.rs | 2 +- gstreamer-rtsp-server/src/auto/mod.rs | 2 +- .../src/auto/r_t_s_p_address.rs | 2 +- .../src/auto/r_t_s_p_address_pool.rs | 2 +- .../src/auto/r_t_s_p_auth.rs | 2 +- .../src/auto/r_t_s_p_client.rs | 28 +---------------- .../src/auto/r_t_s_p_media.rs | 21 +------------ .../src/auto/r_t_s_p_media_factory.rs | 15 +--------- .../src/auto/r_t_s_p_media_factory_u_r_i.rs | 4 +-- .../src/auto/r_t_s_p_mount_points.rs | 2 +- .../src/auto/r_t_s_p_server.rs | 9 +----- .../src/auto/r_t_s_p_session.rs | 5 +--- .../src/auto/r_t_s_p_session_media.rs | 2 +- .../src/auto/r_t_s_p_session_pool.rs | 4 +-- .../src/auto/r_t_s_p_stream.rs | 7 +---- .../src/auto/r_t_s_p_stream_transport.rs | 2 +- .../src/auto/r_t_s_p_thread_pool.rs | 3 +- gstreamer-rtsp-server/src/lib.rs | 6 ---- .../src/r_t_s_p_session_pool.rs | 4 +-- gstreamer-rtsp/src/auto/enums.rs | 2 +- gstreamer-rtsp/src/auto/flags.rs | 2 +- gstreamer-rtsp/src/auto/mod.rs | 2 +- gstreamer-rtsp/src/auto/r_t_s_p_auth_param.rs | 2 +- gstreamer-rtsp/src/auto/r_t_s_p_url.rs | 2 +- gstreamer-sdp/src/auto/enums.rs | 2 +- gstreamer-sdp/src/auto/flags.rs | 2 +- gstreamer-sdp/src/auto/mod.rs | 2 +- gstreamer-video/src/auto/enums.rs | 12 +++++--- gstreamer-video/src/auto/flags.rs | 12 +++++--- gstreamer-video/src/auto/mod.rs | 3 +- gstreamer-video/src/auto/video_filter.rs | 3 +- gstreamer-video/src/auto/video_overlay.rs | 3 +- gstreamer-video/src/functions.rs | 2 -- gstreamer-video/src/lib.rs | 6 ---- gstreamer/src/auto/alias.rs | 3 +- gstreamer/src/auto/bin.rs | 10 ++----- gstreamer/src/auto/bus.rs | 6 ++-- gstreamer/src/auto/child_proxy.rs | 5 ++-- gstreamer/src/auto/clock.rs | 7 ++--- gstreamer/src/auto/date_time.rs | 3 +- gstreamer/src/auto/device.rs | 8 ++--- gstreamer/src/auto/device_monitor.rs | 4 +-- gstreamer/src/auto/device_provider.rs | 5 ++-- gstreamer/src/auto/device_provider_factory.rs | 3 +- gstreamer/src/auto/element.rs | 6 ++-- gstreamer/src/auto/element_factory.rs | 3 +- gstreamer/src/auto/enums.rs | 16 ++++++---- gstreamer/src/auto/flags.rs | 12 +++++--- gstreamer/src/auto/functions.rs | 3 +- gstreamer/src/auto/ghost_pad.rs | 3 +- gstreamer/src/auto/mod.rs | 3 +- gstreamer/src/auto/object.rs | 5 ++-- gstreamer/src/auto/pad.rs | 9 ++---- gstreamer/src/auto/pad_template.rs | 8 ++--- gstreamer/src/auto/pipeline.rs | 6 ++-- gstreamer/src/auto/plugin.rs | 3 +- gstreamer/src/auto/plugin_feature.rs | 3 +- gstreamer/src/auto/preset.rs | 3 +- gstreamer/src/auto/proxy_pad.rs | 3 +- gstreamer/src/auto/registry.rs | 5 ++-- gstreamer/src/auto/stream.rs | 8 ++--- gstreamer/src/auto/stream_collection.rs | 4 +-- gstreamer/src/auto/system_clock.rs | 4 +-- gstreamer/src/auto/tag_setter.rs | 3 +- gstreamer/src/auto/toc_setter.rs | 3 +- gstreamer/src/auto/type_find_factory.rs | 3 +- gstreamer/src/auto/u_r_i_handler.rs | 3 +- gstreamer/src/bus.rs | 6 +--- gstreamer/src/clock.rs | 3 -- gstreamer/src/iterator.rs | 14 --------- gstreamer/src/lib.rs | 6 ---- gstreamer/src/pad.rs | 16 ---------- gstreamer/src/typefind.rs | 5 ---- 121 files changed, 234 insertions(+), 459 deletions(-) diff --git a/gstreamer-app/src/app_sink.rs b/gstreamer-app/src/app_sink.rs index 0e5ff59b4..d64097293 100644 --- a/gstreamer-app/src/app_sink.rs +++ b/gstreamer-app/src/app_sink.rs @@ -11,7 +11,6 @@ use ffi; use gst_ffi; use glib::translate::*; use gst; -use glib::source::CallbackGuard; use glib_ffi::gpointer; use std::ptr; @@ -103,7 +102,6 @@ impl AppSinkCallbacksBuilder { } unsafe extern "C" fn trampoline_eos(appsink: *mut ffi::GstAppSink, callbacks: gpointer) { - let _guard = CallbackGuard::new(); let callbacks = &*(callbacks as *const AppSinkCallbacks); callbacks @@ -116,7 +114,6 @@ unsafe extern "C" fn trampoline_new_preroll( appsink: *mut ffi::GstAppSink, callbacks: gpointer, ) -> gst_ffi::GstFlowReturn { - let _guard = CallbackGuard::new(); let callbacks = &*(callbacks as *const AppSinkCallbacks); callbacks @@ -131,7 +128,6 @@ unsafe extern "C" fn trampoline_new_sample( appsink: *mut ffi::GstAppSink, callbacks: gpointer, ) -> gst_ffi::GstFlowReturn { - let _guard = CallbackGuard::new(); let callbacks = &*(callbacks as *const AppSinkCallbacks); callbacks @@ -143,7 +139,6 @@ unsafe extern "C" fn trampoline_new_sample( } unsafe extern "C" fn destroy_callbacks(ptr: gpointer) { - let _guard = CallbackGuard::new(); Box::::from_raw(ptr as *mut _); } diff --git a/gstreamer-app/src/app_src.rs b/gstreamer-app/src/app_src.rs index e87b9fb36..afd347fd1 100644 --- a/gstreamer-app/src/app_src.rs +++ b/gstreamer-app/src/app_src.rs @@ -10,7 +10,6 @@ use AppSrc; use ffi; use glib::translate::*; use gst; -use glib::source::CallbackGuard; use glib_ffi::{gboolean, gpointer}; use std::ptr; use std::mem; @@ -109,7 +108,6 @@ unsafe extern "C" fn trampoline_need_data( length: u32, callbacks: gpointer, ) { - let _guard = CallbackGuard::new(); let callbacks = &*(callbacks as *const AppSrcCallbacks); callbacks @@ -119,7 +117,6 @@ unsafe extern "C" fn trampoline_need_data( } unsafe extern "C" fn trampoline_enough_data(appsrc: *mut ffi::GstAppSrc, callbacks: gpointer) { - let _guard = CallbackGuard::new(); let callbacks = &*(callbacks as *const AppSrcCallbacks); callbacks @@ -133,7 +130,6 @@ unsafe extern "C" fn trampoline_seek_data( offset: u64, callbacks: gpointer, ) -> gboolean { - let _guard = CallbackGuard::new(); let callbacks = &*(callbacks as *const AppSrcCallbacks); callbacks @@ -145,7 +141,6 @@ unsafe extern "C" fn trampoline_seek_data( } unsafe extern "C" fn destroy_callbacks(ptr: gpointer) { - let _guard = CallbackGuard::new(); Box::::from_raw(ptr as *mut _); } diff --git a/gstreamer-app/src/auto/app_sink.rs b/gstreamer-app/src/auto/app_sink.rs index f9f58bf0d..c764b188e 100644 --- a/gstreamer-app/src/auto/app_sink.rs +++ b/gstreamer-app/src/auto/app_sink.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; @@ -251,61 +252,51 @@ unsafe impl Send for AppSink {} unsafe impl Sync for AppSink {} unsafe extern "C" fn eos_trampoline(this: *mut ffi::GstAppSink, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } unsafe extern "C" fn new_preroll_trampoline(this: *mut ffi::GstAppSink, f: glib_ffi::gpointer) -> gst_ffi::GstFlowReturn { - callback_guard!(); let f: &&(Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)).to_glib() } unsafe extern "C" fn new_sample_trampoline(this: *mut ffi::GstAppSink, f: glib_ffi::gpointer) -> gst_ffi::GstFlowReturn { - callback_guard!(); let f: &&(Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)).to_glib() } unsafe extern "C" fn notify_buffer_list_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&AppSink) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSink) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSink) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSink) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSink) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSink) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSink) + Send + Sync + 'static) = 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 5ac39f4a6..e7a872ab7 100644 --- a/gstreamer-app/src/auto/app_src.rs +++ b/gstreamer-app/src/auto/app_src.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use AppStreamType; @@ -363,97 +364,81 @@ 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) { - callback_guard!(); let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSrc, u32) + Send + Sync + 'static) = 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 { - callback_guard!(); let f: &&(Fn(&AppSrc, u64) -> bool + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-app/src/auto/enums.rs b/gstreamer-app/src/auto/enums.rs index 74cdba08a..874c25180 100644 --- a/gstreamer-app/src/auto/enums.rs +++ b/gstreamer-app/src/auto/enums.rs @@ -1,12 +1,16 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; -use glib::Type; use glib::StaticType; -use glib::value::{Value, SetValue, FromValue, FromValueOptional}; -use gobject_ffi; +use glib::Type; use glib::translate::*; +use glib::value::FromValue; +use glib::value::FromValueOptional; +use glib::value::SetValue; +use glib::value::Value; +use gobject_ffi; #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum AppStreamType { diff --git a/gstreamer-app/src/auto/flags.rs b/gstreamer-app/src/auto/flags.rs index 28738409e..fe9b15727 100644 --- a/gstreamer-app/src/auto/flags.rs +++ b/gstreamer-app/src/auto/flags.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer-app/src/auto/mod.rs b/gstreamer-app/src/auto/mod.rs index 5e78d6c13..70c3b7393 100644 --- a/gstreamer-app/src/auto/mod.rs +++ b/gstreamer-app/src/auto/mod.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT mod app_sink; diff --git a/gstreamer-app/src/lib.rs b/gstreamer-app/src/lib.rs index 2d2c060f5..9890097e9 100644 --- a/gstreamer-app/src/lib.rs +++ b/gstreamer-app/src/lib.rs @@ -19,12 +19,6 @@ extern crate gstreamer_sys as gst_ffi; #[macro_use] extern crate glib; -macro_rules! callback_guard { - () => ( - let _guard = ::glib::CallbackGuard::new(); - ) -} - macro_rules! skip_assert_initialized { () => ( ) diff --git a/gstreamer-audio/src/auto/enums.rs b/gstreamer-audio/src/auto/enums.rs index 498c59305..6a679b815 100644 --- a/gstreamer-audio/src/auto/enums.rs +++ b/gstreamer-audio/src/auto/enums.rs @@ -1,12 +1,16 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; -use glib::Type; use glib::StaticType; -use glib::value::{Value, SetValue, FromValue, FromValueOptional}; -use gobject_ffi; +use glib::Type; use glib::translate::*; +use glib::value::FromValue; +use glib::value::FromValueOptional; +use glib::value::SetValue; +use glib::value::Value; +use gobject_ffi; #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum AudioChannelPosition { diff --git a/gstreamer-audio/src/auto/flags.rs b/gstreamer-audio/src/auto/flags.rs index a9869e82c..a5fd5bccf 100644 --- a/gstreamer-audio/src/auto/flags.rs +++ b/gstreamer-audio/src/auto/flags.rs @@ -1,12 +1,16 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; -use glib::Type; use glib::StaticType; -use glib::value::{Value, SetValue, FromValue, FromValueOptional}; -use gobject_ffi; +use glib::Type; use glib::translate::*; +use glib::value::FromValue; +use glib::value::FromValueOptional; +use glib::value::SetValue; +use glib::value::Value; +use gobject_ffi; bitflags! { pub struct AudioFlags: u32 { diff --git a/gstreamer-audio/src/auto/mod.rs b/gstreamer-audio/src/auto/mod.rs index 5077d7bdb..4190d4e56 100644 --- a/gstreamer-audio/src/auto/mod.rs +++ b/gstreamer-audio/src/auto/mod.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT mod stream_volume; diff --git a/gstreamer-audio/src/auto/stream_volume.rs b/gstreamer-audio/src/auto/stream_volume.rs index 38b4d183c..6915ce0ec 100644 --- a/gstreamer-audio/src/auto/stream_volume.rs +++ b/gstreamer-audio/src/auto/stream_volume.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use StreamVolumeFormat; @@ -94,14 +95,12 @@ impl + IsA> StreamVolumeExt for O { unsafe extern "C" fn notify_mute_trampoline

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

(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&StreamVolume::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer-audio/src/lib.rs b/gstreamer-audio/src/lib.rs index d127f1a7b..238f24903 100644 --- a/gstreamer-audio/src/lib.rs +++ b/gstreamer-audio/src/lib.rs @@ -18,12 +18,6 @@ extern crate gstreamer as gst; extern crate gstreamer_audio_sys as ffi; extern crate gstreamer_sys as gst_ffi; -macro_rules! callback_guard { - () => ( - let _guard = ::glib::CallbackGuard::new(); - ) -} - macro_rules! assert_initialized_main_thread { () => ( if unsafe {::gst_ffi::gst_is_initialized()} != ::glib_ffi::GTRUE { diff --git a/gstreamer-base/src/auto/adapter.rs b/gstreamer-base/src/auto/adapter.rs index 2a09338d0..f835fb00e 100644 --- a/gstreamer-base/src/auto/adapter.rs +++ b/gstreamer-base/src/auto/adapter.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer-base/src/auto/base_sink.rs b/gstreamer-base/src/auto/base_sink.rs index 78726ca6a..15391956b 100644 --- a/gstreamer-base/src/auto/base_sink.rs +++ b/gstreamer-base/src/auto/base_sink.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; @@ -446,77 +447,66 @@ impl + IsA> BaseSinkExt for O { unsafe extern "C" fn notify_async_trampoline

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

(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&BaseSink::from_glib_borrow(this).downcast_unchecked()) } 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 { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&BaseSink::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_last_sample_trampoline

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

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

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

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

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

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

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

(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&BaseSink::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer-base/src/auto/base_src.rs b/gstreamer-base/src/auto/base_src.rs index ef164000a..d3e8647f2 100644 --- a/gstreamer-base/src/auto/base_src.rs +++ b/gstreamer-base/src/auto/base_src.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; @@ -267,28 +268,24 @@ impl + IsA> BaseSrcExt for O { unsafe extern "C" fn notify_blocksize_trampoline

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

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

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

(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&BaseSrc::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer-base/src/auto/base_transform.rs b/gstreamer-base/src/auto/base_transform.rs index 86265b2bd..63f2e3c4b 100644 --- a/gstreamer-base/src/auto/base_transform.rs +++ b/gstreamer-base/src/auto/base_transform.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; @@ -175,7 +176,6 @@ impl + IsA> BaseTransformExt for O { unsafe extern "C" fn notify_qos_trampoline

(this: *mut ffi::GstBaseTransform, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&BaseTransform::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer-base/src/auto/enums.rs b/gstreamer-base/src/auto/enums.rs index 28738409e..fe9b15727 100644 --- a/gstreamer-base/src/auto/enums.rs +++ b/gstreamer-base/src/auto/enums.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer-base/src/auto/flags.rs b/gstreamer-base/src/auto/flags.rs index 28738409e..fe9b15727 100644 --- a/gstreamer-base/src/auto/flags.rs +++ b/gstreamer-base/src/auto/flags.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer-base/src/auto/functions.rs b/gstreamer-base/src/auto/functions.rs index 32a4c2d66..c30e435a2 100644 --- a/gstreamer-base/src/auto/functions.rs +++ b/gstreamer-base/src/auto/functions.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer-base/src/auto/mod.rs b/gstreamer-base/src/auto/mod.rs index 1345ffddd..fd4433be4 100644 --- a/gstreamer-base/src/auto/mod.rs +++ b/gstreamer-base/src/auto/mod.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT mod adapter; diff --git a/gstreamer-base/src/auto/push_src.rs b/gstreamer-base/src/auto/push_src.rs index fd2a8ebb5..2aac47315 100644 --- a/gstreamer-base/src/auto/push_src.rs +++ b/gstreamer-base/src/auto/push_src.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use BaseSrc; diff --git a/gstreamer-base/src/lib.rs b/gstreamer-base/src/lib.rs index 8cd32f656..737da8a33 100644 --- a/gstreamer-base/src/lib.rs +++ b/gstreamer-base/src/lib.rs @@ -15,12 +15,6 @@ extern crate gstreamer_sys as gst_ffi; #[macro_use] extern crate glib; -macro_rules! callback_guard { - () => ( - let _guard = ::glib::CallbackGuard::new(); - ) -} - macro_rules! assert_initialized_main_thread { () => ( if unsafe {::gst_ffi::gst_is_initialized()} != ::glib_ffi::GTRUE { diff --git a/gstreamer-net/src/auto/enums.rs b/gstreamer-net/src/auto/enums.rs index 28738409e..fe9b15727 100644 --- a/gstreamer-net/src/auto/enums.rs +++ b/gstreamer-net/src/auto/enums.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer-net/src/auto/flags.rs b/gstreamer-net/src/auto/flags.rs index 28738409e..fe9b15727 100644 --- a/gstreamer-net/src/auto/flags.rs +++ b/gstreamer-net/src/auto/flags.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer-net/src/auto/mod.rs b/gstreamer-net/src/auto/mod.rs index cc8c62bc2..716f0b8a2 100644 --- a/gstreamer-net/src/auto/mod.rs +++ b/gstreamer-net/src/auto/mod.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT mod net_client_clock; diff --git a/gstreamer-net/src/auto/net_client_clock.rs b/gstreamer-net/src/auto/net_client_clock.rs index a03e811ee..d80f7c19e 100644 --- a/gstreamer-net/src/auto/net_client_clock.rs +++ b/gstreamer-net/src/auto/net_client_clock.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; @@ -185,43 +186,36 @@ 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) { - callback_guard!(); let f: &&(Fn(&NetClientClock) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } unsafe extern "C" fn notify_base_time_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&NetClientClock) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&NetClientClock) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&NetClientClock) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&NetClientClock) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&NetClientClock) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&NetClientClock) + Send + Sync + 'static) = 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 0d6713d0f..cc1ed0269 100644 --- a/gstreamer-net/src/auto/net_time_provider.rs +++ b/gstreamer-net/src/auto/net_time_provider.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; @@ -112,25 +113,21 @@ 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) { - callback_guard!(); let f: &&(Fn(&NetTimeProvider) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } unsafe extern "C" fn notify_address_trampoline(this: *mut ffi::GstNetTimeProvider, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&NetTimeProvider) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } unsafe extern "C" fn notify_clock_trampoline(this: *mut ffi::GstNetTimeProvider, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&NetTimeProvider) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } unsafe extern "C" fn notify_port_trampoline(this: *mut ffi::GstNetTimeProvider, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&NetTimeProvider) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-net/src/auto/ntp_clock.rs b/gstreamer-net/src/auto/ntp_clock.rs index 340d7b558..e87c18e08 100644 --- a/gstreamer-net/src/auto/ntp_clock.rs +++ b/gstreamer-net/src/auto/ntp_clock.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use NetClientClock; diff --git a/gstreamer-net/src/auto/ptp_clock.rs b/gstreamer-net/src/auto/ptp_clock.rs index c68a164ce..4acce5c27 100644 --- a/gstreamer-net/src/auto/ptp_clock.rs +++ b/gstreamer-net/src/auto/ptp_clock.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; @@ -107,25 +108,21 @@ unsafe impl Send for PtpClock {} unsafe impl Sync for PtpClock {} unsafe extern "C" fn notify_domain_trampoline(this: *mut ffi::GstPtpClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&PtpClock) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } unsafe extern "C" fn notify_grandmaster_clock_id_trampoline(this: *mut ffi::GstPtpClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&PtpClock) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&PtpClock) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&PtpClock) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-net/src/lib.rs b/gstreamer-net/src/lib.rs index c7361e730..12ef881fc 100644 --- a/gstreamer-net/src/lib.rs +++ b/gstreamer-net/src/lib.rs @@ -15,12 +15,6 @@ extern crate gstreamer_sys as gst_ffi; #[macro_use] extern crate glib; -macro_rules! callback_guard { - () => ( - let _guard = ::glib::CallbackGuard::new(); - ) -} - macro_rules! assert_initialized_main_thread { () => ( if unsafe {::gst_ffi::gst_is_initialized()} != ::glib_ffi::GTRUE { diff --git a/gstreamer-player/src/auto/enums.rs b/gstreamer-player/src/auto/enums.rs index 025da9398..8a70622e9 100644 --- a/gstreamer-player/src/auto/enums.rs +++ b/gstreamer-player/src/auto/enums.rs @@ -1,14 +1,18 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; -use glib_ffi; -use glib::error::ErrorDomain; -use glib::Type; use glib::StaticType; -use glib::value::{Value, SetValue, FromValue, FromValueOptional}; -use gobject_ffi; +use glib::Type; +use glib::error::ErrorDomain; use glib::translate::*; +use glib::value::FromValue; +use glib::value::FromValueOptional; +use glib::value::SetValue; +use glib::value::Value; +use glib_ffi; +use gobject_ffi; #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum PlayerColorBalanceType { diff --git a/gstreamer-player/src/auto/flags.rs b/gstreamer-player/src/auto/flags.rs index 28738409e..fe9b15727 100644 --- a/gstreamer-player/src/auto/flags.rs +++ b/gstreamer-player/src/auto/flags.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer-player/src/auto/mod.rs b/gstreamer-player/src/auto/mod.rs index 7055e659b..f4ac17aca 100644 --- a/gstreamer-player/src/auto/mod.rs +++ b/gstreamer-player/src/auto/mod.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT mod player; diff --git a/gstreamer-player/src/auto/player.rs b/gstreamer-player/src/auto/player.rs index 41e059648..94ded7fe2 100644 --- a/gstreamer-player/src/auto/player.rs +++ b/gstreamer-player/src/auto/player.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Error; @@ -574,163 +575,136 @@ 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) { - callback_guard!(); let f: &&(Fn(&Player, i32) + Send + 'static) = transmute(f); f(&from_glib_borrow(this), object) } unsafe extern "C" fn end_of_stream_trampoline(this: *mut ffi::GstPlayer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&Player) + Send + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player, &Error) + Send + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player, &PlayerMediaInfo) + Send + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player, PlayerState) + Send + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player, &str) + Send + 'static) = transmute(f); f(&from_glib_borrow(this), &String::from_glib_none(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) { - callback_guard!(); let f: &&(Fn(&Player, i32, i32) + Send + 'static) = transmute(f); f(&from_glib_borrow(this), object, p0) } unsafe extern "C" fn volume_changed_trampoline(this: *mut ffi::GstPlayer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&Player) + Send + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player, &Error) + Send + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } unsafe extern "C" fn notify_signal_dispatcher_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } unsafe extern "C" fn notify_video_renderer_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Player) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-player/src/auto/player_audio_info.rs b/gstreamer-player/src/auto/player_audio_info.rs index 54e136b0e..a235974c3 100644 --- a/gstreamer-player/src/auto/player_audio_info.rs +++ b/gstreamer-player/src/auto/player_audio_info.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use PlayerStreamInfo; diff --git a/gstreamer-player/src/auto/player_g_main_context_signal_dispatcher.rs b/gstreamer-player/src/auto/player_g_main_context_signal_dispatcher.rs index 81d27d5d7..c134bdbc6 100644 --- a/gstreamer-player/src/auto/player_g_main_context_signal_dispatcher.rs +++ b/gstreamer-player/src/auto/player_g_main_context_signal_dispatcher.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use PlayerSignalDispatcher; @@ -46,7 +47,6 @@ unsafe impl Send for PlayerGMainContextSignalDispatcher {} unsafe impl Sync for PlayerGMainContextSignalDispatcher {} unsafe extern "C" fn notify_application_context_trampoline(this: *mut ffi::GstPlayerGMainContextSignalDispatcher, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&PlayerGMainContextSignalDispatcher) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-player/src/auto/player_media_info.rs b/gstreamer-player/src/auto/player_media_info.rs index e07928ffa..0b871067c 100644 --- a/gstreamer-player/src/auto/player_media_info.rs +++ b/gstreamer-player/src/auto/player_media_info.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use PlayerAudioInfo; diff --git a/gstreamer-player/src/auto/player_signal_dispatcher.rs b/gstreamer-player/src/auto/player_signal_dispatcher.rs index 8fb6003de..e47e5b4fe 100644 --- a/gstreamer-player/src/auto/player_signal_dispatcher.rs +++ b/gstreamer-player/src/auto/player_signal_dispatcher.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer-player/src/auto/player_stream_info.rs b/gstreamer-player/src/auto/player_stream_info.rs index 3abbbaf5a..1de29622e 100644 --- a/gstreamer-player/src/auto/player_stream_info.rs +++ b/gstreamer-player/src/auto/player_stream_info.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer-player/src/auto/player_subtitle_info.rs b/gstreamer-player/src/auto/player_subtitle_info.rs index 0097c5949..fa65fc556 100644 --- a/gstreamer-player/src/auto/player_subtitle_info.rs +++ b/gstreamer-player/src/auto/player_subtitle_info.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use PlayerStreamInfo; diff --git a/gstreamer-player/src/auto/player_video_info.rs b/gstreamer-player/src/auto/player_video_info.rs index 59f8405da..a39755670 100644 --- a/gstreamer-player/src/auto/player_video_info.rs +++ b/gstreamer-player/src/auto/player_video_info.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use PlayerStreamInfo; 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 0469cefa4..6302067ba 100644 --- a/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs +++ b/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use PlayerVideoRenderer; @@ -101,13 +102,11 @@ 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) { - callback_guard!(); let f: &&(Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer-player/src/auto/player_video_renderer.rs b/gstreamer-player/src/auto/player_video_renderer.rs index 11103e555..402465ec3 100644 --- a/gstreamer-player/src/auto/player_video_renderer.rs +++ b/gstreamer-player/src/auto/player_video_renderer.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer-player/src/auto/player_visualization.rs b/gstreamer-player/src/auto/player_visualization.rs index e737269f6..aa47e26c1 100644 --- a/gstreamer-player/src/auto/player_visualization.rs +++ b/gstreamer-player/src/auto/player_visualization.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer-player/src/lib.rs b/gstreamer-player/src/lib.rs index 027b87ee3..7db4f2f23 100644 --- a/gstreamer-player/src/lib.rs +++ b/gstreamer-player/src/lib.rs @@ -18,12 +18,6 @@ extern crate gstreamer_video as gst_video; #[macro_use] extern crate glib; -macro_rules! callback_guard { - () => ( - let _guard = ::glib::CallbackGuard::new(); - ) -} - macro_rules! skip_assert_initialized { () => ( ) diff --git a/gstreamer-player/src/player.rs b/gstreamer-player/src/player.rs index 8ac8d155f..49e50ff19 100644 --- a/gstreamer-player/src/player.rs +++ b/gstreamer-player/src/player.rs @@ -105,7 +105,6 @@ unsafe extern "C" fn duration_changed_trampoline( object: u64, f: glib_ffi::gpointer, ) { - callback_guard!(); let f: &&(Fn(&Player, gst::ClockTime) + Send + 'static) = transmute(f); f(&from_glib_borrow(this), gst::ClockTime(Some(object))) } @@ -115,7 +114,6 @@ unsafe extern "C" fn position_updated_trampoline( object: u64, f: glib_ffi::gpointer, ) { - callback_guard!(); let f: &&(Fn(&Player, gst::ClockTime) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this), gst::ClockTime(Some(object))) } @@ -125,7 +123,6 @@ unsafe extern "C" fn seek_done_trampoline( object: u64, f: glib_ffi::gpointer, ) { - callback_guard!(); let f: &&(Fn(&Player, gst::ClockTime) + Send + 'static) = transmute(f); f(&from_glib_borrow(this), gst::ClockTime(Some(object))) } diff --git a/gstreamer-rtsp-server/src/auto/enums.rs b/gstreamer-rtsp-server/src/auto/enums.rs index 20d1fff34..4e3d4f33c 100644 --- a/gstreamer-rtsp-server/src/auto/enums.rs +++ b/gstreamer-rtsp-server/src/auto/enums.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-rtsp-server/src/auto/flags.rs b/gstreamer-rtsp-server/src/auto/flags.rs index f2f82ff2b..95faf29c9 100644 --- a/gstreamer-rtsp-server/src/auto/flags.rs +++ b/gstreamer-rtsp-server/src/auto/flags.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-rtsp-server/src/auto/mod.rs b/gstreamer-rtsp-server/src/auto/mod.rs index 253928e56..f77c5fbea 100644 --- a/gstreamer-rtsp-server/src/auto/mod.rs +++ b/gstreamer-rtsp-server/src/auto/mod.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_address.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_address.rs index 84418c1e8..5732210db 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_address.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_address.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_address_pool.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_address_pool.rs index 5984059c0..257881c2b 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_address_pool.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_address_pool.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_auth.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_auth.rs index 40a8d2892..f726ee886 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_auth.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_auth.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_client.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_client.rs index 2a3bf711e..4e5e774be 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_client.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_client.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -486,63 +486,54 @@ impl + IsA> RTSPClientExt for O { unsafe extern "C" fn announce_request_trampoline

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

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

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

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

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

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

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

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

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPContext) + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(ctx)) } @@ -550,7 +541,6 @@ where P: IsA { #[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 where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(ctx)).to_glib() } @@ -558,7 +548,6 @@ where P: IsA { #[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 where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(ctx)).to_glib() } @@ -566,7 +555,6 @@ where P: IsA { #[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 where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(ctx)).to_glib() } @@ -574,7 +562,6 @@ where P: IsA { #[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 where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(ctx)).to_glib() } @@ -582,7 +569,6 @@ where P: IsA { #[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 where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(ctx)).to_glib() } @@ -590,7 +576,6 @@ where P: IsA { #[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 where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(ctx)).to_glib() } @@ -598,7 +583,6 @@ where P: IsA { #[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 where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(ctx)).to_glib() } @@ -606,7 +590,6 @@ where P: IsA { #[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 where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(ctx)).to_glib() } @@ -614,7 +597,6 @@ where P: IsA { #[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 where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(ctx)).to_glib() } @@ -622,56 +604,48 @@ where P: IsA { #[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 where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked(), &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) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPContext) + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(ctx)) } unsafe extern "C" fn set_parameter_request_trampoline

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

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

(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPContext) + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked(), &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) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_mount_points_trampoline

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

(this: *mut ffi::GstRTSPClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPClient::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_media.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_media.rs index a298f40d4..341bdfc44 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_media.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_media.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -713,133 +713,114 @@ impl + IsA> RTSPMediaExt for O { unsafe extern "C" fn new_state_trampoline

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPMedia::from_glib_borrow(this).downcast_unchecked()) } 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 { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPMedia::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_suspend_mode_trampoline

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

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

(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPMedia::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_media_factory.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_media_factory.rs index d694a6ae5..5b39c01a0 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_media_factory.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_media_factory.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -513,91 +513,78 @@ impl + IsA> RTSPMediaFactoryExt f unsafe extern "C" fn media_configure_trampoline

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

(this: *mut ffi::GstRTSPMediaFactory, object: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPMedia) + Send + Sync + 'static) = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).downcast_unchecked(), &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) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_clock_trampoline

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

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

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

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

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

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

(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).downcast_unchecked()) } 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 { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_suspend_mode_trampoline

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

(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPMediaFactory::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_media_factory_u_r_i.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_media_factory_u_r_i.rs index b2e2aa72f..e0aac37b0 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_media_factory_u_r_i.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_media_factory_u_r_i.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -105,14 +105,12 @@ impl + IsA> RTSPMediaFactoryUR unsafe extern "C" fn notify_uri_trampoline

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

(this: *mut ffi::GstRTSPMediaFactoryURI, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPMediaFactoryURI::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_mount_points.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_mount_points.rs index a00856561..a8a1c3703 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_mount_points.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_mount_points.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_server.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_server.rs index 8506faa11..02c8fe60a 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_server.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_server.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -300,49 +300,42 @@ impl + IsA> RTSPServerExt for O { unsafe extern "C" fn client_connected_trampoline

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

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

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

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

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

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

(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPServer::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_session.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_session.rs index 1ba7f32e3..46d8b790c 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_session.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_session.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -210,21 +210,18 @@ impl + IsA> RTSPSessionExt for O { unsafe extern "C" fn notify_sessionid_trampoline

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

(this: *mut ffi::GstRTSPSession, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPSession::from_glib_borrow(this).downcast_unchecked()) } 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 { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPSession::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_session_media.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_session_media.rs index 5cc6b4fa2..b5c7faf02 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_session_media.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_session_media.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_session_pool.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_session_pool.rs index bc0377a8b..1adae1fd0 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_session_pool.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_session_pool.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -131,14 +131,12 @@ impl + IsA> RTSPSessionPoolExt for unsafe extern "C" fn session_removed_trampoline

(this: *mut ffi::GstRTSPSessionPool, object: *mut ffi::GstRTSPSession, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &RTSPSession) + Send + Sync + 'static) = transmute(f); f(&RTSPSessionPool::from_glib_borrow(this).downcast_unchecked(), &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) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPSessionPool::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_stream.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_stream.rs index 06e8c4eae..a6984a3da 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_stream.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -557,35 +557,30 @@ impl + IsA> RTSPStreamExt for O { unsafe extern "C" fn new_rtcp_encoder_trampoline

(this: *mut ffi::GstRTSPStream, object: *mut gst_ffi::GstElement, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &gst::Element) + Send + Sync + 'static) = transmute(f); f(&RTSPStream::from_glib_borrow(this).downcast_unchecked(), &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) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &gst::Element) + Send + Sync + 'static) = transmute(f); f(&RTSPStream::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(object)) } unsafe extern "C" fn notify_control_trampoline

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

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

(this: *mut ffi::GstRTSPStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_stream_transport.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_stream_transport.rs index fea5dc79f..dd52b0fb4 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_stream_transport.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_stream_transport.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-rtsp-server/src/auto/r_t_s_p_thread_pool.rs b/gstreamer-rtsp-server/src/auto/r_t_s_p_thread_pool.rs index ed619152a..dea798067 100644 --- a/gstreamer-rtsp-server/src/auto/r_t_s_p_thread_pool.rs +++ b/gstreamer-rtsp-server/src/auto/r_t_s_p_thread_pool.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -87,7 +87,6 @@ impl + IsA> RTSPThreadPoolExt for O unsafe extern "C" fn notify_max_threads_trampoline

(this: *mut ffi::GstRTSPThreadPool, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPThreadPool::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer-rtsp-server/src/lib.rs b/gstreamer-rtsp-server/src/lib.rs index 19c71b9f7..b54b00763 100644 --- a/gstreamer-rtsp-server/src/lib.rs +++ b/gstreamer-rtsp-server/src/lib.rs @@ -24,12 +24,6 @@ extern crate gstreamer_net as gst_net; extern crate gstreamer_net_sys as gst_net_ffi; extern crate gstreamer_rtsp_server_sys as ffi; -macro_rules! callback_guard { - () => ( - let _guard = ::glib::CallbackGuard::new(); - ) -} - macro_rules! assert_initialized_main_thread { () => ( if unsafe {::gst_ffi::gst_is_initialized()} != ::glib_ffi::GTRUE { diff --git a/gstreamer-rtsp-server/src/r_t_s_p_session_pool.rs b/gstreamer-rtsp-server/src/r_t_s_p_session_pool.rs index 5ecc89e6a..a1f73fa03 100644 --- a/gstreamer-rtsp-server/src/r_t_s_p_session_pool.rs +++ b/gstreamer-rtsp-server/src/r_t_s_p_session_pool.rs @@ -6,21 +6,19 @@ use glib; use glib_ffi; use glib::object::IsA; use glib::translate::*; -use glib::source::{CallbackGuard, Continue, Priority}; +use glib::source::{Continue, Priority}; use glib_ffi::{gboolean, gpointer}; unsafe extern "C" fn trampoline_watch( pool: *mut ffi::GstRTSPSessionPool, func: gpointer, ) -> gboolean { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &RefCell Continue + Send + 'static>> = transmute(func); (&mut *func.borrow_mut())(&from_glib_borrow(pool)).to_glib() } unsafe extern "C" fn destroy_closure_watch(ptr: gpointer) { - let _guard = CallbackGuard::new(); Box:: Continue + Send + 'static>>>::from_raw( ptr as *mut _, ); diff --git a/gstreamer-rtsp/src/auto/enums.rs b/gstreamer-rtsp/src/auto/enums.rs index abd20eb68..1c6d62288 100644 --- a/gstreamer-rtsp/src/auto/enums.rs +++ b/gstreamer-rtsp/src/auto/enums.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-rtsp/src/auto/flags.rs b/gstreamer-rtsp/src/auto/flags.rs index 71c679f1d..a02fe2225 100644 --- a/gstreamer-rtsp/src/auto/flags.rs +++ b/gstreamer-rtsp/src/auto/flags.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-rtsp/src/auto/mod.rs b/gstreamer-rtsp/src/auto/mod.rs index 6634c037b..774cc7ef9 100644 --- a/gstreamer-rtsp/src/auto/mod.rs +++ b/gstreamer-rtsp/src/auto/mod.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-rtsp/src/auto/r_t_s_p_auth_param.rs b/gstreamer-rtsp/src/auto/r_t_s_p_auth_param.rs index 019ffcbd1..20febd034 100644 --- a/gstreamer-rtsp/src/auto/r_t_s_p_auth_param.rs +++ b/gstreamer-rtsp/src/auto/r_t_s_p_auth_param.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-rtsp/src/auto/r_t_s_p_url.rs b/gstreamer-rtsp/src/auto/r_t_s_p_url.rs index b05d40995..d025299fc 100644 --- a/gstreamer-rtsp/src/auto/r_t_s_p_url.rs +++ b/gstreamer-rtsp/src/auto/r_t_s_p_url.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-sdp/src/auto/enums.rs b/gstreamer-sdp/src/auto/enums.rs index aa9181b9d..0c34d9a5c 100644 --- a/gstreamer-sdp/src/auto/enums.rs +++ b/gstreamer-sdp/src/auto/enums.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-sdp/src/auto/flags.rs b/gstreamer-sdp/src/auto/flags.rs index ea499f475..fe9b15727 100644 --- a/gstreamer-sdp/src/auto/flags.rs +++ b/gstreamer-sdp/src/auto/flags.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-sdp/src/auto/mod.rs b/gstreamer-sdp/src/auto/mod.rs index b4dc81978..236a1fe18 100644 --- a/gstreamer-sdp/src/auto/mod.rs +++ b/gstreamer-sdp/src/auto/mod.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 47eb915) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer-video/src/auto/enums.rs b/gstreamer-video/src/auto/enums.rs index 1f4a6e632..f1b81fef5 100644 --- a/gstreamer-video/src/auto/enums.rs +++ b/gstreamer-video/src/auto/enums.rs @@ -1,12 +1,16 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; -use glib::Type; use glib::StaticType; -use glib::value::{Value, SetValue, FromValue, FromValueOptional}; -use gobject_ffi; +use glib::Type; use glib::translate::*; +use glib::value::FromValue; +use glib::value::FromValueOptional; +use glib::value::SetValue; +use glib::value::Value; +use gobject_ffi; #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum VideoColorMatrix { diff --git a/gstreamer-video/src/auto/flags.rs b/gstreamer-video/src/auto/flags.rs index f84f33cbd..91031ac13 100644 --- a/gstreamer-video/src/auto/flags.rs +++ b/gstreamer-video/src/auto/flags.rs @@ -1,12 +1,16 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; -use glib::Type; use glib::StaticType; -use glib::value::{Value, SetValue, FromValue, FromValueOptional}; -use gobject_ffi; +use glib::Type; use glib::translate::*; +use glib::value::FromValue; +use glib::value::FromValueOptional; +use glib::value::SetValue; +use glib::value::Value; +use gobject_ffi; bitflags! { pub struct VideoChromaSite: u32 { diff --git a/gstreamer-video/src/auto/mod.rs b/gstreamer-video/src/auto/mod.rs index 3fefd58bc..2112e34e6 100644 --- a/gstreamer-video/src/auto/mod.rs +++ b/gstreamer-video/src/auto/mod.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT mod video_filter; diff --git a/gstreamer-video/src/auto/video_filter.rs b/gstreamer-video/src/auto/video_filter.rs index beebf81af..72828c620 100644 --- a/gstreamer-video/src/auto/video_filter.rs +++ b/gstreamer-video/src/auto/video_filter.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer-video/src/auto/video_overlay.rs b/gstreamer-video/src/auto/video_overlay.rs index fc491e9fb..f55c11f4d 100644 --- a/gstreamer-video/src/auto/video_overlay.rs +++ b/gstreamer-video/src/auto/video_overlay.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer-video/src/functions.rs b/gstreamer-video/src/functions.rs index 6d9fcd1e3..581b00cc9 100644 --- a/gstreamer-video/src/functions.rs +++ b/gstreamer-video/src/functions.rs @@ -54,7 +54,6 @@ pub fn convert_sample_async( ) where F: FnOnce(Result) + Send + 'static, { - callback_guard!(); let callback: &mut Option> = mem::transmute(user_data); let callback = callback.take().unwrap(); @@ -68,7 +67,6 @@ pub fn convert_sample_async( where F: FnOnce(Result) + Send + 'static, { - callback_guard!(); let _: Box>> = Box::from_raw(user_data as *mut _); } diff --git a/gstreamer-video/src/lib.rs b/gstreamer-video/src/lib.rs index 3147d1b1a..f28317f5c 100644 --- a/gstreamer-video/src/lib.rs +++ b/gstreamer-video/src/lib.rs @@ -33,12 +33,6 @@ macro_rules! skip_assert_initialized { ) } -macro_rules! callback_guard { - () => ( - let _guard = ::glib::CallbackGuard::new(); - ) -} - pub use glib::{Cast, Continue, Error, IsA, StaticType, ToValue, Type, TypedValue, Value}; #[cfg_attr(feature = "cargo-clippy", allow(unreadable_literal))] diff --git a/gstreamer/src/auto/alias.rs b/gstreamer/src/auto/alias.rs index 244a11ff7..2fdb31a36 100644 --- a/gstreamer/src/auto/alias.rs +++ b/gstreamer/src/auto/alias.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT #[allow(unused_imports)] diff --git a/gstreamer/src/auto/bin.rs b/gstreamer/src/auto/bin.rs index 6e20ed9e9..093c86f63 100644 --- a/gstreamer/src/auto/bin.rs +++ b/gstreamer/src/auto/bin.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ChildProxy; @@ -295,7 +296,6 @@ impl + IsA> BinExt for O { #[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) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &Bin, &Element) + Send + Sync + 'static) = transmute(f); f(&Bin::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(sub_bin), &from_glib_borrow(element)) } @@ -303,42 +303,36 @@ where P: IsA { #[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) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &Bin, &Element) + Send + Sync + 'static) = transmute(f); f(&Bin::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(sub_bin), &from_glib_borrow(element)) } unsafe extern "C" fn do_latency_trampoline

(this: *mut ffi::GstBin, f: glib_ffi::gpointer) -> glib_ffi::gboolean where P: IsA { - callback_guard!(); let f: &&(Fn(&P) -> bool + Send + Sync + 'static) = transmute(f); f(&Bin::from_glib_borrow(this).downcast_unchecked()).to_glib() } unsafe extern "C" fn element_added_trampoline

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

(this: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &Element) + Send + Sync + 'static) = transmute(f); f(&Bin::from_glib_borrow(this).downcast_unchecked(), &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) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&Bin::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_message_forward_trampoline

(this: *mut ffi::GstBin, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&Bin::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer/src/auto/bus.rs b/gstreamer/src/auto/bus.rs index 965aa391e..7d9d4fb5a 100644 --- a/gstreamer/src/auto/bus.rs +++ b/gstreamer/src/auto/bus.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ClockTime; @@ -147,19 +148,16 @@ 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) { - callback_guard!(); let f: &&(Fn(&Bus, &Message) + Send + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Bus, &Message) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this), &from_glib_borrow(message)) } unsafe extern "C" fn notify_enable_async_trampoline(this: *mut ffi::GstBus, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&Bus) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer/src/auto/child_proxy.rs b/gstreamer/src/auto/child_proxy.rs index baa8cae0a..f09bfc2fa 100644 --- a/gstreamer/src/auto/child_proxy.rs +++ b/gstreamer/src/auto/child_proxy.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; @@ -135,14 +136,12 @@ impl + IsA> ChildProxyExt for O { 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 { - callback_guard!(); let f: &&(Fn(&P, &glib::Object, &str) + Send + Sync + 'static) = transmute(f); f(&ChildProxy::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(object), &String::from_glib_none(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) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &glib::Object, &str) + Send + Sync + 'static) = transmute(f); f(&ChildProxy::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(object), &String::from_glib_none(name)) } diff --git a/gstreamer/src/auto/clock.rs b/gstreamer/src/auto/clock.rs index cd290db39..46d4bd817 100644 --- a/gstreamer/src/auto/clock.rs +++ b/gstreamer/src/auto/clock.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ClockTime; @@ -317,28 +318,24 @@ impl + IsA> ClockExt for O { unsafe extern "C" fn synced_trampoline

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

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

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

(this: *mut ffi::GstClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&Clock::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer/src/auto/date_time.rs b/gstreamer/src/auto/date_time.rs index 4c7dc4398..f8a1ed8a3 100644 --- a/gstreamer/src/auto/date_time.rs +++ b/gstreamer/src/auto/date_time.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer/src/auto/device.rs b/gstreamer/src/auto/device.rs index d33c1b09b..60d093be5 100644 --- a/gstreamer/src/auto/device.rs +++ b/gstreamer/src/auto/device.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Caps; @@ -152,35 +153,30 @@ impl + IsA> DeviceExt for O { unsafe extern "C" fn removed_trampoline

(this: *mut ffi::GstDevice, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&Device::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_caps_trampoline

(this: *mut ffi::GstDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&Device::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_device_class_trampoline

(this: *mut ffi::GstDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&Device::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_display_name_trampoline

(this: *mut ffi::GstDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&Device::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_properties_trampoline

(this: *mut ffi::GstDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&Device::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer/src/auto/device_monitor.rs b/gstreamer/src/auto/device_monitor.rs index 5d1190f17..35202c575 100644 --- a/gstreamer/src/auto/device_monitor.rs +++ b/gstreamer/src/auto/device_monitor.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Bus; @@ -157,7 +158,6 @@ impl + IsA> DeviceMonitorExt for O { unsafe extern "C" fn notify_show_all_trampoline

(this: *mut ffi::GstDeviceMonitor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&DeviceMonitor::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer/src/auto/device_provider.rs b/gstreamer/src/auto/device_provider.rs index 5436695e4..2a90a1dfa 100644 --- a/gstreamer/src/auto/device_provider.rs +++ b/gstreamer/src/auto/device_provider.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Bus; @@ -157,14 +158,12 @@ impl + IsA> DeviceProviderExt for O unsafe extern "C" fn provider_hidden_trampoline

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

(this: *mut ffi::GstDeviceProvider, object: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &str) + Send + Sync + 'static) = transmute(f); f(&DeviceProvider::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(object)) } diff --git a/gstreamer/src/auto/device_provider_factory.rs b/gstreamer/src/auto/device_provider_factory.rs index c84170968..818a32b23 100644 --- a/gstreamer/src/auto/device_provider_factory.rs +++ b/gstreamer/src/auto/device_provider_factory.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use DeviceProvider; diff --git a/gstreamer/src/auto/element.rs b/gstreamer/src/auto/element.rs index 176b3ca28..cf566bcef 100644 --- a/gstreamer/src/auto/element.rs +++ b/gstreamer/src/auto/element.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Bus; @@ -502,21 +503,18 @@ impl + IsA> ElementExt for O { unsafe extern "C" fn no_more_pads_trampoline

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

(this: *mut ffi::GstElement, new_pad: *mut ffi::GstPad, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &Pad) + Send + Sync + 'static) = transmute(f); f(&Element::from_glib_borrow(this).downcast_unchecked(), &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) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &Pad) + Send + Sync + 'static) = transmute(f); f(&Element::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(old_pad)) } diff --git a/gstreamer/src/auto/element_factory.rs b/gstreamer/src/auto/element_factory.rs index 5efe03865..7653d5d5b 100644 --- a/gstreamer/src/auto/element_factory.rs +++ b/gstreamer/src/auto/element_factory.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Caps; diff --git a/gstreamer/src/auto/enums.rs b/gstreamer/src/auto/enums.rs index 65d967a16..515f79dfb 100644 --- a/gstreamer/src/auto/enums.rs +++ b/gstreamer/src/auto/enums.rs @@ -1,14 +1,18 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; -use glib_ffi; -use glib::error::ErrorDomain; -use glib::Type; use glib::StaticType; -use glib::value::{Value, SetValue, FromValue, FromValueOptional}; -use gobject_ffi; +use glib::Type; +use glib::error::ErrorDomain; use glib::translate::*; +use glib::value::FromValue; +use glib::value::FromValueOptional; +use glib::value::SetValue; +use glib::value::Value; +use glib_ffi; +use gobject_ffi; #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum BufferingMode { diff --git a/gstreamer/src/auto/flags.rs b/gstreamer/src/auto/flags.rs index 31e3daa37..06e642806 100644 --- a/gstreamer/src/auto/flags.rs +++ b/gstreamer/src/auto/flags.rs @@ -1,12 +1,16 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; -use glib::Type; use glib::StaticType; -use glib::value::{Value, SetValue, FromValue, FromValueOptional}; -use gobject_ffi; +use glib::Type; use glib::translate::*; +use glib::value::FromValue; +use glib::value::FromValueOptional; +use glib::value::SetValue; +use glib::value::Value; +use gobject_ffi; bitflags! { pub struct BufferCopyFlags: u32 { diff --git a/gstreamer/src/auto/functions.rs b/gstreamer/src/auto/functions.rs index acf8b021d..3527e2374 100644 --- a/gstreamer/src/auto/functions.rs +++ b/gstreamer/src/auto/functions.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Bin; diff --git a/gstreamer/src/auto/ghost_pad.rs b/gstreamer/src/auto/ghost_pad.rs index 5066883f7..2feb1e257 100644 --- a/gstreamer/src/auto/ghost_pad.rs +++ b/gstreamer/src/auto/ghost_pad.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Object; diff --git a/gstreamer/src/auto/mod.rs b/gstreamer/src/auto/mod.rs index 289fda3e5..c3a657ee1 100644 --- a/gstreamer/src/auto/mod.rs +++ b/gstreamer/src/auto/mod.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT mod bin; diff --git a/gstreamer/src/auto/object.rs b/gstreamer/src/auto/object.rs index 93f25c29b..154c0fa16 100644 --- a/gstreamer/src/auto/object.rs +++ b/gstreamer/src/auto/object.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ClockTime; @@ -255,14 +256,12 @@ impl + IsA> GstObjectExt for O { unsafe extern "C" fn notify_name_trampoline

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

(this: *mut ffi::GstObject, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&Object::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer/src/auto/pad.rs b/gstreamer/src/auto/pad.rs index b13e2da37..f9042e987 100644 --- a/gstreamer/src/auto/pad.rs +++ b/gstreamer/src/auto/pad.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Caps; @@ -609,42 +610,36 @@ impl + IsA> PadExt for O { unsafe extern "C" fn linked_trampoline

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

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

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

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

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

(this: *mut ffi::GstPad, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&Pad::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer/src/auto/pad_template.rs b/gstreamer/src/auto/pad_template.rs index 2d70081be..b1c08b807 100644 --- a/gstreamer/src/auto/pad_template.rs +++ b/gstreamer/src/auto/pad_template.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Caps; @@ -117,31 +118,26 @@ 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) { - callback_guard!(); let f: &&(Fn(&PadTemplate, &Pad) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this), &from_glib_borrow(pad)) } unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstPadTemplate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&PadTemplate) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } unsafe extern "C" fn notify_direction_trampoline(this: *mut ffi::GstPadTemplate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&PadTemplate) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } unsafe extern "C" fn notify_name_template_trampoline(this: *mut ffi::GstPadTemplate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&PadTemplate) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } unsafe extern "C" fn notify_presence_trampoline(this: *mut ffi::GstPadTemplate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&PadTemplate) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer/src/auto/pipeline.rs b/gstreamer/src/auto/pipeline.rs index 0b027de44..a600ee609 100644 --- a/gstreamer/src/auto/pipeline.rs +++ b/gstreamer/src/auto/pipeline.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Bin; @@ -153,21 +154,18 @@ impl + IsA> PipelineExt for O { 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 { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&Pipeline::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_delay_trampoline

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

(this: *mut ffi::GstPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&Pipeline::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer/src/auto/plugin.rs b/gstreamer/src/auto/plugin.rs index 4d898e592..c92f0e682 100644 --- a/gstreamer/src/auto/plugin.rs +++ b/gstreamer/src/auto/plugin.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Error; diff --git a/gstreamer/src/auto/plugin_feature.rs b/gstreamer/src/auto/plugin_feature.rs index b5d50cc5b..146a784b9 100644 --- a/gstreamer/src/auto/plugin_feature.rs +++ b/gstreamer/src/auto/plugin_feature.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Object; diff --git a/gstreamer/src/auto/preset.rs b/gstreamer/src/auto/preset.rs index ebf4a1d4b..cf6b2ac4f 100644 --- a/gstreamer/src/auto/preset.rs +++ b/gstreamer/src/auto/preset.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use ffi; diff --git a/gstreamer/src/auto/proxy_pad.rs b/gstreamer/src/auto/proxy_pad.rs index c834a6c37..bf6f588ce 100644 --- a/gstreamer/src/auto/proxy_pad.rs +++ b/gstreamer/src/auto/proxy_pad.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Object; diff --git a/gstreamer/src/auto/registry.rs b/gstreamer/src/auto/registry.rs index 282af9c8e..bd5d684ae 100644 --- a/gstreamer/src/auto/registry.rs +++ b/gstreamer/src/auto/registry.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Object; @@ -147,13 +148,11 @@ 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) { - callback_guard!(); let f: &&(Fn(&Registry, &PluginFeature) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Registry, &Plugin) + Send + Sync + 'static) = 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 ac81ba428..f08fc16c8 100644 --- a/gstreamer/src/auto/stream.rs +++ b/gstreamer/src/auto/stream.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Caps; @@ -216,31 +217,26 @@ 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) { - callback_guard!(); let f: &&(Fn(&Stream) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Stream) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } unsafe extern "C" fn notify_stream_id_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - callback_guard!(); let f: &&(Fn(&Stream) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Stream) + Send + Sync + 'static) = 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) { - callback_guard!(); let f: &&(Fn(&Stream) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer/src/auto/stream_collection.rs b/gstreamer/src/auto/stream_collection.rs index 882593401..4f0ac1ed3 100644 --- a/gstreamer/src/auto/stream_collection.rs +++ b/gstreamer/src/auto/stream_collection.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Object; @@ -95,7 +96,6 @@ 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) { - callback_guard!(); let f: &&(Fn(&StreamCollection) + Send + Sync + 'static) = transmute(f); f(&from_glib_borrow(this)) } diff --git a/gstreamer/src/auto/system_clock.rs b/gstreamer/src/auto/system_clock.rs index c8ef09c1e..ec6e23f55 100644 --- a/gstreamer/src/auto/system_clock.rs +++ b/gstreamer/src/auto/system_clock.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Clock; @@ -83,7 +84,6 @@ impl + IsA> SystemClockExt for O { unsafe extern "C" fn notify_clock_type_trampoline

(this: *mut ffi::GstSystemClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&SystemClock::from_glib_borrow(this).downcast_unchecked()) } diff --git a/gstreamer/src/auto/tag_setter.rs b/gstreamer/src/auto/tag_setter.rs index 9817d026c..783a94fd4 100644 --- a/gstreamer/src/auto/tag_setter.rs +++ b/gstreamer/src/auto/tag_setter.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Element; diff --git a/gstreamer/src/auto/toc_setter.rs b/gstreamer/src/auto/toc_setter.rs index f3809c777..56fd542a1 100644 --- a/gstreamer/src/auto/toc_setter.rs +++ b/gstreamer/src/auto/toc_setter.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Element; diff --git a/gstreamer/src/auto/type_find_factory.rs b/gstreamer/src/auto/type_find_factory.rs index 661c5b885..c9b7d0c34 100644 --- a/gstreamer/src/auto/type_find_factory.rs +++ b/gstreamer/src/auto/type_find_factory.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Caps; diff --git a/gstreamer/src/auto/u_r_i_handler.rs b/gstreamer/src/auto/u_r_i_handler.rs index faa0086e2..2268ba1c1 100644 --- a/gstreamer/src/auto/u_r_i_handler.rs +++ b/gstreamer/src/auto/u_r_i_handler.rs @@ -1,4 +1,5 @@ -// This file was generated by gir (746446b) from gir-files (???) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT use Error; diff --git a/gstreamer/src/bus.rs b/gstreamer/src/bus.rs index c06e4779a..8ddaff8d8 100644 --- a/gstreamer/src/bus.rs +++ b/gstreamer/src/bus.rs @@ -11,7 +11,7 @@ use std::mem::transmute; use ffi; use glib; use glib::translate::*; -use glib::source::{CallbackGuard, Continue, Priority, SourceId}; +use glib::source::{Continue, Priority, SourceId}; use glib_ffi; use glib_ffi::{gboolean, gpointer}; use std::ptr; @@ -25,14 +25,12 @@ unsafe extern "C" fn trampoline_watch( msg: *mut ffi::GstMessage, func: gpointer, ) -> gboolean { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &RefCell Continue + Send + 'static>> = transmute(func); (&mut *func.borrow_mut())(&from_glib_borrow(bus), &Message::from_glib_borrow(msg)).to_glib() } unsafe extern "C" fn destroy_closure_watch(ptr: gpointer) { - let _guard = CallbackGuard::new(); Box:: Continue + Send + 'static>>>::from_raw( ptr as *mut _, ); @@ -50,14 +48,12 @@ unsafe extern "C" fn trampoline_sync( msg: *mut ffi::GstMessage, func: gpointer, ) -> ffi::GstBusSyncReply { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let f: &&(Fn(&Bus, &Message) -> BusSyncReply + Send + Sync + 'static) = transmute(func); f(&from_glib_borrow(bus), &Message::from_glib_borrow(msg)).to_glib() } unsafe extern "C" fn destroy_closure_sync(ptr: gpointer) { - let _guard = CallbackGuard::new(); Box:: BusSyncReply + Send + Sync + 'static>>::from_raw(ptr as *mut _); } diff --git a/gstreamer/src/clock.rs b/gstreamer/src/clock.rs index 3510c660c..3273cbb6f 100644 --- a/gstreamer/src/clock.rs +++ b/gstreamer/src/clock.rs @@ -18,7 +18,6 @@ use ffi; use glib; use glib::IsA; use glib::translate::*; -use glib::source::CallbackGuard; use glib_ffi; use glib_ffi::{gboolean, gpointer}; use libc::c_void; @@ -38,7 +37,6 @@ unsafe extern "C" fn trampoline_wait_async( id: gpointer, func: gpointer, ) -> gboolean { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let f: &&(Fn(&Clock, ClockTime, &ClockId) -> bool + Send + 'static) = transmute(func); f( @@ -49,7 +47,6 @@ unsafe extern "C" fn trampoline_wait_async( } unsafe extern "C" fn destroy_closure_wait_async(ptr: gpointer) { - let _guard = CallbackGuard::new(); Box:: bool + Send + 'static>>::from_raw(ptr as *mut _); } diff --git a/gstreamer/src/iterator.rs b/gstreamer/src/iterator.rs index cb584f43a..ab9d9eefd 100644 --- a/gstreamer/src/iterator.rs +++ b/gstreamer/src/iterator.rs @@ -261,7 +261,6 @@ unsafe extern "C" fn rs_iterator_copy>( ) where for<'a> T: FromValueOptional<'a> + StaticType + ToValue + Send + 'static, { - callback_guard!(); let it = it as *const RsIterator; let copy = copy as *mut RsIterator; @@ -272,7 +271,6 @@ unsafe extern "C" fn rs_iterator_free>(it: *mut ffi::GstIt where for<'a> T: FromValueOptional<'a> + StaticType + ToValue + Send + 'static, { - callback_guard!(); let it = it as *mut RsIterator; let _ = (*it).imp.take(); } @@ -284,7 +282,6 @@ unsafe extern "C" fn rs_iterator_next>( where for<'a> T: FromValueOptional<'a> + StaticType + ToValue + Send + 'static, { - callback_guard!(); let it = it as *mut RsIterator; match (*it).imp.as_mut().map(|imp| imp.next()).unwrap() { Some(Ok(value)) => { @@ -305,7 +302,6 @@ unsafe extern "C" fn rs_iterator_resync>(it: *mut ffi::Gst where for<'a> T: FromValueOptional<'a> + StaticType + ToValue + Send + 'static, { - callback_guard!(); let it = it as *mut RsIterator; (*it).imp.as_mut().map(|imp| imp.resync()).unwrap(); } @@ -353,7 +349,6 @@ unsafe extern "C" fn filter_trampoline(value: gconstpointer, func: gconstpoin where for<'a> T: FromValueOptional<'a> + 'static, { - callback_guard!(); let value = value as *const gobject_ffi::GValue; let func = func as *const gobject_ffi::GValue; @@ -372,8 +367,6 @@ where } unsafe extern "C" fn filter_boxed_ref(boxed: gpointer) -> gpointer { - callback_guard!(); - let boxed = Arc::from_raw(boxed as *const (Box bool + Send + Sync + 'static>)); let copy = Arc::clone(&boxed); @@ -384,16 +377,12 @@ unsafe extern "C" fn filter_boxed_ref(boxed: gpointer) -> gpointer { } unsafe extern "C" fn filter_boxed_unref(boxed: gpointer) { - callback_guard!(); - let _ = Arc::from_raw(boxed as *const (Box bool + Send + Sync + 'static>)); } unsafe extern "C" fn filter_boxed_get_type() -> glib_ffi::GType { use std::sync::{Once, ONCE_INIT}; - callback_guard!(); - static mut TYPE: glib_ffi::GType = gobject_ffi::G_TYPE_INVALID; static ONCE: Once = ONCE_INIT; @@ -429,7 +418,6 @@ unsafe extern "C" fn find_trampoline(value: gconstpointer, func: gconstpointe where for<'a> T: FromValueOptional<'a> + 'static, { - callback_guard!(); let value = value as *const gobject_ffi::GValue; let func = func as *const &mut (FnMut(T) -> bool); @@ -447,7 +435,6 @@ unsafe extern "C" fn foreach_trampoline(value: *const gobject_ffi::GValue, fu where for<'a> T: FromValueOptional<'a> + 'static, { - callback_guard!(); let func = func as *const &mut (FnMut(T)); let value = &*(value as *const glib::Value); let value = value.get::().unwrap(); @@ -463,7 +450,6 @@ unsafe extern "C" fn fold_trampoline( where for<'a> T: FromValueOptional<'a> + 'static, { - callback_guard!(); let func = func as *const &mut (FnMut(U, T) -> Result); let value = &*(value as *const glib::Value); let value = value.get::().unwrap(); diff --git a/gstreamer/src/lib.rs b/gstreamer/src/lib.rs index ed922371d..3102668ea 100644 --- a/gstreamer/src/lib.rs +++ b/gstreamer/src/lib.rs @@ -29,12 +29,6 @@ extern crate muldiv; use glib::translate::{from_glib, from_glib_full}; -macro_rules! callback_guard { - () => ( - let _guard = ::glib::CallbackGuard::new(); - ) -} - macro_rules! assert_initialized_main_thread { () => ( if unsafe {::ffi::gst_is_initialized()} != ::glib_ffi::GTRUE { diff --git a/gstreamer/src/pad.rs b/gstreamer/src/pad.rs index 74b7428a5..bb60ef215 100644 --- a/gstreamer/src/pad.rs +++ b/gstreamer/src/pad.rs @@ -31,7 +31,6 @@ use glib; use glib::{IsA, StaticType}; use glib::translate::{from_glib, from_glib_borrow, from_glib_full, from_glib_none, mut_override, FromGlib, ToGlib, ToGlibPtr}; -use glib::source::CallbackGuard; use glib_ffi; use glib_ffi::gpointer; use glib::Object; @@ -857,7 +856,6 @@ unsafe extern "C" fn trampoline_pad_probe( info: *mut ffi::GstPadProbeInfo, func: gpointer, ) -> ffi::GstPadProbeReturn { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &&(Fn(&Pad, &mut PadProbeInfo) -> PadProbeReturn + Send + Sync + 'static) = transmute(func); @@ -939,7 +937,6 @@ unsafe extern "C" fn trampoline_activate_function( pad: *mut ffi::GstPad, parent: *mut ffi::GstObject, ) -> glib_ffi::gboolean { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &&(Fn(&Pad, &Option<::Object>) -> bool + Send + Sync + 'static) = transmute((*pad).activatedata); @@ -953,7 +950,6 @@ unsafe extern "C" fn trampoline_activatemode_function( mode: ffi::GstPadMode, active: glib_ffi::gboolean, ) -> glib_ffi::gboolean { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &&(Fn(&Pad, &Option<::Object>, ::PadMode, bool) -> bool + Send @@ -973,7 +969,6 @@ unsafe extern "C" fn trampoline_chain_function( parent: *mut ffi::GstObject, buffer: *mut ffi::GstBuffer, ) -> ffi::GstFlowReturn { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &&(Fn(&Pad, &Option<::Object>, ::Buffer) -> ::FlowReturn + Send @@ -992,7 +987,6 @@ unsafe extern "C" fn trampoline_chain_list_function( parent: *mut ffi::GstObject, list: *mut ffi::GstBufferList, ) -> ffi::GstFlowReturn { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &&(Fn(&Pad, &Option<::Object>, ::BufferList) -> ::FlowReturn + Send @@ -1011,7 +1005,6 @@ unsafe extern "C" fn trampoline_event_function( parent: *mut ffi::GstObject, event: *mut ffi::GstEvent, ) -> glib_ffi::gboolean { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &&(Fn(&Pad, &Option<::Object>, ::Event) -> bool + Send + Sync + 'static) = transmute((*pad).eventdata); @@ -1028,7 +1021,6 @@ unsafe extern "C" fn trampoline_event_full_function( parent: *mut ffi::GstObject, event: *mut ffi::GstEvent, ) -> ffi::GstFlowReturn { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &&(Fn(&Pad, &Option<::Object>, ::Event) -> ::FlowReturn + Send @@ -1049,7 +1041,6 @@ unsafe extern "C" fn trampoline_getrange_function( length: u32, buffer: *mut *mut ffi::GstBuffer, ) -> ffi::GstFlowReturn { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &&(Fn(&Pad, &Option<::Object>, u64, u32) -> Result<::Buffer, ::FlowReturn> + Send @@ -1074,7 +1065,6 @@ unsafe extern "C" fn trampoline_iterate_internal_links_function( pad: *mut ffi::GstPad, parent: *mut ffi::GstObject, ) -> *mut ffi::GstIterator { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &&(Fn(&Pad, &Option<::Object>) -> ::Iterator + Send + Sync + 'static) = transmute((*pad).iterintlinkdata); @@ -1092,7 +1082,6 @@ unsafe extern "C" fn trampoline_link_function( parent: *mut ffi::GstObject, peer: *mut ffi::GstPad, ) -> ffi::GstPadLinkReturn { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &&(Fn(&Pad, &Option<::Object>, &::Pad) -> ::PadLinkReturn + Send @@ -1111,7 +1100,6 @@ unsafe extern "C" fn trampoline_query_function( parent: *mut ffi::GstObject, query: *mut ffi::GstQuery, ) -> glib_ffi::gboolean { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &&(Fn(&Pad, &Option<::Object>, &mut ::QueryRef) -> bool + Send @@ -1129,7 +1117,6 @@ unsafe extern "C" fn trampoline_unlink_function( pad: *mut ffi::GstPad, parent: *mut ffi::GstObject, ) { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &&(Fn(&Pad, &Option<::Object>) + Send + Sync + 'static) = transmute((*pad).unlinkdata); @@ -1138,19 +1125,16 @@ unsafe extern "C" fn trampoline_unlink_function( } unsafe extern "C" fn destroy_closure(ptr: gpointer) { - let _guard = CallbackGuard::new(); Box::>::from_raw(ptr as *mut _); } unsafe extern "C" fn trampoline_pad_task(func: gpointer) { - let _guard = CallbackGuard::new(); #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] let func: &RefCell> = transmute(func); (&mut *func.borrow_mut())() } unsafe extern "C" fn destroy_closure_pad_task(ptr: gpointer) { - let _guard = CallbackGuard::new(); Box::>>::from_raw(ptr as *mut _); } diff --git a/gstreamer/src/typefind.rs b/gstreamer/src/typefind.rs index 30bb853b3..25087fe96 100644 --- a/gstreamer/src/typefind.rs +++ b/gstreamer/src/typefind.rs @@ -116,18 +116,15 @@ unsafe extern "C" fn type_find_trampoline( find: *mut ffi::GstTypeFind, user_data: glib_ffi::gpointer, ) { - callback_guard!(); let func: &&(Fn(&mut TypeFind) + Send + Sync + 'static) = mem::transmute(user_data); func(&mut *(find as *mut TypeFind)); } unsafe extern "C" fn type_find_closure_drop(data: glib_ffi::gpointer) { - callback_guard!(); Box::>::from_raw(data as *mut _); } unsafe extern "C" fn type_find_peek(data: glib_ffi::gpointer, offset: i64, size: u32) -> *const u8 { - callback_guard!(); let find: &mut &mut TypeFindImpl = &mut *(data as *mut &mut TypeFindImpl); match find.peek(offset, size) { None => ptr::null(), @@ -140,7 +137,6 @@ unsafe extern "C" fn type_find_suggest( probability: u32, caps: *mut ffi::GstCaps, ) { - callback_guard!(); let find: &mut &mut TypeFindImpl = &mut *(data as *mut &mut TypeFindImpl); find.suggest(from_glib(probability as i32), &from_glib_borrow(caps)); } @@ -148,7 +144,6 @@ unsafe extern "C" fn type_find_suggest( unsafe extern "C" fn type_find_get_length(data: glib_ffi::gpointer) -> u64 { use std::u64; - callback_guard!(); let find: &mut &mut TypeFindImpl = &mut *(data as *mut &mut TypeFindImpl); find.get_length().unwrap_or(u64::MAX) }