mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 17:41:05 +00:00
structure, caps: Implement 1.20 serialize functions
This commit is contained in:
parent
7380f18ae7
commit
45f8035ccb
4 changed files with 16 additions and 2 deletions
|
@ -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(
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue