forked from mirrors/gstreamer-rs
Rename feature 'ser_de' as 'serde'
When I introduced the 'ser_de' feature, I couldn't find a way to name it 'serde' while also make it pull the optional 'serde' crate together with the other related dependencies. With rustc >= 1.60 we can use 'dep:serde' to refer to the 'serde' dependency as part of the 'serde' feature.
This commit is contained in:
parent
879d6a4548
commit
069c6a2c01
27 changed files with 69 additions and 69 deletions
|
@ -232,7 +232,7 @@ plugins-update-nightly:
|
||||||
crate=$1
|
crate=$1
|
||||||
case "$crate" in
|
case "$crate" in
|
||||||
gstreamer-audio|gstreamer-editing-services|gstreamer-gl|gstreamer-pbutils|gstreamer-rtp|gstreamer-rtsp|gstreamer-video|gstreamer)
|
gstreamer-audio|gstreamer-editing-services|gstreamer-gl|gstreamer-pbutils|gstreamer-rtp|gstreamer-rtsp|gstreamer-video|gstreamer)
|
||||||
echo "--features=ser_de,v1_22"
|
echo "--features=serde,v1_22"
|
||||||
;;
|
;;
|
||||||
gstreamer-validate)
|
gstreamer-validate)
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -428,7 +428,7 @@ clippy:
|
||||||
crate=$1
|
crate=$1
|
||||||
case "$crate" in
|
case "$crate" in
|
||||||
gstreamer-audio|gstreamer-editing-services|gstreamer-gl|gstreamer-pbutils|gstreamer-rtp|gstreamer-rtsp|gstreamer-video|gstreamer)
|
gstreamer-audio|gstreamer-editing-services|gstreamer-gl|gstreamer-pbutils|gstreamer-rtp|gstreamer-rtsp|gstreamer-video|gstreamer)
|
||||||
echo "--features=ser_de,v1_22"
|
echo "--features=serde,v1_22"
|
||||||
;;
|
;;
|
||||||
gstreamer-validate)
|
gstreamer-validate)
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
@ -45,7 +45,7 @@ foreach($crate in $crates)
|
||||||
# Or when we want to build without default features
|
# Or when we want to build without default features
|
||||||
if ($env:LocalFeatures -and ($env:LocalFeatures -ne '--no-default-features')) {
|
if ($env:LocalFeatures -and ($env:LocalFeatures -ne '--no-default-features')) {
|
||||||
if ($crate -eq 'gstreamer') {
|
if ($crate -eq 'gstreamer') {
|
||||||
$env:LocalFeatures += "ser_de,"
|
$env:LocalFeatures += "serde,"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($crate -eq 'examples') {
|
if ($crate -eq 'examples') {
|
||||||
|
|
|
@ -35,8 +35,8 @@ v1_16 = ["gst/v1_16", "gst-base/v1_16", "ffi/v1_16"]
|
||||||
v1_18 = ["gst/v1_18", "gst-base/v1_18", "ffi/v1_18", "v1_16"]
|
v1_18 = ["gst/v1_18", "gst-base/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "gst-base/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "gst-base/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "gst-base/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "gst-base/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
dox = ["v1_22", "ffi/dox", "glib/dox", "gst/dox", "gst-base/dox", "ser_de"]
|
dox = ["v1_22", "ffi/dox", "glib/dox", "gst/dox", "gst-base/dox", "serde"]
|
||||||
ser_de = ["serde", "gst/ser_de"]
|
serde = ["dep:serde", "gst/serde"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["dox"]
|
features = ["dox"]
|
||||||
|
|
|
@ -39,7 +39,7 @@ pub use crate::auto::*;
|
||||||
mod caps;
|
mod caps;
|
||||||
pub use crate::caps::AudioCapsBuilder;
|
pub use crate::caps::AudioCapsBuilder;
|
||||||
|
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod flag_serde;
|
mod flag_serde;
|
||||||
|
|
||||||
mod audio_format;
|
mod audio_format;
|
||||||
|
|
|
@ -33,8 +33,8 @@ v1_16 = ["gst/v1_16", "gst-base/v1_16", "gst-pbutils/v1_16", "ffi/v1_16"]
|
||||||
v1_18 = ["gst/v1_18", "gst-base/v1_18", "gst-pbutils/v1_18", "ffi/v1_18", "v1_16"]
|
v1_18 = ["gst/v1_18", "gst-base/v1_18", "gst-pbutils/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-pbutils/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-pbutils/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-pbutils/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-pbutils/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
dox = ["v1_22", "ffi/dox", "glib/dox", "gio/dox", "gst/dox", "gst-base/dox", "gst-pbutils/dox", "ser_de"]
|
dox = ["v1_22", "ffi/dox", "glib/dox", "gio/dox", "gst/dox", "gst-base/dox", "gst-pbutils/dox", "serde"]
|
||||||
ser_de = ["serde", "gst/ser_de", "gst-pbutils/ser_de"]
|
serde = ["dep:serde", "gst/serde", "gst-pbutils/serde"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["dox"]
|
features = ["dox"]
|
||||||
|
|
|
@ -67,7 +67,7 @@ macro_rules! skip_assert_initialized {
|
||||||
mod auto;
|
mod auto;
|
||||||
pub use crate::auto::*;
|
pub use crate::auto::*;
|
||||||
|
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod flag_serde;
|
mod flag_serde;
|
||||||
|
|
||||||
// Re-export all the traits in a prelude module, so that applications
|
// Re-export all the traits in a prelude module, so that applications
|
||||||
|
|
|
@ -38,8 +38,8 @@ v1_16 = ["gst/v1_16", "gst-base/v1_16", "gst-video/v1_16", "ffi/v1_16"]
|
||||||
v1_18 = ["gst/v1_18", "gst-base/v1_18", "gst-video/v1_18", "ffi/v1_18", "v1_16"]
|
v1_18 = ["gst/v1_18", "gst-base/v1_18", "gst-video/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-video/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-video/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-video/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-video/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
dox = ["v1_22", "ffi/dox", "glib/dox", "gst/dox", "gst-base/dox", "gst-video/dox", "ser_de"]
|
dox = ["v1_22", "ffi/dox", "glib/dox", "gst/dox", "gst-base/dox", "gst-video/dox", "serde"]
|
||||||
ser_de = ["serde", "gst/ser_de", "gst-video/ser_de"]
|
serde = ["dep:serde", "gst/serde", "gst-video/serde"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["dox"]
|
features = ["dox"]
|
||||||
|
|
|
@ -37,7 +37,7 @@ mod auto;
|
||||||
pub use crate::auto::functions::*;
|
pub use crate::auto::functions::*;
|
||||||
pub use crate::auto::*;
|
pub use crate::auto::*;
|
||||||
|
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod flag_serde;
|
mod flag_serde;
|
||||||
|
|
||||||
mod caps_features;
|
mod caps_features;
|
||||||
|
|
|
@ -34,8 +34,8 @@ v1_16 = ["gst/v1_16", "ffi/v1_16"]
|
||||||
v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"]
|
v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
dox = ["v1_22", "ffi/dox", "glib/dox", "gst/dox", "ser_de"]
|
dox = ["v1_22", "ffi/dox", "glib/dox", "gst/dox", "serde"]
|
||||||
ser_de = ["serde", "gst/ser_de"]
|
serde = ["dep:serde", "gst/serde"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["dox"]
|
features = ["dox"]
|
||||||
|
|
|
@ -43,7 +43,7 @@ mod auto;
|
||||||
pub use crate::auto::functions::*;
|
pub use crate::auto::functions::*;
|
||||||
pub use crate::auto::*;
|
pub use crate::auto::*;
|
||||||
|
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod flag_serde;
|
mod flag_serde;
|
||||||
|
|
||||||
mod discoverer;
|
mod discoverer;
|
||||||
|
|
|
@ -32,8 +32,8 @@ v1_16 = ["gst/v1_16", "ffi/v1_16"]
|
||||||
v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"]
|
v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
dox = ["v1_22", "ffi/dox", "glib/dox", "gst/dox", "ser_de"]
|
dox = ["v1_22", "ffi/dox", "glib/dox", "gst/dox", "serde"]
|
||||||
ser_de = ["serde", "gst/ser_de"]
|
serde = ["dep:serde", "gst/serde"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["dox"]
|
features = ["dox"]
|
||||||
|
|
|
@ -37,7 +37,7 @@ mod auto;
|
||||||
pub use crate::auto::functions::*;
|
pub use crate::auto::functions::*;
|
||||||
pub use crate::auto::*;
|
pub use crate::auto::*;
|
||||||
|
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod flag_serde;
|
mod flag_serde;
|
||||||
|
|
||||||
pub mod subclass;
|
pub mod subclass;
|
||||||
|
|
|
@ -36,8 +36,8 @@ v1_16 = ["gst/v1_16", "gst-sdp/v1_16", "gst-rtsp/v1_16", "gst-net/v1_16", "ffi/v
|
||||||
v1_18 = ["gst/v1_18", "gst-sdp/v1_18", "gst-rtsp/v1_18", "gst-net/v1_18", "ffi/v1_18", "v1_16"]
|
v1_18 = ["gst/v1_18", "gst-sdp/v1_18", "gst-rtsp/v1_18", "gst-net/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "gst-sdp/v1_20", "gst-rtsp/v1_20", "gst-net/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "gst-sdp/v1_20", "gst-rtsp/v1_20", "gst-net/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "gst-sdp/v1_22", "gst-rtsp/v1_22", "gst-net/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "gst-sdp/v1_22", "gst-rtsp/v1_22", "gst-net/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
dox = ["v1_22", "ffi/dox", "glib/dox", "gio/dox", "gst/dox", "gst-sdp/dox", "gst-rtsp/dox", "gst-net/dox", "ser_de"]
|
dox = ["v1_22", "ffi/dox", "glib/dox", "gio/dox", "gst/dox", "gst-sdp/dox", "gst-rtsp/dox", "gst-net/dox", "serde"]
|
||||||
ser_de = ["serde", "gst/ser_de", "gst-rtsp/ser_de"]
|
serde = ["dep:serde", "gst/serde", "gst-rtsp/serde"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["dox"]
|
features = ["dox"]
|
||||||
|
|
|
@ -40,7 +40,7 @@ macro_rules! skip_assert_initialized {
|
||||||
mod auto;
|
mod auto;
|
||||||
pub use crate::auto::*;
|
pub use crate::auto::*;
|
||||||
|
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod flag_serde;
|
mod flag_serde;
|
||||||
|
|
||||||
mod rtsp_address_pool;
|
mod rtsp_address_pool;
|
||||||
|
|
|
@ -32,8 +32,8 @@ v1_16 = ["gst/v1_16", "gst-sdp/v1_16", "ffi/v1_16"]
|
||||||
v1_18 = ["gst/v1_18", "gst-sdp/v1_18", "ffi/v1_18", "v1_16"]
|
v1_18 = ["gst/v1_18", "gst-sdp/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "gst-sdp/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "gst-sdp/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "gst-sdp/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "gst-sdp/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
dox = ["v1_22", "ffi/dox", "glib/dox", "gst/dox", "gst-sdp/dox", "ser_de"]
|
dox = ["v1_22", "ffi/dox", "glib/dox", "gst/dox", "gst-sdp/dox", "serde"]
|
||||||
ser_de = ["serde", "gst/ser_de"]
|
serde = ["dep:serde", "gst/serde"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["dox"]
|
features = ["dox"]
|
||||||
|
|
|
@ -34,7 +34,7 @@ macro_rules! skip_assert_initialized {
|
||||||
mod auto;
|
mod auto;
|
||||||
pub use crate::auto::*;
|
pub use crate::auto::*;
|
||||||
|
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod flag_serde;
|
mod flag_serde;
|
||||||
|
|
||||||
// Re-export all the traits in a prelude module, so that applications
|
// Re-export all the traits in a prelude module, so that applications
|
||||||
|
|
|
@ -36,8 +36,8 @@ v1_16 = ["gst/v1_16", "gst-base/v1_16", "ffi/v1_16"]
|
||||||
v1_18 = ["gst/v1_18", "gst-base/v1_18", "ffi/v1_18", "v1_16"]
|
v1_18 = ["gst/v1_18", "gst-base/v1_18", "ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["gst/v1_20", "gst-base/v1_20", "ffi/v1_20", "v1_18"]
|
v1_20 = ["gst/v1_20", "gst-base/v1_20", "ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["gst/v1_22", "gst-base/v1_22", "ffi/v1_22", "v1_20"]
|
v1_22 = ["gst/v1_22", "gst-base/v1_22", "ffi/v1_22", "v1_20"]
|
||||||
dox = ["v1_22", "ffi/dox", "glib/dox", "gst/dox", "gst-base/dox", "ser_de"]
|
dox = ["v1_22", "ffi/dox", "glib/dox", "gst/dox", "gst-base/dox", "serde"]
|
||||||
ser_de = ["serde", "gst/ser_de"]
|
serde = ["dep:serde", "gst/serde"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["dox"]
|
features = ["dox"]
|
||||||
|
|
|
@ -287,7 +287,7 @@ name = "GstVideo.NavigationCommand"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "serde::Serialize, serde::Deserialize"
|
name = "serde::Serialize, serde::Deserialize"
|
||||||
cfg_condition = "feature = \"ser_de\""
|
cfg_condition = "feature = \"serde\""
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "Debug, Eq, PartialEq, Ord, PartialOrd, Hash"
|
name = "Debug, Eq, PartialEq, Ord, PartialOrd, Hash"
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ macro_rules! skip_assert_initialized {
|
||||||
mod auto;
|
mod auto;
|
||||||
pub use crate::auto::*;
|
pub use crate::auto::*;
|
||||||
|
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod flag_serde;
|
mod flag_serde;
|
||||||
|
|
||||||
mod navigation;
|
mod navigation;
|
||||||
|
|
|
@ -601,8 +601,8 @@ nav_event_builder!(
|
||||||
);
|
);
|
||||||
|
|
||||||
const NAVIGATION_EVENT_NAME: &str = "application/x-gst-navigation";
|
const NAVIGATION_EVENT_NAME: &str = "application/x-gst-navigation";
|
||||||
#[cfg_attr(feature = "ser_de", derive(serde::Serialize, serde::Deserialize))]
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||||
#[cfg_attr(feature = "ser_de", serde(tag = "event"))]
|
#[cfg_attr(feature = "serde", serde(tag = "event"))]
|
||||||
#[derive(Clone, PartialEq, Debug)]
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
pub enum NavigationEvent {
|
pub enum NavigationEvent {
|
||||||
KeyPress {
|
KeyPress {
|
||||||
|
@ -1266,7 +1266,7 @@ impl NavigationEvent {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
#[cfg(any(feature = "v1_22", feature = "dox"))]
|
#[cfg(any(feature = "v1_22", feature = "dox"))]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))]
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))]
|
||||||
fn serialize_navigation_events() {
|
fn serialize_navigation_events() {
|
||||||
|
|
|
@ -27,7 +27,7 @@ futures-channel = "0.3"
|
||||||
futures-util = { version = "0.3", default-features = false }
|
futures-util = { version = "0.3", default-features = false }
|
||||||
muldiv = "1"
|
muldiv = "1"
|
||||||
opt-ops = { package = "option-operations", version = "0.5" }
|
opt-ops = { package = "option-operations", version = "0.5" }
|
||||||
serde = { version = "1.0", optional = true }
|
serde = { version = "1.0", optional = true, features = ["derive"] }
|
||||||
serde_bytes = { version = "0.11", optional = true }
|
serde_bytes = { version = "0.11", optional = true }
|
||||||
paste = "1.0"
|
paste = "1.0"
|
||||||
pretty-hex = "0.3"
|
pretty-hex = "0.3"
|
||||||
|
@ -45,8 +45,8 @@ v1_16 = ["ffi/v1_16"]
|
||||||
v1_18 = ["ffi/v1_18", "v1_16"]
|
v1_18 = ["ffi/v1_18", "v1_16"]
|
||||||
v1_20 = ["ffi/v1_20", "v1_18"]
|
v1_20 = ["ffi/v1_20", "v1_18"]
|
||||||
v1_22 = ["ffi/v1_22", "v1_20"]
|
v1_22 = ["ffi/v1_22", "v1_20"]
|
||||||
dox = ["v1_22", "ffi/dox", "glib/dox", "ser_de"]
|
dox = ["v1_22", "ffi/dox", "glib/dox", "serde"]
|
||||||
ser_de = ["num-rational/serde", "serde", "serde_bytes", "serde/derive"]
|
serde = ["num-rational/serde", "dep:serde", "serde_bytes"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["dox"]
|
features = ["dox"]
|
||||||
|
|
|
@ -1387,7 +1387,7 @@ name = "Gst.Format"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "serde::Serialize, serde::Deserialize"
|
name = "serde::Serialize, serde::Deserialize"
|
||||||
cfg_condition = "feature = \"ser_de\""
|
cfg_condition = "feature = \"serde\""
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
|
@ -1748,7 +1748,7 @@ name = "Gst.PadDirection"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "serde::Serialize, serde::Deserialize"
|
name = "serde::Serialize, serde::Deserialize"
|
||||||
cfg_condition = "feature = \"ser_de\""
|
cfg_condition = "feature = \"serde\""
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
||||||
|
|
||||||
|
@ -1780,7 +1780,7 @@ name = "Gst.PadPresence"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "serde::Serialize, serde::Deserialize"
|
name = "serde::Serialize, serde::Deserialize"
|
||||||
cfg_condition = "feature = \"ser_de\""
|
cfg_condition = "feature = \"serde\""
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
||||||
|
|
||||||
|
@ -2032,7 +2032,7 @@ name = "Gst.Rank"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "serde::Serialize, serde::Deserialize"
|
name = "serde::Serialize, serde::Deserialize"
|
||||||
cfg_condition = "feature = \"ser_de\""
|
cfg_condition = "feature = \"serde\""
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "Debug"
|
name = "Debug"
|
||||||
|
|
||||||
|
@ -2132,7 +2132,7 @@ name = "Gst.State"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "serde::Serialize, serde::Deserialize"
|
name = "serde::Serialize, serde::Deserialize"
|
||||||
cfg_condition = "feature = \"ser_de\""
|
cfg_condition = "feature = \"serde\""
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
||||||
|
|
||||||
|
@ -2313,7 +2313,7 @@ name = "Gst.TagScope"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "serde::Serialize, serde::Deserialize"
|
name = "serde::Serialize, serde::Deserialize"
|
||||||
cfg_condition = "feature = \"ser_de\""
|
cfg_condition = "feature = \"serde\""
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
||||||
|
|
||||||
|
@ -2408,7 +2408,7 @@ name = "Gst.TocEntryType"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "serde::Serialize, serde::Deserialize"
|
name = "serde::Serialize, serde::Deserialize"
|
||||||
cfg_condition = "feature = \"ser_de\""
|
cfg_condition = "feature = \"serde\""
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
||||||
|
|
||||||
|
@ -2417,7 +2417,7 @@ name = "Gst.TocLoopType"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "serde::Serialize, serde::Deserialize"
|
name = "serde::Serialize, serde::Deserialize"
|
||||||
cfg_condition = "feature = \"ser_de\""
|
cfg_condition = "feature = \"serde\""
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
||||||
|
|
||||||
|
@ -2426,7 +2426,7 @@ name = "Gst.TocScope"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "serde::Serialize, serde::Deserialize"
|
name = "serde::Serialize, serde::Deserialize"
|
||||||
cfg_condition = "feature = \"ser_de\""
|
cfg_condition = "feature = \"serde\""
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
||||||
|
|
||||||
|
@ -2475,6 +2475,6 @@ name = "Gst.URIType"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "serde::Serialize, serde::Deserialize"
|
name = "serde::Serialize, serde::Deserialize"
|
||||||
cfg_condition = "feature = \"ser_de\""
|
cfg_condition = "feature = \"serde\""
|
||||||
[[object.derive]]
|
[[object.derive]]
|
||||||
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash"
|
||||||
|
|
|
@ -21,7 +21,7 @@ enum DateTimeVariants {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: ser / de for `glib::Date` should be implemented in the `glib` crate
|
// Note: ser / de for `glib::Date` should be implemented in the `glib` crate
|
||||||
// However, there is no `ser_de` feature in `glib` right now. The limitation is that
|
// However, there is no `serde` feature in `glib` right now. The limitation is that
|
||||||
// `Date` fields can only be ser / de when they are used in `Value`s (which implies
|
// `Date` fields can only be ser / de when they are used in `Value`s (which implies
|
||||||
// `Array`s, `List`s, `Structure` fields and `Tag`s)
|
// `Array`s, `List`s, `Structure` fields and `Tag`s)
|
||||||
pub(crate) struct Date(glib::Date);
|
pub(crate) struct Date(glib::Date);
|
||||||
|
|
|
@ -88,7 +88,7 @@ impl<T> Signed<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Hash, Clone, Copy, Debug)]
|
#[derive(PartialEq, Eq, Hash, Clone, Copy, Debug)]
|
||||||
#[cfg_attr(feature = "ser_de", derive(serde::Serialize, serde::Deserialize))]
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||||
pub enum GenericFormattedValue {
|
pub enum GenericFormattedValue {
|
||||||
Undefined(Undefined),
|
Undefined(Undefined),
|
||||||
Default(Option<Default>),
|
Default(Option<Default>),
|
||||||
|
|
|
@ -7,7 +7,7 @@ use crate::format::{Buffers, Bytes, Default, Percent, Undefined};
|
||||||
|
|
||||||
// Manual implementation for some types that would otherwise yield representations such as:
|
// Manual implementation for some types that would otherwise yield representations such as:
|
||||||
// "Default((Some(42)))"
|
// "Default((Some(42)))"
|
||||||
macro_rules! impl_ser_de(
|
macro_rules! impl_serde(
|
||||||
($t:ident) => {
|
($t:ident) => {
|
||||||
impl Serialize for $t {
|
impl Serialize for $t {
|
||||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||||
|
@ -25,9 +25,9 @@ macro_rules! impl_ser_de(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
impl_ser_de!(Buffers);
|
impl_serde!(Buffers);
|
||||||
impl_ser_de!(Bytes);
|
impl_serde!(Bytes);
|
||||||
impl_ser_de!(Default);
|
impl_serde!(Default);
|
||||||
|
|
||||||
impl Serialize for Undefined {
|
impl Serialize for Undefined {
|
||||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||||
|
|
|
@ -50,9 +50,9 @@ pub use crate::auto::*;
|
||||||
mod macros;
|
mod macros;
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod serde_macros;
|
mod serde_macros;
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
pub use crate::serde_macros::*;
|
pub use crate::serde_macros::*;
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
@ -73,28 +73,28 @@ mod value;
|
||||||
pub use crate::value::{
|
pub use crate::value::{
|
||||||
Array, ArrayRef, Bitmask, Fraction, FractionRange, IntRange, List, ListRef,
|
Array, ArrayRef, Bitmask, Fraction, FractionRange, IntRange, List, ListRef,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
mod value_serde;
|
mod value_serde;
|
||||||
|
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod flag_serde;
|
mod flag_serde;
|
||||||
|
|
||||||
pub mod structure;
|
pub mod structure;
|
||||||
pub use crate::structure::{Structure, StructureRef};
|
pub use crate::structure::{Structure, StructureRef};
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod structure_serde;
|
mod structure_serde;
|
||||||
|
|
||||||
pub mod caps;
|
pub mod caps;
|
||||||
pub use crate::caps::{Caps, CapsFilterMapAction, CapsRef};
|
pub use crate::caps::{Caps, CapsFilterMapAction, CapsRef};
|
||||||
mod caps_features;
|
mod caps_features;
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod caps_serde;
|
mod caps_serde;
|
||||||
pub use crate::caps_features::{
|
pub use crate::caps_features::{
|
||||||
CapsFeatures, CapsFeaturesRef, CAPS_FEATURES_MEMORY_SYSTEM_MEMORY,
|
CapsFeatures, CapsFeaturesRef, CAPS_FEATURES_MEMORY_SYSTEM_MEMORY,
|
||||||
CAPS_FEATURE_MEMORY_SYSTEM_MEMORY,
|
CAPS_FEATURE_MEMORY_SYSTEM_MEMORY,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod caps_features_serde;
|
mod caps_features_serde;
|
||||||
|
|
||||||
pub mod tags;
|
pub mod tags;
|
||||||
|
@ -102,7 +102,7 @@ pub use crate::tags::{
|
||||||
tag_exists, tag_get_description, tag_get_flag, tag_get_nick, tag_get_type, Tag, TagList,
|
tag_exists, tag_get_description, tag_get_flag, tag_get_nick, tag_get_type, Tag, TagList,
|
||||||
TagListRef,
|
TagListRef,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod tags_serde;
|
mod tags_serde;
|
||||||
|
|
||||||
pub mod meta;
|
pub mod meta;
|
||||||
|
@ -119,17 +119,17 @@ mod buffer_cursor;
|
||||||
pub use crate::buffer_cursor::{BufferCursor, BufferRefCursor};
|
pub use crate::buffer_cursor::{BufferCursor, BufferRefCursor};
|
||||||
pub mod memory;
|
pub mod memory;
|
||||||
pub use crate::memory::{MappedMemory, Memory, MemoryMap, MemoryRef};
|
pub use crate::memory::{MappedMemory, Memory, MemoryMap, MemoryRef};
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod buffer_serde;
|
mod buffer_serde;
|
||||||
|
|
||||||
pub mod sample;
|
pub mod sample;
|
||||||
pub use crate::sample::{Sample, SampleRef};
|
pub use crate::sample::{Sample, SampleRef};
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod sample_serde;
|
mod sample_serde;
|
||||||
|
|
||||||
pub mod bufferlist;
|
pub mod bufferlist;
|
||||||
pub use crate::bufferlist::{BufferList, BufferListRef};
|
pub use crate::bufferlist::{BufferList, BufferListRef};
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod bufferlist_serde;
|
mod bufferlist_serde;
|
||||||
|
|
||||||
pub mod query;
|
pub mod query;
|
||||||
|
@ -171,10 +171,10 @@ mod bus_windows;
|
||||||
|
|
||||||
mod child_proxy;
|
mod child_proxy;
|
||||||
mod clock_time;
|
mod clock_time;
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod clock_time_serde;
|
mod clock_time_serde;
|
||||||
mod date_time;
|
mod date_time;
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod date_time_serde;
|
mod date_time_serde;
|
||||||
mod device_monitor;
|
mod device_monitor;
|
||||||
mod device_provider;
|
mod device_provider;
|
||||||
|
@ -230,17 +230,17 @@ pub use crate::format::{
|
||||||
GenericFormattedValue, Signed, SpecificFormattedValue, SpecificFormattedValueFullRange,
|
GenericFormattedValue, Signed, SpecificFormattedValue, SpecificFormattedValueFullRange,
|
||||||
SpecificFormattedValueIntrinsic,
|
SpecificFormattedValueIntrinsic,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod format_serde;
|
mod format_serde;
|
||||||
|
|
||||||
mod segment;
|
mod segment;
|
||||||
pub use crate::segment::*;
|
pub use crate::segment::*;
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod segment_serde;
|
mod segment_serde;
|
||||||
|
|
||||||
pub mod toc;
|
pub mod toc;
|
||||||
pub use crate::toc::{Toc, TocEntry, TocEntryRef, TocRef};
|
pub use crate::toc::{Toc, TocEntry, TocEntryRef, TocRef};
|
||||||
#[cfg(feature = "ser_de")]
|
#[cfg(feature = "serde")]
|
||||||
mod toc_serde;
|
mod toc_serde;
|
||||||
|
|
||||||
mod clock;
|
mod clock;
|
||||||
|
|
|
@ -282,7 +282,7 @@ impl glib::value::ToValue for Fraction {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
||||||
#[cfg_attr(feature = "ser_de", derive(serde::Serialize, serde::Deserialize))]
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||||
pub struct IntRange<T> {
|
pub struct IntRange<T> {
|
||||||
min: T,
|
min: T,
|
||||||
max: T,
|
max: T,
|
||||||
|
@ -466,7 +466,7 @@ impl glib::value::ToValue for IntRange<i64> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
||||||
#[cfg_attr(feature = "ser_de", derive(serde::Serialize, serde::Deserialize))]
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||||
pub struct FractionRange {
|
pub struct FractionRange {
|
||||||
min: Fraction,
|
min: Fraction,
|
||||||
max: Fraction,
|
max: Fraction,
|
||||||
|
@ -549,7 +549,7 @@ impl glib::value::ToValue for FractionRange {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
||||||
#[cfg_attr(feature = "ser_de", derive(serde::Serialize, serde::Deserialize))]
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||||
pub struct Bitmask(pub u64);
|
pub struct Bitmask(pub u64);
|
||||||
|
|
||||||
impl Bitmask {
|
impl Bitmask {
|
||||||
|
|
Loading…
Reference in a new issue