From faffa6bb846c38b133678438f07e3d3da7650589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 13 May 2025 13:00:54 +0300 Subject: [PATCH] app: Add new 1.28 appsrc/appsink builder API Part-of: --- gstreamer-app/src/app_sink.rs | 20 ++++++++++++++++++++ gstreamer-app/src/app_src.rs | 9 +++++++++ 2 files changed, 29 insertions(+) diff --git a/gstreamer-app/src/app_sink.rs b/gstreamer-app/src/app_sink.rs index bf05494d2..85ece2a16 100644 --- a/gstreamer-app/src/app_sink.rs +++ b/gstreamer-app/src/app_sink.rs @@ -1234,6 +1234,8 @@ impl<'a> AppSinkBuilder<'a> { } } + #[cfg_attr(feature = "v1_28", deprecated = "Since 1.28")] + #[allow(deprecated)] pub fn drop(self, drop: bool) -> Self { Self { builder: self.builder.property("drop", drop), @@ -1351,6 +1353,24 @@ impl<'a> AppSinkBuilder<'a> { } } + #[cfg(feature = "v1_28")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))] + pub fn leaky_type(self, leaky_type: crate::AppLeakyType) -> Self { + Self { + builder: self.builder.property("leaky-type", leaky_type), + ..self + } + } + + #[cfg(feature = "v1_28")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))] + pub fn silent(self, silent: bool) -> Self { + Self { + builder: self.builder.property("silent", silent), + ..self + } + } + // rustdoc-stripper-ignore-next /// Sets property `name` to the given value `value`. /// diff --git a/gstreamer-app/src/app_src.rs b/gstreamer-app/src/app_src.rs index 8ba1c72ea..6baf933ad 100644 --- a/gstreamer-app/src/app_src.rs +++ b/gstreamer-app/src/app_src.rs @@ -622,6 +622,15 @@ impl<'a> AppSrcBuilder<'a> { } } + #[cfg(feature = "v1_28")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))] + pub fn silent(self, silent: bool) -> Self { + Self { + builder: self.builder.property("silent", silent), + ..self + } + } + // rustdoc-stripper-ignore-next /// Sets property `name` to the given value `value`. ///