From 4651c9db4dee34629e8c5da01e99f64c18ec9754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 7 Apr 2022 11:22:39 +0300 Subject: [PATCH] Update minimum supported version to 1.14 This is the version that is available in Ubuntu 18.04. --- README.md | 29 +-- examples/Cargo.toml | 4 - examples/src/bin/decodebin.rs | 65 ++--- examples/src/bin/encodebin.rs | 55 +--- examples/src/bin/player.rs | 2 +- gstreamer-allocators/Cargo.toml | 5 +- gstreamer-allocators/Gir.toml | 4 +- gstreamer-allocators/README.md | 29 +-- gstreamer-allocators/src/auto/constants.rs | 2 - gstreamer-allocators/src/auto/mod.rs | 12 - gstreamer-allocators/src/lib.rs | 12 - gstreamer-allocators/sys/Cargo.toml | 14 +- gstreamer-allocators/sys/Gir.toml | 5 +- gstreamer-allocators/sys/src/lib.rs | 8 - gstreamer-app/Cargo.toml | 5 +- gstreamer-app/Gir.toml | 2 +- gstreamer-app/README.md | 29 +-- gstreamer-app/src/app_sink.rs | 11 - gstreamer-app/src/app_src.rs | 2 - gstreamer-app/src/auto/app_sink.rs | 8 - gstreamer-app/src/auto/app_src.rs | 6 - gstreamer-app/sys/Cargo.toml | 14 +- gstreamer-app/sys/Gir.toml | 5 +- gstreamer-app/sys/src/lib.rs | 14 - gstreamer-audio/Cargo.toml | 5 +- gstreamer-audio/Gir.toml | 19 +- gstreamer-audio/README.md | 29 +-- gstreamer-audio/src/audio_aggregator.rs | 6 +- gstreamer-audio/src/audio_converter.rs | 4 - gstreamer-audio/src/audio_stream_align.rs | 2 - gstreamer-audio/src/auto/audio_decoder.rs | 4 - gstreamer-audio/src/auto/audio_encoder.rs | 4 - gstreamer-audio/src/auto/enums.rs | 26 -- gstreamer-audio/src/auto/mod.rs | 24 -- gstreamer-audio/src/lib.rs | 16 -- gstreamer-audio/src/subclass/mod.rs | 12 - gstreamer-audio/sys/Cargo.toml | 14 +- gstreamer-audio/sys/Gir.toml | 12 +- gstreamer-audio/sys/src/lib.rs | 78 ------ gstreamer-base/Cargo.toml | 6 +- gstreamer-base/Gir.toml | 6 +- gstreamer-base/README.md | 29 +-- gstreamer-base/src/adapter.rs | 10 - gstreamer-base/src/auto/adapter.rs | 10 - gstreamer-base/src/auto/aggregator.rs | 4 - gstreamer-base/src/auto/base_parse.rs | 4 - gstreamer-base/src/auto/base_sink.rs | 8 - gstreamer-base/src/auto/mod.rs | 12 - gstreamer-base/src/lib.rs | 8 - gstreamer-base/src/subclass/mod.rs | 8 - gstreamer-base/sys/Cargo.toml | 18 +- gstreamer-base/sys/Gir.toml | 5 +- gstreamer-base/sys/src/lib.rs | 56 ---- gstreamer-check/Cargo.toml | 5 +- gstreamer-check/Gir.toml | 2 +- gstreamer-check/README.md | 29 +-- gstreamer-check/src/harness.rs | 4 - gstreamer-check/sys/Cargo.toml | 14 +- gstreamer-check/sys/Gir.toml | 5 +- gstreamer-check/sys/src/lib.rs | 6 - gstreamer-controller/Cargo.toml | 5 +- gstreamer-controller/Gir.toml | 8 +- gstreamer-controller/README.md | 29 +-- gstreamer-controller/src/auto/mod.rs | 4 - gstreamer-controller/sys/Cargo.toml | 14 +- gstreamer-controller/sys/Gir.toml | 5 +- gstreamer-controller/sys/src/lib.rs | 2 - gstreamer-editing-services/Cargo.toml | 5 +- gstreamer-editing-services/Gir.toml | 2 +- gstreamer-editing-services/README.md | 29 +-- .../src/auto/command_line_formatter.rs | 10 - .../src/auto/timeline_element.rs | 4 +- gstreamer-editing-services/sys/Cargo.toml | 14 +- gstreamer-editing-services/sys/Gir.toml | 5 +- gstreamer-editing-services/sys/src/lib.rs | 4 - gstreamer-gl/Cargo.toml | 6 +- gstreamer-gl/README.md | 34 ++- gstreamer-gl/egl/Cargo.toml | 2 +- gstreamer-gl/egl/README.md | 34 ++- gstreamer-gl/sys/Cargo.toml | 3 - gstreamer-gl/wayland/Cargo.toml | 2 +- gstreamer-gl/wayland/README.md | 34 ++- gstreamer-gl/x11/Cargo.toml | 2 +- gstreamer-gl/x11/README.md | 34 ++- gstreamer-mpegts/sys/Cargo.toml | 6 +- gstreamer-mpegts/sys/Gir.toml | 3 +- gstreamer-net/Cargo.toml | 5 +- gstreamer-net/Gir.toml | 22 +- gstreamer-net/README.md | 29 +-- gstreamer-net/src/auto/net_client_clock.rs | 20 ++ gstreamer-net/src/auto/net_time_provider.rs | 13 + gstreamer-net/src/auto/ntp_clock.rs | 23 +- gstreamer-net/src/auto/ptp_clock.rs | 10 + gstreamer-net/src/lib.rs | 4 - gstreamer-net/src/net_client_clock.rs | 42 --- gstreamer-net/src/net_time_provider.rs | 34 --- gstreamer-net/src/ntp_clock.rs | 42 --- gstreamer-net/src/ptp_clock.rs | 25 -- gstreamer-net/sys/Cargo.toml | 14 +- gstreamer-net/sys/Gir.toml | 5 +- gstreamer-pbutils/Cargo.toml | 5 +- gstreamer-pbutils/Gir.toml | 2 +- gstreamer-pbutils/README.md | 29 +-- .../src/auto/discoverer_audio_info.rs | 2 - gstreamer-pbutils/src/auto/discoverer_info.rs | 2 - .../src/auto/encoding_profile.rs | 4 - gstreamer-pbutils/src/auto/functions.rs | 4 - gstreamer-pbutils/sys/Cargo.toml | 18 +- gstreamer-pbutils/sys/Gir.toml | 5 +- gstreamer-pbutils/sys/src/lib.rs | 12 - gstreamer-player/Cargo.toml | 7 +- gstreamer-player/Gir.toml | 6 +- gstreamer-player/README.md | 29 +-- gstreamer-player/src/auto/player.rs | 16 ++ gstreamer-player/src/player.rs | 21 -- gstreamer-player/sys/Cargo.toml | 8 +- gstreamer-player/sys/Gir.toml | 3 +- gstreamer-rtp/Cargo.toml | 5 +- gstreamer-rtp/Gir.toml | 2 +- gstreamer-rtp/README.md | 29 +-- gstreamer-rtp/src/auto/flags.rs | 14 - gstreamer-rtp/src/auto/mod.rs | 2 - gstreamer-rtp/sys/Cargo.toml | 14 +- gstreamer-rtp/sys/Gir.toml | 5 +- gstreamer-rtp/sys/src/lib.rs | 28 -- gstreamer-rtsp-server/Cargo.toml | 5 +- gstreamer-rtsp-server/Gir.toml | 2 +- gstreamer-rtsp-server/README.md | 29 +-- gstreamer-rtsp-server/src/auto/mod.rs | 20 -- gstreamer-rtsp-server/src/auto/rtsp_auth.rs | 16 -- gstreamer-rtsp-server/src/auto/rtsp_client.rs | 40 --- gstreamer-rtsp-server/src/auto/rtsp_media.rs | 8 - .../src/auto/rtsp_onvif_media_factory.rs | 2 - .../src/auto/rtsp_session_media.rs | 4 - gstreamer-rtsp-server/src/auto/rtsp_stream.rs | 24 -- gstreamer-rtsp-server/src/lib.rs | 4 - .../src/rtsp_media_factory.rs | 6 - gstreamer-rtsp-server/src/subclass/mod.rs | 16 -- gstreamer-rtsp-server/sys/Cargo.toml | 14 +- gstreamer-rtsp-server/sys/Gir.toml | 5 +- gstreamer-rtsp-server/sys/src/lib.rs | 70 ----- gstreamer-rtsp/Cargo.toml | 5 +- gstreamer-rtsp/Gir.toml | 2 +- gstreamer-rtsp/README.md | 29 +-- gstreamer-rtsp/src/auto/mod.rs | 4 - gstreamer-rtsp/sys/Cargo.toml | 14 +- gstreamer-rtsp/sys/Gir.toml | 5 +- gstreamer-rtsp/sys/src/lib.rs | 22 -- gstreamer-sdp/Cargo.toml | 6 +- gstreamer-sdp/Gir.toml | 2 +- gstreamer-sdp/README.md | 29 +-- gstreamer-sdp/sys/Cargo.toml | 18 +- gstreamer-sdp/sys/Gir.toml | 5 +- gstreamer-sdp/sys/src/lib.rs | 6 - gstreamer-tag/sys/Cargo.toml | 14 +- gstreamer-tag/sys/Gir.toml | 5 +- gstreamer-video/Cargo.toml | 5 +- gstreamer-video/Gir.toml | 82 +----- gstreamer-video/README.md | 29 +-- gstreamer-video/src/auto/enums.rs | 112 -------- gstreamer-video/src/auto/flags.rs | 6 - gstreamer-video/src/auto/mod.rs | 6 - gstreamer-video/src/auto/video_encoder.rs | 14 - gstreamer-video/src/auto/video_overlay.rs | 2 - gstreamer-video/src/lib.rs | 8 - gstreamer-video/src/video_decoder.rs | 6 +- gstreamer-video/src/video_encoder.rs | 4 - gstreamer-video/src/video_format.rs | 40 --- gstreamer-video/src/video_info.rs | 147 ++--------- gstreamer-video/src/video_message.rs | 7 - gstreamer-video/src/video_meta.rs | 21 +- gstreamer-video/src/video_time_code.rs | 8 - gstreamer-video/sys/Cargo.toml | 14 +- gstreamer-video/sys/Gir.toml | 8 +- gstreamer-video/sys/src/lib.rs | 86 ------- gstreamer-webrtc/Cargo.toml | 4 +- gstreamer-webrtc/README.md | 29 +-- gstreamer-webrtc/sys/Cargo.toml | 1 - gstreamer/Cargo.toml | 6 +- gstreamer/Gir.toml | 65 +---- gstreamer/README.md | 4 +- gstreamer/src/auto/bin.rs | 18 -- gstreamer/src/auto/buffer_pool.rs | 12 + gstreamer/src/auto/bus.rs | 2 - gstreamer/src/auto/device_monitor.rs | 12 + gstreamer/src/auto/element.rs | 12 - gstreamer/src/auto/enums.rs | 40 +-- gstreamer/src/auto/flags.rs | 44 ---- gstreamer/src/auto/functions.rs | 12 - gstreamer/src/auto/mod.rs | 14 - gstreamer/src/auto/pad.rs | 20 -- gstreamer/src/auto/pad_template.rs | 4 - gstreamer/src/auto/stream.rs | 26 +- gstreamer/src/auto/tracer_factory.rs | 4 - gstreamer/src/buffer.rs | 4 - gstreamer/src/buffer_pool.rs | 20 -- gstreamer/src/bufferlist.rs | 4 - gstreamer/src/device_monitor.rs | 20 -- gstreamer/src/element.rs | 31 --- gstreamer/src/enums.rs | 34 --- gstreamer/src/event.rs | 50 ---- gstreamer/src/functions.rs | 3 - gstreamer/src/lib.rs | 24 +- gstreamer/src/message.rs | 165 +++--------- gstreamer/src/meta.rs | 18 -- gstreamer/src/pad_template.rs | 6 - gstreamer/src/param_spec.rs | 18 -- gstreamer/src/stream.rs | 38 --- gstreamer/src/stream_collection.rs | 8 +- gstreamer/src/subclass/mod.rs | 7 - .../subclass/{plugin_1_14.rs => plugin.rs} | 2 +- gstreamer/src/subclass/plugin_1_12.rs | 113 -------- gstreamer/src/tracer_factory.rs | 4 - gstreamer/sys/Cargo.toml | 18 +- gstreamer/sys/Gir.toml | 15 +- gstreamer/sys/src/lib.rs | 242 ------------------ 216 files changed, 604 insertions(+), 3311 deletions(-) delete mode 100644 gstreamer-net/src/net_client_clock.rs delete mode 100644 gstreamer-net/src/net_time_provider.rs delete mode 100644 gstreamer-net/src/ntp_clock.rs delete mode 100644 gstreamer-net/src/ptp_clock.rs rename gstreamer/src/subclass/{plugin_1_14.rs => plugin.rs} (99%) delete mode 100644 gstreamer/src/subclass/plugin_1_12.rs diff --git a/README.md b/README.md index 271716d8f..781db2db5 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/examples/Cargo.toml b/examples/Cargo.toml index e360e9b06..cd7930aed 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -55,8 +55,6 @@ gtkvideooverlay-x11 = ["gtkvideooverlay"] gtkvideooverlay-quartz = ["gtkvideooverlay"] rtsp-server = ["gst-rtsp-server", "gst-rtsp", "gst-sdp"] rtsp-server-record = ["gst-rtsp-server", "gst-rtsp", "gio"] -v1_10 = ["gst/v1_10"] -v1_14 = ["gst/v1_14"] pango-cairo = ["pango", "pangocairo", "cairo-rs"] overlay-composition = ["pango", "pangocairo", "cairo-rs"] gl = ["gst-gl", "gl_generator", "glutin"] @@ -70,7 +68,6 @@ name = "appsrc" [[bin]] name = "custom_events" -required-features = ["v1_10"] [[bin]] name = "custom_meta" @@ -80,7 +77,6 @@ name = "decodebin" [[bin]] name = "debug_ringbuffer" -required-features = ["v1_14"] [[bin]] name = "encodebin" diff --git a/examples/src/bin/decodebin.rs b/examples/src/bin/decodebin.rs index af2de11f9..328aafe84 100644 --- a/examples/src/bin/decodebin.rs +++ b/examples/src/bin/decodebin.rs @@ -34,7 +34,6 @@ use gst::element_warning; use gst::prelude::*; use std::env; -#[cfg(feature = "v1_10")] use std::sync::{Arc, Mutex}; use anyhow::Error; @@ -56,7 +55,6 @@ struct ErrorMessage { source: glib::Error, } -#[cfg(feature = "v1_10")] #[derive(Clone, Debug, glib::Boxed)] #[boxed_type(name = "ErrorValue")] struct ErrorValue(Arc>>); @@ -202,7 +200,6 @@ fn example_main() -> Result<(), Error> { if let Err(err) = insert_sink(is_audio, is_video) { // The following sends a message of type Error on the bus, containing our detailed // error information. - #[cfg(feature = "v1_10")] element_error!( dbin, gst::LibraryError::Failed, @@ -212,14 +209,6 @@ fn example_main() -> Result<(), Error> { &ErrorValue(Arc::new(Mutex::new(Some(err))))) .build() ); - - #[cfg(not(feature = "v1_10"))] - element_error!( - dbin, - gst::LibraryError::Failed, - ("Failed to insert sink"), - ["{}", err] - ); } }); @@ -241,39 +230,23 @@ fn example_main() -> Result<(), Error> { MessageView::Error(err) => { pipeline.set_state(gst::State::Null)?; - #[cfg(feature = "v1_10")] - { - match err.details() { - // This bus-message of type error contained our custom error-details struct - // that we sent in the pad-added callback above. So we unpack it and log - // the detailed error information here. details contains a glib::SendValue. - // The unpacked error is the converted to a Result::Err, stopping the - // application's execution. - Some(details) if details.name() == "error-details" => details - .get::<&ErrorValue>("error") - .unwrap() - .clone() - .0 - .lock() - .unwrap() - .take() - .map(Result::Err) - .expect("error-details message without actual error"), - _ => Err(ErrorMessage { - src: msg - .src() - .map(|s| String::from(s.path_string())) - .unwrap_or_else(|| String::from("None")), - error: err.error().to_string(), - debug: err.debug(), - source: err.error(), - } - .into()), - }?; - } - #[cfg(not(feature = "v1_10"))] - { - return Err(ErrorMessage { + match err.details() { + // This bus-message of type error contained our custom error-details struct + // that we sent in the pad-added callback above. So we unpack it and log + // the detailed error information here. details contains a glib::SendValue. + // The unpacked error is the converted to a Result::Err, stopping the + // application's execution. + Some(details) if details.name() == "error-details" => details + .get::<&ErrorValue>("error") + .unwrap() + .clone() + .0 + .lock() + .unwrap() + .take() + .map(Result::Err) + .expect("error-details message without actual error"), + _ => Err(ErrorMessage { src: msg .src() .map(|s| String::from(s.path_string())) @@ -282,8 +255,8 @@ fn example_main() -> Result<(), Error> { debug: err.debug(), source: err.error(), } - .into()); - } + .into()), + }?; } MessageView::StateChanged(s) => { println!( diff --git a/examples/src/bin/encodebin.rs b/examples/src/bin/encodebin.rs index a404457d5..5db2cc527 100644 --- a/examples/src/bin/encodebin.rs +++ b/examples/src/bin/encodebin.rs @@ -18,7 +18,6 @@ use gst::element_warning; use gst_pbutils::prelude::*; use std::env; -#[cfg(feature = "v1_10")] use std::sync::{Arc, Mutex}; use anyhow::Error; @@ -40,7 +39,6 @@ struct ErrorMessage { source: glib::Error, } -#[cfg(feature = "v1_10")] #[derive(Clone, Debug, glib::Boxed)] #[boxed_type(name = "ErrorValue")] struct ErrorValue(Arc>>); @@ -226,7 +224,6 @@ fn example_main() -> Result<(), Error> { }; if let Err(err) = link_to_encodebin(is_audio, is_video) { - #[cfg(feature = "v1_10")] element_error!( dbin, gst::LibraryError::Failed, @@ -236,14 +233,6 @@ fn example_main() -> Result<(), Error> { &ErrorValue(Arc::new(Mutex::new(Some(err))))) .build() ); - - #[cfg(not(feature = "v1_10"))] - element_error!( - dbin, - gst::LibraryError::Failed, - ("Failed to insert sink"), - ["{}", err] - ); } }); @@ -261,34 +250,18 @@ fn example_main() -> Result<(), Error> { MessageView::Error(err) => { pipeline.set_state(gst::State::Null)?; - #[cfg(feature = "v1_10")] - { - match err.details() { - Some(details) if details.name() == "error-details" => details - .get::<&ErrorValue>("error") - .unwrap() - .clone() - .0 - .lock() - .unwrap() - .take() - .map(Result::Err) - .expect("error-details message without actual error"), - _ => Err(ErrorMessage { - src: msg - .src() - .map(|s| String::from(s.path_string())) - .unwrap_or_else(|| String::from("None")), - error: err.error().to_string(), - debug: err.debug(), - source: err.error(), - } - .into()), - }?; - } - #[cfg(not(feature = "v1_10"))] - { - return Err(ErrorMessage { + match err.details() { + Some(details) if details.name() == "error-details" => details + .get::<&ErrorValue>("error") + .unwrap() + .clone() + .0 + .lock() + .unwrap() + .take() + .map(Result::Err) + .expect("error-details message without actual error"), + _ => Err(ErrorMessage { src: msg .src() .map(|s| String::from(s.path_string())) @@ -297,8 +270,8 @@ fn example_main() -> Result<(), Error> { debug: err.debug(), source: err.error(), } - .into()); - } + .into()), + }?; } MessageView::StateChanged(s) => { println!( diff --git a/examples/src/bin/player.rs b/examples/src/bin/player.rs index fce0da2ea..6974f686e 100644 --- a/examples/src/bin/player.rs +++ b/examples/src/bin/player.rs @@ -23,7 +23,7 @@ fn main_loop(uri: &str) -> Result<(), Error> { let dispatcher = gst_player::PlayerGMainContextSignalDispatcher::new(None); let player = gst_player::Player::new( - None, + gst_player::PlayerVideoRenderer::NONE, Some(&dispatcher.upcast::()), ); diff --git a/gstreamer-allocators/Cargo.toml b/gstreamer-allocators/Cargo.toml index 2639722ae..d9b61f7d1 100644 --- a/gstreamer-allocators/Cargo.toml +++ b/gstreamer-allocators/Cargo.toml @@ -26,10 +26,7 @@ gir-format-check = "0.1" [features] default = [] -v1_10 = ["gst/v1_10", "ffi/v1_10"] -v1_12 = ["gst/v1_12", "ffi/v1_12", "v1_10"] -v1_14 = ["gst/v1_14", "ffi/v1_14", "v1_12"] -v1_16 = ["gst/v1_16", "ffi/v1_16", "v1_14"] +v1_16 = ["gst/v1_16", "ffi/v1_16"] v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] diff --git a/gstreamer-allocators/Gir.toml b/gstreamer-allocators/Gir.toml index 0586dc2e5..ea9d9644d 100644 --- a/gstreamer-allocators/Gir.toml +++ b/gstreamer-allocators/Gir.toml @@ -4,7 +4,7 @@ generate_display_trait = false generate_safety_asserts = true girs_directories = ["../gir-files", "../gst-gir-files"] library = "GstAllocators" -min_cfg_version = "1.8" +min_cfg_version = "1.14" single_version_file = true trust_return_value_nullability = true version = "1.0" @@ -69,4 +69,4 @@ name = "GstAllocators.FdAllocator" status = "generate" [[object.function]] name = "alloc" - manual = true \ No newline at end of file + manual = true diff --git a/gstreamer-allocators/README.md b/gstreamer-allocators/README.md index 2d539211a..f5bcaa0a3 100644 --- a/gstreamer-allocators/README.md +++ b/gstreamer-allocators/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-allocators/src/auto/constants.rs b/gstreamer-allocators/src/auto/constants.rs index 86b3b67aa..397644930 100644 --- a/gstreamer-allocators/src/auto/constants.rs +++ b/gstreamer-allocators/src/auto/constants.rs @@ -15,8 +15,6 @@ pub static ALLOCATOR_FD: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(ffi::GST_ALLOCATOR_FD).to_str().unwrap() }); -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_CAPS_FEATURE_MEMORY_DMABUF")] pub static CAPS_FEATURE_MEMORY_DMABUF: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { diff --git a/gstreamer-allocators/src/auto/mod.rs b/gstreamer-allocators/src/auto/mod.rs index 262245900..6400cb9b3 100644 --- a/gstreamer-allocators/src/auto/mod.rs +++ b/gstreamer-allocators/src/auto/mod.rs @@ -5,23 +5,15 @@ #[cfg(any(target_os = "linux", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(target_os = "linux")))] -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] mod dma_buf_allocator; #[cfg(any(target_os = "linux", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(target_os = "linux")))] -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub use self::dma_buf_allocator::DmaBufAllocator; mod fd_allocator; pub use self::fd_allocator::FdAllocator; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod phys_memory_allocator; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use self::phys_memory_allocator::PhysMemoryAllocator; mod flags; @@ -32,13 +24,9 @@ pub mod functions; mod constants; pub use self::constants::ALLOCATOR_DMABUF; pub use self::constants::ALLOCATOR_FD; -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub use self::constants::CAPS_FEATURE_MEMORY_DMABUF; #[doc(hidden)] pub mod traits { - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::phys_memory_allocator::PhysMemoryAllocatorExt; } diff --git a/gstreamer-allocators/src/lib.rs b/gstreamer-allocators/src/lib.rs index a92ad6747..9feae2a5d 100644 --- a/gstreamer-allocators/src/lib.rs +++ b/gstreamer-allocators/src/lib.rs @@ -38,11 +38,7 @@ macro_rules! skip_assert_initialized { mod auto; pub use crate::auto::*; -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] mod caps_features; -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub use crate::caps_features::CAPS_FEATURES_MEMORY_DMABUF; mod fd_allocator; @@ -50,20 +46,12 @@ pub use fd_allocator::*; #[cfg(any(target_os = "linux", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(target_os = "linux")))] -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] mod dma_buf_allocator; #[cfg(any(target_os = "linux", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(target_os = "linux")))] -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub use dma_buf_allocator::*; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod phys_memory; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use phys_memory::*; // Re-export all the traits in a prelude module, so that applications diff --git a/gstreamer-allocators/sys/Cargo.toml b/gstreamer-allocators/sys/Cargo.toml index 1f674e9f0..379628a6b 100644 --- a/gstreamer-allocators/sys/Cargo.toml +++ b/gstreamer-allocators/sys/Cargo.toml @@ -22,10 +22,7 @@ tempfile = "3" [features] dox = [] -v1_10 = [] -v1_12 = ["v1_10"] -v1_14 = ["v1_12"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -51,15 +48,6 @@ version = "0.19.0" features = ["dox"] [package.metadata.system-deps.gstreamer_allocators_1_0] name = "gstreamer-allocators-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_allocators_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_allocators_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_allocators_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_allocators_1_0.v1_16] diff --git a/gstreamer-allocators/sys/Gir.toml b/gstreamer-allocators/sys/Gir.toml index 776b96700..1d06cc7ac 100644 --- a/gstreamer-allocators/sys/Gir.toml +++ b/gstreamer-allocators/sys/Gir.toml @@ -2,16 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstAllocators" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] external_libraries = [ diff --git a/gstreamer-allocators/sys/src/lib.rs b/gstreamer-allocators/sys/src/lib.rs index 0fb72346d..2591bd053 100644 --- a/gstreamer-allocators/sys/src/lib.rs +++ b/gstreamer-allocators/sys/src/lib.rs @@ -129,8 +129,6 @@ extern "C" { //========================================================================= // GstDmaBufAllocator //========================================================================= - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_dmabuf_allocator_get_type() -> GType; pub fn gst_dmabuf_allocator_new() -> *mut gst::GstAllocator; pub fn gst_dmabuf_allocator_alloc( @@ -162,8 +160,6 @@ extern "C" { //========================================================================= // GstPhysMemoryAllocator //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_phys_memory_allocator_get_type() -> GType; //========================================================================= @@ -173,11 +169,7 @@ extern "C" { pub fn gst_fd_memory_get_fd(mem: *mut gst::GstMemory) -> c_int; pub fn gst_is_dmabuf_memory(mem: *mut gst::GstMemory) -> gboolean; pub fn gst_is_fd_memory(mem: *mut gst::GstMemory) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_is_phys_memory(mem: *mut gst::GstMemory) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_phys_memory_get_phys_addr(mem: *mut gst::GstMemory) -> uintptr_t; } diff --git a/gstreamer-app/Cargo.toml b/gstreamer-app/Cargo.toml index 17b9bacfc..1dbb8c51d 100644 --- a/gstreamer-app/Cargo.toml +++ b/gstreamer-app/Cargo.toml @@ -31,10 +31,7 @@ gir-format-check = "0.1" [features] default = [] -v1_10 = ["gst/v1_10", "gst-base/v1_10", "ffi/v1_10"] -v1_12 = ["gst/v1_12", "gst-base/v1_12", "ffi/v1_12", "v1_10"] -v1_14 = ["gst/v1_14", "gst-base/v1_14", "ffi/v1_14", "v1_12"] -v1_16 = ["gst/v1_16", "gst-base/v1_16", "ffi/v1_16", "v1_14"] +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_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"] diff --git a/gstreamer-app/Gir.toml b/gstreamer-app/Gir.toml index a3576dfc4..440379423 100644 --- a/gstreamer-app/Gir.toml +++ b/gstreamer-app/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "GstApp" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true diff --git a/gstreamer-app/README.md b/gstreamer-app/README.md index 6b07c9ed7..b13b5356e 100644 --- a/gstreamer-app/README.md +++ b/gstreamer-app/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-app/src/app_sink.rs b/gstreamer-app/src/app_sink.rs index 1d00f6495..ad5a79a49 100644 --- a/gstreamer-app/src/app_sink.rs +++ b/gstreamer-app/src/app_sink.rs @@ -9,7 +9,6 @@ use std::panic; use std::ptr; use std::sync::atomic::{AtomicBool, Ordering}; -#[cfg(any(feature = "v1_10"))] use { futures_core::Stream, std::{ @@ -307,8 +306,6 @@ impl AppSink { } #[doc(alias = "drop-out-of-segment")] - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn drops_out_of_segment(&self) -> bool { unsafe { from_glib(gst_base::ffi::gst_base_sink_get_drop_out_of_segment( @@ -442,8 +439,6 @@ impl AppSink { } #[doc(alias = "drop-out-of-segment")] - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_base_sink_set_drop_out_of_segment")] pub fn set_drop_out_of_segment(&self, drop_out_of_segment: bool) { unsafe { @@ -914,20 +909,17 @@ impl AppSink { } } - #[cfg(any(feature = "v1_10"))] pub fn stream(&self) -> AppSinkStream { AppSinkStream::new(self) } } -#[cfg(any(feature = "v1_10"))] #[derive(Debug)] pub struct AppSinkStream { app_sink: glib::WeakRef, waker_reference: Arc>>, } -#[cfg(any(feature = "v1_10"))] impl AppSinkStream { fn new(app_sink: &AppSink) -> Self { skip_assert_initialized!(); @@ -966,7 +958,6 @@ impl AppSinkStream { } } -#[cfg(any(feature = "v1_10"))] impl Drop for AppSinkStream { fn drop(&mut self) { // This is not thread-safe before 1.16.3, see @@ -979,7 +970,6 @@ impl Drop for AppSinkStream { } } -#[cfg(any(feature = "v1_10"))] impl Stream for AppSinkStream { type Item = gst::Sample; @@ -1006,7 +996,6 @@ impl Stream for AppSinkStream { } } -#[cfg(any(feature = "v1_10"))] #[cfg(test)] mod tests { use super::*; diff --git a/gstreamer-app/src/app_src.rs b/gstreamer-app/src/app_src.rs index 563aa344b..b487aa760 100644 --- a/gstreamer-app/src/app_src.rs +++ b/gstreamer-app/src/app_src.rs @@ -215,8 +215,6 @@ impl AppSrc { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_app_src_push_buffer_list")] pub fn push_buffer_list( &self, diff --git a/gstreamer-app/src/auto/app_sink.rs b/gstreamer-app/src/auto/app_sink.rs index 561daa5dd..46c783b68 100644 --- a/gstreamer-app/src/auto/app_sink.rs +++ b/gstreamer-app/src/auto/app_sink.rs @@ -22,8 +22,6 @@ glib::wrapper! { } impl AppSink { - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_app_sink_get_buffer_list_support")] #[doc(alias = "get_buffer_list_support")] pub fn is_buffer_list_support(&self) -> bool { @@ -89,8 +87,6 @@ impl AppSink { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_app_sink_set_buffer_list_support")] pub fn set_buffer_list_support(&self, enable_lists: bool) { unsafe { @@ -149,8 +145,6 @@ impl AppSink { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_app_sink_try_pull_preroll")] pub fn try_pull_preroll( &self, @@ -164,8 +158,6 @@ impl AppSink { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_app_sink_try_pull_sample")] pub fn try_pull_sample( &self, diff --git a/gstreamer-app/src/auto/app_src.rs b/gstreamer-app/src/auto/app_src.rs index d787ff059..a45ee015c 100644 --- a/gstreamer-app/src/auto/app_src.rs +++ b/gstreamer-app/src/auto/app_src.rs @@ -63,8 +63,6 @@ impl AppSrc { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_app_src_get_duration")] #[doc(alias = "get_duration")] pub fn duration(&self) -> Option { @@ -135,8 +133,6 @@ impl AppSrc { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_app_src_set_duration")] pub fn set_duration(&self, duration: impl Into>) { unsafe { @@ -402,8 +398,6 @@ impl AppSrc { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "duration")] pub fn connect_duration_notify( &self, diff --git a/gstreamer-app/sys/Cargo.toml b/gstreamer-app/sys/Cargo.toml index fe04ff482..c479b968e 100644 --- a/gstreamer-app/sys/Cargo.toml +++ b/gstreamer-app/sys/Cargo.toml @@ -21,10 +21,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_10 = [] -v1_12 = ["v1_10"] -v1_14 = ["v1_12"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -51,15 +48,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_app_1_0] name = "gstreamer-app-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_app_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_app_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_app_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_app_1_0.v1_16] diff --git a/gstreamer-app/sys/Gir.toml b/gstreamer-app/sys/Gir.toml index d73a95ade..0d5dad210 100644 --- a/gstreamer-app/sys/Gir.toml +++ b/gstreamer-app/sys/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstApp" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" external_libraries = [ @@ -13,9 +13,6 @@ extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] [external_libraries] diff --git a/gstreamer-app/sys/src/lib.rs b/gstreamer-app/sys/src/lib.rs index 65b8e9019..37c20705a 100644 --- a/gstreamer-app/sys/src/lib.rs +++ b/gstreamer-app/sys/src/lib.rs @@ -207,8 +207,6 @@ extern "C" { // GstAppSink //========================================================================= pub fn gst_app_sink_get_type() -> GType; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_app_sink_get_buffer_list_support(appsink: *mut GstAppSink) -> gboolean; pub fn gst_app_sink_get_caps(appsink: *mut GstAppSink) -> *mut gst::GstCaps; pub fn gst_app_sink_get_drop(appsink: *mut GstAppSink) -> gboolean; @@ -221,8 +219,6 @@ extern "C" { pub fn gst_app_sink_pull_object(appsink: *mut GstAppSink) -> *mut gst::GstMiniObject; pub fn gst_app_sink_pull_preroll(appsink: *mut GstAppSink) -> *mut gst::GstSample; pub fn gst_app_sink_pull_sample(appsink: *mut GstAppSink) -> *mut gst::GstSample; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_app_sink_set_buffer_list_support(appsink: *mut GstAppSink, enable_lists: gboolean); pub fn gst_app_sink_set_callbacks( appsink: *mut GstAppSink, @@ -241,14 +237,10 @@ extern "C" { appsink: *mut GstAppSink, timeout: gst::GstClockTime, ) -> *mut gst::GstMiniObject; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_app_sink_try_pull_preroll( appsink: *mut GstAppSink, timeout: gst::GstClockTime, ) -> *mut gst::GstSample; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_app_sink_try_pull_sample( appsink: *mut GstAppSink, timeout: gst::GstClockTime, @@ -267,8 +259,6 @@ extern "C" { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] pub fn gst_app_src_get_current_level_time(appsrc: *mut GstAppSrc) -> gst::GstClockTime; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_app_src_get_duration(appsrc: *mut GstAppSrc) -> gst::GstClockTime; pub fn gst_app_src_get_emit_signals(appsrc: *mut GstAppSrc) -> gboolean; pub fn gst_app_src_get_latency(appsrc: *mut GstAppSrc, min: *mut u64, max: *mut u64); @@ -288,8 +278,6 @@ extern "C" { appsrc: *mut GstAppSrc, buffer: *mut gst::GstBuffer, ) -> gst::GstFlowReturn; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_app_src_push_buffer_list( appsrc: *mut GstAppSrc, buffer_list: *mut gst::GstBufferList, @@ -305,8 +293,6 @@ extern "C" { notify: glib::GDestroyNotify, ); pub fn gst_app_src_set_caps(appsrc: *mut GstAppSrc, caps: *const gst::GstCaps); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_app_src_set_duration(appsrc: *mut GstAppSrc, duration: gst::GstClockTime); pub fn gst_app_src_set_emit_signals(appsrc: *mut GstAppSrc, emit: gboolean); pub fn gst_app_src_set_latency(appsrc: *mut GstAppSrc, min: u64, max: u64); diff --git a/gstreamer-audio/Cargo.toml b/gstreamer-audio/Cargo.toml index 290b3b6f4..99a6c5612 100644 --- a/gstreamer-audio/Cargo.toml +++ b/gstreamer-audio/Cargo.toml @@ -30,10 +30,7 @@ gir-format-check = "0.1" [features] default = [] -v1_10 = ["gst/v1_10", "gst-base/v1_10", "ffi/v1_10"] -v1_12 = ["gst/v1_12", "gst-base/v1_12", "ffi/v1_12", "v1_10"] -v1_14 = ["gst/v1_14", "gst-base/v1_14", "ffi/v1_14", "v1_12"] -v1_16 = ["gst/v1_16", "gst-base/v1_16", "ffi/v1_16", "v1_14"] +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_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"] diff --git a/gstreamer-audio/Gir.toml b/gstreamer-audio/Gir.toml index b319f3bcd..0231343b5 100644 --- a/gstreamer-audio/Gir.toml +++ b/gstreamer-audio/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "GstAudio" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true @@ -26,6 +26,7 @@ generate = [ "GstAudio.AudioLayout", "GstAudio.AudioNoiseShapingMethod", "GstAudio.AudioResamplerMethod", + "GstAudio.AudioRingBufferFormatType", "GstAudio.AudioSink", "GstAudio.AudioSrc", "GstAudio.StreamVolume", @@ -366,22 +367,6 @@ status = "generate" name = "none" ignore = true -[[object]] -name = "GstAudio.AudioRingBufferFormatType" -status = "generate" - - [[object.member]] - name = "mpeg2_aac_raw" - version = "1.12" - - [[object.member]] - name = "mpeg4_aac_raw" - version = "1.12" - - [[object.member]] - name = "flac" - version = "1.12" - [[object]] name = "GstAudio.AudioStreamAlign" status = "generate" diff --git a/gstreamer-audio/README.md b/gstreamer-audio/README.md index 40a3f9b36..1c88cb7ca 100644 --- a/gstreamer-audio/README.md +++ b/gstreamer-audio/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-audio/src/audio_aggregator.rs b/gstreamer-audio/src/audio_aggregator.rs index b9d5f73b8..145f92d4b 100644 --- a/gstreamer-audio/src/audio_aggregator.rs +++ b/gstreamer-audio/src/audio_aggregator.rs @@ -1,9 +1,13 @@ use crate::auto::AudioAggregator; use crate::auto::AudioAggregatorPad; -use glib::object::{Cast, IsA}; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use glib::object::Cast; +use glib::object::IsA; +#[cfg(any(feature = "v1_18", feature = "dox"))] use glib::signal::{connect_raw, SignalHandlerId}; use glib::translate::*; +#[cfg(any(feature = "v1_18", feature = "dox"))] use std::mem::transmute; pub trait AudioAggregatorExtManual: 'static { diff --git a/gstreamer-audio/src/audio_converter.rs b/gstreamer-audio/src/audio_converter.rs index a451674a9..04d2546e5 100644 --- a/gstreamer-audio/src/audio_converter.rs +++ b/gstreamer-audio/src/audio_converter.rs @@ -109,14 +109,10 @@ impl AudioConverterConfig { .unwrap_or(1) } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn set_resampler_method(&mut self, v: crate::AudioResamplerMethod) { self.0.set("GstAudioConverter.resampler-method", &v); } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "get_resampler_method")] pub fn resampler_method(&self) -> crate::AudioResamplerMethod { self.0 diff --git a/gstreamer-audio/src/audio_stream_align.rs b/gstreamer-audio/src/audio_stream_align.rs index 02f823299..a4d7b5898 100644 --- a/gstreamer-audio/src/audio_stream_align.rs +++ b/gstreamer-audio/src/audio_stream_align.rs @@ -6,8 +6,6 @@ use glib::translate::*; use std::mem; impl AudioStreamAlign { - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_audio_stream_align_process")] pub fn process( &mut self, diff --git a/gstreamer-audio/src/auto/audio_decoder.rs b/gstreamer-audio/src/auto/audio_decoder.rs index 66be663a8..c14572c85 100644 --- a/gstreamer-audio/src/auto/audio_decoder.rs +++ b/gstreamer-audio/src/auto/audio_decoder.rs @@ -87,8 +87,6 @@ pub trait AudioDecoderExt: 'static { #[doc(alias = "gst_audio_decoder_proxy_getcaps")] fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_audio_decoder_set_allocation_caps")] fn set_allocation_caps(&self, allocation_caps: Option<&gst::Caps>); @@ -276,8 +274,6 @@ impl> AudioDecoderExt for O { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn set_allocation_caps(&self, allocation_caps: Option<&gst::Caps>) { unsafe { ffi::gst_audio_decoder_set_allocation_caps( diff --git a/gstreamer-audio/src/auto/audio_encoder.rs b/gstreamer-audio/src/auto/audio_encoder.rs index 7e0f06956..0989eaef6 100644 --- a/gstreamer-audio/src/auto/audio_encoder.rs +++ b/gstreamer-audio/src/auto/audio_encoder.rs @@ -87,8 +87,6 @@ pub trait AudioEncoderExt: 'static { #[doc(alias = "gst_audio_encoder_proxy_getcaps")] fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_audio_encoder_set_allocation_caps")] fn set_allocation_caps(&self, allocation_caps: Option<&gst::Caps>); @@ -275,8 +273,6 @@ impl> AudioEncoderExt for O { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn set_allocation_caps(&self, allocation_caps: Option<&gst::Caps>) { unsafe { ffi::gst_audio_encoder_set_allocation_caps( diff --git a/gstreamer-audio/src/auto/enums.rs b/gstreamer-audio/src/auto/enums.rs index af5a22ba4..c52901121 100644 --- a/gstreamer-audio/src/auto/enums.rs +++ b/gstreamer-audio/src/auto/enums.rs @@ -631,8 +631,6 @@ impl ToValue for AudioNoiseShapingMethod { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GstAudioResamplerMethod")] @@ -651,8 +649,6 @@ pub enum AudioResamplerMethod { __Unknown(i32), } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] impl IntoGlib for AudioResamplerMethod { type GlibType = ffi::GstAudioResamplerMethod; @@ -669,8 +665,6 @@ impl IntoGlib for AudioResamplerMethod { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] impl FromGlib for AudioResamplerMethod { unsafe fn from_glib(value: ffi::GstAudioResamplerMethod) -> Self { @@ -686,22 +680,16 @@ impl FromGlib for AudioResamplerMethod { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StaticType for AudioResamplerMethod { fn static_type() -> Type { unsafe { from_glib(ffi::gst_audio_resampler_method_get_type()) } } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl glib::value::ValueType for AudioResamplerMethod { type Type = Self; } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] unsafe impl<'a> FromValue<'a> for AudioResamplerMethod { type Checker = glib::value::GenericValueTypeChecker; @@ -711,8 +699,6 @@ unsafe impl<'a> FromValue<'a> for AudioResamplerMethod { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl ToValue for AudioResamplerMethod { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); @@ -755,16 +741,10 @@ pub enum AudioRingBufferFormatType { Mpeg2Aac, #[doc(alias = "GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC")] Mpeg4Aac, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC_RAW")] Mpeg2AacRaw, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC_RAW")] Mpeg4AacRaw, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_AUDIO_RING_BUFFER_FORMAT_TYPE_FLAC")] Flac, #[doc(hidden)] @@ -789,11 +769,8 @@ impl IntoGlib for AudioRingBufferFormatType { Self::Dts => ffi::GST_AUDIO_RING_BUFFER_FORMAT_TYPE_DTS, Self::Mpeg2Aac => ffi::GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC, Self::Mpeg4Aac => ffi::GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::Mpeg2AacRaw => ffi::GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC_RAW, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::Mpeg4AacRaw => ffi::GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC_RAW, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::Flac => ffi::GST_AUDIO_RING_BUFFER_FORMAT_TYPE_FLAC, Self::__Unknown(value) => value, } @@ -817,11 +794,8 @@ impl FromGlib for AudioRingBufferFormatType { ffi::GST_AUDIO_RING_BUFFER_FORMAT_TYPE_DTS => Self::Dts, ffi::GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC => Self::Mpeg2Aac, ffi::GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC => Self::Mpeg4Aac, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC_RAW => Self::Mpeg2AacRaw, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC_RAW => Self::Mpeg4AacRaw, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_AUDIO_RING_BUFFER_FORMAT_TYPE_FLAC => Self::Flac, value => Self::__Unknown(value), } diff --git a/gstreamer-audio/src/auto/mod.rs b/gstreamer-audio/src/auto/mod.rs index 42141df31..4f74aa40d 100644 --- a/gstreamer-audio/src/auto/mod.rs +++ b/gstreamer-audio/src/auto/mod.rs @@ -3,25 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod audio_aggregator; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use self::audio_aggregator::AudioAggregator; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod audio_aggregator_convert_pad; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use self::audio_aggregator_convert_pad::AudioAggregatorConvertPad; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod audio_aggregator_pad; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use self::audio_aggregator_pad::AudioAggregatorPad; mod audio_base_sink; @@ -45,11 +33,7 @@ pub use self::audio_src::AudioSrc; mod stream_volume; pub use self::stream_volume::StreamVolume; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod audio_stream_align; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use self::audio_stream_align::AudioStreamAlign; mod enums; @@ -58,8 +42,6 @@ pub use self::enums::AudioDitherMethod; pub use self::enums::AudioFormat; pub use self::enums::AudioLayout; pub use self::enums::AudioNoiseShapingMethod; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub use self::enums::AudioResamplerMethod; pub use self::enums::AudioRingBufferFormatType; pub use self::enums::StreamVolumeFormat; @@ -71,14 +53,8 @@ pub use self::flags::AudioPackFlags; #[doc(hidden)] pub mod traits { - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::audio_aggregator::AudioAggregatorExt; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::audio_aggregator_convert_pad::AudioAggregatorConvertPadExt; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::audio_aggregator_pad::AudioAggregatorPadExt; pub use super::audio_base_sink::AudioBaseSinkExt; pub use super::audio_base_src::AudioBaseSrcExt; diff --git a/gstreamer-audio/src/lib.rs b/gstreamer-audio/src/lib.rs index 0f8a078ec..3f77d9c4f 100644 --- a/gstreamer-audio/src/lib.rs +++ b/gstreamer-audio/src/lib.rs @@ -43,17 +43,9 @@ mod audio_meta; pub use crate::audio_meta::*; mod audio_channel_position; pub use crate::audio_channel_position::*; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod audio_aggregator; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod audio_aggregator_convert_pad; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod audio_aggregator_pad; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod audio_stream_align; mod functions; pub use crate::functions::*; @@ -70,8 +62,6 @@ mod audio_encoder; mod audio_converter; pub use crate::audio_converter::AudioConverterConfig; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod utils; // Re-export all the traits in a prelude module, so that applications @@ -82,14 +72,8 @@ pub mod prelude { pub use super::audio_decoder::AudioDecoderExtManual; pub use super::audio_encoder::AudioEncoderExtManual; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use crate::audio_aggregator::AudioAggregatorExtManual; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use crate::audio_aggregator_convert_pad::AudioAggregatorConvertPadExtManual; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use crate::audio_aggregator_pad::AudioAggregatorPadExtManual; pub use crate::audio_format::AudioFormatIteratorExt; diff --git a/gstreamer-audio/src/subclass/mod.rs b/gstreamer-audio/src/subclass/mod.rs index 482c11145..851d507bf 100644 --- a/gstreamer-audio/src/subclass/mod.rs +++ b/gstreamer-audio/src/subclass/mod.rs @@ -2,14 +2,8 @@ #![allow(clippy::cast_ptr_alignment)] -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod audio_aggregator; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod audio_aggregator_convert_pad; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod audio_aggregator_pad; mod audio_base_sink; mod audio_base_src; @@ -22,14 +16,8 @@ pub mod prelude { #[doc(hidden)] pub use gst_base::subclass::prelude::*; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::audio_aggregator::{AudioAggregatorImpl, AudioAggregatorImplExt}; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::audio_aggregator_convert_pad::AudioAggregatorConvertPadImpl; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::audio_aggregator_pad::{AudioAggregatorPadImpl, AudioAggregatorPadImplExt}; pub use super::audio_base_sink::AudioBaseSinkImpl; pub use super::audio_base_src::AudioBaseSrcImpl; diff --git a/gstreamer-audio/sys/Cargo.toml b/gstreamer-audio/sys/Cargo.toml index 6d717621f..526cb295c 100644 --- a/gstreamer-audio/sys/Cargo.toml +++ b/gstreamer-audio/sys/Cargo.toml @@ -25,10 +25,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_10 = [] -v1_12 = ["v1_10"] -v1_14 = ["v1_12"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -55,15 +52,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_audio_1_0] name = "gstreamer-audio-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_audio_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_audio_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_audio_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_audio_1_0.v1_16] diff --git a/gstreamer-audio/sys/Gir.toml b/gstreamer-audio/sys/Gir.toml index d306e6c08..e3edeb3bc 100644 --- a/gstreamer-audio/sys/Gir.toml +++ b/gstreamer-audio/sys/Gir.toml @@ -2,16 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstAudio" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] external_libraries = [ @@ -37,13 +34,6 @@ status = "generate" name = "reorder_channels" version = "1.0" -[[object]] -name = "GstAudio.AudioConverter" -status = "generate" - [[object.function]] - name = "get_type" - version = "1.14" - [[object]] name = "GstAudio.*" status = "generate" diff --git a/gstreamer-audio/sys/src/lib.rs b/gstreamer-audio/sys/src/lib.rs index 16c758594..93ad58bd7 100644 --- a/gstreamer-audio/sys/src/lib.rs +++ b/gstreamer-audio/sys/src/lib.rs @@ -1485,22 +1485,16 @@ extern "C" { //========================================================================= // GstAudioResamplerFilterInterpolation //========================================================================= - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_resampler_filter_interpolation_get_type() -> GType; //========================================================================= // GstAudioResamplerFilterMode //========================================================================= - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_resampler_filter_mode_get_type() -> GType; //========================================================================= // GstAudioResamplerMethod //========================================================================= - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_resampler_method_get_type() -> GType; //========================================================================= @@ -1546,8 +1540,6 @@ extern "C" { //========================================================================= // GstAudioResamplerFlags //========================================================================= - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_resampler_flags_get_type() -> GType; //========================================================================= @@ -1605,8 +1597,6 @@ extern "C" { out_channels: c_int, out_position: *mut GstAudioChannelPosition, ) -> *mut GstAudioChannelMixer; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_channel_mixer_new_with_matrix( flags: GstAudioChannelMixerFlags, format: GstAudioFormat, @@ -1623,8 +1613,6 @@ extern "C" { //========================================================================= // GstAudioConverter //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_converter_get_type() -> GType; pub fn gst_audio_converter_new( flags: GstAudioConverterFlags, @@ -1632,8 +1620,6 @@ extern "C" { out_info: *mut GstAudioInfo, config: *mut gst::GstStructure, ) -> *mut GstAudioConverter; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_converter_convert( convert: *mut GstAudioConverter, flags: GstAudioConverterFlags, @@ -1669,8 +1655,6 @@ extern "C" { out: *mut gpointer, out_frames: size_t, ) -> gboolean; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_audio_converter_supports_inplace(convert: *mut GstAudioConverter) -> gboolean; pub fn gst_audio_converter_update_config( convert: *mut GstAudioConverter, @@ -1773,26 +1757,16 @@ extern "C" { //========================================================================= // GstAudioResampler //========================================================================= - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_resampler_free(resampler: *mut GstAudioResampler); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_resampler_get_in_frames( resampler: *mut GstAudioResampler, out_frames: size_t, ) -> size_t; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_resampler_get_max_latency(resampler: *mut GstAudioResampler) -> size_t; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_resampler_get_out_frames( resampler: *mut GstAudioResampler, in_frames: size_t, ) -> size_t; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_resampler_resample( resampler: *mut GstAudioResampler, in_: *mut gpointer, @@ -1800,19 +1774,13 @@ extern "C" { out: *mut gpointer, out_frames: size_t, ); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_resampler_reset(resampler: *mut GstAudioResampler); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_resampler_update( resampler: *mut GstAudioResampler, in_rate: c_int, out_rate: c_int, options: *mut gst::GstStructure, ) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_resampler_new( method: GstAudioResamplerMethod, flags: GstAudioResamplerFlags, @@ -1822,8 +1790,6 @@ extern "C" { out_rate: c_int, options: *mut gst::GstStructure, ) -> *mut GstAudioResampler; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_resampler_options_set_quality( method: GstAudioResamplerMethod, quality: c_uint, @@ -1835,52 +1801,30 @@ extern "C" { //========================================================================= // GstAudioStreamAlign //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_stream_align_get_type() -> GType; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_stream_align_new( rate: c_int, alignment_threshold: gst::GstClockTime, discont_wait: gst::GstClockTime, ) -> *mut GstAudioStreamAlign; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_stream_align_copy( align: *const GstAudioStreamAlign, ) -> *mut GstAudioStreamAlign; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_stream_align_free(align: *mut GstAudioStreamAlign); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_stream_align_get_alignment_threshold( align: *const GstAudioStreamAlign, ) -> gst::GstClockTime; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_stream_align_get_discont_wait( align: *const GstAudioStreamAlign, ) -> gst::GstClockTime; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_stream_align_get_rate(align: *const GstAudioStreamAlign) -> c_int; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_stream_align_get_samples_since_discont( align: *const GstAudioStreamAlign, ) -> u64; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_stream_align_get_timestamp_at_discont( align: *const GstAudioStreamAlign, ) -> gst::GstClockTime; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_stream_align_mark_discont(align: *mut GstAudioStreamAlign); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_stream_align_process( align: *mut GstAudioStreamAlign, discont: gboolean, @@ -1890,30 +1834,20 @@ extern "C" { out_duration: *mut gst::GstClockTime, out_sample_position: *mut u64, ) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_stream_align_set_alignment_threshold( align: *mut GstAudioStreamAlign, alignment_threshold: gst::GstClockTime, ); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_stream_align_set_discont_wait( align: *mut GstAudioStreamAlign, discont_wait: gst::GstClockTime, ); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_stream_align_set_rate(align: *mut GstAudioStreamAlign, rate: c_int); //========================================================================= // GstAudioAggregator //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_aggregator_get_type() -> GType; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_aggregator_set_sink_caps( aagg: *mut GstAudioAggregator, pad: *mut GstAudioAggregatorPad, @@ -1923,15 +1857,11 @@ extern "C" { //========================================================================= // GstAudioAggregatorConvertPad //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_aggregator_convert_pad_get_type() -> GType; //========================================================================= // GstAudioAggregatorPad //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_audio_aggregator_pad_get_type() -> GType; //========================================================================= @@ -2074,8 +2004,6 @@ extern "C" { caps: *mut gst::GstCaps, filter: *mut gst::GstCaps, ) -> *mut gst::GstCaps; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_decoder_set_allocation_caps( dec: *mut GstAudioDecoder, allocation_caps: *mut gst::GstCaps, @@ -2153,8 +2081,6 @@ extern "C" { caps: *mut gst::GstCaps, filter: *mut gst::GstCaps, ) -> *mut gst::GstCaps; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_encoder_set_allocation_caps( enc: *mut GstAudioEncoder, allocation_caps: *mut gst::GstCaps, @@ -2250,8 +2176,6 @@ extern "C" { cb: GstAudioRingBufferCallback, user_data: gpointer, ); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_audio_ring_buffer_set_callback_full( buf: *mut GstAudioRingBuffer, cb: GstAudioRingBufferCallback, @@ -2318,8 +2242,6 @@ extern "C" { force_order: gboolean, channel_mask: *mut u64, ) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_audio_channel_positions_to_string( position: *const GstAudioChannelPosition, channels: c_int, diff --git a/gstreamer-base/Cargo.toml b/gstreamer-base/Cargo.toml index 1433387eb..331f8f1fa 100644 --- a/gstreamer-base/Cargo.toml +++ b/gstreamer-base/Cargo.toml @@ -26,11 +26,7 @@ gir-format-check = "0.1" [features] default = [] -v1_10 = ["gst/v1_10", "ffi/v1_10"] -v1_12 = ["gst/v1_12", "ffi/v1_12", "v1_10"] -v1_12_1 = ["gst/v1_12_1", "ffi/v1_12_1", "v1_12"] -v1_14 = ["gst/v1_14", "ffi/v1_14", "v1_12_1"] -v1_14_1 = ["gst/v1_14", "ffi/v1_14_1", "v1_14"] +v1_14_1 = ["ffi/v1_14_1"] v1_16 = ["gst/v1_16", "ffi/v1_16", "v1_14_1"] v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] diff --git a/gstreamer-base/Gir.toml b/gstreamer-base/Gir.toml index e4126d30e..400bab899 100644 --- a/gstreamer-base/Gir.toml +++ b/gstreamer-base/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "GstBase" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true @@ -214,10 +214,6 @@ manual_traits = ["AggregatorExtManual"] name = "min_latency" mandatory = true - [[object.property]] - name = "latency" - version = "1.14" - [[object.property]] name = "start-time-selection" version = "1.18" diff --git a/gstreamer-base/README.md b/gstreamer-base/README.md index 5ea988df2..3dd1f356e 100644 --- a/gstreamer-base/README.md +++ b/gstreamer-base/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-base/src/adapter.rs b/gstreamer-base/src/adapter.rs index dab8f6923..da0eb50f7 100644 --- a/gstreamer-base/src/adapter.rs +++ b/gstreamer-base/src/adapter.rs @@ -294,14 +294,10 @@ impl UniqueAdapter { self.0.copy_bytes(offset, size) } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn distance_from_discont(&self) -> u64 { self.0.distance_from_discont() } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn dts_at_discont(&self) -> Option { self.0.dts_at_discont() } @@ -350,8 +346,6 @@ impl UniqueAdapter { self.0.masked_scan_uint32_peek(mask, pattern, offset, size) } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn offset_at_discont(&self) -> u64 { self.0.offset_at_discont() } @@ -364,8 +358,6 @@ impl UniqueAdapter { self.0.prev_dts_at_offset(offset) } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn prev_offset(&self) -> (u64, u64) { self.0.prev_offset() } @@ -378,8 +370,6 @@ impl UniqueAdapter { self.0.prev_pts_at_offset(offset) } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn pts_at_discont(&self) -> Option { self.0.pts_at_discont() } diff --git a/gstreamer-base/src/auto/adapter.rs b/gstreamer-base/src/auto/adapter.rs index 633484a6d..bf09d230c 100644 --- a/gstreamer-base/src/auto/adapter.rs +++ b/gstreamer-base/src/auto/adapter.rs @@ -40,22 +40,16 @@ impl Adapter { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_adapter_distance_from_discont")] pub fn distance_from_discont(&self) -> u64 { unsafe { ffi::gst_adapter_distance_from_discont(self.to_glib_none().0) } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_adapter_dts_at_discont")] pub fn dts_at_discont(&self) -> Option { unsafe { from_glib(ffi::gst_adapter_dts_at_discont(self.to_glib_none().0)) } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_adapter_offset_at_discont")] pub fn offset_at_discont(&self) -> u64 { unsafe { ffi::gst_adapter_offset_at_discont(self.to_glib_none().0) } @@ -88,8 +82,6 @@ impl Adapter { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_adapter_prev_offset")] pub fn prev_offset(&self) -> (u64, u64) { unsafe { @@ -127,8 +119,6 @@ impl Adapter { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_adapter_pts_at_discont")] pub fn pts_at_discont(&self) -> Option { unsafe { from_glib(ffi::gst_adapter_pts_at_discont(self.to_glib_none().0)) } diff --git a/gstreamer-base/src/auto/aggregator.rs b/gstreamer-base/src/auto/aggregator.rs index c575d92f8..f307e1ef8 100644 --- a/gstreamer-base/src/auto/aggregator.rs +++ b/gstreamer-base/src/auto/aggregator.rs @@ -114,8 +114,6 @@ pub trait AggregatorExt: 'static { f: F, ) -> SignalHandlerId; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "latency")] fn connect_latency_notify(&self, f: F) -> SignalHandlerId; @@ -286,8 +284,6 @@ impl> AggregatorExt for O { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn connect_latency_notify( &self, f: F, diff --git a/gstreamer-base/src/auto/base_parse.rs b/gstreamer-base/src/auto/base_parse.rs index 1e7b2600d..3a4c8703d 100644 --- a/gstreamer-base/src/auto/base_parse.rs +++ b/gstreamer-base/src/auto/base_parse.rs @@ -33,8 +33,6 @@ pub trait BaseParseExt: 'static { #[doc(alias = "gst_base_parse_add_index_entry")] fn add_index_entry(&self, offset: u64, ts: gst::ClockTime, key: bool, force: bool) -> bool; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_base_parse_drain")] fn drain(&self); @@ -98,8 +96,6 @@ impl> BaseParseExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn drain(&self) { unsafe { ffi::gst_base_parse_drain(self.as_ref().to_glib_none().0); diff --git a/gstreamer-base/src/auto/base_sink.rs b/gstreamer-base/src/auto/base_sink.rs index d87e58b21..39a4ad22d 100644 --- a/gstreamer-base/src/auto/base_sink.rs +++ b/gstreamer-base/src/auto/base_sink.rs @@ -38,8 +38,6 @@ pub trait BaseSinkExt: 'static { #[doc(alias = "get_blocksize")] fn blocksize(&self) -> u32; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_base_sink_get_drop_out_of_segment")] #[doc(alias = "get_drop_out_of_segment")] fn drops_out_of_segment(&self) -> bool; @@ -91,8 +89,6 @@ pub trait BaseSinkExt: 'static { #[doc(alias = "gst_base_sink_set_blocksize")] fn set_blocksize(&self, blocksize: u32); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_base_sink_set_drop_out_of_segment")] fn set_drop_out_of_segment(&self, drop_out_of_segment: bool); @@ -233,8 +229,6 @@ impl> BaseSinkExt for O { unsafe { ffi::gst_base_sink_get_blocksize(self.as_ref().to_glib_none().0) } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn drops_out_of_segment(&self) -> bool { unsafe { from_glib(ffi::gst_base_sink_get_drop_out_of_segment( @@ -312,8 +306,6 @@ impl> BaseSinkExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn set_drop_out_of_segment(&self, drop_out_of_segment: bool) { unsafe { ffi::gst_base_sink_set_drop_out_of_segment( diff --git a/gstreamer-base/src/auto/mod.rs b/gstreamer-base/src/auto/mod.rs index 907eaf1a8..d95fcaa9c 100644 --- a/gstreamer-base/src/auto/mod.rs +++ b/gstreamer-base/src/auto/mod.rs @@ -6,18 +6,10 @@ mod adapter; pub use self::adapter::Adapter; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod aggregator; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use self::aggregator::Aggregator; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod aggregator_pad; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use self::aggregator_pad::AggregatorPad; mod base_parse; @@ -47,11 +39,7 @@ pub mod functions; #[doc(hidden)] pub mod traits { - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::aggregator::AggregatorExt; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::aggregator_pad::AggregatorPadExt; pub use super::base_parse::BaseParseExt; pub use super::base_sink::BaseSinkExt; diff --git a/gstreamer-base/src/lib.rs b/gstreamer-base/src/lib.rs index 68fb20de2..d3e071108 100644 --- a/gstreamer-base/src/lib.rs +++ b/gstreamer-base/src/lib.rs @@ -38,11 +38,7 @@ mod adapter; pub use crate::adapter::*; mod flow_combiner; pub use crate::flow_combiner::*; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod aggregator; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod aggregator_pad; mod base_parse; mod base_sink; @@ -62,11 +58,7 @@ pub mod prelude { #[doc(hidden)] pub use gst::prelude::*; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use crate::aggregator::AggregatorExtManual; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use crate::aggregator_pad::AggregatorPadExtManual; pub use crate::auto::traits::*; pub use crate::base_parse::BaseParseExtManual; diff --git a/gstreamer-base/src/subclass/mod.rs b/gstreamer-base/src/subclass/mod.rs index 3dcf461d2..59f64b3c0 100644 --- a/gstreamer-base/src/subclass/mod.rs +++ b/gstreamer-base/src/subclass/mod.rs @@ -12,22 +12,14 @@ mod push_src; pub use self::base_transform::BaseTransformMode; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod aggregator; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod aggregator_pad; pub mod prelude { #[doc(hidden)] pub use gst::subclass::prelude::*; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::aggregator::{AggregatorImpl, AggregatorImplExt}; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::aggregator_pad::{AggregatorPadImpl, AggregatorPadImplExt}; pub use super::base_parse::{BaseParseImpl, BaseParseImplExt}; pub use super::base_sink::{BaseSinkImpl, BaseSinkImplExt}; diff --git a/gstreamer-base/sys/Cargo.toml b/gstreamer-base/sys/Cargo.toml index 58e3d1183..d706566bb 100644 --- a/gstreamer-base/sys/Cargo.toml +++ b/gstreamer-base/sys/Cargo.toml @@ -21,11 +21,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_10 = [] -v1_12 = ["v1_10"] -v1_12_1 = ["v1_12"] -v1_14 = ["v1_12_1"] -v1_14_1 = ["v1_14"] +v1_14_1 = [] v1_14_3 = ["v1_14_1"] v1_16 = ["v1_14_3"] v1_18 = ["v1_16"] @@ -54,18 +50,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_base_1_0] name = "gstreamer-base-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_base_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_base_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_base_1_0.v1_12_1] -version = "1.12.1" - -[package.metadata.system-deps.gstreamer_base_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_base_1_0.v1_14_1] diff --git a/gstreamer-base/sys/Gir.toml b/gstreamer-base/sys/Gir.toml index d8eadbfbd..8007ccdba 100644 --- a/gstreamer-base/sys/Gir.toml +++ b/gstreamer-base/sys/Gir.toml @@ -2,16 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstBase" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] external_libraries = [ diff --git a/gstreamer-base/sys/src/lib.rs b/gstreamer-base/sys/src/lib.rs index df9f45d2b..d1c9c31c0 100644 --- a/gstreamer-base/sys/src/lib.rs +++ b/gstreamer-base/sys/src/lib.rs @@ -1265,8 +1265,6 @@ extern "C" { flags: GstBaseParseFrameFlags, overhead: c_int, ) -> *mut GstBaseParseFrame; - #[cfg(any(feature = "v1_12_1", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12_1")))] pub fn gst_base_parse_frame_copy(frame: *mut GstBaseParseFrame) -> *mut GstBaseParseFrame; pub fn gst_base_parse_frame_free(frame: *mut GstBaseParseFrame); pub fn gst_base_parse_frame_init(frame: *mut GstBaseParseFrame); @@ -1652,13 +1650,9 @@ extern "C" { pub fn gst_flow_combiner_add_pad(combiner: *mut GstFlowCombiner, pad: *mut gst::GstPad); pub fn gst_flow_combiner_clear(combiner: *mut GstFlowCombiner); pub fn gst_flow_combiner_free(combiner: *mut GstFlowCombiner); - #[cfg(any(feature = "v1_12_1", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12_1")))] pub fn gst_flow_combiner_ref(combiner: *mut GstFlowCombiner) -> *mut GstFlowCombiner; pub fn gst_flow_combiner_remove_pad(combiner: *mut GstFlowCombiner, pad: *mut gst::GstPad); pub fn gst_flow_combiner_reset(combiner: *mut GstFlowCombiner); - #[cfg(any(feature = "v1_12_1", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12_1")))] pub fn gst_flow_combiner_unref(combiner: *mut GstFlowCombiner); pub fn gst_flow_combiner_update_flow( combiner: *mut GstFlowCombiner, @@ -1698,19 +1692,11 @@ extern "C" { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn gst_queue_array_peek_nth_struct(array: *mut GstQueueArray, idx: c_uint) -> gpointer; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_queue_array_peek_tail(array: *mut GstQueueArray) -> gpointer; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_queue_array_peek_tail_struct(array: *mut GstQueueArray) -> gpointer; pub fn gst_queue_array_pop_head(array: *mut GstQueueArray) -> gpointer; pub fn gst_queue_array_pop_head_struct(array: *mut GstQueueArray) -> gpointer; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_queue_array_pop_tail(array: *mut GstQueueArray) -> gpointer; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_queue_array_pop_tail_struct(array: *mut GstQueueArray) -> gpointer; pub fn gst_queue_array_push_tail(array: *mut GstQueueArray, data: gpointer); pub fn gst_queue_array_push_tail_struct(array: *mut GstQueueArray, p_struct: gpointer); @@ -1740,11 +1726,7 @@ extern "C" { offset: size_t, size: size_t, ) -> *mut glib::GBytes; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_adapter_distance_from_discont(adapter: *mut GstAdapter) -> u64; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_adapter_dts_at_discont(adapter: *mut GstAdapter) -> gst::GstClockTime; pub fn gst_adapter_flush(adapter: *mut GstAdapter, flush: size_t); pub fn gst_adapter_get_buffer(adapter: *mut GstAdapter, nbytes: size_t) -> *mut gst::GstBuffer; @@ -1773,8 +1755,6 @@ extern "C" { size: size_t, value: *mut u32, ) -> ssize_t; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_adapter_offset_at_discont(adapter: *mut GstAdapter) -> u64; pub fn gst_adapter_prev_dts(adapter: *mut GstAdapter, distance: *mut u64) -> gst::GstClockTime; pub fn gst_adapter_prev_dts_at_offset( @@ -1782,8 +1762,6 @@ extern "C" { offset: size_t, distance: *mut u64, ) -> gst::GstClockTime; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_adapter_prev_offset(adapter: *mut GstAdapter, distance: *mut u64) -> u64; pub fn gst_adapter_prev_pts(adapter: *mut GstAdapter, distance: *mut u64) -> gst::GstClockTime; pub fn gst_adapter_prev_pts_at_offset( @@ -1791,8 +1769,6 @@ extern "C" { offset: size_t, distance: *mut u64, ) -> gst::GstClockTime; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_adapter_pts_at_discont(adapter: *mut GstAdapter) -> gst::GstClockTime; pub fn gst_adapter_push(adapter: *mut GstAdapter, buf: *mut gst::GstBuffer); pub fn gst_adapter_take(adapter: *mut GstAdapter, nbytes: size_t) -> gpointer; @@ -1812,11 +1788,7 @@ extern "C" { //========================================================================= // GstAggregator //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_aggregator_get_type() -> GType; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_aggregator_finish_buffer( aggregator: *mut GstAggregator, buffer: *mut gst::GstBuffer, @@ -1827,21 +1799,15 @@ extern "C" { aggregator: *mut GstAggregator, bufferlist: *mut gst::GstBufferList, ) -> gst::GstFlowReturn; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_aggregator_get_allocator( self_: *mut GstAggregator, allocator: *mut *mut gst::GstAllocator, params: *mut gst::GstAllocationParams, ); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_aggregator_get_buffer_pool(self_: *mut GstAggregator) -> *mut gst::GstBufferPool; #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] pub fn gst_aggregator_get_ignore_inactive_pads(self_: *mut GstAggregator) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_aggregator_get_latency(self_: *mut GstAggregator) -> gst::GstClockTime; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] @@ -1864,15 +1830,11 @@ extern "C" { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] pub fn gst_aggregator_set_ignore_inactive_pads(self_: *mut GstAggregator, ignore: gboolean); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_aggregator_set_latency( self_: *mut GstAggregator, min_latency: gst::GstClockTime, max_latency: gst::GstClockTime, ); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_aggregator_set_src_caps(self_: *mut GstAggregator, caps: *mut gst::GstCaps); #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] @@ -1887,26 +1849,16 @@ extern "C" { //========================================================================= // GstAggregatorPad //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_aggregator_pad_get_type() -> GType; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_aggregator_pad_drop_buffer(pad: *mut GstAggregatorPad) -> gboolean; #[cfg(any(feature = "v1_14_1", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14_1")))] pub fn gst_aggregator_pad_has_buffer(pad: *mut GstAggregatorPad) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_aggregator_pad_is_eos(pad: *mut GstAggregatorPad) -> gboolean; #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] pub fn gst_aggregator_pad_is_inactive(pad: *mut GstAggregatorPad) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_aggregator_pad_peek_buffer(pad: *mut GstAggregatorPad) -> *mut gst::GstBuffer; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_aggregator_pad_pop_buffer(pad: *mut GstAggregatorPad) -> *mut gst::GstBuffer; //========================================================================= @@ -1927,8 +1879,6 @@ extern "C" { dest_format: gst::GstFormat, dest_value: *mut i64, ) -> gboolean; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_base_parse_drain(parse: *mut GstBaseParse); pub fn gst_base_parse_finish_frame( parse: *mut GstBaseParse, @@ -1983,8 +1933,6 @@ extern "C" { obj: *mut gst::GstMiniObject, ) -> gst::GstFlowReturn; pub fn gst_base_sink_get_blocksize(sink: *mut GstBaseSink) -> c_uint; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_base_sink_get_drop_out_of_segment(sink: *mut GstBaseSink) -> gboolean; pub fn gst_base_sink_get_last_sample(sink: *mut GstBaseSink) -> *mut gst::GstSample; pub fn gst_base_sink_get_latency(sink: *mut GstBaseSink) -> gst::GstClockTime; @@ -2012,8 +1960,6 @@ extern "C" { ) -> gboolean; pub fn gst_base_sink_set_async_enabled(sink: *mut GstBaseSink, enabled: gboolean); pub fn gst_base_sink_set_blocksize(sink: *mut GstBaseSink, blocksize: c_uint); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_base_sink_set_drop_out_of_segment( sink: *mut GstBaseSink, drop_out_of_segment: gboolean, @@ -2089,8 +2035,6 @@ extern "C" { pub fn gst_base_src_set_live(src: *mut GstBaseSrc, live: gboolean); pub fn gst_base_src_start_complete(basesrc: *mut GstBaseSrc, ret: gst::GstFlowReturn); pub fn gst_base_src_start_wait(basesrc: *mut GstBaseSrc) -> gst::GstFlowReturn; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_base_src_submit_buffer_list( src: *mut GstBaseSrc, buffer_list: *mut gst::GstBufferList, diff --git a/gstreamer-check/Cargo.toml b/gstreamer-check/Cargo.toml index 3cc5e11bd..8d8eeac7d 100644 --- a/gstreamer-check/Cargo.toml +++ b/gstreamer-check/Cargo.toml @@ -24,10 +24,7 @@ gir-format-check = "0.1" [features] default = [] -v1_10 = ["gst/v1_10", "ffi/v1_10"] -v1_12 = ["gst/v1_12", "ffi/v1_12", "v1_10"] -v1_14 = ["gst/v1_14", "ffi/v1_14", "v1_12"] -v1_16 = ["gst/v1_16", "ffi/v1_16", "v1_14"] +v1_16 = ["gst/v1_16", "ffi/v1_16"] v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] diff --git a/gstreamer-check/Gir.toml b/gstreamer-check/Gir.toml index c72307d88..5912b43c6 100644 --- a/gstreamer-check/Gir.toml +++ b/gstreamer-check/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "GstCheck" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true diff --git a/gstreamer-check/README.md b/gstreamer-check/README.md index 540693d10..7704b6929 100644 --- a/gstreamer-check/README.md +++ b/gstreamer-check/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-check/src/harness.rs b/gstreamer-check/src/harness.rs index 6aaa39cd2..9bc4f9e30 100644 --- a/gstreamer-check/src/harness.rs +++ b/gstreamer-check/src/harness.rs @@ -519,8 +519,6 @@ impl Harness { // unsafe { TODO: call ffi::gst_harness_stress_statechange_start_full() } //} - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_harness_take_all_data_as_buffer")] pub fn take_all_data_as_buffer(&mut self) -> Result { unsafe { @@ -529,8 +527,6 @@ impl Harness { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_harness_take_all_data_as_bytes")] pub fn take_all_data_as_bytes(&mut self) -> Result { unsafe { diff --git a/gstreamer-check/sys/Cargo.toml b/gstreamer-check/sys/Cargo.toml index 6ce3ce170..07fcf5f42 100644 --- a/gstreamer-check/sys/Cargo.toml +++ b/gstreamer-check/sys/Cargo.toml @@ -21,10 +21,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_10 = [] -v1_12 = ["v1_10"] -v1_14 = ["v1_12"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -51,15 +48,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_check_1_0] name = "gstreamer-check-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_check_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_check_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_check_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_check_1_0.v1_16] diff --git a/gstreamer-check/sys/Gir.toml b/gstreamer-check/sys/Gir.toml index d70dc51d8..97a05466f 100644 --- a/gstreamer-check/sys/Gir.toml +++ b/gstreamer-check/sys/Gir.toml @@ -2,16 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstCheck" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] external_libraries = [ diff --git a/gstreamer-check/sys/src/lib.rs b/gstreamer-check/sys/src/lib.rs index 0368361b0..ac8f3696e 100644 --- a/gstreamer-check/sys/src/lib.rs +++ b/gstreamer-check/sys/src/lib.rs @@ -309,14 +309,8 @@ extern "C" { h: *mut GstHarness, sleep: c_ulong, ) -> *mut GstHarnessThread; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_harness_take_all_data(h: *mut GstHarness, size: *mut size_t) -> *mut u8; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_harness_take_all_data_as_buffer(h: *mut GstHarness) -> *mut gst::GstBuffer; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_harness_take_all_data_as_bytes(h: *mut GstHarness) -> *mut glib::GBytes; pub fn gst_harness_teardown(h: *mut GstHarness); pub fn gst_harness_try_pull(h: *mut GstHarness) -> *mut gst::GstBuffer; diff --git a/gstreamer-controller/Cargo.toml b/gstreamer-controller/Cargo.toml index 975639ba2..7b10d681f 100644 --- a/gstreamer-controller/Cargo.toml +++ b/gstreamer-controller/Cargo.toml @@ -25,10 +25,7 @@ gir-format-check = "0.1" [features] default = [] -v1_10 = ["gst/v1_10", "ffi/v1_10"] -v1_12 = ["gst/v1_12", "ffi/v1_12", "v1_10"] -v1_14 = ["gst/v1_14", "ffi/v1_14", "v1_12"] -v1_16 = ["gst/v1_16", "ffi/v1_16", "v1_14"] +v1_16 = ["gst/v1_16", "ffi/v1_16"] v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] diff --git a/gstreamer-controller/Gir.toml b/gstreamer-controller/Gir.toml index 5fd36da29..276fcc671 100644 --- a/gstreamer-controller/Gir.toml +++ b/gstreamer-controller/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "GstController" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true @@ -24,6 +24,7 @@ generate = [ "GstController.InterpolationMode", "GstController.LFOControlSource", "GstController.LFOWaveform", + "GstController.ProxyControlBinding", "GstController.TriggerControlSource", ] @@ -39,11 +40,6 @@ name = "Gst.ClockTime" status = "manual" conversion_type = "Option" -[[object]] -name = "GstController.ProxyControlBinding" -status = "generate" -version = "1.12" - [[object]] name = "GstController.TimedValueControlSource" status = "generate" diff --git a/gstreamer-controller/README.md b/gstreamer-controller/README.md index de08a8c17..805d02807 100644 --- a/gstreamer-controller/README.md +++ b/gstreamer-controller/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-controller/src/auto/mod.rs b/gstreamer-controller/src/auto/mod.rs index a9c106559..0fe3ad58b 100644 --- a/gstreamer-controller/src/auto/mod.rs +++ b/gstreamer-controller/src/auto/mod.rs @@ -15,11 +15,7 @@ pub use self::interpolation_control_source::InterpolationControlSource; mod lfo_control_source; pub use self::lfo_control_source::LFOControlSource; -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] mod proxy_control_binding; -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub use self::proxy_control_binding::ProxyControlBinding; mod timed_value_control_source; diff --git a/gstreamer-controller/sys/Cargo.toml b/gstreamer-controller/sys/Cargo.toml index 4c70d98a9..10740b783 100644 --- a/gstreamer-controller/sys/Cargo.toml +++ b/gstreamer-controller/sys/Cargo.toml @@ -22,10 +22,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_10 = [] -v1_12 = ["v1_10"] -v1_14 = ["v1_12"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -52,15 +49,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_controller_1_0] name = "gstreamer-controller-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_controller_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_controller_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_controller_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_controller_1_0.v1_16] diff --git a/gstreamer-controller/sys/Gir.toml b/gstreamer-controller/sys/Gir.toml index 3ff644f20..0a27e3cfd 100644 --- a/gstreamer-controller/sys/Gir.toml +++ b/gstreamer-controller/sys/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstController" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" external_libraries = [ @@ -14,9 +14,6 @@ extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] [external_libraries] diff --git a/gstreamer-controller/sys/src/lib.rs b/gstreamer-controller/sys/src/lib.rs index ee90da89a..cbda71a21 100644 --- a/gstreamer-controller/sys/src/lib.rs +++ b/gstreamer-controller/sys/src/lib.rs @@ -478,8 +478,6 @@ extern "C" { // GstProxyControlBinding //========================================================================= pub fn gst_proxy_control_binding_get_type() -> GType; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_proxy_control_binding_new( object: *mut gst::GstObject, property_name: *const c_char, diff --git a/gstreamer-editing-services/Cargo.toml b/gstreamer-editing-services/Cargo.toml index beca98cd5..9d5006dcb 100644 --- a/gstreamer-editing-services/Cargo.toml +++ b/gstreamer-editing-services/Cargo.toml @@ -27,10 +27,7 @@ gst-pbutils = { package = "gstreamer-pbutils", path = "../gstreamer-pbutils" } gir-format-check = "0.1" [features] -v1_10 = ["gst/v1_10", "gst-base/v1_10", "gst-pbutils/v1_10", "ffi/v1_10"] -v1_12 = ["gst/v1_12", "gst-base/v1_12", "gst-pbutils/v1_12", "ffi/v1_12", "v1_10"] -v1_14 = ["gst/v1_14", "gst-base/v1_14", "gst-pbutils/v1_14", "ffi/v1_14", "v1_12"] -v1_16 = ["gst/v1_16", "gst-base/v1_16", "gst-pbutils/v1_16", "ffi/v1_16", "v1_14"] +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_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"] diff --git a/gstreamer-editing-services/Gir.toml b/gstreamer-editing-services/Gir.toml index 10f8a05d7..46e58e03a 100644 --- a/gstreamer-editing-services/Gir.toml +++ b/gstreamer-editing-services/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "GES" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "normal" generate_safety_asserts = true single_version_file = true diff --git a/gstreamer-editing-services/README.md b/gstreamer-editing-services/README.md index 50ecdb613..94f034008 100644 --- a/gstreamer-editing-services/README.md +++ b/gstreamer-editing-services/README.md @@ -29,7 +29,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -50,16 +50,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -87,15 +84,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -123,9 +118,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -135,8 +128,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-editing-services/src/auto/command_line_formatter.rs b/gstreamer-editing-services/src/auto/command_line_formatter.rs index 1d6ff8e4a..2be7dfe1d 100644 --- a/gstreamer-editing-services/src/auto/command_line_formatter.rs +++ b/gstreamer-editing-services/src/auto/command_line_formatter.rs @@ -5,14 +5,8 @@ use crate::Extractable; use crate::Formatter; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use crate::Timeline; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use glib::object::IsA; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use glib::translate::*; glib::wrapper! { @@ -27,8 +21,6 @@ glib::wrapper! { impl CommandLineFormatter { pub const NONE: Option<&'static CommandLineFormatter> = None; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "ges_command_line_formatter_get_help")] #[doc(alias = "get_help")] pub fn help(commands: &[&str]) -> glib::GString { @@ -42,8 +34,6 @@ impl CommandLineFormatter { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "ges_command_line_formatter_get_timeline_uri")] #[doc(alias = "get_timeline_uri")] pub fn timeline_uri(timeline: &impl IsA) -> glib::GString { diff --git a/gstreamer-editing-services/src/auto/timeline_element.rs b/gstreamer-editing-services/src/auto/timeline_element.rs index 6dc81d308..e3a49810e 100644 --- a/gstreamer-editing-services/src/auto/timeline_element.rs +++ b/gstreamer-editing-services/src/auto/timeline_element.rs @@ -209,7 +209,7 @@ pub trait TimelineElementExt: 'static { #[doc(alias = "ges_timeline_element_set_parent")] fn set_parent(&self, parent: &impl IsA) -> Result<(), glib::error::BoolError>; - #[cfg_attr(feature = "v1_10", deprecated = "Since 1.10")] + #[deprecated = "Since 1.10"] #[doc(alias = "ges_timeline_element_set_priority")] fn set_priority(&self, priority: u32) -> bool; @@ -260,7 +260,7 @@ pub trait TimelineElementExt: 'static { #[doc(alias = "parent")] fn connect_parent_notify(&self, f: F) -> SignalHandlerId; - #[cfg_attr(feature = "v1_10", deprecated = "Since 1.10")] + #[deprecated = "Since 1.10"] #[doc(alias = "priority")] fn connect_priority_notify(&self, f: F) -> SignalHandlerId; diff --git a/gstreamer-editing-services/sys/Cargo.toml b/gstreamer-editing-services/sys/Cargo.toml index dcf83bbf9..3c1322154 100644 --- a/gstreamer-editing-services/sys/Cargo.toml +++ b/gstreamer-editing-services/sys/Cargo.toml @@ -29,10 +29,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_10 = [] -v1_12 = ["v1_10"] -v1_14 = ["v1_12"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -59,15 +56,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gst_editing_services_1_0] name = "gst-editing-services-1.0" -version = "1.8" - -[package.metadata.system-deps.gst_editing_services_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gst_editing_services_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gst_editing_services_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gst_editing_services_1_0.v1_16] diff --git a/gstreamer-editing-services/sys/Gir.toml b/gstreamer-editing-services/sys/Gir.toml index beaecf677..7db28d5a3 100644 --- a/gstreamer-editing-services/sys/Gir.toml +++ b/gstreamer-editing-services/sys/Gir.toml @@ -2,16 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GES" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] external_libraries = [ diff --git a/gstreamer-editing-services/sys/src/lib.rs b/gstreamer-editing-services/sys/src/lib.rs index 2e370feef..29fda323a 100644 --- a/gstreamer-editing-services/sys/src/lib.rs +++ b/gstreamer-editing-services/sys/src/lib.rs @@ -3120,14 +3120,10 @@ extern "C" { // GESCommandLineFormatter //========================================================================= pub fn ges_command_line_formatter_get_type() -> GType; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn ges_command_line_formatter_get_help( nargs: c_int, commands: *mut *mut c_char, ) -> *mut c_char; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn ges_command_line_formatter_get_timeline_uri(timeline: *mut GESTimeline) -> *mut c_char; //========================================================================= diff --git a/gstreamer-gl/Cargo.toml b/gstreamer-gl/Cargo.toml index 2e80828be..925997d97 100644 --- a/gstreamer-gl/Cargo.toml +++ b/gstreamer-gl/Cargo.toml @@ -23,9 +23,9 @@ libc = "0.2" once_cell = "1.0" ffi = { package = "gstreamer-gl-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } -gst = { package = "gstreamer", path = "../gstreamer", features = ["v1_14"] } -gst-base = { package = "gstreamer-base", path = "../gstreamer-base", features = ["v1_14"] } -gst-video = { package = "gstreamer-video", path = "../gstreamer-video", features = ["v1_14"] } +gst = { package = "gstreamer", path = "../gstreamer" } +gst-base = { package = "gstreamer-base", path = "../gstreamer-base" } +gst-video = { package = "gstreamer-video", path = "../gstreamer-video" } [dev-dependencies] gir-format-check = "0.1" diff --git a/gstreamer-gl/README.md b/gstreamer-gl/README.md index fafa76a3f..bd46049c4 100644 --- a/gstreamer-gl/README.md +++ b/gstreamer-gl/README.md @@ -24,12 +24,11 @@ API metadata provided by the GStreamer project. ## Installation -To build the GStreamer bindings or anything depending on them, you -need to have at least GStreamer 1.14 and gst-plugins-base 1.14 -installed. In addition, some of the examples/tutorials require various -GStreamer plugins to be available, which can be found in -gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly -and/or gst-libav. +To build the GStreamer bindings or anything depending on them, you need to +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, +some of the examples/tutorials require various GStreamer plugins to be +available, which can be found in gst-plugins-base, gst-plugins-good, +gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -47,8 +46,15 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.14. See -the `Cargo.toml` files for the full details. +The minimum required version of the above libraries is >= 1.14. If you +build the gstreamer-player sub-crate, or any of the examples that +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, + +```console +$ apt-get install libgstreamer-plugins-bad1.0-dev +``` Package names on other distributions should be similar. Please submit a pull request with instructions for yours. @@ -74,13 +80,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -Please, make sure the version of these libraries is >= 1.14. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.14.4-x86_64.pkg` and -`gstreamer-1.0-devel-1.14.4-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -108,7 +114,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -Please, make sure the version of these libraries is >= 1.14. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -118,8 +124,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.4.msi` and -`gstreamer-1.0-devel-x86_64-1.14.4.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-gl/egl/Cargo.toml b/gstreamer-gl/egl/Cargo.toml index 6b5e5309e..da7e4031e 100644 --- a/gstreamer-gl/egl/Cargo.toml +++ b/gstreamer-gl/egl/Cargo.toml @@ -21,7 +21,7 @@ libc = "0.2" ffi = { package = "gstreamer-gl-egl-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } -gst = { package = "gstreamer", path = "../../gstreamer", features = ["v1_14"] } +gst = { package = "gstreamer", path = "../../gstreamer" } gst-gl = { package = "gstreamer-gl", path = "../" } [dev-dependencies] diff --git a/gstreamer-gl/egl/README.md b/gstreamer-gl/egl/README.md index 6e2cc11cc..dafc57ac3 100644 --- a/gstreamer-gl/egl/README.md +++ b/gstreamer-gl/egl/README.md @@ -24,12 +24,11 @@ API metadata provided by the GStreamer project. ## Installation -To build the GStreamer bindings or anything depending on them, you -need to have at least GStreamer 1.14 and gst-plugins-base 1.14 -installed. In addition, some of the examples/tutorials require various -GStreamer plugins to be available, which can be found in -gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly -and/or gst-libav. +To build the GStreamer bindings or anything depending on them, you need to +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, +some of the examples/tutorials require various GStreamer plugins to be +available, which can be found in gst-plugins-base, gst-plugins-good, +gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -47,8 +46,15 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.14. See -the `Cargo.toml` files for the full details. +The minimum required version of the above libraries is >= 1.14. If you +build the gstreamer-player sub-crate, or any of the examples that +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, + +```console +$ apt-get install libgstreamer-plugins-bad1.0-dev +``` Package names on other distributions should be similar. Please submit a pull request with instructions for yours. @@ -74,13 +80,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -Please, make sure the version of these libraries is >= 1.14. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.14.4-x86_64.pkg` and -`gstreamer-1.0-devel-1.14.4-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -108,7 +114,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -Please, make sure the version of these libraries is >= 1.14. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -118,8 +124,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.4.msi` and -`gstreamer-1.0-devel-x86_64-1.14.4.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-gl/sys/Cargo.toml b/gstreamer-gl/sys/Cargo.toml index c12ec440f..31c130194 100644 --- a/gstreamer-gl/sys/Cargo.toml +++ b/gstreamer-gl/sys/Cargo.toml @@ -15,17 +15,14 @@ git = "https://github.com/gtk-rs/gtk-rs-core" [dependencies.gst_base] package = "gstreamer-base-sys" path = "../../gstreamer-base/sys" -features = ["v1_14"] [dependencies.gst] package = "gstreamer-sys" path = "../../gstreamer/sys" -features = ["v1_14"] [dependencies.gst_video] package = "gstreamer-video-sys" path = "../../gstreamer-video/sys" -features = ["v1_14"] [dev-dependencies] shell-words = "1.0.0" diff --git a/gstreamer-gl/wayland/Cargo.toml b/gstreamer-gl/wayland/Cargo.toml index 529192934..cbbcb13af 100644 --- a/gstreamer-gl/wayland/Cargo.toml +++ b/gstreamer-gl/wayland/Cargo.toml @@ -21,7 +21,7 @@ libc = "0.2" ffi = { package = "gstreamer-gl-wayland-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } -gst = { package = "gstreamer", path = "../../gstreamer", features = ["v1_14"] } +gst = { package = "gstreamer", path = "../../gstreamer" } gst-gl = { package = "gstreamer-gl", path = "../" } [dev-dependencies] diff --git a/gstreamer-gl/wayland/README.md b/gstreamer-gl/wayland/README.md index 77077a122..6940adce0 100644 --- a/gstreamer-gl/wayland/README.md +++ b/gstreamer-gl/wayland/README.md @@ -24,12 +24,11 @@ API metadata provided by the GStreamer project. ## Installation -To build the GStreamer bindings or anything depending on them, you -need to have at least GStreamer 1.14 and gst-plugins-base 1.14 -installed. In addition, some of the examples/tutorials require various -GStreamer plugins to be available, which can be found in -gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly -and/or gst-libav. +To build the GStreamer bindings or anything depending on them, you need to +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, +some of the examples/tutorials require various GStreamer plugins to be +available, which can be found in gst-plugins-base, gst-plugins-good, +gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -47,8 +46,15 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.14. See -the `Cargo.toml` files for the full details. +The minimum required version of the above libraries is >= 1.14. If you +build the gstreamer-player sub-crate, or any of the examples that +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, + +```console +$ apt-get install libgstreamer-plugins-bad1.0-dev +``` Package names on other distributions should be similar. Please submit a pull request with instructions for yours. @@ -74,13 +80,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -Please, make sure the version of these libraries is >= 1.14. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.14.4-x86_64.pkg` and -`gstreamer-1.0-devel-1.14.4-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -108,7 +114,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -Please, make sure the version of these libraries is >= 1.14. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -118,8 +124,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.4.msi` and -`gstreamer-1.0-devel-x86_64-1.14.4.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-gl/x11/Cargo.toml b/gstreamer-gl/x11/Cargo.toml index 4303cde3a..b51324f30 100644 --- a/gstreamer-gl/x11/Cargo.toml +++ b/gstreamer-gl/x11/Cargo.toml @@ -21,7 +21,7 @@ libc = "0.2" ffi = { package = "gstreamer-gl-x11-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } -gst = { package = "gstreamer", path = "../../gstreamer", features = ["v1_14"] } +gst = { package = "gstreamer", path = "../../gstreamer" } gst-gl = { package = "gstreamer-gl", path = "../" } [dev-dependencies] diff --git a/gstreamer-gl/x11/README.md b/gstreamer-gl/x11/README.md index 34aba7f00..bbf280e66 100644 --- a/gstreamer-gl/x11/README.md +++ b/gstreamer-gl/x11/README.md @@ -24,12 +24,11 @@ API metadata provided by the GStreamer project. ## Installation -To build the GStreamer bindings or anything depending on them, you -need to have at least GStreamer 1.14 and gst-plugins-base 1.14 -installed. In addition, some of the examples/tutorials require various -GStreamer plugins to be available, which can be found in -gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly -and/or gst-libav. +To build the GStreamer bindings or anything depending on them, you need to +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, +some of the examples/tutorials require various GStreamer plugins to be +available, which can be found in gst-plugins-base, gst-plugins-good, +gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -47,8 +46,15 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.14. See -the `Cargo.toml` files for the full details. +The minimum required version of the above libraries is >= 1.14. If you +build the gstreamer-player sub-crate, or any of the examples that +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, + +```console +$ apt-get install libgstreamer-plugins-bad1.0-dev +``` Package names on other distributions should be similar. Please submit a pull request with instructions for yours. @@ -74,13 +80,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -Please, make sure the version of these libraries is >= 1.14. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.14.4-x86_64.pkg` and -`gstreamer-1.0-devel-1.14.4-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -108,7 +114,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -Please, make sure the version of these libraries is >= 1.14. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -118,8 +124,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.4.msi` and -`gstreamer-1.0-devel-x86_64-1.14.4.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-mpegts/sys/Cargo.toml b/gstreamer-mpegts/sys/Cargo.toml index 52414f530..b2d82797d 100644 --- a/gstreamer-mpegts/sys/Cargo.toml +++ b/gstreamer-mpegts/sys/Cargo.toml @@ -21,8 +21,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_14 = [] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -49,9 +48,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_mpegts_1_0] name = "gstreamer-mpegts-1.0" -version = "1.12" - -[package.metadata.system-deps.gstreamer_mpegts_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_mpegts_1_0.v1_16] diff --git a/gstreamer-mpegts/sys/Gir.toml b/gstreamer-mpegts/sys/Gir.toml index a806aed12..b599738b9 100644 --- a/gstreamer-mpegts/sys/Gir.toml +++ b/gstreamer-mpegts/sys/Gir.toml @@ -2,14 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstMpegts" version = "1.0" -min_cfg_version = "1.12" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", ] external_libraries = [ diff --git a/gstreamer-net/Cargo.toml b/gstreamer-net/Cargo.toml index 8585d9546..4e2f8de86 100644 --- a/gstreamer-net/Cargo.toml +++ b/gstreamer-net/Cargo.toml @@ -24,10 +24,7 @@ gir-format-check = "0.1" [features] default = [] -v1_10 = ["gst/v1_10", "ffi/v1_10"] -v1_12 = ["gst/v1_12", "ffi/v1_12", "v1_10"] -v1_14 = ["gst/v1_14", "ffi/v1_14", "v1_12"] -v1_16 = ["gst/v1_16", "ffi/v1_16", "v1_14"] +v1_16 = ["gst/v1_16", "ffi/v1_16"] v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] diff --git a/gstreamer-net/Gir.toml b/gstreamer-net/Gir.toml index 8da8b5986..73be0bfd8 100644 --- a/gstreamer-net/Gir.toml +++ b/gstreamer-net/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "GstNet" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true @@ -39,37 +39,17 @@ name = "GstNet.NetClientClock" status = "generate" final_type = true - [[object.function]] - name = "new" - # Floating reference handling - manual = true - [[object]] name = "GstNet.NetTimeProvider" status = "generate" final_type = true - [[object.function]] - name = "new" - # Floating reference handling - manual = true - [[object]] name = "GstNet.NtpClock" status = "generate" final_type = true - [[object.function]] - name = "new" - # Floating reference handling - manual = true - [[object]] name = "GstNet.PtpClock" status = "generate" final_type = true - - [[object.function]] - name = "new" - # Floating reference handling - manual = true diff --git a/gstreamer-net/README.md b/gstreamer-net/README.md index 11d5ea598..07c2bfe9b 100644 --- a/gstreamer-net/README.md +++ b/gstreamer-net/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-net/src/auto/net_client_clock.rs b/gstreamer-net/src/auto/net_client_clock.rs index a2d1f3a04..3d2497d22 100644 --- a/gstreamer-net/src/auto/net_client_clock.rs +++ b/gstreamer-net/src/auto/net_client_clock.rs @@ -3,6 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT +use glib::object::Cast; use glib::object::IsA; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; @@ -23,6 +24,25 @@ glib::wrapper! { } impl NetClientClock { + #[doc(alias = "gst_net_client_clock_new")] + pub fn new( + name: &str, + remote_address: &str, + remote_port: i32, + base_time: impl Into>, + ) -> NetClientClock { + assert_initialized_main_thread!(); + unsafe { + gst::Clock::from_glib_full(ffi::gst_net_client_clock_new( + name.to_glib_none().0, + remote_address.to_glib_none().0, + remote_port, + base_time.into().into_glib(), + )) + .unsafe_cast() + } + } + pub fn address(&self) -> Option { glib::ObjectExt::property(self, "address") } diff --git a/gstreamer-net/src/auto/net_time_provider.rs b/gstreamer-net/src/auto/net_time_provider.rs index 499b1d5f3..47356ab87 100644 --- a/gstreamer-net/src/auto/net_time_provider.rs +++ b/gstreamer-net/src/auto/net_time_provider.rs @@ -3,6 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT +use glib::object::IsA; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; @@ -22,6 +23,18 @@ glib::wrapper! { } impl NetTimeProvider { + #[doc(alias = "gst_net_time_provider_new")] + pub fn new(clock: &impl IsA, address: Option<&str>, port: i32) -> NetTimeProvider { + assert_initialized_main_thread!(); + unsafe { + from_glib_full(ffi::gst_net_time_provider_new( + clock.as_ref().to_glib_none().0, + address.to_glib_none().0, + port, + )) + } + } + pub fn is_active(&self) -> bool { glib::ObjectExt::property(self, "active") } diff --git a/gstreamer-net/src/auto/ntp_clock.rs b/gstreamer-net/src/auto/ntp_clock.rs index a1a4819c5..c12a50284 100644 --- a/gstreamer-net/src/auto/ntp_clock.rs +++ b/gstreamer-net/src/auto/ntp_clock.rs @@ -4,6 +4,8 @@ // DO NOT EDIT use crate::NetClientClock; +use glib::object::Cast; +use glib::translate::*; glib::wrapper! { #[doc(alias = "GstNtpClock")] @@ -14,7 +16,26 @@ glib::wrapper! { } } -impl NtpClock {} +impl NtpClock { + #[doc(alias = "gst_ntp_clock_new")] + pub fn new( + name: &str, + remote_address: &str, + remote_port: i32, + base_time: impl Into>, + ) -> NtpClock { + assert_initialized_main_thread!(); + unsafe { + gst::Clock::from_glib_full(ffi::gst_ntp_clock_new( + name.to_glib_none().0, + remote_address.to_glib_none().0, + remote_port, + base_time.into().into_glib(), + )) + .unsafe_cast() + } + } +} unsafe impl Send for NtpClock {} unsafe impl Sync for NtpClock {} diff --git a/gstreamer-net/src/auto/ptp_clock.rs b/gstreamer-net/src/auto/ptp_clock.rs index 69b5d7d90..ebeb493af 100644 --- a/gstreamer-net/src/auto/ptp_clock.rs +++ b/gstreamer-net/src/auto/ptp_clock.rs @@ -3,6 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT +use glib::object::Cast; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; @@ -21,6 +22,15 @@ glib::wrapper! { } impl PtpClock { + #[doc(alias = "gst_ptp_clock_new")] + pub fn new(name: &str, domain: u32) -> PtpClock { + assert_initialized_main_thread!(); + unsafe { + gst::Clock::from_glib_full(ffi::gst_ptp_clock_new(name.to_glib_none().0, domain)) + .unsafe_cast() + } + } + pub fn domain(&self) -> u32 { glib::ObjectExt::property(self, "domain") } diff --git a/gstreamer-net/src/lib.rs b/gstreamer-net/src/lib.rs index 388f0c7cd..f4bfd77ef 100644 --- a/gstreamer-net/src/lib.rs +++ b/gstreamer-net/src/lib.rs @@ -28,10 +28,6 @@ macro_rules! skip_assert_initialized { #[allow(unused_imports)] mod auto; pub use crate::auto::*; -mod net_client_clock; -mod net_time_provider; -mod ntp_clock; -mod ptp_clock; pub use crate::net_address_meta::*; mod net_address_meta; diff --git a/gstreamer-net/src/net_client_clock.rs b/gstreamer-net/src/net_client_clock.rs deleted file mode 100644 index 4ce6bb44b..000000000 --- a/gstreamer-net/src/net_client_clock.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Take a look at the license at the top of the repository in the LICENSE file. - -use crate::NetClientClock; - -use glib::prelude::*; -use glib::translate::*; - -impl NetClientClock { - #[doc(alias = "gst_net_client_clock_new")] - pub fn new( - name: Option<&str>, - remote_address: &str, - remote_port: i32, - base_time: gst::ClockTime, - ) -> NetClientClock { - assert_initialized_main_thread!(); - let name = name.to_glib_none(); - let (major, minor, _, _) = gst::version(); - if (major, minor) > (1, 12) { - unsafe { - gst::Clock::from_glib_full(ffi::gst_net_client_clock_new( - name.0, - remote_address.to_glib_none().0, - remote_port, - base_time.into_glib(), - )) - .unsafe_cast() - } - } else { - // Workaround for bad floating reference handling in 1.12. This issue was fixed for 1.13 - unsafe { - gst::Clock::from_glib_none(ffi::gst_net_client_clock_new( - name.0, - remote_address.to_glib_none().0, - remote_port, - base_time.into_glib(), - )) - .unsafe_cast() - } - } - } -} diff --git a/gstreamer-net/src/net_time_provider.rs b/gstreamer-net/src/net_time_provider.rs deleted file mode 100644 index ed280e830..000000000 --- a/gstreamer-net/src/net_time_provider.rs +++ /dev/null @@ -1,34 +0,0 @@ -// Take a look at the license at the top of the repository in the LICENSE file. - -use crate::NetTimeProvider; - -use glib::prelude::*; -use glib::translate::*; - -impl NetTimeProvider { - #[doc(alias = "gst_net_time_provider_new")] - pub fn new>(clock: &P, address: Option<&str>, port: i32) -> NetTimeProvider { - assert_initialized_main_thread!(); - let address = address.to_glib_none(); - - let (major, minor, _, _) = gst::version(); - if (major, minor) > (1, 12) { - unsafe { - from_glib_full(ffi::gst_net_time_provider_new( - clock.as_ref().to_glib_none().0, - address.0, - port, - )) - } - } else { - // Workaround for bad floating reference handling in 1.12. This issue was fixed for 1.13 - unsafe { - from_glib_none(ffi::gst_net_time_provider_new( - clock.as_ref().to_glib_none().0, - address.0, - port, - )) - } - } - } -} diff --git a/gstreamer-net/src/ntp_clock.rs b/gstreamer-net/src/ntp_clock.rs deleted file mode 100644 index 49a8a4454..000000000 --- a/gstreamer-net/src/ntp_clock.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Take a look at the license at the top of the repository in the LICENSE file. - -use crate::NtpClock; - -use glib::prelude::*; -use glib::translate::*; - -impl NtpClock { - #[doc(alias = "gst_ntp_clock_new")] - pub fn new( - name: Option<&str>, - remote_address: &str, - remote_port: i32, - base_time: gst::ClockTime, - ) -> NtpClock { - assert_initialized_main_thread!(); - let name = name.to_glib_none(); - let (major, minor, _, _) = gst::version(); - if (major, minor) > (1, 12) { - unsafe { - gst::Clock::from_glib_full(ffi::gst_ntp_clock_new( - name.0, - remote_address.to_glib_none().0, - remote_port, - base_time.into_glib(), - )) - .unsafe_cast() - } - } else { - // Workaround for bad floating reference handling in 1.12. This issue was fixed for 1.13 - unsafe { - gst::Clock::from_glib_none(ffi::gst_ntp_clock_new( - name.0, - remote_address.to_glib_none().0, - remote_port, - base_time.into_glib(), - )) - .unsafe_cast() - } - } - } -} diff --git a/gstreamer-net/src/ptp_clock.rs b/gstreamer-net/src/ptp_clock.rs deleted file mode 100644 index 6dc669ddc..000000000 --- a/gstreamer-net/src/ptp_clock.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Take a look at the license at the top of the repository in the LICENSE file. - -use crate::PtpClock; - -use glib::prelude::*; -use glib::translate::*; - -impl PtpClock { - #[doc(alias = "gst_ptp_clock_new")] - pub fn new(name: Option<&str>, domain: u32) -> PtpClock { - assert_initialized_main_thread!(); - let name = name.to_glib_none(); - let (major, minor, _, _) = gst::version(); - if (major, minor) > (1, 12) { - unsafe { - gst::Clock::from_glib_full(ffi::gst_ptp_clock_new(name.0, domain)).unsafe_cast() - } - } else { - // Workaround for bad floating reference handling in 1.12. This issue was fixed for 1.13 - unsafe { - gst::Clock::from_glib_none(ffi::gst_ptp_clock_new(name.0, domain)).unsafe_cast() - } - } - } -} diff --git a/gstreamer-net/sys/Cargo.toml b/gstreamer-net/sys/Cargo.toml index d5ceb4340..ae7f39dd8 100644 --- a/gstreamer-net/sys/Cargo.toml +++ b/gstreamer-net/sys/Cargo.toml @@ -21,10 +21,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_10 = [] -v1_12 = ["v1_10"] -v1_14 = ["v1_12"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -51,15 +48,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_net_1_0] name = "gstreamer-net-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_net_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_net_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_net_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_net_1_0.v1_16] diff --git a/gstreamer-net/sys/Gir.toml b/gstreamer-net/sys/Gir.toml index a042d93f8..28ebc08b8 100644 --- a/gstreamer-net/sys/Gir.toml +++ b/gstreamer-net/sys/Gir.toml @@ -2,16 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstNet" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] external_libraries = [ diff --git a/gstreamer-pbutils/Cargo.toml b/gstreamer-pbutils/Cargo.toml index bdb19ef76..eeb67146f 100644 --- a/gstreamer-pbutils/Cargo.toml +++ b/gstreamer-pbutils/Cargo.toml @@ -26,10 +26,7 @@ gir-format-check = "0.1" [features] default = [] -v1_10 = ["gst/v1_10", "ffi/v1_10"] -v1_12 = ["gst/v1_12", "ffi/v1_12", "v1_10"] -v1_14 = ["gst/v1_14", "ffi/v1_14", "v1_12"] -v1_16 = ["gst/v1_16", "ffi/v1_16", "v1_14"] +v1_16 = ["gst/v1_16", "ffi/v1_16"] v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] diff --git a/gstreamer-pbutils/Gir.toml b/gstreamer-pbutils/Gir.toml index e64f586e9..d456aba30 100644 --- a/gstreamer-pbutils/Gir.toml +++ b/gstreamer-pbutils/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "GstPbutils" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true diff --git a/gstreamer-pbutils/README.md b/gstreamer-pbutils/README.md index ea0d1e020..35853954c 100644 --- a/gstreamer-pbutils/README.md +++ b/gstreamer-pbutils/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-pbutils/src/auto/discoverer_audio_info.rs b/gstreamer-pbutils/src/auto/discoverer_audio_info.rs index b55d89618..d262adb3a 100644 --- a/gstreamer-pbutils/src/auto/discoverer_audio_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_audio_info.rs @@ -22,8 +22,6 @@ impl DiscovererAudioInfo { unsafe { ffi::gst_discoverer_audio_info_get_bitrate(self.to_glib_none().0) } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_discoverer_audio_info_get_channel_mask")] #[doc(alias = "get_channel_mask")] pub fn channel_mask(&self) -> u64 { diff --git a/gstreamer-pbutils/src/auto/discoverer_info.rs b/gstreamer-pbutils/src/auto/discoverer_info.rs index c3d938634..98cbaf9ff 100644 --- a/gstreamer-pbutils/src/auto/discoverer_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_info.rs @@ -50,8 +50,6 @@ impl DiscovererInfo { unsafe { from_glib(ffi::gst_discoverer_info_get_duration(self.to_glib_none().0)) } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_discoverer_info_get_live")] #[doc(alias = "get_live")] pub fn is_live(&self) -> bool { diff --git a/gstreamer-pbutils/src/auto/encoding_profile.rs b/gstreamer-pbutils/src/auto/encoding_profile.rs index 391dcea75..92447361b 100644 --- a/gstreamer-pbutils/src/auto/encoding_profile.rs +++ b/gstreamer-pbutils/src/auto/encoding_profile.rs @@ -68,8 +68,6 @@ unsafe impl Send for EncodingProfile {} unsafe impl Sync for EncodingProfile {} pub trait EncodingProfileExt: 'static { - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_encoding_profile_copy")] #[must_use] fn copy(&self) -> EncodingProfile; @@ -142,8 +140,6 @@ pub trait EncodingProfileExt: 'static { } impl> EncodingProfileExt for O { - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn copy(&self) -> EncodingProfile { unsafe { from_glib_full(ffi::gst_encoding_profile_copy( diff --git a/gstreamer-pbutils/src/auto/functions.rs b/gstreamer-pbutils/src/auto/functions.rs index ee6e234e4..be622fec9 100644 --- a/gstreamer-pbutils/src/auto/functions.rs +++ b/gstreamer-pbutils/src/auto/functions.rs @@ -10,8 +10,6 @@ use crate::PbUtilsCapsDescriptionFlags; use glib::translate::*; use std::mem; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_codec_utils_aac_get_channels")] pub fn codec_utils_aac_get_channels(audio_config: &[u8]) -> u32 { assert_initialized_main_thread!(); @@ -51,8 +49,6 @@ pub fn codec_utils_aac_get_profile(audio_config: &[u8]) -> Result u32 { assert_initialized_main_thread!(); diff --git a/gstreamer-pbutils/sys/Cargo.toml b/gstreamer-pbutils/sys/Cargo.toml index 9df17f8bd..80ee2a43c 100644 --- a/gstreamer-pbutils/sys/Cargo.toml +++ b/gstreamer-pbutils/sys/Cargo.toml @@ -29,12 +29,8 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_10 = [] -v1_12 = ["v1_10"] -v1_14 = ["v1_12_1"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] -v1_12_1 = ["v1_12"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] dox = [] @@ -60,18 +56,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_pbutils_1_0] name = "gstreamer-pbutils-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_pbutils_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_pbutils_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_pbutils_1_0.v1_12_1] -version = "1.12.1" - -[package.metadata.system-deps.gstreamer_pbutils_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_pbutils_1_0.v1_16] diff --git a/gstreamer-pbutils/sys/Gir.toml b/gstreamer-pbutils/sys/Gir.toml index 2ef8c9de2..d7a447359 100644 --- a/gstreamer-pbutils/sys/Gir.toml +++ b/gstreamer-pbutils/sys/Gir.toml @@ -2,16 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstPbutils" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] ignore = [ diff --git a/gstreamer-pbutils/sys/src/lib.rs b/gstreamer-pbutils/sys/src/lib.rs index c1cffaf17..a5dcbf75b 100644 --- a/gstreamer-pbutils/sys/src/lib.rs +++ b/gstreamer-pbutils/sys/src/lib.rs @@ -433,8 +433,6 @@ extern "C" { //========================================================================= pub fn gst_install_plugins_context_get_type() -> GType; pub fn gst_install_plugins_context_new() -> *mut GstInstallPluginsContext; - #[cfg(any(feature = "v1_12_1", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12_1")))] pub fn gst_install_plugins_context_copy( ctx: *mut GstInstallPluginsContext, ) -> *mut GstInstallPluginsContext; @@ -483,8 +481,6 @@ extern "C" { //========================================================================= pub fn gst_discoverer_audio_info_get_type() -> GType; pub fn gst_discoverer_audio_info_get_bitrate(info: *const GstDiscovererAudioInfo) -> c_uint; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_discoverer_audio_info_get_channel_mask(info: *const GstDiscovererAudioInfo) -> u64; pub fn gst_discoverer_audio_info_get_channels(info: *const GstDiscovererAudioInfo) -> c_uint; pub fn gst_discoverer_audio_info_get_depth(info: *const GstDiscovererAudioInfo) -> c_uint; @@ -521,8 +517,6 @@ extern "C" { info: *mut GstDiscovererInfo, ) -> *mut glib::GList; pub fn gst_discoverer_info_get_duration(info: *const GstDiscovererInfo) -> gst::GstClockTime; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_discoverer_info_get_live(info: *const GstDiscovererInfo) -> gboolean; pub fn gst_discoverer_info_get_misc(info: *const GstDiscovererInfo) -> *const gst::GstStructure; @@ -661,8 +655,6 @@ extern "C" { pub fn gst_encoding_profile_from_discoverer( info: *mut GstDiscovererInfo, ) -> *mut GstEncodingProfile; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_encoding_profile_copy(self_: *mut GstEncodingProfile) -> *mut GstEncodingProfile; pub fn gst_encoding_profile_get_allow_dynamic_output( profile: *mut GstEncodingProfile, @@ -805,14 +797,10 @@ extern "C" { audio_config: *const u8, len: c_uint, ) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_codec_utils_aac_get_channels(audio_config: *const u8, len: c_uint) -> c_uint; pub fn gst_codec_utils_aac_get_index_from_sample_rate(rate: c_uint) -> c_int; pub fn gst_codec_utils_aac_get_level(audio_config: *const u8, len: c_uint) -> *const c_char; pub fn gst_codec_utils_aac_get_profile(audio_config: *const u8, len: c_uint) -> *const c_char; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_codec_utils_aac_get_sample_rate(audio_config: *const u8, len: c_uint) -> c_uint; pub fn gst_codec_utils_aac_get_sample_rate_from_index(sr_idx: c_uint) -> c_uint; #[cfg(any(feature = "v1_22", feature = "dox"))] diff --git a/gstreamer-player/Cargo.toml b/gstreamer-player/Cargo.toml index f17df531b..d57281583 100644 --- a/gstreamer-player/Cargo.toml +++ b/gstreamer-player/Cargo.toml @@ -18,8 +18,8 @@ bitflags = "1.0" libc = "0.2" ffi = { package = "gstreamer-player-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } -gst = { package = "gstreamer", path = "../gstreamer", features = ["v1_12"] } -gst-video = { package = "gstreamer-video", path = "../gstreamer-video", features = ["v1_12"] } +gst = { package = "gstreamer", path = "../gstreamer" } +gst-video = { package = "gstreamer-video", path = "../gstreamer-video" } once_cell = "1.0" [dev-dependencies] @@ -27,8 +27,7 @@ gir-format-check = "0.1" [features] default = [] -v1_14 = ["gst/v1_14", "gst-video/v1_14", "ffi/v1_14"] -v1_16 = ["gst/v1_16", "gst-video/v1_16", "ffi/v1_16", "v1_14"] +v1_16 = ["gst/v1_16", "gst-video/v1_16", "ffi/v1_16"] v1_18 = ["gst/v1_18", "gst-video/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "gst-video/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "gst-video/v1_22", "ffi/v1_22", "v1_20"] diff --git a/gstreamer-player/Gir.toml b/gstreamer-player/Gir.toml index 2e33b7262..3bca8ebf5 100644 --- a/gstreamer-player/Gir.toml +++ b/gstreamer-player/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "GstPlayer" version = "1.0" -min_cfg_version = "1.12" +min_cfg_version = "1.14" work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true @@ -78,10 +78,6 @@ final_type = true # Custom type manual = true - [[object.function]] - name = "new" - ignore = true - [[object.function]] name = "get_config" # Custom type diff --git a/gstreamer-player/README.md b/gstreamer-player/README.md index 25de2c113..7a96ebdee 100644 --- a/gstreamer-player/README.md +++ b/gstreamer-player/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-player/src/auto/player.rs b/gstreamer-player/src/auto/player.rs index 7027df4ad..755e95aa3 100644 --- a/gstreamer-player/src/auto/player.rs +++ b/gstreamer-player/src/auto/player.rs @@ -6,12 +6,14 @@ use crate::PlayerAudioInfo; use crate::PlayerColorBalanceType; use crate::PlayerMediaInfo; +use crate::PlayerSignalDispatcher; use crate::PlayerSnapshotFormat; use crate::PlayerState; use crate::PlayerSubtitleInfo; use crate::PlayerVideoInfo; use crate::PlayerVideoRenderer; use crate::PlayerVisualization; +use glib::object::IsA; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; @@ -31,6 +33,20 @@ glib::wrapper! { } impl Player { + #[doc(alias = "gst_player_new")] + pub fn new( + video_renderer: Option<&impl IsA>, + signal_dispatcher: Option<&impl IsA>, + ) -> Player { + assert_initialized_main_thread!(); + unsafe { + from_glib_full(ffi::gst_player_new( + video_renderer.map(|p| p.as_ref()).to_glib_full(), + signal_dispatcher.map(|p| p.as_ref()).to_glib_full(), + )) + } + } + #[doc(alias = "gst_player_get_audio_video_offset")] #[doc(alias = "get_audio_video_offset")] pub fn audio_video_offset(&self) -> i64 { diff --git a/gstreamer-player/src/player.rs b/gstreamer-player/src/player.rs index 58c4fc066..623224855 100644 --- a/gstreamer-player/src/player.rs +++ b/gstreamer-player/src/player.rs @@ -1,8 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. use crate::Player; -use crate::PlayerSignalDispatcher; -use crate::PlayerVideoRenderer; use glib::object::ObjectType; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; @@ -11,25 +9,6 @@ use std::boxed::Box as Box_; use std::mem::transmute; impl Player { - #[doc(alias = "gst_player_new")] - pub fn new( - video_renderer: Option<&PlayerVideoRenderer>, - signal_dispatcher: Option<&PlayerSignalDispatcher>, - ) -> Player { - assert_initialized_main_thread!(); - let video_renderer = video_renderer.to_glib_full(); - let signal_dispatcher = signal_dispatcher.to_glib_full(); - - let (major, minor, _, _) = gst::version(); - if (major, minor) > (1, 12) { - unsafe { from_glib_full(ffi::gst_player_new(video_renderer, signal_dispatcher)) } - } else { - // Workaround for bad floating reference handling in 1.12. This issue was fixed for 1.13 in - // https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/gst-libs/gst/player/gstplayer.c?id=634cd87c76f58b5e1383715bafd5614db825c7d1 - unsafe { from_glib_none(ffi::gst_player_new(video_renderer, signal_dispatcher)) } - } - } - #[doc(alias = "get_config")] #[doc(alias = "gst_player_get_config")] pub fn config(&self) -> crate::PlayerConfig { diff --git a/gstreamer-player/sys/Cargo.toml b/gstreamer-player/sys/Cargo.toml index 7d9d3b9e2..b695f87dd 100644 --- a/gstreamer-player/sys/Cargo.toml +++ b/gstreamer-player/sys/Cargo.toml @@ -15,20 +15,17 @@ git = "https://github.com/gtk-rs/gtk-rs-core" [dependencies.gst] package = "gstreamer-sys" path = "../../gstreamer/sys" -features = ["v1_12"] [dependencies.gst_video] package = "gstreamer-video-sys" path = "../../gstreamer-video/sys" -features = ["v1_12"] [dev-dependencies] shell-words = "1.0.0" tempfile = "3" [features] -v1_14 = [] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -55,9 +52,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_player_1_0] name = "gstreamer-player-1.0" -version = "1.12" - -[package.metadata.system-deps.gstreamer_player_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_player_1_0.v1_16] diff --git a/gstreamer-player/sys/Gir.toml b/gstreamer-player/sys/Gir.toml index 8395ac4ac..2c51ad185 100644 --- a/gstreamer-player/sys/Gir.toml +++ b/gstreamer-player/sys/Gir.toml @@ -2,14 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstPlayer" version = "1.0" -min_cfg_version = "1.12" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", ] external_libraries = [ diff --git a/gstreamer-rtp/Cargo.toml b/gstreamer-rtp/Cargo.toml index b3ea476e4..0af9ce4a9 100644 --- a/gstreamer-rtp/Cargo.toml +++ b/gstreamer-rtp/Cargo.toml @@ -26,10 +26,7 @@ gir-format-check = "0.1" [features] default = [] -v1_10 = ["gst/v1_10", "ffi/v1_10"] -v1_12 = ["gst/v1_12", "ffi/v1_12", "v1_10"] -v1_14 = ["gst/v1_14", "ffi/v1_14", "v1_12"] -v1_16 = ["gst/v1_16", "ffi/v1_16", "v1_14"] +v1_16 = ["gst/v1_16", "ffi/v1_16"] v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] diff --git a/gstreamer-rtp/Gir.toml b/gstreamer-rtp/Gir.toml index 467ccd678..939f1bba7 100644 --- a/gstreamer-rtp/Gir.toml +++ b/gstreamer-rtp/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "GstRtp" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true diff --git a/gstreamer-rtp/README.md b/gstreamer-rtp/README.md index ae2715379..37b887084 100644 --- a/gstreamer-rtp/README.md +++ b/gstreamer-rtp/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-rtp/src/auto/flags.rs b/gstreamer-rtp/src/auto/flags.rs index b659cb14e..a63dde577 100644 --- a/gstreamer-rtp/src/auto/flags.rs +++ b/gstreamer-rtp/src/auto/flags.rs @@ -10,9 +10,7 @@ use glib::value::ToValue; use glib::StaticType; use glib::Type; -#[cfg(any(feature = "v1_10", feature = "dox"))] bitflags! { - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "GstRTPBufferFlags")] pub struct RTPBufferFlags: u32 { #[doc(alias = "GST_RTP_BUFFER_FLAG_RETRANSMISSION")] @@ -22,8 +20,6 @@ bitflags! { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] impl IntoGlib for RTPBufferFlags { type GlibType = ffi::GstRTPBufferFlags; @@ -33,8 +29,6 @@ impl IntoGlib for RTPBufferFlags { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] impl FromGlib for RTPBufferFlags { unsafe fn from_glib(value: ffi::GstRTPBufferFlags) -> Self { @@ -43,22 +37,16 @@ impl FromGlib for RTPBufferFlags { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StaticType for RTPBufferFlags { fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtp_buffer_flags_get_type()) } } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl glib::value::ValueType for RTPBufferFlags { type Type = Self; } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] unsafe impl<'a> FromValue<'a> for RTPBufferFlags { type Checker = glib::value::GenericValueTypeChecker; @@ -68,8 +56,6 @@ unsafe impl<'a> FromValue<'a> for RTPBufferFlags { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl ToValue for RTPBufferFlags { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); diff --git a/gstreamer-rtp/src/auto/mod.rs b/gstreamer-rtp/src/auto/mod.rs index 210833bd5..05684233e 100644 --- a/gstreamer-rtp/src/auto/mod.rs +++ b/gstreamer-rtp/src/auto/mod.rs @@ -21,8 +21,6 @@ pub use self::enums::RTPPayload; pub use self::enums::RTPProfile; mod flags; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub use self::flags::RTPBufferFlags; pub use self::flags::RTPBufferMapFlags; #[cfg(any(feature = "v1_20", feature = "dox"))] diff --git a/gstreamer-rtp/sys/Cargo.toml b/gstreamer-rtp/sys/Cargo.toml index 8be085580..303d6344f 100644 --- a/gstreamer-rtp/sys/Cargo.toml +++ b/gstreamer-rtp/sys/Cargo.toml @@ -21,10 +21,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_10 = [] -v1_12 = ["v1_10"] -v1_14 = ["v1_12"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -51,15 +48,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_rtp_1_0] name = "gstreamer-rtp-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_rtp_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_rtp_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_rtp_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_rtp_1_0.v1_16] diff --git a/gstreamer-rtp/sys/Gir.toml b/gstreamer-rtp/sys/Gir.toml index 19b3b812e..5277db735 100644 --- a/gstreamer-rtp/sys/Gir.toml +++ b/gstreamer-rtp/sys/Gir.toml @@ -2,16 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstRtp" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] external_libraries = [ diff --git a/gstreamer-rtp/sys/src/lib.rs b/gstreamer-rtp/sys/src/lib.rs index 082f95360..f2b529f78 100644 --- a/gstreamer-rtp/sys/src/lib.rs +++ b/gstreamer-rtp/sys/src/lib.rs @@ -631,8 +631,6 @@ extern "C" { //========================================================================= // GstRTPBufferFlags //========================================================================= - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_rtp_buffer_flags_get_type() -> GType; //========================================================================= @@ -684,8 +682,6 @@ extern "C" { //========================================================================= // GstRTCPPacket //========================================================================= - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_rtcp_packet_add_profile_specific_ext( packet: *mut GstRTCPPacket, data: *const u8, @@ -701,35 +697,17 @@ extern "C" { lsr: u32, dlsr: u32, ) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_rtcp_packet_app_get_data(packet: *mut GstRTCPPacket) -> *mut u8; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_rtcp_packet_app_get_data_length(packet: *mut GstRTCPPacket) -> u16; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_rtcp_packet_app_get_name(packet: *mut GstRTCPPacket) -> *const c_char; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_rtcp_packet_app_get_ssrc(packet: *mut GstRTCPPacket) -> u32; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_rtcp_packet_app_get_subtype(packet: *mut GstRTCPPacket) -> u8; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_rtcp_packet_app_set_data_length( packet: *mut GstRTCPPacket, wordlen: u16, ) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_rtcp_packet_app_set_name(packet: *mut GstRTCPPacket, name: *const c_char); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_rtcp_packet_app_set_ssrc(packet: *mut GstRTCPPacket, ssrc: u32); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_rtcp_packet_app_set_subtype(packet: *mut GstRTCPPacket, subtype: u8); pub fn gst_rtcp_packet_bye_add_ssrc(packet: *mut GstRTCPPacket, ssrc: u32) -> gboolean; pub fn gst_rtcp_packet_bye_add_ssrcs( @@ -745,8 +723,6 @@ extern "C" { packet: *mut GstRTCPPacket, reason: *const c_char, ) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_rtcp_packet_copy_profile_specific_ext( packet: *mut GstRTCPPacket, data: *mut *mut u8, @@ -764,15 +740,11 @@ extern "C" { pub fn gst_rtcp_packet_get_count(packet: *mut GstRTCPPacket) -> u8; pub fn gst_rtcp_packet_get_length(packet: *mut GstRTCPPacket) -> u16; pub fn gst_rtcp_packet_get_padding(packet: *mut GstRTCPPacket) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_rtcp_packet_get_profile_specific_ext( packet: *mut GstRTCPPacket, data: *mut *mut u8, len: *mut c_uint, ) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_rtcp_packet_get_profile_specific_ext_length(packet: *mut GstRTCPPacket) -> u16; pub fn gst_rtcp_packet_get_rb( packet: *mut GstRTCPPacket, diff --git a/gstreamer-rtsp-server/Cargo.toml b/gstreamer-rtsp-server/Cargo.toml index c4ac51185..0a07b556b 100644 --- a/gstreamer-rtsp-server/Cargo.toml +++ b/gstreamer-rtsp-server/Cargo.toml @@ -30,10 +30,7 @@ gir-format-check = "0.1" [features] default = [] -v1_10 = ["gst/v1_10", "gst-sdp/v1_10", "gst-rtsp/v1_10", "gst-net/v1_10", "ffi/v1_10"] -v1_12 = ["gst/v1_12", "gst-sdp/v1_12", "gst-rtsp/v1_12", "gst-net/v1_12", "ffi/v1_12", "v1_10"] -v1_14 = ["gst/v1_14", "gst-sdp/v1_14", "gst-rtsp/v1_14", "gst-net/v1_14", "ffi/v1_14", "v1_12"] -v1_16 = ["gst/v1_16", "gst-sdp/v1_16", "gst-rtsp/v1_16", "gst-net/v1_16", "ffi/v1_16", "v1_14"] +v1_16 = ["gst/v1_16", "gst-sdp/v1_16", "gst-rtsp/v1_16", "gst-net/v1_16", "ffi/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_22 = ["gst/v1_22", "gst-sdp/v1_22", "gst-rtsp/v1_22", "gst-net/v1_22", "ffi/v1_22", "v1_20"] diff --git a/gstreamer-rtsp-server/Gir.toml b/gstreamer-rtsp-server/Gir.toml index 3f0d85ca8..50927885d 100644 --- a/gstreamer-rtsp-server/Gir.toml +++ b/gstreamer-rtsp-server/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "GstRtspServer" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true diff --git a/gstreamer-rtsp-server/README.md b/gstreamer-rtsp-server/README.md index 8a6e9dd32..bb300744a 100644 --- a/gstreamer-rtsp-server/README.md +++ b/gstreamer-rtsp-server/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-rtsp-server/src/auto/mod.rs b/gstreamer-rtsp-server/src/auto/mod.rs index 764d382f6..ba412286a 100644 --- a/gstreamer-rtsp-server/src/auto/mod.rs +++ b/gstreamer-rtsp-server/src/auto/mod.rs @@ -24,32 +24,16 @@ pub use self::rtsp_media_factory_uri::RTSPMediaFactoryURI; mod rtsp_mount_points; pub use self::rtsp_mount_points::RTSPMountPoints; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod rtsp_onvif_client; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use self::rtsp_onvif_client::RTSPOnvifClient; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod rtsp_onvif_media; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use self::rtsp_onvif_media::RTSPOnvifMedia; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod rtsp_onvif_media_factory; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use self::rtsp_onvif_media_factory::RTSPOnvifMediaFactory; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod rtsp_onvif_server; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use self::rtsp_onvif_server::RTSPOnvifServer; mod rtsp_server; @@ -97,11 +81,7 @@ pub mod traits { pub use super::rtsp_media_factory::RTSPMediaFactoryExt; pub use super::rtsp_media_factory_uri::RTSPMediaFactoryURIExt; pub use super::rtsp_mount_points::RTSPMountPointsExt; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::rtsp_onvif_media::RTSPOnvifMediaExt; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::rtsp_onvif_media_factory::RTSPOnvifMediaFactoryExt; pub use super::rtsp_server::RTSPServerExt; pub use super::rtsp_session::RTSPSessionExt; diff --git a/gstreamer-rtsp-server/src/auto/rtsp_auth.rs b/gstreamer-rtsp-server/src/auto/rtsp_auth.rs index ce34efe2a..bda761119 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_auth.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_auth.rs @@ -66,8 +66,6 @@ pub trait RTSPAuthExt: 'static { #[doc(alias = "gst_rtsp_auth_add_basic")] fn add_basic(&self, basic: &str, token: &RTSPToken); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_rtsp_auth_add_digest")] fn add_digest(&self, user: &str, pass: &str, token: &RTSPToken); @@ -81,8 +79,6 @@ pub trait RTSPAuthExt: 'static { #[doc(alias = "get_realm")] fn realm(&self) -> Option; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_rtsp_auth_get_supported_methods")] #[doc(alias = "get_supported_methods")] fn supported_methods(&self) -> gst_rtsp::RTSPAuthMethod; @@ -107,8 +103,6 @@ pub trait RTSPAuthExt: 'static { #[doc(alias = "gst_rtsp_auth_remove_basic")] fn remove_basic(&self, basic: &str); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_rtsp_auth_remove_digest")] fn remove_digest(&self, user: &str); @@ -117,8 +111,6 @@ pub trait RTSPAuthExt: 'static { #[doc(alias = "gst_rtsp_auth_set_realm")] fn set_realm(&self, realm: &str); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_rtsp_auth_set_supported_methods")] fn set_supported_methods(&self, methods: gst_rtsp::RTSPAuthMethod); @@ -154,8 +146,6 @@ impl> RTSPAuthExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn add_digest(&self, user: &str, pass: &str, token: &RTSPToken) { unsafe { ffi::gst_rtsp_auth_add_digest( @@ -181,8 +171,6 @@ impl> RTSPAuthExt for O { unsafe { from_glib_full(ffi::gst_rtsp_auth_get_realm(self.as_ref().to_glib_none().0)) } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn supported_methods(&self) -> gst_rtsp::RTSPAuthMethod { unsafe { from_glib(ffi::gst_rtsp_auth_get_supported_methods( @@ -233,8 +221,6 @@ impl> RTSPAuthExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn remove_digest(&self, user: &str) { unsafe { ffi::gst_rtsp_auth_remove_digest(self.as_ref().to_glib_none().0, user.to_glib_none().0); @@ -249,8 +235,6 @@ impl> RTSPAuthExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn set_supported_methods(&self, methods: gst_rtsp::RTSPAuthMethod) { unsafe { ffi::gst_rtsp_auth_set_supported_methods( diff --git a/gstreamer-rtsp-server/src/auto/rtsp_client.rs b/gstreamer-rtsp-server/src/auto/rtsp_client.rs index 3b5a81796..69bd43f1d 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_client.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_client.rs @@ -190,8 +190,6 @@ pub trait RTSPClientExt: 'static { f: F, ) -> SignalHandlerId; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "pre-announce-request")] fn connect_pre_announce_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, @@ -200,8 +198,6 @@ pub trait RTSPClientExt: 'static { f: F, ) -> SignalHandlerId; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "pre-describe-request")] fn connect_pre_describe_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, @@ -210,8 +206,6 @@ pub trait RTSPClientExt: 'static { f: F, ) -> SignalHandlerId; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "pre-get-parameter-request")] fn connect_pre_get_parameter_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, @@ -220,8 +214,6 @@ pub trait RTSPClientExt: 'static { f: F, ) -> SignalHandlerId; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "pre-options-request")] fn connect_pre_options_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, @@ -230,8 +222,6 @@ pub trait RTSPClientExt: 'static { f: F, ) -> SignalHandlerId; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "pre-pause-request")] fn connect_pre_pause_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, @@ -240,8 +230,6 @@ pub trait RTSPClientExt: 'static { f: F, ) -> SignalHandlerId; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "pre-play-request")] fn connect_pre_play_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, @@ -250,8 +238,6 @@ pub trait RTSPClientExt: 'static { f: F, ) -> SignalHandlerId; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "pre-record-request")] fn connect_pre_record_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, @@ -260,8 +246,6 @@ pub trait RTSPClientExt: 'static { f: F, ) -> SignalHandlerId; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "pre-set-parameter-request")] fn connect_pre_set_parameter_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, @@ -270,8 +254,6 @@ pub trait RTSPClientExt: 'static { f: F, ) -> SignalHandlerId; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "pre-setup-request")] fn connect_pre_setup_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, @@ -280,8 +262,6 @@ pub trait RTSPClientExt: 'static { f: F, ) -> SignalHandlerId; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "pre-teardown-request")] fn connect_pre_teardown_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, @@ -797,8 +777,6 @@ impl> RTSPClientExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn connect_pre_announce_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -833,8 +811,6 @@ impl> RTSPClientExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn connect_pre_describe_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -869,8 +845,6 @@ impl> RTSPClientExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn connect_pre_get_parameter_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -905,8 +879,6 @@ impl> RTSPClientExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn connect_pre_options_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -941,8 +913,6 @@ impl> RTSPClientExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn connect_pre_pause_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -977,8 +947,6 @@ impl> RTSPClientExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn connect_pre_play_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -1013,8 +981,6 @@ impl> RTSPClientExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn connect_pre_record_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -1049,8 +1015,6 @@ impl> RTSPClientExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn connect_pre_set_parameter_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -1085,8 +1049,6 @@ impl> RTSPClientExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn connect_pre_setup_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -1121,8 +1083,6 @@ impl> RTSPClientExt for O { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn connect_pre_teardown_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_media.rs index fc2390a12..4dd3b3fbe 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media.rs @@ -50,8 +50,6 @@ pub trait RTSPMediaExt: 'static { #[doc(alias = "gst_rtsp_media_collect_streams")] fn collect_streams(&self); - //#[cfg(any(feature = "v1_14", feature = "dox"))] - //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] //#[doc(alias = "gst_rtsp_media_complete_pipeline")] //fn complete_pipeline(&self, transports: /*Ignored*/&[gst_rtsp::RTSPTransport]) -> bool; @@ -224,8 +222,6 @@ pub trait RTSPMediaExt: 'static { //#[doc(alias = "gst_rtsp_media_seek_trickmode")] //fn seek_trickmode(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags, rate: f64, trickmode_interval: impl Into>) -> bool; - //#[cfg(any(feature = "v1_14", feature = "dox"))] - //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] //#[doc(alias = "gst_rtsp_media_seekable")] //fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff; @@ -467,8 +463,6 @@ impl> RTSPMediaExt for O { } } - //#[cfg(any(feature = "v1_14", feature = "dox"))] - //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] //fn complete_pipeline(&self, transports: /*Ignored*/&[gst_rtsp::RTSPTransport]) -> bool { // unsafe { TODO: call ffi:gst_rtsp_media_complete_pipeline() } //} @@ -797,8 +791,6 @@ impl> RTSPMediaExt for O { // unsafe { TODO: call ffi:gst_rtsp_media_seek_trickmode() } //} - //#[cfg(any(feature = "v1_14", feature = "dox"))] - //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] //fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff { // unsafe { TODO: call ffi:gst_rtsp_media_seekable() } //} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_onvif_media_factory.rs b/gstreamer-rtsp-server/src/auto/rtsp_onvif_media_factory.rs index 92810979f..f5e2c19c1 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_onvif_media_factory.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_onvif_media_factory.rs @@ -29,8 +29,6 @@ impl RTSPOnvifMediaFactory { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] impl Default for RTSPOnvifMediaFactory { fn default() -> Self { Self::new() diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs index 94bffb3d0..4ef7db33f 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs @@ -60,8 +60,6 @@ pub trait RTSPSessionMediaExt: 'static { #[doc(alias = "get_transport")] fn transport(&self, idx: u32) -> Option; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_rtsp_session_media_get_transports")] #[doc(alias = "get_transports")] fn transports(&self) -> Vec; @@ -121,8 +119,6 @@ impl> RTSPSessionMediaExt for O { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn transports(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_session_media_get_transports( diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs index dd9fee3eb..056549512 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs @@ -70,8 +70,6 @@ pub trait RTSPStreamExt: 'static { //#[doc(alias = "gst_rtsp_stream_allocate_udp_sockets")] //fn allocate_udp_sockets(&self, family: gio::SocketFamily, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport, use_client_settings: bool) -> bool; - //#[cfg(any(feature = "v1_14", feature = "dox"))] - //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] //#[doc(alias = "gst_rtsp_stream_complete_stream")] //fn complete_stream(&self, transport: /*Ignored*/&gst_rtsp::RTSPTransport) -> bool; @@ -167,8 +165,6 @@ pub trait RTSPStreamExt: 'static { #[doc(alias = "get_retransmission_time")] fn retransmission_time(&self) -> Option; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_rtsp_stream_get_rtcp_multicast_socket")] #[doc(alias = "get_rtcp_multicast_socket")] fn rtcp_multicast_socket(&self, family: gio::SocketFamily) -> Option; @@ -248,18 +244,12 @@ pub trait RTSPStreamExt: 'static { #[doc(alias = "gst_rtsp_stream_is_client_side")] fn is_client_side(&self) -> bool; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_rtsp_stream_is_complete")] fn is_complete(&self) -> bool; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_rtsp_stream_is_receiver")] fn is_receiver(&self) -> bool; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_rtsp_stream_is_sender")] fn is_sender(&self) -> bool; @@ -324,8 +314,6 @@ pub trait RTSPStreamExt: 'static { ttl: u32, ) -> Option; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_rtsp_stream_seekable")] fn seekable(&self) -> bool; @@ -495,8 +483,6 @@ impl> RTSPStreamExt for O { // unsafe { TODO: call ffi:gst_rtsp_stream_allocate_udp_sockets() } //} - //#[cfg(any(feature = "v1_14", feature = "dox"))] - //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] //fn complete_stream(&self, transport: /*Ignored*/&gst_rtsp::RTSPTransport) -> bool { // unsafe { TODO: call ffi:gst_rtsp_stream_complete_stream() } //} @@ -657,8 +643,6 @@ impl> RTSPStreamExt for O { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn rtcp_multicast_socket(&self, family: gio::SocketFamily) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_rtcp_multicast_socket( @@ -831,8 +815,6 @@ impl> RTSPStreamExt for O { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn is_complete(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_is_complete( @@ -841,8 +823,6 @@ impl> RTSPStreamExt for O { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn is_receiver(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_is_receiver( @@ -851,8 +831,6 @@ impl> RTSPStreamExt for O { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn is_sender(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_is_sender( @@ -999,8 +977,6 @@ impl> RTSPStreamExt for O { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn seekable(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_seekable( diff --git a/gstreamer-rtsp-server/src/lib.rs b/gstreamer-rtsp-server/src/lib.rs index 050d2ad3a..2c22c81b8 100644 --- a/gstreamer-rtsp-server/src/lib.rs +++ b/gstreamer-rtsp-server/src/lib.rs @@ -41,8 +41,6 @@ mod rtsp_client; mod rtsp_context; mod rtsp_media; mod rtsp_media_factory; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod rtsp_onvif_media_factory; mod rtsp_server; mod rtsp_session_pool; @@ -132,8 +130,6 @@ pub mod prelude { pub use crate::rtsp_client::RTSPClientExtManual; pub use crate::rtsp_media::RTSPMediaExtManual; pub use crate::rtsp_media_factory::RTSPMediaFactoryExtManual; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use crate::rtsp_onvif_media_factory::RTSPOnvifMediaFactoryExtManual; pub use crate::rtsp_server::RTSPServerExtManual; pub use crate::rtsp_session_pool::RTSPSessionPoolExtManual; diff --git a/gstreamer-rtsp-server/src/rtsp_media_factory.rs b/gstreamer-rtsp-server/src/rtsp_media_factory.rs index cd264c09d..d7f1e04e2 100644 --- a/gstreamer-rtsp-server/src/rtsp_media_factory.rs +++ b/gstreamer-rtsp-server/src/rtsp_media_factory.rs @@ -3,20 +3,14 @@ use crate::RTSPMediaFactory; use glib::prelude::*; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use glib::translate::*; pub trait RTSPMediaFactoryExtManual: 'static { - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_rtsp_media_factory_add_role_from_structure")] fn add_role_from_structure(&self, structure: &gst::StructureRef); } impl> RTSPMediaFactoryExtManual for O { - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn add_role_from_structure(&self, structure: &gst::StructureRef) { unsafe { ffi::gst_rtsp_media_factory_add_role_from_structure( diff --git a/gstreamer-rtsp-server/src/subclass/mod.rs b/gstreamer-rtsp-server/src/subclass/mod.rs index 468bfb36b..2bd497c03 100644 --- a/gstreamer-rtsp-server/src/subclass/mod.rs +++ b/gstreamer-rtsp-server/src/subclass/mod.rs @@ -8,17 +8,9 @@ mod rtsp_media_factory; mod rtsp_mount_points; mod rtsp_server; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod rtsp_onvif_client; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod rtsp_onvif_media; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod rtsp_onvif_media_factory; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod rtsp_onvif_server; pub use self::rtsp_media::SDPInfo; @@ -31,19 +23,11 @@ pub mod prelude { pub use super::rtsp_media::{RTSPMediaImpl, RTSPMediaImplExt}; pub use super::rtsp_media_factory::{RTSPMediaFactoryImpl, RTSPMediaFactoryImplExt}; pub use super::rtsp_mount_points::{RTSPMountPointsImpl, RTSPMountPointsImplExt}; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::rtsp_onvif_client::RTSPOnvifClientImpl; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::rtsp_onvif_media::RTSPOnvifMediaImpl; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::rtsp_onvif_media_factory::{ RTSPOnvifMediaFactoryImpl, RTSPOnvifMediaFactoryImplExt, }; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::rtsp_onvif_server::RTSPOnvifServerImpl; pub use super::rtsp_server::{RTSPServerImpl, RTSPServerImplExt}; } diff --git a/gstreamer-rtsp-server/sys/Cargo.toml b/gstreamer-rtsp-server/sys/Cargo.toml index 6bc55ef07..f107cbd1c 100644 --- a/gstreamer-rtsp-server/sys/Cargo.toml +++ b/gstreamer-rtsp-server/sys/Cargo.toml @@ -37,10 +37,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_10 = [] -v1_12 = ["v1_10"] -v1_14 = ["v1_12"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -67,15 +64,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_rtsp_server_1_0] name = "gstreamer-rtsp-server-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_rtsp_server_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_rtsp_server_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_rtsp_server_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_rtsp_server_1_0.v1_16] diff --git a/gstreamer-rtsp-server/sys/Gir.toml b/gstreamer-rtsp-server/sys/Gir.toml index 0a570f346..37aab2a42 100644 --- a/gstreamer-rtsp-server/sys/Gir.toml +++ b/gstreamer-rtsp-server/sys/Gir.toml @@ -2,16 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstRtspServer" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] external_libraries = [ diff --git a/gstreamer-rtsp-server/sys/src/lib.rs b/gstreamer-rtsp-server/sys/src/lib.rs index af6e1d4bb..58514df5c 100644 --- a/gstreamer-rtsp-server/sys/src/lib.rs +++ b/gstreamer-rtsp-server/sys/src/lib.rs @@ -1331,8 +1331,6 @@ extern "C" { //========================================================================= pub fn gst_rtsp_permissions_get_type() -> GType; pub fn gst_rtsp_permissions_new() -> *mut GstRTSPPermissions; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_permissions_add_permission_for_role( permissions: *mut GstRTSPPermissions, role: *const c_char, @@ -1345,14 +1343,10 @@ extern "C" { fieldname: *const c_char, ... ); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_permissions_add_role_empty( permissions: *mut GstRTSPPermissions, role: *const c_char, ); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_permissions_add_role_from_structure( permissions: *mut GstRTSPPermissions, structure: *mut gst::GstStructure, @@ -1393,15 +1387,11 @@ extern "C" { ) -> *const c_char; pub fn gst_rtsp_token_get_structure(token: *mut GstRTSPToken) -> *const gst::GstStructure; pub fn gst_rtsp_token_is_allowed(token: *mut GstRTSPToken, field: *const c_char) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_token_set_bool( token: *mut GstRTSPToken, field: *const c_char, bool_value: gboolean, ); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_token_set_string( token: *mut GstRTSPToken, field: *const c_char, @@ -1451,8 +1441,6 @@ extern "C" { basic: *const c_char, token: *mut GstRTSPToken, ); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_rtsp_auth_add_digest( auth: *mut GstRTSPAuth, user: *const c_char, @@ -1463,8 +1451,6 @@ extern "C" { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn gst_rtsp_auth_get_realm(auth: *mut GstRTSPAuth) -> *mut c_char; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_rtsp_auth_get_supported_methods( auth: *mut GstRTSPAuth, ) -> gst_rtsp::GstRTSPAuthMethod; @@ -1481,15 +1467,11 @@ extern "C" { token: *mut GstRTSPToken, ) -> gboolean; pub fn gst_rtsp_auth_remove_basic(auth: *mut GstRTSPAuth, basic: *const c_char); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_rtsp_auth_remove_digest(auth: *mut GstRTSPAuth, user: *const c_char); pub fn gst_rtsp_auth_set_default_token(auth: *mut GstRTSPAuth, token: *mut GstRTSPToken); #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn gst_rtsp_auth_set_realm(auth: *mut GstRTSPAuth, realm: *const c_char); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_rtsp_auth_set_supported_methods( auth: *mut GstRTSPAuth, methods: gst_rtsp::GstRTSPAuthMethod, @@ -1585,8 +1567,6 @@ extern "C" { pub fn gst_rtsp_media_get_type() -> GType; pub fn gst_rtsp_media_new(element: *mut gst::GstElement) -> *mut GstRTSPMedia; pub fn gst_rtsp_media_collect_streams(media: *mut GstRTSPMedia); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_media_complete_pipeline( media: *mut GstRTSPMedia, transports: *mut glib::GPtrArray, @@ -1691,8 +1671,6 @@ extern "C" { rate: c_double, trickmode_interval: gst::GstClockTime, ) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_media_seekable(media: *mut GstRTSPMedia) -> gst::GstClockTimeDiff; pub fn gst_rtsp_media_set_address_pool(media: *mut GstRTSPMedia, pool: *mut GstRTSPAddressPool); #[cfg(any(feature = "v1_16", feature = "dox"))] @@ -1783,8 +1761,6 @@ extern "C" { fieldname: *const c_char, ... ); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_media_factory_add_role_from_structure( factory: *mut GstRTSPMediaFactory, structure: *mut gst::GstStructure, @@ -1980,8 +1956,6 @@ extern "C" { //========================================================================= // GstRTSPOnvifClient //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_client_get_type() -> GType; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] @@ -1990,17 +1964,9 @@ extern "C" { //========================================================================= // GstRTSPOnvifMedia //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_media_get_type() -> GType; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_media_collect_backchannel(media: *mut GstRTSPOnvifMedia) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_media_get_backchannel_bandwidth(media: *mut GstRTSPOnvifMedia) -> c_uint; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_media_set_backchannel_bandwidth( media: *mut GstRTSPOnvifMedia, bandwidth: c_uint, @@ -2009,30 +1975,18 @@ extern "C" { //========================================================================= // GstRTSPOnvifMediaFactory //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_media_factory_get_type() -> GType; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_media_factory_new() -> *mut GstRTSPMediaFactory; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_media_factory_requires_backchannel( factory: *mut GstRTSPMediaFactory, ctx: *mut GstRTSPContext, ) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_media_factory_get_backchannel_bandwidth( factory: *mut GstRTSPOnvifMediaFactory, ) -> c_uint; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_media_factory_get_backchannel_launch( factory: *mut GstRTSPOnvifMediaFactory, ) -> *mut c_char; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_media_factory_has_backchannel_support( factory: *mut GstRTSPOnvifMediaFactory, ) -> gboolean; @@ -2041,14 +1995,10 @@ extern "C" { pub fn gst_rtsp_onvif_media_factory_has_replay_support( factory: *mut GstRTSPOnvifMediaFactory, ) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_media_factory_set_backchannel_bandwidth( factory: *mut GstRTSPOnvifMediaFactory, bandwidth: c_uint, ); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_media_factory_set_backchannel_launch( factory: *mut GstRTSPOnvifMediaFactory, launch: *const c_char, @@ -2063,11 +2013,7 @@ extern "C" { //========================================================================= // GstRTSPOnvifServer //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_server_get_type() -> GType; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_onvif_server_new() -> *mut GstRTSPServer; //========================================================================= @@ -2203,8 +2149,6 @@ extern "C" { media: *mut GstRTSPSessionMedia, idx: c_uint, ) -> *mut GstRTSPStreamTransport; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_session_media_get_transports( media: *mut GstRTSPSessionMedia, ) -> *mut glib::GPtrArray; @@ -2280,8 +2224,6 @@ extern "C" { transport: *mut gst_rtsp::GstRTSPTransport, use_client_settings: gboolean, ) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_stream_complete_stream( stream: *mut GstRTSPStream, transport: *const gst_rtsp::GstRTSPTransport, @@ -2328,8 +2270,6 @@ extern "C" { pub fn gst_rtsp_stream_get_retransmission_pt(stream: *mut GstRTSPStream) -> c_uint; pub fn gst_rtsp_stream_get_retransmission_time(stream: *mut GstRTSPStream) -> gst::GstClockTime; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_stream_get_rtcp_multicast_socket( stream: *mut GstRTSPStream, family: gio::GSocketFamily, @@ -2385,14 +2325,8 @@ extern "C" { pub fn gst_rtsp_stream_is_bind_mcast_address(stream: *mut GstRTSPStream) -> gboolean; pub fn gst_rtsp_stream_is_blocking(stream: *mut GstRTSPStream) -> gboolean; pub fn gst_rtsp_stream_is_client_side(stream: *mut GstRTSPStream) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_stream_is_complete(stream: *mut GstRTSPStream) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_stream_is_receiver(stream: *mut GstRTSPStream) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_stream_is_sender(stream: *mut GstRTSPStream) -> gboolean; pub fn gst_rtsp_stream_is_transport_supported( stream: *mut GstRTSPStream, @@ -2456,8 +2390,6 @@ extern "C" { n_ports: c_uint, ttl: c_uint, ) -> *mut GstRTSPAddress; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_stream_seekable(stream: *mut GstRTSPStream) -> gboolean; pub fn gst_rtsp_stream_set_address_pool( stream: *mut GstRTSPStream, @@ -2669,8 +2601,6 @@ extern "C" { info: *mut GstSDPInfo, stream: *mut GstRTSPStream, ) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_sdp_make_media( sdp: *mut gst_sdp::GstSDPMessage, info: *mut GstSDPInfo, diff --git a/gstreamer-rtsp/Cargo.toml b/gstreamer-rtsp/Cargo.toml index 892dd8099..66df44709 100644 --- a/gstreamer-rtsp/Cargo.toml +++ b/gstreamer-rtsp/Cargo.toml @@ -26,10 +26,7 @@ gir-format-check = "0.1" [features] default = [] -v1_10 = ["gst/v1_10", "gst-sdp/v1_10", "ffi/v1_10"] -v1_12 = ["gst/v1_12", "gst-sdp/v1_12", "ffi/v1_12", "v1_10"] -v1_14 = ["gst/v1_14", "gst-sdp/v1_14", "ffi/v1_14", "v1_12"] -v1_16 = ["gst/v1_16", "gst-sdp/v1_16", "ffi/v1_16", "v1_14"] +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_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"] diff --git a/gstreamer-rtsp/Gir.toml b/gstreamer-rtsp/Gir.toml index e8764dfde..1f90c01ae 100644 --- a/gstreamer-rtsp/Gir.toml +++ b/gstreamer-rtsp/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "GstRtsp" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true diff --git a/gstreamer-rtsp/README.md b/gstreamer-rtsp/README.md index f5396aaf7..557cd3fcc 100644 --- a/gstreamer-rtsp/README.md +++ b/gstreamer-rtsp/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-rtsp/src/auto/mod.rs b/gstreamer-rtsp/src/auto/mod.rs index 6d50ff4c5..fab99d331 100644 --- a/gstreamer-rtsp/src/auto/mod.rs +++ b/gstreamer-rtsp/src/auto/mod.rs @@ -3,11 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] mod rtsp_auth_param; -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub use self::rtsp_auth_param::RTSPAuthParam; mod rtsp_url; diff --git a/gstreamer-rtsp/sys/Cargo.toml b/gstreamer-rtsp/sys/Cargo.toml index a95e011ce..138603d4d 100644 --- a/gstreamer-rtsp/sys/Cargo.toml +++ b/gstreamer-rtsp/sys/Cargo.toml @@ -29,10 +29,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_10 = [] -v1_12 = ["v1_10"] -v1_14 = ["v1_12"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -59,15 +56,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_rtsp_1_0] name = "gstreamer-rtsp-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_rtsp_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_rtsp_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_rtsp_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_rtsp_1_0.v1_16] diff --git a/gstreamer-rtsp/sys/Gir.toml b/gstreamer-rtsp/sys/Gir.toml index 72ae2fe06..e9ccf6dcd 100644 --- a/gstreamer-rtsp/sys/Gir.toml +++ b/gstreamer-rtsp/sys/Gir.toml @@ -2,16 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstRtsp" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] external_libraries = [ diff --git a/gstreamer-rtsp/sys/src/lib.rs b/gstreamer-rtsp/sys/src/lib.rs index 933b498fa..5c59aa118 100644 --- a/gstreamer-rtsp/sys/src/lib.rs +++ b/gstreamer-rtsp/sys/src/lib.rs @@ -781,21 +781,13 @@ extern "C" { //========================================================================= // GstRTSPAuthCredential //========================================================================= - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_rtsp_auth_credential_get_type() -> GType; //========================================================================= // GstRTSPAuthParam //========================================================================= - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_rtsp_auth_param_get_type() -> GType; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_rtsp_auth_param_copy(param: *mut GstRTSPAuthParam) -> *mut GstRTSPAuthParam; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_rtsp_auth_param_free(param: *mut GstRTSPAuthParam); //========================================================================= @@ -938,8 +930,6 @@ extern "C" { message: *mut GstRTSPMessage, timeout: i64, ) -> GstRTSPResult; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_connection_set_accept_certificate_func( conn: *mut GstRTSPConnection, func: GstRTSPConnectionAcceptCertificateFunc, @@ -1031,8 +1021,6 @@ extern "C" { //========================================================================= // GstRTSPMessage //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_msg_get_type() -> GType; pub fn gst_rtsp_message_add_header( msg: *mut GstRTSPMessage, @@ -1048,8 +1036,6 @@ extern "C" { msg: *const GstRTSPMessage, str: *mut glib::GString, ) -> GstRTSPResult; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_message_copy( msg: *const GstRTSPMessage, copy: *mut *mut GstRTSPMessage, @@ -1079,8 +1065,6 @@ extern "C" { value: *mut *mut c_char, index: c_int, ) -> GstRTSPResult; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_rtsp_message_get_type(msg: *mut GstRTSPMessage) -> GstRTSPMsgType; #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] @@ -1098,8 +1082,6 @@ extern "C" { reason: *const c_char, request: *const GstRTSPMessage, ) -> GstRTSPResult; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_rtsp_message_parse_auth_credentials( msg: *mut GstRTSPMessage, field: GstRTSPHeaderField, @@ -1343,13 +1325,9 @@ extern "C" { //========================================================================= // Other functions //========================================================================= - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_rtsp_auth_credentials_free(credentials: *mut *mut GstRTSPAuthCredential); pub fn gst_rtsp_find_header_field(header: *const c_char) -> GstRTSPHeaderField; pub fn gst_rtsp_find_method(method: *const c_char) -> GstRTSPMethod; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_rtsp_generate_digest_auth_response( algorithm: *const c_char, method: *const c_char, diff --git a/gstreamer-sdp/Cargo.toml b/gstreamer-sdp/Cargo.toml index 9a7adba60..d356a2d1e 100644 --- a/gstreamer-sdp/Cargo.toml +++ b/gstreamer-sdp/Cargo.toml @@ -23,11 +23,7 @@ gir-format-check = "0.1" [features] default = [] -v1_8_1 = ["ffi/v1_8_1"] -v1_10 = ["gst/v1_10", "ffi/v1_10", "v1_8_1"] -v1_12 = ["gst/v1_12", "ffi/v1_12", "v1_10"] -v1_14 = ["gst/v1_14", "ffi/v1_14", "v1_12"] -v1_16 = ["gst/v1_16", "ffi/v1_16", "v1_14"] +v1_16 = ["gst/v1_16", "ffi/v1_16"] v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] diff --git a/gstreamer-sdp/Gir.toml b/gstreamer-sdp/Gir.toml index a55386583..1e0a86793 100644 --- a/gstreamer-sdp/Gir.toml +++ b/gstreamer-sdp/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "GstSdp" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "normal" concurrency = "send" generate_safety_asserts = true diff --git a/gstreamer-sdp/README.md b/gstreamer-sdp/README.md index 825a9f585..6d4e4a4a4 100644 --- a/gstreamer-sdp/README.md +++ b/gstreamer-sdp/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-sdp/sys/Cargo.toml b/gstreamer-sdp/sys/Cargo.toml index 6b12e30a9..ef92281ad 100644 --- a/gstreamer-sdp/sys/Cargo.toml +++ b/gstreamer-sdp/sys/Cargo.toml @@ -17,11 +17,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_8_1 = [] -v1_10 = ["v1_8_1"] -v1_12 = ["v1_10"] -v1_14 = ["v1_12"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -48,18 +44,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_sdp_1_0] name = "gstreamer-sdp-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_sdp_1_0.v1_8_1] -version = "1.8.1" - -[package.metadata.system-deps.gstreamer_sdp_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_sdp_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_sdp_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_sdp_1_0.v1_16] diff --git a/gstreamer-sdp/sys/Gir.toml b/gstreamer-sdp/sys/Gir.toml index bc3a0c875..782bcfc45 100644 --- a/gstreamer-sdp/sys/Gir.toml +++ b/gstreamer-sdp/sys/Gir.toml @@ -2,16 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstSdp" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] external_libraries = [ diff --git a/gstreamer-sdp/sys/src/lib.rs b/gstreamer-sdp/sys/src/lib.rs index a25b96206..92f6dfac0 100644 --- a/gstreamer-sdp/sys/src/lib.rs +++ b/gstreamer-sdp/sys/src/lib.rs @@ -641,8 +641,6 @@ extern "C" { info: *mut GstMIKEYEncryptInfo, error: *mut *mut glib::GError, ) -> *mut glib::GBytes; - #[cfg(any(feature = "v1_8_1", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_8_1")))] pub fn gst_mikey_message_to_caps( msg: *const GstMIKEYMessage, caps: *mut gst::GstCaps, @@ -854,8 +852,6 @@ extern "C" { idx: c_int, format: *const c_char, ) -> GstSDPResult; - #[cfg(any(feature = "v1_8_1", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_8_1")))] pub fn gst_sdp_media_parse_keymgmt( media: *const GstSDPMedia, mikey: *mut *mut GstMIKEYMessage, @@ -1015,8 +1011,6 @@ extern "C" { zone: *mut GstSDPZone, ) -> GstSDPResult; pub fn gst_sdp_message_medias_len(msg: *const GstSDPMessage) -> c_uint; - #[cfg(any(feature = "v1_8_1", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_8_1")))] pub fn gst_sdp_message_parse_keymgmt( msg: *const GstSDPMessage, mikey: *mut *mut GstMIKEYMessage, diff --git a/gstreamer-tag/sys/Cargo.toml b/gstreamer-tag/sys/Cargo.toml index ef5d7d3d7..3a82328e6 100644 --- a/gstreamer-tag/sys/Cargo.toml +++ b/gstreamer-tag/sys/Cargo.toml @@ -21,10 +21,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_10 = [] -v1_12 = ["v1_10"] -v1_14 = ["v1_12"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -51,15 +48,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_tag_1_0] name = "gstreamer-tag-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_tag_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_tag_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_tag_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_tag_1_0.v1_16] diff --git a/gstreamer-tag/sys/Gir.toml b/gstreamer-tag/sys/Gir.toml index 633e76e49..fd6b3bb9f 100644 --- a/gstreamer-tag/sys/Gir.toml +++ b/gstreamer-tag/sys/Gir.toml @@ -2,16 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstTag" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] external_libraries = [ diff --git a/gstreamer-video/Cargo.toml b/gstreamer-video/Cargo.toml index 55d40c7e3..772cf61a3 100644 --- a/gstreamer-video/Cargo.toml +++ b/gstreamer-video/Cargo.toml @@ -32,10 +32,7 @@ gir-format-check = "0.1" [features] default = [] -v1_10 = ["gst/v1_10", "gst-base/v1_10", "ffi/v1_10"] -v1_12 = ["gst/v1_12", "gst-base/v1_12", "ffi/v1_12", "v1_10"] -v1_14 = ["gst/v1_14", "gst-base/v1_14", "ffi/v1_14", "v1_12"] -v1_16 = ["gst/v1_16", "gst-base/v1_16", "ffi/v1_16", "v1_14"] +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_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"] diff --git a/gstreamer-video/Gir.toml b/gstreamer-video/Gir.toml index d0e9c7ebf..36e2db69e 100644 --- a/gstreamer-video/Gir.toml +++ b/gstreamer-video/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "GstVideo" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true @@ -597,86 +597,6 @@ status = "generate" [[object.derive]] name = "Debug, Eq, PartialEq, Hash" - [[object.member]] - name = "p010_10be" - version = "1.10" - - [[object.member]] - name = "p010_10le" - version = "1.10" - - [[object.member]] - name = "iyu2" - version = "1.10" - - [[object.member]] - name = "vyuy" - version = "1.12" - - [[object.member]] - name = "gbra" - version = "1.12" - - [[object.member]] - name = "gbra_10be" - version = "1.12" - - [[object.member]] - name = "gbra_10le" - version = "1.12" - - [[object.member]] - name = "gbr_12be" - version = "1.12" - - [[object.member]] - name = "gbr_12le" - version = "1.12" - - [[object.member]] - name = "gbra_12be" - version = "1.12" - - [[object.member]] - name = "gbra_12le" - version = "1.12" - - [[object.member]] - name = "i420_12be" - version = "1.12" - - [[object.member]] - name = "i420_12le" - version = "1.12" - - [[object.member]] - name = "i422_12be" - version = "1.12" - - [[object.member]] - name = "i422_12le" - version = "1.12" - - [[object.member]] - name = "y444_12be" - version = "1.12" - - [[object.member]] - name = "y444_12le" - version = "1.12" - - [[object.member]] - name = "gray10_le32" - version = "1.14" - - [[object.member]] - name = "nv12_10le32" - version = "1.14" - - [[object.member]] - name = "nv16_10le32" - version = "1.14" - [[object.member]] name = "nv12_10le40" version = "1.16" diff --git a/gstreamer-video/README.md b/gstreamer-video/README.md index 43852c527..e67cc1259 100644 --- a/gstreamer-video/README.md +++ b/gstreamer-video/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-video/src/auto/enums.rs b/gstreamer-video/src/auto/enums.rs index a84fb299c..108d560b6 100644 --- a/gstreamer-video/src/auto/enums.rs +++ b/gstreamer-video/src/auto/enums.rs @@ -1314,8 +1314,6 @@ impl ToValue for VideoDitherMethod { } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GstVideoFieldOrder")] @@ -1330,8 +1328,6 @@ pub enum VideoFieldOrder { __Unknown(i32), } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl VideoFieldOrder { #[doc(alias = "gst_video_field_order_from_string")] pub fn from_string(order: &str) -> VideoFieldOrder { @@ -1344,8 +1340,6 @@ impl VideoFieldOrder { } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl fmt::Display for VideoFieldOrder { #[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -1353,8 +1347,6 @@ impl fmt::Display for VideoFieldOrder { } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(hidden)] impl IntoGlib for VideoFieldOrder { type GlibType = ffi::GstVideoFieldOrder; @@ -1369,8 +1361,6 @@ impl IntoGlib for VideoFieldOrder { } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(hidden)] impl FromGlib for VideoFieldOrder { unsafe fn from_glib(value: ffi::GstVideoFieldOrder) -> Self { @@ -1384,22 +1374,16 @@ impl FromGlib for VideoFieldOrder { } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl StaticType for VideoFieldOrder { fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_field_order_get_type()) } } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl glib::value::ValueType for VideoFieldOrder { type Type = Self; } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] unsafe impl<'a> FromValue<'a> for VideoFieldOrder { type Checker = glib::value::GenericValueTypeChecker; @@ -1409,8 +1393,6 @@ unsafe impl<'a> FromValue<'a> for VideoFieldOrder { } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl ToValue for VideoFieldOrder { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); @@ -1551,84 +1533,44 @@ pub enum VideoFormat { A44410le, #[doc(alias = "GST_VIDEO_FORMAT_NV61")] Nv61, - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "GST_VIDEO_FORMAT_P010_10BE")] P01010be, - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "GST_VIDEO_FORMAT_P010_10LE")] P01010le, - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "GST_VIDEO_FORMAT_IYU2")] Iyu2, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_VIDEO_FORMAT_VYUY")] Vyuy, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_VIDEO_FORMAT_GBRA")] Gbra, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_VIDEO_FORMAT_GBRA_10BE")] Gbra10be, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_VIDEO_FORMAT_GBRA_10LE")] Gbra10le, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_VIDEO_FORMAT_GBR_12BE")] Gbr12be, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_VIDEO_FORMAT_GBR_12LE")] Gbr12le, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_VIDEO_FORMAT_GBRA_12BE")] Gbra12be, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_VIDEO_FORMAT_GBRA_12LE")] Gbra12le, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_VIDEO_FORMAT_I420_12BE")] I42012be, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_VIDEO_FORMAT_I420_12LE")] I42012le, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_VIDEO_FORMAT_I422_12BE")] I42212be, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_VIDEO_FORMAT_I422_12LE")] I42212le, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_VIDEO_FORMAT_Y444_12BE")] Y44412be, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GST_VIDEO_FORMAT_Y444_12LE")] Y44412le, - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "GST_VIDEO_FORMAT_GRAY10_LE32")] Gray10Le32, - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "GST_VIDEO_FORMAT_NV12_10LE32")] Nv1210le32, - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "GST_VIDEO_FORMAT_NV16_10LE32")] Nv1610le32, #[cfg(any(feature = "v1_16", feature = "dox"))] @@ -1863,45 +1805,25 @@ impl IntoGlib for VideoFormat { Self::A44410be => ffi::GST_VIDEO_FORMAT_A444_10BE, Self::A44410le => ffi::GST_VIDEO_FORMAT_A444_10LE, Self::Nv61 => ffi::GST_VIDEO_FORMAT_NV61, - #[cfg(any(feature = "v1_10", feature = "dox"))] Self::P01010be => ffi::GST_VIDEO_FORMAT_P010_10BE, - #[cfg(any(feature = "v1_10", feature = "dox"))] Self::P01010le => ffi::GST_VIDEO_FORMAT_P010_10LE, - #[cfg(any(feature = "v1_10", feature = "dox"))] Self::Iyu2 => ffi::GST_VIDEO_FORMAT_IYU2, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::Vyuy => ffi::GST_VIDEO_FORMAT_VYUY, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::Gbra => ffi::GST_VIDEO_FORMAT_GBRA, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::Gbra10be => ffi::GST_VIDEO_FORMAT_GBRA_10BE, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::Gbra10le => ffi::GST_VIDEO_FORMAT_GBRA_10LE, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::Gbr12be => ffi::GST_VIDEO_FORMAT_GBR_12BE, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::Gbr12le => ffi::GST_VIDEO_FORMAT_GBR_12LE, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::Gbra12be => ffi::GST_VIDEO_FORMAT_GBRA_12BE, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::Gbra12le => ffi::GST_VIDEO_FORMAT_GBRA_12LE, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::I42012be => ffi::GST_VIDEO_FORMAT_I420_12BE, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::I42012le => ffi::GST_VIDEO_FORMAT_I420_12LE, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::I42212be => ffi::GST_VIDEO_FORMAT_I422_12BE, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::I42212le => ffi::GST_VIDEO_FORMAT_I422_12LE, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::Y44412be => ffi::GST_VIDEO_FORMAT_Y444_12BE, - #[cfg(any(feature = "v1_12", feature = "dox"))] Self::Y44412le => ffi::GST_VIDEO_FORMAT_Y444_12LE, - #[cfg(any(feature = "v1_14", feature = "dox"))] Self::Gray10Le32 => ffi::GST_VIDEO_FORMAT_GRAY10_LE32, - #[cfg(any(feature = "v1_14", feature = "dox"))] Self::Nv1210le32 => ffi::GST_VIDEO_FORMAT_NV12_10LE32, - #[cfg(any(feature = "v1_14", feature = "dox"))] Self::Nv1610le32 => ffi::GST_VIDEO_FORMAT_NV16_10LE32, #[cfg(any(feature = "v1_16", feature = "dox"))] Self::Nv1210le40 => ffi::GST_VIDEO_FORMAT_NV12_10LE40, @@ -2038,45 +1960,25 @@ impl FromGlib for VideoFormat { ffi::GST_VIDEO_FORMAT_A444_10BE => Self::A44410be, ffi::GST_VIDEO_FORMAT_A444_10LE => Self::A44410le, ffi::GST_VIDEO_FORMAT_NV61 => Self::Nv61, - #[cfg(any(feature = "v1_10", feature = "dox"))] ffi::GST_VIDEO_FORMAT_P010_10BE => Self::P01010be, - #[cfg(any(feature = "v1_10", feature = "dox"))] ffi::GST_VIDEO_FORMAT_P010_10LE => Self::P01010le, - #[cfg(any(feature = "v1_10", feature = "dox"))] ffi::GST_VIDEO_FORMAT_IYU2 => Self::Iyu2, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_VIDEO_FORMAT_VYUY => Self::Vyuy, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_VIDEO_FORMAT_GBRA => Self::Gbra, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_VIDEO_FORMAT_GBRA_10BE => Self::Gbra10be, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_VIDEO_FORMAT_GBRA_10LE => Self::Gbra10le, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_VIDEO_FORMAT_GBR_12BE => Self::Gbr12be, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_VIDEO_FORMAT_GBR_12LE => Self::Gbr12le, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_VIDEO_FORMAT_GBRA_12BE => Self::Gbra12be, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_VIDEO_FORMAT_GBRA_12LE => Self::Gbra12le, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_VIDEO_FORMAT_I420_12BE => Self::I42012be, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_VIDEO_FORMAT_I420_12LE => Self::I42012le, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_VIDEO_FORMAT_I422_12BE => Self::I42212be, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_VIDEO_FORMAT_I422_12LE => Self::I42212le, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_VIDEO_FORMAT_Y444_12BE => Self::Y44412be, - #[cfg(any(feature = "v1_12", feature = "dox"))] ffi::GST_VIDEO_FORMAT_Y444_12LE => Self::Y44412le, - #[cfg(any(feature = "v1_14", feature = "dox"))] ffi::GST_VIDEO_FORMAT_GRAY10_LE32 => Self::Gray10Le32, - #[cfg(any(feature = "v1_14", feature = "dox"))] ffi::GST_VIDEO_FORMAT_NV12_10LE32 => Self::Nv1210le32, - #[cfg(any(feature = "v1_14", feature = "dox"))] ffi::GST_VIDEO_FORMAT_NV16_10LE32 => Self::Nv1610le32, #[cfg(any(feature = "v1_16", feature = "dox"))] ffi::GST_VIDEO_FORMAT_NV12_10LE40 => Self::Nv1210le40, @@ -2687,8 +2589,6 @@ impl ToValue for VideoMultiviewMode { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GstVideoOrientationMethod")] @@ -2717,8 +2617,6 @@ pub enum VideoOrientationMethod { __Unknown(i32), } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] impl IntoGlib for VideoOrientationMethod { type GlibType = ffi::GstVideoOrientationMethod; @@ -2740,8 +2638,6 @@ impl IntoGlib for VideoOrientationMethod { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] impl FromGlib for VideoOrientationMethod { unsafe fn from_glib(value: ffi::GstVideoOrientationMethod) -> Self { @@ -2762,22 +2658,16 @@ impl FromGlib for VideoOrientationMethod { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StaticType for VideoOrientationMethod { fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_orientation_method_get_type()) } } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl glib::value::ValueType for VideoOrientationMethod { type Type = Self; } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] unsafe impl<'a> FromValue<'a> for VideoOrientationMethod { type Checker = glib::value::GenericValueTypeChecker; @@ -2787,8 +2677,6 @@ unsafe impl<'a> FromValue<'a> for VideoOrientationMethod { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl ToValue for VideoOrientationMethod { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); diff --git a/gstreamer-video/src/auto/flags.rs b/gstreamer-video/src/auto/flags.rs index 861670a6d..9d4e92d3c 100644 --- a/gstreamer-video/src/auto/flags.rs +++ b/gstreamer-video/src/auto/flags.rs @@ -836,9 +836,7 @@ impl ToValue for VideoPackFlags { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] bitflags! { - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "GstVideoTimeCodeFlags")] pub struct VideoTimeCodeFlags: u32 { #[doc(alias = "GST_VIDEO_TIME_CODE_FLAGS_DROP_FRAME")] @@ -848,8 +846,6 @@ bitflags! { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] impl IntoGlib for VideoTimeCodeFlags { type GlibType = ffi::GstVideoTimeCodeFlags; @@ -859,8 +855,6 @@ impl IntoGlib for VideoTimeCodeFlags { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] impl FromGlib for VideoTimeCodeFlags { unsafe fn from_glib(value: ffi::GstVideoTimeCodeFlags) -> Self { diff --git a/gstreamer-video/src/auto/mod.rs b/gstreamer-video/src/auto/mod.rs index 200d8ab48..6e90ad016 100644 --- a/gstreamer-video/src/auto/mod.rs +++ b/gstreamer-video/src/auto/mod.rs @@ -81,8 +81,6 @@ pub use self::enums::VideoChromaMode; pub use self::enums::VideoColorMatrix; pub use self::enums::VideoColorPrimaries; pub use self::enums::VideoDitherMethod; -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub use self::enums::VideoFieldOrder; pub use self::enums::VideoFormat; pub use self::enums::VideoGammaMode; @@ -90,8 +88,6 @@ pub use self::enums::VideoInterlaceMode; pub use self::enums::VideoMatrixMode; pub use self::enums::VideoMultiviewFramePacking; pub use self::enums::VideoMultiviewMode; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub use self::enums::VideoOrientationMethod; pub use self::enums::VideoPrimariesMode; pub use self::enums::VideoResamplerMethod; @@ -114,8 +110,6 @@ pub use self::flags::VideoFrameFlags; pub use self::flags::VideoMultiviewFlags; pub use self::flags::VideoOverlayFormatFlags; pub use self::flags::VideoPackFlags; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub use self::flags::VideoTimeCodeFlags; #[doc(hidden)] diff --git a/gstreamer-video/src/auto/video_encoder.rs b/gstreamer-video/src/auto/video_encoder.rs index 839612191..ee5d6bec2 100644 --- a/gstreamer-video/src/auto/video_encoder.rs +++ b/gstreamer-video/src/auto/video_encoder.rs @@ -3,8 +3,6 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use crate::VideoCodecFrame; use glib::object::Cast; use glib::object::IsA; @@ -36,8 +34,6 @@ pub trait VideoEncoderExt: 'static { #[doc(alias = "gst_video_encoder_allocate_output_buffer")] fn allocate_output_buffer(&self, size: usize) -> Result; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_video_encoder_get_max_encode_time")] #[doc(alias = "get_max_encode_time")] fn max_encode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff; @@ -48,8 +44,6 @@ pub trait VideoEncoderExt: 'static { #[doc(alias = "get_min_force_key_unit_interval")] fn min_force_key_unit_interval(&self) -> Option; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_video_encoder_is_qos_enabled")] fn is_qos_enabled(&self) -> bool; @@ -70,8 +64,6 @@ pub trait VideoEncoderExt: 'static { #[doc(alias = "gst_video_encoder_set_min_pts")] fn set_min_pts(&self, min_pts: impl Into>); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_video_encoder_set_qos_enabled")] fn set_qos_enabled(&self, enabled: bool); @@ -102,8 +94,6 @@ impl> VideoEncoderExt for O { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn max_encode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff { unsafe { ffi::gst_video_encoder_get_max_encode_time( @@ -123,8 +113,6 @@ impl> VideoEncoderExt for O { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn is_qos_enabled(&self) -> bool { unsafe { from_glib(ffi::gst_video_encoder_is_qos_enabled( @@ -182,8 +170,6 @@ impl> VideoEncoderExt for O { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn set_qos_enabled(&self, enabled: bool) { unsafe { ffi::gst_video_encoder_set_qos_enabled( diff --git a/gstreamer-video/src/auto/video_overlay.rs b/gstreamer-video/src/auto/video_overlay.rs index 0fd40d47b..f72282cab 100644 --- a/gstreamer-video/src/auto/video_overlay.rs +++ b/gstreamer-video/src/auto/video_overlay.rs @@ -18,8 +18,6 @@ glib::wrapper! { impl VideoOverlay { pub const NONE: Option<&'static VideoOverlay> = None; - //#[cfg(any(feature = "v1_14", feature = "dox"))] - //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] //#[doc(alias = "gst_video_overlay_install_properties")] //pub fn install_properties(oclass: /*Ignored*/&mut glib::ObjectClass, last_prop_id: i32) { // unsafe { TODO: call ffi:gst_video_overlay_install_properties() } diff --git a/gstreamer-video/src/lib.rs b/gstreamer-video/src/lib.rs index 23adff87d..7e19a44e5 100644 --- a/gstreamer-video/src/lib.rs +++ b/gstreamer-video/src/lib.rs @@ -88,17 +88,9 @@ pub use crate::video_meta::{ VideoAffineTransformationMeta, VideoCropMeta, VideoMeta, VideoOverlayCompositionMeta, VideoRegionOfInterestMeta, }; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] mod video_time_code; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub use crate::video_time_code::{ValidVideoTimeCode, VideoTimeCode, VideoTimeCodeMeta}; -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] mod video_time_code_interval; -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub use crate::video_time_code_interval::VideoTimeCodeInterval; mod video_buffer_pool; pub use crate::video_buffer_pool::{ diff --git a/gstreamer-video/src/video_decoder.rs b/gstreamer-video/src/video_decoder.rs index 39f398ecd..ade5cbba6 100644 --- a/gstreamer-video/src/video_decoder.rs +++ b/gstreamer-video/src/video_decoder.rs @@ -28,8 +28,7 @@ extern "C" { } pub trait VideoDecoderExtManual: 'static { - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] + #[doc(alias = "gst_video_decoder_allocate_output_frame")] fn allocate_output_frame( &self, frame: &mut VideoCodecFrame, @@ -113,8 +112,7 @@ pub trait VideoDecoderExtManual: 'static { } impl> VideoDecoderExtManual for O { - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] + #[doc(alias = "gst_video_decoder_allocate_output_frame")] fn allocate_output_frame( &self, frame: &mut VideoCodecFrame, diff --git a/gstreamer-video/src/video_encoder.rs b/gstreamer-video/src/video_encoder.rs index 8d3a280a1..fbcd98d99 100644 --- a/gstreamer-video/src/video_encoder.rs +++ b/gstreamer-video/src/video_encoder.rs @@ -10,8 +10,6 @@ use std::mem; use std::ptr; pub trait VideoEncoderExtManual: 'static { - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_video_encoder_allocate_output_frame")] fn allocate_output_frame( &self, @@ -72,8 +70,6 @@ pub trait VideoEncoderExtManual: 'static { } impl> VideoEncoderExtManual for O { - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn allocate_output_frame( &self, frame: &mut VideoCodecFrame, diff --git a/gstreamer-video/src/video_format.rs b/gstreamer-video/src/video_format.rs index bfe19d91b..def19095e 100644 --- a/gstreamer-video/src/video_format.rs +++ b/gstreamer-video/src/video_format.rs @@ -25,15 +25,11 @@ pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| { Box::new([ crate::VideoFormat::Ayuv64, crate::VideoFormat::Argb64, - #[cfg(feature = "v1_12")] crate::VideoFormat::Gbra12le, - #[cfg(feature = "v1_12")] crate::VideoFormat::Gbra12be, crate::VideoFormat::A44410le, - #[cfg(feature = "v1_12")] crate::VideoFormat::Gbra10le, crate::VideoFormat::A44410be, - #[cfg(feature = "v1_12")] crate::VideoFormat::Gbra10be, crate::VideoFormat::A42210le, crate::VideoFormat::A42210be, @@ -43,7 +39,6 @@ pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| { crate::VideoFormat::Bgr10a2Le, #[cfg(feature = "v1_16")] crate::VideoFormat::Y410, - #[cfg(feature = "v1_12")] crate::VideoFormat::Gbra, crate::VideoFormat::Abgr, #[cfg(feature = "v1_16")] @@ -54,21 +49,13 @@ pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| { crate::VideoFormat::Rgba, crate::VideoFormat::A420, crate::VideoFormat::V216, - #[cfg(feature = "v1_12")] crate::VideoFormat::Y44412le, - #[cfg(feature = "v1_12")] crate::VideoFormat::Gbr12le, - #[cfg(feature = "v1_12")] crate::VideoFormat::Y44412be, - #[cfg(feature = "v1_12")] crate::VideoFormat::Gbr12be, - #[cfg(feature = "v1_12")] crate::VideoFormat::I42212le, - #[cfg(feature = "v1_12")] crate::VideoFormat::I42212be, - #[cfg(feature = "v1_12")] crate::VideoFormat::I42012le, - #[cfg(feature = "v1_12")] crate::VideoFormat::I42012be, crate::VideoFormat::Y44410le, crate::VideoFormat::Gbr10le, @@ -77,7 +64,6 @@ pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| { crate::VideoFormat::R210, crate::VideoFormat::I42210le, crate::VideoFormat::I42210be, - #[cfg(feature = "v1_14")] crate::VideoFormat::Nv1610le32, #[cfg(feature = "v1_16")] crate::VideoFormat::Y210, @@ -85,13 +71,10 @@ pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| { crate::VideoFormat::Uyvp, crate::VideoFormat::I42010le, crate::VideoFormat::I42010be, - #[cfg(feature = "v1_10")] crate::VideoFormat::P01010le, - #[cfg(feature = "v1_14")] crate::VideoFormat::Nv1210le32, #[cfg(feature = "v1_16")] crate::VideoFormat::Nv1210le40, - #[cfg(feature = "v1_10")] crate::VideoFormat::P01010be, crate::VideoFormat::Y444, crate::VideoFormat::Gbr, @@ -101,14 +84,12 @@ pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| { crate::VideoFormat::Xrgb, crate::VideoFormat::Rgbx, crate::VideoFormat::Bgr, - #[cfg(feature = "v1_10")] crate::VideoFormat::Iyu2, crate::VideoFormat::V308, crate::VideoFormat::Rgb, crate::VideoFormat::Y42b, crate::VideoFormat::Nv61, crate::VideoFormat::Nv16, - #[cfg(feature = "v1_12")] crate::VideoFormat::Vyuy, crate::VideoFormat::Uyvy, crate::VideoFormat::Yvyu, @@ -129,7 +110,6 @@ pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| { crate::VideoFormat::Rgb8p, crate::VideoFormat::Gray16Le, crate::VideoFormat::Gray16Be, - #[cfg(feature = "v1_14")] crate::VideoFormat::Gray10Le32, crate::VideoFormat::Gray8, ]) @@ -139,15 +119,11 @@ pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| { Box::new([ crate::VideoFormat::Ayuv64, crate::VideoFormat::Argb64, - #[cfg(feature = "v1_12")] crate::VideoFormat::Gbra12be, - #[cfg(feature = "v1_12")] crate::VideoFormat::Gbra12le, crate::VideoFormat::A44410be, - #[cfg(feature = "v1_12")] crate::VideoFormat::Gbra10be, crate::VideoFormat::A44410le, - #[cfg(feature = "v1_12")] crate::VideoFormat::Gbra10le, crate::VideoFormat::A42210be, crate::VideoFormat::A42210le, @@ -157,7 +133,6 @@ pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| { crate::VideoFormat::Y410, #[cfg(feature = "v1_16")] crate::VideoFormat::Bgr10a2Le, - #[cfg(feature = "v1_12")] crate::VideoFormat::Gbra, crate::VideoFormat::Abgr, #[cfg(feature = "v1_16")] @@ -168,21 +143,13 @@ pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| { crate::VideoFormat::Rgba, crate::VideoFormat::A420, crate::VideoFormat::V216, - #[cfg(feature = "v1_12")] crate::VideoFormat::Y44412be, - #[cfg(feature = "v1_12")] crate::VideoFormat::Gbr12be, - #[cfg(feature = "v1_12")] crate::VideoFormat::Y44412le, - #[cfg(feature = "v1_12")] crate::VideoFormat::Gbr12le, - #[cfg(feature = "v1_12")] crate::VideoFormat::I42212be, - #[cfg(feature = "v1_12")] crate::VideoFormat::I42212le, - #[cfg(feature = "v1_12")] crate::VideoFormat::I42012be, - #[cfg(feature = "v1_12")] crate::VideoFormat::I42012le, crate::VideoFormat::Y44410be, crate::VideoFormat::Gbr10be, @@ -191,7 +158,6 @@ pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| { crate::VideoFormat::R210, crate::VideoFormat::I42210be, crate::VideoFormat::I42210le, - #[cfg(feature = "v1_14")] crate::VideoFormat::Nv1610le32, #[cfg(feature = "v1_16")] crate::VideoFormat::Y210, @@ -199,11 +165,8 @@ pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| { crate::VideoFormat::Uyvp, crate::VideoFormat::I42010be, crate::VideoFormat::I42010le, - #[cfg(feature = "v1_10")] crate::VideoFormat::P01010be, - #[cfg(feature = "v1_10")] crate::VideoFormat::P01010le, - #[cfg(feature = "v1_14")] crate::VideoFormat::Nv1210le32, #[cfg(feature = "v1_16")] crate::VideoFormat::Nv1210le40, @@ -215,14 +178,12 @@ pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| { crate::VideoFormat::Xrgb, crate::VideoFormat::Rgbx, crate::VideoFormat::Bgr, - #[cfg(feature = "v1_10")] crate::VideoFormat::Iyu2, crate::VideoFormat::V308, crate::VideoFormat::Rgb, crate::VideoFormat::Y42b, crate::VideoFormat::Nv61, crate::VideoFormat::Nv16, - #[cfg(feature = "v1_12")] crate::VideoFormat::Vyuy, crate::VideoFormat::Uyvy, crate::VideoFormat::Yvyu, @@ -243,7 +204,6 @@ pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| { crate::VideoFormat::Rgb8p, crate::VideoFormat::Gray16Be, crate::VideoFormat::Gray16Le, - #[cfg(feature = "v1_14")] crate::VideoFormat::Gray10Le32, crate::VideoFormat::Gray8, ]) diff --git a/gstreamer-video/src/video_info.rs b/gstreamer-video/src/video_info.rs index 23e53c57b..bf3c8a6a8 100644 --- a/gstreamer-video/src/video_info.rs +++ b/gstreamer-video/src/video_info.rs @@ -245,9 +245,8 @@ pub struct VideoInfo(pub(crate) ffi::GstVideoInfo); impl fmt::Debug for VideoInfo { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let mut b = f.debug_struct("VideoInfo"); - - b.field("format", &self.format()) + f.debug_struct("VideoInfo") + .field("format", &self.format()) .field("format-info", &self.format_info()) .field("width", &self.width()) .field("height", &self.height()) @@ -262,12 +261,9 @@ impl fmt::Debug for VideoInfo { .field("offset", &self.offset()) .field("stride", &self.stride()) .field("multiview_mode", &self.multiview_mode()) - .field("multiview_flags", &self.multiview_flags()); - - #[cfg(any(feature = "v1_12", feature = "dox"))] - b.field("field_order", &self.field_order()); - - b.finish() + .field("multiview_flags", &self.multiview_flags()) + .field("field_order", &self.field_order()) + .finish() } } @@ -289,8 +285,6 @@ pub struct VideoInfoBuilder<'a> { stride: Option<&'a [i32]>, multiview_mode: Option, multiview_flags: Option, - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] field_order: Option, } @@ -319,7 +313,7 @@ impl<'a> VideoInfoBuilder<'a> { ) }) }; - } else if #[cfg(feature = "v1_12")] { + } else { let res: bool = { let res = from_glib(ffi::gst_video_info_set_format( info.as_mut_ptr(), @@ -335,37 +329,6 @@ impl<'a> VideoInfoBuilder<'a> { } } - res - }; - } else { - let res: bool = { - // The bool return value is new with 1.11.1, see - // https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/commit/17cdd369e6f2f73329d27dfceb50011f40f1ceb0 - let res = if gst::version() < (1, 11, 1, 0) { - ffi::gst_video_info_set_format( - info.as_mut_ptr(), - self.format.into_glib(), - self.width, - self.height, - ); - - true - } else { - from_glib(ffi::gst_video_info_set_format( - info.as_mut_ptr(), - self.format.into_glib(), - self.width, - self.height, - )) - }; - - if res { - if let Some(interlace_mode) = self.interlace_mode { - let info = info.as_mut_ptr(); - (*info).interlace_mode = interlace_mode.into_glib(); - } - } - res }; } @@ -439,7 +402,6 @@ impl<'a> VideoInfoBuilder<'a> { ptr::write(ptr.offset(1), multiview_flags.into_glib()); } - #[cfg(any(feature = "v1_12", feature = "dox"))] if let Some(field_order) = self.field_order { let ptr = &mut info.ABI._gst_reserved as *mut _ as *mut i32; ptr::write(ptr.offset(2), field_order.into_glib()); @@ -533,8 +495,6 @@ impl<'a> VideoInfoBuilder<'a> { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn field_order(self, field_order: crate::VideoFieldOrder) -> Self { Self { field_order: Some(field_order), @@ -551,45 +511,23 @@ impl VideoInfo { ) -> VideoInfoBuilder<'a> { assert_initialized_main_thread!(); - cfg_if::cfg_if! { - if #[cfg(any(feature = "v1_12", feature = "dox"))] { - VideoInfoBuilder { - format, - width, - height, - interlace_mode: None, - flags: None, - size: None, - views: None, - chroma_site: None, - colorimetry: None, - par: None, - fps: None, - offset: None, - stride: None, - multiview_mode: None, - multiview_flags: None, - field_order: None, - } - } else { - VideoInfoBuilder { - format, - width, - height, - interlace_mode: None, - flags: None, - size: None, - views: None, - chroma_site: None, - colorimetry: None, - par: None, - fps: None, - offset: None, - stride: None, - multiview_mode: None, - multiview_flags: None, - } - } + VideoInfoBuilder { + format, + width, + height, + interlace_mode: None, + flags: None, + size: None, + views: None, + chroma_site: None, + colorimetry: None, + par: None, + fps: None, + offset: None, + stride: None, + multiview_mode: None, + multiview_flags: None, + field_order: None, } } @@ -756,8 +694,6 @@ impl VideoInfo { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn field_order(&self) -> crate::VideoFieldOrder { unsafe { let ptr = &self.0.ABI._gst_reserved as *const _ as *const i32; @@ -846,30 +782,11 @@ impl VideoInfo { #[doc(alias = "gst_video_info_align")] pub fn align(&mut self, align: &mut crate::VideoAlignment) -> Result<(), glib::BoolError> { - cfg_if::cfg_if! { - if #[cfg(feature = "v1_12")] { - unsafe { - glib::result_from_gboolean!(ffi::gst_video_info_align( - &mut self.0, - &mut align.0, - ), "Failed to align VideoInfo") - } - } else { - unsafe { - // The bool return value is new with 1.11.1, see - // https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/commit/17cdd369e6f2f73329d27dfceb50011f40f1ceb0 - if gst::version() < (1, 11, 1, 0) { - ffi::gst_video_info_align(&mut self.0, &mut align.0); - - Ok(()) - } else { - glib::result_from_gboolean!(ffi::gst_video_info_align( - &mut self.0, - &mut align.0, - ), "Failed to align VideoInfo") - } - } - } + unsafe { + glib::result_from_gboolean!( + ffi::gst_video_info_align(&mut self.0, &mut align.0,), + "Failed to align VideoInfo" + ) } } @@ -1008,8 +925,6 @@ impl glib::translate::FromGlibPtrFull<*mut ffi::GstVideoInfo> for VideoInfo { } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl crate::VideoFieldOrder { #[doc(alias = "gst_video_field_order_to_string")] pub fn to_str<'a>(self) -> &'a str { @@ -1030,8 +945,6 @@ impl crate::VideoFieldOrder { } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl str::FromStr for crate::VideoFieldOrder { type Err = glib::error::BoolError; @@ -1136,8 +1049,6 @@ mod tests { assert!(info == info2); } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[test] fn test_video_align() { gst::init().unwrap(); @@ -1167,8 +1078,6 @@ mod tests { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[test] fn test_display() { gst::init().unwrap(); diff --git a/gstreamer-video/src/video_message.rs b/gstreamer-video/src/video_message.rs index 0ebce8469..efdce81da 100644 --- a/gstreamer-video/src/video_message.rs +++ b/gstreamer-video/src/video_message.rs @@ -2,8 +2,6 @@ use crate::NavigationMessageType; use glib::translate::{from_glib, from_glib_full, IntoGlib, ToGlibPtr}; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use glib::ToSendValue; use gst::ffi as gst_ffi; use gst::{prelude::*, Message, Object, Seqnum}; @@ -28,8 +26,6 @@ macro_rules! message_builder_generic_impl { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[allow(clippy::needless_update)] pub fn other_fields( self, @@ -51,7 +47,6 @@ macro_rules! message_builder_generic_impl { gst_ffi::gst_message_set_seqnum(msg, seqnum.into_glib()); } - #[cfg(any(feature = "v1_14", feature = "dox"))] if !self.builder.other_fields.is_empty() { let structure = gst_ffi::gst_message_writable_structure(msg); @@ -102,8 +97,6 @@ impl<'a> MessageBuilder<'a> { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn other_fields(self, other_fields: &[(&'a str, &'a (dyn ToSendValue + Sync))]) -> Self { Self { other_fields: self diff --git a/gstreamer-video/src/video_meta.rs b/gstreamer-video/src/video_meta.rs index 2f290da6c..b9414239a 100644 --- a/gstreamer-video/src/video_meta.rs +++ b/gstreamer-video/src/video_meta.rs @@ -357,7 +357,6 @@ impl VideoRegionOfInterestMeta { unsafe { glib::Quark::from_glib(self.0.roi_type).as_str() } } - #[cfg(feature = "v1_14")] #[doc(alias = "get_params")] pub fn params(&self) -> ParamsIter { ParamsIter { @@ -366,7 +365,6 @@ impl VideoRegionOfInterestMeta { } } - #[cfg(feature = "v1_14")] #[doc(alias = "get_param")] pub fn param<'b>(&self, name: &'b str) -> Option<&gst::StructureRef> { self.params().find(|s| s.name() == name) @@ -387,7 +385,6 @@ impl VideoRegionOfInterestMeta { self.0.parent_id = id } - #[cfg(feature = "v1_14")] #[doc(alias = "gst_video_region_of_interest_meta_add_param")] pub fn add_param(&mut self, s: gst::Structure) { unsafe { @@ -396,13 +393,11 @@ impl VideoRegionOfInterestMeta { } } -#[cfg(feature = "v1_14")] pub struct ParamsIter<'a> { _meta: &'a VideoRegionOfInterestMeta, list: *const glib::ffi::GList, } -#[cfg(feature = "v1_14")] impl<'a> Iterator for ParamsIter<'a> { type Item = &'a gst::StructureRef; @@ -434,19 +429,13 @@ unsafe impl MetaAPI for VideoRegionOfInterestMeta { impl fmt::Debug for VideoRegionOfInterestMeta { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let mut f = f.debug_struct("VideoRegionOfInterestMeta"); - - f.field("roi_type", &self.roi_type()) + f.debug_struct("VideoRegionOfInterestMeta") + .field("roi_type", &self.roi_type()) .field("rect", &self.rect()) .field("id", &self.id()) - .field("parent_id", &self.parent_id()); - - #[cfg(feature = "v1_14")] - { - f.field("params", &self.params().collect::>()); - } - - f.finish() + .field("parent_id", &self.parent_id()) + .field("params", &self.params().collect::>()) + .finish() } } diff --git a/gstreamer-video/src/video_time_code.rs b/gstreamer-video/src/video_time_code.rs index 4d9005941..08d2c9f17 100644 --- a/gstreamer-video/src/video_time_code.rs +++ b/gstreamer-video/src/video_time_code.rs @@ -6,13 +6,9 @@ use std::cmp; use std::fmt; use std::mem; use std::ptr; -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] use std::str; use crate::VideoTimeCodeFlags; -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] use crate::VideoTimeCodeInterval; #[doc(alias = "GstVideoTimeCode")] @@ -196,8 +192,6 @@ impl ValidVideoTimeCode { } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_video_time_code_add_interval")] pub fn add_interval( &self, @@ -497,8 +491,6 @@ macro_rules! generic_impl { generic_impl!(VideoTimeCode); generic_impl!(ValidVideoTimeCode); -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl str::FromStr for VideoTimeCode { type Err = glib::error::BoolError; diff --git a/gstreamer-video/sys/Cargo.toml b/gstreamer-video/sys/Cargo.toml index 1ad75dd77..d4614d2c4 100644 --- a/gstreamer-video/sys/Cargo.toml +++ b/gstreamer-video/sys/Cargo.toml @@ -25,10 +25,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_10 = [] -v1_12 = ["v1_10"] -v1_14 = ["v1_12"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] @@ -55,15 +52,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_video_1_0] name = "gstreamer-video-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_video_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_video_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_video_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_video_1_0.v1_16] diff --git a/gstreamer-video/sys/Gir.toml b/gstreamer-video/sys/Gir.toml index b15349ed7..1037ec04b 100644 --- a/gstreamer-video/sys/Gir.toml +++ b/gstreamer-video/sys/Gir.toml @@ -2,16 +2,13 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "GstVideo" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ "1.20", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] external_libraries = [ @@ -65,9 +62,6 @@ status = "generate" [[object]] name = "GstVideo.*" status = "generate" - [[object.function]] - name = "video_time_code_meta_api_get_type" - version = "1.10" [[object.function]] name = "video_caption_meta_api_get_type" version = "1.16" diff --git a/gstreamer-video/sys/src/lib.rs b/gstreamer-video/sys/src/lib.rs index 48f8978dc..c870cf1ee 100644 --- a/gstreamer-video/sys/src/lib.rs +++ b/gstreamer-video/sys/src/lib.rs @@ -2552,14 +2552,8 @@ extern "C" { //========================================================================= // GstVideoFieldOrder //========================================================================= - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_field_order_get_type() -> GType; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_field_order_from_string(order: *const c_char) -> GstVideoFieldOrder; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_field_order_to_string(order: GstVideoFieldOrder) -> *const c_char; //========================================================================= @@ -2633,8 +2627,6 @@ extern "C" { //========================================================================= // GstVideoOrientationMethod //========================================================================= - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_orientation_method_get_type() -> GType; //========================================================================= @@ -3271,14 +3263,10 @@ extern "C" { //========================================================================= // GstVideoRegionOfInterestMeta //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_video_region_of_interest_meta_add_param( meta: *mut GstVideoRegionOfInterestMeta, s: *mut gst::GstStructure, ); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_video_region_of_interest_meta_get_param( meta: *mut GstVideoRegionOfInterestMeta, name: *const c_char, @@ -3359,11 +3347,7 @@ extern "C" { //========================================================================= // GstVideoTimeCode //========================================================================= - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_get_type() -> GType; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_new( fps_n: c_uint, fps_d: c_uint, @@ -3375,11 +3359,7 @@ extern "C" { frames: c_uint, field_count: c_uint, ) -> *mut GstVideoTimeCode; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_new_empty() -> *mut GstVideoTimeCode; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_time_code_new_from_date_time( fps_n: c_uint, fps_d: c_uint, @@ -3396,41 +3376,21 @@ extern "C" { flags: GstVideoTimeCodeFlags, field_count: c_uint, ) -> *mut GstVideoTimeCode; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_time_code_new_from_string(tc_str: *const c_char) -> *mut GstVideoTimeCode; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_add_frames(tc: *mut GstVideoTimeCode, frames: i64); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_time_code_add_interval( tc: *const GstVideoTimeCode, tc_inter: *const GstVideoTimeCodeInterval, ) -> *mut GstVideoTimeCode; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_clear(tc: *mut GstVideoTimeCode); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_compare( tc1: *const GstVideoTimeCode, tc2: *const GstVideoTimeCode, ) -> c_int; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_copy(tc: *const GstVideoTimeCode) -> *mut GstVideoTimeCode; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_frames_since_daily_jam(tc: *const GstVideoTimeCode) -> u64; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_free(tc: *mut GstVideoTimeCode); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_increment_frame(tc: *mut GstVideoTimeCode); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_init( tc: *mut GstVideoTimeCode, fps_n: c_uint, @@ -3443,8 +3403,6 @@ extern "C" { frames: c_uint, field_count: c_uint, ); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_time_code_init_from_date_time( tc: *mut GstVideoTimeCode, fps_n: c_uint, @@ -3463,51 +3421,29 @@ extern "C" { flags: GstVideoTimeCodeFlags, field_count: c_uint, ) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_is_valid(tc: *const GstVideoTimeCode) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_nsec_since_daily_jam(tc: *const GstVideoTimeCode) -> u64; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_to_date_time(tc: *const GstVideoTimeCode) -> *mut glib::GDateTime; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_to_string(tc: *const GstVideoTimeCode) -> *mut c_char; //========================================================================= // GstVideoTimeCodeInterval //========================================================================= - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_time_code_interval_get_type() -> GType; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_time_code_interval_new( hours: c_uint, minutes: c_uint, seconds: c_uint, frames: c_uint, ) -> *mut GstVideoTimeCodeInterval; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_time_code_interval_new_from_string( tc_inter_str: *const c_char, ) -> *mut GstVideoTimeCodeInterval; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_time_code_interval_clear(tc: *mut GstVideoTimeCodeInterval); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_time_code_interval_copy( tc: *const GstVideoTimeCodeInterval, ) -> *mut GstVideoTimeCodeInterval; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_time_code_interval_free(tc: *mut GstVideoTimeCodeInterval); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_time_code_interval_init( tc: *mut GstVideoTimeCodeInterval, hours: c_uint, @@ -3519,8 +3455,6 @@ extern "C" { //========================================================================= // GstVideoTimeCodeMeta //========================================================================= - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_meta_get_info() -> *const gst::GstMetaInfo; //========================================================================= @@ -3666,8 +3600,6 @@ extern "C" { decoder: *mut GstVideoDecoder, frame: *mut GstVideoCodecFrame, ) -> gst::GstFlowReturn; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_video_decoder_allocate_output_frame_with_params( decoder: *mut GstVideoDecoder, frame: *mut GstVideoCodecFrame, @@ -3852,8 +3784,6 @@ extern "C" { min_latency: *mut gst::GstClockTime, max_latency: *mut gst::GstClockTime, ); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_video_encoder_get_max_encode_time( encoder: *mut GstVideoEncoder, frame: *mut GstVideoCodecFrame, @@ -3869,8 +3799,6 @@ extern "C" { pub fn gst_video_encoder_get_output_state( encoder: *mut GstVideoEncoder, ) -> *mut GstVideoCodecState; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_video_encoder_is_qos_enabled(encoder: *mut GstVideoEncoder) -> gboolean; pub fn gst_video_encoder_merge_tags( encoder: *mut GstVideoEncoder, @@ -3901,8 +3829,6 @@ extern "C" { caps: *mut gst::GstCaps, reference: *mut GstVideoCodecState, ) -> *mut GstVideoCodecState; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_video_encoder_set_qos_enabled(encoder: *mut GstVideoEncoder, enabled: gboolean); //========================================================================= @@ -4200,8 +4126,6 @@ extern "C" { //========================================================================= // GstVideoDirection //========================================================================= - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_direction_get_type() -> GType; //========================================================================= @@ -4251,14 +4175,10 @@ extern "C" { // GstVideoOverlay //========================================================================= pub fn gst_video_overlay_get_type() -> GType; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_video_overlay_install_properties( oclass: *mut gobject::GObjectClass, last_prop_id: c_int, ); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_video_overlay_set_property( object: *mut gobject::GObject, last_prop_id: c_int, @@ -4362,14 +4282,10 @@ extern "C" { w: c_uint, h: c_uint, ) -> *mut GstVideoRegionOfInterestMeta; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_buffer_add_video_time_code_meta( buffer: *mut gst::GstBuffer, tc: *const GstVideoTimeCode, ) -> *mut GstVideoTimeCodeMeta; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_buffer_add_video_time_code_meta_full( buffer: *mut gst::GstBuffer, fps_n: c_uint, @@ -4559,8 +4475,6 @@ extern "C" { x_tiles: c_int, y_tiles: c_int, ) -> c_uint; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_video_time_code_meta_api_get_type() -> GType; } diff --git a/gstreamer-webrtc/Cargo.toml b/gstreamer-webrtc/Cargo.toml index 785d34971..96d925956 100644 --- a/gstreamer-webrtc/Cargo.toml +++ b/gstreamer-webrtc/Cargo.toml @@ -17,8 +17,8 @@ rust-version = "1.57" libc = "0.2" ffi = { package = "gstreamer-webrtc-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } -gst = { package = "gstreamer", path = "../gstreamer", features = ["v1_14"] } -gst-sdp = { package = "gstreamer-sdp", path = "../gstreamer-sdp", features = ["v1_14"] } +gst = { package = "gstreamer", path = "../gstreamer" } +gst-sdp = { package = "gstreamer-sdp", path = "../gstreamer-sdp" } [dev-dependencies] gir-format-check = "0.1" diff --git a/gstreamer-webrtc/README.md b/gstreamer-webrtc/README.md index f2ddfb03d..1dfe5b9ba 100644 --- a/gstreamer-webrtc/README.md +++ b/gstreamer-webrtc/README.md @@ -24,7 +24,7 @@ API metadata provided by the GStreamer project. ## Installation To build the GStreamer bindings or anything depending on them, you need to -have at least GStreamer 1.8 and gst-plugins-base 1.8 installed. In addition, +have at least GStreamer 1.14 and gst-plugins-base 1.14 installed. In addition, some of the examples/tutorials require various GStreamer plugins to be available, which can be found in gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly and/or gst-libav. @@ -45,16 +45,13 @@ $ apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev ``` -The minimum required version of the above libraries is >= 1.8. If you +The minimum required version of the above libraries is >= 1.14. If you build the gstreamer-player sub-crate, or any of the examples that -depend on gstreamer-player, you must ensure that in addition to the -above packages, `libgstreamer-plugins-bad1.0-dev` is installed and -that the version is >= 1.12. See the `Cargo.toml` files for the full -details, +depend on gstreamer-player, you must ensure that in addition to the above +packages, `libgstreamer-plugins-bad1.0-dev` is installed. See the `Cargo.toml` +files for the full details, ```console -$ # Only if you wish to install gstreamer-player, make sure the version -$ # of this package is >= 1.12. $ apt-get install libgstreamer-plugins-bad1.0-dev ``` @@ -82,15 +79,13 @@ $ brew install gstreamer gst-plugins-base gst-plugins-good \ --enable-gtk3 ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable @@ -118,9 +113,7 @@ $ pacman -S glib2-devel pkg-config \ mingw-w64-x86_64-gst-rtsp-server ``` -If you wish to install the gstreamer-player sub-crate, make sure the -version of these libraries is >= 1.12. Otherwise, a version >= 1.8 is -sufficient. +Make sure the version of these libraries is >= 1.14. Note that the version of `pkg-config` included in `MSYS2` is [known to have problems](https://github.com/rust-lang/pkg-config-rs/issues/51#issuecomment-346300858) @@ -130,8 +123,8 @@ would be [`pkg-config-lite`](https://sourceforge.net/projects/pkgconfiglite/). #### GStreamer Binaries You need to download the *two* `.msi` files for your platform from the -GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.12.3.msi` and -`gstreamer-1.0-devel-x86_64-1.12.3.msi`. +GStreamer website and install them, e.g. `gstreamer-1.0-x86_64-1.14.0.msi` and +`gstreamer-1.0-devel-x86_64-1.14.0.msi`. After installation, you also need to install `pkg-config` (e.g. via MSYS2 or from [here](https://sourceforge.net/projects/pkgconfiglite/)) diff --git a/gstreamer-webrtc/sys/Cargo.toml b/gstreamer-webrtc/sys/Cargo.toml index 39de2b16e..712e6a3a8 100644 --- a/gstreamer-webrtc/sys/Cargo.toml +++ b/gstreamer-webrtc/sys/Cargo.toml @@ -11,7 +11,6 @@ git = "https://github.com/gtk-rs/gtk-rs-core" [dependencies.gst_sdp] package = "gstreamer-sdp-sys" path = "../../gstreamer-sdp/sys" -features = ["v1_14"] [dev-dependencies] shell-words = "1.0.0" diff --git a/gstreamer/Cargo.toml b/gstreamer/Cargo.toml index db62a04e3..5b667105b 100644 --- a/gstreamer/Cargo.toml +++ b/gstreamer/Cargo.toml @@ -41,11 +41,7 @@ gir-format-check = "0.1" [features] default = [] -v1_10 = ["ffi/v1_10"] -v1_12 = ["ffi/v1_12", "v1_10"] -v1_12_1 = ["ffi/v1_12_1", "v1_12"] -v1_14 = ["ffi/v1_14", "v1_12_1"] -v1_16 = ["ffi/v1_16", "v1_14"] +v1_16 = ["ffi/v1_16"] v1_18 = ["ffi/v1_18", "v1_16"] v1_20 = ["ffi/v1_20", "v1_18"] v1_22 = ["ffi/v1_22", "v1_20"] diff --git a/gstreamer/Gir.toml b/gstreamer/Gir.toml index 48b7e8dac..6ac903c2e 100644 --- a/gstreamer/Gir.toml +++ b/gstreamer/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../gir-files", "../gst-gir-files"] library = "Gst" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "normal" concurrency = "send+sync" generate_safety_asserts = true @@ -41,6 +41,7 @@ generate = [ "Gst.SchedulingFlags", "Gst.SeekType", "Gst.SerializeFlags", + "Gst.StateChange", "Gst.StreamError", "Gst.StreamStatusType", "Gst.StreamType", @@ -543,11 +544,6 @@ manual_traits = ["BufferPoolExtManual"] # Takes ownership manual = true - [[object.function]] - name = "new" - # Work-around for 1.14 switch from transfer-floating to transfer-full - manual = true - [[object.function]] name = "set_active" [object.function.return] @@ -978,11 +974,6 @@ status = "generate" name = "Gst.DeviceMonitor" status = "generate" manual_traits = ["DeviceMonitorExtManual"] - [[object.function]] - name = "new" - # Work-around for 1.14 switch from transfer-floating to transfer-full - manual = true - [[object.function]] name = "add_filter" # Return Option @@ -1373,15 +1364,6 @@ status = "generate" [[object.derive]] name = "Debug, PartialEq, Eq, Hash" [[object.member]] - name = "select_streams" - version = "1.10" - [[object.member]] - name = "stream_collection" - version = "1.10" - [[object.member]] - name = "stream_group_done" - version = "1.10" - [[object.member]] name = "instant_rate_change" version = "1.18" [[object.member]] @@ -1546,9 +1528,6 @@ trait_name = "GstObjectExt" [[object]] name = "Gst.ObjectFlags" status = "generate" - [[object.member]] - name = "may_be_leaked" - version = "1.10" [[object.member]] name = "last" ignore = true @@ -1829,9 +1808,6 @@ ref_mode = "ref-mut" [[object]] name = "Gst.ParseFlags" status = "generate" - [[object.member]] - name = "place_in_bin" - version = "1.10" [[object.member]] name = "none" ignore = true @@ -2092,16 +2068,6 @@ status = "generate" [[object.derive]] name = "Debug, PartialEq, Eq, PartialOrd, Ord, Hash" -[[object]] -name = "Gst.StateChange" -status = "generate" - [[object.function]] - name = "get_name" - # Manual function for < v1_14: - manual = true - # Always generate the trait, without version constraint: - version = "1.8" - [[object]] name = "Gst.StateChangeReturn" status = "generate" @@ -2115,30 +2081,6 @@ must_use = true name = "Gst.Stream" status = "generate" final_type = true - [[object.function]] - name = "new" - # Work-around for 1.14 switch from transfer-floating to transfer-full - manual = true - - [[object.property]] - name = "caps" - version = "1.10" - - [[object.property]] - name = "stream-flags" - version = "1.10" - - [[object.property]] - name = "stream-id" - version = "1.10" - - [[object.property]] - name = "stream-type" - version = "1.10" - - [[object.property]] - name = "tags" - version = "1.10" [[object]] name = "Gst.StreamCollection" @@ -2146,7 +2088,7 @@ status = "generate" final_type = true [[object.function]] name = "new" - # Work-around for 1.14 switch from transfer-floating to transfer-full + # Manual builder pattern manual = true [[object.function]] @@ -2156,7 +2098,6 @@ final_type = true [[object.property]] name = "upstream-id" - version = "1.10" generate = ["get"] [[object]] diff --git a/gstreamer/README.md b/gstreamer/README.md index ff33fb79b..781db2db5 100644 --- a/gstreamer/README.md +++ b/gstreamer/README.md @@ -84,8 +84,8 @@ Make sure the version of these libraries is >= 1.14. #### GStreamer Binaries You need to download the *two* `.pkg` files from the GStreamer website and -install them, e.g. `gstreamer-1.0-1.12.3-x86_64.pkg` and -`gstreamer-1.0-devel-1.12.3-x86_64.pkg`. +install them, e.g. `gstreamer-1.0-1.14.0-x86_64.pkg` and +`gstreamer-1.0-devel-1.14.0-x86_64.pkg`. After installation, you also need to install `pkg-config` (e.g. via Homebrew) and set the `PKG_CONFIG_PATH` environment variable diff --git a/gstreamer/src/auto/bin.rs b/gstreamer/src/auto/bin.rs index 16aceebab..dfb5560b9 100644 --- a/gstreamer/src/auto/bin.rs +++ b/gstreamer/src/auto/bin.rs @@ -5,8 +5,6 @@ use crate::ChildProxy; use crate::Element; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use crate::ElementFlags; use crate::Object; use crate::Pad; @@ -62,8 +60,6 @@ pub trait GstBinExt: 'static { #[doc(alias = "get_by_name_recurse_up")] fn by_name_recurse_up(&self, name: &str) -> Option; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_bin_get_suppressed_flags")] #[doc(alias = "get_suppressed_flags")] fn suppressed_flags(&self) -> ElementFlags; @@ -74,8 +70,6 @@ pub trait GstBinExt: 'static { #[doc(alias = "gst_bin_remove")] fn remove(&self, element: &impl IsA) -> Result<(), glib::error::BoolError>; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_bin_set_suppressed_flags")] fn set_suppressed_flags(&self, flags: ElementFlags); @@ -94,16 +88,12 @@ pub trait GstBinExt: 'static { #[doc(alias = "message-forward")] fn set_message_forward(&self, message_forward: bool); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "deep-element-added")] fn connect_deep_element_added( &self, f: F, ) -> SignalHandlerId; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "deep-element-removed")] fn connect_deep_element_removed( &self, @@ -184,8 +174,6 @@ impl> GstBinExt for O { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn suppressed_flags(&self) -> ElementFlags { unsafe { from_glib(ffi::gst_bin_get_suppressed_flags( @@ -215,8 +203,6 @@ impl> GstBinExt for O { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn set_suppressed_flags(&self, flags: ElementFlags) { unsafe { ffi::gst_bin_set_suppressed_flags(self.as_ref().to_glib_none().0, flags.into_glib()); @@ -248,8 +234,6 @@ impl> GstBinExt for O { glib::ObjectExt::set_property(self.as_ref(), "message-forward", &message_forward) } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn connect_deep_element_added( &self, f: F, @@ -283,8 +267,6 @@ impl> GstBinExt for O { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn connect_deep_element_removed( &self, f: F, diff --git a/gstreamer/src/auto/buffer_pool.rs b/gstreamer/src/auto/buffer_pool.rs index ef3d624cd..78d4fae8b 100644 --- a/gstreamer/src/auto/buffer_pool.rs +++ b/gstreamer/src/auto/buffer_pool.rs @@ -18,6 +18,18 @@ glib::wrapper! { impl BufferPool { pub const NONE: Option<&'static BufferPool> = None; + + #[doc(alias = "gst_buffer_pool_new")] + pub fn new() -> BufferPool { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gst_buffer_pool_new()) } + } +} + +impl Default for BufferPool { + fn default() -> Self { + Self::new() + } } unsafe impl Send for BufferPool {} diff --git a/gstreamer/src/auto/bus.rs b/gstreamer/src/auto/bus.rs index 82f036318..75430e4de 100644 --- a/gstreamer/src/auto/bus.rs +++ b/gstreamer/src/auto/bus.rs @@ -55,8 +55,6 @@ impl Bus { } } - //#[cfg(any(feature = "v1_14", feature = "dox"))] - //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] //#[doc(alias = "gst_bus_get_pollfd")] //#[doc(alias = "get_pollfd")] //pub fn pollfd(&self, fd: /*Ignored*/glib::PollFD) { diff --git a/gstreamer/src/auto/device_monitor.rs b/gstreamer/src/auto/device_monitor.rs index e052e9678..b63a603f5 100644 --- a/gstreamer/src/auto/device_monitor.rs +++ b/gstreamer/src/auto/device_monitor.rs @@ -26,6 +26,18 @@ glib::wrapper! { impl DeviceMonitor { pub const NONE: Option<&'static DeviceMonitor> = None; + + #[doc(alias = "gst_device_monitor_new")] + pub fn new() -> DeviceMonitor { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gst_device_monitor_new()) } + } +} + +impl Default for DeviceMonitor { + fn default() -> Self { + Self::new() + } } unsafe impl Send for DeviceMonitor {} diff --git a/gstreamer/src/auto/element.rs b/gstreamer/src/auto/element.rs index 1eca04bbd..7d4766621 100644 --- a/gstreamer/src/auto/element.rs +++ b/gstreamer/src/auto/element.rs @@ -88,18 +88,12 @@ pub trait ElementExt: 'static { #[doc(alias = "gst_element_create_all_pads")] fn create_all_pads(&self); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_element_foreach_pad")] fn foreach_pad bool>(&self, func: P) -> bool; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_element_foreach_sink_pad")] fn foreach_sink_pad bool>(&self, func: P) -> bool; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_element_foreach_src_pad")] fn foreach_src_pad bool>(&self, func: P) -> bool; @@ -307,8 +301,6 @@ impl> ElementExt for O { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn foreach_pad bool>(&self, func: P) -> bool { let func_data: P = func; unsafe extern "C" fn func_func bool>( @@ -333,8 +325,6 @@ impl> ElementExt for O { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn foreach_sink_pad bool>(&self, func: P) -> bool { let func_data: P = func; unsafe extern "C" fn func_func bool>( @@ -359,8 +349,6 @@ impl> ElementExt for O { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn foreach_src_pad bool>(&self, func: P) -> bool { let func_data: P = func; unsafe extern "C" fn func_func bool>( diff --git a/gstreamer/src/auto/enums.rs b/gstreamer/src/auto/enums.rs index 68ed7470d..bc6f23c84 100644 --- a/gstreamer/src/auto/enums.rs +++ b/gstreamer/src/auto/enums.rs @@ -778,8 +778,6 @@ pub enum EventType { Caps, #[doc(alias = "GST_EVENT_SEGMENT")] Segment, - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "GST_EVENT_STREAM_COLLECTION")] StreamCollection, #[doc(alias = "GST_EVENT_TAG")] @@ -788,8 +786,6 @@ pub enum EventType { Buffersize, #[doc(alias = "GST_EVENT_SINK_MESSAGE")] SinkMessage, - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "GST_EVENT_STREAM_GROUP_DONE")] StreamGroupDone, #[doc(alias = "GST_EVENT_EOS")] @@ -820,8 +816,6 @@ pub enum EventType { Reconfigure, #[doc(alias = "GST_EVENT_TOC_SELECT")] TocSelect, - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "GST_EVENT_SELECT_STREAMS")] SelectStreams, #[cfg(any(feature = "v1_18", feature = "dox"))] @@ -890,12 +884,10 @@ impl IntoGlib for EventType { Self::StreamStart => ffi::GST_EVENT_STREAM_START, Self::Caps => ffi::GST_EVENT_CAPS, Self::Segment => ffi::GST_EVENT_SEGMENT, - #[cfg(any(feature = "v1_10", feature = "dox"))] Self::StreamCollection => ffi::GST_EVENT_STREAM_COLLECTION, Self::Tag => ffi::GST_EVENT_TAG, Self::Buffersize => ffi::GST_EVENT_BUFFERSIZE, Self::SinkMessage => ffi::GST_EVENT_SINK_MESSAGE, - #[cfg(any(feature = "v1_10", feature = "dox"))] Self::StreamGroupDone => ffi::GST_EVENT_STREAM_GROUP_DONE, Self::Eos => ffi::GST_EVENT_EOS, Self::Toc => ffi::GST_EVENT_TOC, @@ -911,7 +903,6 @@ impl IntoGlib for EventType { Self::Step => ffi::GST_EVENT_STEP, Self::Reconfigure => ffi::GST_EVENT_RECONFIGURE, Self::TocSelect => ffi::GST_EVENT_TOC_SELECT, - #[cfg(any(feature = "v1_10", feature = "dox"))] Self::SelectStreams => ffi::GST_EVENT_SELECT_STREAMS, #[cfg(any(feature = "v1_18", feature = "dox"))] Self::InstantRateSyncTime => ffi::GST_EVENT_INSTANT_RATE_SYNC_TIME, @@ -937,12 +928,10 @@ impl FromGlib for EventType { ffi::GST_EVENT_STREAM_START => Self::StreamStart, ffi::GST_EVENT_CAPS => Self::Caps, ffi::GST_EVENT_SEGMENT => Self::Segment, - #[cfg(any(feature = "v1_10", feature = "dox"))] ffi::GST_EVENT_STREAM_COLLECTION => Self::StreamCollection, ffi::GST_EVENT_TAG => Self::Tag, ffi::GST_EVENT_BUFFERSIZE => Self::Buffersize, ffi::GST_EVENT_SINK_MESSAGE => Self::SinkMessage, - #[cfg(any(feature = "v1_10", feature = "dox"))] ffi::GST_EVENT_STREAM_GROUP_DONE => Self::StreamGroupDone, ffi::GST_EVENT_EOS => Self::Eos, ffi::GST_EVENT_TOC => Self::Toc, @@ -958,7 +947,6 @@ impl FromGlib for EventType { ffi::GST_EVENT_STEP => Self::Step, ffi::GST_EVENT_RECONFIGURE => Self::Reconfigure, ffi::GST_EVENT_TOC_SELECT => Self::TocSelect, - #[cfg(any(feature = "v1_10", feature = "dox"))] ffi::GST_EVENT_SELECT_STREAMS => Self::SelectStreams, #[cfg(any(feature = "v1_18", feature = "dox"))] ffi::GST_EVENT_INSTANT_RATE_SYNC_TIME => Self::InstantRateSyncTime, @@ -2074,8 +2062,6 @@ impl ToValue for ProgressType { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GstPromiseResult")] @@ -2092,8 +2078,6 @@ pub enum PromiseResult { __Unknown(i32), } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(hidden)] impl IntoGlib for PromiseResult { type GlibType = ffi::GstPromiseResult; @@ -2109,8 +2093,6 @@ impl IntoGlib for PromiseResult { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(hidden)] impl FromGlib for PromiseResult { unsafe fn from_glib(value: ffi::GstPromiseResult) -> Self { @@ -2125,22 +2107,16 @@ impl FromGlib for PromiseResult { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] impl StaticType for PromiseResult { fn static_type() -> Type { unsafe { from_glib(ffi::gst_promise_result_get_type()) } } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] impl glib::value::ValueType for PromiseResult { type Type = Self; } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] unsafe impl<'a> FromValue<'a> for PromiseResult { type Checker = glib::value::GenericValueTypeChecker; @@ -2150,8 +2126,6 @@ unsafe impl<'a> FromValue<'a> for PromiseResult { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] impl ToValue for PromiseResult { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); @@ -2665,6 +2639,20 @@ pub enum StateChange { __Unknown(i32), } +impl StateChange { + pub fn name<'a>(self) -> &'a str { + unsafe { + CStr::from_ptr( + ffi::gst_state_change_get_name(self.into_glib()) + .as_ref() + .expect("gst_state_change_get_name returned NULL"), + ) + .to_str() + .expect("gst_state_change_get_name returned an invalid string") + } + } +} + impl fmt::Display for StateChange { #[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/gstreamer/src/auto/flags.rs b/gstreamer/src/auto/flags.rs index 46271f306..06878f313 100644 --- a/gstreamer/src/auto/flags.rs +++ b/gstreamer/src/auto/flags.rs @@ -9,11 +9,7 @@ use glib::value::FromValue; use glib::value::ToValue; use glib::StaticType; use glib::Type; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use std::ffi::CStr; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use std::fmt; bitflags! { @@ -21,8 +17,6 @@ bitflags! { pub struct BinFlags: u32 { #[doc(alias = "GST_BIN_FLAG_NO_RESYNC")] const NO_RESYNC = ffi::GST_BIN_FLAG_NO_RESYNC as u32; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "GST_BIN_FLAG_STREAMS_AWARE")] const STREAMS_AWARE = ffi::GST_BIN_FLAG_STREAMS_AWARE as u32; } @@ -174,8 +168,6 @@ bitflags! { const TAG_MEMORY = ffi::GST_BUFFER_FLAG_TAG_MEMORY as u32; #[doc(alias = "GST_BUFFER_FLAG_SYNC_AFTER")] const SYNC_AFTER = ffi::GST_BUFFER_FLAG_SYNC_AFTER as u32; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "GST_BUFFER_FLAG_NON_DROPPABLE")] const NON_DROPPABLE = ffi::GST_BUFFER_FLAG_NON_DROPPABLE as u32; } @@ -864,8 +856,6 @@ impl ToValue for MetaFlags { bitflags! { #[doc(alias = "GstObjectFlags")] pub struct ObjectFlags: u32 { - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "GST_OBJECT_FLAG_MAY_BE_LEAKED")] const MAY_BE_LEAKED = ffi::GST_OBJECT_FLAG_MAY_BE_LEAKED as u32; } @@ -1174,8 +1164,6 @@ bitflags! { const FATAL_ERRORS = ffi::GST_PARSE_FLAG_FATAL_ERRORS as u32; #[doc(alias = "GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS")] const NO_SINGLE_ELEMENT_BINS = ffi::GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS as u32; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "GST_PARSE_FLAG_PLACE_IN_BIN")] const PLACE_IN_BIN = ffi::GST_PARSE_FLAG_PLACE_IN_BIN as u32; } @@ -1782,9 +1770,7 @@ impl ToValue for SerializeFlags { } } -#[cfg(any(feature = "v1_12", feature = "dox"))] bitflags! { - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "GstStackTraceFlags")] pub struct StackTraceFlags: u32 { #[doc(alias = "GST_STACK_TRACE_SHOW_FULL")] @@ -1792,8 +1778,6 @@ bitflags! { } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(hidden)] impl IntoGlib for StackTraceFlags { type GlibType = ffi::GstStackTraceFlags; @@ -1803,8 +1787,6 @@ impl IntoGlib for StackTraceFlags { } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(hidden)] impl FromGlib for StackTraceFlags { unsafe fn from_glib(value: ffi::GstStackTraceFlags) -> Self { @@ -1813,22 +1795,16 @@ impl FromGlib for StackTraceFlags { } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl StaticType for StackTraceFlags { fn static_type() -> Type { unsafe { from_glib(ffi::gst_stack_trace_flags_get_type()) } } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl glib::value::ValueType for StackTraceFlags { type Type = Self; } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] unsafe impl<'a> FromValue<'a> for StackTraceFlags { type Checker = glib::value::GenericValueTypeChecker; @@ -1838,8 +1814,6 @@ unsafe impl<'a> FromValue<'a> for StackTraceFlags { } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl ToValue for StackTraceFlags { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); @@ -1916,9 +1890,7 @@ impl ToValue for StreamFlags { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] bitflags! { - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "GstStreamType")] pub struct StreamType: u32 { #[doc(alias = "GST_STREAM_TYPE_UNKNOWN")] @@ -1934,8 +1906,6 @@ bitflags! { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StreamType { pub fn name<'a>(self) -> &'a str { unsafe { @@ -1950,8 +1920,6 @@ impl StreamType { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl fmt::Display for StreamType { #[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -1959,8 +1927,6 @@ impl fmt::Display for StreamType { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] impl IntoGlib for StreamType { type GlibType = ffi::GstStreamType; @@ -1970,8 +1936,6 @@ impl IntoGlib for StreamType { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] impl FromGlib for StreamType { unsafe fn from_glib(value: ffi::GstStreamType) -> Self { @@ -1980,22 +1944,16 @@ impl FromGlib for StreamType { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StaticType for StreamType { fn static_type() -> Type { unsafe { from_glib(ffi::gst_stream_type_get_type()) } } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl glib::value::ValueType for StreamType { type Type = Self; } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] unsafe impl<'a> FromValue<'a> for StreamType { type Checker = glib::value::GenericValueTypeChecker; @@ -2005,8 +1963,6 @@ unsafe impl<'a> FromValue<'a> for StreamType { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl ToValue for StreamType { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); diff --git a/gstreamer/src/auto/functions.rs b/gstreamer/src/auto/functions.rs index 0bc30066d..61a3cfe5e 100644 --- a/gstreamer/src/auto/functions.rs +++ b/gstreamer/src/auto/functions.rs @@ -8,16 +8,12 @@ use crate::ClockTime; use crate::DebugGraphDetails; use crate::DebugLevel; use crate::Element; -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] use crate::StackTraceFlags; use glib::object::IsA; use glib::translate::*; use std::mem; use std::ptr; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_debug_add_ring_buffer_logger")] pub fn debug_add_ring_buffer_logger(max_size_per_thread: u32, thread_timeout: u32) { skip_assert_initialized!(); @@ -75,8 +71,6 @@ pub fn debug_get_default_threshold() -> DebugLevel { unsafe { from_glib(ffi::gst_debug_get_default_threshold()) } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_debug_get_stack_trace")] pub fn debug_get_stack_trace(flags: StackTraceFlags) -> Result { skip_assert_initialized!(); @@ -106,8 +100,6 @@ pub fn debug_print_stack_trace() { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_debug_remove_ring_buffer_logger")] pub fn debug_remove_ring_buffer_logger() { skip_assert_initialized!(); @@ -116,8 +108,6 @@ pub fn debug_remove_ring_buffer_logger() { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_debug_ring_buffer_logger_get_logs")] pub fn debug_ring_buffer_logger_get_logs() -> Vec { skip_assert_initialized!(); @@ -172,8 +162,6 @@ pub fn debug_unset_threshold_for_name(name: &str) { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_get_main_executable_path")] #[doc(alias = "get_main_executable_path")] pub fn main_executable_path() -> Result { diff --git a/gstreamer/src/auto/mod.rs b/gstreamer/src/auto/mod.rs index 958649059..ff6b6b5d4 100644 --- a/gstreamer/src/auto/mod.rs +++ b/gstreamer/src/auto/mod.rs @@ -75,18 +75,10 @@ pub use self::proxy_pad::ProxyPad; mod registry; pub use self::registry::Registry; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] mod stream; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub use self::stream::Stream; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] mod stream_collection; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub use self::stream_collection::StreamCollection; mod system_clock; @@ -140,8 +132,6 @@ pub use self::enums::PadProbeReturn; pub use self::enums::ParseError; pub use self::enums::PluginError; pub use self::enums::ProgressType; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use self::enums::PromiseResult; pub use self::enums::QOSType; pub use self::enums::Rank; @@ -196,12 +186,8 @@ pub use self::flags::SegmentFlags; #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] pub use self::flags::SerializeFlags; -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub use self::flags::StackTraceFlags; pub use self::flags::StreamFlags; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub use self::flags::StreamType; mod alias; diff --git a/gstreamer/src/auto/pad.rs b/gstreamer/src/auto/pad.rs index 88ebf9dae..0a5084ce8 100644 --- a/gstreamer/src/auto/pad.rs +++ b/gstreamer/src/auto/pad.rs @@ -15,11 +15,7 @@ use crate::PadLinkError; use crate::PadLinkSuccess; use crate::PadMode; use crate::PadTemplate; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use crate::Stream; -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] use crate::TaskState; use glib::object::Cast; use glib::object::IsA; @@ -120,8 +116,6 @@ pub trait PadExt: 'static { #[must_use] fn single_internal_link(&self) -> Option; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_pad_get_stream")] #[doc(alias = "get_stream")] fn stream(&self) -> Option; @@ -130,8 +124,6 @@ pub trait PadExt: 'static { #[doc(alias = "get_stream_id")] fn stream_id(&self) -> Option; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_pad_get_task_state")] #[doc(alias = "get_task_state")] fn task_state(&self) -> TaskState; @@ -167,13 +159,9 @@ pub trait PadExt: 'static { flags: PadLinkCheck, ) -> Result; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_pad_link_maybe_ghosting")] fn link_maybe_ghosting(&self, sink: &impl IsA) -> Result<(), glib::error::BoolError>; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_pad_link_maybe_ghosting_full")] fn link_maybe_ghosting_full( &self, @@ -388,8 +376,6 @@ impl> PadExt for O { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn stream(&self) -> Option { unsafe { from_glib_full(ffi::gst_pad_get_stream(self.as_ref().to_glib_none().0)) } } @@ -398,8 +384,6 @@ impl> PadExt for O { unsafe { from_glib_full(ffi::gst_pad_get_stream_id(self.as_ref().to_glib_none().0)) } } - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn task_state(&self) -> TaskState { unsafe { from_glib(ffi::gst_pad_get_task_state(self.as_ref().to_glib_none().0)) } } @@ -459,8 +443,6 @@ impl> PadExt for O { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn link_maybe_ghosting(&self, sink: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -473,8 +455,6 @@ impl> PadExt for O { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn link_maybe_ghosting_full( &self, sink: &impl IsA, diff --git a/gstreamer/src/auto/pad_template.rs b/gstreamer/src/auto/pad_template.rs index dcde7c78f..d019f0263 100644 --- a/gstreamer/src/auto/pad_template.rs +++ b/gstreamer/src/auto/pad_template.rs @@ -46,8 +46,6 @@ impl PadTemplate { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_pad_template_new_with_gtype")] #[doc(alias = "new_with_gtype")] pub fn with_gtype( @@ -111,8 +109,6 @@ impl PadTemplate { glib::ObjectExt::property(self, "direction") } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gtype(&self) -> glib::types::Type { glib::ObjectExt::property(self, "gtype") } diff --git a/gstreamer/src/auto/stream.rs b/gstreamer/src/auto/stream.rs index 7c6ea35bf..60206a15e 100644 --- a/gstreamer/src/auto/stream.rs +++ b/gstreamer/src/auto/stream.rs @@ -25,6 +25,24 @@ glib::wrapper! { } impl Stream { + #[doc(alias = "gst_stream_new")] + pub fn new( + stream_id: Option<&str>, + caps: Option<&Caps>, + type_: StreamType, + flags: StreamFlags, + ) -> Stream { + assert_initialized_main_thread!(); + unsafe { + from_glib_full(ffi::gst_stream_new( + stream_id.to_glib_none().0, + caps.to_glib_none().0, + type_.into_glib(), + flags.into_glib(), + )) + } + } + #[doc(alias = "gst_stream_get_caps")] #[doc(alias = "get_caps")] pub fn caps(&self) -> Option { @@ -83,8 +101,6 @@ impl Stream { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "caps")] pub fn connect_caps_notify( &self, @@ -111,8 +127,6 @@ impl Stream { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "stream-flags")] pub fn connect_stream_flags_notify( &self, @@ -141,8 +155,6 @@ impl Stream { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "stream-type")] pub fn connect_stream_type_notify( &self, @@ -171,8 +183,6 @@ impl Stream { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "tags")] pub fn connect_tags_notify( &self, diff --git a/gstreamer/src/auto/tracer_factory.rs b/gstreamer/src/auto/tracer_factory.rs index 3135db6e1..b90ea4d8d 100644 --- a/gstreamer/src/auto/tracer_factory.rs +++ b/gstreamer/src/auto/tracer_factory.rs @@ -5,8 +5,6 @@ use crate::Object; use crate::PluginFeature; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use glib::translate::*; glib::wrapper! { @@ -19,8 +17,6 @@ glib::wrapper! { } impl TracerFactory { - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_tracer_factory_get_tracer_type")] #[doc(alias = "get_tracer_type")] pub fn tracer_type(&self) -> glib::types::Type { diff --git a/gstreamer/src/buffer.rs b/gstreamer/src/buffer.rs index d0b4c77d6..d99b38b7a 100644 --- a/gstreamer/src/buffer.rs +++ b/gstreamer/src/buffer.rs @@ -1401,8 +1401,6 @@ mod tests { assert_eq!(last, 4); } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[test] fn test_meta_foreach() { crate::init().unwrap(); @@ -1436,8 +1434,6 @@ mod tests { assert_eq!(&[ClockTime::ZERO, ClockTime::SECOND][..], &res[..]); } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[test] fn test_meta_foreach_mut() { crate::init().unwrap(); diff --git a/gstreamer/src/buffer_pool.rs b/gstreamer/src/buffer_pool.rs index 81180fd89..2b6048a9a 100644 --- a/gstreamer/src/buffer_pool.rs +++ b/gstreamer/src/buffer_pool.rs @@ -333,26 +333,6 @@ impl FromGlibPtrNone<*mut ffi::GstBufferPoolAcquireParams> for BufferPoolAcquire } } -impl BufferPool { - #[doc(alias = "gst_buffer_pool_new")] - pub fn new() -> BufferPool { - assert_initialized_main_thread!(); - let (major, minor, _, _) = crate::version(); - if (major, minor) > (1, 12) { - unsafe { from_glib_full(ffi::gst_buffer_pool_new()) } - } else { - // Work-around for 1.14 switching from transfer-floating to transfer-full - unsafe { from_glib_none(ffi::gst_buffer_pool_new()) } - } - } -} - -impl Default for BufferPool { - fn default() -> Self { - Self::new() - } -} - pub trait BufferPoolExtManual: 'static { #[doc(alias = "get_config")] #[doc(alias = "gst_buffer_pool_get_config")] diff --git a/gstreamer/src/bufferlist.rs b/gstreamer/src/bufferlist.rs index fce1d2311..d0df8c0f9 100644 --- a/gstreamer/src/bufferlist.rs +++ b/gstreamer/src/bufferlist.rs @@ -69,8 +69,6 @@ impl BufferListRef { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_buffer_list_get_writable")] #[doc(alias = "get_writable")] pub fn get_mut(&mut self, idx: u32) -> Option<&mut BufferRef> { @@ -89,8 +87,6 @@ impl BufferListRef { unsafe { ffi::gst_buffer_list_length(self.as_mut_ptr()) as usize } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_buffer_list_calculate_size")] pub fn calculate_size(&self) -> usize { unsafe { ffi::gst_buffer_list_calculate_size(self.as_mut_ptr()) as usize } diff --git a/gstreamer/src/device_monitor.rs b/gstreamer/src/device_monitor.rs index 66d071310..4265d6e9a 100644 --- a/gstreamer/src/device_monitor.rs +++ b/gstreamer/src/device_monitor.rs @@ -8,26 +8,6 @@ use glib::translate::*; use std::num::NonZeroU32; -impl DeviceMonitor { - #[doc(alias = "gst_device_monitor_new")] - pub fn new() -> DeviceMonitor { - assert_initialized_main_thread!(); - let (major, minor, _, _) = crate::version(); - if (major, minor) > (1, 12) { - unsafe { from_glib_full(ffi::gst_device_monitor_new()) } - } else { - // Work-around for 1.14 switching from transfer-floating to transfer-full - unsafe { from_glib_none(ffi::gst_device_monitor_new()) } - } - } -} - -impl Default for DeviceMonitor { - fn default() -> Self { - Self::new() - } -} - #[derive(Debug, PartialEq, Eq)] pub struct DeviceMonitorFilterId(NonZeroU32); diff --git a/gstreamer/src/element.rs b/gstreamer/src/element.rs index 7030935b2..5a8f867aa 100644 --- a/gstreamer/src/element.rs +++ b/gstreamer/src/element.rs @@ -22,13 +22,9 @@ use crate::State; use glib::translate::*; use std::ffi::CStr; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use std::future::Future; use std::mem; use std::num::NonZeroU64; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use std::pin::Pin; impl Element { @@ -155,8 +151,6 @@ pub trait ElementExtManual: 'static { #[doc(alias = "get_element_flags")] fn element_flags(&self) -> ElementFlags; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[allow(clippy::too_many_arguments)] #[doc(alias = "gst_element_message_full_with_details")] fn message_full_with_details( @@ -196,8 +190,6 @@ pub trait ElementExtManual: 'static { fn num_sink_pads(&self) -> u16; fn num_src_pads(&self) -> u16; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_element_add_property_deep_notify_watch")] fn add_property_deep_notify_watch( &self, @@ -205,8 +197,6 @@ pub trait ElementExtManual: 'static { include_value: bool, ) -> NotifyWatchId; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_element_add_property_notify_watch")] fn add_property_notify_watch( &self, @@ -214,8 +204,6 @@ pub trait ElementExtManual: 'static { include_value: bool, ) -> NotifyWatchId; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_element_remove_property_notify_watch")] fn remove_property_notify_watch(&self, watch_id: NotifyWatchId); @@ -257,15 +245,11 @@ pub trait ElementExtManual: 'static { seek_pos: V, ) -> Result<(), glib::error::BoolError>; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_element_call_async")] fn call_async(&self, func: F) where F: FnOnce(&Self) + Send + 'static; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn call_async_future(&self, func: F) -> Pin + Send + 'static>> where F: FnOnce(&Self) -> T + Send + 'static, @@ -387,8 +371,6 @@ impl> ElementExtManual for O { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn message_full_with_details( &self, type_: ElementMessageType, @@ -529,8 +511,6 @@ impl> ElementExtManual for O { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn add_property_deep_notify_watch( &self, property_name: Option<&str>, @@ -546,8 +526,6 @@ impl> ElementExtManual for O { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn add_property_notify_watch( &self, property_name: Option<&str>, @@ -563,8 +541,6 @@ impl> ElementExtManual for O { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn remove_property_notify_watch(&self, watch_id: NotifyWatchId) { unsafe { ffi::gst_element_remove_property_notify_watch( @@ -736,8 +712,6 @@ impl> ElementExtManual for O { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn call_async(&self, func: F) where F: FnOnce(&Self) + Send + 'static, @@ -770,8 +744,6 @@ impl> ElementExtManual for O { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn call_async_future(&self, func: F) -> Pin + Send + 'static>> where F: FnOnce(&Self) -> T + Send + 'static, @@ -1382,7 +1354,6 @@ macro_rules! element_info( mod tests { use super::*; use glib::GString; - #[cfg(feature = "v1_10")] use std::sync::mpsc::channel; #[test] @@ -1417,7 +1388,6 @@ mod tests { } #[test] - #[cfg(feature = "v1_14")] fn test_foreach_pad() { crate::init().unwrap(); @@ -1433,7 +1403,6 @@ mod tests { assert_eq!(pad_names, vec![String::from("sink"), String::from("src")]); } - #[cfg(feature = "v1_10")] #[test] fn test_call_async() { crate::init().unwrap(); diff --git a/gstreamer/src/enums.rs b/gstreamer/src/enums.rs index 34a3ad57d..447d76d7a 100644 --- a/gstreamer/src/enums.rs +++ b/gstreamer/src/enums.rs @@ -694,38 +694,4 @@ impl StateChange { StateChange::__Unknown(value) => State::__Unknown(value & 0x7), } } - - #[doc(alias = "get_name")] - #[doc(alias = "gst_state_change_get_name")] - pub fn name<'a>(self) -> &'a str { - cfg_if::cfg_if! { - if #[cfg(feature = "v1_14")] { - // This implementation is autogenerated on 1.14 and up - use std::ffi::CStr; - unsafe { - CStr::from_ptr( - ffi::gst_state_change_get_name(self.into_glib()) - .as_ref() - .expect("gst_state_change_get_name returned NULL"), - ) - .to_str() - .expect("gst_state_change_get_name returned an invalid string") - } - } else { - match self { - Self::NullToReady => "NULL->READY", - Self::ReadyToPaused => "READY->PAUSED", - Self::PausedToPlaying => "PAUSED->PLAYING", - Self::PlayingToPaused => "PLAYING->PAUSED", - Self::PausedToReady => "PAUSED->READY", - Self::ReadyToNull => "READY->NULL", - Self::NullToNull => "NULL->NULL", - Self::ReadyToReady => "READY->READY", - Self::PausedToPaused => "PAUSED->PAUSED", - Self::PlayingToPlaying => "PLAYING->PLAYING", - _ => "Unknown state return", - } - } - } - } } diff --git a/gstreamer/src/event.rs b/gstreamer/src/event.rs index 4073a56e0..2bbcced32 100644 --- a/gstreamer/src/event.rs +++ b/gstreamer/src/event.rs @@ -16,8 +16,6 @@ use std::ptr; use glib::translate::*; use glib::value::ToSendValue; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use glib::translate::FromGlibPtrContainer; use crate::EventType; @@ -230,12 +228,10 @@ impl EventRef { ffi::GST_EVENT_STREAM_START => StreamStart::view(self), ffi::GST_EVENT_CAPS => Caps::view(self), ffi::GST_EVENT_SEGMENT => Segment::view(self), - #[cfg(any(feature = "v1_10", feature = "dox"))] ffi::GST_EVENT_STREAM_COLLECTION => StreamCollection::view(self), ffi::GST_EVENT_TAG => Tag::view(self), ffi::GST_EVENT_BUFFERSIZE => Buffersize::view(self), ffi::GST_EVENT_SINK_MESSAGE => SinkMessage::view(self), - #[cfg(any(feature = "v1_10", feature = "dox"))] ffi::GST_EVENT_STREAM_GROUP_DONE => StreamGroupDone::view(self), ffi::GST_EVENT_EOS => Eos::view(self), ffi::GST_EVENT_TOC => Toc::view(self), @@ -251,7 +247,6 @@ impl EventRef { ffi::GST_EVENT_STEP => Step::view(self), ffi::GST_EVENT_RECONFIGURE => Reconfigure::view(self), ffi::GST_EVENT_TOC_SELECT => TocSelect::view(self), - #[cfg(any(feature = "v1_10", feature = "dox"))] ffi::GST_EVENT_SELECT_STREAMS => SelectStreams::view(self), #[cfg(any(feature = "v1_18", feature = "dox"))] ffi::GST_EVENT_INSTANT_RATE_SYNC_TIME => InstantRateSyncTime::view(self), @@ -298,14 +293,10 @@ pub enum EventView<'a> { StreamStart(&'a StreamStart), Caps(&'a Caps), Segment(&'a Segment), - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] StreamCollection(&'a StreamCollection), Tag(&'a Tag), Buffersize(&'a Buffersize), SinkMessage(&'a SinkMessage), - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] StreamGroupDone(&'a StreamGroupDone), Eos(&'a Eos), Toc(&'a Toc), @@ -322,8 +313,6 @@ pub enum EventView<'a> { Step(&'a Step), Reconfigure(&'a Reconfigure), TocSelect(&'a TocSelect), - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] SelectStreams(&'a SelectStreams), #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] @@ -512,8 +501,6 @@ impl StreamStart { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "get_stream")] #[doc(alias = "gst_event_parse_stream")] pub fn stream(&self) -> Option { @@ -589,11 +576,7 @@ impl Segment { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] declare_concrete_event!(@sticky StreamCollection, T); -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StreamCollection { #[doc(alias = "gst_event_new_stream_collection")] #[allow(clippy::new_ret_no_self)] @@ -608,8 +591,6 @@ impl StreamCollection { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StreamCollection { #[doc(alias = "get_stream_collection")] #[doc(alias = "gst_event_parse_stream_collection")] @@ -733,11 +714,7 @@ impl SinkMessage { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] declare_concrete_event!(@sticky StreamGroupDone, T); -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StreamGroupDone { #[doc(alias = "gst_event_new_stream_group_done")] #[allow(clippy::new_ret_no_self)] @@ -752,8 +729,6 @@ impl StreamGroupDone { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StreamGroupDone { #[doc(alias = "get_group_id")] #[doc(alias = "gst_event_parse_stream_group_done")] @@ -1289,11 +1264,7 @@ impl TocSelect { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] declare_concrete_event!(SelectStreams, T); -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl SelectStreams { #[doc(alias = "gst_event_new_select_streams")] #[allow(clippy::new_ret_no_self)] @@ -1308,8 +1279,6 @@ impl SelectStreams { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl SelectStreams { #[doc(alias = "get_streams")] #[doc(alias = "gst_event_parse_select_streams")] @@ -1613,8 +1582,6 @@ pub struct StreamStartBuilder<'a> { stream_id: &'a str, flags: Option, group_id: Option, - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] stream: Option, } @@ -1626,8 +1593,6 @@ impl<'a> StreamStartBuilder<'a> { stream_id, flags: None, group_id: None, - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] stream: None, } } @@ -1646,8 +1611,6 @@ impl<'a> StreamStartBuilder<'a> { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn stream(self, stream: crate::Stream) -> Self { Self { stream: Some(stream), @@ -1664,7 +1627,6 @@ impl<'a> StreamStartBuilder<'a> { ffi::gst_event_set_group_id(ev, group_id.0.get()); } - #[cfg(any(feature = "v1_10", feature = "dox"))] if let Some(ref stream) = s.stream { ffi::gst_event_set_stream(ev, stream.to_glib_none().0); } @@ -1711,16 +1673,12 @@ impl<'a> SegmentBuilder<'a> { }); } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[must_use = "The builder must be built to be used"] pub struct StreamCollectionBuilder<'a> { builder: EventBuilder<'a>, stream_collection: &'a crate::StreamCollection, } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> StreamCollectionBuilder<'a> { fn new(stream_collection: &'a crate::StreamCollection) -> Self { skip_assert_initialized!(); @@ -1843,16 +1801,12 @@ impl<'a> SinkMessageBuilder<'a> { }); } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[must_use = "The builder must be built to be used"] pub struct StreamGroupDoneBuilder<'a> { builder: EventBuilder<'a>, group_id: GroupId, } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> StreamGroupDoneBuilder<'a> { fn new(group_id: GroupId) -> Self { skip_assert_initialized!(); @@ -2238,16 +2192,12 @@ impl<'a> TocSelectBuilder<'a> { }); } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[must_use = "The builder must be built to be used"] pub struct SelectStreamsBuilder<'a> { builder: EventBuilder<'a>, streams: &'a [&'a str], } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> SelectStreamsBuilder<'a> { fn new(streams: &'a [&'a str]) -> Self { skip_assert_initialized!(); diff --git a/gstreamer/src/functions.rs b/gstreamer/src/functions.rs index 136783441..766e214f8 100644 --- a/gstreamer/src/functions.rs +++ b/gstreamer/src/functions.rs @@ -120,8 +120,6 @@ pub fn parse_launchv_full( } } -#[cfg(any(feature = "v1_12", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(alias = "gst_calculate_linear_regression")] pub fn calculate_linear_regression( xy: &[(u64, u64)], @@ -206,7 +204,6 @@ mod tests { use super::*; use crate::prelude::*; - #[cfg(feature = "v1_12")] #[test] fn test_calculate_linear_regression() { crate::init().unwrap(); diff --git a/gstreamer/src/lib.rs b/gstreamer/src/lib.rs index b491534a5..5706bd422 100644 --- a/gstreamer/src/lib.rs +++ b/gstreamer/src/lib.rs @@ -91,8 +91,6 @@ pub mod meta; #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub use crate::meta::MetaSeqnum; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use crate::meta::ReferenceTimestampMeta; pub use crate::meta::{Meta, MetaAPI, MetaRef, MetaRefMut, ParentBufferMeta, ProtectionMeta}; pub mod buffer; @@ -127,11 +125,7 @@ pub use crate::static_caps::*; mod static_pad_template; pub use crate::static_pad_template::*; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub mod promise; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use promise::{Promise, PromiseError}; pub mod bus; @@ -152,11 +146,9 @@ mod tracer; mod tracer_factory; // OS dependent Bus extensions (also import the other platform mod for doc) -#[cfg(any(all(unix, feature = "v1_14"), feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] +#[cfg(any(unix, feature = "dox"))] mod bus_unix; -#[cfg(any(all(windows, feature = "v1_14"), feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] +#[cfg(any(windows, feature = "dox"))] mod bus_windows; mod child_proxy; @@ -207,11 +199,7 @@ pub use crate::parse_context::ParseContext; mod plugin_feature; mod plugin; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub mod stream; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub mod stream_collection; mod typefind; @@ -245,8 +233,6 @@ pub use crate::buffer_pool::{BufferPoolAcquireParams, BufferPoolConfig, BufferPo mod pad_template; pub mod param_spec; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use crate::param_spec::ParamSpecArray; pub use crate::param_spec::ParamSpecFraction; @@ -305,11 +291,9 @@ pub mod prelude { pub use crate::meta::MetaAPI; // OS dependent Bus extensions (also import the other platform trait for doc) - #[cfg(any(all(unix, feature = "v1_14"), feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] + #[cfg(any(unix, feature = "dox"))] pub use crate::bus_unix::UnixBusExtManual; - #[cfg(any(all(windows, feature = "v1_14"), feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] + #[cfg(any(windows, feature = "dox"))] pub use crate::bus_windows::WindowsBusExtManual; pub use crate::bin::GstBinExtManual; diff --git a/gstreamer/src/message.rs b/gstreamer/src/message.rs index b2c0bdf74..e558c1f87 100644 --- a/gstreamer/src/message.rs +++ b/gstreamer/src/message.rs @@ -110,14 +110,9 @@ impl MessageRef { ffi::GST_MESSAGE_HAVE_CONTEXT => HaveContext::view(self), ffi::GST_MESSAGE_DEVICE_ADDED => DeviceAdded::view(self), ffi::GST_MESSAGE_DEVICE_REMOVED => DeviceRemoved::view(self), - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] ffi::GST_MESSAGE_REDIRECT => Redirect::view(self), - #[cfg(any(feature = "v1_10", feature = "dox"))] ffi::GST_MESSAGE_PROPERTY_NOTIFY => PropertyNotify::view(self), - #[cfg(any(feature = "v1_10", feature = "dox"))] ffi::GST_MESSAGE_STREAM_COLLECTION => StreamCollection::view(self), - #[cfg(any(feature = "v1_10", feature = "dox"))] ffi::GST_MESSAGE_STREAMS_SELECTED => StreamsSelected::view(self), #[cfg(any(feature = "v1_16", feature = "dox"))] ffi::GST_MESSAGE_DEVICE_CHANGED => DeviceChanged::view(self), @@ -210,17 +205,9 @@ pub enum MessageView<'a> { HaveContext(&'a HaveContext), DeviceAdded(&'a DeviceAdded), DeviceRemoved(&'a DeviceRemoved), - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] PropertyNotify(&'a PropertyNotify), - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] StreamCollection(&'a StreamCollection), - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] StreamsSelected(&'a StreamsSelected), - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] Redirect(&'a Redirect), #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] @@ -350,8 +337,6 @@ impl Error { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "get_details")] #[doc(alias = "gst_message_parse_error_details")] pub fn details(&self) -> Option<&StructureRef> { @@ -407,8 +392,6 @@ impl Warning { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "get_details")] #[doc(alias = "gst_message_parse_warning_details")] pub fn details(&self) -> Option<&StructureRef> { @@ -464,8 +447,6 @@ impl Info { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "get_details")] #[doc(alias = "gst_message_parse_info_details")] pub fn details(&self) -> Option<&StructureRef> { @@ -1515,11 +1496,7 @@ impl DeviceRemoved { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] declare_concrete_message!(PropertyNotify, T); -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl PropertyNotify { #[doc(alias = "gst_message_new_property_notify")] #[allow(clippy::new_ret_no_self)] @@ -1560,11 +1537,7 @@ impl PropertyNotify { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] declare_concrete_message!(StreamCollection, T); -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StreamCollection { #[doc(alias = "gst_message_new_stream_collection")] #[allow(clippy::new_ret_no_self)] @@ -1591,11 +1564,7 @@ impl StreamCollection { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] declare_concrete_message!(StreamsSelected, T); -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StreamsSelected { #[doc(alias = "gst_message_new_streams_selected")] #[allow(clippy::new_ret_no_self)] @@ -1640,11 +1609,7 @@ impl StreamsSelected { } } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] declare_concrete_message!(Redirect, T); -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl Redirect { #[doc(alias = "gst_message_new_redirect")] #[allow(clippy::new_ret_no_self)] @@ -1799,8 +1764,6 @@ impl<'a> MessageBuilder<'a> { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn other_fields(self, other_fields: &[(&'a str, &'a (dyn ToSendValue + Sync))]) -> Self { Self { other_fields: self @@ -1833,8 +1796,6 @@ macro_rules! message_builder_generic_impl { } } - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[allow(clippy::needless_update)] pub fn other_fields( self, @@ -1856,7 +1817,6 @@ macro_rules! message_builder_generic_impl { ffi::gst_message_set_seqnum(msg, seqnum.0.get()); } - #[cfg(any(feature = "v1_14", feature = "dox"))] if !self.builder.other_fields.is_empty() { let structure = ffi::gst_message_writable_structure(msg); @@ -1927,8 +1887,6 @@ impl<'a, T: MessageErrorDomain> ErrorBuilder<'a, T> { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn details(self, details: Structure) -> Self { Self { details: Some(details), @@ -1937,31 +1895,19 @@ impl<'a, T: MessageErrorDomain> ErrorBuilder<'a, T> { } message_builder_generic_impl!(|s: &mut Self, src| { - cfg_if::cfg_if! { - if #[cfg(any(feature = "v1_10", feature = "dox"))] { - let details = match s.details.take() { - None => ptr::null_mut(), - Some(details) => details.into_ptr(), - }; + let details = match s.details.take() { + None => ptr::null_mut(), + Some(details) => details.into_ptr(), + }; - let error = glib::Error::new(s.error, s.message); + let error = glib::Error::new(s.error, s.message); - ffi::gst_message_new_error_with_details( - src, - mut_override(error.to_glib_none().0), - s.debug.to_glib_none().0, - details, - ) - } else { - let error = glib::Error::new(s.error, s.message); - - ffi::gst_message_new_error( - src, - mut_override(error.to_glib_none().0), - s.debug.to_glib_none().0, - ) - } - } + ffi::gst_message_new_error_with_details( + src, + mut_override(error.to_glib_none().0), + s.debug.to_glib_none().0, + details, + ) }); } @@ -1994,8 +1940,6 @@ impl<'a, T: MessageErrorDomain> WarningBuilder<'a, T> { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn details(self, details: Structure) -> Self { Self { details: Some(details), @@ -2004,31 +1948,19 @@ impl<'a, T: MessageErrorDomain> WarningBuilder<'a, T> { } message_builder_generic_impl!(|s: &mut Self, src| { - cfg_if::cfg_if! { - if #[cfg(any(feature = "v1_10", feature = "dox"))] { - let details = match s.details.take() { - None => ptr::null_mut(), - Some(details) => details.into_ptr(), - }; + let details = match s.details.take() { + None => ptr::null_mut(), + Some(details) => details.into_ptr(), + }; - let error = glib::Error::new(s.error, s.message); + let error = glib::Error::new(s.error, s.message); - ffi::gst_message_new_warning_with_details( - src, - mut_override(error.to_glib_none().0), - s.debug.to_glib_none().0, - details, - ) - } else { - let error = glib::Error::new(s.error, s.message); - - ffi::gst_message_new_warning( - src, - mut_override(error.to_glib_none().0), - s.debug.to_glib_none().0, - ) - } - } + ffi::gst_message_new_warning_with_details( + src, + mut_override(error.to_glib_none().0), + s.debug.to_glib_none().0, + details, + ) }); } @@ -2061,8 +1993,6 @@ impl<'a, T: MessageErrorDomain> InfoBuilder<'a, T> { } } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn details(self, details: Structure) -> Self { Self { details: Some(details), @@ -2071,31 +2001,19 @@ impl<'a, T: MessageErrorDomain> InfoBuilder<'a, T> { } message_builder_generic_impl!(|s: &mut Self, src| { - cfg_if::cfg_if! { - if #[cfg(any(feature = "v1_10", feature = "dox"))] { - let details = match s.details.take() { - None => ptr::null_mut(), - Some(details) => details.into_ptr(), - }; + let details = match s.details.take() { + None => ptr::null_mut(), + Some(details) => details.into_ptr(), + }; - let error = glib::Error::new(s.error, s.message); + let error = glib::Error::new(s.error, s.message); - ffi::gst_message_new_info_with_details( - src, - mut_override(error.to_glib_none().0), - s.debug.to_glib_none().0, - details, - ) - } else { - let error = glib::Error::new(s.error, s.message); - - ffi::gst_message_new_info( - src, - mut_override(error.to_glib_none().0), - s.debug.to_glib_none().0, - ) - } - } + ffi::gst_message_new_info_with_details( + src, + mut_override(error.to_glib_none().0), + s.debug.to_glib_none().0, + details, + ) }); } @@ -2884,8 +2802,6 @@ impl<'a> DeviceRemovedBuilder<'a> { )); } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[must_use = "The builder must be built to be used"] pub struct PropertyNotifyBuilder<'a> { builder: MessageBuilder<'a>, @@ -2893,8 +2809,6 @@ pub struct PropertyNotifyBuilder<'a> { value: Option<&'a (dyn glib::ToSendValue + Sync)>, } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> PropertyNotifyBuilder<'a> { fn new(property_name: &'a str) -> Self { skip_assert_initialized!(); @@ -2926,16 +2840,12 @@ impl<'a> PropertyNotifyBuilder<'a> { }); } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[must_use = "The builder must be built to be used"] pub struct StreamCollectionBuilder<'a> { builder: MessageBuilder<'a>, collection: &'a crate::StreamCollection, } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> StreamCollectionBuilder<'a> { fn new(collection: &'a crate::StreamCollection) -> Self { skip_assert_initialized!(); @@ -2950,8 +2860,6 @@ impl<'a> StreamCollectionBuilder<'a> { }); } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[must_use = "The builder must be built to be used"] pub struct StreamsSelectedBuilder<'a> { builder: MessageBuilder<'a>, @@ -2959,8 +2867,6 @@ pub struct StreamsSelectedBuilder<'a> { streams: Option>, } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> StreamsSelectedBuilder<'a> { fn new(collection: &'a crate::StreamCollection) -> Self { skip_assert_initialized!(); @@ -2997,8 +2903,6 @@ impl<'a> StreamsSelectedBuilder<'a> { }); } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[must_use = "The builder must be built to be used"] pub struct RedirectBuilder<'a> { builder: MessageBuilder<'a>, @@ -3009,8 +2913,6 @@ pub struct RedirectBuilder<'a> { entries: Option<&'a [(&'a str, Option<&'a TagList>, Option<&'a Structure>)]>, } -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> RedirectBuilder<'a> { fn new(location: &'a str) -> Self { skip_assert_initialized!(); @@ -3163,7 +3065,6 @@ mod tests { } } - #[cfg(feature = "v1_14")] #[test] fn test_other_fields() { crate::init().unwrap(); diff --git a/gstreamer/src/meta.rs b/gstreamer/src/meta.rs index 9f85a5641..52231427e 100644 --- a/gstreamer/src/meta.rs +++ b/gstreamer/src/meta.rs @@ -6,14 +6,8 @@ use std::ops; use crate::Buffer; use crate::BufferRef; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use crate::Caps; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use crate::CapsRef; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use crate::ClockTime; use glib::translate::*; @@ -451,21 +445,13 @@ impl fmt::Debug for ProtectionMeta { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[repr(transparent)] #[doc(alias = "GstReferenceTimestampMeta")] pub struct ReferenceTimestampMeta(ffi::GstReferenceTimestampMeta); -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] unsafe impl Send for ReferenceTimestampMeta {} -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] unsafe impl Sync for ReferenceTimestampMeta {} -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] impl ReferenceTimestampMeta { #[doc(alias = "gst_buffer_add_reference_timestamp_meta")] pub fn add<'a>( @@ -508,8 +494,6 @@ impl ReferenceTimestampMeta { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] unsafe impl MetaAPI for ReferenceTimestampMeta { type GstType = ffi::GstReferenceTimestampMeta; @@ -519,8 +503,6 @@ unsafe impl MetaAPI for ReferenceTimestampMeta { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] impl fmt::Debug for ReferenceTimestampMeta { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { use crate::utils::Displayable; diff --git a/gstreamer/src/pad_template.rs b/gstreamer/src/pad_template.rs index f8c6603bc..0da10caf1 100644 --- a/gstreamer/src/pad_template.rs +++ b/gstreamer/src/pad_template.rs @@ -1,16 +1,10 @@ // Take a look at the license at the top of the repository in the LICENSE file. use crate::PadTemplate; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use crate::StaticPadTemplate; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use glib::translate::*; impl PadTemplate { - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_pad_template_new_from_static_pad_template_with_gtype")] pub fn from_static_pad_template_with_gtype( pad_template: &StaticPadTemplate, diff --git a/gstreamer/src/param_spec.rs b/gstreamer/src/param_spec.rs index 5838247c2..d12d26c6f 100644 --- a/gstreamer/src/param_spec.rs +++ b/gstreamer/src/param_spec.rs @@ -183,8 +183,6 @@ impl<'a> ParamSpecFractionBuilder<'a> { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] #[doc(alias = "GstParamSpecArray")] @@ -197,15 +195,9 @@ glib::wrapper! { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] unsafe impl Send for ParamSpecArray {} -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] unsafe impl Sync for ParamSpecArray {} -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] impl std::ops::Deref for ParamSpecArray { type Target = ParamSpec; @@ -214,12 +206,8 @@ impl std::ops::Deref for ParamSpecArray { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] unsafe impl glib::ParamSpecType for ParamSpecArray {} -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(hidden)] impl FromGlibPtrFull<*mut gobject_ffi::GParamSpec> for ParamSpecArray { unsafe fn from_glib_full(ptr: *mut gobject_ffi::GParamSpec) -> Self { @@ -227,8 +215,6 @@ impl FromGlibPtrFull<*mut gobject_ffi::GParamSpec> for ParamSpecArray { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] impl ParamSpecArray { pub fn builder(name: &str) -> ParamSpecArrayBuilder { assert_initialized_main_thread!(); @@ -273,8 +259,6 @@ impl ParamSpecArray { } } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[derive(Default)] #[must_use] pub struct ParamSpecArrayBuilder<'a> { @@ -285,8 +269,6 @@ pub struct ParamSpecArrayBuilder<'a> { element_spec: Option<&'a glib::ParamSpec>, } -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] impl<'a> ParamSpecArrayBuilder<'a> { fn new(name: &'a str) -> Self { assert_initialized_main_thread!(); diff --git a/gstreamer/src/stream.rs b/gstreamer/src/stream.rs index 8637c3cb3..3f015178d 100644 --- a/gstreamer/src/stream.rs +++ b/gstreamer/src/stream.rs @@ -1,47 +1,9 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use crate::Caps; use crate::Stream; -use crate::StreamFlags; -use crate::StreamType; -use glib::translate::*; use std::fmt; impl Stream { - #[doc(alias = "gst_stream_new")] - pub fn new( - stream_id: Option<&str>, - caps: Option<&Caps>, - type_: StreamType, - flags: StreamFlags, - ) -> Stream { - assert_initialized_main_thread!(); - let stream_id = stream_id.to_glib_none(); - let caps = caps.to_glib_none(); - - let (major, minor, _, _) = crate::version(); - if (major, minor) > (1, 12) { - unsafe { - from_glib_full(ffi::gst_stream_new( - stream_id.0, - caps.0, - type_.into_glib(), - flags.into_glib(), - )) - } - } else { - // Work-around for 1.14 switching from transfer-floating to transfer-full - unsafe { - from_glib_none(ffi::gst_stream_new( - stream_id.0, - caps.0, - type_.into_glib(), - flags.into_glib(), - )) - } - } - } - pub fn debug(&self) -> Debug { Debug(self) } diff --git a/gstreamer/src/stream_collection.rs b/gstreamer/src/stream_collection.rs index 55ec0bbc7..7adc2424a 100644 --- a/gstreamer/src/stream_collection.rs +++ b/gstreamer/src/stream_collection.rs @@ -104,13 +104,7 @@ impl StreamCollection { pub fn builder(upstream_id: Option<&str>) -> StreamCollectionBuilder { assert_initialized_main_thread!(); let upstream_id = upstream_id.to_glib_none(); - let (major, minor, _, _) = crate::version(); - let collection = if (major, minor) > (1, 12) { - unsafe { from_glib_full(ffi::gst_stream_collection_new(upstream_id.0)) } - } else { - // Work-around for 1.14 switching from transfer-floating to transfer-full - unsafe { from_glib_none(ffi::gst_stream_collection_new(upstream_id.0)) } - }; + let collection = unsafe { from_glib_full(ffi::gst_stream_collection_new(upstream_id.0)) }; StreamCollectionBuilder(collection) } diff --git a/gstreamer/src/subclass/mod.rs b/gstreamer/src/subclass/mod.rs index 789f033d3..85abb85b0 100644 --- a/gstreamer/src/subclass/mod.rs +++ b/gstreamer/src/subclass/mod.rs @@ -5,14 +5,7 @@ #[macro_use] mod error; -#[cfg(any(feature = "v1_14"))] #[macro_use] -#[path = "plugin_1_14.rs"] -mod plugin; - -#[cfg(not(any(feature = "v1_14")))] -#[macro_use] -#[path = "plugin_1_12.rs"] mod plugin; mod bin; diff --git a/gstreamer/src/subclass/plugin_1_14.rs b/gstreamer/src/subclass/plugin.rs similarity index 99% rename from gstreamer/src/subclass/plugin_1_14.rs rename to gstreamer/src/subclass/plugin.rs index 04949f03e..07faf9d4b 100644 --- a/gstreamer/src/subclass/plugin_1_14.rs +++ b/gstreamer/src/subclass/plugin.rs @@ -11,7 +11,7 @@ cfg_if::cfg_if! { pub const MINOR_VERSION: i32 = 18; } else if #[cfg(feature = "v1_16")] { pub const MINOR_VERSION: i32 = 16; - } else if #[cfg(feature = "v1_14")] { + } else { pub const MINOR_VERSION: i32 = 14; } } diff --git a/gstreamer/src/subclass/plugin_1_12.rs b/gstreamer/src/subclass/plugin_1_12.rs deleted file mode 100644 index f31e3e595..000000000 --- a/gstreamer/src/subclass/plugin_1_12.rs +++ /dev/null @@ -1,113 +0,0 @@ -// Take a look at the license at the top of the repository in the LICENSE file. - -pub const MAJOR_VERSION: i32 = 1; - -#[cfg(not(feature = "v1_10"))] -pub const MINOR_VERSION: i32 = 8; -#[cfg(all(feature = "v1_10", not(feature = "v1_12")))] -pub const MINOR_VERSION: i32 = 10; -#[cfg(feature = "v1_12")] -pub const MINOR_VERSION: i32 = 12; - -#[macro_export] -macro_rules! plugin_define( - ($name:ident, $description:expr, $plugin_init:ident, - $version:expr, $license:expr, $source:expr, - $package:expr, $origin:expr $(, $release_datetime:expr)?) => { - pub mod plugin_desc { - #[repr(transparent)] - pub struct GstPluginDesc($crate::ffi::GstPluginDesc); - unsafe impl Send for GstPluginDesc {} - unsafe impl Sync for GstPluginDesc {} - - #[no_mangle] - #[allow(non_upper_case_globals)] - pub static gst_plugin_desc: GstPluginDesc = GstPluginDesc($crate::ffi::GstPluginDesc { - major_version: $crate::subclass::MAJOR_VERSION, - minor_version: $crate::subclass::MINOR_VERSION, - name: concat!(stringify!($name), "\0") as *const str as *const _, - description: concat!($description, "\0") as *const str as *const _, - plugin_init: Some(plugin_init_trampoline), - version: concat!($version, "\0") as *const str as *const _, - license: concat!($license, "\0") as *const str as *const _, - source: concat!($source, "\0") as *const str as *const _, - package: concat!($package, "\0") as *const str as *const _, - origin: concat!($origin, "\0") as *const str as *const _, - release_datetime: { - // NB: if this looks a lot like `Option`, it is not a coincidence. Alas, - // Option::or is not `const` and neither is `unwrap_or` so we have to roll our - // own oli-obk-ified enum instead. - enum OptionalPtr{ - Null, - Some(*const T), - } - impl OptionalPtr { - const fn with(self, value: *const T) -> Self { - Self::Some(value) - } - const fn ptr(self) -> *const T { - match self { - Self::Null => std::ptr::null(), - Self::Some(ptr) => ptr - } - } - } - OptionalPtr::Null - $(.with(concat!($release_datetime, "\0").as_ptr() as _))? - .ptr() - }, - _gst_reserved: [0 as $crate::glib::ffi::gpointer; 4], - }); - - pub fn plugin_register_static() -> Result<(), $crate::glib::BoolError> { - unsafe { - $crate::glib::result_from_gboolean!( - $crate::ffi::gst_plugin_register_static( - $crate::subclass::MAJOR_VERSION, - $crate::subclass::MINOR_VERSION, - concat!(stringify!($name), "\0") as *const str as *const _, - concat!($description, "\0") as *const str as _, - Some(plugin_init_trampoline), - concat!($version, "\0") as *const str as *const _, - concat!($license, "\0") as *const str as *const _, - concat!($source, "\0") as *const str as *const _, - concat!($package, "\0") as *const str as *const _, - concat!($origin, "\0") as *const str as *const _, - ), - "Failed to register the plugin" - ) - } - } - - #[allow(clippy::missing_safety_doc)] - unsafe extern "C" fn plugin_init_trampoline(plugin: *mut $crate::ffi::GstPlugin) -> $crate::glib::ffi::gboolean { - use std::panic::{self, AssertUnwindSafe}; - - let panic_result = panic::catch_unwind(AssertUnwindSafe(|| super::$plugin_init(&$crate::glib::translate::from_glib_borrow(plugin)))); - match panic_result { - Ok(register_result) => match register_result { - Ok(_) => $crate::glib::ffi::GTRUE, - Err(err) => { - let cat = $crate::DebugCategory::get("GST_PLUGIN_LOADING").unwrap(); - $crate::error!(cat, "Failed to register plugin: {}", err); - $crate::glib::ffi::GFALSE - } - } - Err(err) => { - let cat = $crate::DebugCategory::get("GST_PLUGIN_LOADING").unwrap(); - if let Some(cause) = err.downcast_ref::<&str>() { - $crate::error!(cat, "Failed to initialize plugin due to panic: {}", cause); - } else if let Some(cause) = err.downcast_ref::() { - $crate::error!(cat, "Failed to initialize plugin due to panic: {}", cause); - } else { - $crate::error!(cat, "Failed to initialize plugin due to panic"); - } - - $crate::glib::ffi::GFALSE - } - } - } - } - pub use self::plugin_desc::plugin_register_static; - }; -); diff --git a/gstreamer/src/tracer_factory.rs b/gstreamer/src/tracer_factory.rs index 53a5f0521..93fc6fa12 100644 --- a/gstreamer/src/tracer_factory.rs +++ b/gstreamer/src/tracer_factory.rs @@ -2,13 +2,9 @@ use crate::TracerFactory; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use glib::translate::*; impl TracerFactory { - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_tracer_factory_get_list")] #[doc(alias = "get_list")] pub fn factories() -> glib::List { diff --git a/gstreamer/sys/Cargo.toml b/gstreamer/sys/Cargo.toml index fea495472..02ea696b7 100644 --- a/gstreamer/sys/Cargo.toml +++ b/gstreamer/sys/Cargo.toml @@ -17,11 +17,7 @@ shell-words = "1.0.0" tempfile = "3" [features] -v1_10 = [] -v1_12 = ["v1_10"] -v1_12_1 = ["v1_12"] -v1_14 = ["v1_12_1"] -v1_16 = ["v1_14"] +v1_16 = [] v1_18 = ["v1_16"] v1_18_3 = ["v1_18"] v1_20 = ["v1_18_3"] @@ -49,18 +45,6 @@ rust-version = "1.57" features = ["dox"] [package.metadata.system-deps.gstreamer_1_0] name = "gstreamer-1.0" -version = "1.8" - -[package.metadata.system-deps.gstreamer_1_0.v1_10] -version = "1.10" - -[package.metadata.system-deps.gstreamer_1_0.v1_12] -version = "1.12" - -[package.metadata.system-deps.gstreamer_1_0.v1_12_1] -version = "1.12.1" - -[package.metadata.system-deps.gstreamer_1_0.v1_14] version = "1.14" [package.metadata.system-deps.gstreamer_1_0.v1_16] diff --git a/gstreamer/sys/Gir.toml b/gstreamer/sys/Gir.toml index aae11644a..d5665b4e6 100644 --- a/gstreamer/sys/Gir.toml +++ b/gstreamer/sys/Gir.toml @@ -2,7 +2,7 @@ girs_directories = ["../../gir-files", "../../gst-gir-files"] library = "Gst" version = "1.0" -min_cfg_version = "1.8" +min_cfg_version = "1.14" work_mode = "sys" extra_versions = [ @@ -10,9 +10,6 @@ extra_versions = [ "1.18.3", "1.18", "1.16", - "1.14", - "1.12", - "1.10", ] external_libraries = [ @@ -70,19 +67,9 @@ status = "generate" name = "take" version = "1.18.3" -[[object]] -name = "Gst.ParamArray" -status = "generate" - [[object.function]] - name = "get_type" - version = "1.12" - [[object]] name = "Gst.*" status = "generate" - [[object.function]] - name = "reference_timestamp_meta_api_get_type" - version = "1.14" [[object.function]] name = "clear_buffer" version = "1.18.3" diff --git a/gstreamer/sys/src/lib.rs b/gstreamer/sys/src/lib.rs index 4425fc118..3abee2c2b 100644 --- a/gstreamer/sys/src/lib.rs +++ b/gstreamer/sys/src/lib.rs @@ -662,8 +662,6 @@ pub const GST_ALLOCATOR_FLAG_LAST: GstAllocatorFlags = 1048576; pub type GstBinFlags = c_uint; pub const GST_BIN_FLAG_NO_RESYNC: GstBinFlags = 16384; -#[cfg(any(feature = "v1_10", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub const GST_BIN_FLAG_STREAMS_AWARE: GstBinFlags = 32768; pub const GST_BIN_FLAG_LAST: GstBinFlags = 524288; @@ -689,8 +687,6 @@ pub const GST_BUFFER_FLAG_DROPPABLE: GstBufferFlags = 4096; pub const GST_BUFFER_FLAG_DELTA_UNIT: GstBufferFlags = 8192; pub const GST_BUFFER_FLAG_TAG_MEMORY: GstBufferFlags = 16384; pub const GST_BUFFER_FLAG_SYNC_AFTER: GstBufferFlags = 32768; -#[cfg(any(feature = "v1_14", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub const GST_BUFFER_FLAG_NON_DROPPABLE: GstBufferFlags = 65536; pub const GST_BUFFER_FLAG_LAST: GstBufferFlags = 1048576; @@ -4103,8 +4099,6 @@ extern "C" { //========================================================================= // GstPromiseResult //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_promise_result_get_type() -> GType; //========================================================================= @@ -4150,8 +4144,6 @@ extern "C" { // GstStateChange //========================================================================= pub fn gst_state_change_get_type() -> GType; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_state_change_get_name(transition: GstStateChange) -> *const c_char; //========================================================================= @@ -4413,8 +4405,6 @@ extern "C" { //========================================================================= // GstStackTraceFlags //========================================================================= - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_stack_trace_flags_get_type() -> GType; //========================================================================= @@ -4425,11 +4415,7 @@ extern "C" { //========================================================================= // GstStreamType //========================================================================= - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_type_get_type() -> GType; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_type_get_name(stype: GstStreamType) -> *const c_char; //========================================================================= @@ -4507,8 +4493,6 @@ extern "C" { buffer: *mut GstBuffer, info: *mut GstStructure, ) -> *mut GstProtectionMeta; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_buffer_add_reference_timestamp_meta( buffer: *mut GstBuffer, reference: *mut GstCaps, @@ -4579,8 +4563,6 @@ extern "C" { buffer: *mut GstBuffer, name: *const c_char, ) -> *mut GstCustomMeta; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_buffer_get_flags(buffer: *mut GstBuffer) -> GstBufferFlags; pub fn gst_buffer_get_memory(buffer: *mut GstBuffer, idx: c_uint) -> *mut GstMemory; pub fn gst_buffer_get_memory_range( @@ -4589,11 +4571,7 @@ extern "C" { length: c_int, ) -> *mut GstMemory; pub fn gst_buffer_get_meta(buffer: *mut GstBuffer, api: GType) -> *mut GstMeta; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_buffer_get_n_meta(buffer: *mut GstBuffer, api_type: GType) -> c_uint; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_buffer_get_reference_timestamp_meta( buffer: *mut GstBuffer, reference: *mut GstCaps, @@ -4611,8 +4589,6 @@ extern "C" { offset: *mut size_t, maxsize: *mut size_t, ) -> size_t; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_buffer_has_flags(buffer: *mut GstBuffer, flags: GstBufferFlags) -> gboolean; pub fn gst_buffer_insert_memory(buffer: *mut GstBuffer, idx: c_int, mem: *mut GstMemory); pub fn gst_buffer_is_all_memory_writable(buffer: *mut GstBuffer) -> gboolean; @@ -4622,8 +4598,6 @@ extern "C" { length: c_int, ) -> gboolean; pub fn gst_buffer_iterate_meta(buffer: *mut GstBuffer, state: *mut gpointer) -> *mut GstMeta; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_buffer_iterate_meta_filtered( buffer: *mut GstBuffer, state: *mut gpointer, @@ -4679,16 +4653,12 @@ extern "C" { offset: ssize_t, size: ssize_t, ) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_buffer_set_flags(buffer: *mut GstBuffer, flags: GstBufferFlags) -> gboolean; pub fn gst_buffer_set_size(buffer: *mut GstBuffer, size: ssize_t); pub fn gst_buffer_unmap(buffer: *mut GstBuffer, info: *mut GstMapInfo); #[cfg(any(feature = "v1_18_3", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18_3")))] pub fn gst_buffer_unref(buf: *mut GstBuffer); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_buffer_unset_flags(buffer: *mut GstBuffer, flags: GstBufferFlags) -> gboolean; pub fn gst_buffer_get_max_memory() -> c_uint; #[cfg(any(feature = "v1_18_3", feature = "dox"))] @@ -4701,8 +4671,6 @@ extern "C" { pub fn gst_buffer_list_get_type() -> GType; pub fn gst_buffer_list_new() -> *mut GstBufferList; pub fn gst_buffer_list_new_sized(size: c_uint) -> *mut GstBufferList; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_buffer_list_calculate_size(list: *mut GstBufferList) -> size_t; #[cfg(any(feature = "v1_18_3", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18_3")))] @@ -4714,8 +4682,6 @@ extern "C" { user_data: gpointer, ) -> gboolean; pub fn gst_buffer_list_get(list: *mut GstBufferList, idx: c_uint) -> *mut GstBuffer; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_buffer_list_get_writable(list: *mut GstBufferList, idx: c_uint) -> *mut GstBuffer; pub fn gst_buffer_list_insert(list: *mut GstBufferList, idx: c_int, buffer: *mut GstBuffer); pub fn gst_buffer_list_length(list: *mut GstBufferList) -> c_uint; @@ -5061,8 +5027,6 @@ extern "C" { klass: *mut GstElementClass, static_templ: *mut GstStaticPadTemplate, ); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_element_class_add_static_pad_template_with_gtype( klass: *mut GstElementClass, static_templ: *mut GstStaticPadTemplate, @@ -5149,8 +5113,6 @@ extern "C" { ) -> *mut GstEvent; pub fn gst_event_new_segment(segment: *const GstSegment) -> *mut GstEvent; pub fn gst_event_new_segment_done(format: GstFormat, position: i64) -> *mut GstEvent; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_event_new_select_streams(streams: *mut glib::GList) -> *mut GstEvent; pub fn gst_event_new_sink_message(name: *const c_char, msg: *mut GstMessage) -> *mut GstEvent; pub fn gst_event_new_step( @@ -5160,11 +5122,7 @@ extern "C" { flush: gboolean, intermediate: gboolean, ) -> *mut GstEvent; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_event_new_stream_collection(collection: *mut GstStreamCollection) -> *mut GstEvent; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_event_new_stream_group_done(group_id: c_uint) -> *mut GstEvent; pub fn gst_event_new_stream_start(stream_id: *const c_char) -> *mut GstEvent; pub fn gst_event_new_tag(taglist: *mut GstTagList) -> *mut GstEvent; @@ -5250,8 +5208,6 @@ extern "C" { format: *mut GstFormat, position: *mut i64, ); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_event_parse_select_streams(event: *mut GstEvent, streams: *mut *mut glib::GList); pub fn gst_event_parse_sink_message(event: *mut GstEvent, msg: *mut *mut GstMessage); pub fn gst_event_parse_step( @@ -5262,18 +5218,12 @@ extern "C" { flush: *mut gboolean, intermediate: *mut gboolean, ); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_event_parse_stream(event: *mut GstEvent, stream: *mut *mut GstStream); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_event_parse_stream_collection( event: *mut GstEvent, collection: *mut *mut GstStreamCollection, ); pub fn gst_event_parse_stream_flags(event: *mut GstEvent, flags: *mut GstStreamFlags); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_event_parse_stream_group_done(event: *mut GstEvent, group_id: *mut c_uint); pub fn gst_event_parse_stream_start(event: *mut GstEvent, stream_id: *mut *const c_char); pub fn gst_event_parse_tag(event: *mut GstEvent, taglist: *mut *mut GstTagList); @@ -5291,8 +5241,6 @@ extern "C" { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn gst_event_set_seek_trickmode_interval(event: *mut GstEvent, interval: GstClockTime); pub fn gst_event_set_seqnum(event: *mut GstEvent, seqnum: u32); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_event_set_stream(event: *mut GstEvent, stream: *mut GstStream); pub fn gst_event_set_stream_flags(event: *mut GstEvent, flags: GstStreamFlags); #[cfg(any(feature = "v1_18_3", feature = "dox"))] @@ -5472,8 +5420,6 @@ extern "C" { error: *mut glib::GError, debug: *const c_char, ) -> *mut GstMessage; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_new_error_with_details( src: *mut GstObject, error: *mut glib::GError, @@ -5489,8 +5435,6 @@ extern "C" { error: *mut glib::GError, debug: *const c_char, ) -> *mut GstMessage; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_new_info_with_details( src: *mut GstObject, error: *mut glib::GError, @@ -5515,8 +5459,6 @@ extern "C" { code: *const c_char, text: *const c_char, ) -> *mut GstMessage; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_new_property_notify( src: *mut GstObject, property_name: *const c_char, @@ -5530,8 +5472,6 @@ extern "C" { timestamp: u64, duration: u64, ) -> *mut GstMessage; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_new_redirect( src: *mut GstObject, location: *const c_char, @@ -5579,8 +5519,6 @@ extern "C" { flush: gboolean, intermediate: gboolean, ) -> *mut GstMessage; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_new_stream_collection( src: *mut GstObject, collection: *mut GstStreamCollection, @@ -5591,8 +5529,6 @@ extern "C" { type_: GstStreamStatusType, owner: *mut GstElement, ) -> *mut GstMessage; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_new_streams_selected( src: *mut GstObject, collection: *mut GstStreamCollection, @@ -5614,16 +5550,12 @@ extern "C" { error: *mut glib::GError, debug: *const c_char, ) -> *mut GstMessage; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_new_warning_with_details( src: *mut GstObject, error: *mut glib::GError, debug: *const c_char, details: *mut GstStructure, ) -> *mut GstMessage; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_add_redirect_entry( message: *mut GstMessage, location: *const c_char, @@ -5633,8 +5565,6 @@ extern "C" { #[cfg(any(feature = "v1_18_3", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18_3")))] pub fn gst_message_copy(msg: *const GstMessage) -> *mut GstMessage; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_get_num_redirect_entries(message: *mut GstMessage) -> size_t; pub fn gst_message_get_seqnum(message: *mut GstMessage) -> u32; pub fn gst_message_get_stream_status_object(message: *mut GstMessage) @@ -5674,8 +5604,6 @@ extern "C" { gerror: *mut *mut glib::GError, debug: *mut *mut c_char, ); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_parse_error_details( message: *mut GstMessage, structure: *mut *const GstStructure, @@ -5687,8 +5615,6 @@ extern "C" { gerror: *mut *mut glib::GError, debug: *mut *mut c_char, ); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_parse_info_details( message: *mut GstMessage, structure: *mut *const GstStructure, @@ -5706,8 +5632,6 @@ extern "C" { code: *mut *mut c_char, text: *mut *mut c_char, ); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_parse_property_notify( message: *mut GstMessage, object: *mut *mut GstObject, @@ -5734,8 +5658,6 @@ extern "C" { proportion: *mut c_double, quality: *mut c_int, ); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_parse_redirect_entry( message: *mut GstMessage, entry_index: size_t, @@ -5780,8 +5702,6 @@ extern "C" { flush: *mut gboolean, intermediate: *mut gboolean, ); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_parse_stream_collection( message: *mut GstMessage, collection: *mut *mut GstStreamCollection, @@ -5791,8 +5711,6 @@ extern "C" { type_: *mut GstStreamStatusType, owner: *mut *mut GstElement, ); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_parse_streams_selected( message: *mut GstMessage, collection: *mut *mut GstStreamCollection, @@ -5814,8 +5732,6 @@ extern "C" { gerror: *mut *mut glib::GError, debug: *mut *mut c_char, ); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_parse_warning_details( message: *mut GstMessage, structure: *mut *const GstStructure, @@ -5848,14 +5764,8 @@ extern "C" { message: *mut GstMessage, object: *const gobject::GValue, ); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_streams_selected_add(message: *mut GstMessage, stream: *mut GstStream); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_streams_selected_get_size(message: *mut GstMessage) -> c_uint; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_message_streams_selected_get_stream( message: *mut GstMessage, idx: c_uint, @@ -5863,8 +5773,6 @@ extern "C" { #[cfg(any(feature = "v1_18_3", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18_3")))] pub fn gst_message_unref(msg: *mut GstMessage); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_message_writable_structure(message: *mut GstMessage) -> *mut GstStructure; #[cfg(any(feature = "v1_18_3", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18_3")))] @@ -5991,8 +5899,6 @@ extern "C" { //========================================================================= pub fn gst_parse_context_get_type() -> GType; pub fn gst_parse_context_new() -> *mut GstParseContext; - #[cfg(any(feature = "v1_12_1", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12_1")))] pub fn gst_parse_context_copy(context: *const GstParseContext) -> *mut GstParseContext; pub fn gst_parse_context_free(context: *mut GstParseContext); pub fn gst_parse_context_get_missing_elements( @@ -6045,39 +5951,23 @@ extern "C" { //========================================================================= // GstPromise //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_promise_get_type() -> GType; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_promise_new() -> *mut GstPromise; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_promise_new_with_change_func( func: GstPromiseChangeFunc, user_data: gpointer, notify: glib::GDestroyNotify, ) -> *mut GstPromise; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_promise_expire(promise: *mut GstPromise); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_promise_get_reply(promise: *mut GstPromise) -> *const GstStructure; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_promise_interrupt(promise: *mut GstPromise); #[cfg(any(feature = "v1_18_3", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18_3")))] pub fn gst_promise_ref(promise: *mut GstPromise) -> *mut GstPromise; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_promise_reply(promise: *mut GstPromise, s: *mut GstStructure); #[cfg(any(feature = "v1_18_3", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18_3")))] pub fn gst_promise_unref(promise: *mut GstPromise); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_promise_wait(promise: *mut GstPromise) -> GstPromiseResult; //========================================================================= @@ -6371,8 +6261,6 @@ extern "C" { //========================================================================= // GstReferenceTimestampMeta //========================================================================= - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_reference_timestamp_meta_get_info() -> *const GstMetaInfo; //========================================================================= @@ -6590,8 +6478,6 @@ extern "C" { first_fieldname: *const c_char, ... ) -> gboolean; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_structure_get_array( structure: *mut GstStructure, fieldname: *const c_char, @@ -6654,8 +6540,6 @@ extern "C" { fieldname: *const c_char, value: *mut i64, ) -> gboolean; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_structure_get_list( structure: *mut GstStructure, fieldname: *const c_char, @@ -6756,15 +6640,11 @@ extern "C" { flags: GstSerializeFlags, ) -> *mut c_char; pub fn gst_structure_set(structure: *mut GstStructure, fieldname: *const c_char, ...); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_structure_set_array( structure: *mut GstStructure, fieldname: *const c_char, array: *const gobject::GValueArray, ); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_structure_set_list( structure: *mut GstStructure, fieldname: *const c_char, @@ -7115,8 +6995,6 @@ extern "C" { pub fn gst_uri_from_string_with_base(base: *mut GstUri, uri: *const c_char) -> *mut GstUri; pub fn gst_uri_get_fragment(uri: *const GstUri) -> *const c_char; pub fn gst_uri_get_host(uri: *const GstUri) -> *const c_char; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_uri_get_media_fragment_table(uri: *const GstUri) -> *mut glib::GHashTable; pub fn gst_uri_get_path(uri: *const GstUri) -> *mut c_char; pub fn gst_uri_get_path_segments(uri: *const GstUri) -> *mut glib::GList; @@ -7210,8 +7088,6 @@ extern "C" { pub fn gst_bin_get_by_name(bin: *mut GstBin, name: *const c_char) -> *mut GstElement; pub fn gst_bin_get_by_name_recurse_up(bin: *mut GstBin, name: *const c_char) -> *mut GstElement; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_bin_get_suppressed_flags(bin: *mut GstBin) -> GstElementFlags; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] @@ -7228,8 +7104,6 @@ extern "C" { pub fn gst_bin_recalculate_latency(bin: *mut GstBin) -> gboolean; pub fn gst_bin_remove(bin: *mut GstBin, element: *mut GstElement) -> gboolean; pub fn gst_bin_remove_many(bin: *mut GstBin, element_1: *mut GstElement, ...); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_bin_set_suppressed_flags(bin: *mut GstBin, flags: GstElementFlags); pub fn gst_bin_sync_children_states(bin: *mut GstBin) -> gboolean; @@ -7324,8 +7198,6 @@ extern "C" { pub fn gst_bus_create_watch(bus: *mut GstBus) -> *mut glib::GSource; pub fn gst_bus_disable_sync_message_emission(bus: *mut GstBus); pub fn gst_bus_enable_sync_message_emission(bus: *mut GstBus); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_bus_get_pollfd(bus: *mut GstBus, fd: *mut glib::GPollFD); pub fn gst_bus_have_pending(bus: *mut GstBus) -> gboolean; pub fn gst_bus_peek(bus: *mut GstBus) -> *mut GstMessage; @@ -7584,8 +7456,6 @@ extern "C" { pub fn gst_device_provider_get_hidden_providers( provider: *mut GstDeviceProvider, ) -> *mut *mut c_char; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_device_provider_get_metadata( provider: *mut GstDeviceProvider, key: *const c_char, @@ -7642,11 +7512,7 @@ extern "C" { //========================================================================= // GstDynamicTypeFactory //========================================================================= - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_dynamic_type_factory_get_type() -> GType; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_dynamic_type_factory_load(factoryname: *const c_char) -> GType; //========================================================================= @@ -7674,22 +7540,16 @@ extern "C" { pub fn gst_element_type_set_skip_documentation(type_: GType); pub fn gst_element_abort_state(element: *mut GstElement); pub fn gst_element_add_pad(element: *mut GstElement, pad: *mut GstPad) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_element_add_property_deep_notify_watch( element: *mut GstElement, property_name: *const c_char, include_value: gboolean, ) -> c_ulong; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_element_add_property_notify_watch( element: *mut GstElement, property_name: *const c_char, include_value: gboolean, ) -> c_ulong; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_element_call_async( element: *mut GstElement, func: GstElementCallAsyncFunc, @@ -7705,22 +7565,16 @@ extern "C" { ret: GstStateChangeReturn, ) -> GstStateChangeReturn; pub fn gst_element_create_all_pads(element: *mut GstElement); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_element_foreach_pad( element: *mut GstElement, func: GstElementForeachPadFunc, user_data: gpointer, ) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_element_foreach_sink_pad( element: *mut GstElement, func: GstElementForeachPadFunc, user_data: gpointer, ) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_element_foreach_src_pad( element: *mut GstElement, func: GstElementForeachPadFunc, @@ -7754,17 +7608,11 @@ extern "C" { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] pub fn gst_element_get_current_running_time(element: *mut GstElement) -> GstClockTime; pub fn gst_element_get_factory(element: *mut GstElement) -> *mut GstElementFactory; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_element_get_metadata(element: *mut GstElement, key: *const c_char) -> *const c_char; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_element_get_pad_template( element: *mut GstElement, name: *const c_char, ) -> *mut GstPadTemplate; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_element_get_pad_template_list(element: *mut GstElement) -> *mut glib::GList; pub fn gst_element_get_request_pad( element: *mut GstElement, @@ -7826,8 +7674,6 @@ extern "C" { function: *const c_char, line: c_int, ); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_element_message_full_with_details( element: *mut GstElement, type_: GstMessageType, @@ -7864,8 +7710,6 @@ extern "C" { ) -> gboolean; pub fn gst_element_release_request_pad(element: *mut GstElement, pad: *mut GstPad); pub fn gst_element_remove_pad(element: *mut GstElement, pad: *mut GstPad) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_element_remove_property_notify_watch(element: *mut GstElement, watch_id: c_ulong); pub fn gst_element_request_pad( element: *mut GstElement, @@ -8224,12 +8068,8 @@ extern "C" { event_type: GstEventType, idx: c_uint, ) -> *mut GstEvent; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_pad_get_stream(pad: *mut GstPad) -> *mut GstStream; pub fn gst_pad_get_stream_id(pad: *mut GstPad) -> *mut c_char; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_pad_get_task_state(pad: *mut GstPad) -> GstTaskState; pub fn gst_pad_has_current_caps(pad: *mut GstPad) -> gboolean; pub fn gst_pad_is_active(pad: *mut GstPad) -> gboolean; @@ -8247,11 +8087,7 @@ extern "C" { sinkpad: *mut GstPad, flags: GstPadLinkCheck, ) -> GstPadLinkReturn; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_pad_link_maybe_ghosting(src: *mut GstPad, sink: *mut GstPad) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_pad_link_maybe_ghosting_full( src: *mut GstPad, sink: *mut GstPad, @@ -8409,14 +8245,10 @@ extern "C" { presence: GstPadPresence, caps: *mut GstCaps, ) -> *mut GstPadTemplate; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_pad_template_new_from_static_pad_template_with_gtype( pad_template: *mut GstStaticPadTemplate, pad_type: GType, ) -> *mut GstPadTemplate; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_pad_template_new_with_gtype( name_template: *const c_char, direction: GstPadDirection, @@ -8436,8 +8268,6 @@ extern "C" { //========================================================================= // GstParamArray //========================================================================= - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_param_spec_array_get_type() -> GType; //========================================================================= @@ -8654,71 +8484,37 @@ extern "C" { //========================================================================= // GstStream //========================================================================= - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_get_type() -> GType; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_new( stream_id: *const c_char, caps: *mut GstCaps, type_: GstStreamType, flags: GstStreamFlags, ) -> *mut GstStream; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_get_caps(stream: *mut GstStream) -> *mut GstCaps; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_get_stream_flags(stream: *mut GstStream) -> GstStreamFlags; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_get_stream_id(stream: *mut GstStream) -> *const c_char; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_get_stream_type(stream: *mut GstStream) -> GstStreamType; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_get_tags(stream: *mut GstStream) -> *mut GstTagList; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_set_caps(stream: *mut GstStream, caps: *mut GstCaps); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_set_stream_flags(stream: *mut GstStream, flags: GstStreamFlags); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_set_stream_type(stream: *mut GstStream, stream_type: GstStreamType); - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_set_tags(stream: *mut GstStream, tags: *mut GstTagList); //========================================================================= // GstStreamCollection //========================================================================= - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_collection_get_type() -> GType; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_collection_new(upstream_id: *const c_char) -> *mut GstStreamCollection; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_collection_add_stream( collection: *mut GstStreamCollection, stream: *mut GstStream, ) -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_collection_get_size(collection: *mut GstStreamCollection) -> c_uint; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_collection_get_stream( collection: *mut GstStreamCollection, index: c_uint, ) -> *mut GstStream; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_stream_collection_get_upstream_id( collection: *mut GstStreamCollection, ) -> *const c_char; @@ -8798,8 +8594,6 @@ extern "C" { //========================================================================= pub fn gst_tracer_factory_get_type() -> GType; pub fn gst_tracer_factory_get_list() -> *mut glib::GList; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_tracer_factory_get_tracer_type(factory: *mut GstTracerFactory) -> GType; //========================================================================= @@ -9026,8 +8820,6 @@ extern "C" { //========================================================================= // Other functions //========================================================================= - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_calculate_linear_regression( xy: *const GstClockTime, temp: *mut GstClockTime, @@ -9076,8 +8868,6 @@ extern "C" { user_data: gpointer, notify: glib::GDestroyNotify, ); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_debug_add_ring_buffer_logger(max_size_per_thread: c_uint, thread_timeout: c_uint); pub fn gst_debug_bin_to_dot_data( bin: *mut GstBin, @@ -9098,8 +8888,6 @@ extern "C" { pub fn gst_debug_get_all_categories() -> *mut glib::GSList; pub fn gst_debug_get_color_mode() -> GstDebugColorMode; pub fn gst_debug_get_default_threshold() -> GstDebugLevel; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_debug_get_stack_trace(flags: GstStackTraceFlags) -> *mut c_char; pub fn gst_debug_is_active() -> gboolean; pub fn gst_debug_is_colored() -> gboolean; @@ -9149,11 +8937,7 @@ extern "C" { pub fn gst_debug_print_stack_trace(); pub fn gst_debug_remove_log_function(func: GstLogFunction) -> c_uint; pub fn gst_debug_remove_log_function_by_data(data: gpointer) -> c_uint; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_debug_remove_ring_buffer_logger(); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_debug_ring_buffer_logger_get_logs() -> *mut *mut c_char; pub fn gst_debug_set_active(active: gboolean); pub fn gst_debug_set_color_mode(mode: GstDebugColorMode); @@ -9164,8 +8948,6 @@ extern "C" { pub fn gst_debug_set_threshold_from_string(list: *const c_char, reset: gboolean); pub fn gst_debug_unset_threshold_for_name(name: *const c_char); pub fn gst_deinit(); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_dynamic_type_register(plugin: *mut GstPlugin, type_: GType) -> gboolean; pub fn gst_error_get_message(domain: glib::GQuark, code: c_int) -> *mut c_char; pub fn gst_filename_to_uri( @@ -9175,8 +8957,6 @@ extern "C" { pub fn gst_flow_get_name(ret: GstFlowReturn) -> *const c_char; pub fn gst_flow_to_quark(ret: GstFlowReturn) -> glib::GQuark; pub fn gst_formats_contains(formats: *const GstFormat, format: GstFormat) -> gboolean; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_get_main_executable_path() -> *const c_char; pub fn gst_info_strdup_printf(format: *const c_char, ...) -> *mut c_char; //pub fn gst_info_strdup_vprintf(format: *const c_char, args: /*Unimplemented*/va_list) -> *mut c_char; @@ -9190,11 +8970,7 @@ extern "C" { pub fn gst_init_get_option_group() -> *mut glib::GOptionGroup; pub fn gst_is_caps_features(obj: gconstpointer) -> gboolean; pub fn gst_is_initialized() -> gboolean; - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn gst_make_element_message_details(name: *const c_char, ...) -> *mut GstStructure; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_param_spec_array( name: *const c_char, nick: *const c_char, @@ -9247,27 +9023,15 @@ extern "C" { flags: GstParseFlags, error: *mut *mut glib::GError, ) -> *mut GstElement; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_print(format: *const c_char, ...); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_printerr(format: *const c_char, ...); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_printerrln(format: *const c_char, ...); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_println(format: *const c_char, ...); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_protection_filter_systems_by_available_decryptors( system_identifiers: *mut *const c_char, ) -> *mut *mut c_char; pub fn gst_protection_meta_api_get_type() -> GType; pub fn gst_protection_select_system(system_identifiers: *mut *const c_char) -> *const c_char; - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_reference_timestamp_meta_api_get_type() -> GType; pub fn gst_segtrap_is_enabled() -> gboolean; pub fn gst_segtrap_set_enabled(enabled: gboolean); @@ -9326,8 +9090,6 @@ extern "C" { user_data: gpointer, ) -> gpointer; pub fn gst_util_double_to_fraction(src: c_double, dest_n: *mut c_int, dest_d: *mut c_int); - #[cfg(any(feature = "v1_14", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn gst_util_dump_buffer(buf: *mut GstBuffer); pub fn gst_util_dump_mem(mem: *const u8, size: c_uint); pub fn gst_util_fraction_add( @@ -9349,8 +9111,6 @@ extern "C" { ) -> gboolean; pub fn gst_util_fraction_to_double(src_n: c_int, src_d: c_int, dest: *mut c_double); pub fn gst_util_gdouble_to_guint64(value: c_double) -> u64; - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_util_get_object_array( object: *mut gobject::GObject, name: *const c_char, @@ -9368,8 +9128,6 @@ extern "C" { name: *const c_char, value: *const c_char, ); - #[cfg(any(feature = "v1_12", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn gst_util_set_object_array( object: *mut gobject::GObject, name: *const c_char,