forked from mirrors/gstreamer-rs
gstreamer: Provide getter for meta type in addition to meta API type
This commit is contained in:
parent
7c5303c492
commit
538ce91987
1 changed files with 16 additions and 0 deletions
|
@ -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")]
|
||||
|
|
Loading…
Reference in a new issue