From 89ba883ea8cf751772e0e990ce49c4172e693087 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Tue, 23 Mar 2021 22:40:26 +0100 Subject: [PATCH] audio/video: Do not link v1_20 ffi functions when building docs The sys crates have not been generated with 1.20 introspected gir files yet, and break the documentation that is already compiling with the v1_20 feature. Function body contents don't truly matter for the documentation build anyway. --- gstreamer-audio/src/audio_format_info.rs | 2 +- gstreamer-video/src/video_info.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gstreamer-audio/src/audio_format_info.rs b/gstreamer-audio/src/audio_format_info.rs index fac0ccf66..c28db2b45 100644 --- a/gstreamer-audio/src/audio_format_info.rs +++ b/gstreamer-audio/src/audio_format_info.rs @@ -170,7 +170,7 @@ impl AudioFormatInfo { unsafe { cfg_if::cfg_if! { - if #[cfg(any(feature = "v1_20", all(not(doctest), doc)))] { + if #[cfg(all(feature = "v1_20", not(feature = "dox")))] { ffi::gst_audio_format_info_fill_silence(self.0, dest.as_mut_ptr() as *mut _, dest.len()) } else { ffi::gst_audio_format_fill_silence(self.0, dest.as_mut_ptr() as *mut _, dest.len()) diff --git a/gstreamer-video/src/video_info.rs b/gstreamer-video/src/video_info.rs index a4220e927..e0a4fc4ec 100644 --- a/gstreamer-video/src/video_info.rs +++ b/gstreamer-video/src/video_info.rs @@ -171,7 +171,7 @@ impl crate::VideoChromaSite { unsafe { cfg_if::cfg_if! { - if #[cfg(feature = "v1_20")] { + if #[cfg(all(feature = "v1_20", not(feature = "dox")))] { from_glib_full(ffi::gst_video_chroma_site_to_string(self.to_glib())) } else { from_glib_none(ffi::gst_video_chroma_to_string(self.to_glib())) @@ -188,7 +188,7 @@ impl str::FromStr for crate::VideoChromaSite { skip_assert_initialized!(); cfg_if::cfg_if! { - if #[cfg(any(feature = "v1_20", all(not(doctest), doc)))] { + if #[cfg(all(feature = "v1_20", not(feature = "dox")))] { let chroma_site = Self::from_string(s); } else { assert_initialized_main_thread!();