From a3b3017d750e6f6a44b2dede67f3112f3b78c2ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 6 Feb 2024 09:53:15 +0200 Subject: [PATCH] gstreamer: Re-export / manually implement new standalone functions Part-of: --- gstreamer/src/functions.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gstreamer/src/functions.rs b/gstreamer/src/functions.rs index 0b44acd3d..4e382ccc4 100644 --- a/gstreamer/src/functions.rs +++ b/gstreamer/src/functions.rs @@ -13,6 +13,10 @@ pub use crate::auto::functions::{ main_executable_path, util_get_timestamp as get_timestamp, version, version_string, }; +#[cfg(feature = "v1_24")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] +pub use crate::auto::functions::util_ceil_log2 as ceil_log2; + #[doc(alias = "gst_calculate_linear_regression")] pub fn calculate_linear_regression( xy: &[(u64, u64)], @@ -70,6 +74,19 @@ pub fn active_tracers() -> glib::List { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_tracing_get_active_tracers()) } } +#[cfg(feature = "v1_24")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] +#[doc(alias = "gst_util_filename_compare")] +pub fn filename_compare(a: &std::path::Path, b: &std::path::Path) -> std::cmp::Ordering { + skip_assert_initialized!(); + unsafe { + from_glib(ffi::gst_util_filename_compare( + a.to_glib_none().0, + b.to_glib_none().0, + )) + } +} + #[cfg(test)] mod tests { use super::*;