diff --git a/gstreamer/src/allocator.rs b/gstreamer/src/allocator.rs index 7504b5ad4..4477c3bab 100644 --- a/gstreamer/src/allocator.rs +++ b/gstreamer/src/allocator.rs @@ -5,6 +5,11 @@ use glib::{prelude::*, translate::*}; use crate::{ffi, Allocator}; impl Allocator { + pub fn memory_type(&self) -> &'static glib::GStr { + let obj: *const ffi::GstAllocator = self.to_glib_none().0; + unsafe { glib::GStr::from_ptr((*obj).mem_type) } + } + #[doc(alias = "gst_allocator_register")] pub fn register(name: &str, allocator: impl IsA) { skip_assert_initialized!();