From bd75778fcb1a60fa97b789930043c7b24dcc6909 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Thu, 19 Nov 2020 10:56:42 +0100 Subject: [PATCH] Add doc(cfg()) on all manual files --- gstreamer-app/src/app_src.rs | 1 + gstreamer-audio/src/audio_decoder.rs | 4 ++ gstreamer-audio/src/audio_meta.rs | 9 +++++ gstreamer-audio/src/audio_stream_align.rs | 1 + gstreamer-audio/src/functions.rs | 1 + gstreamer-audio/src/lib.rs | 3 ++ gstreamer-base/src/adapter.rs | 5 +++ gstreamer-base/src/aggregator.rs | 20 ++++++++++ gstreamer-base/src/base_src.rs | 2 + gstreamer-base/src/functions.rs | 2 + gstreamer-base/src/lib.rs | 6 +++ gstreamer-base/src/subclass/aggregator.rs | 21 ++++++++++ gstreamer-base/src/subclass/mod.rs | 4 ++ gstreamer-check/src/harness.rs | 3 ++ gstreamer-check/src/test_clock.rs | 2 + gstreamer-gl/src/lib.rs | 3 ++ .../src/rtsp_media_factory.rs | 5 +++ gstreamer-video/src/caps_features.rs | 2 + gstreamer-video/src/lib.rs | 7 ++++ gstreamer-video/src/video_decoder.rs | 5 +++ gstreamer-video/src/video_encoder.rs | 4 ++ gstreamer-video/src/video_info.rs | 20 ++++++++++ gstreamer-video/src/video_meta.rs | 18 +++++++++ gstreamer-video/src/video_time_code.rs | 6 +++ gstreamer-webrtc/src/lib.rs | 1 + gstreamer/src/bin.rs | 2 + gstreamer/src/buffer.rs | 2 + gstreamer/src/bufferlist.rs | 2 + gstreamer/src/caps.rs | 1 + gstreamer/src/clock.rs | 3 ++ gstreamer/src/element.rs | 18 +++++++++ gstreamer/src/event.rs | 23 +++++++++++ gstreamer/src/functions.rs | 2 + gstreamer/src/lib.rs | 10 +++++ gstreamer/src/message.rs | 40 +++++++++++++++++++ gstreamer/src/meta.rs | 13 ++++++ gstreamer/src/pad_template.rs | 5 +++ gstreamer/src/param_spec.rs | 2 + gstreamer/src/query.rs | 4 ++ gstreamer/src/sample.rs | 5 +++ 40 files changed, 287 insertions(+) diff --git a/gstreamer-app/src/app_src.rs b/gstreamer-app/src/app_src.rs index 3b58b9378..28c3c8486 100644 --- a/gstreamer-app/src/app_src.rs +++ b/gstreamer-app/src/app_src.rs @@ -239,6 +239,7 @@ impl AppSrc { } #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn push_buffer_list( &self, list: gst::BufferList, diff --git a/gstreamer-audio/src/audio_decoder.rs b/gstreamer-audio/src/audio_decoder.rs index ed27ef1b4..519444c4c 100644 --- a/gstreamer-audio/src/audio_decoder.rs +++ b/gstreamer-audio/src/audio_decoder.rs @@ -37,6 +37,7 @@ pub trait AudioDecoderExtManual: 'static { ) -> Result; #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] fn finish_subframe( &self, buffer: Option, @@ -45,6 +46,7 @@ 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")))] fn set_output_caps(&self, caps: &gst::Caps) -> Result<(), gst::FlowError>; fn set_output_format(&self, info: &AudioInfo) -> Result<(), gst::FlowError>; @@ -81,6 +83,7 @@ impl> AudioDecoderExtManual for O { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] fn finish_subframe( &self, buffer: Option, @@ -108,6 +111,7 @@ impl> AudioDecoderExtManual for O { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] fn set_output_caps(&self, caps: &gst::Caps) -> Result<(), gst::FlowError> { unsafe { let ret = from_glib(gst_audio_sys::gst_audio_decoder_set_output_caps( diff --git a/gstreamer-audio/src/audio_meta.rs b/gstreamer-audio/src/audio_meta.rs index 1e73a6b60..dd2b96909 100644 --- a/gstreamer-audio/src/audio_meta.rs +++ b/gstreamer-audio/src/audio_meta.rs @@ -9,13 +9,16 @@ use std::fmt; #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] use std::ptr; #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] use std::slice; use glib; use glib::translate::{from_glib, ToGlib}; #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] use glib::translate::{from_glib_none, ToGlibPtr}; use gst; use gst::prelude::*; @@ -76,15 +79,19 @@ impl fmt::Debug for AudioClippingMeta { } #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[repr(transparent)] pub struct AudioMeta(gst_audio_sys::GstAudioMeta); #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", 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")))] unsafe impl Sync for AudioMeta {} #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl AudioMeta { pub fn add<'a>( buffer: &'a mut gst::BufferRef, @@ -190,6 +197,7 @@ impl AudioMeta { } #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] unsafe impl MetaAPI for AudioMeta { type GstType = gst_audio_sys::GstAudioMeta; @@ -199,6 +207,7 @@ unsafe impl MetaAPI for AudioMeta { } #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl fmt::Debug for AudioMeta { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("AudioMeta") diff --git a/gstreamer-audio/src/audio_stream_align.rs b/gstreamer-audio/src/audio_stream_align.rs index d583e7347..42440d144 100644 --- a/gstreamer-audio/src/audio_stream_align.rs +++ b/gstreamer-audio/src/audio_stream_align.rs @@ -15,6 +15,7 @@ use std::mem; impl AudioStreamAlign { #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn process( &mut self, discont: bool, diff --git a/gstreamer-audio/src/functions.rs b/gstreamer-audio/src/functions.rs index 7ba16e465..86d83bf59 100644 --- a/gstreamer-audio/src/functions.rs +++ b/gstreamer-audio/src/functions.rs @@ -33,6 +33,7 @@ pub fn audio_buffer_clip( } #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn audio_buffer_truncate( buffer: gst::Buffer, bpf: u32, diff --git a/gstreamer-audio/src/lib.rs b/gstreamer-audio/src/lib.rs index 9ce843c63..077214857 100644 --- a/gstreamer-audio/src/lib.rs +++ b/gstreamer-audio/src/lib.rs @@ -59,12 +59,15 @@ pub use audio_meta::*; mod audio_channel_position; pub use audio_channel_position::*; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod audio_stream_align; mod functions; pub use functions::*; #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", 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")))] pub use audio_buffer::{AudioBuffer, AudioBufferRef}; mod audio_decoder; diff --git a/gstreamer-base/src/adapter.rs b/gstreamer-base/src/adapter.rs index 1cbf46605..7fccac14e 100644 --- a/gstreamer-base/src/adapter.rs +++ b/gstreamer-base/src/adapter.rs @@ -86,11 +86,13 @@ impl UniqueAdapter { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn distance_from_discont(&self) -> u64 { self.0.distance_from_discont() } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn dts_at_discont(&self) -> gst::ClockTime { self.0.dts_at_discont() } @@ -130,6 +132,7 @@ impl UniqueAdapter { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn offset_at_discont(&self) -> u64 { self.0.offset_at_discont() } @@ -143,6 +146,7 @@ impl UniqueAdapter { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn prev_offset(&self) -> (u64, u64) { self.0.prev_offset() } @@ -156,6 +160,7 @@ impl UniqueAdapter { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn pts_at_discont(&self) -> gst::ClockTime { self.0.pts_at_discont() } diff --git a/gstreamer-base/src/aggregator.rs b/gstreamer-base/src/aggregator.rs index 2332a73aa..8680f2585 100644 --- a/gstreamer-base/src/aggregator.rs +++ b/gstreamer-base/src/aggregator.rs @@ -7,19 +7,24 @@ // except according to those terms. #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] use glib::prelude::*; #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] use glib::signal::{connect_raw, SignalHandlerId}; use glib::translate::*; use glib::IsA; #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] use glib::Value; use gst; use gst_base_sys; #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] use std::boxed::Box as Box_; use std::mem; #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] use std::mem::transmute; use std::ptr; use Aggregator; @@ -30,27 +35,33 @@ pub trait AggregatorExtManual: 'static { fn finish_buffer(&self, buffer: gst::Buffer) -> Result; #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn finish_buffer_list( &self, bufferlist: gst::BufferList, ) -> Result; #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] fn get_property_min_upstream_latency(&self) -> gst::ClockTime; #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] fn set_property_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")))] fn connect_property_min_upstream_latency_notify( &self, f: F, ) -> SignalHandlerId; #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn update_segment(&self, segment: &gst::FormattedSegment); #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn selected_samples( &self, pts: gst::ClockTime, @@ -60,6 +71,7 @@ pub trait AggregatorExtManual: 'static { ); #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn connect_samples_selected< P, F: Fn( @@ -104,6 +116,7 @@ impl> AggregatorExtManual for O { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn finish_buffer_list( &self, bufferlist: gst::BufferList, @@ -118,6 +131,7 @@ impl> AggregatorExtManual for O { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] fn get_property_min_upstream_latency(&self) -> gst::ClockTime { unsafe { let mut value = Value::from_type(::static_type()); @@ -134,6 +148,7 @@ impl> AggregatorExtManual for O { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] fn set_property_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime) { unsafe { gobject_sys::g_object_set_property( @@ -145,6 +160,7 @@ impl> AggregatorExtManual for O { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] fn connect_property_min_upstream_latency_notify( &self, f: F, @@ -162,6 +178,7 @@ impl> AggregatorExtManual for O { } } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn update_segment(&self, segment: &gst::FormattedSegment) { unsafe { gst_base_sys::gst_aggregator_update_segment( @@ -172,6 +189,7 @@ impl> AggregatorExtManual for O { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn selected_samples( &self, pts: gst::ClockTime, @@ -193,6 +211,7 @@ impl> AggregatorExtManual for O { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn connect_samples_selected< P, F: Fn( @@ -263,6 +282,7 @@ impl> AggregatorExtManual for O { } #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] unsafe extern "C" fn notify_min_upstream_latency_trampoline( this: *mut gst_base_sys::GstAggregator, _param_spec: glib_sys::gpointer, diff --git a/gstreamer-base/src/base_src.rs b/gstreamer-base/src/base_src.rs index 71fa4cdc8..6b5d44a39 100644 --- a/gstreamer-base/src/base_src.rs +++ b/gstreamer-base/src/base_src.rs @@ -29,6 +29,7 @@ pub trait BaseSrcExtManual: 'static { fn query_latency(&self) -> Result<(bool, gst::ClockTime, gst::ClockTime), glib::BoolError>; #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::BoolError>; } @@ -109,6 +110,7 @@ impl> BaseSrcExtManual for O { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::BoolError> { unsafe { let ret = from_glib(gst_base_sys::gst_base_src_new_segment( diff --git a/gstreamer-base/src/functions.rs b/gstreamer-base/src/functions.rs index c6f55cfe0..fef93b3f9 100644 --- a/gstreamer-base/src/functions.rs +++ b/gstreamer-base/src/functions.rs @@ -36,6 +36,7 @@ pub fn type_find_helper_for_data, R: AsRef<[u8]>>( } #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn type_find_helper_for_data_with_extension, R: AsRef<[u8]>>( obj: Option<&P>, data: R, @@ -82,6 +83,7 @@ pub fn type_find_helper_for_buffer>( } #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn type_find_helper_for_buffer_with_extension>( obj: Option<&P>, buf: &gst::Buffer, diff --git a/gstreamer-base/src/lib.rs b/gstreamer-base/src/lib.rs index f9086f951..95f95ae99 100644 --- a/gstreamer-base/src/lib.rs +++ b/gstreamer-base/src/lib.rs @@ -51,12 +51,16 @@ pub use adapter::*; mod flow_combiner; pub use flow_combiner::*; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod aggregator; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use aggregator::AggregatorExtManual; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod aggregator_pad; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use aggregator_pad::AggregatorPadExtManual; mod base_parse; pub use base_parse::BaseParseExtManual; @@ -81,8 +85,10 @@ pub mod prelude { pub use gst::prelude::*; #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use aggregator::AggregatorExtManual; #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use aggregator_pad::AggregatorPadExtManual; pub use auto::traits::*; pub use base_parse::BaseParseExtManual; diff --git a/gstreamer-base/src/subclass/aggregator.rs b/gstreamer-base/src/subclass/aggregator.rs index 3d0b08aff..a90f9fc4a 100644 --- a/gstreamer-base/src/subclass/aggregator.rs +++ b/gstreamer-base/src/subclass/aggregator.rs @@ -39,6 +39,7 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn finish_buffer_list( &self, aggregator: &Self::Type, @@ -65,6 +66,7 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn sink_event_pre_queue( &self, aggregator: &Self::Type, @@ -84,6 +86,7 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn sink_query_pre_queue( &self, aggregator: &Self::Type, @@ -161,11 +164,13 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn negotiate(&self, aggregator: &Self::Type) -> bool { self.parent_negotiate(aggregator) } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn peek_next_sample( &self, aggregator: &Self::Type, @@ -192,6 +197,7 @@ pub trait AggregatorImplExt: ObjectSubclass { ) -> Result; #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn parent_finish_buffer_list( &self, aggregator: &Self::Type, @@ -206,6 +212,7 @@ pub trait AggregatorImplExt: ObjectSubclass { ) -> bool; #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn parent_sink_event_pre_queue( &self, aggregator: &Self::Type, @@ -221,6 +228,7 @@ pub trait AggregatorImplExt: ObjectSubclass { ) -> bool; #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn parent_sink_query_pre_queue( &self, aggregator: &Self::Type, @@ -274,9 +282,11 @@ pub trait AggregatorImplExt: ObjectSubclass { ) -> Result<(), gst::LoggableError>; #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn parent_negotiate(&self, aggregator: &Self::Type) -> bool; #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn parent_peek_next_sample( &self, aggregator: &Self::Type, @@ -345,6 +355,7 @@ impl AggregatorImplExt for T { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn parent_finish_buffer_list( &self, aggregator: &Self::Type, @@ -387,6 +398,7 @@ impl AggregatorImplExt for T { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn parent_sink_event_pre_queue( &self, aggregator: &Self::Type, @@ -431,6 +443,7 @@ impl AggregatorImplExt for T { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn parent_sink_query_pre_queue( &self, aggregator: &Self::Type, @@ -682,6 +695,7 @@ impl AggregatorImplExt for T { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn parent_negotiate(&self, aggregator: &Self::Type) -> bool { unsafe { let data = T::type_data(); @@ -700,6 +714,7 @@ impl AggregatorImplExt for T { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn parent_peek_next_sample( &self, aggregator: &Self::Type, @@ -746,6 +761,7 @@ where klass.fixate_src_caps = Some(aggregator_fixate_src_caps::); klass.negotiated_src_caps = Some(aggregator_negotiated_src_caps::); #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(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::); @@ -814,6 +830,7 @@ where } #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] unsafe extern "C" fn aggregator_finish_buffer_list( ptr: *mut gst_base_sys::GstAggregator, buffer_list: *mut gst_sys::GstBufferList, @@ -855,6 +872,7 @@ where } #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] unsafe extern "C" fn aggregator_sink_event_pre_queue( ptr: *mut gst_base_sys::GstAggregator, aggregator_pad: *mut gst_base_sys::GstAggregatorPad, @@ -901,6 +919,7 @@ where } #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] unsafe extern "C" fn aggregator_sink_query_pre_queue( ptr: *mut gst_base_sys::GstAggregator, aggregator_pad: *mut gst_base_sys::GstAggregatorPad, @@ -1154,6 +1173,7 @@ where } #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] unsafe extern "C" fn aggregator_negotiate( ptr: *mut gst_base_sys::GstAggregator, ) -> glib_sys::gboolean @@ -1171,6 +1191,7 @@ where } #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] unsafe extern "C" fn aggregator_peek_next_sample( ptr: *mut gst_base_sys::GstAggregator, pad: *mut gst_base_sys::GstAggregatorPad, diff --git a/gstreamer-base/src/subclass/mod.rs b/gstreamer-base/src/subclass/mod.rs index 41b522d63..0d99fd92a 100644 --- a/gstreamer-base/src/subclass/mod.rs +++ b/gstreamer-base/src/subclass/mod.rs @@ -19,14 +19,18 @@ mod push_src; pub use self::base_transform::BaseTransformMode; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod aggregator; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] mod aggregator_pad; pub mod prelude { #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::aggregator::{AggregatorImpl, AggregatorImplExt}; #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use super::aggregator_pad::{AggregatorPadImpl, AggregatorPadImplExt}; pub use super::base_parse::{BaseParseImpl, BaseParseImplExt}; pub use super::base_sink::{BaseSinkImpl, BaseSinkImplExt}; diff --git a/gstreamer-check/src/harness.rs b/gstreamer-check/src/harness.rs index ead79e39a..8e2948d99 100644 --- a/gstreamer-check/src/harness.rs +++ b/gstreamer-check/src/harness.rs @@ -99,6 +99,7 @@ impl Harness { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn add_propose_allocation_meta( &mut self, api: glib::types::Type, @@ -493,6 +494,7 @@ impl Harness { //} #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn take_all_data_as_buffer(&mut self) -> Result { unsafe { Option::<_>::from_glib_full(gst_check_sys::gst_harness_take_all_data_as_buffer( @@ -503,6 +505,7 @@ impl Harness { } #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn take_all_data_as_bytes(&mut self) -> Result { unsafe { Option::<_>::from_glib_full(gst_check_sys::gst_harness_take_all_data_as_bytes( diff --git a/gstreamer-check/src/test_clock.rs b/gstreamer-check/src/test_clock.rs index ed3d837b2..754021902 100644 --- a/gstreamer-check/src/test_clock.rs +++ b/gstreamer-check/src/test_clock.rs @@ -38,6 +38,7 @@ impl TestClock { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] pub fn process_id(&self, pending_id: &gst::ClockId) -> bool { unsafe { from_glib(gst_check_sys::gst_test_clock_process_id( @@ -85,6 +86,7 @@ impl TestClock { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn timed_wait_for_multiple_pending_ids( &self, count: u32, diff --git a/gstreamer-gl/src/lib.rs b/gstreamer-gl/src/lib.rs index f57e2472e..09d0242ee 100644 --- a/gstreamer-gl/src/lib.rs +++ b/gstreamer-gl/src/lib.rs @@ -51,10 +51,13 @@ pub use gl_context::GLContextExtManual; mod gl_display; pub use gl_display::GL_DISPLAY_CONTEXT_TYPE; #[cfg(any(feature = "egl", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "egl")))] mod gl_display_egl; #[cfg(any(feature = "wayland", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland")))] mod gl_display_wayland; #[cfg(any(feature = "x11", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "x11")))] mod gl_display_x11; mod gl_video_frame; pub use gl_video_frame::VideoFrameGLExt; diff --git a/gstreamer-rtsp-server/src/rtsp_media_factory.rs b/gstreamer-rtsp-server/src/rtsp_media_factory.rs index 805ee98af..f61443a64 100644 --- a/gstreamer-rtsp-server/src/rtsp_media_factory.rs +++ b/gstreamer-rtsp-server/src/rtsp_media_factory.rs @@ -9,20 +9,25 @@ use RTSPMediaFactory; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use glib::translate::*; use glib::IsA; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use gst; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use gst_rtsp_server_sys; pub trait RTSPMediaFactoryExtManual: 'static { #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn add_role_from_structure(&self, structure: &gst::StructureRef); } impl> RTSPMediaFactoryExtManual for O { #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn add_role_from_structure(&self, structure: &gst::StructureRef) { unsafe { gst_rtsp_server_sys::gst_rtsp_media_factory_add_role_from_structure( diff --git a/gstreamer-video/src/caps_features.rs b/gstreamer-video/src/caps_features.rs index 3cc40233e..3be335829 100644 --- a/gstreamer-video/src/caps_features.rs +++ b/gstreamer-video/src/caps_features.rs @@ -13,12 +13,14 @@ use std::ffi::CStr; use once_cell::sync::Lazy; #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub static CAPS_FEATURE_FORMAT_INTERLACED: Lazy<&'static str> = Lazy::new(|| unsafe { CStr::from_ptr(gst_video_sys::GST_CAPS_FEATURE_FORMAT_INTERLACED) .to_str() .unwrap() }); #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", 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/lib.rs b/gstreamer-video/src/lib.rs index 459492ab3..c34213bc9 100644 --- a/gstreamer-video/src/lib.rs +++ b/gstreamer-video/src/lib.rs @@ -50,6 +50,7 @@ pub use auto::*; mod caps_features; #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub use caps_features::{CAPS_FEATURES_FORMAT_INTERLACED, CAPS_FEATURE_FORMAT_INTERLACED}; pub use caps_features::{ CAPS_FEATURES_META_GST_VIDEO_AFFINE_TRANSFORMATION_META, @@ -81,20 +82,26 @@ mod video_overlay_composition; pub use video_overlay_composition::*; pub mod video_meta; #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub use video_meta::VideoCaptionMeta; #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] pub use video_meta::{VideoAFDMeta, VideoBarMeta}; pub use video_meta::{ VideoAffineTransformationMeta, VideoCropMeta, VideoMeta, VideoOverlayCompositionMeta, VideoRegionOfInterestMeta, }; #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] mod video_time_code; #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub use video_time_code::{ValidVideoTimeCode, VideoTimeCode, VideoTimeCodeMeta}; #[cfg(any(feature = "v1_12", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] mod video_time_code_interval; #[cfg(any(feature = "v1_12", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub use video_time_code_interval::VideoTimeCodeInterval; mod video_buffer_pool; pub use video_buffer_pool::{ diff --git a/gstreamer-video/src/video_decoder.rs b/gstreamer-video/src/video_decoder.rs index 3fe7aabdd..e6ae4b67b 100644 --- a/gstreamer-video/src/video_decoder.rs +++ b/gstreamer-video/src/video_decoder.rs @@ -19,6 +19,7 @@ use VideoCodecFrame; use VideoDecoder; use VideoFormat; #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] use VideoInterlaceMode; extern "C" { @@ -37,6 +38,7 @@ extern "C" { pub trait VideoDecoderExtManual: 'static { #[cfg(any(feature = "v1_12", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn allocate_output_frame( &self, frame: &mut VideoCodecFrame, @@ -66,6 +68,7 @@ pub trait VideoDecoderExtManual: 'static { reference: Option<&VideoCodecState>, ) -> Result, gst::FlowError>; #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] fn set_interlaced_output_state( &self, fmt: VideoFormat, @@ -95,6 +98,7 @@ pub trait VideoDecoderExtManual: 'static { impl> VideoDecoderExtManual for O { #[cfg(any(feature = "v1_12", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn allocate_output_frame( &self, frame: &mut VideoCodecFrame, @@ -274,6 +278,7 @@ impl> VideoDecoderExtManual for O { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] fn set_interlaced_output_state( &self, fmt: VideoFormat, diff --git a/gstreamer-video/src/video_encoder.rs b/gstreamer-video/src/video_encoder.rs index 764fb2d9a..0c86b6259 100644 --- a/gstreamer-video/src/video_encoder.rs +++ b/gstreamer-video/src/video_encoder.rs @@ -21,6 +21,7 @@ use VideoEncoder; pub trait VideoEncoderExtManual: 'static { #[cfg(any(feature = "v1_12", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn allocate_output_frame( &self, frame: &mut VideoCodecFrame, @@ -39,6 +40,7 @@ pub trait VideoEncoderExtManual: 'static { ) -> Result; #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result; fn get_latency(&self) -> (gst::ClockTime, gst::ClockTime); @@ -59,6 +61,7 @@ pub trait VideoEncoderExtManual: 'static { impl> VideoEncoderExtManual for O { #[cfg(any(feature = "v1_12", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn allocate_output_frame( &self, frame: &mut VideoCodecFrame, @@ -101,6 +104,7 @@ impl> VideoEncoderExtManual for O { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result { let ret: gst::FlowReturn = unsafe { from_glib(gst_video_sys::gst_video_encoder_finish_subframe( diff --git a/gstreamer-video/src/video_info.rs b/gstreamer-video/src/video_info.rs index 64233ebb8..41fe1c43c 100644 --- a/gstreamer-video/src/video_info.rs +++ b/gstreamer-video/src/video_info.rs @@ -217,6 +217,7 @@ impl fmt::Display for ::VideoChromaSite { impl ::VideoTransferFunction { #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] pub fn from_iso(iso: u32) -> Result<::VideoTransferFunction, glib::BoolError> { assert_initialized_main_thread!(); @@ -230,11 +231,13 @@ impl ::VideoTransferFunction { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] pub fn to_iso(&self) -> u32 { unsafe { gst_video_sys::gst_video_transfer_function_to_iso(self.to_glib()) } } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] pub fn is_equivalent( &self, from_bpp: u32, @@ -254,6 +257,7 @@ impl ::VideoTransferFunction { impl ::VideoColorMatrix { #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] pub fn from_iso(iso: u32) -> Result<::VideoColorMatrix, glib::BoolError> { assert_initialized_main_thread!(); @@ -267,6 +271,7 @@ impl ::VideoColorMatrix { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] pub fn to_iso(&self) -> u32 { unsafe { gst_video_sys::gst_video_color_matrix_to_iso(self.to_glib()) } } @@ -274,6 +279,7 @@ impl ::VideoColorMatrix { impl ::VideoColorPrimaries { #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] pub fn from_iso(iso: u32) -> Result<::VideoColorPrimaries, glib::BoolError> { assert_initialized_main_thread!(); @@ -287,6 +293,7 @@ impl ::VideoColorPrimaries { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] pub fn to_iso(&self) -> u32 { unsafe { gst_video_sys::gst_video_color_primaries_to_iso(self.to_glib()) } } @@ -339,6 +346,7 @@ impl fmt::Debug for VideoInfo { .field("multiview_flags", &self.multiview_flags()); #[cfg(any(feature = "v1_12", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] { b.field("field_order", &self.field_order()); }; @@ -365,6 +373,7 @@ pub struct VideoInfoBuilder<'a> { multiview_mode: Option<::VideoMultiviewMode>, multiview_flags: Option<::VideoMultiviewFlags>, #[cfg(any(feature = "v1_12", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] field_order: Option<::VideoFieldOrder>, } @@ -511,6 +520,7 @@ impl<'a> VideoInfoBuilder<'a> { } #[cfg(any(feature = "v1_12", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] { if let Some(field_order) = self.field_order { let ptr = &mut info.ABI._gst_reserved as *mut _ as *mut i32; @@ -607,6 +617,7 @@ impl<'a> VideoInfoBuilder<'a> { } #[cfg(any(feature = "v1_12", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn field_order(self, field_order: ::VideoFieldOrder) -> Self { Self { field_order: Some(field_order), @@ -620,6 +631,7 @@ impl VideoInfo { assert_initialized_main_thread!(); #[cfg(not(any(feature = "v1_12", feature = "dox")))] + #[cfg_attr(feature = "dox", doc(cfg(not(feature = "v1_12"))))] { VideoInfoBuilder { format, @@ -640,6 +652,7 @@ impl VideoInfo { } } #[cfg(any(feature = "v1_12", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] { VideoInfoBuilder { format, @@ -715,6 +728,7 @@ impl VideoInfo { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn field_height(&self) -> u32 { if self.0.interlace_mode == gst_video_sys::GST_VIDEO_INTERLACE_MODE_ALTERNATE { (self.0.height as u32 + 1) / 2 @@ -778,6 +792,7 @@ impl VideoInfo { } #[cfg(any(feature = "v1_12", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn field_order(&self) -> ::VideoFieldOrder { unsafe { let ptr = &self.0.ABI._gst_reserved as *const _ as *const i32; @@ -988,6 +1003,7 @@ impl glib::translate::FromGlibPtrFull<*mut gst_video_sys::GstVideoInfo> for Vide } #[cfg(any(feature = "v1_12", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl ::VideoFieldOrder { pub fn to_str<'a>(self) -> &'a str { unsafe { @@ -1001,6 +1017,7 @@ impl ::VideoFieldOrder { } #[cfg(any(feature = "v1_12", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl str::FromStr for ::VideoFieldOrder { type Err = glib::error::BoolError; @@ -1016,6 +1033,7 @@ impl str::FromStr for ::VideoFieldOrder { } #[cfg(any(feature = "v1_12", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl fmt::Display for ::VideoFieldOrder { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { f.write_str((*self).to_str()) @@ -1132,6 +1150,7 @@ mod tests { } #[cfg(any(feature = "v1_12", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[test] fn test_video_align() { gst::init().unwrap(); @@ -1151,6 +1170,7 @@ mod tests { } #[cfg(any(feature = "v1_12", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[test] fn test_display() { use std::str::FromStr; diff --git a/gstreamer-video/src/video_meta.rs b/gstreamer-video/src/video_meta.rs index be3dfa866..a69ff43c1 100644 --- a/gstreamer-video/src/video_meta.rs +++ b/gstreamer-video/src/video_meta.rs @@ -482,15 +482,19 @@ impl fmt::Debug for VideoOverlayCompositionMeta { } #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[repr(transparent)] pub struct VideoCaptionMeta(gst_video_sys::GstVideoCaptionMeta); #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", 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")))] unsafe impl Sync for VideoCaptionMeta {} #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl VideoCaptionMeta { pub fn add<'a>( buffer: &'a mut gst::BufferRef, @@ -525,6 +529,7 @@ impl VideoCaptionMeta { } #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] unsafe impl MetaAPI for VideoCaptionMeta { type GstType = gst_video_sys::GstVideoCaptionMeta; @@ -534,6 +539,7 @@ unsafe impl MetaAPI for VideoCaptionMeta { } #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl fmt::Debug for VideoCaptionMeta { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("VideoCaptionMeta") @@ -544,15 +550,19 @@ impl fmt::Debug for VideoCaptionMeta { } #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[repr(transparent)] pub struct VideoAFDMeta(gst_video_sys::GstVideoAFDMeta); #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", 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")))] unsafe impl Sync for VideoAFDMeta {} #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl VideoAFDMeta { pub fn add( buffer: &mut gst::BufferRef, @@ -588,6 +598,7 @@ impl VideoAFDMeta { } #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] unsafe impl MetaAPI for VideoAFDMeta { type GstType = gst_video_sys::GstVideoAFDMeta; @@ -597,6 +608,7 @@ unsafe impl MetaAPI for VideoAFDMeta { } #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl fmt::Debug for VideoAFDMeta { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("VideoAFDMeta") @@ -608,15 +620,19 @@ impl fmt::Debug for VideoAFDMeta { } #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[repr(transparent)] pub struct VideoBarMeta(gst_video_sys::GstVideoBarMeta); #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", 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")))] unsafe impl Sync for VideoBarMeta {} #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl VideoBarMeta { pub fn add( buffer: &mut gst::BufferRef, @@ -658,6 +674,7 @@ impl VideoBarMeta { } #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] unsafe impl MetaAPI for VideoBarMeta { type GstType = gst_video_sys::GstVideoBarMeta; @@ -667,6 +684,7 @@ unsafe impl MetaAPI for VideoBarMeta { } #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl fmt::Debug for VideoBarMeta { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("VideoBarMeta") diff --git a/gstreamer-video/src/video_time_code.rs b/gstreamer-video/src/video_time_code.rs index fd9cdfc79..ddd1da2e4 100644 --- a/gstreamer-video/src/video_time_code.rs +++ b/gstreamer-video/src/video_time_code.rs @@ -21,10 +21,12 @@ use std::fmt; use std::mem; use std::ptr; #[cfg(any(feature = "v1_12", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] use std::str; use VideoTimeCodeFlags; #[cfg(any(feature = "v1_12", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] use VideoTimeCodeInterval; pub struct VideoTimeCode(gst_video_sys::GstVideoTimeCode); @@ -72,6 +74,7 @@ impl VideoTimeCode { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn from_date_time( fps: gst::Fraction, dt: &glib::DateTime, @@ -183,6 +186,7 @@ impl ValidVideoTimeCode { } // #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] // pub fn from_date_time( // fps: gst::Fraction, // dt: &glib::DateTime, @@ -201,6 +205,7 @@ impl ValidVideoTimeCode { } #[cfg(any(feature = "v1_12", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn add_interval( &self, tc_inter: &VideoTimeCodeInterval, @@ -481,6 +486,7 @@ generic_impl!(VideoTimeCode); generic_impl!(ValidVideoTimeCode); #[cfg(any(feature = "v1_12", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] impl str::FromStr for VideoTimeCode { type Err = glib::error::BoolError; diff --git a/gstreamer-webrtc/src/lib.rs b/gstreamer-webrtc/src/lib.rs index 9c1ea31ab..28bbbbc54 100644 --- a/gstreamer-webrtc/src/lib.rs +++ b/gstreamer-webrtc/src/lib.rs @@ -38,6 +38,7 @@ mod auto; pub use auto::*; #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] mod web_rtc_data_channel; mod web_rtc_session_description; diff --git a/gstreamer/src/bin.rs b/gstreamer/src/bin.rs index 519230a4a..d10a605c4 100644 --- a/gstreamer/src/bin.rs +++ b/gstreamer/src/bin.rs @@ -35,6 +35,7 @@ pub trait GstBinExtManual: 'static { ) -> SignalHandlerId; #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> ::Iterator; fn iterate_all_by_interface(&self, iface: glib::types::Type) -> ::Iterator; fn iterate_elements(&self) -> ::Iterator; @@ -110,6 +111,7 @@ impl> GstBinExtManual for O { } #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> ::Iterator { unsafe { from_glib_full(gst_sys::gst_bin_iterate_all_by_element_factory_name( diff --git a/gstreamer/src/buffer.rs b/gstreamer/src/buffer.rs index 1743ef73d..89bf88f73 100644 --- a/gstreamer/src/buffer.rs +++ b/gstreamer/src/buffer.rs @@ -1292,6 +1292,7 @@ mod tests { } #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[test] fn test_meta_foreach() { ::init().unwrap(); @@ -1324,6 +1325,7 @@ mod tests { } #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[test] fn test_meta_foreach_mut() { ::init().unwrap(); diff --git a/gstreamer/src/bufferlist.rs b/gstreamer/src/bufferlist.rs index 9bd0c3540..c7a0b92e5 100644 --- a/gstreamer/src/bufferlist.rs +++ b/gstreamer/src/bufferlist.rs @@ -69,6 +69,7 @@ impl BufferListRef { } #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn get_writable(&mut self, idx: u32) -> Option<&mut BufferRef> { unsafe { let ptr = gst_sys::gst_buffer_list_get_writable(self.as_mut_ptr(), idx); @@ -85,6 +86,7 @@ impl BufferListRef { } #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn calculate_size(&self) -> usize { unsafe { gst_sys::gst_buffer_list_calculate_size(self.as_mut_ptr()) as usize } } diff --git a/gstreamer/src/caps.rs b/gstreamer/src/caps.rs index c1f5ced67..1fdd33a9a 100644 --- a/gstreamer/src/caps.rs +++ b/gstreamer/src/caps.rs @@ -254,6 +254,7 @@ impl CapsRef { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn set_features_simple(&mut self, features: Option) { unsafe { gst_sys::gst_caps_set_features_simple( diff --git a/gstreamer/src/clock.rs b/gstreamer/src/clock.rs index a2bd02502..298df4210 100644 --- a/gstreamer/src/clock.rs +++ b/gstreamer/src/clock.rs @@ -8,6 +8,7 @@ use glib; #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] use glib::prelude::*; use glib::translate::*; use glib::IsA; @@ -71,11 +72,13 @@ impl ClockId { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn get_clock(&self) -> Option { unsafe { from_glib_full(gst_sys::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")))] pub fn uses_clock>(&self, clock: &P) -> bool { unsafe { from_glib(gst_sys::gst_clock_id_uses_clock( diff --git a/gstreamer/src/element.rs b/gstreamer/src/element.rs index 8abed30eb..3235ac11a 100644 --- a/gstreamer/src/element.rs +++ b/gstreamer/src/element.rs @@ -12,9 +12,11 @@ use once_cell::sync::Lazy; use glib; #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use glib::object::Cast; use glib::object::IsA; #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use glib::translate::FromGlibPtrBorrow; use glib::translate::{ from_glib, from_glib_full, from_glib_none, FromGlib, FromGlibPtrContainer, ToGlib, ToGlibPtr, @@ -39,17 +41,21 @@ use StateChangeSuccess; use std::ffi::CStr; #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use std::future::Future; #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use std::marker::Unpin; use std::mem; use std::num::NonZeroU64; #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use std::pin::Pin; use libc; #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use glib_sys; use gobject_sys; use gst_sys; @@ -175,6 +181,7 @@ pub trait ElementExtManual: 'static { fn get_element_flags(&self) -> ElementFlags; #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[allow(clippy::too_many_arguments)] fn message_full_with_details( &self, @@ -204,6 +211,7 @@ pub trait ElementExtManual: 'static { fn num_src_pads(&self) -> u16; #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn add_property_deep_notify_watch( &self, property_name: Option<&str>, @@ -211,6 +219,7 @@ pub trait ElementExtManual: 'static { ) -> NotifyWatchId; #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn add_property_notify_watch( &self, property_name: Option<&str>, @@ -218,6 +227,7 @@ pub trait ElementExtManual: 'static { ) -> NotifyWatchId; #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn remove_property_notify_watch(&self, watch_id: NotifyWatchId); fn query_convert, U: SpecificFormattedValue>( @@ -252,11 +262,13 @@ pub trait ElementExtManual: 'static { ) -> Result<(), glib::error::BoolError>; #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn call_async(&self, func: F) where F: FnOnce(&Self) + Send + 'static; #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn call_async_future( &self, func: F, @@ -421,6 +433,7 @@ impl> ElementExtManual for O { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn message_full_with_details( &self, type_: ElementMessageType, @@ -565,6 +578,7 @@ impl> ElementExtManual for O { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn add_property_deep_notify_watch( &self, property_name: Option<&str>, @@ -581,6 +595,7 @@ impl> ElementExtManual for O { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn add_property_notify_watch( &self, property_name: Option<&str>, @@ -597,6 +612,7 @@ impl> ElementExtManual for O { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn remove_property_notify_watch(&self, watch_id: NotifyWatchId) { unsafe { gst_sys::gst_element_remove_property_notify_watch( @@ -769,6 +785,7 @@ impl> ElementExtManual for O { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn call_async(&self, func: F) where F: FnOnce(&Self) + Send + 'static, @@ -802,6 +819,7 @@ impl> ElementExtManual for O { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] fn call_async_future( &self, func: F, diff --git a/gstreamer/src/event.rs b/gstreamer/src/event.rs index 649a06c7f..aee910adf 100644 --- a/gstreamer/src/event.rs +++ b/gstreamer/src/event.rs @@ -23,6 +23,7 @@ use glib::translate::{from_glib, from_glib_full, from_glib_none, ToGlib, ToGlibP use glib::value::ToSendValue; #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] use glib::translate::FromGlibPtrContainer; use EventType; @@ -396,6 +397,7 @@ impl<'a> StreamStart<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn get_stream(&self) -> Option<::Stream> { unsafe { let mut stream = ptr::null_mut(); @@ -458,6 +460,7 @@ impl<'a> Segment<'a> { declare_concrete_event!(StreamCollection); impl<'a> StreamCollection<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[allow(clippy::new_ret_no_self)] pub fn new(stream_collection: &::StreamCollection) -> Event { skip_assert_initialized!(); @@ -465,12 +468,14 @@ impl<'a> StreamCollection<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn builder(stream_collection: &::StreamCollection) -> StreamCollectionBuilder { assert_initialized_main_thread!(); StreamCollectionBuilder::new(stream_collection) } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn get_stream_collection(&self) -> ::StreamCollection { unsafe { let mut stream_collection = ptr::null_mut(); @@ -578,6 +583,7 @@ impl<'a> SinkMessage<'a> { declare_concrete_event!(StreamGroupDone); impl<'a> StreamGroupDone<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[allow(clippy::new_ret_no_self)] pub fn new(group_id: GroupId) -> Event { skip_assert_initialized!(); @@ -585,12 +591,14 @@ impl<'a> StreamGroupDone<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn builder(group_id: GroupId) -> StreamGroupDoneBuilder<'a> { assert_initialized_main_thread!(); StreamGroupDoneBuilder::new(group_id) } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn get_group_id(&self) -> GroupId { unsafe { let mut group_id = mem::MaybeUninit::uninit(); @@ -875,6 +883,7 @@ impl<'a> Seek<'a> { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn get_trickmode_interval(&self) -> ::ClockTime { unsafe { let mut trickmode_interval = mem::MaybeUninit::uninit(); @@ -1021,6 +1030,7 @@ impl<'a> TocSelect<'a> { declare_concrete_event!(SelectStreams); impl<'a> SelectStreams<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[allow(clippy::new_ret_no_self)] pub fn new(streams: &'a [&'a str]) -> Event { skip_assert_initialized!(); @@ -1028,12 +1038,14 @@ impl<'a> SelectStreams<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn builder(streams: &'a [&'a str]) -> SelectStreamsBuilder { assert_initialized_main_thread!(); SelectStreamsBuilder::new(streams) } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn get_streams(&self) -> Vec { unsafe { let mut streams = ptr::null_mut(); @@ -1264,6 +1276,7 @@ pub struct StreamStartBuilder<'a> { flags: Option<::StreamFlags>, group_id: Option, #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] stream: Option<::Stream>, } @@ -1276,6 +1289,7 @@ impl<'a> StreamStartBuilder<'a> { flags: None, group_id: None, #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] stream: None, } } @@ -1295,6 +1309,7 @@ impl<'a> StreamStartBuilder<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn stream(self, stream: ::Stream) -> Self { Self { stream: Some(stream), @@ -1312,6 +1327,7 @@ impl<'a> StreamStartBuilder<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] { if let Some(ref stream) = s.stream { gst_sys::gst_event_set_stream(ev, stream.to_glib_none().0); @@ -1359,12 +1375,14 @@ impl<'a> SegmentBuilder<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub struct StreamCollectionBuilder<'a> { builder: EventBuilder<'a>, stream_collection: &'a ::StreamCollection, } #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> StreamCollectionBuilder<'a> { fn new(stream_collection: &'a ::StreamCollection) -> Self { skip_assert_initialized!(); @@ -1448,12 +1466,14 @@ impl<'a> SinkMessageBuilder<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub struct StreamGroupDoneBuilder<'a> { builder: EventBuilder<'a>, group_id: GroupId, } #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> StreamGroupDoneBuilder<'a> { fn new(group_id: GroupId) -> Self { skip_assert_initialized!(); @@ -1655,6 +1675,7 @@ impl<'a> SeekBuilder<'a> { ); #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] { if let Some(trickmode_interval) = s.trickmode_interval { gst_sys::gst_event_set_seek_trickmode_interval( @@ -1770,12 +1791,14 @@ impl<'a> TocSelectBuilder<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub struct SelectStreamsBuilder<'a> { builder: EventBuilder<'a>, streams: &'a [&'a str], } #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> SelectStreamsBuilder<'a> { fn new(streams: &'a [&'a str]) -> Self { skip_assert_initialized!(); diff --git a/gstreamer/src/functions.rs b/gstreamer/src/functions.rs index 37fdbc5ce..f1ea01dae 100644 --- a/gstreamer/src/functions.rs +++ b/gstreamer/src/functions.rs @@ -123,6 +123,7 @@ pub fn parse_launchv_full( } #[cfg(any(feature = "v1_12", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn calculate_linear_regression( xy: &[(u64, u64)], temp: Option<&mut [(u64, u64)]>, @@ -172,6 +173,7 @@ pub fn calculate_linear_regression( } #[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] pub fn type_is_plugin_api(type_: glib::types::Type) -> Option<::PluginAPIFlags> { assert_initialized_main_thread!(); unsafe { diff --git a/gstreamer/src/lib.rs b/gstreamer/src/lib.rs index b95d006dd..b4c0b8a0b 100644 --- a/gstreamer/src/lib.rs +++ b/gstreamer/src/lib.rs @@ -11,6 +11,7 @@ #[macro_use] extern crate bitflags; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[macro_use] extern crate cfg_if; extern crate libc; @@ -120,8 +121,10 @@ mod tags_serde; pub mod meta; #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub use meta::MetaSeqnum; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use meta::ReferenceTimestampMeta; pub use meta::{Meta, MetaAPI, MetaRef, MetaRefMut, ParentBufferMeta, ProtectionMeta}; pub mod buffer; @@ -157,8 +160,10 @@ mod static_pad_template; pub use static_pad_template::*; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub mod promise; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub use promise::{Promise, PromiseError}; pub mod bus; @@ -176,6 +181,7 @@ pub use self::allocation_params::AllocationParams; // OS dependent Bus extensions (also import the other plateform mod for doc) #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] cfg_if! { if #[cfg(unix)] { mod bus_unix; @@ -222,6 +228,7 @@ pub use object::GstObjectExtManual; // OS dependent Bus extensions (also import the other plateform trait for doc) #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] cfg_if! { if #[cfg(unix)] { pub use bus_unix::UnixBusExtManual; @@ -253,8 +260,10 @@ pub use tag_setter::TagSetterExtManual; mod plugin; pub use plugin::GstPluginExtManual; #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub mod stream; #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub mod stream_collection; mod typefind; @@ -347,6 +356,7 @@ pub mod prelude { // OS dependent Bus extensions (also import the other plateform trait for doc) #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] cfg_if! { if #[cfg(unix)] { pub use bus_unix::UnixBusExtManual; diff --git a/gstreamer/src/message.rs b/gstreamer/src/message.rs index f354131c9..7e836cecf 100644 --- a/gstreamer/src/message.rs +++ b/gstreamer/src/message.rs @@ -272,6 +272,7 @@ impl<'a> Error<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn get_details(&self) -> Option<&StructureRef> { unsafe { let mut details = ptr::null(); @@ -321,6 +322,7 @@ impl<'a> Warning<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn get_details(&self) -> Option<&StructureRef> { unsafe { let mut details = ptr::null(); @@ -370,6 +372,7 @@ impl<'a> Info<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn get_details(&self) -> Option<&StructureRef> { unsafe { let mut details = ptr::null(); @@ -1332,6 +1335,7 @@ impl<'a> DeviceRemoved<'a> { declare_concrete_message!(PropertyNotify); impl<'a> PropertyNotify<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[allow(clippy::new_ret_no_self)] pub fn new(property_name: &str) -> Message { skip_assert_initialized!(); @@ -1339,12 +1343,14 @@ impl<'a> PropertyNotify<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn builder(property_name: &str) -> PropertyNotifyBuilder { assert_initialized_main_thread!(); PropertyNotifyBuilder::new(property_name) } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn get(&self) -> (Object, &str, Option<&'a glib::Value>) { unsafe { let mut object = ptr::null_mut(); @@ -1374,6 +1380,7 @@ impl<'a> PropertyNotify<'a> { declare_concrete_message!(StreamCollection); impl<'a> StreamCollection<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[allow(clippy::new_ret_no_self)] pub fn new(collection: &::StreamCollection) -> Message { skip_assert_initialized!(); @@ -1381,12 +1388,14 @@ impl<'a> StreamCollection<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn builder(collection: &::StreamCollection) -> StreamCollectionBuilder { assert_initialized_main_thread!(); StreamCollectionBuilder::new(collection) } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn get_stream_collection(&self) -> ::StreamCollection { unsafe { let mut collection = ptr::null_mut(); @@ -1401,6 +1410,7 @@ impl<'a> StreamCollection<'a> { declare_concrete_message!(StreamsSelected); impl<'a> StreamsSelected<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[allow(clippy::new_ret_no_self)] pub fn new(collection: &::StreamCollection) -> Message { skip_assert_initialized!(); @@ -1408,12 +1418,14 @@ impl<'a> StreamsSelected<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn builder(collection: &::StreamCollection) -> StreamsSelectedBuilder { assert_initialized_main_thread!(); StreamsSelectedBuilder::new(collection) } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn get_stream_collection(&self) -> ::StreamCollection { unsafe { let mut collection = ptr::null_mut(); @@ -1425,6 +1437,7 @@ impl<'a> StreamsSelected<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn get_streams(&self) -> Vec<::Stream> { unsafe { let n = gst_sys::gst_message_streams_selected_get_size(self.as_mut_ptr()); @@ -1444,6 +1457,7 @@ impl<'a> StreamsSelected<'a> { declare_concrete_message!(Redirect); impl<'a> Redirect<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[allow(clippy::new_ret_no_self)] pub fn new(location: &str) -> Message { skip_assert_initialized!(); @@ -1451,12 +1465,14 @@ impl<'a> Redirect<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn builder(location: &str) -> RedirectBuilder { assert_initialized_main_thread!(); RedirectBuilder::new(location) } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn get_entries(&self) -> Vec<(&str, Option, Option<&StructureRef>)> { unsafe { let n = gst_sys::gst_message_get_num_redirect_entries(self.as_mut_ptr()); @@ -1495,6 +1511,7 @@ impl<'a> Redirect<'a> { declare_concrete_message!(DeviceChanged); impl<'a> DeviceChanged<'a> { #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[allow(clippy::new_ret_no_self)] pub fn new(device: &'a ::Device, changed_device: &'a ::Device) -> Message { skip_assert_initialized!(); @@ -1502,12 +1519,14 @@ impl<'a> DeviceChanged<'a> { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn builder(device: &'a ::Device, changed_device: &'a ::Device) -> DeviceChangedBuilder<'a> { assert_initialized_main_thread!(); DeviceChangedBuilder::new(device, changed_device) } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn get_device_changed(&self) -> (::Device, ::Device) { unsafe { let mut device = ptr::null_mut(); @@ -1555,6 +1574,7 @@ impl<'a> MessageBuilder<'a> { } #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn other_fields(self, other_fields: &[(&'a str, &'a dyn ToSendValue)]) -> Self { Self { other_fields: self @@ -1587,6 +1607,7 @@ macro_rules! message_builder_generic_impl { } #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[allow(clippy::needless_update)] pub fn other_fields(self, other_fields: &[(&'a str, &'a dyn ToSendValue)]) -> Self { Self { @@ -1605,6 +1626,7 @@ macro_rules! message_builder_generic_impl { } #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] { if !self.builder.other_fields.is_empty() { let structure = gst_sys::gst_message_writable_structure(msg); @@ -1676,6 +1698,7 @@ impl<'a, T: MessageErrorDomain> ErrorBuilder<'a, T> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn details(self, details: Structure) -> Self { Self { details: Some(details), @@ -1685,6 +1708,7 @@ impl<'a, T: MessageErrorDomain> ErrorBuilder<'a, T> { message_builder_generic_impl!(|s: &mut Self, src| { #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] { let details = match s.details.take() { None => ptr::null_mut(), @@ -1742,6 +1766,7 @@ impl<'a, T: MessageErrorDomain> WarningBuilder<'a, T> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn details(self, details: Structure) -> Self { Self { details: Some(details), @@ -1751,6 +1776,7 @@ impl<'a, T: MessageErrorDomain> WarningBuilder<'a, T> { message_builder_generic_impl!(|s: &mut Self, src| { #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] { let details = match s.details.take() { None => ptr::null_mut(), @@ -1808,6 +1834,7 @@ impl<'a, T: MessageErrorDomain> InfoBuilder<'a, T> { } #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn details(self, details: Structure) -> Self { Self { details: Some(details), @@ -1817,6 +1844,7 @@ impl<'a, T: MessageErrorDomain> InfoBuilder<'a, T> { message_builder_generic_impl!(|s: &mut Self, src| { #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] { let details = match s.details.take() { None => ptr::null_mut(), @@ -2588,6 +2616,7 @@ impl<'a> DeviceRemovedBuilder<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub struct PropertyNotifyBuilder<'a> { builder: MessageBuilder<'a>, property_name: &'a str, @@ -2595,6 +2624,7 @@ pub struct PropertyNotifyBuilder<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> PropertyNotifyBuilder<'a> { fn new(property_name: &'a str) -> Self { skip_assert_initialized!(); @@ -2627,12 +2657,14 @@ impl<'a> PropertyNotifyBuilder<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub struct StreamCollectionBuilder<'a> { builder: MessageBuilder<'a>, collection: &'a ::StreamCollection, } #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> StreamCollectionBuilder<'a> { fn new(collection: &'a ::StreamCollection) -> Self { skip_assert_initialized!(); @@ -2651,15 +2683,19 @@ impl<'a> StreamCollectionBuilder<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub struct StreamsSelectedBuilder<'a> { builder: MessageBuilder<'a>, #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] collection: &'a ::StreamCollection, #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] streams: Option<&'a [&'a ::Stream]>, } #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> StreamsSelectedBuilder<'a> { fn new(collection: &'a ::StreamCollection) -> Self { skip_assert_initialized!(); @@ -2689,6 +2725,7 @@ impl<'a> StreamsSelectedBuilder<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub struct RedirectBuilder<'a> { builder: MessageBuilder<'a>, location: &'a str, @@ -2699,6 +2736,7 @@ pub struct RedirectBuilder<'a> { } #[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> RedirectBuilder<'a> { fn new(location: &'a str) -> Self { skip_assert_initialized!(); @@ -2771,6 +2809,7 @@ impl<'a> RedirectBuilder<'a> { } #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub struct DeviceChangedBuilder<'a> { builder: MessageBuilder<'a>, device: &'a ::Device, @@ -2778,6 +2817,7 @@ pub struct DeviceChangedBuilder<'a> { } #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl<'a> DeviceChangedBuilder<'a> { fn new(device: &'a ::Device, changed_device: &'a ::Device) -> Self { skip_assert_initialized!(); diff --git a/gstreamer/src/meta.rs b/gstreamer/src/meta.rs index 877043aa7..199ab9558 100644 --- a/gstreamer/src/meta.rs +++ b/gstreamer/src/meta.rs @@ -13,14 +13,18 @@ use std::ops; use Buffer; use BufferRef; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use Caps; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use CapsRef; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use ClockTime; use glib; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use glib::translate::ToGlib; use glib::translate::{from_glib, from_glib_none, FromGlib, ToGlibPtr}; use glib_sys; @@ -71,6 +75,7 @@ pub unsafe trait MetaAPI: Sync + Send + Sized { } #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[derive(Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq)] pub struct MetaSeqnum(u64); @@ -151,6 +156,7 @@ impl<'a, T: MetaAPI> MetaRef<'a, T> { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn get_seqnum(&self) -> MetaSeqnum { unsafe { let meta = self.meta as *const _ as *const gst_sys::GstMeta; @@ -186,6 +192,7 @@ impl<'a, T: MetaAPI, U> MetaRefMut<'a, T, U> { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn get_seqnum(&self) -> u64 { unsafe { let meta = self.meta as *const _ as *const gst_sys::GstMeta; @@ -342,15 +349,19 @@ impl fmt::Debug for ProtectionMeta { } #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[repr(transparent)] pub struct ReferenceTimestampMeta(gst_sys::GstReferenceTimestampMeta); #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] unsafe impl Send for ReferenceTimestampMeta {} #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] unsafe impl Sync for ReferenceTimestampMeta {} #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] impl ReferenceTimestampMeta { pub fn add<'a>( buffer: &'a mut BufferRef, @@ -389,6 +400,7 @@ impl ReferenceTimestampMeta { } #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] unsafe impl MetaAPI for ReferenceTimestampMeta { type GstType = gst_sys::GstReferenceTimestampMeta; @@ -398,6 +410,7 @@ unsafe impl MetaAPI for ReferenceTimestampMeta { } #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] impl fmt::Debug for ReferenceTimestampMeta { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("ReferenceTimestampMeta") diff --git a/gstreamer/src/pad_template.rs b/gstreamer/src/pad_template.rs index 795024c64..71b509c0b 100644 --- a/gstreamer/src/pad_template.rs +++ b/gstreamer/src/pad_template.rs @@ -7,18 +7,23 @@ // except according to those terms. #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use glib::translate::*; use PadTemplate; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use StaticPadTemplate; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use glib; #[cfg(any(feature = "v1_14", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] use gst_sys; impl PadTemplate { #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] pub fn from_static_pad_template_with_gtype( pad_template: &StaticPadTemplate, pad_type: glib::types::Type, diff --git a/gstreamer/src/param_spec.rs b/gstreamer/src/param_spec.rs index e9c0b5aa6..2717a8001 100644 --- a/gstreamer/src/param_spec.rs +++ b/gstreamer/src/param_spec.rs @@ -12,6 +12,7 @@ use gst_sys; pub trait GstParamSpecExt { #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn array( name: &str, nick: &str, @@ -33,6 +34,7 @@ pub trait GstParamSpecExt { impl GstParamSpecExt for glib::ParamSpec { #[cfg(any(feature = "v1_14", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] fn array( name: &str, nick: &str, diff --git a/gstreamer/src/query.rs b/gstreamer/src/query.rs index 26058d63c..b7fa4e6cf 100644 --- a/gstreamer/src/query.rs +++ b/gstreamer/src/query.rs @@ -1337,6 +1337,7 @@ impl Context { declare_concrete_query!(Bitrate, T); #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl Bitrate { pub fn new() -> Self { assert_initialized_main_thread!(); @@ -1345,6 +1346,7 @@ impl Bitrate { } #[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl Default for Bitrate { fn default() -> Self { Self::new() @@ -1353,6 +1355,7 @@ impl Default for Bitrate { impl Bitrate { #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn get_bitrate(&self) -> u32 { unsafe { let mut bitrate = mem::MaybeUninit::uninit(); @@ -1364,6 +1367,7 @@ impl Bitrate { impl Bitrate { #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn set_bitrate(&mut self, bitrate: u32) { unsafe { gst_sys::gst_query_set_bitrate(self.0.as_mut_ptr(), bitrate); diff --git a/gstreamer/src/sample.rs b/gstreamer/src/sample.rs index c69d2ecae..0239efa04 100644 --- a/gstreamer/src/sample.rs +++ b/gstreamer/src/sample.rs @@ -182,11 +182,13 @@ impl SampleRef { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn set_buffer(&mut self, buffer: Option<&Buffer>) { unsafe { gst_sys::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")))] pub fn set_buffer_list(&mut self, buffer_list: Option<&BufferList>) { unsafe { gst_sys::gst_sample_set_buffer_list(self.as_mut_ptr(), buffer_list.to_glib_none().0) @@ -194,16 +196,19 @@ impl SampleRef { } #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] pub fn set_caps(&mut self, caps: Option<&Caps>) { unsafe { gst_sys::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")))] pub fn set_segment(&mut self, segment: Option<&Segment>) { unsafe { gst_sys::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")))] pub fn set_info(&mut self, info: Option) { unsafe { gst_sys::gst_sample_set_info(