From 8cb13ac752073ac6dc7af4b0485a2fdad87529f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 18 Jul 2022 13:25:48 +0300 Subject: [PATCH] video: Add new `Colorimetry::is_equivalent()` --- gstreamer-video/src/video_info.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gstreamer-video/src/video_info.rs b/gstreamer-video/src/video_info.rs index 67e3d97f1..726fbc464 100644 --- a/gstreamer-video/src/video_info.rs +++ b/gstreamer-video/src/video_info.rs @@ -121,6 +121,20 @@ impl VideoColorimetry { pub fn primaries(&self) -> crate::VideoColorPrimaries { unsafe { from_glib(self.0.primaries) } } + + #[cfg(any(feature = "v1_22", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[doc(alias = "gst_video_colorimetry_is_equivalent")] + pub fn is_equivalent(&self, bitdepth: u32, other: &Self, other_bitdepth: u32) -> bool { + unsafe { + from_glib(ffi::gst_video_colorimetry_is_equivalent( + &self.0, + bitdepth, + &other.0, + other_bitdepth, + )) + } + } } impl PartialEq for VideoColorimetry {