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: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1337>
This commit is contained in:
Sebastian Dröge 2023-10-26 13:38:43 +03:00
parent 66e822dbf7
commit db2b39d382

View file

@ -393,19 +393,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;
@ -417,7 +404,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()
}
}