diff --git a/Gir_GstBase.toml b/Gir_GstBase.toml index 39ac6d5a5..32b1f8543 100644 --- a/Gir_GstBase.toml +++ b/Gir_GstBase.toml @@ -39,7 +39,7 @@ manual = [ name = "GstBase.Adapter" status = "generate" trait = false -concurrency = "none" +concurrency = "send-unique" [[object.function]] name = "map" diff --git a/gstreamer-base/src/auto/adapter.rs b/gstreamer-base/src/auto/adapter.rs index 62c1fb960..dc4a1c712 100644 --- a/gstreamer-base/src/auto/adapter.rs +++ b/gstreamer-base/src/auto/adapter.rs @@ -4,6 +4,7 @@ use ffi; use glib; +use glib::ObjectExt; use glib::translate::*; use glib_ffi; use gobject_ffi; @@ -193,3 +194,9 @@ impl Default for Adapter { Self::new() } } + +unsafe impl glib::SendUnique for Adapter { + fn is_unique(&self) -> bool { + self.ref_count() == 1 + } +}