app: Add new 1.28 appsrc/appsink builder API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1729>
This commit is contained in:
Sebastian Dröge 2025-05-13 13:00:54 +03:00 committed by GStreamer Marge Bot
parent 608edfc4ad
commit faffa6bb84
2 changed files with 29 additions and 0 deletions

View file

@ -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`.
///

View file

@ -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`.
///