From fa3ce573d77b60f80e96ee514cfdbe0b181e32c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 2 Oct 2023 19:49:10 +0300 Subject: [PATCH] app: Add max-bytes and max-time setters to the `AppSink` builder Part-of: --- gstreamer-app/src/app_sink.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gstreamer-app/src/app_sink.rs b/gstreamer-app/src/app_sink.rs index ccf92cf8d..93dcbb81c 100644 --- a/gstreamer-app/src/app_sink.rs +++ b/gstreamer-app/src/app_sink.rs @@ -1163,6 +1163,24 @@ impl AppSinkBuilder { } } + #[cfg(feature = "v1_24")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] + pub fn max_time(self, max_time: Option) -> Self { + Self { + builder: self.builder.property("max-time", max_time), + ..self + } + } + + #[cfg(feature = "v1_24")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] + pub fn max_bytes(self, max_bytes: u64) -> Self { + Self { + builder: self.builder.property("max-bytes", max_bytes), + ..self + } + } + pub fn name(self, name: impl Into) -> Self { Self { builder: self.builder.property("name", name.into()),