From 3699da731484ae5595a33f51e8678c8f2468bd24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 4 May 2023 08:55:48 +0300 Subject: [PATCH] Remove dox feature and replace by docsrs configuration Part-of: --- gstreamer-allocators/Cargo.toml | 3 +- gstreamer-allocators/src/dma_buf_allocator.rs | 8 +- gstreamer-allocators/src/lib.rs | 18 +- gstreamer-allocators/src/subclass/mod.rs | 8 +- gstreamer-allocators/sys/Cargo.toml | 1 - gstreamer-app/Cargo.toml | 3 +- gstreamer-app/src/app_sink.rs | 32 +- gstreamer-app/src/app_src.rs | 16 +- gstreamer-app/src/lib.rs | 2 +- gstreamer-app/sys/Cargo.toml | 1 - gstreamer-audio/Cargo.toml | 3 +- gstreamer-audio/src/audio_aggregator.rs | 30 +- gstreamer-audio/src/audio_converter.rs | 8 +- gstreamer-audio/src/audio_decoder.rs | 8 +- gstreamer-audio/src/audio_meta.rs | 60 ++-- gstreamer-audio/src/functions.rs | 4 +- gstreamer-audio/src/lib.rs | 10 +- gstreamer-audio/sys/Cargo.toml | 1 - gstreamer-base/Cargo.toml | 3 +- gstreamer-base/src/aggregator.rs | 64 ++-- gstreamer-base/src/functions.rs | 20 +- gstreamer-base/src/lib.rs | 2 +- gstreamer-base/src/subclass/aggregator.rs | 82 ++--- gstreamer-base/sys/Cargo.toml | 1 - gstreamer-check/Cargo.toml | 3 +- gstreamer-check/src/harness.rs | 12 +- gstreamer-check/src/lib.rs | 2 +- gstreamer-check/src/test_clock.rs | 8 +- gstreamer-check/sys/Cargo.toml | 1 - gstreamer-controller/Cargo.toml | 3 +- gstreamer-controller/src/lib.rs | 2 +- gstreamer-controller/sys/Cargo.toml | 1 - gstreamer-editing-services/Cargo.toml | 3 +- gstreamer-editing-services/src/lib.rs | 2 +- gstreamer-editing-services/sys/Cargo.toml | 1 - gstreamer-gl/Cargo.toml | 3 +- gstreamer-gl/egl/Cargo.toml | 3 +- gstreamer-gl/egl/sys/Cargo.toml | 1 - gstreamer-gl/src/gl_display.rs | 12 +- gstreamer-gl/src/lib.rs | 2 +- gstreamer-gl/src/subclass/mod.rs | 8 +- gstreamer-gl/sys/Cargo.toml | 1 - gstreamer-gl/wayland/Cargo.toml | 3 +- gstreamer-gl/wayland/sys/Cargo.toml | 1 - gstreamer-gl/x11/Cargo.toml | 3 +- gstreamer-gl/x11/sys/Cargo.toml | 1 - gstreamer-mpegts/Cargo.toml | 3 +- gstreamer-mpegts/src/lib.rs | 2 +- gstreamer-mpegts/sys/Cargo.toml | 1 - gstreamer-net/Cargo.toml | 3 +- gstreamer-net/src/lib.rs | 2 +- gstreamer-net/sys/Cargo.toml | 1 - gstreamer-pbutils/Cargo.toml | 3 +- gstreamer-pbutils/src/encoding_profile.rs | 10 +- gstreamer-pbutils/src/functions.rs | 16 +- gstreamer-pbutils/src/lib.rs | 6 +- gstreamer-pbutils/sys/Cargo.toml | 1 - gstreamer-play/Cargo.toml | 3 +- gstreamer-play/src/lib.rs | 2 +- gstreamer-play/sys/Cargo.toml | 1 - gstreamer-player/Cargo.toml | 3 +- gstreamer-player/src/lib.rs | 2 +- gstreamer-player/sys/Cargo.toml | 1 - gstreamer-rtp/Cargo.toml | 3 +- gstreamer-rtp/src/lib.rs | 18 +- gstreamer-rtp/src/rtp_base_payload.rs | 8 +- gstreamer-rtp/src/rtp_buffer.rs | 4 +- gstreamer-rtp/src/subclass/mod.rs | 16 +- gstreamer-rtp/sys/Cargo.toml | 1 - gstreamer-rtsp-server/Cargo.toml | 3 +- gstreamer-rtsp-server/src/lib.rs | 2 +- gstreamer-rtsp-server/src/rtsp_session.rs | 4 +- .../src/subclass/rtsp_client.rs | 20 +- gstreamer-rtsp-server/sys/Cargo.toml | 1 - gstreamer-rtsp/Cargo.toml | 3 +- gstreamer-rtsp/src/lib.rs | 2 +- gstreamer-rtsp/sys/Cargo.toml | 1 - gstreamer-sdp/Cargo.toml | 3 +- gstreamer-sdp/src/lib.rs | 2 +- gstreamer-sdp/sys/Cargo.toml | 1 - gstreamer-tag/sys/Cargo.toml | 1 - gstreamer-validate/Cargo.toml | 3 +- gstreamer-validate/src/lib.rs | 2 +- gstreamer-validate/sys/Cargo.toml | 1 - gstreamer-video/Cargo.toml | 3 +- gstreamer-video/src/caps_features.rs | 8 +- gstreamer-video/src/enums.rs | 24 +- gstreamer-video/src/functions.rs | 4 +- gstreamer-video/src/lib.rs | 54 +-- gstreamer-video/src/subclass/mod.rs | 28 +- gstreamer-video/src/subclass/navigation.rs | 22 +- gstreamer-video/src/subclass/video_decoder.rs | 16 +- gstreamer-video/src/video_codec_frame.rs | 8 +- gstreamer-video/src/video_converter.rs | 8 +- gstreamer-video/src/video_decoder.rs | 12 +- gstreamer-video/src/video_encoder.rs | 8 +- gstreamer-video/src/video_event.rs | 314 +++++++++--------- gstreamer-video/src/video_format_info.rs | 26 +- gstreamer-video/src/video_info.rs | 16 +- gstreamer-video/src/video_meta.rs | 112 +++---- .../src/video_overlay_composition.rs | 10 +- gstreamer-video/src/video_time_code.rs | 6 +- gstreamer-video/sys/Cargo.toml | 1 - gstreamer-webrtc/Cargo.toml | 3 +- gstreamer-webrtc/src/lib.rs | 14 +- gstreamer-webrtc/src/web_rtcice.rs | 8 +- gstreamer-webrtc/sys/Cargo.toml | 1 - gstreamer/Cargo.toml | 3 +- gstreamer/src/bin.rs | 8 +- gstreamer/src/bus_unix.rs | 4 +- gstreamer/src/bus_windows.rs | 4 +- gstreamer/src/caps.rs | 8 +- gstreamer/src/clock.rs | 8 +- gstreamer/src/event.rs | 72 ++-- gstreamer/src/functions.rs | 8 +- gstreamer/src/gtype.rs | 4 +- gstreamer/src/lib.rs | 22 +- gstreamer/src/log.rs | 28 +- gstreamer/src/message.rs | 44 +-- gstreamer/src/meta.rs | 44 +-- gstreamer/src/miniobject.rs | 4 +- gstreamer/src/pad_template.rs | 20 +- gstreamer/src/param_spec.rs | 4 +- gstreamer/src/query.rs | 56 ++-- gstreamer/src/sample.rs | 20 +- gstreamer/src/serde_macros.rs | 12 +- gstreamer/src/structure.rs | 4 +- gstreamer/src/subclass/task_pool.rs | 6 +- gstreamer/src/subclass/tracer.rs | 40 +-- gstreamer/src/task_pool.rs | 8 +- gstreamer/src/value.rs | 8 +- gstreamer/sys/Cargo.toml | 1 - 132 files changed, 860 insertions(+), 909 deletions(-) diff --git a/gstreamer-allocators/Cargo.toml b/gstreamer-allocators/Cargo.toml index cfe8ec3ba..83ab9833a 100644 --- a/gstreamer-allocators/Cargo.toml +++ b/gstreamer-allocators/Cargo.toml @@ -31,7 +31,6 @@ v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-allocators/src/dma_buf_allocator.rs b/gstreamer-allocators/src/dma_buf_allocator.rs index b6b347724..95b3b7786 100644 --- a/gstreamer-allocators/src/dma_buf_allocator.rs +++ b/gstreamer-allocators/src/dma_buf_allocator.rs @@ -6,8 +6,8 @@ use std::{ use glib::{translate::*, Cast}; use gst::{Memory, MemoryRef}; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] use crate::FdMemoryFlags; use crate::{DmaBufAllocator, FdMemory, FdMemoryRef}; @@ -58,8 +58,8 @@ impl DmaBufAllocator { .ok_or_else(|| glib::bool_error!("Failed to allocate memory")) } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_dmabuf_allocator_alloc_with_flags")] pub unsafe fn alloc_with_flags( &self, diff --git a/gstreamer-allocators/src/lib.rs b/gstreamer-allocators/src/lib.rs index 9e0ee34f4..54993aa4c 100644 --- a/gstreamer-allocators/src/lib.rs +++ b/gstreamer-allocators/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] @@ -30,18 +30,18 @@ pub use crate::caps_features::CAPS_FEATURES_MEMORY_DMABUF; mod fd_allocator; pub use fd_allocator::*; -#[cfg(any(target_os = "linux", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(target_os = "linux")))] +#[cfg(any(target_os = "linux", docsrs))] +#[cfg_attr(docsrs, doc(cfg(target_os = "linux")))] mod dma_buf_allocator; -#[cfg(any(target_os = "linux", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(target_os = "linux")))] +#[cfg(any(target_os = "linux", docsrs))] +#[cfg_attr(docsrs, doc(cfg(target_os = "linux")))] pub use dma_buf_allocator::*; -#[cfg(any(all(feature = "v1_24", target_os = "linux"), feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(all(feature = "v1_24", target_os = "linux"))))] +#[cfg(any(all(feature = "v1_24", target_os = "linux"), docsrs))] +#[cfg_attr(docsrs, doc(cfg(all(feature = "v1_24", target_os = "linux"))))] mod drm_dumb_allocator; -#[cfg(any(all(feature = "v1_24", target_os = "linux"), feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(all(feature = "v1_24", target_os = "linux"))))] +#[cfg(any(all(feature = "v1_24", target_os = "linux"), docsrs))] +#[cfg_attr(docsrs, doc(cfg(all(feature = "v1_24", target_os = "linux"))))] pub use drm_dumb_allocator::*; mod phys_memory; diff --git a/gstreamer-allocators/src/subclass/mod.rs b/gstreamer-allocators/src/subclass/mod.rs index 1f16b3d41..f9623eea9 100644 --- a/gstreamer-allocators/src/subclass/mod.rs +++ b/gstreamer-allocators/src/subclass/mod.rs @@ -1,5 +1,5 @@ -#[cfg(any(target_os = "linux", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(target_os = "linux")))] +#[cfg(any(target_os = "linux", docsrs))] +#[cfg_attr(docsrs, doc(cfg(target_os = "linux")))] mod dma_buf_allocator; mod fd_allocator; @@ -7,8 +7,8 @@ pub mod prelude { #[doc(hidden)] pub use gst::subclass::prelude::*; - #[cfg(any(target_os = "linux", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(target_os = "linux")))] + #[cfg(any(target_os = "linux", docsrs))] + #[cfg_attr(docsrs, doc(cfg(target_os = "linux")))] pub use super::dma_buf_allocator::DmaBufAllocatorImpl; pub use super::fd_allocator::FdAllocatorImpl; } diff --git a/gstreamer-allocators/sys/Cargo.toml b/gstreamer-allocators/sys/Cargo.toml index 8c7326c15..be9bc9af1 100644 --- a/gstreamer-allocators/sys/Cargo.toml +++ b/gstreamer-allocators/sys/Cargo.toml @@ -21,7 +21,6 @@ shell-words = "1.0.0" tempfile = "3" [features] -dox = ["glib/dox", "gobject/dox", "gst/dox"] v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] diff --git a/gstreamer-app/Cargo.toml b/gstreamer-app/Cargo.toml index c3762954a..5faf8108e 100644 --- a/gstreamer-app/Cargo.toml +++ b/gstreamer-app/Cargo.toml @@ -36,7 +36,6 @@ v1_18 = ["gst/v1_18", "gst-base/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "gst-base/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "gst-base/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "gst-base/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox", "gst-base/dox"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-app/src/app_sink.rs b/gstreamer-app/src/app_sink.rs index 8dba1d936..071d59e58 100644 --- a/gstreamer-app/src/app_sink.rs +++ b/gstreamer-app/src/app_sink.rs @@ -107,8 +107,8 @@ impl AppSinkCallbacksBuilder { } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] pub fn new_event bool + Send + 'static>(self, new_event: F) -> Self { Self { new_event: Some(Box::new(new_event)), @@ -116,8 +116,8 @@ impl AppSinkCallbacksBuilder { } } - #[cfg(any(feature = "v1_24", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_24")))] + #[cfg(feature = "v1_24")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] pub fn propose_allocation< F: FnMut(&AppSink, &mut gst::query::Allocation) -> bool + Send + 'static, >( @@ -432,8 +432,8 @@ impl AppSink { } #[doc(alias = "processing-deadline")] - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_base_sink_get_processing_deadline")] pub fn processing_deadline(&self) -> gst::ClockTime { unsafe { @@ -455,8 +455,8 @@ impl AppSink { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_base_sink_get_stats")] pub fn stats(&self) -> gst::Structure { unsafe { @@ -579,8 +579,8 @@ impl AppSink { } #[doc(alias = "processing-deadline")] - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_base_sink_set_processing_deadline")] pub fn set_processing_deadline(&self, processing_deadline: gst::ClockTime) { unsafe { @@ -812,8 +812,8 @@ impl AppSink { } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "processing-deadline")] pub fn connect_processing_deadline_notify( &self, @@ -896,8 +896,8 @@ impl AppSink { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "stats")] pub fn connect_stats_notify( &self, @@ -1122,8 +1122,8 @@ impl AppSinkBuilder { } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub fn processing_deadline(self, processing_deadline: i64) -> Self { Self { builder: self diff --git a/gstreamer-app/src/app_src.rs b/gstreamer-app/src/app_src.rs index 7e1966801..ec7987903 100644 --- a/gstreamer-app/src/app_src.rs +++ b/gstreamer-app/src/app_src.rs @@ -439,8 +439,8 @@ impl AppSrcBuilder { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] pub fn handle_segment_change(self, handle_segment_change: bool) -> Self { Self { builder: self @@ -457,8 +457,8 @@ impl AppSrcBuilder { } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] pub fn leaky_type(self, leaky_type: crate::AppLeakyType) -> Self { Self { builder: self.builder.property("leaky-type", leaky_type), @@ -466,8 +466,8 @@ impl AppSrcBuilder { } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] pub fn max_buffers(self, max_buffers: u64) -> Self { Self { builder: self.builder.property("max-buffers", max_buffers), @@ -489,8 +489,8 @@ impl AppSrcBuilder { } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] pub fn max_time(self, max_time: Option) -> Self { Self { builder: self.builder.property("max-time", max_time), diff --git a/gstreamer-app/src/lib.rs b/gstreamer-app/src/lib.rs index 5e2454dae..a1c20bd8c 100644 --- a/gstreamer-app/src/lib.rs +++ b/gstreamer-app/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] diff --git a/gstreamer-app/sys/Cargo.toml b/gstreamer-app/sys/Cargo.toml index 93eef92cf..0a5f227a5 100644 --- a/gstreamer-app/sys/Cargo.toml +++ b/gstreamer-app/sys/Cargo.toml @@ -26,7 +26,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gst/dox", "gst_base/dox"] [lib] name = "gstreamer_app_sys" diff --git a/gstreamer-audio/Cargo.toml b/gstreamer-audio/Cargo.toml index 66656294b..3cad83380 100644 --- a/gstreamer-audio/Cargo.toml +++ b/gstreamer-audio/Cargo.toml @@ -36,8 +36,7 @@ v1_18 = ["gst/v1_18", "gst-base/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "gst-base/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "gst-base/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "gst-base/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox", "gst-base/dox", "serde"] serde = ["dep:serde", "gst/serde"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-audio/src/audio_aggregator.rs b/gstreamer-audio/src/audio_aggregator.rs index f669b6c18..801323e7f 100644 --- a/gstreamer-audio/src/audio_aggregator.rs +++ b/gstreamer-audio/src/audio_aggregator.rs @@ -1,9 +1,9 @@ -#[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg(feature = "v1_18")] use std::mem::transmute; -#[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg(feature = "v1_18")] use glib::object::Cast; -#[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg(feature = "v1_18")] use glib::signal::{connect_raw, SignalHandlerId}; use glib::{object::IsA, translate::*}; use gst::prelude::*; @@ -14,18 +14,18 @@ pub trait AudioAggregatorExtManual: 'static { #[doc(alias = "gst_audio_aggregator_set_sink_caps")] fn set_sink_caps(&self, pad: &impl IsA, caps: &gst::CapsRef); - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "output-buffer-duration-fraction")] fn output_buffer_duration_fraction(&self) -> gst::Fraction; - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "output-buffer-duration-fraction")] fn set_output_buffer_duration_fraction(&self, output_buffer_duration_fraction: gst::Fraction); - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "output-buffer-duration-fraction")] fn connect_output_buffer_duration_fraction_notify( &self, @@ -47,14 +47,14 @@ impl> AudioAggregatorExtManual for O { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn output_buffer_duration_fraction(&self) -> gst::Fraction { glib::ObjectExt::property(self.as_ref(), "output-buffer-duration-fraction") } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn set_output_buffer_duration_fraction(&self, output_buffer_duration_fraction: gst::Fraction) { glib::ObjectExt::set_property( self.as_ref(), @@ -63,8 +63,8 @@ impl> AudioAggregatorExtManual for O { ) } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn connect_output_buffer_duration_fraction_notify( &self, f: F, diff --git a/gstreamer-audio/src/audio_converter.rs b/gstreamer-audio/src/audio_converter.rs index c2cdb70bf..a2a1279e8 100644 --- a/gstreamer-audio/src/audio_converter.rs +++ b/gstreamer-audio/src/audio_converter.rs @@ -163,15 +163,15 @@ impl AudioConverterConfig { .unwrap_or_else(Vec::new) } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] pub fn set_dither_threshold(&mut self, v: u32) { self.0 .set(glib::gstr!("GstAudioConverter.dither-threshold"), v); } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[doc(alias = "get_dither_threshold")] pub fn dither_threshold(&self) -> u32 { self.0 diff --git a/gstreamer-audio/src/audio_decoder.rs b/gstreamer-audio/src/audio_decoder.rs index ba720afc5..ff862d3dd 100644 --- a/gstreamer-audio/src/audio_decoder.rs +++ b/gstreamer-audio/src/audio_decoder.rs @@ -23,8 +23,8 @@ extern "C" { pub trait AudioDecoderExtManual: 'static { fn negotiate(&self) -> Result<(), gst::FlowError>; - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] fn set_output_caps(&self, caps: &gst::Caps) -> Result<(), gst::FlowError>; fn set_output_format(&self, info: &AudioInfo) -> Result<(), gst::FlowError>; @@ -64,8 +64,8 @@ impl> AudioDecoderExtManual for O { } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_audio_decoder_set_output_caps")] fn set_output_caps(&self, caps: &gst::Caps) -> Result<(), gst::FlowError> { unsafe { diff --git a/gstreamer-audio/src/audio_meta.rs b/gstreamer-audio/src/audio_meta.rs index d7f4a6f06..27d5af9c8 100644 --- a/gstreamer-audio/src/audio_meta.rs +++ b/gstreamer-audio/src/audio_meta.rs @@ -1,16 +1,16 @@ // Take a look at the license at the top of the repository in the LICENSE file. use std::fmt; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] use std::ptr; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] use std::slice; use glib::translate::{from_glib, IntoGlib}; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] use glib::translate::{from_glib_none, ToGlibPtr}; use gst::prelude::*; @@ -74,21 +74,21 @@ impl fmt::Debug for AudioClippingMeta { } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[repr(transparent)] #[doc(alias = "GstAudioMeta")] pub struct AudioMeta(ffi::GstAudioMeta); -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] unsafe impl Send for AudioMeta {} -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] unsafe impl Sync for AudioMeta {} -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl AudioMeta { #[doc(alias = "gst_buffer_add_audio_meta")] pub fn add<'a>( @@ -200,8 +200,8 @@ impl AudioMeta { } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] unsafe impl MetaAPI for AudioMeta { type GstType = ffi::GstAudioMeta; @@ -212,8 +212,8 @@ unsafe impl MetaAPI for AudioMeta { } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl fmt::Debug for AudioMeta { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("AudioMeta") @@ -224,21 +224,21 @@ impl fmt::Debug for AudioMeta { } } -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[repr(transparent)] #[doc(alias = "GstAudioLevelMeta")] pub struct AudioLevelMeta(ffi::GstAudioLevelMeta); -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] unsafe impl Send for AudioLevelMeta {} -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] unsafe impl Sync for AudioLevelMeta {} -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl AudioLevelMeta { #[doc(alias = "gst_buffer_add_audio_level_meta")] pub fn add( @@ -271,8 +271,8 @@ impl AudioLevelMeta { } } -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] unsafe impl MetaAPI for AudioLevelMeta { type GstType = ffi::GstAudioLevelMeta; @@ -283,8 +283,8 @@ unsafe impl MetaAPI for AudioLevelMeta { } } -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl fmt::Debug for AudioLevelMeta { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("AudioLevelMeta") diff --git a/gstreamer-audio/src/functions.rs b/gstreamer-audio/src/functions.rs index a90fe4ce7..67c322628 100644 --- a/gstreamer-audio/src/functions.rs +++ b/gstreamer-audio/src/functions.rs @@ -23,8 +23,8 @@ pub fn audio_buffer_clip( } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_audio_buffer_truncate")] pub fn audio_buffer_truncate( buffer: gst::Buffer, diff --git a/gstreamer-audio/src/lib.rs b/gstreamer-audio/src/lib.rs index 8b415589a..d5b0fc023 100644 --- a/gstreamer-audio/src/lib.rs +++ b/gstreamer-audio/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] @@ -49,11 +49,11 @@ mod audio_aggregator_pad; mod audio_stream_align; mod functions; pub use crate::functions::*; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub mod audio_buffer; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub use audio_buffer::{AudioBuffer, AudioBufferRef}; mod audio_decoder; diff --git a/gstreamer-audio/sys/Cargo.toml b/gstreamer-audio/sys/Cargo.toml index 18e5b917a..a1ad15ea4 100644 --- a/gstreamer-audio/sys/Cargo.toml +++ b/gstreamer-audio/sys/Cargo.toml @@ -30,7 +30,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gobject/dox", "gst/dox", "gst_base/dox"] [lib] name = "gstreamer_audio_sys" diff --git a/gstreamer-base/Cargo.toml b/gstreamer-base/Cargo.toml index 50e4b2b2f..372b1e50a 100644 --- a/gstreamer-base/Cargo.toml +++ b/gstreamer-base/Cargo.toml @@ -33,7 +33,6 @@ v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-base/src/aggregator.rs b/gstreamer-base/src/aggregator.rs index 9e511c030..6af06910b 100644 --- a/gstreamer-base/src/aggregator.rs +++ b/gstreamer-base/src/aggregator.rs @@ -1,15 +1,15 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] use std::boxed::Box as Box_; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] use std::mem::transmute; use std::{mem, ptr}; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] use glib::signal::{connect_raw, SignalHandlerId}; use glib::{prelude::*, translate::*}; use gst::{format::FormattedValue, prelude::*}; @@ -22,26 +22,26 @@ pub trait AggregatorExtManual: 'static { #[doc(alias = "gst_aggregator_get_allocator")] fn allocator(&self) -> (Option, gst::AllocationParams); - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "min-upstream-latency")] fn min_upstream_latency(&self) -> gst::ClockTime; - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "min-upstream-latency")] fn set_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime); - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "min-upstream-latency")] fn connect_min_upstream_latency_notify( &self, f: F, ) -> SignalHandlerId; - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_aggregator_update_segment")] fn update_segment( &self, @@ -50,8 +50,8 @@ pub trait AggregatorExtManual: 'static { fn set_position(&self, position: impl FormattedValue); - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_aggregator_selected_samples")] fn selected_samples( &self, @@ -61,8 +61,8 @@ pub trait AggregatorExtManual: 'static { info: Option<&gst::StructureRef>, ); - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn connect_samples_selected< F: Fn( &Self, @@ -95,21 +95,21 @@ impl> AggregatorExtManual for O { } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] fn min_upstream_latency(&self) -> gst::ClockTime { self.as_ref().property("min-upstream-latency") } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] fn set_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime) { self.as_ref() .set_property("min-upstream-latency", min_upstream_latency); } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] fn connect_min_upstream_latency_notify( &self, f: F, @@ -126,8 +126,8 @@ impl> AggregatorExtManual for O { ) } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn update_segment( &self, segment: &gst::FormattedSegment, @@ -155,8 +155,8 @@ impl> AggregatorExtManual for O { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn selected_samples( &self, pts: impl Into>, @@ -177,8 +177,8 @@ impl> AggregatorExtManual for O { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn connect_samples_selected< F: Fn( &Self, @@ -251,8 +251,8 @@ impl> AggregatorExtManual for O { } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] unsafe extern "C" fn notify_min_upstream_latency_trampoline( this: *mut ffi::GstAggregator, _param_spec: glib::ffi::gpointer, diff --git a/gstreamer-base/src/functions.rs b/gstreamer-base/src/functions.rs index d8fca5a26..6668e4fe9 100644 --- a/gstreamer-base/src/functions.rs +++ b/gstreamer-base/src/functions.rs @@ -28,8 +28,8 @@ pub fn type_find_helper_for_data( } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_type_find_helper_for_data_with_extension")] pub fn type_find_helper_for_data_with_extension( obj: Option<&impl IsA>, @@ -77,8 +77,8 @@ pub fn type_find_helper_for_buffer>( } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_type_find_helper_for_buffer_with_extension")] pub fn type_find_helper_for_buffer_with_extension>( obj: Option<&P>, @@ -102,8 +102,8 @@ pub fn type_find_helper_for_buffer_with_extension>( } } -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[doc(alias = "gst_type_find_helper_for_buffer_with_caps")] pub fn type_find_helper_for_buffer_with_caps( obj: Option<&impl IsA>, @@ -123,8 +123,8 @@ pub fn type_find_helper_for_buffer_with_caps( } } -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[doc(alias = "gst_type_find_helper_for_data_with_caps")] pub fn type_find_helper_for_data_with_caps( obj: Option<&impl IsA>, @@ -146,8 +146,8 @@ pub fn type_find_helper_for_data_with_caps( } } -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[doc(alias = "gst_type_find_list_factories_for_caps")] pub fn type_find_list_factories_for_caps( obj: Option<&impl IsA>, diff --git a/gstreamer-base/src/lib.rs b/gstreamer-base/src/lib.rs index 06df20149..a0ddf799c 100644 --- a/gstreamer-base/src/lib.rs +++ b/gstreamer-base/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] diff --git a/gstreamer-base/src/subclass/aggregator.rs b/gstreamer-base/src/subclass/aggregator.rs index b3e38472b..9b099d72e 100644 --- a/gstreamer-base/src/subclass/aggregator.rs +++ b/gstreamer-base/src/subclass/aggregator.rs @@ -16,8 +16,8 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl { self.parent_clip(aggregator_pad, buffer) } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn finish_buffer_list( &self, buffer_list: gst::BufferList, @@ -33,8 +33,8 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl { self.parent_sink_event(aggregator_pad, event) } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn sink_event_pre_queue( &self, aggregator_pad: &AggregatorPad, @@ -47,8 +47,8 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl { self.parent_sink_query(aggregator_pad, query) } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn sink_query_pre_queue( &self, aggregator_pad: &AggregatorPad, @@ -122,14 +122,14 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl { self.parent_decide_allocation(query) } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn negotiate(&self) -> bool { self.parent_negotiate() } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn peek_next_sample(&self, pad: &AggregatorPad) -> Option { self.parent_peek_next_sample(pad) } @@ -147,8 +147,8 @@ pub trait AggregatorImplExt: ObjectSubclass { fn parent_finish_buffer(&self, buffer: gst::Buffer) -> Result; - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn parent_finish_buffer_list( &self, buffer_list: gst::BufferList, @@ -156,8 +156,8 @@ pub trait AggregatorImplExt: ObjectSubclass { fn parent_sink_event(&self, aggregator_pad: &AggregatorPad, event: gst::Event) -> bool; - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn parent_sink_event_pre_queue( &self, aggregator_pad: &AggregatorPad, @@ -166,8 +166,8 @@ pub trait AggregatorImplExt: ObjectSubclass { fn parent_sink_query(&self, aggregator_pad: &AggregatorPad, query: &mut gst::QueryRef) -> bool; - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn parent_sink_query_pre_queue( &self, aggregator_pad: &AggregatorPad, @@ -217,12 +217,12 @@ pub trait AggregatorImplExt: ObjectSubclass { query: &mut gst::query::Allocation, ) -> Result<(), gst::LoggableError>; - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn parent_negotiate(&self) -> bool; - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn parent_peek_next_sample(&self, pad: &AggregatorPad) -> Option; } @@ -280,8 +280,8 @@ impl AggregatorImplExt for T { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn parent_finish_buffer_list( &self, buffer_list: gst::BufferList, @@ -314,8 +314,8 @@ impl AggregatorImplExt for T { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn parent_sink_event_pre_queue( &self, aggregator_pad: &AggregatorPad, @@ -350,8 +350,8 @@ impl AggregatorImplExt for T { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn parent_sink_query_pre_queue( &self, aggregator_pad: &AggregatorPad, @@ -630,8 +630,8 @@ impl AggregatorImplExt for T { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn parent_negotiate(&self) -> bool { unsafe { let data = Self::type_data(); @@ -649,8 +649,8 @@ impl AggregatorImplExt for T { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn parent_peek_next_sample(&self, pad: &AggregatorPad) -> Option { unsafe { let data = Self::type_data(); @@ -690,7 +690,7 @@ unsafe impl IsSubclassable for Aggregator { klass.negotiated_src_caps = Some(aggregator_negotiated_src_caps::); klass.propose_allocation = Some(aggregator_propose_allocation::); klass.decide_allocation = Some(aggregator_decide_allocation::); - #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg(feature = "v1_18")] { klass.sink_event_pre_queue = Some(aggregator_sink_event_pre_queue::); klass.sink_query_pre_queue = Some(aggregator_sink_query_pre_queue::); @@ -738,8 +738,8 @@ unsafe extern "C" fn aggregator_finish_buffer( .into_glib() } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] unsafe extern "C" fn aggregator_finish_buffer_list( ptr: *mut ffi::GstAggregator, buffer_list: *mut gst::ffi::GstBufferList, @@ -767,8 +767,8 @@ unsafe extern "C" fn aggregator_sink_event( .into_glib() } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] unsafe extern "C" fn aggregator_sink_event_pre_queue( ptr: *mut ffi::GstAggregator, aggregator_pad: *mut ffi::GstAggregatorPad, @@ -801,8 +801,8 @@ unsafe extern "C" fn aggregator_sink_query( .into_glib() } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] unsafe extern "C" fn aggregator_sink_query_pre_queue( ptr: *mut ffi::GstAggregator, aggregator_pad: *mut ffi::GstAggregatorPad, @@ -1054,8 +1054,8 @@ unsafe extern "C" fn aggregator_decide_allocation( .into_glib() } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] unsafe extern "C" fn aggregator_negotiate( ptr: *mut ffi::GstAggregator, ) -> glib::ffi::gboolean { @@ -1065,8 +1065,8 @@ unsafe extern "C" fn aggregator_negotiate( gst::panic_to_error!(imp, false, { imp.negotiate() }).into_glib() } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] unsafe extern "C" fn aggregator_peek_next_sample( ptr: *mut ffi::GstAggregator, pad: *mut ffi::GstAggregatorPad, diff --git a/gstreamer-base/sys/Cargo.toml b/gstreamer-base/sys/Cargo.toml index 7b30c55f2..604bb59dd 100644 --- a/gstreamer-base/sys/Cargo.toml +++ b/gstreamer-base/sys/Cargo.toml @@ -28,7 +28,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gobject/dox", "gst/dox"] [lib] name = "gstreamer_base_sys" diff --git a/gstreamer-check/Cargo.toml b/gstreamer-check/Cargo.toml index 312131cd9..10e31a3a3 100644 --- a/gstreamer-check/Cargo.toml +++ b/gstreamer-check/Cargo.toml @@ -29,7 +29,6 @@ v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-check/src/harness.rs b/gstreamer-check/src/harness.rs index 3b2f5a33a..71e817435 100644 --- a/gstreamer-check/src/harness.rs +++ b/gstreamer-check/src/harness.rs @@ -88,8 +88,8 @@ impl Harness { pad.add_probe(mask, func); } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_harness_add_propose_allocation_meta")] pub fn add_propose_allocation_meta( &mut self, @@ -268,8 +268,8 @@ impl Harness { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_harness_pull_until_eos")] pub fn pull_until_eos(&mut self) -> Result, glib::BoolError> { unsafe { @@ -399,8 +399,8 @@ impl Harness { } #[doc(alias = "gst_harness_set_live")] - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] pub fn set_live(&mut self, is_live: bool) { unsafe { ffi::gst_harness_set_live(self.0.as_ptr(), is_live.into_glib()) } } diff --git a/gstreamer-check/src/lib.rs b/gstreamer-check/src/lib.rs index 67810609e..1ce82c5a1 100644 --- a/gstreamer-check/src/lib.rs +++ b/gstreamer-check/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] diff --git a/gstreamer-check/src/test_clock.rs b/gstreamer-check/src/test_clock.rs index 9d206e104..abe7c184f 100644 --- a/gstreamer-check/src/test_clock.rs +++ b/gstreamer-check/src/test_clock.rs @@ -33,8 +33,8 @@ impl TestClock { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_test_clock_process_id")] pub fn process_id(&self, pending_id: &gst::ClockId) -> bool { unsafe { @@ -86,8 +86,8 @@ impl TestClock { } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_test_clock_timed_wait_for_multiple_pending_ids")] pub fn timed_wait_for_multiple_pending_ids( &self, diff --git a/gstreamer-check/sys/Cargo.toml b/gstreamer-check/sys/Cargo.toml index a6f45f765..541006023 100644 --- a/gstreamer-check/sys/Cargo.toml +++ b/gstreamer-check/sys/Cargo.toml @@ -26,7 +26,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gobject/dox", "gst/dox"] [lib] name = "gstreamer_check_sys" diff --git a/gstreamer-controller/Cargo.toml b/gstreamer-controller/Cargo.toml index b246b001f..37c697ecf 100644 --- a/gstreamer-controller/Cargo.toml +++ b/gstreamer-controller/Cargo.toml @@ -30,7 +30,6 @@ v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-controller/src/lib.rs b/gstreamer-controller/src/lib.rs index 1a2d54784..6abe7647a 100644 --- a/gstreamer-controller/src/lib.rs +++ b/gstreamer-controller/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] diff --git a/gstreamer-controller/sys/Cargo.toml b/gstreamer-controller/sys/Cargo.toml index d37124b7a..a9a1d5d88 100644 --- a/gstreamer-controller/sys/Cargo.toml +++ b/gstreamer-controller/sys/Cargo.toml @@ -27,7 +27,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gobject/dox", "gst/dox"] [lib] name = "gstreamer_controller_sys" diff --git a/gstreamer-editing-services/Cargo.toml b/gstreamer-editing-services/Cargo.toml index 45e7499da..ee5d747a9 100644 --- a/gstreamer-editing-services/Cargo.toml +++ b/gstreamer-editing-services/Cargo.toml @@ -34,8 +34,7 @@ v1_18 = ["gst/v1_18", "gst-base/v1_18", "gst-pbutils/v1_18", "ffi/v1_18", "v1_16 v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-pbutils/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-pbutils/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "gst-base/v1_24", "gst-pbutils/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gio/dox", "gst/dox", "gst-base/dox", "gst-pbutils/dox", "serde"] serde = ["dep:serde", "gst/serde", "gst-pbutils/serde"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-editing-services/src/lib.rs b/gstreamer-editing-services/src/lib.rs index cfa3fc474..405d92570 100644 --- a/gstreamer-editing-services/src/lib.rs +++ b/gstreamer-editing-services/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] diff --git a/gstreamer-editing-services/sys/Cargo.toml b/gstreamer-editing-services/sys/Cargo.toml index 4051b3539..18686b52b 100644 --- a/gstreamer-editing-services/sys/Cargo.toml +++ b/gstreamer-editing-services/sys/Cargo.toml @@ -34,7 +34,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gobject/dox", "gio/dox", "gst/dox", "gst_pbutils/dox"] [lib] name = "gstreamer_editing_services_sys" diff --git a/gstreamer-gl/Cargo.toml b/gstreamer-gl/Cargo.toml index 4561a6263..a99a5e83c 100644 --- a/gstreamer-gl/Cargo.toml +++ b/gstreamer-gl/Cargo.toml @@ -38,8 +38,7 @@ v1_18 = ["gst/v1_18", "gst-base/v1_18", "gst-video/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "gst-base/v1_20", "gst-video/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "gst-base/v1_22", "gst-video/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "gst-base/v1_24", "gst-video/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox", "gst-base/dox", "gst-video/dox", "serde"] serde = ["dep:serde", "gst/serde", "gst-video/serde"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-gl/egl/Cargo.toml b/gstreamer-gl/egl/Cargo.toml index 361b632d9..c9689a0cd 100644 --- a/gstreamer-gl/egl/Cargo.toml +++ b/gstreamer-gl/egl/Cargo.toml @@ -29,7 +29,6 @@ gir-format-check = "0.1" [features] default = [] -dox = ["ffi/dox", "glib/dox", "gst/dox", "gst-gl/dox"] v1_16 = ["gst/v1_16", "gst-gl/v1_16", "ffi/v1_16"] v1_18 = ["gst/v1_18", "gst-gl/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "gst-gl/v1_20", "ffi/v1_20", "v1_18"] @@ -37,4 +36,4 @@ v1_22 = ["gst/v1_22", "gst-gl/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "gst-gl/v1_24", "ffi/v1_24", "v1_22"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-gl/egl/sys/Cargo.toml b/gstreamer-gl/egl/sys/Cargo.toml index c0f19efe8..34576c23b 100644 --- a/gstreamer-gl/egl/sys/Cargo.toml +++ b/gstreamer-gl/egl/sys/Cargo.toml @@ -58,7 +58,6 @@ shell-words = "1.0.0" tempfile = "3" [features] -dox = ["glib/dox", "gst_gl/dox"] v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] diff --git a/gstreamer-gl/src/gl_display.rs b/gstreamer-gl/src/gl_display.rs index 43b2a2f58..9344ab200 100644 --- a/gstreamer-gl/src/gl_display.rs +++ b/gstreamer-gl/src/gl_display.rs @@ -4,8 +4,8 @@ use glib::prelude::*; use glib::translate::*; pub trait GLDisplayExtManual: 'static { - #[cfg(any(feature = "v1_24", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_24")))] + #[cfg(feature = "v1_24")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] #[doc(alias = "gst_gl_display_ensure_context")] fn ensure_context( &self, @@ -15,8 +15,8 @@ pub trait GLDisplayExtManual: 'static { } impl> GLDisplayExtManual for O { - #[cfg(any(feature = "v1_24", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_24")))] + #[cfg(feature = "v1_24")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] fn ensure_context( &self, other_context: Option<&impl IsA>, @@ -99,8 +99,8 @@ impl GLDisplay { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_gl_display_remove_context")] pub fn remove_context( display: &gst::ObjectLockGuard, diff --git a/gstreamer-gl/src/lib.rs b/gstreamer-gl/src/lib.rs index a75a0effd..e635597f8 100644 --- a/gstreamer-gl/src/lib.rs +++ b/gstreamer-gl/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] diff --git a/gstreamer-gl/src/subclass/mod.rs b/gstreamer-gl/src/subclass/mod.rs index 232626f72..c59faf40c 100644 --- a/gstreamer-gl/src/subclass/mod.rs +++ b/gstreamer-gl/src/subclass/mod.rs @@ -1,6 +1,6 @@ mod gl_base_filter; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] mod gl_base_src; mod gl_filter; @@ -10,8 +10,8 @@ pub mod prelude { #[doc(hidden)] pub use gst_video::subclass::prelude::*; - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] pub use super::gl_base_src::{GLBaseSrcImpl, GLBaseSrcImplExt}; pub use super::{ gl_base_filter::{GLBaseFilterImpl, GLBaseFilterImplExt}, diff --git a/gstreamer-gl/sys/Cargo.toml b/gstreamer-gl/sys/Cargo.toml index 7eb509c5a..f4febfcd5 100644 --- a/gstreamer-gl/sys/Cargo.toml +++ b/gstreamer-gl/sys/Cargo.toml @@ -34,7 +34,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gobject/dox", "gst/dox", "gst_base/dox", "gst_video/dox"] [lib] name = "gstreamer_gl_sys" diff --git a/gstreamer-gl/wayland/Cargo.toml b/gstreamer-gl/wayland/Cargo.toml index 5d3691a20..7d692207a 100644 --- a/gstreamer-gl/wayland/Cargo.toml +++ b/gstreamer-gl/wayland/Cargo.toml @@ -29,7 +29,6 @@ gir-format-check = "0.1" [features] default = [] -dox = ["ffi/dox", "glib/dox", "gst/dox", "gst-gl/dox"] v1_16 = ["gst/v1_16", "gst-gl/v1_16", "ffi/v1_16"] v1_18 = ["gst/v1_18", "gst-gl/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "gst-gl/v1_20", "ffi/v1_20", "v1_18"] @@ -37,4 +36,4 @@ v1_22 = ["gst/v1_22", "gst-gl/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "gst-gl/v1_24", "ffi/v1_24", "v1_22"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-gl/wayland/sys/Cargo.toml b/gstreamer-gl/wayland/sys/Cargo.toml index 62f1485be..44a1d160d 100644 --- a/gstreamer-gl/wayland/sys/Cargo.toml +++ b/gstreamer-gl/wayland/sys/Cargo.toml @@ -58,7 +58,6 @@ shell-words = "1.0.0" tempfile = "3" [features] -dox = ["glib/dox", "gst_gl/dox"] v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] diff --git a/gstreamer-gl/x11/Cargo.toml b/gstreamer-gl/x11/Cargo.toml index 1ea84e01a..f1ecb1455 100644 --- a/gstreamer-gl/x11/Cargo.toml +++ b/gstreamer-gl/x11/Cargo.toml @@ -29,7 +29,6 @@ gir-format-check = "0.1" [features] default = [] -dox = ["ffi/dox", "glib/dox", "gst/dox", "gst-gl/dox"] v1_16 = ["gst/v1_16", "gst-gl/v1_16", "ffi/v1_16"] v1_18 = ["gst/v1_18", "gst-gl/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "gst-gl/v1_20", "ffi/v1_20", "v1_18"] @@ -37,4 +36,4 @@ v1_22 = ["gst/v1_22", "gst-gl/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "gst-gl/v1_24", "ffi/v1_24", "v1_22"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-gl/x11/sys/Cargo.toml b/gstreamer-gl/x11/sys/Cargo.toml index c5ffdcee3..3f9d90af8 100644 --- a/gstreamer-gl/x11/sys/Cargo.toml +++ b/gstreamer-gl/x11/sys/Cargo.toml @@ -58,7 +58,6 @@ shell-words = "1.0.0" tempfile = "3" [features] -dox = ["glib/dox", "gst_gl/dox"] v1_16 = [] v1_18 = ["v1_16"] v1_20 = ["v1_18"] diff --git a/gstreamer-mpegts/Cargo.toml b/gstreamer-mpegts/Cargo.toml index f01eac986..11335d0f2 100644 --- a/gstreamer-mpegts/Cargo.toml +++ b/gstreamer-mpegts/Cargo.toml @@ -28,7 +28,6 @@ v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-mpegts/src/lib.rs b/gstreamer-mpegts/src/lib.rs index 9d9fda1b3..1f5164b1a 100644 --- a/gstreamer-mpegts/src/lib.rs +++ b/gstreamer-mpegts/src/lib.rs @@ -1,4 +1,4 @@ -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] use std::sync::Once; diff --git a/gstreamer-mpegts/sys/Cargo.toml b/gstreamer-mpegts/sys/Cargo.toml index ee60c669a..cc075a8d4 100644 --- a/gstreamer-mpegts/sys/Cargo.toml +++ b/gstreamer-mpegts/sys/Cargo.toml @@ -66,4 +66,3 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gst/dox"] diff --git a/gstreamer-net/Cargo.toml b/gstreamer-net/Cargo.toml index cb3c23b2d..b74062b77 100644 --- a/gstreamer-net/Cargo.toml +++ b/gstreamer-net/Cargo.toml @@ -29,7 +29,6 @@ v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gio/dox", "gst/dox"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-net/src/lib.rs b/gstreamer-net/src/lib.rs index 6a3a6e094..618fe1688 100644 --- a/gstreamer-net/src/lib.rs +++ b/gstreamer-net/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] diff --git a/gstreamer-net/sys/Cargo.toml b/gstreamer-net/sys/Cargo.toml index 7dda73243..be725c3a1 100644 --- a/gstreamer-net/sys/Cargo.toml +++ b/gstreamer-net/sys/Cargo.toml @@ -26,7 +26,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gio/dox", "gst/dox"] [lib] name = "gstreamer_net_sys" diff --git a/gstreamer-pbutils/Cargo.toml b/gstreamer-pbutils/Cargo.toml index e915956f3..04e9ab5e3 100644 --- a/gstreamer-pbutils/Cargo.toml +++ b/gstreamer-pbutils/Cargo.toml @@ -35,8 +35,7 @@ v1_18 = ["gst/v1_18", "gst-audio/v1_18", "gst-video/v1_18", "ffi/v1_18", "v1_16" v1_20 = ["gst/v1_20", "gst-audio/v1_20", "gst-video/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "gst-audio/v1_22", "gst-video/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "gst-audio/v1_24", "gst-video/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox", "gst-audio/dox", "gst-video/dox", "serde"] serde = ["dep:serde", "gst/serde"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-pbutils/src/encoding_profile.rs b/gstreamer-pbutils/src/encoding_profile.rs index d37c63da4..c5bdedeae 100644 --- a/gstreamer-pbutils/src/encoding_profile.rs +++ b/gstreamer-pbutils/src/encoding_profile.rs @@ -5,20 +5,20 @@ use glib::{prelude::*, translate::*}; use crate::auto::{ EncodingAudioProfile, EncodingContainerProfile, EncodingProfile, EncodingVideoProfile, }; -#[cfg(any(feature = "v1_20", feature = "dox"))] +#[cfg(feature = "v1_20")] use crate::ElementProperties; pub trait EncodingProfileExtManual { - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_encoding_profile_get_element_properties")] #[doc(alias = "get_element_properties")] fn element_properties(&self) -> Option; } impl> EncodingProfileExtManual for O { - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] fn element_properties(&self) -> Option { unsafe { from_glib_full::<_, Option<_>>(ffi::gst_encoding_profile_get_element_properties( diff --git a/gstreamer-pbutils/src/functions.rs b/gstreamer-pbutils/src/functions.rs index 71338b456..694b5c4ad 100644 --- a/gstreamer-pbutils/src/functions.rs +++ b/gstreamer-pbutils/src/functions.rs @@ -127,8 +127,8 @@ pub fn codec_utils_h264_caps_set_level_and_profile( } } -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_codec_utils_h264_get_profile_flags_level")] pub fn codec_utils_h264_get_profile_flags_level( codec_data: &[u8], @@ -404,8 +404,8 @@ pub fn codec_utils_opus_parse_header( } } -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_codec_utils_caps_get_mime_codec")] pub fn codec_utils_caps_get_mime_codec( caps: &gst::CapsRef, @@ -419,8 +419,8 @@ pub fn codec_utils_caps_get_mime_codec( } } -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_pb_utils_get_caps_description_flags")] pub fn pb_utils_get_caps_description_flags( caps: &gst::CapsRef, @@ -429,8 +429,8 @@ pub fn pb_utils_get_caps_description_flags( unsafe { from_glib(ffi::gst_pb_utils_get_caps_description_flags(caps.as_ptr())) } } -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_pb_utils_get_file_extension_from_caps")] pub fn pb_utils_get_file_extension_from_caps(caps: &gst::CapsRef) -> Option { assert_initialized_main_thread!(); diff --git a/gstreamer-pbutils/src/lib.rs b/gstreamer-pbutils/src/lib.rs index 466ebf7de..1aedd6a24 100644 --- a/gstreamer-pbutils/src/lib.rs +++ b/gstreamer-pbutils/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] @@ -30,9 +30,9 @@ macro_rules! skip_assert_initialized { mod auto; pub use crate::auto::{functions::*, *}; -#[cfg(any(feature = "v1_20", feature = "dox"))] +#[cfg(feature = "v1_20")] mod element_properties; -#[cfg(any(feature = "v1_20", feature = "dox"))] +#[cfg(feature = "v1_20")] pub use crate::element_properties::{ElementProperties, ElementPropertiesMapItem}; #[cfg(feature = "serde")] diff --git a/gstreamer-pbutils/sys/Cargo.toml b/gstreamer-pbutils/sys/Cargo.toml index e50fc5b10..ac7405cee 100644 --- a/gstreamer-pbutils/sys/Cargo.toml +++ b/gstreamer-pbutils/sys/Cargo.toml @@ -34,7 +34,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gobject/dox", "gst/dox", "gst_audio/dox", "gst_video/dox"] [lib] name = "gstreamer_pbutils_sys" diff --git a/gstreamer-play/Cargo.toml b/gstreamer-play/Cargo.toml index e52056b68..bdcd81218 100644 --- a/gstreamer-play/Cargo.toml +++ b/gstreamer-play/Cargo.toml @@ -28,7 +28,6 @@ gir-format-check = "0.1" [features] v1_22 = ["gst/v1_22", "gst-video/v1_22", "ffi/v1_22"] v1_24 = ["gst/v1_24", "gst-video/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox", "gst-video/dox"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-play/src/lib.rs b/gstreamer-play/src/lib.rs index 329ea6757..4e22bd55c 100644 --- a/gstreamer-play/src/lib.rs +++ b/gstreamer-play/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] diff --git a/gstreamer-play/sys/Cargo.toml b/gstreamer-play/sys/Cargo.toml index 3a772ee8e..e8f966601 100644 --- a/gstreamer-play/sys/Cargo.toml +++ b/gstreamer-play/sys/Cargo.toml @@ -27,7 +27,6 @@ tempfile = "3" [features] v1_22 = [] v1_24 = ["v1_22"] -dox = ["glib/dox", "gobject/dox", "gst/dox", "gst_video/dox"] [lib] name = "gstreamer_play_sys" diff --git a/gstreamer-player/Cargo.toml b/gstreamer-player/Cargo.toml index d8c0367cc..0872ea42a 100644 --- a/gstreamer-player/Cargo.toml +++ b/gstreamer-player/Cargo.toml @@ -32,7 +32,6 @@ v1_18 = ["gst/v1_18", "gst-video/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "gst-video/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "gst-video/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "gst-video/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox", "gst-video/dox"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-player/src/lib.rs b/gstreamer-player/src/lib.rs index eeb011114..56d953c1e 100644 --- a/gstreamer-player/src/lib.rs +++ b/gstreamer-player/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] diff --git a/gstreamer-player/sys/Cargo.toml b/gstreamer-player/sys/Cargo.toml index 86bbfc71a..3efb04523 100644 --- a/gstreamer-player/sys/Cargo.toml +++ b/gstreamer-player/sys/Cargo.toml @@ -30,7 +30,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gobject/dox", "gst/dox", "gst_video/dox"] [lib] name = "gstreamer_player_sys" diff --git a/gstreamer-rtp/Cargo.toml b/gstreamer-rtp/Cargo.toml index 874fe310c..f8212dce2 100644 --- a/gstreamer-rtp/Cargo.toml +++ b/gstreamer-rtp/Cargo.toml @@ -33,8 +33,7 @@ v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox", "serde"] serde = ["dep:serde", "gst/serde"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-rtp/src/lib.rs b/gstreamer-rtp/src/lib.rs index d67429e1c..ba394e99a 100644 --- a/gstreamer-rtp/src/lib.rs +++ b/gstreamer-rtp/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] @@ -32,12 +32,12 @@ pub mod rtp_buffer; pub use crate::rtp_buffer::{ calc_header_len, calc_packet_len, calc_payload_len, compare_seqnum, ext_timestamp, RTPBuffer, }; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] pub mod rtp_header_extension; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] pub mod rtp_base_payload; pub mod rtp_base_depayload; @@ -48,11 +48,11 @@ pub mod prelude { #[doc(hidden)] pub use gst::prelude::*; - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] pub use crate::rtp_base_payload::RTPBasePayloadExtManual; - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] pub use crate::rtp_header_extension::RTPHeaderExtensionExtManual; pub use crate::{ auto::traits::*, rtp_base_depayload::RTPBaseDepayloadExtManual, rtp_buffer::RTPBufferExt, diff --git a/gstreamer-rtp/src/rtp_base_payload.rs b/gstreamer-rtp/src/rtp_base_payload.rs index 372fa1bfc..34d176e92 100644 --- a/gstreamer-rtp/src/rtp_base_payload.rs +++ b/gstreamer-rtp/src/rtp_base_payload.rs @@ -5,8 +5,8 @@ use glib::{object::IsA, translate::*}; use crate::RTPBasePayload; pub trait RTPBasePayloadExtManual: 'static { - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_rtp_base_payload_set_outcaps_structure")] #[doc(alias = "gst_rtp_base_payload_set_outcaps")] fn set_outcaps(&self, s: Option<&gst::StructureRef>) -> Result<(), glib::error::BoolError>; @@ -17,8 +17,8 @@ pub trait RTPBasePayloadExtManual: 'static { } impl> RTPBasePayloadExtManual for O { - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] fn set_outcaps(&self, s: Option<&gst::StructureRef>) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( diff --git a/gstreamer-rtp/src/rtp_buffer.rs b/gstreamer-rtp/src/rtp_buffer.rs index b65a7ef9a..0e4720851 100644 --- a/gstreamer-rtp/src/rtp_buffer.rs +++ b/gstreamer-rtp/src/rtp_buffer.rs @@ -186,8 +186,8 @@ impl<'a> RTPBuffer<'a, Writable> { } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_rtp_buffer_remove_extension_data")] pub fn remove_extension_data(&mut self) { unsafe { diff --git a/gstreamer-rtp/src/subclass/mod.rs b/gstreamer-rtp/src/subclass/mod.rs index 12416be27..01b7d4190 100644 --- a/gstreamer-rtp/src/subclass/mod.rs +++ b/gstreamer-rtp/src/subclass/mod.rs @@ -2,14 +2,14 @@ #![allow(clippy::cast_ptr_alignment)] -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] mod rtp_base_payload; mod rtp_base_depayload; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] mod rtp_header_extension; pub mod prelude { @@ -17,10 +17,10 @@ pub mod prelude { pub use gst::subclass::prelude::*; pub use super::rtp_base_depayload::{RTPBaseDepayloadImpl, RTPBaseDepayloadImplExt}; - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] pub use super::rtp_base_payload::{RTPBasePayloadImpl, RTPBasePayloadImplExt}; - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] pub use super::rtp_header_extension::{RTPHeaderExtensionImpl, RTPHeaderExtensionImplExt}; } diff --git a/gstreamer-rtp/sys/Cargo.toml b/gstreamer-rtp/sys/Cargo.toml index 36e13f783..7896ea906 100644 --- a/gstreamer-rtp/sys/Cargo.toml +++ b/gstreamer-rtp/sys/Cargo.toml @@ -26,7 +26,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gst/dox", "gst_base/dox"] [lib] name = "gstreamer_rtp_sys" diff --git a/gstreamer-rtsp-server/Cargo.toml b/gstreamer-rtsp-server/Cargo.toml index c5e718985..79b40c826 100644 --- a/gstreamer-rtsp-server/Cargo.toml +++ b/gstreamer-rtsp-server/Cargo.toml @@ -37,8 +37,7 @@ v1_18 = ["gst/v1_18", "gst-sdp/v1_18", "gst-rtsp/v1_18", "gst-net/v1_18", "ffi/v v1_20 = ["gst/v1_20", "gst-sdp/v1_20", "gst-rtsp/v1_20", "gst-net/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "gst-sdp/v1_22", "gst-rtsp/v1_22", "gst-net/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "gst-sdp/v1_24", "gst-rtsp/v1_24", "gst-net/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gio/dox", "gst/dox", "gst-sdp/dox", "gst-rtsp/dox", "gst-net/dox", "serde"] serde = ["dep:serde", "gst/serde", "gst-rtsp/serde"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-rtsp-server/src/lib.rs b/gstreamer-rtsp-server/src/lib.rs index 9e923b15b..10fe548e8 100644 --- a/gstreamer-rtsp-server/src/lib.rs +++ b/gstreamer-rtsp-server/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] diff --git a/gstreamer-rtsp-server/src/rtsp_session.rs b/gstreamer-rtsp-server/src/rtsp_session.rs index 7bd53212c..bce08806e 100644 --- a/gstreamer-rtsp-server/src/rtsp_session.rs +++ b/gstreamer-rtsp-server/src/rtsp_session.rs @@ -14,7 +14,7 @@ pub trait RTSPSessionExtManual: 'static { impl> RTSPSessionExtManual for O { fn media(&self, path: &str) -> (Option, i32) { - #[cfg(any(feature = "v1_20", feature = "dox"))] + #[cfg(feature = "v1_20")] unsafe { let mut matched = mem::MaybeUninit::uninit(); let ret = from_glib_full(ffi::gst_rtsp_session_dup_media( @@ -24,7 +24,7 @@ impl> RTSPSessionExtManual for O { )); (ret, matched.assume_init()) } - #[cfg(not(any(feature = "v1_20", feature = "dox")))] + #[cfg(not(any(feature = "v1_20", docsrs)))] unsafe { let mut matched = mem::MaybeUninit::uninit(); let ret = from_glib_none(ffi::gst_rtsp_session_get_media( diff --git a/gstreamer-rtsp-server/src/subclass/rtsp_client.rs b/gstreamer-rtsp-server/src/subclass/rtsp_client.rs index 8792e4024..98f26dcb8 100644 --- a/gstreamer-rtsp-server/src/subclass/rtsp_client.rs +++ b/gstreamer-rtsp-server/src/subclass/rtsp_client.rs @@ -144,8 +144,8 @@ pub trait RTSPClientImpl: RTSPClientImplExt + ObjectImpl + Send + Sync { self.parent_pre_record_request(ctx) } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] fn adjust_error_code( &self, ctx: &crate::RTSPContext, @@ -241,8 +241,8 @@ pub trait RTSPClientImplExt: ObjectSubclass { fn parent_pre_record_request(&self, ctx: &crate::RTSPContext) -> gst_rtsp::RTSPStatusCode; - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] fn parent_adjust_error_code( &self, ctx: &crate::RTSPContext, @@ -710,8 +710,8 @@ impl RTSPClientImplExt for T { } } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] fn parent_adjust_error_code( &self, ctx: &crate::RTSPContext, @@ -996,8 +996,8 @@ unsafe impl IsSubclassable for RTSPClient { klass.pre_get_parameter_request = Some(client_pre_get_parameter_request::); klass.pre_announce_request = Some(client_pre_announce_request::); klass.pre_record_request = Some(client_pre_record_request::); - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] { klass.adjust_error_code = Some(client_adjust_error_code::); } @@ -1330,8 +1330,8 @@ unsafe extern "C" fn client_pre_record_request( imp.pre_record_request(&from_glib_borrow(ctx)).into_glib() } -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] unsafe extern "C" fn client_adjust_error_code( ptr: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, diff --git a/gstreamer-rtsp-server/sys/Cargo.toml b/gstreamer-rtsp-server/sys/Cargo.toml index cea9005c7..e597562b9 100644 --- a/gstreamer-rtsp-server/sys/Cargo.toml +++ b/gstreamer-rtsp-server/sys/Cargo.toml @@ -42,7 +42,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gobject/dox", "gio/dox", "gst/dox", "gst_net/dox", "gst_sdp/dox", "gst_rtsp/dox"] [lib] name = "gstreamer_rtsp_server_sys" diff --git a/gstreamer-rtsp/Cargo.toml b/gstreamer-rtsp/Cargo.toml index 1aae68239..94a165220 100644 --- a/gstreamer-rtsp/Cargo.toml +++ b/gstreamer-rtsp/Cargo.toml @@ -33,8 +33,7 @@ v1_18 = ["gst/v1_18", "gst-sdp/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "gst-sdp/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "gst-sdp/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "gst-sdp/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox", "gst-sdp/dox", "serde"] serde = ["dep:serde", "gst/serde"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-rtsp/src/lib.rs b/gstreamer-rtsp/src/lib.rs index e1c55a54a..436598e04 100644 --- a/gstreamer-rtsp/src/lib.rs +++ b/gstreamer-rtsp/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] diff --git a/gstreamer-rtsp/sys/Cargo.toml b/gstreamer-rtsp/sys/Cargo.toml index 71561b675..86f301691 100644 --- a/gstreamer-rtsp/sys/Cargo.toml +++ b/gstreamer-rtsp/sys/Cargo.toml @@ -34,7 +34,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gobject/dox", "gio/dox", "gst/dox", "gst_sdp/dox"] [lib] name = "gstreamer_rtsp_sys" diff --git a/gstreamer-sdp/Cargo.toml b/gstreamer-sdp/Cargo.toml index c35d57ae5..f00579439 100644 --- a/gstreamer-sdp/Cargo.toml +++ b/gstreamer-sdp/Cargo.toml @@ -28,7 +28,6 @@ v1_18 = ["gst/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-sdp/src/lib.rs b/gstreamer-sdp/src/lib.rs index 664e84a14..89df9b7cd 100644 --- a/gstreamer-sdp/src/lib.rs +++ b/gstreamer-sdp/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] diff --git a/gstreamer-sdp/sys/Cargo.toml b/gstreamer-sdp/sys/Cargo.toml index 2bf928d97..6b1a2f86c 100644 --- a/gstreamer-sdp/sys/Cargo.toml +++ b/gstreamer-sdp/sys/Cargo.toml @@ -22,7 +22,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gst/dox"] [lib] name = "gstreamer_sdp_sys" diff --git a/gstreamer-tag/sys/Cargo.toml b/gstreamer-tag/sys/Cargo.toml index 23e1256a6..1dd35410f 100644 --- a/gstreamer-tag/sys/Cargo.toml +++ b/gstreamer-tag/sys/Cargo.toml @@ -26,7 +26,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gobject/dox", "gst/dox"] [lib] name = "gstreamer_tag_sys" diff --git a/gstreamer-validate/Cargo.toml b/gstreamer-validate/Cargo.toml index e2b103e16..c028438fe 100644 --- a/gstreamer-validate/Cargo.toml +++ b/gstreamer-validate/Cargo.toml @@ -27,7 +27,6 @@ tempfile = "3" [features] default = [] v1_24 = ["gst/v1_24", "ffi/v1_24"] -dox = ["ffi/dox", "glib/dox", "gst/dox"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-validate/src/lib.rs b/gstreamer-validate/src/lib.rs index d8f48a20d..8d91100b0 100644 --- a/gstreamer-validate/src/lib.rs +++ b/gstreamer-validate/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] diff --git a/gstreamer-validate/sys/Cargo.toml b/gstreamer-validate/sys/Cargo.toml index bd1e3424b..779f7c9a9 100644 --- a/gstreamer-validate/sys/Cargo.toml +++ b/gstreamer-validate/sys/Cargo.toml @@ -53,5 +53,4 @@ shell-words = "1.0.0" tempfile = "3" [features] -dox = ["glib/dox", "gio/dox", "gobject/dox", "gst/dox"] v1_24 = [] diff --git a/gstreamer-video/Cargo.toml b/gstreamer-video/Cargo.toml index ab793772f..5e9d49f97 100644 --- a/gstreamer-video/Cargo.toml +++ b/gstreamer-video/Cargo.toml @@ -37,8 +37,7 @@ v1_18 = ["gst/v1_18", "gst-base/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "gst-base/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "gst-base/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "gst-base/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox", "gst-base/dox", "serde"] serde = ["dep:serde", "gst/serde"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-video/src/caps_features.rs b/gstreamer-video/src/caps_features.rs index e5043393d..6f16ebbeb 100644 --- a/gstreamer-video/src/caps_features.rs +++ b/gstreamer-video/src/caps_features.rs @@ -3,12 +3,12 @@ use gst::CapsFeatures; use once_cell::sync::Lazy; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub static CAPS_FEATURE_FORMAT_INTERLACED: &glib::GStr = unsafe { glib::GStr::from_utf8_with_nul_unchecked(ffi::GST_CAPS_FEATURE_FORMAT_INTERLACED) }; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub static CAPS_FEATURES_FORMAT_INTERLACED: Lazy = Lazy::new(|| CapsFeatures::new([CAPS_FEATURE_FORMAT_INTERLACED])); diff --git a/gstreamer-video/src/enums.rs b/gstreamer-video/src/enums.rs index 4660d3dfd..96cf121a1 100644 --- a/gstreamer-video/src/enums.rs +++ b/gstreamer-video/src/enums.rs @@ -1,18 +1,18 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] use glib::translate::*; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] use crate::VideoCaptionType; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] use crate::VideoOrientationMethod; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl VideoCaptionType { #[doc(alias = "gst_video_caption_type_from_caps")] pub fn from_caps(caps: &gst::CapsRef) -> VideoCaptionType { @@ -21,11 +21,11 @@ impl VideoCaptionType { } } -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl VideoOrientationMethod { - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_video_orientation_from_tag")] pub fn from_tag(taglist: &gst::TagListRef) -> Option { skip_assert_initialized!(); diff --git a/gstreamer-video/src/functions.rs b/gstreamer-video/src/functions.rs index a53622102..a69f81fbc 100644 --- a/gstreamer-video/src/functions.rs +++ b/gstreamer-video/src/functions.rs @@ -193,8 +193,8 @@ pub fn guess_framerate(duration: gst::ClockTime) -> Option { } } -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[doc(alias = "gst_video_is_common_aspect_ratio")] pub fn is_common_aspect_ratio(width: u32, height: u32, par: gst::Fraction) -> bool { skip_assert_initialized!(); diff --git a/gstreamer-video/src/lib.rs b/gstreamer-video/src/lib.rs index 809d5bb69..df61e5ffa 100644 --- a/gstreamer-video/src/lib.rs +++ b/gstreamer-video/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] @@ -34,8 +34,8 @@ mod caps; pub use crate::caps::VideoCapsBuilder; mod caps_features; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub use crate::caps_features::{CAPS_FEATURES_FORMAT_INTERLACED, CAPS_FEATURE_FORMAT_INTERLACED}; pub use crate::caps_features::{ CAPS_FEATURES_META_GST_VIDEO_AFFINE_TRANSFORMATION_META, @@ -53,11 +53,11 @@ mod video_format_info; pub use crate::video_format_info::*; mod video_info; pub use crate::video_info::*; -#[cfg(any(feature = "v1_24", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_24")))] +#[cfg(feature = "v1_24")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] mod video_info_dma_drm; -#[cfg(any(feature = "v1_24", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_24")))] +#[cfg(feature = "v1_24")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] pub use crate::video_info_dma_drm::*; pub mod video_frame; pub use crate::video_frame::{VideoFrame, VideoFrameRef}; @@ -83,11 +83,11 @@ pub use crate::video_overlay_composition::{ VideoOverlayRectangleRef, }; pub mod video_meta; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub use crate::video_meta::VideoCaptionMeta; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] pub use crate::video_meta::{VideoAFDMeta, VideoBarMeta}; pub use crate::video_meta::{ VideoAffineTransformationMeta, VideoCropMeta, VideoMeta, VideoOverlayCompositionMeta, @@ -114,23 +114,23 @@ pub mod video_codec_state; pub use crate::video_codec_state::{VideoCodecState, VideoCodecStateContext}; mod utils; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] mod video_hdr; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] pub use crate::video_hdr::*; mod color_balance_channel; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] mod video_aggregator; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] mod video_aggregator_convert_pad; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] mod video_aggregator_pad; pub const VIDEO_ENCODER_FLOW_NEED_DATA: gst::FlowSuccess = gst::FlowSuccess::CustomSuccess; @@ -142,14 +142,14 @@ pub mod prelude { #[doc(hidden)] pub use gst_base::prelude::*; - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub use crate::video_aggregator::VideoAggregatorExtManual; - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub use crate::video_aggregator_convert_pad::VideoAggregatorConvertPadExtManual; - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub use crate::video_aggregator_pad::VideoAggregatorPadExtManual; pub use crate::{ auto::traits::*, video_buffer_pool::VideoBufferPoolConfig, diff --git a/gstreamer-video/src/subclass/mod.rs b/gstreamer-video/src/subclass/mod.rs index fa5003ecc..50046723d 100644 --- a/gstreamer-video/src/subclass/mod.rs +++ b/gstreamer-video/src/subclass/mod.rs @@ -3,36 +3,36 @@ #![allow(clippy::cast_ptr_alignment)] mod navigation; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] mod video_aggregator; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] mod video_aggregator_convert_pad; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] mod video_aggregator_pad; mod video_decoder; mod video_encoder; mod video_filter; mod video_sink; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub use video_aggregator::AggregateFramesToken; pub mod prelude { #[doc(hidden)] pub use gst_base::subclass::prelude::*; - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub use super::video_aggregator::{VideoAggregatorImpl, VideoAggregatorImplExt}; - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub use super::video_aggregator_convert_pad::VideoAggregatorConvertPadImpl; - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub use super::video_aggregator_pad::{VideoAggregatorPadImpl, VideoAggregatorPadImplExt}; pub use super::{ navigation::NavigationImpl, diff --git a/gstreamer-video/src/subclass/navigation.rs b/gstreamer-video/src/subclass/navigation.rs index 52bad573b..7a23aa485 100644 --- a/gstreamer-video/src/subclass/navigation.rs +++ b/gstreamer-video/src/subclass/navigation.rs @@ -7,8 +7,8 @@ use crate::Navigation; pub trait NavigationImpl: ObjectImpl { fn send_event(&self, structure: gst::Structure); - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] fn send_event_simple(&self, event: gst::Event) { if let Some(structure) = event.structure() { self.send_event(structure.to_owned()); @@ -19,8 +19,8 @@ pub trait NavigationImpl: ObjectImpl { pub trait NavigationImplExt: ObjectSubclass { fn parent_send_event(&self, structure: gst::Structure); - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] fn parent_send_event_simple(&self, event: gst::Event) { if let Some(structure) = event.structure() { self.parent_send_event(structure.to_owned()); @@ -47,8 +47,8 @@ impl NavigationImplExt for T { } } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] fn parent_send_event_simple(&self, event: gst::Event) { unsafe { let type_data = Self::type_data(); @@ -69,15 +69,15 @@ impl NavigationImplExt for T { } unsafe impl IsImplementable for Navigation { - #[cfg(not(any(feature = "v1_22", feature = "dox")))] + #[cfg(not(any(feature = "v1_22", docsrs)))] fn interface_init(iface: &mut glib::Interface) { let iface = iface.as_mut(); iface.send_event = Some(navigation_send_event::); } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] fn interface_init(iface: &mut glib::Interface) { let iface = iface.as_mut(); @@ -96,8 +96,8 @@ unsafe extern "C" fn navigation_send_event( imp.send_event(from_glib_full(structure)); } -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] unsafe extern "C" fn navigation_send_event_simple( nav: *mut ffi::GstNavigation, event: *mut gst::ffi::GstEvent, diff --git a/gstreamer-video/src/subclass/video_decoder.rs b/gstreamer-video/src/subclass/video_decoder.rs index 2935d3801..8206b0d3e 100644 --- a/gstreamer-video/src/subclass/video_decoder.rs +++ b/gstreamer-video/src/subclass/video_decoder.rs @@ -96,8 +96,8 @@ pub trait VideoDecoderImpl: VideoDecoderImplExt + ElementImpl { self.parent_decide_allocation(query) } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] fn handle_missing_data( &self, timestamp: gst::ClockTime, @@ -161,8 +161,8 @@ pub trait VideoDecoderImplExt: ObjectSubclass { query: &mut gst::query::Allocation, ) -> Result<(), gst::LoggableError>; - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] fn parent_handle_missing_data( &self, timestamp: gst::ClockTime, @@ -560,8 +560,8 @@ impl VideoDecoderImplExt for T { } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] fn parent_handle_missing_data( &self, timestamp: gst::ClockTime, @@ -609,7 +609,7 @@ unsafe impl IsSubclassable for VideoDecoder { klass.src_query = Some(video_decoder_src_query::); klass.propose_allocation = Some(video_decoder_propose_allocation::); klass.decide_allocation = Some(video_decoder_decide_allocation::); - #[cfg(any(feature = "v1_20", feature = "dox"))] + #[cfg(feature = "v1_20")] { klass.handle_missing_data = Some(video_decoder_handle_missing_data::); } @@ -901,7 +901,7 @@ unsafe extern "C" fn video_decoder_decide_allocation( .into_glib() } -#[cfg(any(feature = "v1_20", feature = "dox"))] +#[cfg(feature = "v1_20")] unsafe extern "C" fn video_decoder_handle_missing_data( ptr: *mut ffi::GstVideoDecoder, timestamp: gst::ffi::GstClockTime, diff --git a/gstreamer-video/src/video_codec_frame.rs b/gstreamer-video/src/video_codec_frame.rs index 83960ccc5..26ac0911c 100644 --- a/gstreamer-video/src/video_codec_frame.rs +++ b/gstreamer-video/src/video_codec_frame.rs @@ -218,16 +218,16 @@ impl<'a> VideoCodecFrame<'a> { unsafe { from_glib((*self.to_glib_none().0).deadline) } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_video_decoder_get_processed_subframe_index")] #[inline] pub fn subframes_processed(&self) -> u32 { unsafe { (*self.to_glib_none().0).abidata.ABI.subframes_processed } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_video_decoder_get_input_subframe_index")] #[inline] pub fn num_subframes(&self) -> u32 { diff --git a/gstreamer-video/src/video_converter.rs b/gstreamer-video/src/video_converter.rs index 685b95a2b..ec475dd8f 100644 --- a/gstreamer-video/src/video_converter.rs +++ b/gstreamer-video/src/video_converter.rs @@ -72,16 +72,16 @@ impl VideoConverter { } } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[doc(alias = "get_in_info")] #[doc(alias = "gst_video_converter_get_in_info")] pub fn in_info(&self) -> crate::VideoInfo { unsafe { from_glib_none(ffi::gst_video_converter_get_in_info(self.0.as_ptr())) } } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[doc(alias = "get_out_info")] #[doc(alias = "gst_video_converter_get_out_info")] pub fn out_info(&self) -> crate::VideoInfo { diff --git a/gstreamer-video/src/video_decoder.rs b/gstreamer-video/src/video_decoder.rs index de54c32a8..480b85d42 100644 --- a/gstreamer-video/src/video_decoder.rs +++ b/gstreamer-video/src/video_decoder.rs @@ -4,8 +4,8 @@ use std::{mem, ptr}; use glib::{prelude::*, translate::*}; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] use crate::VideoInterlaceMode; use crate::{ utils::HasStreamLock, @@ -62,8 +62,8 @@ pub trait VideoDecoderExtManual: 'static { height: u32, reference: Option<&VideoCodecState>, ) -> Result, gst::FlowError>; - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] fn set_interlaced_output_state( &self, fmt: VideoFormat, @@ -246,8 +246,8 @@ impl> VideoDecoderExtManual for O { } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_video_decoder_set_interlaced_output_state")] fn set_interlaced_output_state( &self, diff --git a/gstreamer-video/src/video_encoder.rs b/gstreamer-video/src/video_encoder.rs index 40e6c3b0e..e48b7f9cd 100644 --- a/gstreamer-video/src/video_encoder.rs +++ b/gstreamer-video/src/video_encoder.rs @@ -32,8 +32,8 @@ pub trait VideoEncoderExtManual: 'static { #[doc(alias = "gst_video_encoder_get_allocator")] fn allocator(&self) -> (Option, gst::AllocationParams); - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_video_encoder_finish_subframe")] fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result; @@ -99,8 +99,8 @@ impl> VideoEncoderExtManual for O { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result { unsafe { try_from_glib(ffi::gst_video_encoder_finish_subframe( diff --git a/gstreamer-video/src/video_event.rs b/gstreamer-video/src/video_event.rs index f07919807..37378b9fa 100644 --- a/gstreamer-video/src/video_event.rs +++ b/gstreamer-video/src/video_event.rs @@ -4,8 +4,8 @@ use std::mem; use glib::{translate::*, ToSendValue}; use gst::EventType; -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] use crate::NavigationModifierType; use crate::{NavigationCommand, NavigationEventType}; @@ -365,8 +365,8 @@ macro_rules! nav_event_builder { running_time_offset: Option, other_fields: Vec<(&'a str, &'a (dyn ToSendValue + Sync))>, $($field_names: $field_types,)* - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType, $($event_field: $event_type,)? } @@ -379,8 +379,8 @@ macro_rules! nav_event_builder { running_time_offset: None, other_fields: Vec::new(), $($field_names: <$field_types>::default(),)* - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType::empty(), $($event_field,)? } @@ -390,8 +390,8 @@ macro_rules! nav_event_builder { Self { $field_names, ..self } })* - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] pub fn modifier_state(self, modifier_state: NavigationModifierType) -> Self { Self { modifier_state, ..self } } @@ -414,14 +414,14 @@ nav_event_builder!( let event = match s.kind { KeyEventType::Press { key } => NavigationEvent::KeyPress { key: key.to_owned(), - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: s.modifier_state, }, KeyEventType::Release { key } => NavigationEvent::KeyRelease { key: key.to_owned(), - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: s.modifier_state, }, }; @@ -437,8 +437,8 @@ pub enum MouseEventType { Release { button: i32, }, - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] Scroll { delta_x: f64, delta_y: f64, @@ -454,35 +454,35 @@ nav_event_builder!( MouseEventType::Move => NavigationEvent::MouseMove { x: s.x, y: s.y, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: s.modifier_state, }, MouseEventType::Press { button } => NavigationEvent::MouseButtonPress { button, x: s.x, y: s.y, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: s.modifier_state, }, MouseEventType::Release { button } => NavigationEvent::MouseButtonRelease { button, x: s.x, y: s.y, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: s.modifier_state, }, - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] MouseEventType::Scroll { delta_x, delta_y } => NavigationEvent::MouseScroll { x: s.x, y: s.y, delta_x, delta_y, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: s.modifier_state, }, }; @@ -496,8 +496,8 @@ pub struct CommandEventBuilder<'a> { running_time_offset: Option, other_fields: Vec<(&'a str, &'a (dyn ToSendValue + Sync))>, command: NavigationCommand, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType, } @@ -509,14 +509,14 @@ impl<'a> CommandEventBuilder<'a> { running_time_offset: None, other_fields: Vec::new(), command, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType::empty(), } } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] pub fn modifier_state(self, modifier_state: NavigationModifierType) -> Self { Self { modifier_state, @@ -527,24 +527,24 @@ impl<'a> CommandEventBuilder<'a> { event_builder_generic_impl!(|s: &mut Self| { let event = NavigationEvent::Command { command: s.command, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: s.modifier_state, }; gst::ffi::gst_event_new_navigation(event.structure().into_glib_ptr()) }); } -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] pub enum TouchEventType { Down { pressure: f64 }, Motion { pressure: f64 }, Up, } -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] nav_event_builder!( TouchEventBuilder, kind: TouchEventType, @@ -576,15 +576,15 @@ nav_event_builder!( } ); -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] pub enum TouchMetaEventType { Frame, Cancel, } -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] nav_event_builder!( TouchMetaEventBuilder, kind: TouchMetaEventType, @@ -609,58 +609,58 @@ const NAVIGATION_EVENT_NAME: &str = "application/x-gst-navigation"; pub enum NavigationEvent { KeyPress { key: String, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType, }, KeyRelease { key: String, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType, }, MouseMove { x: f64, y: f64, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType, }, MouseButtonPress { button: i32, x: f64, y: f64, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType, }, MouseButtonRelease { button: i32, x: f64, y: f64, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType, }, Command { command: NavigationCommand, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType, }, - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] MouseScroll { x: f64, y: f64, delta_x: f64, delta_y: f64, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType, }, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] TouchDown { identifier: u32, x: f64, @@ -668,8 +668,8 @@ pub enum NavigationEvent { pressure: f64, modifier_state: NavigationModifierType, }, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] TouchMotion { identifier: u32, x: f64, @@ -677,21 +677,21 @@ pub enum NavigationEvent { pressure: f64, modifier_state: NavigationModifierType, }, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] TouchUp { identifier: u32, x: f64, y: f64, modifier_state: NavigationModifierType, }, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] TouchFrame { modifier_state: NavigationModifierType, }, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] TouchCancel { modifier_state: NavigationModifierType, }, @@ -703,8 +703,8 @@ impl NavigationEvent { assert_initialized_main_thread!(); Self::KeyPress { key: key.to_string(), - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType::empty(), } } @@ -714,8 +714,8 @@ impl NavigationEvent { assert_initialized_main_thread!(); Self::KeyRelease { key: key.to_string(), - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType::empty(), } } @@ -726,8 +726,8 @@ impl NavigationEvent { Self::MouseMove { x, y, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType::empty(), } } @@ -739,8 +739,8 @@ impl NavigationEvent { button, x, y, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType::empty(), } } @@ -752,14 +752,14 @@ impl NavigationEvent { button, x, y, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType::empty(), } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_navigation_event_new_mouse_scroll")] pub fn new_mouse_scroll(x: f64, y: f64, delta_x: f64, delta_y: f64) -> NavigationEvent { assert_initialized_main_thread!(); @@ -768,8 +768,8 @@ impl NavigationEvent { y, delta_x, delta_y, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType::empty(), } } @@ -779,14 +779,14 @@ impl NavigationEvent { assert_initialized_main_thread!(); Self::Command { command, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType::empty(), } } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[doc(alias = "gst_navigation_event_new_touch_down")] pub fn new_touch_down(identifier: u32, x: f64, y: f64, pressure: f64) -> NavigationEvent { assert_initialized_main_thread!(); @@ -795,14 +795,14 @@ impl NavigationEvent { x, y, pressure, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType::empty(), } } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[doc(alias = "gst_navigation_event_new_touch_motion")] pub fn new_touch_motion(identifier: u32, x: f64, y: f64, pressure: f64) -> NavigationEvent { assert_initialized_main_thread!(); @@ -811,14 +811,14 @@ impl NavigationEvent { x, y, pressure, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType::empty(), } } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[doc(alias = "gst_navigation_event_new_touch_up")] pub fn new_touch_up(identifier: u32, x: f64, y: f64) -> NavigationEvent { assert_initialized_main_thread!(); @@ -826,32 +826,32 @@ impl NavigationEvent { identifier, x, y, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType::empty(), } } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[doc(alias = "gst_navigation_event_new_touch_frame")] pub fn new_touch_frame() -> NavigationEvent { assert_initialized_main_thread!(); Self::TouchFrame { - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType::empty(), } } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[doc(alias = "gst_navigation_event_new_touch_cancel")] pub fn new_touch_cancel() -> NavigationEvent { assert_initialized_main_thread!(); Self::TouchCancel { - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state: NavigationModifierType::empty(), } } @@ -885,8 +885,8 @@ impl NavigationEvent { .y(y) } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] pub fn mouse_scroll_builder( x: f64, y: f64, @@ -904,8 +904,8 @@ impl NavigationEvent { CommandEventBuilder::new(command) } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] pub fn touch_down_builder( identifier: u32, x: f64, @@ -919,8 +919,8 @@ impl NavigationEvent { .y(y) } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] pub fn touch_motion_builder( identifier: u32, x: f64, @@ -934,8 +934,8 @@ impl NavigationEvent { .y(y) } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] pub fn touch_up_builder(identifier: u32, x: f64, y: f64) -> TouchEventBuilder<'static> { assert_initialized_main_thread!(); TouchEventBuilder::new(TouchEventType::Up) @@ -944,15 +944,15 @@ impl NavigationEvent { .y(y) } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] pub fn touch_frame_builder() -> TouchMetaEventBuilder<'static> { assert_initialized_main_thread!(); TouchMetaEventBuilder::new(TouchMetaEventType::Frame) } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] pub fn touch_cancel_builder() -> TouchMetaEventBuilder<'static> { assert_initialized_main_thread!(); TouchMetaEventBuilder::new(TouchMetaEventType::Cancel) @@ -984,8 +984,8 @@ impl NavigationEvent { return Err(glib::bool_error!("Invalid navigation event")); } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] let modifier_state = structure .get("state") .unwrap_or(NavigationModifierType::empty()); @@ -997,8 +997,8 @@ impl NavigationEvent { y: structure .get("pointer_y") .map_err(|_| glib::bool_error!("Invalid mouse event"))?, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state, }, NavigationEventType::MouseButtonPress => NavigationEvent::MouseButtonPress { @@ -1011,8 +1011,8 @@ impl NavigationEvent { y: structure .get("pointer_y") .map_err(|_| glib::bool_error!("Invalid mouse event"))?, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state, }, NavigationEventType::MouseButtonRelease => NavigationEvent::MouseButtonRelease { @@ -1025,12 +1025,12 @@ impl NavigationEvent { y: structure .get("pointer_y") .map_err(|_| glib::bool_error!("Invalid mouse event"))?, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state, }, - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] NavigationEventType::MouseScroll => NavigationEvent::MouseScroll { x: structure .get("pointer_x") @@ -1044,36 +1044,36 @@ impl NavigationEvent { delta_y: structure .get("delta_pointer_y") .map_err(|_| glib::bool_error!("Invalid mouse event"))?, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state, }, NavigationEventType::KeyPress => NavigationEvent::KeyPress { key: structure .get("key") .map_err(|_| glib::bool_error!("Invalid key press event"))?, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state, }, NavigationEventType::KeyRelease => NavigationEvent::KeyRelease { key: structure .get("key") .map_err(|_| glib::bool_error!("Invalid key press event"))?, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state, }, NavigationEventType::Command => NavigationEvent::Command { command: structure .get("command-code") .map_err(|_| glib::bool_error!("Invalid key press event"))?, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] modifier_state, }, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] NavigationEventType::TouchDown => NavigationEvent::TouchDown { identifier: structure .get("identifier") @@ -1089,8 +1089,8 @@ impl NavigationEvent { .map_err(|_| glib::bool_error!("Invalid touch event"))?, modifier_state, }, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] NavigationEventType::TouchMotion => NavigationEvent::TouchMotion { identifier: structure .get("identifier") @@ -1106,8 +1106,8 @@ impl NavigationEvent { .map_err(|_| glib::bool_error!("Invalid touch event"))?, modifier_state, }, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] NavigationEventType::TouchUp => NavigationEvent::TouchUp { identifier: structure .get("identifier") @@ -1120,11 +1120,11 @@ impl NavigationEvent { .map_err(|_| glib::bool_error!("Invalid touch event"))?, modifier_state, }, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] NavigationEventType::TouchFrame => NavigationEvent::TouchFrame { modifier_state }, - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] NavigationEventType::TouchCancel => NavigationEvent::TouchCancel { modifier_state }, NavigationEventType::Invalid | NavigationEventType::__Unknown(_) => { return Err(glib::bool_error!("Invalid navigation event")) @@ -1155,8 +1155,8 @@ impl NavigationEvent { .field("pointer_x", x) .field("pointer_y", y) } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] Self::MouseScroll { x, y, @@ -1178,8 +1178,8 @@ impl NavigationEvent { Self::Command { command, .. } => gst::Structure::builder(NAVIGATION_EVENT_NAME) .field("event", "command") .field("command-code", command), - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] Self::TouchDown { identifier, x, @@ -1192,8 +1192,8 @@ impl NavigationEvent { .field("pointer_x", x) .field("pointer_y", y) .field("pressure", pressure), - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] Self::TouchMotion { identifier, x, @@ -1206,8 +1206,8 @@ impl NavigationEvent { .field("pointer_x", x) .field("pointer_y", y) .field("pressure", pressure), - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] Self::TouchUp { identifier, x, y, .. } => gst::Structure::builder(NAVIGATION_EVENT_NAME) @@ -1215,19 +1215,19 @@ impl NavigationEvent { .field("identifier", identifier) .field("pointer_x", x) .field("pointer_y", y), - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] Self::TouchFrame { .. } => { gst::Structure::builder(NAVIGATION_EVENT_NAME).field("event", "touch-frame") } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] Self::TouchCancel { .. } => { gst::Structure::builder(NAVIGATION_EVENT_NAME).field("event", "touch-cancel") } }; - #[cfg(any(feature = "v1_22", feature = "dox"))] + #[cfg(feature = "v1_22")] if true { structure = match self { Self::MouseMove { modifier_state, .. } => structure.field("state", modifier_state), @@ -1269,8 +1269,8 @@ impl NavigationEvent { mod tests { #[test] #[cfg(feature = "serde")] - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] fn serialize_navigation_events() { use crate::{NavigationEvent, NavigationModifierType}; diff --git a/gstreamer-video/src/video_format_info.rs b/gstreamer-video/src/video_format_info.rs index 6192cebb4..1eed376e4 100644 --- a/gstreamer-video/src/video_format_info.rs +++ b/gstreamer-video/src/video_format_info.rs @@ -133,8 +133,8 @@ impl VideoFormatInfo { self.0.flags & ffi::GST_VIDEO_FORMAT_FLAG_PALETTE != 0 } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[inline] pub fn has_subtiles(&self) -> bool { self.0.flags & ffi::GST_VIDEO_FORMAT_FLAG_SUBTILES != 0 @@ -347,8 +347,8 @@ impl VideoFormatInfo { (offset, scale) } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[doc(alias = "gst_video_format_info_extrapolate_stride")] pub fn extrapolate_stride(&self, plane: u32, stride: u32) -> u32 { assert!(plane < self.n_planes()); @@ -362,8 +362,8 @@ impl VideoFormatInfo { } } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] pub fn tile_info(&self, plane: u32) -> &VideoTileInfo { assert!(plane < self.n_planes()); @@ -498,7 +498,7 @@ impl fmt::Debug for VideoFormatInfo { .field("tile-ws", &self.tile_ws()) .field("tile-hs", &self.tile_hs()); - #[cfg(any(feature = "v1_22", feature = "dox"))] + #[cfg(feature = "v1_22")] { fmt.field( "tile-info", @@ -572,14 +572,14 @@ impl glib::translate::FromGlibPtrNone<*const ffi::GstVideoFormatInfo> for VideoF } } -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[repr(transparent)] #[doc(alias = "GstVideoTileInfo")] pub struct VideoTileInfo(ffi::GstVideoTileInfo); -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] impl fmt::Debug for VideoTileInfo { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("VideoTileInfo") @@ -591,8 +591,8 @@ impl fmt::Debug for VideoTileInfo { } } -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] impl VideoTileInfo { #[inline] pub fn width(&self) -> u32 { diff --git a/gstreamer-video/src/video_info.rs b/gstreamer-video/src/video_info.rs index d09d225fd..7de7fa104 100644 --- a/gstreamer-video/src/video_info.rs +++ b/gstreamer-video/src/video_info.rs @@ -134,8 +134,8 @@ impl VideoColorimetry { unsafe { from_glib(self.0.primaries) } } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, 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 { @@ -621,8 +621,8 @@ impl VideoInfo { self.0.height as u32 } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[inline] pub fn field_height(&self) -> u32 { if self.0.interlace_mode == ffi::GST_VIDEO_INTERLACE_MODE_ALTERNATE { @@ -713,8 +713,8 @@ impl VideoInfo { gst::Fraction::new(self.0.fps_n, self.0.fps_d) } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[inline] pub fn field_rate(&self) -> gst::Fraction { if self.interlace_mode() == crate::VideoInterlaceMode::Alternate { @@ -850,8 +850,8 @@ impl VideoInfo { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_video_info_align_full")] pub fn align_full( &mut self, diff --git a/gstreamer-video/src/video_meta.rs b/gstreamer-video/src/video_meta.rs index e1634f223..c62c068dc 100644 --- a/gstreamer-video/src/video_meta.rs +++ b/gstreamer-video/src/video_meta.rs @@ -159,8 +159,8 @@ impl VideoMeta { &self.0.stride[0..(self.0.n_planes as usize)] } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "get_alignment")] #[inline] pub fn alignment(&self) -> crate::VideoAlignment { @@ -173,8 +173,8 @@ impl VideoMeta { ) } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "get_plane_size")] #[doc(alias = "gst_video_meta_get_plane_size")] pub fn plane_size(&self) -> Result<[usize; crate::VIDEO_MAX_PLANES], glib::BoolError> { @@ -193,8 +193,8 @@ impl VideoMeta { Ok(plane_size) } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "get_plane_height")] #[doc(alias = "gst_video_meta_get_plane_height")] pub fn plane_height(&self) -> Result<[u32; crate::VIDEO_MAX_PLANES], glib::BoolError> { @@ -213,8 +213,8 @@ impl VideoMeta { Ok(plane_height) } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_video_meta_set_alignment")] pub fn set_alignment( &mut self, @@ -599,21 +599,21 @@ impl fmt::Debug for VideoOverlayCompositionMeta { } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[repr(transparent)] #[doc(alias = "GstVideoCaptionMeta")] pub struct VideoCaptionMeta(ffi::GstVideoCaptionMeta); -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] unsafe impl Send for VideoCaptionMeta {} -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] unsafe impl Sync for VideoCaptionMeta {} -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl VideoCaptionMeta { #[doc(alias = "gst_buffer_add_video_caption_meta")] pub fn add<'a>( @@ -655,8 +655,8 @@ impl VideoCaptionMeta { } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] unsafe impl MetaAPI for VideoCaptionMeta { type GstType = ffi::GstVideoCaptionMeta; @@ -667,8 +667,8 @@ unsafe impl MetaAPI for VideoCaptionMeta { } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl fmt::Debug for VideoCaptionMeta { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("VideoCaptionMeta") @@ -678,21 +678,21 @@ impl fmt::Debug for VideoCaptionMeta { } } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[repr(transparent)] #[doc(alias = "GstVideoAFDMeta")] pub struct VideoAFDMeta(ffi::GstVideoAFDMeta); -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] unsafe impl Send for VideoAFDMeta {} -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] unsafe impl Sync for VideoAFDMeta {} -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl VideoAFDMeta { #[doc(alias = "gst_buffer_add_video_afd_meta")] pub fn add( @@ -734,8 +734,8 @@ impl VideoAFDMeta { } } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] unsafe impl MetaAPI for VideoAFDMeta { type GstType = ffi::GstVideoAFDMeta; @@ -746,8 +746,8 @@ unsafe impl MetaAPI for VideoAFDMeta { } } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl fmt::Debug for VideoAFDMeta { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("VideoAFDMeta") @@ -758,21 +758,21 @@ impl fmt::Debug for VideoAFDMeta { } } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[repr(transparent)] #[doc(alias = "GstVideoBarMeta")] pub struct VideoBarMeta(ffi::GstVideoBarMeta); -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] unsafe impl Send for VideoBarMeta {} -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] unsafe impl Sync for VideoBarMeta {} -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl VideoBarMeta { #[doc(alias = "gst_buffer_add_video_bar_meta")] pub fn add( @@ -821,8 +821,8 @@ impl VideoBarMeta { } } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] unsafe impl MetaAPI for VideoBarMeta { type GstType = ffi::GstVideoBarMeta; @@ -833,8 +833,8 @@ unsafe impl MetaAPI for VideoBarMeta { } } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl fmt::Debug for VideoBarMeta { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("VideoBarMeta") @@ -846,21 +846,21 @@ impl fmt::Debug for VideoBarMeta { } } -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[repr(transparent)] #[doc(alias = "GstVideoCodecAlphaMeta")] pub struct VideoCodecAlphaMeta(ffi::GstVideoCodecAlphaMeta); -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] unsafe impl Send for VideoCodecAlphaMeta {} -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] unsafe impl Sync for VideoCodecAlphaMeta {} -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl VideoCodecAlphaMeta { #[doc(alias = "gst_buffer_add_video_codec_alpha_meta")] pub fn add( @@ -889,8 +889,8 @@ impl VideoCodecAlphaMeta { } } -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] unsafe impl MetaAPI for VideoCodecAlphaMeta { type GstType = ffi::GstVideoCodecAlphaMeta; @@ -901,8 +901,8 @@ unsafe impl MetaAPI for VideoCodecAlphaMeta { } } -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl fmt::Debug for VideoCodecAlphaMeta { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("VideoCodecAlphaMeta") diff --git a/gstreamer-video/src/video_overlay_composition.rs b/gstreamer-video/src/video_overlay_composition.rs index eb5c9346f..8543dc1f9 100644 --- a/gstreamer-video/src/video_overlay_composition.rs +++ b/gstreamer-video/src/video_overlay_composition.rs @@ -262,7 +262,7 @@ impl VideoOverlayComposition { } } -#[cfg(any(feature = "v1_20", feature = "dox"))] +#[cfg(feature = "v1_20")] impl Default for VideoOverlayComposition { fn default() -> Self { assert_initialized_main_thread!(); @@ -361,7 +361,7 @@ impl<'a> From<&'a VideoOverlayRectangle> for VideoOverlayComposition { } } -#[cfg(any(feature = "v1_20", feature = "dox"))] +#[cfg(feature = "v1_20")] impl From<[VideoOverlayRectangle; N]> for VideoOverlayComposition { fn from(value: [VideoOverlayRectangle; N]) -> Self { assert_initialized_main_thread!(); @@ -384,7 +384,7 @@ impl From<[VideoOverlayRectangle; N]> for VideoOverlayCompositio } } -#[cfg(any(feature = "v1_20", feature = "dox"))] +#[cfg(feature = "v1_20")] impl<'a, const N: usize> From<[&'a VideoOverlayRectangle; N]> for VideoOverlayComposition { fn from(value: [&'a VideoOverlayRectangle; N]) -> Self { assert_initialized_main_thread!(); @@ -407,7 +407,7 @@ impl<'a, const N: usize> From<[&'a VideoOverlayRectangle; N]> for VideoOverlayCo } } -#[cfg(any(feature = "v1_20", feature = "dox"))] +#[cfg(feature = "v1_20")] impl std::iter::FromIterator for VideoOverlayComposition { fn from_iter>(iter: T) -> Self { assert_initialized_main_thread!(); @@ -430,7 +430,7 @@ impl std::iter::FromIterator for VideoOverlayComposition } } -#[cfg(any(feature = "v1_20", feature = "dox"))] +#[cfg(feature = "v1_20")] impl<'a> std::iter::FromIterator<&'a VideoOverlayRectangle> for VideoOverlayComposition { fn from_iter>(iter: T) -> Self { assert_initialized_main_thread!(); diff --git a/gstreamer-video/src/video_time_code.rs b/gstreamer-video/src/video_time_code.rs index d9e3f340e..2ded8ddaf 100644 --- a/gstreamer-video/src/video_time_code.rs +++ b/gstreamer-video/src/video_time_code.rs @@ -97,8 +97,8 @@ impl VideoTimeCode { } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_video_time_code_init_from_date_time_full")] pub fn from_date_time( fps: gst::Fraction, @@ -220,7 +220,7 @@ impl ValidVideoTimeCode { } } - // #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + // #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] // pub fn from_date_time( // fps: gst::Fraction, // dt: &glib::DateTime, diff --git a/gstreamer-video/sys/Cargo.toml b/gstreamer-video/sys/Cargo.toml index 8f0d531d0..71ea65f2f 100644 --- a/gstreamer-video/sys/Cargo.toml +++ b/gstreamer-video/sys/Cargo.toml @@ -30,7 +30,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gobject/dox", "gst/dox", "gst_base/dox"] [lib] name = "gstreamer_video_sys" diff --git a/gstreamer-webrtc/Cargo.toml b/gstreamer-webrtc/Cargo.toml index 1879e14a7..0d44d9844 100644 --- a/gstreamer-webrtc/Cargo.toml +++ b/gstreamer-webrtc/Cargo.toml @@ -31,7 +31,6 @@ v1_18 = ["gst/v1_18", "gst-sdp/v1_18", "ffi/v1_18", "v1_16"] v1_20 = ["gst/v1_20", "gst-sdp/v1_20", "ffi/v1_20", "v1_18"] v1_22 = ["gst/v1_22", "gst-sdp/v1_22", "ffi/v1_22", "v1_20"] v1_24 = ["gst/v1_24", "gst-sdp/v1_24", "ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "gst/dox", "gst-sdp/dox"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer-webrtc/src/lib.rs b/gstreamer-webrtc/src/lib.rs index 69d74360c..e6e62ba68 100644 --- a/gstreamer-webrtc/src/lib.rs +++ b/gstreamer-webrtc/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![doc = include_str!("../README.md")] @@ -18,19 +18,19 @@ macro_rules! skip_assert_initialized { mod auto; pub use crate::auto::*; -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] mod web_rtc_ice_candidate_stats; mod web_rtc_session_description; -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] mod web_rtcice; // Re-export all the traits in a prelude module, so that applications // can always "use gst_webrtc::prelude::*" without getting conflicts pub mod prelude { - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] pub use crate::web_rtcice::WebRTCICEExtManual; #[doc(hidden)] pub use gst_sdp::prelude::*; diff --git a/gstreamer-webrtc/src/web_rtcice.rs b/gstreamer-webrtc/src/web_rtcice.rs index 70d393b31..4e7381047 100644 --- a/gstreamer-webrtc/src/web_rtcice.rs +++ b/gstreamer-webrtc/src/web_rtcice.rs @@ -8,8 +8,8 @@ pub trait WebRTCICEExtManual: 'static { #[doc(alias = "gst_webrtc_ice_add_candidate")] fn add_candidate(&self, stream: &impl IsA, candidate: &str); - #[cfg(any(feature = "v1_24", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_24")))] + #[cfg(feature = "v1_24")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] #[doc(alias = "gst_webrtc_ice_add_candidate")] fn add_candidate_full( &self, @@ -59,8 +59,8 @@ impl> WebRTCICEExtManual for O { } } - #[cfg(any(feature = "v1_24", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_24")))] + #[cfg(feature = "v1_24")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] fn add_candidate_full( &self, stream: &impl IsA, diff --git a/gstreamer-webrtc/sys/Cargo.toml b/gstreamer-webrtc/sys/Cargo.toml index 28062a91a..ea9cc86fb 100644 --- a/gstreamer-webrtc/sys/Cargo.toml +++ b/gstreamer-webrtc/sys/Cargo.toml @@ -27,7 +27,6 @@ v1_18 = ["v1_16"] v1_20 = ["v1_18"] v1_22 = ["v1_20"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gst_sdp/dox"] [lib] name = "gstreamer_webrtc_sys" diff --git a/gstreamer/Cargo.toml b/gstreamer/Cargo.toml index d35309b68..89399825a 100644 --- a/gstreamer/Cargo.toml +++ b/gstreamer/Cargo.toml @@ -48,8 +48,7 @@ v1_18 = ["ffi/v1_18", "v1_16"] v1_20 = ["ffi/v1_20", "v1_18"] v1_22 = ["ffi/v1_22", "v1_20"] v1_24 = ["ffi/v1_24", "v1_22"] -dox = ["ffi/dox", "glib/dox", "serde"] serde = ["num-rational/serde", "dep:serde", "serde_bytes"] [package.metadata.docs.rs] -features = ["dox"] +rustdoc-args = ["--cfg", "docsrs"] diff --git a/gstreamer/src/bin.rs b/gstreamer/src/bin.rs index 809369524..c4d122b96 100644 --- a/gstreamer/src/bin.rs +++ b/gstreamer/src/bin.rs @@ -40,8 +40,8 @@ pub trait GstBinExtManual: 'static { f: F, ) -> SignalHandlerId; - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_bin_iterate_all_by_element_factory_name")] fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> crate::Iterator; #[doc(alias = "gst_bin_iterate_all_by_interface")] @@ -137,8 +137,8 @@ impl> GstBinExtManual for O { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> crate::Iterator { unsafe { from_glib_full(ffi::gst_bin_iterate_all_by_element_factory_name( diff --git a/gstreamer/src/bus_unix.rs b/gstreamer/src/bus_unix.rs index 4c95a81df..9f225bd18 100644 --- a/gstreamer/src/bus_unix.rs +++ b/gstreamer/src/bus_unix.rs @@ -6,7 +6,7 @@ cfg_if::cfg_if! { use std::mem; use std::os::unix; - } else if #[cfg(feature = "dox")] { + } else if #[cfg(docsrs)] { // Declare a fake RawFd for doc generation on windows pub mod unix { pub mod io { @@ -34,7 +34,7 @@ impl UnixBusExtManual for Bus { pollfd.fd } - #[cfg(all(not(unix), feature = "dox"))] + #[cfg(all(not(unix), docsrs))] unix::io::RawFd {} } } diff --git a/gstreamer/src/bus_windows.rs b/gstreamer/src/bus_windows.rs index 5a45cdcc7..7cd98050c 100644 --- a/gstreamer/src/bus_windows.rs +++ b/gstreamer/src/bus_windows.rs @@ -6,7 +6,7 @@ cfg_if::cfg_if! { use std::mem; use std::os::windows; - } else if #[cfg(feature = "dox")] { + } else if #[cfg(docsrs)] { // Declare a fake RawHandle for doc generation on unix pub mod windows { pub mod io { @@ -34,7 +34,7 @@ impl WindowsBusExtManual for Bus { pollfd.fd as *mut _ } - #[cfg(all(not(windows), feature = "dox"))] + #[cfg(all(not(windows), docsrs))] windows::io::RawHandle {} } } diff --git a/gstreamer/src/caps.rs b/gstreamer/src/caps.rs index 028c39d12..01c8b5f9e 100644 --- a/gstreamer/src/caps.rs +++ b/gstreamer/src/caps.rs @@ -421,8 +421,8 @@ impl CapsRef { } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_caps_set_features_simple")] pub fn set_features_simple(&mut self, features: Option) { unsafe { @@ -591,8 +591,8 @@ impl CapsRef { } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_caps_serialize")] pub fn serialize(&self, flags: crate::SerializeFlags) -> glib::GString { unsafe { from_glib_full(ffi::gst_caps_serialize(&self.0, flags.into_glib())) } diff --git a/gstreamer/src/clock.rs b/gstreamer/src/clock.rs index 4ecc52f3c..28f7fc249 100644 --- a/gstreamer/src/clock.rs +++ b/gstreamer/src/clock.rs @@ -64,16 +64,16 @@ impl ClockId { } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "get_clock")] #[doc(alias = "gst_clock_id_get_clock")] pub fn clock(&self) -> Option { unsafe { from_glib_full(ffi::gst_clock_id_get_clock(self.to_glib_none().0)) } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_clock_id_uses_clock")] pub fn uses_clock>(&self, clock: &P) -> bool { unsafe { diff --git a/gstreamer/src/event.rs b/gstreamer/src/event.rs index 5700d6aa0..779d43102 100644 --- a/gstreamer/src/event.rs +++ b/gstreamer/src/event.rs @@ -258,7 +258,7 @@ impl EventRef { ffi::GST_EVENT_PROTECTION => Protection::view(self), ffi::GST_EVENT_SEGMENT_DONE => SegmentDone::view(self), ffi::GST_EVENT_GAP => Gap::view(self), - #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg(feature = "v1_18")] ffi::GST_EVENT_INSTANT_RATE_CHANGE => InstantRateChange::view(self), ffi::GST_EVENT_QOS => Qos::view(self), ffi::GST_EVENT_SEEK => Seek::view(self), @@ -268,7 +268,7 @@ impl EventRef { ffi::GST_EVENT_RECONFIGURE => Reconfigure::view(self), ffi::GST_EVENT_TOC_SELECT => TocSelect::view(self), ffi::GST_EVENT_SELECT_STREAMS => SelectStreams::view(self), - #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg(feature = "v1_18")] ffi::GST_EVENT_INSTANT_RATE_SYNC_TIME => InstantRateSyncTime::view(self), ffi::GST_EVENT_CUSTOM_UPSTREAM => CustomUpstream::view(self), ffi::GST_EVENT_CUSTOM_DOWNSTREAM => CustomDownstream::view(self), @@ -323,8 +323,8 @@ pub enum EventView<'a> { Protection(&'a Protection), SegmentDone(&'a SegmentDone), Gap(&'a Gap), - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] InstantRateChange(&'a InstantRateChange), Qos(&'a Qos), Seek(&'a Seek), @@ -334,8 +334,8 @@ pub enum EventView<'a> { Reconfigure(&'a Reconfigure), TocSelect(&'a TocSelect), SelectStreams(&'a SelectStreams), - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] InstantRateSyncTime(&'a InstantRateSyncTime), CustomUpstream(&'a CustomUpstream), CustomDownstream(&'a CustomDownstream), @@ -953,8 +953,8 @@ impl Gap { } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_event_parse_gap_flags")] pub fn gap_flags(&self) -> crate::GapFlags { unsafe { @@ -965,11 +965,11 @@ impl Gap { } } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] declare_concrete_event!(@sticky InstantRateChange, T); -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl InstantRateChange { #[doc(alias = "gst_event_new_instant_rate_change")] #[allow(clippy::new_ret_no_self)] @@ -987,8 +987,8 @@ impl InstantRateChange { } } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl InstantRateChange { #[doc(alias = "gst_event_parse_instant_rate_change")] pub fn get(&self) -> (f64, crate::SegmentFlags) { @@ -1137,8 +1137,8 @@ impl Seek { } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "get_trickmode_interval")] #[doc(alias = "gst_event_parse_seek_trickmode_interval")] pub fn trickmode_interval(&self) -> Option { @@ -1323,11 +1323,11 @@ impl SelectStreams { } } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] declare_concrete_event!(InstantRateSyncTime, T); -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl InstantRateSyncTime { #[doc(alias = "gst_event_new_instant_rate_sync_time")] #[allow(clippy::new_ret_no_self)] @@ -1350,8 +1350,8 @@ impl InstantRateSyncTime { } } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl InstantRateSyncTime { #[doc(alias = "parse_instant_rate_sync_time")] #[doc(alias = "gst_event_parse_instant_rate_sync_time")] @@ -1722,8 +1722,8 @@ impl<'a> StreamCollectionBuilder<'a> { }); } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[must_use = "The builder must be built to be used"] pub struct InstantRateSyncTimeBuilder<'a> { builder: EventBuilder<'a>, @@ -1732,8 +1732,8 @@ pub struct InstantRateSyncTimeBuilder<'a> { upstream_running_time: ClockTime, } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl<'a> InstantRateSyncTimeBuilder<'a> { fn new( rate_multiplier: f64, @@ -1949,7 +1949,7 @@ pub struct GapBuilder<'a> { builder: EventBuilder<'a>, timestamp: ClockTime, duration: Option, - #[cfg(any(feature = "v1_20", feature = "dox"))] + #[cfg(feature = "v1_20")] gap_flags: Option, } @@ -1960,13 +1960,13 @@ impl<'a> GapBuilder<'a> { builder: EventBuilder::new(), timestamp, duration: None, - #[cfg(any(feature = "v1_20", feature = "dox"))] + #[cfg(feature = "v1_20")] gap_flags: None, } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] pub fn gap_flags(mut self, flags: crate::GapFlags) -> Self { self.gap_flags = Some(flags); self @@ -1981,7 +1981,7 @@ impl<'a> GapBuilder<'a> { #[allow(clippy::let_and_return)] let ev = ffi::gst_event_new_gap(s.timestamp.into_glib(), s.duration.into_glib()); - #[cfg(any(feature = "v1_20", feature = "dox"))] + #[cfg(feature = "v1_20")] if let Some(ref flags) = s.gap_flags { ffi::gst_event_set_gap_flags(ev, flags.into_glib()); } @@ -1990,8 +1990,8 @@ impl<'a> GapBuilder<'a> { }); } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[must_use = "The builder must be built to be used"] pub struct InstantRateChangeBuilder<'a> { builder: EventBuilder<'a>, @@ -1999,8 +1999,8 @@ pub struct InstantRateChangeBuilder<'a> { new_flags: crate::SegmentFlags, } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl<'a> InstantRateChangeBuilder<'a> { fn new(multiplier: f64, new_flags: crate::SegmentFlags) -> Self { skip_assert_initialized!(); @@ -2104,7 +2104,7 @@ impl<'a> SeekBuilder<'a> { s.stop.value(), ); - #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg(feature = "v1_16")] if let Some(trickmode_interval) = s.trickmode_interval { ffi::gst_event_set_seek_trickmode_interval(ev, trickmode_interval.into_glib()); } diff --git a/gstreamer/src/functions.rs b/gstreamer/src/functions.rs index ac4ef0458..226e76ff2 100644 --- a/gstreamer/src/functions.rs +++ b/gstreamer/src/functions.rs @@ -4,8 +4,8 @@ use std::ptr; use glib::{prelude::*, translate::*}; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] use crate::Tracer; use crate::{ auto::functions::parse_bin_from_description, Bin, Element, Object, ParseContext, ParseFlags, @@ -166,8 +166,8 @@ pub fn calculate_linear_regression( } } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_tracing_get_active_tracers")] pub fn active_tracers() -> glib::List { assert_initialized_main_thread!(); diff --git a/gstreamer/src/gtype.rs b/gstreamer/src/gtype.rs index 288d21392..77ac1edc2 100644 --- a/gstreamer/src/gtype.rs +++ b/gstreamer/src/gtype.rs @@ -5,10 +5,10 @@ use std::ffi::c_void; use glib::translate::*; pub trait PluginApiExt { - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_type_mark_as_plugin_api")] fn mark_as_plugin_api(self, flags: crate::PluginAPIFlags); - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_type_is_plugin_api")] fn plugin_api_flags(self) -> Option; #[doc(alias = "gst_element_type_set_skip_documentation")] diff --git a/gstreamer/src/lib.rs b/gstreamer/src/lib.rs index 3c61c0e7d..94cb459b1 100644 --- a/gstreamer/src/lib.rs +++ b/gstreamer/src/lib.rs @@ -1,6 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#![cfg_attr(feature = "dox", feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![recursion_limit = "256"] #![allow(clippy::missing_safety_doc)] #![allow(clippy::manual_range_contains)] @@ -100,8 +100,8 @@ pub use crate::tags::{ mod tags_serde; pub mod meta; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] pub use crate::meta::MetaSeqnum; pub use crate::meta::{ Meta, MetaAPI, MetaRef, MetaRefMut, ParentBufferMeta, ProtectionMeta, ReferenceTimestampMeta, @@ -160,9 +160,9 @@ mod tracer; mod tracer_factory; // OS dependent Bus extensions (also import the other platform mod for doc) -#[cfg(any(unix, feature = "dox"))] +#[cfg(any(unix, docsrs))] mod bus_unix; -#[cfg(any(windows, feature = "dox"))] +#[cfg(any(windows, docsrs))] mod bus_windows; mod child_proxy; @@ -247,7 +247,7 @@ pub use crate::functions::*; mod utils; pub use crate::utils::ObjectLockGuard; -#[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg(feature = "v1_18")] mod gtype; use std::ptr; @@ -287,9 +287,9 @@ pub const PARAM_FLAG_CONTROLLABLE: glib::ParamFlags = glib::ParamFlags::USER_1; pub const PARAM_FLAG_MUTABLE_READY: glib::ParamFlags = glib::ParamFlags::USER_2; pub const PARAM_FLAG_MUTABLE_PAUSED: glib::ParamFlags = glib::ParamFlags::USER_3; pub const PARAM_FLAG_MUTABLE_PLAYING: glib::ParamFlags = glib::ParamFlags::USER_4; -#[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg(feature = "v1_18")] pub const PARAM_FLAG_DOC_SHOW_DEFAULT: glib::ParamFlags = glib::ParamFlags::USER_5; -#[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg(feature = "v1_18")] pub const PARAM_FLAG_CONDITIONALLY_AVAILABLE: glib::ParamFlags = glib::ParamFlags::USER_6; // Re-export all the traits in a prelude module, so that applications @@ -301,11 +301,11 @@ pub mod prelude { pub use opt_ops::prelude::*; // OS dependent Bus extensions (also import the other platform trait for doc) - #[cfg(any(unix, feature = "dox"))] + #[cfg(any(unix, docsrs))] pub use crate::bus_unix::UnixBusExtManual; - #[cfg(any(windows, feature = "dox"))] + #[cfg(any(windows, docsrs))] pub use crate::bus_windows::WindowsBusExtManual; - #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg(feature = "v1_18")] pub use crate::gtype::PluginApiExt; pub use crate::{ auto::traits::*, diff --git a/gstreamer/src/log.rs b/gstreamer/src/log.rs index 15ce8cba0..437db2426 100644 --- a/gstreamer/src/log.rs +++ b/gstreamer/src/log.rs @@ -33,8 +33,8 @@ impl DebugMessage { } } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[doc(alias = "gst_debug_message_get_id")] #[inline] pub fn id(&self) -> Option<&glib::GStr> { @@ -343,8 +343,8 @@ impl DebugCategory { }); } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[inline] #[doc(alias = "gst_debug_log_id")] pub fn log_id( @@ -363,8 +363,8 @@ impl DebugCategory { self.log_id_unfiltered_internal(id.as_ref(), level, file, function, line, args); } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] #[inline] #[doc(alias = "gst_debug_log_id_literal")] pub fn log_id_literal( @@ -383,8 +383,8 @@ impl DebugCategory { self.log_id_literal_unfiltered_internal(id.as_ref(), level, file, function, line, msg); } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] // rustdoc-stripper-ignore-next /// Logs without checking the log level. #[inline] @@ -401,8 +401,8 @@ impl DebugCategory { self.log_id_unfiltered_internal(id.as_ref(), level, file, function, line, args) } - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] // rustdoc-stripper-ignore-next /// Logs without checking the log level. #[inline] @@ -419,7 +419,7 @@ impl DebugCategory { self.log_id_literal_unfiltered_internal(id.as_ref(), level, file, function, line, msg) } - #[cfg(any(feature = "v1_22", feature = "dox"))] + #[cfg(feature = "v1_22")] #[inline(never)] fn log_id_unfiltered_internal( self, @@ -442,7 +442,7 @@ impl DebugCategory { }); } - #[cfg(any(feature = "v1_22", feature = "dox"))] + #[cfg(feature = "v1_22")] #[inline(never)] fn log_id_literal_unfiltered_internal( self, @@ -478,8 +478,8 @@ impl DebugCategory { unsafe { glib::SList::from_glib_container(ffi::gst_debug_get_all_categories()) } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_debug_log_get_line")] #[inline] pub fn get_line( diff --git a/gstreamer/src/message.rs b/gstreamer/src/message.rs index be5b02701..5df97fa2f 100644 --- a/gstreamer/src/message.rs +++ b/gstreamer/src/message.rs @@ -125,9 +125,9 @@ impl MessageRef { ffi::GST_MESSAGE_PROPERTY_NOTIFY => PropertyNotify::view(self), ffi::GST_MESSAGE_STREAM_COLLECTION => StreamCollection::view(self), ffi::GST_MESSAGE_STREAMS_SELECTED => StreamsSelected::view(self), - #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg(feature = "v1_16")] ffi::GST_MESSAGE_DEVICE_CHANGED => DeviceChanged::view(self), - #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg(feature = "v1_18")] ffi::GST_MESSAGE_INSTANT_RATE_REQUEST => InstantRateRequest::view(self), _ => MessageView::Other, } @@ -221,11 +221,11 @@ pub enum MessageView<'a> { StreamCollection(&'a StreamCollection), StreamsSelected(&'a StreamsSelected), Redirect(&'a Redirect), - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] DeviceChanged(&'a DeviceChanged), - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] InstantRateRequest(&'a InstantRateRequest), Other, } @@ -1715,11 +1715,11 @@ impl Redirect { } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] declare_concrete_message!(DeviceChanged, T); -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl DeviceChanged { #[doc(alias = "gst_message_new_device_changed")] #[allow(clippy::new_ret_no_self)] @@ -1754,11 +1754,11 @@ impl DeviceChanged { } } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] declare_concrete_message!(InstantRateRequest, T); -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl InstantRateRequest { #[doc(alias = "gst_message_new_instant_rate_request")] #[allow(clippy::new_ret_no_self)] @@ -3027,8 +3027,8 @@ impl<'a> RedirectBuilder<'a> { }); } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[must_use = "The builder must be built to be used"] pub struct DeviceChangedBuilder<'a> { builder: MessageBuilder<'a>, @@ -3036,8 +3036,8 @@ pub struct DeviceChangedBuilder<'a> { changed_device: &'a crate::Device, } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl<'a> DeviceChangedBuilder<'a> { fn new(device: &'a crate::Device, changed_device: &'a crate::Device) -> Self { skip_assert_initialized!(); @@ -3055,16 +3055,16 @@ impl<'a> DeviceChangedBuilder<'a> { )); } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[must_use = "The builder must be built to be used"] pub struct InstantRateRequestBuilder<'a> { builder: MessageBuilder<'a>, rate_multiplier: f64, } -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +#[cfg(feature = "v1_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl<'a> InstantRateRequestBuilder<'a> { fn new(rate_multiplier: f64) -> Self { skip_assert_initialized!(); diff --git a/gstreamer/src/meta.rs b/gstreamer/src/meta.rs index 96f295804..c791eb832 100644 --- a/gstreamer/src/meta.rs +++ b/gstreamer/src/meta.rs @@ -1,7 +1,7 @@ // Take a look at the license at the top of the repository in the LICENSE file. -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] use std::ptr; use std::{fmt, marker::PhantomData, ops}; @@ -56,8 +56,8 @@ pub unsafe trait MetaAPI: Sync + Send + Sized { } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[derive(Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq)] pub struct MetaSeqnum(u64); @@ -161,8 +161,8 @@ impl<'a, T> MetaRef<'a, T> { } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "get_seqnum")] #[doc(alias = "gst_meta_get_seqnum")] #[inline] @@ -195,8 +195,8 @@ impl<'a> MetaRef<'a, Meta> { } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[inline] pub fn try_as_custom_meta(&self) -> Option<&MetaRef<'a, CustomMeta>> { unsafe { @@ -237,8 +237,8 @@ impl<'a, T, U> MetaRefMut<'a, T, U> { } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "get_seqnum")] #[doc(alias = "gst_meta_get_seqnum")] #[inline] @@ -312,8 +312,8 @@ impl<'a, U> MetaRefMut<'a, Meta, U> { } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[inline] pub fn try_as_custom_meta(&self) -> Option<&MetaRefMut<'a, CustomMeta, U>> { unsafe { @@ -325,8 +325,8 @@ impl<'a, U> MetaRefMut<'a, Meta, U> { } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[inline] pub fn try_as_mut_custom_meta(&mut self) -> Option<&mut MetaRefMut<'a, CustomMeta, U>> { unsafe { @@ -551,21 +551,21 @@ impl fmt::Debug for ReferenceTimestampMeta { } } -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[repr(transparent)] #[doc(alias = "GstCustomMeta")] pub struct CustomMeta(ffi::GstCustomMeta); -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] unsafe impl Send for CustomMeta {} -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] unsafe impl Sync for CustomMeta {} -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl CustomMeta { #[doc(alias = "gst_meta_register_custom")] pub fn register(name: &str, tags: &[&str]) { diff --git a/gstreamer/src/miniobject.rs b/gstreamer/src/miniobject.rs index 6b42a0cb0..81d0aafe3 100644 --- a/gstreamer/src/miniobject.rs +++ b/gstreamer/src/miniobject.rs @@ -621,10 +621,10 @@ macro_rules! mini_object_wrapper ( }; ); -#[cfg(not(any(feature = "v1_20", feature = "dox")))] +#[cfg(not(any(feature = "v1_20", docsrs)))] mini_object_wrapper!(MiniObject, MiniObjectRef, ffi::GstMiniObject); -#[cfg(any(feature = "v1_20", feature = "dox"))] +#[cfg(feature = "v1_20")] mini_object_wrapper!(MiniObject, MiniObjectRef, ffi::GstMiniObject, || { ffi::gst_mini_object_get_type() }); diff --git a/gstreamer/src/pad_template.rs b/gstreamer/src/pad_template.rs index 308c7b13c..e22b625db 100644 --- a/gstreamer/src/pad_template.rs +++ b/gstreamer/src/pad_template.rs @@ -33,8 +33,8 @@ impl PadTemplate { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_pad_template_get_documentation_caps")] #[doc(alias = "get_documentation_caps")] pub fn documentation_caps(&self) -> &Caps { @@ -91,8 +91,8 @@ impl PadTemplate { presence, caps, gtype: None, - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] documentation_caps: None, } } @@ -106,8 +106,8 @@ pub struct PadTemplateBuilder<'a> { presence: PadPresence, caps: &'a Caps, gtype: Option, - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] documentation_caps: Option<&'a Caps>, } @@ -119,8 +119,8 @@ impl<'a> PadTemplateBuilder<'a> { } } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] pub fn documentation_caps(self, documentation_caps: &'a Caps) -> Self { PadTemplateBuilder { documentation_caps: Some(documentation_caps), @@ -141,8 +141,8 @@ impl<'a> PadTemplateBuilder<'a> { PadTemplate::new(self.name_template, self.direction, self.presence, self.caps)? }; - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[cfg(feature = "v1_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] if let Some(documentation_caps) = self.documentation_caps { unsafe { ffi::gst_pad_template_set_documentation_caps( diff --git a/gstreamer/src/param_spec.rs b/gstreamer/src/param_spec.rs index ab0e03298..a9948e2b3 100644 --- a/gstreamer/src/param_spec.rs +++ b/gstreamer/src/param_spec.rs @@ -413,7 +413,7 @@ pub trait GstParamSpecBuilderExt<'a>: glib::prelude::ParamSpecBuilderExt<'a> { self.flags(flags) } - #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg(feature = "v1_18")] // rustdoc-stripper-ignore-next /// Mark the property for showing the default value in the docs fn doc_show_default(self) -> Self { @@ -421,7 +421,7 @@ pub trait GstParamSpecBuilderExt<'a>: glib::prelude::ParamSpecBuilderExt<'a> { self.flags(flags) } - #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg(feature = "v1_18")] // rustdoc-stripper-ignore-next /// Mark the property for being only conditionally available fn conditionally_available(self) -> Self { diff --git a/gstreamer/src/query.rs b/gstreamer/src/query.rs index 06b1f38a8..f481df029 100644 --- a/gstreamer/src/query.rs +++ b/gstreamer/src/query.rs @@ -83,9 +83,9 @@ impl QueryRef { ffi::GST_QUERY_CAPS => Caps::view(self), ffi::GST_QUERY_DRAIN => Drain::view(self), ffi::GST_QUERY_CONTEXT => Context::view(self), - #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg(feature = "v1_16")] ffi::GST_QUERY_BITRATE => Bitrate::view(self), - #[cfg(any(feature = "v1_22", feature = "dox"))] + #[cfg(feature = "v1_22")] ffi::GST_QUERY_SELECTABLE => Selectable::view(self), _ => Other::view(self), } @@ -113,9 +113,9 @@ impl QueryRef { ffi::GST_QUERY_CAPS => Caps::view_mut(self), ffi::GST_QUERY_DRAIN => Drain::view_mut(self), ffi::GST_QUERY_CONTEXT => Context::view_mut(self), - #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg(feature = "v1_16")] ffi::GST_QUERY_BITRATE => Bitrate::view_mut(self), - #[cfg(any(feature = "v1_22", feature = "dox"))] + #[cfg(feature = "v1_22")] ffi::GST_QUERY_SELECTABLE => Selectable::view_mut(self), _ => Other::view_mut(self), } @@ -161,11 +161,11 @@ pub enum QueryView<'a> { Caps(&'a Caps), Drain(&'a Drain), Context(&'a Context), - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] Bitrate(&'a Bitrate), - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] Selectable(&'a Selectable), Other(&'a Other), } @@ -189,11 +189,11 @@ pub enum QueryViewMut<'a> { Caps(&'a mut Caps), Drain(&'a mut Drain), Context(&'a mut Context), - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] Bitrate(&'a mut Bitrate), - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] Selectable(&'a mut Selectable), Other(&'a mut Other), } @@ -1578,12 +1578,12 @@ impl Context { } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] declare_concrete_query!(Bitrate, T); -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl Bitrate { #[doc(alias = "gst_query_new_bitrate")] pub fn new() -> Self { @@ -1592,16 +1592,16 @@ impl Bitrate { } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl Default for Bitrate { fn default() -> Self { Self::new() } } -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +#[cfg(feature = "v1_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl Bitrate { #[doc(alias = "get_bitrate")] #[doc(alias = "gst_query_parse_bitrate")] @@ -1621,12 +1621,12 @@ impl Bitrate { } } -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] declare_concrete_query!(Selectable, T); -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] impl Selectable { #[doc(alias = "gst_query_new_selectable")] pub fn new() -> Self { @@ -1635,16 +1635,16 @@ impl Selectable { } } -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] impl Default for Selectable { fn default() -> Self { Self::new() } } -#[cfg(any(feature = "v1_22", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] +#[cfg(feature = "v1_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] impl Selectable { #[doc(alias = "get_selectable")] #[doc(alias = "gst_query_parse_selectable")] diff --git a/gstreamer/src/sample.rs b/gstreamer/src/sample.rs index 66fe2c5e4..8f82c1808 100644 --- a/gstreamer/src/sample.rs +++ b/gstreamer/src/sample.rs @@ -183,36 +183,36 @@ impl SampleRef { } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_sample_set_buffer")] pub fn set_buffer(&mut self, buffer: Option<&Buffer>) { unsafe { ffi::gst_sample_set_buffer(self.as_mut_ptr(), buffer.to_glib_none().0) } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_sample_set_buffer_list")] pub fn set_buffer_list(&mut self, buffer_list: Option<&BufferList>) { unsafe { ffi::gst_sample_set_buffer_list(self.as_mut_ptr(), buffer_list.to_glib_none().0) } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_sample_set_caps")] pub fn set_caps(&mut self, caps: Option<&Caps>) { unsafe { ffi::gst_sample_set_caps(self.as_mut_ptr(), caps.to_glib_none().0) } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_sample_set_segment")] pub fn set_segment(&mut self, segment: Option<&Segment>) { unsafe { ffi::gst_sample_set_segment(self.as_mut_ptr(), segment.to_glib_none().0) } } - #[cfg(any(feature = "v1_16", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[cfg(feature = "v1_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_sample_set_info")] pub fn set_info(&mut self, info: Option) { unsafe { diff --git a/gstreamer/src/serde_macros.rs b/gstreamer/src/serde_macros.rs index c0e27bceb..1f2235538 100644 --- a/gstreamer/src/serde_macros.rs +++ b/gstreamer/src/serde_macros.rs @@ -5,8 +5,8 @@ macro_rules! bitflags_serialize_impl { // this implementation serializes only flags using only one bit, // ignoring all other flags ($type:ty, single_bit_flags$(, $feature:expr)?) => { - $(#[cfg(any(feature = $feature, feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = $feature)))])? + $(#[cfg(any(feature = $feature, docsrs))] + #[cfg_attr(docsrs, doc(cfg(feature = $feature)))])? impl serde::Serialize for $type { fn serialize(&self, serializer: S) -> Result where @@ -36,8 +36,8 @@ macro_rules! bitflags_serialize_impl { // considers the flags using the most bits first ($type:ty, by_ones_decreasing$(, $feature:expr)?) => { - $(#[cfg(any(feature = $feature, feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = $feature)))])? + $(#[cfg(any(feature = $feature, docsrs))] + #[cfg_attr(docsrs, doc(cfg(feature = $feature)))])? impl serde::Serialize for $type { fn serialize(&self, serializer: S) -> Result where @@ -85,8 +85,8 @@ macro_rules! bitflags_serialize_impl { #[macro_export] macro_rules! bitflags_deserialize_impl { ($type:ty$(, $feature:expr)?) => { - $(#[cfg(any(feature = $feature, feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = $feature)))])? + $(#[cfg(any(feature = $feature, docsrs))] + #[cfg_attr(docsrs, doc(cfg(feature = $feature)))])? impl<'de> serde::Deserialize<'de> for $type { fn deserialize>( deserializer: D, diff --git a/gstreamer/src/structure.rs b/gstreamer/src/structure.rs index d2dd7674b..a422e9dc9 100644 --- a/gstreamer/src/structure.rs +++ b/gstreamer/src/structure.rs @@ -750,8 +750,8 @@ impl StructureRef { } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_structure_serialize")] pub fn serialize(&self, flags: crate::SerializeFlags) -> glib::GString { unsafe { from_glib_full(ffi::gst_structure_serialize(&self.0, flags.into_glib())) } diff --git a/gstreamer/src/subclass/task_pool.rs b/gstreamer/src/subclass/task_pool.rs index 0f12946c5..734ba9b5d 100644 --- a/gstreamer/src/subclass/task_pool.rs +++ b/gstreamer/src/subclass/task_pool.rs @@ -53,7 +53,7 @@ unsafe impl IsSubclassable for TaskPool { klass.push = Some(task_pool_push::); klass.join = Some(task_pool_join::); - #[cfg(any(feature = "v1_20", feature = "dox"))] + #[cfg(feature = "v1_20")] { klass.dispose_handle = Some(task_pool_dispose_handle::); } @@ -119,8 +119,8 @@ unsafe extern "C" fn task_pool_join(ptr: *mut ffi::GstTaskPool, handle.join(); } -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] +#[cfg(feature = "v1_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] unsafe extern "C" fn task_pool_dispose_handle( ptr: *mut ffi::GstTaskPool, id: gpointer, diff --git a/gstreamer/src/subclass/tracer.rs b/gstreamer/src/subclass/tracer.rs index f2a448811..9e1e890db 100644 --- a/gstreamer/src/subclass/tracer.rs +++ b/gstreamer/src/subclass/tracer.rs @@ -58,17 +58,17 @@ pub trait TracerImpl: TracerImplExt + GstObjectImpl + Send + Sync { fn pad_pull_range_pre(&self, ts: u64, pad: &Pad, offset: u64, size: u32) {} fn pad_push_event_post(&self, ts: u64, pad: &Pad, success: bool) {} fn pad_push_event_pre(&self, ts: u64, pad: &Pad, event: &Event) {} - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] fn pad_chain_list_post(&self, ts: u64, pad: &Pad, result: Result) {} - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] fn pad_chain_list_pre(&self, ts: u64, pad: &Pad, buffer_list: &BufferList) {} - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] fn pad_chain_post(&self, ts: u64, pad: &Pad, result: Result) {} - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] fn pad_chain_pre(&self, ts: u64, pad: &Pad, buffer: &Buffer) {} fn pad_push_list_post(&self, ts: u64, pad: &Pad, result: Result) {} fn pad_push_list_pre(&self, ts: u64, pad: &Pad, buffer_list: &BufferList) {} @@ -78,8 +78,8 @@ pub trait TracerImpl: TracerImplExt + GstObjectImpl + Send + Sync { fn pad_query_pre(&self, ts: u64, pad: &Pad, query: &QueryRef) {} fn pad_unlink_post(&self, ts: u64, src: &Pad, sink: &Pad, success: bool) {} fn pad_unlink_pre(&self, ts: u64, src: &Pad, sink: &Pad) {} - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] fn plugin_feature_loaded(&self, ts: u64, feature: &crate::PluginFeature) {} } @@ -278,27 +278,27 @@ define_tracer_hooks! { let b = Buffer::from_glib_borrow(b); this.pad_push_pre(ts, &p, &b) }; - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] PadChainListPost("pad-chain-list-post") = |this, ts, p: *mut ffi::GstPad, r: ffi::GstFlowReturn| { let p = Pad::from_glib_borrow(p); this.pad_chain_list_post(ts, &p, try_from_glib(r)) }; - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] PadChainListPre("pad-chain-list-pre") = |this, ts, p: *mut ffi::GstPad, bl: *mut ffi::GstBufferList| { let p = Pad::from_glib_borrow(p); let bl = BufferList::from_glib_borrow(bl); this.pad_chain_list_pre(ts, &p, &bl) }; - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] PadChainPost("pad-chain-post") = |this, ts, p: *mut ffi::GstPad, r: ffi::GstFlowReturn| { let p = Pad::from_glib_borrow(p); this.pad_chain_post(ts, &p, try_from_glib(r)) }; - #[cfg(any(feature = "v1_22", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + #[cfg(feature = "v1_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] PadChainPre("pad-chain-pre") = |this, ts, p: *mut ffi::GstPad, b: *mut ffi::GstBuffer| { let p = Pad::from_glib_borrow(p); let b = Buffer::from_glib_borrow(b); @@ -324,8 +324,8 @@ define_tracer_hooks! { let sink = Pad::from_glib_borrow(sink); this.pad_unlink_pre(ts, &src, &sink) }; - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] PluginFeatureLoaded("plugin-feature-loaded") = |this, ts, feature: *mut ffi::GstPluginFeature| { let feature = crate::PluginFeature::from_glib_borrow(feature); this.plugin_feature_loaded(ts, &feature) diff --git a/gstreamer/src/task_pool.rs b/gstreamer/src/task_pool.rs index 4edeb8f79..2d9fd896a 100644 --- a/gstreamer/src/task_pool.rs +++ b/gstreamer/src/task_pool.rs @@ -61,8 +61,8 @@ impl TaskPool { ffi::gst_task_pool_join(self.to_glib_none().0, id.as_ptr()) } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] unsafe fn dispose_handle(&self, id: ptr::NonNull) { ffi::gst_task_pool_dispose_handle(self.to_glib_none().0, id.as_ptr()) } @@ -91,7 +91,7 @@ impl TaskHandle for std::convert::Infallible { /// /// If the `v1_20` feature is enabled, requests the task pool to dispose of the handle when it is /// dropped. Otherwise, needs to be `join`ed to avoid a leak. -#[cfg_attr(not(any(feature = "v1_20", feature = "dox")), must_use)] +#[cfg_attr(not(any(feature = "v1_20", docsrs)), must_use)] #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct TaskPoolTaskHandle { handle: ptr::NonNull, @@ -112,7 +112,7 @@ impl Drop for TaskPoolTaskHandle { fn drop(&mut self) { if let Some(task_pool) = self.task_pool.take() { cfg_if::cfg_if! { - if #[cfg(any(feature = "v1_20", feature = "dox"))] { + if #[cfg(feature = "v1_20")] { unsafe { task_pool.dispose_handle(self.handle) } } else { crate::warning!(crate::CAT_RUST, obj: &task_pool, "Leaked task handle"); diff --git a/gstreamer/src/value.rs b/gstreamer/src/value.rs index a4f187eb4..f8c4f4adc 100644 --- a/gstreamer/src/value.rs +++ b/gstreamer/src/value.rs @@ -1237,8 +1237,8 @@ pub trait GstValueExt: Sized { fn serialize(&self) -> Result; #[doc(alias = "gst_value_deserialize")] fn deserialize(s: &str, type_: glib::Type) -> Result; - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_value_deserialize_with_pspec")] fn deserialize_with_pspec( s: &str, @@ -1400,8 +1400,8 @@ impl GstValueExt for glib::Value { } } - #[cfg(any(feature = "v1_20", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] + #[cfg(feature = "v1_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] fn deserialize_with_pspec( s: &str, pspec: &glib::ParamSpec, diff --git a/gstreamer/sys/Cargo.toml b/gstreamer/sys/Cargo.toml index f719a950b..2b347f075 100644 --- a/gstreamer/sys/Cargo.toml +++ b/gstreamer/sys/Cargo.toml @@ -24,7 +24,6 @@ v1_20 = ["v1_18_3"] v1_20_4 = ["v1_20"] v1_22 = ["v1_20_4"] v1_24 = ["v1_22"] -dox = ["glib/dox", "gobject/dox"] [lib] name = "gstreamer_sys"