From a6353e70c7b6e5d17c0153adb6e49faaf82f8b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 23 May 2024 15:44:12 +0300 Subject: [PATCH] pbutils: encoding_profile: Remove unintentionally backported new API --- gstreamer-pbutils/src/encoding_profile.rs | 59 ----------------------- 1 file changed, 59 deletions(-) diff --git a/gstreamer-pbutils/src/encoding_profile.rs b/gstreamer-pbutils/src/encoding_profile.rs index bbed3ad09..809142f90 100644 --- a/gstreamer-pbutils/src/encoding_profile.rs +++ b/gstreamer-pbutils/src/encoding_profile.rs @@ -346,37 +346,20 @@ pub trait EncodingProfileBuilder<'a>: Sized { #[doc(alias = "gst_encoding_profile_set_presence")] #[must_use] fn presence(self, presence: u32) -> Self; - #[doc(alias = "gst_encoding_profile_set_presence")] - #[must_use] - fn presence_if_some(self, presence: Option) -> Self; #[doc(alias = "gst_encoding_profile_set_allow_dynamic_output")] #[must_use] fn allow_dynamic_output(self, allow: bool) -> Self; - #[doc(alias = "gst_encoding_profile_set_allow_dynamic_output")] - #[must_use] - fn allow_dynamic_output_if_some(self, allow_dynamic_output: Option) -> Self; #[doc(alias = "gst_encoding_profile_set_enabled")] #[must_use] fn enabled(self, enabled: bool) -> Self; - #[doc(alias = "gst_encoding_profile_set_enabled")] - #[must_use] - fn enabled_if_some(self, enabled: Option) -> Self; #[cfg(feature = "v1_18")] #[doc(alias = "gst_encoding_profile_set_single_segment")] #[must_use] fn single_segment(self, single_segment: bool) -> Self; - #[cfg(feature = "v1_18")] - #[doc(alias = "gst_encoding_profile_set_single_segment")] - #[must_use] - fn single_segment_if_some(self, single_segment: Option) -> Self; #[cfg(feature = "v1_20")] #[doc(alias = "gst_encoding_profile_set_element_properties")] #[must_use] fn element_properties(self, element_properties: ElementProperties) -> Self; - #[cfg(feature = "v1_20")] - #[doc(alias = "gst_encoding_profile_set_element_properties")] - #[must_use] - fn element_properties_if_some(self, element_properties: Option) -> Self; } macro_rules! declare_encoding_profile_builder_common( @@ -407,69 +390,27 @@ macro_rules! declare_encoding_profile_builder_common( self } - fn presence_if_some(self, presence: Option) -> $name<'a> { - if let Some(presence) = presence { - self.presence(presence) - } else { - self - } - } - fn allow_dynamic_output(mut self, allow: bool) -> $name<'a> { self.base.allow_dynamic_output = allow; self } - fn allow_dynamic_output_if_some(self, allow_dynamic_output: Option) -> $name<'a> { - if let Some(allow_dynamic_output) = allow_dynamic_output { - self.allow_dynamic_output(allow_dynamic_output) - } else { - self - } - } - fn enabled(mut self, enabled: bool) -> $name<'a> { self.base.enabled = enabled; self } - fn enabled_if_some(self, enabled: Option) -> $name<'a> { - if let Some(enabled) = enabled { - self.enabled(enabled) - } else { - self - } - } - #[cfg(feature = "v1_18")] fn single_segment(mut self, single_segment: bool) -> $name<'a> { self.base.single_segment = single_segment; self } - #[cfg(feature = "v1_18")] - fn single_segment_if_some(self, single_segment: Option) -> $name<'a> { - if let Some(single_segment) = single_segment { - self.single_segment(single_segment) - } else { - self - } - } - #[cfg(feature = "v1_20")] fn element_properties(mut self, element_properties: ElementProperties) -> $name<'a> { self.base.element_properties = Some(element_properties); self } - - #[cfg(feature = "v1_20")] - fn element_properties_if_some(self, element_properties: Option) -> $name<'a> { - if let Some(element_properties) = element_properties { - self.element_properties(element_properties) - } else { - self - } - } } } );