From 16acea71d44fffe94de9c41a2ddc827ea927b69d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 26 Oct 2023 13:38:43 +0300 Subject: [PATCH] gstreamer: meta: Remove useless API on `Meta` that can't be called anyway `Meta` only exists inside a `MetaRef` / `MetaRefMut` and that already provides exactly the same functions for all meta types. Part-of: --- gstreamer/src/meta.rs | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/gstreamer/src/meta.rs b/gstreamer/src/meta.rs index fb9ec0a9d..14e3eec64 100644 --- a/gstreamer/src/meta.rs +++ b/gstreamer/src/meta.rs @@ -385,19 +385,6 @@ pub struct Meta(ffi::GstMeta); unsafe impl Send for Meta {} unsafe impl Sync for Meta {} -impl Meta { - #[doc(alias = "get_api")] - #[inline] - fn api(&self) -> glib::Type { - unsafe { glib::Type::from_glib((*self.0.info).api) } - } - - #[inline] - pub fn flags(&self) -> crate::MetaFlags { - unsafe { from_glib(self.0.flags) } - } -} - unsafe impl MetaAPI for Meta { type GstType = ffi::GstMeta; @@ -409,7 +396,15 @@ unsafe impl MetaAPI for Meta { impl fmt::Debug for Meta { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.debug_struct("Meta").field("api", &self.api()).finish() + f.debug_struct("Meta") + .field("api", &unsafe { glib::Type::from_glib((*self.0.info).api) }) + .field("type", &unsafe { + glib::Type::from_glib((*self.0.info).type_) + }) + .field("flags", &unsafe { + crate::MetaFlags::from_glib(self.0.flags) + }) + .finish() } }