From 1b860825eeb9297cb81c91ebc882b791fadcda0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 13 Aug 2019 16:46:08 +0300 Subject: [PATCH] Update feature flags of all dependencies to include the same version as for the crate itself This improves build times as it allows cargo to reuse more previous build results when building crates separately. Also remove the serde-pickle dependency. It was only used in a single test and caused pulling in of quite a few dependencies. --- gstreamer-app/Cargo.toml | 16 +++++---- gstreamer-audio/Cargo.toml | 16 +++++---- gstreamer-base/Cargo.toml | 18 +++++----- gstreamer-check/Cargo.toml | 16 +++++---- gstreamer-editing-services/Cargo.toml | 22 ++++++------ gstreamer-editing-services/src/lib.rs | 2 -- gstreamer-gl/Cargo.toml | 12 ++++--- gstreamer-net/Cargo.toml | 16 +++++---- gstreamer-pbutils/Cargo.toml | 16 +++++---- gstreamer-player/Cargo.toml | 12 ++++--- gstreamer-rtsp-server/Cargo.toml | 16 +++++---- gstreamer-rtsp/Cargo.toml | 16 +++++---- gstreamer-sdp/Cargo.toml | 16 +++++---- gstreamer-video/Cargo.toml | 16 +++++---- gstreamer-webrtc/Cargo.toml | 14 ++++---- gstreamer/Cargo.toml | 9 ++--- gstreamer/src/buffer_serde.rs | 48 --------------------------- 17 files changed, 128 insertions(+), 153 deletions(-) diff --git a/gstreamer-app/Cargo.toml b/gstreamer-app/Cargo.toml index 32f850741..6728146dd 100644 --- a/gstreamer-app/Cargo.toml +++ b/gstreamer-app/Cargo.toml @@ -23,16 +23,18 @@ glib = { git = "https://github.com/gtk-rs/glib" } gstreamer = { path = "../gstreamer" } gstreamer-base = { path = "../gstreamer-base" } -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [features] default = [] -v1_10 = ["gstreamer-sys/v1_10", "gstreamer-base/v1_10", "gstreamer-app-sys/v1_10"] -v1_12 = ["gstreamer-sys/v1_12", "gstreamer-base/v1_12", "gstreamer-app-sys/v1_12", "v1_10"] -v1_14 = ["gstreamer-sys/v1_14", "gstreamer-base/v1_14", "gstreamer-app-sys/v1_14", "v1_12"] -v1_16 = ["gstreamer-sys/v1_16", "gstreamer-base/v1_16", "gstreamer-app-sys/v1_16", "v1_14"] +v1_10 = ["gstreamer/v1_10", "gstreamer-base/v1_10", "gstreamer-app-sys/v1_10"] +v1_12 = ["gstreamer/v1_12", "gstreamer-base/v1_12", "gstreamer-app-sys/v1_12", "v1_10"] +v1_14 = ["gstreamer/v1_14", "gstreamer-base/v1_14", "gstreamer-app-sys/v1_14", "v1_12"] +v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-app-sys/v1_16", "v1_14"] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] dox = ["gstreamer-app-sys/dox", "glib/dox", "gstreamer/dox", "gstreamer-base/dox"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer-audio/Cargo.toml b/gstreamer-audio/Cargo.toml index 2f8a7aeaf..3b72d9a19 100644 --- a/gstreamer-audio/Cargo.toml +++ b/gstreamer-audio/Cargo.toml @@ -22,16 +22,18 @@ glib = { git = "https://github.com/gtk-rs/glib" } gstreamer = { path = "../gstreamer" } array-init = "0.1" -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [features] default = [] -v1_10 = ["gstreamer-sys/v1_10", "gstreamer-audio-sys/v1_10"] -v1_12 = ["gstreamer-sys/v1_12", "gstreamer-audio-sys/v1_12", "v1_10"] -v1_14 = ["gstreamer-sys/v1_14", "gstreamer-audio-sys/v1_14", "v1_12"] -v1_16 = ["gstreamer-sys/v1_16", "gstreamer-audio-sys/v1_16", "v1_14"] +v1_10 = ["gstreamer/v1_10", "gstreamer-audio-sys/v1_10"] +v1_12 = ["gstreamer/v1_12", "gstreamer-audio-sys/v1_12", "v1_10"] +v1_14 = ["gstreamer/v1_14", "gstreamer-audio-sys/v1_14", "v1_12"] +v1_16 = ["gstreamer/v1_16", "gstreamer-audio-sys/v1_16", "v1_14"] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] dox = ["gstreamer-audio-sys/dox", "glib/dox", "gstreamer/dox"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer-base/Cargo.toml b/gstreamer-base/Cargo.toml index 53bfc5e5d..5fbe705fe 100644 --- a/gstreamer-base/Cargo.toml +++ b/gstreamer-base/Cargo.toml @@ -22,18 +22,20 @@ gstreamer-base-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer glib = { git = "https://github.com/gtk-rs/glib" } gstreamer = { path = "../gstreamer" } -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [features] default = [] -v1_10 = ["gstreamer-sys/v1_10", "gstreamer-base-sys/v1_10"] -v1_12 = ["gstreamer-sys/v1_12", "gstreamer-base-sys/v1_12", "v1_10"] -v1_14 = ["gstreamer-sys/v1_14", "gstreamer-base-sys/v1_14", "v1_12"] -v1_14_1 = ["gstreamer-sys/v1_14", "gstreamer-base-sys/v1_14_1", "v1_14"] -v1_16 = ["gstreamer-sys/v1_16", "gstreamer-base-sys/v1_16", "v1_14_1"] +v1_10 = ["gstreamer/v1_10", "gstreamer-base-sys/v1_10"] +v1_12 = ["gstreamer/v1_12", "gstreamer-base-sys/v1_12", "v1_10"] +v1_14 = ["gstreamer/v1_14", "gstreamer-base-sys/v1_14", "v1_12"] +v1_14_1 = ["gstreamer/v1_14", "gstreamer-base-sys/v1_14_1", "v1_14"] +v1_16 = ["gstreamer/v1_16", "gstreamer-base-sys/v1_16", "v1_14_1"] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] dox = ["gstreamer-base-sys/dox", "glib/dox", "gstreamer/dox"] subclassing = ["gstreamer/subclassing"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer-check/Cargo.toml b/gstreamer-check/Cargo.toml index f0b847f77..604e4b65c 100644 --- a/gstreamer-check/Cargo.toml +++ b/gstreamer-check/Cargo.toml @@ -21,16 +21,18 @@ gstreamer-check-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreame glib = { git = "https://github.com/gtk-rs/glib" } gstreamer = { path = "../gstreamer" } -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [features] default = [] -v1_10 = ["gstreamer-sys/v1_10", "gstreamer-check-sys/v1_10"] -v1_12 = ["gstreamer-sys/v1_12", "gstreamer-check-sys/v1_12", "v1_10"] -v1_14 = ["gstreamer-sys/v1_14", "gstreamer-check-sys/v1_14", "v1_12"] -v1_16 = ["gstreamer-sys/v1_16", "gstreamer-check-sys/v1_16", "v1_14"] +v1_10 = ["gstreamer/v1_10", "gstreamer-check-sys/v1_10"] +v1_12 = ["gstreamer/v1_12", "gstreamer-check-sys/v1_12", "v1_10"] +v1_14 = ["gstreamer/v1_14", "gstreamer-check-sys/v1_14", "v1_12"] +v1_16 = ["gstreamer/v1_16", "gstreamer-check-sys/v1_16", "v1_14"] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] dox = ["gstreamer-check-sys/dox", "glib/dox", "gstreamer/dox"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer-editing-services/Cargo.toml b/gstreamer-editing-services/Cargo.toml index 3d1292b6b..e391f8239 100644 --- a/gstreamer-editing-services/Cargo.toml +++ b/gstreamer-editing-services/Cargo.toml @@ -18,27 +18,25 @@ bitflags = "1.0" glib-sys = { git = "https://github.com/gtk-rs/sys" } gio-sys = { git = "https://github.com/gtk-rs/sys" } gobject-sys = { git = "https://github.com/gtk-rs/sys" } -gstreamer-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" } -gstreamer-base-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" } -gstreamer-pbutils-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" } +gstreamer-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys", features = ["v1_8"] } gstreamer-editing-services-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys", features = ["v1_8"]} - glib = { git = "https://github.com/gtk-rs/glib" } gio = { git = "https://github.com/gtk-rs/gio" } gstreamer = { path = "../gstreamer" } gstreamer-base = { path = "../gstreamer-base" } gstreamer-pbutils = { path = "../gstreamer-pbutils" } -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [features] -v1_8 = ["gstreamer-editing-services-sys/v1_8"] -v1_10 = ["gstreamer-editing-services-sys/v1_10"] -v1_12 = ["gstreamer-editing-services-sys/v1_12", "v1_10"] -v1_14 = ["gstreamer-editing-services-sys/v1_14", "v1_12"] -v1_16 = ["gstreamer-editing-services-sys/v1_16", "v1_14"] +v1_10 = ["gstreamer/v1_10", "gstreamer-base/v1_10", "gstreamer-pbutils/v1_10", "gstreamer-editing-services-sys/v1_10"] +v1_12 = ["gstreamer/v1_12", "gstreamer-base/v1_12", "gstreamer-pbutils/v1_12", "gstreamer-editing-services-sys/v1_12", "v1_10"] +v1_14 = ["gstreamer/v1_14", "gstreamer-base/v1_14", "gstreamer-pbutils/v1_14", "gstreamer-editing-services-sys/v1_14", "v1_12"] +v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-pbutils/v1_16", "gstreamer-editing-services-sys/v1_16", "v1_14"] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] dox = ["gstreamer-editing-services-sys/dox", "glib/dox", "gstreamer/dox"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer-editing-services/src/lib.rs b/gstreamer-editing-services/src/lib.rs index 9213940a5..e6bfa7f09 100644 --- a/gstreamer-editing-services/src/lib.rs +++ b/gstreamer-editing-services/src/lib.rs @@ -15,10 +15,8 @@ extern crate glib_sys; extern crate gobject_sys; extern crate gstreamer as gst; extern crate gstreamer_base as gst_base; -extern crate gstreamer_base_sys as gst_base_sys; extern crate gstreamer_editing_services_sys as ges_sys; extern crate gstreamer_pbutils as gst_pbutils; -extern crate gstreamer_pbutils_sys as gst_pbutils_sys; extern crate gstreamer_sys as gst_sys; use glib::translate::from_glib; diff --git a/gstreamer-gl/Cargo.toml b/gstreamer-gl/Cargo.toml index 3e8b65ded..68d1d3fc5 100644 --- a/gstreamer-gl/Cargo.toml +++ b/gstreamer-gl/Cargo.toml @@ -20,7 +20,7 @@ libc = "0.2" lazy_static = "1.0" glib-sys = { git = "https://github.com/gtk-rs/sys" } gobject-sys = { git = "https://github.com/gtk-rs/sys" } -gstreamer-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" } +gstreamer-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys", features = ["v1_14"] } gstreamer-video-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys", features = ["v1_14"] } gstreamer-gl-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" } glib = { git = "https://github.com/gtk-rs/glib" } @@ -28,9 +28,8 @@ gstreamer = { path = "../gstreamer", features = ["v1_14"] } gstreamer-base = { path = "../gstreamer-base", features = ["v1_14"] } gstreamer-video = { path = "../gstreamer-video", features = ["v1_14"] } -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [features] default = [] @@ -40,4 +39,7 @@ x11 = ["gstreamer-gl-sys/x11"] wayland = ["gstreamer-gl-sys/wayland"] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] -v1_16 = ["gstreamer-sys/v1_16", "gstreamer-video-sys/v1_16", "gstreamer-gl-sys/v1_16"] +v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-video/v1_16", "gstreamer-gl-sys/v1_16"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer-net/Cargo.toml b/gstreamer-net/Cargo.toml index d137c51df..b2552de49 100644 --- a/gstreamer-net/Cargo.toml +++ b/gstreamer-net/Cargo.toml @@ -21,16 +21,18 @@ glib = { git = "https://github.com/gtk-rs/glib" } gstreamer = { path = "../gstreamer" } gio = { git = "https://github.com/gtk-rs/gio" } -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [features] default = [] -v1_10 = ["gstreamer-sys/v1_10", "gstreamer-net-sys/v1_10"] -v1_12 = ["gstreamer-sys/v1_12", "gstreamer-net-sys/v1_12", "v1_10"] -v1_14 = ["gstreamer-sys/v1_14", "gstreamer-net-sys/v1_14", "v1_12"] -v1_16 = ["gstreamer-sys/v1_16", "gstreamer-net-sys/v1_16", "v1_14"] +v1_10 = ["gstreamer/v1_10", "gstreamer-net-sys/v1_10"] +v1_12 = ["gstreamer/v1_12", "gstreamer-net-sys/v1_12", "v1_10"] +v1_14 = ["gstreamer/v1_14", "gstreamer-net-sys/v1_14", "v1_12"] +v1_16 = ["gstreamer/v1_16", "gstreamer-net-sys/v1_16", "v1_14"] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] dox = ["gstreamer-net-sys/dox", "glib/dox", "gstreamer/dox"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer-pbutils/Cargo.toml b/gstreamer-pbutils/Cargo.toml index a30bf369e..c40b90342 100644 --- a/gstreamer-pbutils/Cargo.toml +++ b/gstreamer-pbutils/Cargo.toml @@ -22,16 +22,18 @@ gstreamer-pbutils-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstrea glib = { git = "https://github.com/gtk-rs/glib" } gstreamer = { path = "../gstreamer" } -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [features] default = [] -v1_10 = ["gstreamer-sys/v1_10", "gstreamer-pbutils-sys/v1_10"] -v1_12 = ["gstreamer-sys/v1_12", "gstreamer-pbutils-sys/v1_12", "v1_10"] -v1_14 = ["gstreamer-sys/v1_14", "gstreamer-pbutils-sys/v1_14", "v1_12"] -v1_16 = ["gstreamer-sys/v1_16", "gstreamer-pbutils-sys/v1_16", "v1_14"] +v1_10 = ["gstreamer/v1_10", "gstreamer-pbutils-sys/v1_10"] +v1_12 = ["gstreamer/v1_12", "gstreamer-pbutils-sys/v1_12", "v1_10"] +v1_14 = ["gstreamer/v1_14", "gstreamer-pbutils-sys/v1_14", "v1_12"] +v1_16 = ["gstreamer/v1_16", "gstreamer-pbutils-sys/v1_16", "v1_14"] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] dox = ["gstreamer-pbutils-sys/dox"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer-player/Cargo.toml b/gstreamer-player/Cargo.toml index f396ee6b6..b14182148 100644 --- a/gstreamer-player/Cargo.toml +++ b/gstreamer-player/Cargo.toml @@ -23,14 +23,16 @@ glib = { git = "https://github.com/gtk-rs/glib" } gstreamer = { path = "../gstreamer", features = ["v1_12"] } gstreamer-video = { path = "../gstreamer-video", features = ["v1_12"] } -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [features] default = [] -v1_14 = ["gstreamer-sys/v1_14", "gstreamer-player-sys/v1_14"] -v1_16 = ["gstreamer-sys/v1_16", "gstreamer-player-sys/v1_16", "v1_14"] +v1_14 = ["gstreamer/v1_14", "gstreamer-video/v1_14", "gstreamer-player-sys/v1_14"] +v1_16 = ["gstreamer/v1_16", "gstreamer-video/v1_16", "gstreamer-player-sys/v1_16", "v1_14"] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] dox = ["gstreamer-player-sys/dox", "glib/dox", "gstreamer/dox"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer-rtsp-server/Cargo.toml b/gstreamer-rtsp-server/Cargo.toml index 7a9fbce3d..fa2b332fa 100644 --- a/gstreamer-rtsp-server/Cargo.toml +++ b/gstreamer-rtsp-server/Cargo.toml @@ -29,16 +29,18 @@ gstreamer = { path = "../gstreamer" } gstreamer-rtsp = { path = "../gstreamer-rtsp" } gstreamer-net = { path = "../gstreamer-net" } -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [features] default = [] -v1_10 = ["gstreamer-sys/v1_10", "gstreamer-rtsp-sys/v1_10", "gstreamer-net-sys/v1_10", "gstreamer-rtsp-server-sys/v1_10"] -v1_12 = ["gstreamer-sys/v1_12", "gstreamer-rtsp-sys/v1_12", "gstreamer-net-sys/v1_12", "gstreamer-rtsp-server-sys/v1_12", "v1_10"] -v1_14 = ["gstreamer-sys/v1_14", "gstreamer-rtsp-sys/v1_14", "gstreamer-net-sys/v1_14", "gstreamer-rtsp-server-sys/v1_14", "v1_12"] -v1_16 = ["gstreamer-sys/v1_16", "gstreamer-rtsp-sys/v1_16", "gstreamer-net-sys/v1_16", "gstreamer-rtsp-server-sys/v1_16", "v1_14"] +v1_10 = ["gstreamer/v1_10", "gstreamer-rtsp/v1_10", "gstreamer-net/v1_10", "gstreamer-rtsp-server-sys/v1_10"] +v1_12 = ["gstreamer/v1_12", "gstreamer-rtsp/v1_12", "gstreamer-net/v1_12", "gstreamer-rtsp-server-sys/v1_12", "v1_10"] +v1_14 = ["gstreamer/v1_14", "gstreamer-rtsp/v1_14", "gstreamer-net/v1_14", "gstreamer-rtsp-server-sys/v1_14", "v1_12"] +v1_16 = ["gstreamer/v1_16", "gstreamer-rtsp/v1_16", "gstreamer-net/v1_16", "gstreamer-rtsp-server-sys/v1_16", "v1_14"] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] dox = ["gstreamer-rtsp-server-sys/dox", "glib/dox", "gstreamer/dox"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer-rtsp/Cargo.toml b/gstreamer-rtsp/Cargo.toml index 865c2cfb4..3794d0a59 100644 --- a/gstreamer-rtsp/Cargo.toml +++ b/gstreamer-rtsp/Cargo.toml @@ -26,16 +26,18 @@ gio = { git = "https://github.com/gtk-rs/gio" } gstreamer = { path = "../gstreamer" } gstreamer-sdp = { path = "../gstreamer-sdp" } -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [features] default = [] -v1_10 = ["gstreamer-sys/v1_10", "gstreamer-rtsp-sys/v1_10", "gstreamer-sdp-sys/v1_10"] -v1_12 = ["gstreamer-sys/v1_12", "gstreamer-rtsp-sys/v1_12", "gstreamer-sdp-sys/v1_12", "v1_10"] -v1_14 = ["gstreamer-sys/v1_14", "gstreamer-rtsp-sys/v1_14", "gstreamer-sdp-sys/v1_14", "v1_12"] -v1_16 = ["gstreamer-sys/v1_16", "gstreamer-rtsp-sys/v1_16", "gstreamer-sdp-sys/v1_16", "v1_14"] +v1_10 = ["gstreamer/v1_10", "gstreamer-sdp/v1_10"] +v1_12 = ["gstreamer/v1_12", "gstreamer-sdp/v1_12", "v1_10"] +v1_14 = ["gstreamer/v1_14", "gstreamer-sdp/v1_14", "v1_12"] +v1_16 = ["gstreamer/v1_16", "gstreamer-sdp/v1_16", "v1_14"] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] dox = ["gstreamer-rtsp-sys/dox", "glib/dox", "gstreamer/dox"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer-sdp/Cargo.toml b/gstreamer-sdp/Cargo.toml index 895b230d1..9cca66ea0 100644 --- a/gstreamer-sdp/Cargo.toml +++ b/gstreamer-sdp/Cargo.toml @@ -20,17 +20,19 @@ gstreamer-sdp-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer- glib = { git = "https://github.com/gtk-rs/glib" } gstreamer = { path = "../gstreamer" } -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [features] default = [] v1_8_1 = ["gstreamer-sdp-sys/v1_8_1"] -v1_10 = ["gstreamer-sys/v1_10", "gstreamer-sdp-sys/v1_10", "v1_8_1"] -v1_12 = ["gstreamer-sys/v1_12", "gstreamer-sdp-sys/v1_12", "v1_10"] -v1_14 = ["gstreamer-sys/v1_14", "gstreamer-sdp-sys/v1_14", "v1_12"] -v1_16 = ["gstreamer-sys/v1_16", "gstreamer-sdp-sys/v1_16", "v1_14"] +v1_10 = ["gstreamer/v1_10", "gstreamer-sdp-sys/v1_10", "v1_8_1"] +v1_12 = ["gstreamer/v1_12", "gstreamer-sdp-sys/v1_12", "v1_10"] +v1_14 = ["gstreamer/v1_14", "gstreamer-sdp-sys/v1_14", "v1_12"] +v1_16 = ["gstreamer/v1_16", "gstreamer-sdp-sys/v1_16", "v1_14"] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] dox = ["gstreamer-sdp-sys/dox", "glib/dox", "gstreamer/dox"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer-video/Cargo.toml b/gstreamer-video/Cargo.toml index afcaa6f4d..d3c23e6ff 100644 --- a/gstreamer-video/Cargo.toml +++ b/gstreamer-video/Cargo.toml @@ -25,17 +25,19 @@ gstreamer = { path = "../gstreamer" } gstreamer-base = { path = "../gstreamer-base" } lazy_static = "1.0" -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [features] default = [] -v1_10 = ["gstreamer-sys/v1_10", "gstreamer-video-sys/v1_10"] -v1_12 = ["gstreamer-sys/v1_12", "gstreamer-video-sys/v1_12", "v1_10"] -v1_14 = ["gstreamer-sys/v1_14", "gstreamer-video-sys/v1_14", "v1_12"] -v1_16 = ["gstreamer-sys/v1_16", "gstreamer-video-sys/v1_16", "v1_14"] +v1_10 = ["gstreamer/v1_10", "gstreamer-base/v1_10", "gstreamer-video-sys/v1_10"] +v1_12 = ["gstreamer/v1_12", "gstreamer-base/v1_12", "gstreamer-video-sys/v1_12", "v1_10"] +v1_14 = ["gstreamer/v1_14", "gstreamer-base/v1_14", "gstreamer-video-sys/v1_14", "v1_12"] +v1_16 = ["gstreamer/v1_16", "gstreamer-base/v1_16", "gstreamer-video-sys/v1_16", "v1_14"] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] dox = ["gstreamer-video-sys/dox", "glib/dox", "gstreamer/dox"] subclassing = ["gstreamer/subclassing"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer-webrtc/Cargo.toml b/gstreamer-webrtc/Cargo.toml index 24da79ae2..a56ad0351 100644 --- a/gstreamer-webrtc/Cargo.toml +++ b/gstreamer-webrtc/Cargo.toml @@ -16,19 +16,21 @@ build = "build.rs" libc = "0.2" glib-sys = { git = "https://github.com/gtk-rs/sys" } gobject-sys = { git = "https://github.com/gtk-rs/sys" } -gstreamer-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" } +gstreamer-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys", features = ["v1_8"] } gstreamer-webrtc-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" } glib = { git = "https://github.com/gtk-rs/glib" } gstreamer = { path = "../gstreamer", features = ["v1_14"] } -gstreamer-sdp = { path = "../gstreamer-sdp" } +gstreamer-sdp = { path = "../gstreamer-sdp", features = ["v1_14"] } -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [features] default = [] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] dox = ["gstreamer-webrtc-sys/dox", "glib/dox", "gstreamer/dox"] -v1_16 = ["gstreamer-sys/v1_16", "gstreamer-webrtc-sys/v1_16"] +v1_16 = ["gstreamer/v1_16", "gstreamer-sdp/v1_16", "gstreamer-webrtc-sys/v1_16"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer/Cargo.toml b/gstreamer/Cargo.toml index f425d90cf..d885bc102 100644 --- a/gstreamer/Cargo.toml +++ b/gstreamer/Cargo.toml @@ -29,14 +29,12 @@ serde_bytes = { version = "0.11", optional = true } serde_derive = { version = "1.0", optional = true } paste = { version = "0.1", optional = true } -[build-dependencies.rustdoc-stripper] -version = "0.1" -optional = true +[build-dependencies] +rustdoc-stripper = { version = "0.1", optional = true } [dev-dependencies] ron = "0.5" serde_json = "1.0" -serde-pickle = "0.5" [features] default = [] @@ -50,3 +48,6 @@ dox = ["gstreamer-sys/dox", "glib/dox", "futures", "ser_de"] futures = ["futures-core-preview"] ser_de = ["num-rational/serde", "serde", "serde_bytes", "serde_derive"] subclassing = ["glib/subclassing", "paste"] + +["package.metadata.docs.rs"] +features = ["dox", "embed-lgpl-docs", "v1_16"] diff --git a/gstreamer/src/buffer_serde.rs b/gstreamer/src/buffer_serde.rs index 958e7a0a4..a7b70784d 100644 --- a/gstreamer/src/buffer_serde.rs +++ b/gstreamer/src/buffer_serde.rs @@ -81,7 +81,6 @@ impl<'de> Deserialize<'de> for Buffer { mod tests { extern crate ron; extern crate serde_json; - extern crate serde_pickle; use Buffer; use BufferFlags; @@ -138,19 +137,6 @@ mod tests { .to_owned(), res ); - - let res = serde_pickle::to_vec(&buffer, true).unwrap(); - assert_eq!( - vec![ - 128, 3, 125, 40, 88, 3, 0, 0, 0, 112, 116, 115, 74, 1, 0, 0, 0, 88, 3, 0, 0, 0, - 100, 116, 115, 78, 88, 8, 0, 0, 0, 100, 117, 114, 97, 116, 105, 111, 110, 74, 5, 0, - 0, 0, 88, 6, 0, 0, 0, 111, 102, 102, 115, 101, 116, 74, 3, 0, 0, 0, 88, 10, 0, 0, - 0, 111, 102, 102, 115, 101, 116, 95, 101, 110, 100, 74, 4, 0, 0, 0, 88, 5, 0, 0, 0, - 102, 108, 97, 103, 115, 125, 40, 88, 4, 0, 0, 0, 98, 105, 116, 115, 74, 16, 0, 16, - 0, 117, 88, 6, 0, 0, 0, 98, 117, 102, 102, 101, 114, 67, 4, 1, 2, 3, 4, 117, 46, - ], - res - ); } #[test] @@ -204,26 +190,6 @@ mod tests { let data = buffer.map_readable().unwrap(); assert_eq!(data.as_slice(), vec![1, 2, 3, 4].as_slice()); } - - let buffer_pickle: &[u8] = &[ - 128, 3, 125, 40, 88, 3, 0, 0, 0, 112, 116, 115, 74, 1, 0, 0, 0, 88, 3, 0, 0, 0, 100, - 116, 115, 78, 88, 8, 0, 0, 0, 100, 117, 114, 97, 116, 105, 111, 110, 74, 5, 0, 0, 0, - 88, 6, 0, 0, 0, 111, 102, 102, 115, 101, 116, 74, 3, 0, 0, 0, 88, 10, 0, 0, 0, 111, - 102, 102, 115, 101, 116, 95, 101, 110, 100, 74, 4, 0, 0, 0, 88, 5, 0, 0, 0, 102, 108, - 97, 103, 115, 125, 40, 88, 4, 0, 0, 0, 98, 105, 116, 115, 74, 16, 0, 16, 0, 117, 88, 6, - 0, 0, 0, 98, 117, 102, 102, 101, 114, 67, 4, 1, 2, 3, 4, 117, 46, - ]; - let buffer: Buffer = serde_pickle::from_slice(buffer_pickle).unwrap(); - assert_eq!(buffer.get_pts(), 1.into()); - assert_eq!(buffer.get_dts(), None.into()); - assert_eq!(buffer.get_offset(), 3); - assert_eq!(buffer.get_offset_end(), 4); - assert_eq!(buffer.get_duration(), 5.into()); - assert_eq!(buffer.get_flags(), BufferFlags::LIVE | BufferFlags::LAST); - { - let data = buffer.map_readable().unwrap(); - assert_eq!(data.as_slice(), vec![1, 2, 3, 4].as_slice()); - } } #[test] @@ -253,19 +219,5 @@ mod tests { let data = buffer_de.map_readable().unwrap(); assert_eq!(data.as_slice(), vec![1, 2, 3, 4].as_slice()); } - - // Pickle - let buffer_ser = serde_pickle::to_vec(&buffer, true).unwrap(); - let buffer_de: Buffer = serde_pickle::from_slice(buffer_ser.as_slice()).unwrap(); - assert_eq!(buffer_de.get_pts(), buffer.get_pts()); - assert_eq!(buffer_de.get_dts(), buffer.get_dts()); - assert_eq!(buffer_de.get_offset(), buffer.get_offset()); - assert_eq!(buffer_de.get_offset_end(), buffer.get_offset_end()); - assert_eq!(buffer_de.get_duration(), buffer.get_duration()); - assert_eq!(buffer_de.get_flags(), buffer.get_flags()); - { - let data = buffer_de.map_readable().unwrap(); - assert_eq!(data.as_slice(), vec![1, 2, 3, 4].as_slice()); - } } }