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: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1310>
This commit is contained in:
Sebastian Dröge 2023-10-02 19:50:41 +03:00
parent fa3ce573d7
commit d7494bf1db

View file

@ -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,