gstreamer: Provide getter for meta type in addition to meta API type

This commit is contained in:
Sebastian Dröge 2021-09-19 14:55:29 +03:00
parent 7c5303c492
commit 538ce91987

View file

@ -145,6 +145,14 @@ impl<'a, T> MetaRef<'a, T> {
}
}
pub fn type_(&self) -> glib::Type {
unsafe {
let meta = self.meta as *const _ as *const ffi::GstMeta;
let info = (*meta).info;
glib::Type::from_glib((*info).type_)
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "get_seqnum")]
@ -199,6 +207,14 @@ impl<'a, T, U> MetaRefMut<'a, T, U> {
}
}
pub fn type_(&self) -> glib::Type {
unsafe {
let meta = self.meta as *const _ as *const ffi::GstMeta;
let info = (*meta).info;
glib::Type::from_glib((*info).type_)
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[doc(alias = "get_seqnum")]