diff --git a/Gir_GstApp.toml b/Gir_GstApp.toml index 45f0a501e..e8d1aa564 100644 --- a/Gir_GstApp.toml +++ b/Gir_GstApp.toml @@ -67,6 +67,10 @@ final_type = true # Use Result ignore = true + [[object.signal]] + name = "eos" + concurrency = "send" + [[object.function]] name = "set_caps" [[object.function.parameter]] diff --git a/gstreamer-app/src/app_sink.rs b/gstreamer-app/src/app_sink.rs index 151dcab33..42c5a36d2 100644 --- a/gstreamer-app/src/app_sink.rs +++ b/gstreamer-app/src/app_sink.rs @@ -59,7 +59,7 @@ pub struct AppSinkCallbacksBuilder { } impl AppSinkCallbacksBuilder { - pub fn eos(self, eos: F) -> Self { + pub fn eos(self, eos: F) -> Self { Self { eos: Some(RefCell::new(Box::new(eos))), ..self @@ -67,7 +67,7 @@ impl AppSinkCallbacksBuilder { } pub fn new_preroll< - F: Fn(&AppSink) -> Result + Send + Sync + 'static, + F: Fn(&AppSink) -> Result + Send + 'static, >( self, new_preroll: F, @@ -79,7 +79,7 @@ impl AppSinkCallbacksBuilder { } pub fn new_sample< - F: Fn(&AppSink) -> Result + Send + Sync + 'static, + F: Fn(&AppSink) -> Result + Send + 'static, >( self, new_sample: F, @@ -177,7 +177,7 @@ impl AppSink { } pub fn connect_new_sample< - F: Fn(&AppSink) -> Result + Send + Sync + 'static, + F: Fn(&AppSink) -> Result + Send + 'static, >( &self, f: F, @@ -194,7 +194,7 @@ impl AppSink { } pub fn connect_new_preroll< - F: Fn(&AppSink) -> Result + Send + Sync + 'static, + F: Fn(&AppSink) -> Result + Send + 'static, >( &self, f: F, @@ -212,7 +212,7 @@ impl AppSink { } unsafe extern "C" fn new_sample_trampoline< - F: Fn(&AppSink) -> Result + Send + Sync + 'static, + F: Fn(&AppSink) -> Result + Send + 'static, >( this: *mut gst_app_sys::GstAppSink, f: glib_sys::gpointer, @@ -223,7 +223,7 @@ unsafe extern "C" fn new_sample_trampoline< } unsafe extern "C" fn new_preroll_trampoline< - F: Fn(&AppSink) -> Result + Send + Sync + 'static, + F: Fn(&AppSink) -> Result + Send + 'static, >( this: *mut gst_app_sys::GstAppSink, f: glib_sys::gpointer, diff --git a/gstreamer-app/src/auto/app_sink.rs b/gstreamer-app/src/auto/app_sink.rs index 8d30cc93f..821fb3a1f 100644 --- a/gstreamer-app/src/auto/app_sink.rs +++ b/gstreamer-app/src/auto/app_sink.rs @@ -157,7 +157,7 @@ impl AppSink { } } - pub fn connect_eos(&self, f: F) -> SignalHandlerId { + pub fn connect_eos(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_ = Box_::new(f); connect_raw(self.as_ptr() as *mut _, b"eos\0".as_ptr() as *const _, @@ -225,7 +225,7 @@ impl AppSink { unsafe impl Send for AppSink {} unsafe impl Sync for AppSink {} -unsafe extern "C" fn eos_trampoline(this: *mut gst_app_sys::GstAppSink, f: glib_sys::gpointer) { +unsafe extern "C" fn eos_trampoline(this: *mut gst_app_sys::GstAppSink, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) }