structure, caps: Implement 1.20 serialize functions

This commit is contained in:
Vivia Nikolaidou 2021-07-09 14:55:29 +03:00
parent 7380f18ae7
commit 45f8035ccb
4 changed files with 16 additions and 2 deletions

View file

@ -425,6 +425,13 @@ impl CapsRef {
))
}
}
#[cfg(any(feature = "v1_20", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
#[doc(alias = "gst_caps_serialize")]
pub fn serialize(&self, flags: crate::SerializeFlags) -> glib::GString {
unsafe { from_glib_full(ffi::gst_caps_serialize(&self.0, flags.into_glib())) }
}
}
macro_rules! define_iter(

View file

@ -94,7 +94,7 @@ impl Serialize for CapsRef {
impl Serialize for Caps {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
self.as_ref().serialize(serializer)
<CapsRef as Serialize>::serialize(self.as_ref(), serializer)
}
}

View file

@ -654,6 +654,13 @@ impl StructureRef {
))
}
}
#[cfg(any(feature = "v1_20", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
#[doc(alias = "gst_structure_serialize")]
pub fn serialize(&self, flags: crate::SerializeFlags) -> glib::GString {
unsafe { from_glib_full(ffi::gst_structure_serialize(&self.0, flags.into_glib())) }
}
}
impl fmt::Display for StructureRef {

View file

@ -62,7 +62,7 @@ impl Serialize for StructureRef {
impl Serialize for Structure {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
self.as_ref().serialize(serializer)
<StructureRef as Serialize>::serialize(self.as_ref(), serializer)
}
}