gstreamer: Add serde support for more enums and flags

PadDirection, PadPresence, URITYpe, Rank
This commit is contained in:
Edward Hervey 2021-08-10 08:02:21 +02:00
parent cb475e0965
commit f504493134
2 changed files with 49 additions and 8 deletions

View file

@ -28,9 +28,7 @@ generate = [
"Gst.EventTypeFlags",
"Gst.GapFlags",
"Gst.LibraryError",
"Gst.PadDirection",
"Gst.PadMode",
"Gst.PadPresence",
"Gst.PadProbeReturn",
"Gst.ParseError",
"Gst.PluginAPIFlags",
@ -43,7 +41,6 @@ generate = [
"Gst.SchedulingFlags",
"Gst.SeekType",
"Gst.SerializeFlags",
"Gst.State",
"Gst.StreamError",
"Gst.StreamStatusType",
"Gst.StreamType",
@ -55,7 +52,6 @@ generate = [
"Gst.TocSetter",
"Gst.URIError",
"Gst.URIHandler",
"Gst.URIType",
]
manual = [
@ -295,6 +291,24 @@ status = "manual"
name = "unmap"
ignore = true
[[object]]
name = "Gst.PadDirection"
status = "generate"
[[object.derive]]
name = "serde::Serialize, serde::Deserialize"
cfg_condition = "feature = \"ser_de\""
[[object.derive]]
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
[[object]]
name = "Gst.PadPresence"
status = "generate"
[[object.derive]]
name = "serde::Serialize, serde::Deserialize"
cfg_condition = "feature = \"ser_de\""
[[object.derive]]
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
[[object]]
name = "Gst.SeekFlags"
status = "generate"
@ -378,6 +392,9 @@ status = "generate"
[[object]]
name = "Gst.Rank"
status = "generate"
[[object.derive]]
name = "serde::Serialize, serde::Deserialize"
cfg_condition = "feature = \"ser_de\""
[[object.derive]]
name = "Debug"
@ -1980,6 +1997,15 @@ status = "generate"
# implemented as part of Tracer subclassing
manual = true
[[object]]
name = "Gst.State"
status = "generate"
[[object.derive]]
name = "serde::Serialize, serde::Deserialize"
cfg_condition = "feature = \"ser_de\""
[[object.derive]]
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
[[object]]
name = "Gst.StateChange"
status = "generate"
@ -2191,3 +2217,13 @@ status = "generate"
[[object]]
name = "Gst.TracerFactory"
status = "generate"
[[object]]
name = "Gst.URIType"
status = "generate"
[[object.derive]]
name = "serde::Serialize, serde::Deserialize"
cfg_condition = "feature = \"ser_de\""
[[object.derive]]
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"

View file

@ -1353,7 +1353,8 @@ impl ToValue for LibraryError {
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[cfg_attr(feature = "ser_de", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstPadDirection")]
pub enum PadDirection {
@ -1613,7 +1614,8 @@ impl ToValue for PadMode {
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[cfg_attr(feature = "ser_de", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstPadPresence")]
pub enum PadPresence {
@ -2234,6 +2236,7 @@ impl ToValue for QOSType {
}
}
#[cfg_attr(feature = "ser_de", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstRank")]
@ -2547,7 +2550,8 @@ impl ToValue for SeekType {
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[cfg_attr(feature = "ser_de", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstState")]
pub enum State {
@ -3891,7 +3895,8 @@ impl ToValue for URIError {
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[cfg_attr(feature = "ser_de", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstURIType")]
pub enum URIType {