mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 00:26:31 +00:00
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:
parent
fa3ce573d7
commit
d7494bf1db
1 changed files with 14 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue