forked from mirrors/gstreamer-rs
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/1318>
This commit is contained in:
parent
fcad4e5aa3
commit
3c7ace5451
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")]
|
#[doc(alias = "gst_buffer_add_custom_meta")]
|
||||||
pub fn add<'a>(
|
pub fn add<'a>(
|
||||||
buffer: &'a mut BufferRef,
|
buffer: &'a mut BufferRef,
|
||||||
|
|
Loading…
Reference in a new issue