From d7494bf1dbc27dcb0c9007fcb2c21a0418fa0b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 2 Oct 2023 19:50:41 +0300 Subject: [PATCH] gst: Add `CustomMeta::register_simple()` As a wrapper around the 1.20 `gst_meta_register_custom()` instead of the new 1.24 convenience function to make it available to more versions. Part-of: --- gstreamer/src/meta.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gstreamer/src/meta.rs b/gstreamer/src/meta.rs index 460b88bf4..e1809a39f 100644 --- a/gstreamer/src/meta.rs +++ b/gstreamer/src/meta.rs @@ -661,6 +661,20 @@ impl CustomMeta { } } + #[doc(alias = "gst_meta_register_simple")] + pub fn register_simple(name: &str) { + assert_initialized_main_thread!(); + unsafe { + ffi::gst_meta_register_custom( + name.to_glib_none().0, + ptr::null_mut(), + None, + ptr::null_mut(), + None, + ); + } + } + #[doc(alias = "gst_buffer_add_custom_meta")] pub fn add<'a>( buffer: &'a mut BufferRef,