Revert "Remove unnecessary dox feature"

This reverts commit 9dd8bd9095.
This commit is contained in:
Guillaume Gomez 2020-11-27 14:37:49 +01:00
parent 2d87561193
commit 8f9d76bb8c
53 changed files with 577 additions and 577 deletions

View file

@ -229,8 +229,8 @@ impl AppSrc {
ret.into_result() ret.into_result()
} }
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn push_buffer_list( pub fn push_buffer_list(
&self, &self,
list: gst::BufferList, list: gst::BufferList,

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;

View file

@ -34,8 +34,8 @@ pub trait AudioDecoderExtManual: 'static {
frames: i32, frames: i32,
) -> Result<gst::FlowSuccess, gst::FlowError>; ) -> Result<gst::FlowSuccess, gst::FlowError>;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn finish_subframe( fn finish_subframe(
&self, &self,
buffer: Option<gst::Buffer>, buffer: Option<gst::Buffer>,
@ -43,8 +43,8 @@ pub trait AudioDecoderExtManual: 'static {
fn negotiate(&self) -> Result<(), gst::FlowError>; fn negotiate(&self) -> Result<(), gst::FlowError>;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn set_output_caps(&self, caps: &gst::Caps) -> Result<(), gst::FlowError>; fn set_output_caps(&self, caps: &gst::Caps) -> Result<(), gst::FlowError>;
fn set_output_format(&self, info: &AudioInfo) -> Result<(), gst::FlowError>; fn set_output_format(&self, info: &AudioInfo) -> Result<(), gst::FlowError>;
@ -80,8 +80,8 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExtManual for O {
ret.into_result() ret.into_result()
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn finish_subframe( fn finish_subframe(
&self, &self,
buffer: Option<gst::Buffer>, buffer: Option<gst::Buffer>,
@ -108,8 +108,8 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExtManual for O {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn set_output_caps(&self, caps: &gst::Caps) -> Result<(), gst::FlowError> { fn set_output_caps(&self, caps: &gst::Caps) -> Result<(), gst::FlowError> {
unsafe { unsafe {
let ret = from_glib(ffi::gst_audio_decoder_set_output_caps( let ret = from_glib(ffi::gst_audio_decoder_set_output_caps(

View file

@ -8,16 +8,16 @@
// except according to those terms. // except according to those terms.
use std::fmt; use std::fmt;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::ptr; use std::ptr;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::slice; use std::slice;
use glib::translate::{from_glib, ToGlib}; use glib::translate::{from_glib, ToGlib};
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::translate::{from_glib_none, ToGlibPtr}; use glib::translate::{from_glib_none, ToGlibPtr};
use gst::prelude::*; use gst::prelude::*;
@ -75,20 +75,20 @@ impl fmt::Debug for AudioClippingMeta {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[repr(transparent)] #[repr(transparent)]
pub struct AudioMeta(ffi::GstAudioMeta); pub struct AudioMeta(ffi::GstAudioMeta);
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl Send for AudioMeta {} unsafe impl Send for AudioMeta {}
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl Sync for AudioMeta {} unsafe impl Sync for AudioMeta {}
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl AudioMeta { impl AudioMeta {
pub fn add<'a>( pub fn add<'a>(
buffer: &'a mut gst::BufferRef, buffer: &'a mut gst::BufferRef,
@ -196,8 +196,8 @@ impl AudioMeta {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl MetaAPI for AudioMeta { unsafe impl MetaAPI for AudioMeta {
type GstType = ffi::GstAudioMeta; type GstType = ffi::GstAudioMeta;
@ -206,8 +206,8 @@ unsafe impl MetaAPI for AudioMeta {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl fmt::Debug for AudioMeta { impl fmt::Debug for AudioMeta {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("AudioMeta") f.debug_struct("AudioMeta")

View file

@ -12,8 +12,8 @@ use glib::translate::*;
use std::mem; use std::mem;
impl AudioStreamAlign { impl AudioStreamAlign {
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn process( pub fn process(
&mut self, &mut self,
discont: bool, discont: bool,

View file

@ -30,8 +30,8 @@ pub fn audio_buffer_clip(
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn audio_buffer_truncate( pub fn audio_buffer_truncate(
buffer: gst::Buffer, buffer: gst::Buffer,
bpf: u32, bpf: u32,

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;
@ -41,16 +41,16 @@ mod audio_meta;
pub use crate::audio_meta::*; pub use crate::audio_meta::*;
mod audio_channel_position; mod audio_channel_position;
pub use crate::audio_channel_position::*; pub use crate::audio_channel_position::*;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
mod audio_stream_align; mod audio_stream_align;
mod functions; mod functions;
pub use crate::functions::*; pub use crate::functions::*;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub mod audio_buffer; pub mod audio_buffer;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub use audio_buffer::{AudioBuffer, AudioBufferRef}; pub use audio_buffer::{AudioBuffer, AudioBufferRef};
mod audio_decoder; mod audio_decoder;

View file

@ -83,14 +83,14 @@ impl UniqueAdapter {
self.0.copy_bytes(offset, size) self.0.copy_bytes(offset, size)
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn distance_from_discont(&self) -> u64 { pub fn distance_from_discont(&self) -> u64 {
self.0.distance_from_discont() self.0.distance_from_discont()
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn dts_at_discont(&self) -> gst::ClockTime { pub fn dts_at_discont(&self) -> gst::ClockTime {
self.0.dts_at_discont() self.0.dts_at_discont()
} }
@ -129,8 +129,8 @@ impl UniqueAdapter {
self.0.masked_scan_uint32_peek(mask, pattern, offset, size) self.0.masked_scan_uint32_peek(mask, pattern, offset, size)
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn offset_at_discont(&self) -> u64 { pub fn offset_at_discont(&self) -> u64 {
self.0.offset_at_discont() self.0.offset_at_discont()
} }
@ -143,8 +143,8 @@ impl UniqueAdapter {
self.0.prev_dts_at_offset(offset) self.0.prev_dts_at_offset(offset)
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn prev_offset(&self) -> (u64, u64) { pub fn prev_offset(&self) -> (u64, u64) {
self.0.prev_offset() self.0.prev_offset()
} }
@ -157,8 +157,8 @@ impl UniqueAdapter {
self.0.prev_pts_at_offset(offset) self.0.prev_pts_at_offset(offset)
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn pts_at_discont(&self) -> gst::ClockTime { pub fn pts_at_discont(&self) -> gst::ClockTime {
self.0.pts_at_discont() self.0.pts_at_discont()
} }

View file

@ -7,23 +7,23 @@
// except according to those terms. // except according to those terms.
use crate::Aggregator; use crate::Aggregator;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::prelude::*; use glib::prelude::*;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::signal::{connect_raw, SignalHandlerId}; use glib::signal::{connect_raw, SignalHandlerId};
use glib::translate::*; use glib::translate::*;
use glib::IsA; use glib::IsA;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::Value; use glib::Value;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::boxed::Box as Box_; use std::boxed::Box as Box_;
use std::mem; use std::mem;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::mem::transmute; use std::mem::transmute;
use std::ptr; use std::ptr;
@ -32,34 +32,34 @@ pub trait AggregatorExtManual: 'static {
fn finish_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError>; fn finish_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError>;
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn finish_buffer_list( fn finish_buffer_list(
&self, &self,
bufferlist: gst::BufferList, bufferlist: gst::BufferList,
) -> Result<gst::FlowSuccess, gst::FlowError>; ) -> Result<gst::FlowSuccess, gst::FlowError>;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn get_property_min_upstream_latency(&self) -> gst::ClockTime; fn get_property_min_upstream_latency(&self) -> gst::ClockTime;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn set_property_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime); fn set_property_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime);
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn connect_property_min_upstream_latency_notify<F: Fn(&Self) + Send + Sync + 'static>( fn connect_property_min_upstream_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self, &self,
f: F, f: F,
) -> SignalHandlerId; ) -> SignalHandlerId;
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn update_segment<F: gst::FormattedValue>(&self, segment: &gst::FormattedSegment<F>); fn update_segment<F: gst::FormattedValue>(&self, segment: &gst::FormattedSegment<F>);
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn selected_samples( fn selected_samples(
&self, &self,
pts: gst::ClockTime, pts: gst::ClockTime,
@ -68,8 +68,8 @@ pub trait AggregatorExtManual: 'static {
info: Option<&gst::StructureRef>, info: Option<&gst::StructureRef>,
); );
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn connect_samples_selected< fn connect_samples_selected<
P, P,
F: Fn( F: Fn(
@ -113,8 +113,8 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
ret.into_result() ret.into_result()
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn finish_buffer_list( fn finish_buffer_list(
&self, &self,
bufferlist: gst::BufferList, bufferlist: gst::BufferList,
@ -128,8 +128,8 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
ret.into_result() ret.into_result()
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn get_property_min_upstream_latency(&self) -> gst::ClockTime { fn get_property_min_upstream_latency(&self) -> gst::ClockTime {
unsafe { unsafe {
let mut value = Value::from_type(<gst::ClockTime as StaticType>::static_type()); let mut value = Value::from_type(<gst::ClockTime as StaticType>::static_type());
@ -145,8 +145,8 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn set_property_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime) { fn set_property_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime) {
unsafe { unsafe {
glib::gobject_ffi::g_object_set_property( glib::gobject_ffi::g_object_set_property(
@ -157,8 +157,8 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn connect_property_min_upstream_latency_notify<F: Fn(&Self) + Send + Sync + 'static>( fn connect_property_min_upstream_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self, &self,
f: F, f: F,
@ -175,8 +175,8 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
) )
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn update_segment<F: gst::FormattedValue>(&self, segment: &gst::FormattedSegment<F>) { fn update_segment<F: gst::FormattedValue>(&self, segment: &gst::FormattedSegment<F>) {
unsafe { unsafe {
ffi::gst_aggregator_update_segment( ffi::gst_aggregator_update_segment(
@ -186,8 +186,8 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn selected_samples( fn selected_samples(
&self, &self,
pts: gst::ClockTime, pts: gst::ClockTime,
@ -208,8 +208,8 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn connect_samples_selected< fn connect_samples_selected<
P, P,
F: Fn( F: Fn(
@ -279,8 +279,8 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe extern "C" fn notify_min_upstream_latency_trampoline<P, F: Fn(&P) + Send + Sync + 'static>( unsafe extern "C" fn notify_min_upstream_latency_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut ffi::GstAggregator, this: *mut ffi::GstAggregator,
_param_spec: glib::ffi::gpointer, _param_spec: glib::ffi::gpointer,

View file

@ -26,8 +26,8 @@ pub trait BaseSrcExtManual: 'static {
fn query_latency(&self) -> Result<(bool, gst::ClockTime, gst::ClockTime), glib::BoolError>; fn query_latency(&self) -> Result<(bool, gst::ClockTime, gst::ClockTime), glib::BoolError>;
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::BoolError>; fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::BoolError>;
} }
@ -101,8 +101,8 @@ impl<O: IsA<BaseSrc>> BaseSrcExtManual for O {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::BoolError> { fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::BoolError> {
unsafe { unsafe {
let ret = from_glib(ffi::gst_base_src_new_segment( let ret = from_glib(ffi::gst_base_src_new_segment(

View file

@ -33,8 +33,8 @@ pub fn type_find_helper_for_data<P: IsA<gst::Object>, R: AsRef<[u8]>>(
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn type_find_helper_for_data_with_extension<P: IsA<gst::Object>, R: AsRef<[u8]>>( pub fn type_find_helper_for_data_with_extension<P: IsA<gst::Object>, R: AsRef<[u8]>>(
obj: Option<&P>, obj: Option<&P>,
data: R, data: R,
@ -80,8 +80,8 @@ pub fn type_find_helper_for_buffer<P: IsA<gst::Object>>(
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn type_find_helper_for_buffer_with_extension<P: IsA<gst::Object>>( pub fn type_find_helper_for_buffer_with_extension<P: IsA<gst::Object>>(
obj: Option<&P>, obj: Option<&P>,
buf: &gst::Buffer, buf: &gst::Buffer,

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;
@ -38,17 +38,17 @@ mod adapter;
pub use crate::adapter::*; pub use crate::adapter::*;
mod flow_combiner; mod flow_combiner;
pub use crate::flow_combiner::*; pub use crate::flow_combiner::*;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
mod aggregator; mod aggregator;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use aggregator::AggregatorExtManual; pub use aggregator::AggregatorExtManual;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
mod aggregator_pad; mod aggregator_pad;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use aggregator_pad::AggregatorPadExtManual; pub use aggregator_pad::AggregatorPadExtManual;
mod base_parse; mod base_parse;
pub use crate::base_parse::BaseParseExtManual; pub use crate::base_parse::BaseParseExtManual;
@ -72,11 +72,11 @@ pub mod prelude {
pub use glib::prelude::*; pub use glib::prelude::*;
pub use gst::prelude::*; pub use gst::prelude::*;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use crate::aggregator::AggregatorExtManual; pub use crate::aggregator::AggregatorExtManual;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use crate::aggregator_pad::AggregatorPadExtManual; pub use crate::aggregator_pad::AggregatorPadExtManual;
pub use crate::auto::traits::*; pub use crate::auto::traits::*;
pub use crate::base_parse::BaseParseExtManual; pub use crate::base_parse::BaseParseExtManual;

View file

@ -31,8 +31,8 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl {
self.parent_clip(aggregator, aggregator_pad, buffer) self.parent_clip(aggregator, aggregator_pad, buffer)
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn finish_buffer_list( fn finish_buffer_list(
&self, &self,
aggregator: &Self::Type, aggregator: &Self::Type,
@ -58,8 +58,8 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl {
self.parent_sink_event(aggregator, aggregator_pad, event) self.parent_sink_event(aggregator, aggregator_pad, event)
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn sink_event_pre_queue( fn sink_event_pre_queue(
&self, &self,
aggregator: &Self::Type, aggregator: &Self::Type,
@ -78,8 +78,8 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl {
self.parent_sink_query(aggregator, aggregator_pad, query) self.parent_sink_query(aggregator, aggregator_pad, query)
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn sink_query_pre_queue( fn sink_query_pre_queue(
&self, &self,
aggregator: &Self::Type, aggregator: &Self::Type,
@ -156,14 +156,14 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl {
self.parent_negotiated_src_caps(aggregator, caps) self.parent_negotiated_src_caps(aggregator, caps)
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn negotiate(&self, aggregator: &Self::Type) -> bool { fn negotiate(&self, aggregator: &Self::Type) -> bool {
self.parent_negotiate(aggregator) self.parent_negotiate(aggregator)
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn peek_next_sample( fn peek_next_sample(
&self, &self,
aggregator: &Self::Type, aggregator: &Self::Type,
@ -189,8 +189,8 @@ pub trait AggregatorImplExt: ObjectSubclass {
buffer: gst::Buffer, buffer: gst::Buffer,
) -> Result<gst::FlowSuccess, gst::FlowError>; ) -> Result<gst::FlowSuccess, gst::FlowError>;
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn parent_finish_buffer_list( fn parent_finish_buffer_list(
&self, &self,
aggregator: &Self::Type, aggregator: &Self::Type,
@ -204,8 +204,8 @@ pub trait AggregatorImplExt: ObjectSubclass {
event: gst::Event, event: gst::Event,
) -> bool; ) -> bool;
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn parent_sink_event_pre_queue( fn parent_sink_event_pre_queue(
&self, &self,
aggregator: &Self::Type, aggregator: &Self::Type,
@ -220,8 +220,8 @@ pub trait AggregatorImplExt: ObjectSubclass {
query: &mut gst::QueryRef, query: &mut gst::QueryRef,
) -> bool; ) -> bool;
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn parent_sink_query_pre_queue( fn parent_sink_query_pre_queue(
&self, &self,
aggregator: &Self::Type, aggregator: &Self::Type,
@ -274,12 +274,12 @@ pub trait AggregatorImplExt: ObjectSubclass {
caps: &gst::Caps, caps: &gst::Caps,
) -> Result<(), gst::LoggableError>; ) -> Result<(), gst::LoggableError>;
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn parent_negotiate(&self, aggregator: &Self::Type) -> bool; fn parent_negotiate(&self, aggregator: &Self::Type) -> bool;
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn parent_peek_next_sample( fn parent_peek_next_sample(
&self, &self,
aggregator: &Self::Type, aggregator: &Self::Type,
@ -344,8 +344,8 @@ impl<T: AggregatorImpl> AggregatorImplExt for T {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn parent_finish_buffer_list( fn parent_finish_buffer_list(
&self, &self,
aggregator: &Self::Type, aggregator: &Self::Type,
@ -385,8 +385,8 @@ impl<T: AggregatorImpl> AggregatorImplExt for T {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn parent_sink_event_pre_queue( fn parent_sink_event_pre_queue(
&self, &self,
aggregator: &Self::Type, aggregator: &Self::Type,
@ -428,8 +428,8 @@ impl<T: AggregatorImpl> AggregatorImplExt for T {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn parent_sink_query_pre_queue( fn parent_sink_query_pre_queue(
&self, &self,
aggregator: &Self::Type, aggregator: &Self::Type,
@ -668,8 +668,8 @@ impl<T: AggregatorImpl> AggregatorImplExt for T {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn parent_negotiate(&self, aggregator: &Self::Type) -> bool { fn parent_negotiate(&self, aggregator: &Self::Type) -> bool {
unsafe { unsafe {
let data = T::type_data(); let data = T::type_data();
@ -686,8 +686,8 @@ impl<T: AggregatorImpl> AggregatorImplExt for T {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn parent_peek_next_sample( fn parent_peek_next_sample(
&self, &self,
aggregator: &Self::Type, aggregator: &Self::Type,
@ -732,7 +732,7 @@ where
klass.update_src_caps = Some(aggregator_update_src_caps::<T>); klass.update_src_caps = Some(aggregator_update_src_caps::<T>);
klass.fixate_src_caps = Some(aggregator_fixate_src_caps::<T>); klass.fixate_src_caps = Some(aggregator_fixate_src_caps::<T>);
klass.negotiated_src_caps = Some(aggregator_negotiated_src_caps::<T>); klass.negotiated_src_caps = Some(aggregator_negotiated_src_caps::<T>);
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
{ {
klass.sink_event_pre_queue = Some(aggregator_sink_event_pre_queue::<T>); klass.sink_event_pre_queue = Some(aggregator_sink_event_pre_queue::<T>);
klass.sink_query_pre_queue = Some(aggregator_sink_query_pre_queue::<T>); klass.sink_query_pre_queue = Some(aggregator_sink_query_pre_queue::<T>);
@ -800,8 +800,8 @@ where
.to_glib() .to_glib()
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe extern "C" fn aggregator_finish_buffer_list<T: AggregatorImpl>( unsafe extern "C" fn aggregator_finish_buffer_list<T: AggregatorImpl>(
ptr: *mut ffi::GstAggregator, ptr: *mut ffi::GstAggregator,
buffer_list: *mut gst::ffi::GstBufferList, buffer_list: *mut gst::ffi::GstBufferList,
@ -842,8 +842,8 @@ where
.to_glib() .to_glib()
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe extern "C" fn aggregator_sink_event_pre_queue<T: AggregatorImpl>( unsafe extern "C" fn aggregator_sink_event_pre_queue<T: AggregatorImpl>(
ptr: *mut ffi::GstAggregator, ptr: *mut ffi::GstAggregator,
aggregator_pad: *mut ffi::GstAggregatorPad, aggregator_pad: *mut ffi::GstAggregatorPad,
@ -889,8 +889,8 @@ where
.to_glib() .to_glib()
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe extern "C" fn aggregator_sink_query_pre_queue<T: AggregatorImpl>( unsafe extern "C" fn aggregator_sink_query_pre_queue<T: AggregatorImpl>(
ptr: *mut ffi::GstAggregator, ptr: *mut ffi::GstAggregator,
aggregator_pad: *mut ffi::GstAggregatorPad, aggregator_pad: *mut ffi::GstAggregatorPad,
@ -1143,8 +1143,8 @@ where
.to_glib() .to_glib()
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe extern "C" fn aggregator_negotiate<T: AggregatorImpl>( unsafe extern "C" fn aggregator_negotiate<T: AggregatorImpl>(
ptr: *mut ffi::GstAggregator, ptr: *mut ffi::GstAggregator,
) -> glib::ffi::gboolean ) -> glib::ffi::gboolean
@ -1161,8 +1161,8 @@ where
.to_glib() .to_glib()
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe extern "C" fn aggregator_peek_next_sample<T: AggregatorImpl>( unsafe extern "C" fn aggregator_peek_next_sample<T: AggregatorImpl>(
ptr: *mut ffi::GstAggregator, ptr: *mut ffi::GstAggregator,
pad: *mut ffi::GstAggregatorPad, pad: *mut ffi::GstAggregatorPad,

View file

@ -18,19 +18,19 @@ mod push_src;
pub use self::base_transform::BaseTransformMode; pub use self::base_transform::BaseTransformMode;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
mod aggregator; mod aggregator;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
mod aggregator_pad; mod aggregator_pad;
pub mod prelude { pub mod prelude {
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use super::aggregator::{AggregatorImpl, AggregatorImplExt}; pub use super::aggregator::{AggregatorImpl, AggregatorImplExt};
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use super::aggregator_pad::{AggregatorPadImpl, AggregatorPadImplExt}; pub use super::aggregator_pad::{AggregatorPadImpl, AggregatorPadImplExt};
pub use super::base_parse::{BaseParseImpl, BaseParseImplExt}; pub use super::base_parse::{BaseParseImpl, BaseParseImplExt};
pub use super::base_sink::{BaseSinkImpl, BaseSinkImplExt}; pub use super::base_sink::{BaseSinkImpl, BaseSinkImplExt};

View file

@ -90,8 +90,8 @@ impl Harness {
pad.add_probe(mask, func); pad.add_probe(mask, func);
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn add_propose_allocation_meta( pub fn add_propose_allocation_meta(
&mut self, &mut self,
api: glib::types::Type, api: glib::types::Type,
@ -462,8 +462,8 @@ impl Harness {
// unsafe { TODO: call ffi::gst_harness_stress_statechange_start_full() } // unsafe { TODO: call ffi::gst_harness_stress_statechange_start_full() }
//} //}
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn take_all_data_as_buffer(&mut self) -> Result<gst::Buffer, glib::BoolError> { pub fn take_all_data_as_buffer(&mut self) -> Result<gst::Buffer, glib::BoolError> {
unsafe { unsafe {
Option::<_>::from_glib_full(ffi::gst_harness_take_all_data_as_buffer(self.0.as_ptr())) Option::<_>::from_glib_full(ffi::gst_harness_take_all_data_as_buffer(self.0.as_ptr()))
@ -471,8 +471,8 @@ impl Harness {
} }
} }
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn take_all_data_as_bytes(&mut self) -> Result<glib::Bytes, glib::BoolError> { pub fn take_all_data_as_bytes(&mut self) -> Result<glib::Bytes, glib::BoolError> {
unsafe { unsafe {
Option::<_>::from_glib_full(ffi::gst_harness_take_all_data_as_bytes(self.0.as_ptr())) Option::<_>::from_glib_full(ffi::gst_harness_take_all_data_as_bytes(self.0.as_ptr()))

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;

View file

@ -35,8 +35,8 @@ impl TestClock {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn process_id(&self, pending_id: &gst::ClockId) -> bool { pub fn process_id(&self, pending_id: &gst::ClockId) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_test_clock_process_id( from_glib(ffi::gst_test_clock_process_id(
@ -83,8 +83,8 @@ impl TestClock {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn timed_wait_for_multiple_pending_ids( pub fn timed_wait_for_multiple_pending_ids(
&self, &self,
count: u32, count: u32,

View file

@ -1,4 +1,4 @@
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;

View file

@ -7,7 +7,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;
@ -37,14 +37,14 @@ mod gl_context;
pub use crate::gl_context::GLContextExtManual; pub use crate::gl_context::GLContextExtManual;
mod gl_display; mod gl_display;
pub use crate::gl_display::GL_DISPLAY_CONTEXT_TYPE; pub use crate::gl_display::GL_DISPLAY_CONTEXT_TYPE;
#[cfg(any(feature = "egl", all(not(doctest), doc)))] #[cfg(any(feature = "egl", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "egl")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "egl")))]
mod gl_display_egl; mod gl_display_egl;
#[cfg(any(feature = "wayland", all(not(doctest), doc)))] #[cfg(any(feature = "wayland", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "wayland")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "wayland")))]
mod gl_display_wayland; mod gl_display_wayland;
#[cfg(any(feature = "x11", all(not(doctest), doc)))] #[cfg(any(feature = "x11", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "x11")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "x11")))]
mod gl_display_x11; mod gl_display_x11;
mod gl_video_frame; mod gl_video_frame;
pub use crate::gl_video_frame::VideoFrameGLExt; pub use crate::gl_video_frame::VideoFrameGLExt;

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;

View file

@ -8,20 +8,20 @@
use crate::RTSPMediaFactory; use crate::RTSPMediaFactory;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use glib::translate::*; use glib::translate::*;
use glib::IsA; use glib::IsA;
pub trait RTSPMediaFactoryExtManual: 'static { pub trait RTSPMediaFactoryExtManual: 'static {
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn add_role_from_structure(&self, structure: &gst::StructureRef); fn add_role_from_structure(&self, structure: &gst::StructureRef);
} }
impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExtManual for O { impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExtManual for O {
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn add_role_from_structure(&self, structure: &gst::StructureRef) { fn add_role_from_structure(&self, structure: &gst::StructureRef) {
unsafe { unsafe {
ffi::gst_rtsp_media_factory_add_role_from_structure( ffi::gst_rtsp_media_factory_add_role_from_structure(

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;

View file

@ -11,15 +11,15 @@ use std::ffi::CStr;
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub static CAPS_FEATURE_FORMAT_INTERLACED: Lazy<&'static str> = Lazy::new(|| unsafe { pub static CAPS_FEATURE_FORMAT_INTERLACED: Lazy<&'static str> = Lazy::new(|| unsafe {
CStr::from_ptr(ffi::GST_CAPS_FEATURE_FORMAT_INTERLACED) CStr::from_ptr(ffi::GST_CAPS_FEATURE_FORMAT_INTERLACED)
.to_str() .to_str()
.unwrap() .unwrap()
}); });
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub static CAPS_FEATURES_FORMAT_INTERLACED: Lazy<CapsFeatures> = pub static CAPS_FEATURES_FORMAT_INTERLACED: Lazy<CapsFeatures> =
Lazy::new(|| CapsFeatures::new(&[*CAPS_FEATURE_FORMAT_INTERLACED])); Lazy::new(|| CapsFeatures::new(&[*CAPS_FEATURE_FORMAT_INTERLACED]));

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;
@ -30,8 +30,8 @@ mod auto;
pub use crate::auto::*; pub use crate::auto::*;
mod caps_features; mod caps_features;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", 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_FORMAT_INTERLACED, CAPS_FEATURE_FORMAT_INTERLACED};
pub use crate::caps_features::{ pub use crate::caps_features::{
CAPS_FEATURES_META_GST_VIDEO_AFFINE_TRANSFORMATION_META, CAPS_FEATURES_META_GST_VIDEO_AFFINE_TRANSFORMATION_META,
@ -64,27 +64,27 @@ pub use crate::video_rectangle::*;
mod video_overlay_composition; mod video_overlay_composition;
pub use crate::video_overlay_composition::*; pub use crate::video_overlay_composition::*;
pub mod video_meta; pub mod video_meta;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub use crate::video_meta::VideoCaptionMeta; pub use crate::video_meta::VideoCaptionMeta;
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub use crate::video_meta::{VideoAFDMeta, VideoBarMeta}; pub use crate::video_meta::{VideoAFDMeta, VideoBarMeta};
pub use crate::video_meta::{ pub use crate::video_meta::{
VideoAffineTransformationMeta, VideoCropMeta, VideoMeta, VideoOverlayCompositionMeta, VideoAffineTransformationMeta, VideoCropMeta, VideoMeta, VideoOverlayCompositionMeta,
VideoRegionOfInterestMeta, VideoRegionOfInterestMeta,
}; };
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
mod video_time_code; mod video_time_code;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub use crate::video_time_code::{ValidVideoTimeCode, VideoTimeCode, VideoTimeCodeMeta}; pub use crate::video_time_code::{ValidVideoTimeCode, VideoTimeCode, VideoTimeCodeMeta};
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
mod video_time_code_interval; mod video_time_code_interval;
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
pub use crate::video_time_code_interval::VideoTimeCodeInterval; pub use crate::video_time_code_interval::VideoTimeCodeInterval;
mod video_buffer_pool; mod video_buffer_pool;
pub use crate::video_buffer_pool::{ pub use crate::video_buffer_pool::{

View file

@ -12,8 +12,8 @@ use crate::video_codec_state::{InNegotiation, Readable, VideoCodecState, VideoCo
use crate::VideoCodecFrame; use crate::VideoCodecFrame;
use crate::VideoDecoder; use crate::VideoDecoder;
use crate::VideoFormat; use crate::VideoFormat;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use crate::VideoInterlaceMode; use crate::VideoInterlaceMode;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
@ -35,8 +35,8 @@ extern "C" {
} }
pub trait VideoDecoderExtManual: 'static { pub trait VideoDecoderExtManual: 'static {
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
fn allocate_output_frame( fn allocate_output_frame(
&self, &self,
frame: &mut VideoCodecFrame, frame: &mut VideoCodecFrame,
@ -65,8 +65,8 @@ pub trait VideoDecoderExtManual: 'static {
height: u32, height: u32,
reference: Option<&VideoCodecState<Readable>>, reference: Option<&VideoCodecState<Readable>>,
) -> Result<VideoCodecState<InNegotiation>, gst::FlowError>; ) -> Result<VideoCodecState<InNegotiation>, gst::FlowError>;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn set_interlaced_output_state( fn set_interlaced_output_state(
&self, &self,
fmt: VideoFormat, fmt: VideoFormat,
@ -95,8 +95,8 @@ pub trait VideoDecoderExtManual: 'static {
} }
impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O { impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
fn allocate_output_frame( fn allocate_output_frame(
&self, &self,
frame: &mut VideoCodecFrame, frame: &mut VideoCodecFrame,
@ -267,8 +267,8 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn set_interlaced_output_state( fn set_interlaced_output_state(
&self, &self,
fmt: VideoFormat, fmt: VideoFormat,

View file

@ -18,8 +18,8 @@ use std::mem;
use std::ptr; use std::ptr;
pub trait VideoEncoderExtManual: 'static { pub trait VideoEncoderExtManual: 'static {
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
fn allocate_output_frame( fn allocate_output_frame(
&self, &self,
frame: &mut VideoCodecFrame, frame: &mut VideoCodecFrame,
@ -37,8 +37,8 @@ pub trait VideoEncoderExtManual: 'static {
frame: Option<VideoCodecFrame>, frame: Option<VideoCodecFrame>,
) -> Result<gst::FlowSuccess, gst::FlowError>; ) -> Result<gst::FlowSuccess, gst::FlowError>;
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError>; fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError>;
fn get_latency(&self) -> (gst::ClockTime, gst::ClockTime); fn get_latency(&self) -> (gst::ClockTime, gst::ClockTime);
@ -58,8 +58,8 @@ pub trait VideoEncoderExtManual: 'static {
} }
impl<O: IsA<VideoEncoder>> VideoEncoderExtManual for O { impl<O: IsA<VideoEncoder>> VideoEncoderExtManual for O {
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
fn allocate_output_frame( fn allocate_output_frame(
&self, &self,
frame: &mut VideoCodecFrame, frame: &mut VideoCodecFrame,
@ -101,8 +101,8 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExtManual for O {
ret.into_result() ret.into_result()
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError> { fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError> {
let ret: gst::FlowReturn = unsafe { let ret: gst::FlowReturn = unsafe {
from_glib(ffi::gst_video_encoder_finish_subframe( from_glib(ffi::gst_video_encoder_finish_subframe(

View file

@ -203,8 +203,8 @@ impl fmt::Display for crate::VideoChromaSite {
} }
impl crate::VideoTransferFunction { impl crate::VideoTransferFunction {
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn from_iso(iso: u32) -> Result<crate::VideoTransferFunction, glib::BoolError> { pub fn from_iso(iso: u32) -> Result<crate::VideoTransferFunction, glib::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -219,14 +219,14 @@ impl crate::VideoTransferFunction {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn to_iso(&self) -> u32 { pub fn to_iso(&self) -> u32 {
unsafe { ffi::gst_video_transfer_function_to_iso(self.to_glib()) } unsafe { ffi::gst_video_transfer_function_to_iso(self.to_glib()) }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn is_equivalent( pub fn is_equivalent(
&self, &self,
from_bpp: u32, from_bpp: u32,
@ -245,8 +245,8 @@ impl crate::VideoTransferFunction {
} }
impl crate::VideoColorMatrix { impl crate::VideoColorMatrix {
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn from_iso(iso: u32) -> Result<crate::VideoColorMatrix, glib::BoolError> { pub fn from_iso(iso: u32) -> Result<crate::VideoColorMatrix, glib::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -261,16 +261,16 @@ impl crate::VideoColorMatrix {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn to_iso(&self) -> u32 { pub fn to_iso(&self) -> u32 {
unsafe { ffi::gst_video_color_matrix_to_iso(self.to_glib()) } unsafe { ffi::gst_video_color_matrix_to_iso(self.to_glib()) }
} }
} }
impl crate::VideoColorPrimaries { impl crate::VideoColorPrimaries {
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn from_iso(iso: u32) -> Result<crate::VideoColorPrimaries, glib::BoolError> { pub fn from_iso(iso: u32) -> Result<crate::VideoColorPrimaries, glib::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -285,8 +285,8 @@ impl crate::VideoColorPrimaries {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn to_iso(&self) -> u32 { pub fn to_iso(&self) -> u32 {
unsafe { ffi::gst_video_color_primaries_to_iso(self.to_glib()) } unsafe { ffi::gst_video_color_primaries_to_iso(self.to_glib()) }
} }
@ -340,7 +340,7 @@ impl fmt::Debug for VideoInfo {
.field("multiview_mode", &self.multiview_mode()) .field("multiview_mode", &self.multiview_mode())
.field("multiview_flags", &self.multiview_flags()); .field("multiview_flags", &self.multiview_flags());
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
b.field("field_order", &self.field_order()); b.field("field_order", &self.field_order());
b.finish() b.finish()
@ -364,8 +364,8 @@ pub struct VideoInfoBuilder<'a> {
stride: Option<&'a [i32]>, stride: Option<&'a [i32]>,
multiview_mode: Option<crate::VideoMultiviewMode>, multiview_mode: Option<crate::VideoMultiviewMode>,
multiview_flags: Option<crate::VideoMultiviewFlags>, multiview_flags: Option<crate::VideoMultiviewFlags>,
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
field_order: Option<crate::VideoFieldOrder>, field_order: Option<crate::VideoFieldOrder>,
} }
@ -514,7 +514,7 @@ impl<'a> VideoInfoBuilder<'a> {
ptr::write(ptr.offset(1), multiview_flags.to_glib()); ptr::write(ptr.offset(1), multiview_flags.to_glib());
} }
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
if let Some(field_order) = self.field_order { if let Some(field_order) = self.field_order {
let ptr = &mut info.ABI._gst_reserved as *mut _ as *mut i32; let ptr = &mut info.ABI._gst_reserved as *mut _ as *mut i32;
ptr::write(ptr.offset(2), field_order.to_glib()); ptr::write(ptr.offset(2), field_order.to_glib());
@ -608,8 +608,8 @@ impl<'a> VideoInfoBuilder<'a> {
} }
} }
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
pub fn field_order(self, field_order: crate::VideoFieldOrder) -> Self { pub fn field_order(self, field_order: crate::VideoFieldOrder) -> Self {
Self { Self {
field_order: Some(field_order), field_order: Some(field_order),
@ -627,7 +627,7 @@ impl VideoInfo {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
cfg_if::cfg_if! { cfg_if::cfg_if! {
if #[cfg(any(feature = "v1_12", all(not(doctest), doc)))] { if #[cfg(any(feature = "v1_12", feature = "dox"))] {
VideoInfoBuilder { VideoInfoBuilder {
format, format,
width, width,
@ -722,8 +722,8 @@ impl VideoInfo {
self.0.height as u32 self.0.height as u32
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn field_height(&self) -> u32 { pub fn field_height(&self) -> u32 {
if self.0.interlace_mode == ffi::GST_VIDEO_INTERLACE_MODE_ALTERNATE { if self.0.interlace_mode == ffi::GST_VIDEO_INTERLACE_MODE_ALTERNATE {
(self.0.height as u32 + 1) / 2 (self.0.height as u32 + 1) / 2
@ -786,8 +786,8 @@ impl VideoInfo {
} }
} }
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
pub fn field_order(&self) -> crate::VideoFieldOrder { pub fn field_order(&self) -> crate::VideoFieldOrder {
unsafe { unsafe {
let ptr = &self.0.ABI._gst_reserved as *const _ as *const i32; let ptr = &self.0.ABI._gst_reserved as *const _ as *const i32;
@ -999,8 +999,8 @@ impl glib::translate::FromGlibPtrFull<*mut ffi::GstVideoInfo> for VideoInfo {
} }
} }
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
impl crate::VideoFieldOrder { impl crate::VideoFieldOrder {
pub fn to_str<'a>(self) -> &'a str { pub fn to_str<'a>(self) -> &'a str {
unsafe { unsafe {
@ -1011,8 +1011,8 @@ impl crate::VideoFieldOrder {
} }
} }
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
impl str::FromStr for crate::VideoFieldOrder { impl str::FromStr for crate::VideoFieldOrder {
type Err = glib::error::BoolError; type Err = glib::error::BoolError;
@ -1027,8 +1027,8 @@ impl str::FromStr for crate::VideoFieldOrder {
} }
} }
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
impl fmt::Display for crate::VideoFieldOrder { impl fmt::Display for crate::VideoFieldOrder {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
f.write_str((*self).to_str()) f.write_str((*self).to_str())
@ -1144,8 +1144,8 @@ mod tests {
assert!(info == info2); assert!(info == info2);
} }
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
#[test] #[test]
fn test_video_align() { fn test_video_align() {
gst::init().unwrap(); gst::init().unwrap();
@ -1164,8 +1164,8 @@ mod tests {
assert_eq!(info.offset(), [0, 2_082_240]); assert_eq!(info.offset(), [0, 2_082_240]);
} }
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
#[test] #[test]
fn test_display() { fn test_display() {
use std::str::FromStr; use std::str::FromStr;

View file

@ -484,20 +484,20 @@ impl fmt::Debug for VideoOverlayCompositionMeta {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[repr(transparent)] #[repr(transparent)]
pub struct VideoCaptionMeta(ffi::GstVideoCaptionMeta); pub struct VideoCaptionMeta(ffi::GstVideoCaptionMeta);
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl Send for VideoCaptionMeta {} unsafe impl Send for VideoCaptionMeta {}
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl Sync for VideoCaptionMeta {} unsafe impl Sync for VideoCaptionMeta {}
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl VideoCaptionMeta { impl VideoCaptionMeta {
pub fn add<'a>( pub fn add<'a>(
buffer: &'a mut gst::BufferRef, buffer: &'a mut gst::BufferRef,
@ -531,8 +531,8 @@ impl VideoCaptionMeta {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl MetaAPI for VideoCaptionMeta { unsafe impl MetaAPI for VideoCaptionMeta {
type GstType = ffi::GstVideoCaptionMeta; type GstType = ffi::GstVideoCaptionMeta;
@ -541,8 +541,8 @@ unsafe impl MetaAPI for VideoCaptionMeta {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl fmt::Debug for VideoCaptionMeta { impl fmt::Debug for VideoCaptionMeta {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("VideoCaptionMeta") f.debug_struct("VideoCaptionMeta")
@ -552,20 +552,20 @@ impl fmt::Debug for VideoCaptionMeta {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[repr(transparent)] #[repr(transparent)]
pub struct VideoAFDMeta(ffi::GstVideoAFDMeta); pub struct VideoAFDMeta(ffi::GstVideoAFDMeta);
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl Send for VideoAFDMeta {} unsafe impl Send for VideoAFDMeta {}
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl Sync for VideoAFDMeta {} unsafe impl Sync for VideoAFDMeta {}
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl VideoAFDMeta { impl VideoAFDMeta {
pub fn add( pub fn add(
buffer: &mut gst::BufferRef, buffer: &mut gst::BufferRef,
@ -600,8 +600,8 @@ impl VideoAFDMeta {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl MetaAPI for VideoAFDMeta { unsafe impl MetaAPI for VideoAFDMeta {
type GstType = ffi::GstVideoAFDMeta; type GstType = ffi::GstVideoAFDMeta;
@ -610,8 +610,8 @@ unsafe impl MetaAPI for VideoAFDMeta {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl fmt::Debug for VideoAFDMeta { impl fmt::Debug for VideoAFDMeta {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("VideoAFDMeta") f.debug_struct("VideoAFDMeta")
@ -622,20 +622,20 @@ impl fmt::Debug for VideoAFDMeta {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[repr(transparent)] #[repr(transparent)]
pub struct VideoBarMeta(ffi::GstVideoBarMeta); pub struct VideoBarMeta(ffi::GstVideoBarMeta);
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl Send for VideoBarMeta {} unsafe impl Send for VideoBarMeta {}
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl Sync for VideoBarMeta {} unsafe impl Sync for VideoBarMeta {}
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl VideoBarMeta { impl VideoBarMeta {
pub fn add( pub fn add(
buffer: &mut gst::BufferRef, buffer: &mut gst::BufferRef,
@ -676,8 +676,8 @@ impl VideoBarMeta {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl MetaAPI for VideoBarMeta { unsafe impl MetaAPI for VideoBarMeta {
type GstType = ffi::GstVideoBarMeta; type GstType = ffi::GstVideoBarMeta;
@ -686,8 +686,8 @@ unsafe impl MetaAPI for VideoBarMeta {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl fmt::Debug for VideoBarMeta { impl fmt::Debug for VideoBarMeta {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("VideoBarMeta") f.debug_struct("VideoBarMeta")

View file

@ -15,13 +15,13 @@ use std::convert::{TryFrom, TryInto};
use std::fmt; use std::fmt;
use std::mem; use std::mem;
use std::ptr; use std::ptr;
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
use std::str; use std::str;
use crate::VideoTimeCodeFlags; use crate::VideoTimeCodeFlags;
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
use crate::VideoTimeCodeInterval; use crate::VideoTimeCodeInterval;
pub struct VideoTimeCode(ffi::GstVideoTimeCode); pub struct VideoTimeCode(ffi::GstVideoTimeCode);
@ -68,8 +68,8 @@ impl VideoTimeCode {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn from_date_time( pub fn from_date_time(
fps: gst::Fraction, fps: gst::Fraction,
dt: &glib::DateTime, dt: &glib::DateTime,
@ -178,8 +178,8 @@ impl ValidVideoTimeCode {
} }
} }
// #[cfg(any(feature = "v1_16", all(not(doctest), doc)))] // #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
// pub fn from_date_time( // pub fn from_date_time(
// fps: gst::Fraction, // fps: gst::Fraction,
// dt: &glib::DateTime, // dt: &glib::DateTime,
@ -197,8 +197,8 @@ impl ValidVideoTimeCode {
} }
} }
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
pub fn add_interval( pub fn add_interval(
&self, &self,
tc_inter: &VideoTimeCodeInterval, tc_inter: &VideoTimeCodeInterval,
@ -470,8 +470,8 @@ macro_rules! generic_impl {
generic_impl!(VideoTimeCode); generic_impl!(VideoTimeCode);
generic_impl!(ValidVideoTimeCode); generic_impl!(ValidVideoTimeCode);
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
impl str::FromStr for VideoTimeCode { impl str::FromStr for VideoTimeCode {
type Err = glib::error::BoolError; type Err = glib::error::BoolError;

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
pub use ffi; pub use ffi;
@ -28,8 +28,8 @@ macro_rules! skip_assert_initialized {
mod auto; mod auto;
pub use crate::auto::*; pub use crate::auto::*;
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
mod web_rtc_data_channel; mod web_rtc_data_channel;
mod web_rtc_session_description; mod web_rtc_session_description;

View file

@ -31,8 +31,8 @@ pub trait GstBinExtManual: 'static {
f: F, f: F,
) -> SignalHandlerId; ) -> SignalHandlerId;
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> crate::Iterator<Element>; fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> crate::Iterator<Element>;
fn iterate_all_by_interface(&self, iface: glib::types::Type) -> crate::Iterator<Element>; fn iterate_all_by_interface(&self, iface: glib::types::Type) -> crate::Iterator<Element>;
fn iterate_elements(&self) -> crate::Iterator<Element>; fn iterate_elements(&self) -> crate::Iterator<Element>;
@ -108,8 +108,8 @@ impl<O: IsA<Bin>> GstBinExtManual for O {
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> crate::Iterator<Element> { fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> crate::Iterator<Element> {
unsafe { unsafe {
from_glib_full(ffi::gst_bin_iterate_all_by_element_factory_name( from_glib_full(ffi::gst_bin_iterate_all_by_element_factory_name(

View file

@ -1283,8 +1283,8 @@ mod tests {
assert_eq!(last, 4); assert_eq!(last, 4);
} }
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[test] #[test]
fn test_meta_foreach() { fn test_meta_foreach() {
crate::init().unwrap(); crate::init().unwrap();
@ -1318,8 +1318,8 @@ mod tests {
assert_eq!(&[crate::ClockTime::from(0), crate::SECOND][..], &res[..]); assert_eq!(&[crate::ClockTime::from(0), crate::SECOND][..], &res[..]);
} }
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[test] #[test]
fn test_meta_foreach_mut() { fn test_meta_foreach_mut() {
crate::init().unwrap(); crate::init().unwrap();

View file

@ -66,8 +66,8 @@ impl BufferListRef {
} }
} }
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn get_writable(&mut self, idx: u32) -> Option<&mut BufferRef> { pub fn get_writable(&mut self, idx: u32) -> Option<&mut BufferRef> {
unsafe { unsafe {
let ptr = ffi::gst_buffer_list_get_writable(self.as_mut_ptr(), idx); let ptr = ffi::gst_buffer_list_get_writable(self.as_mut_ptr(), idx);
@ -83,8 +83,8 @@ impl BufferListRef {
unsafe { ffi::gst_buffer_list_length(self.as_mut_ptr()) as usize } unsafe { ffi::gst_buffer_list_length(self.as_mut_ptr()) as usize }
} }
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn calculate_size(&self) -> usize { pub fn calculate_size(&self) -> usize {
unsafe { ffi::gst_buffer_list_calculate_size(self.as_mut_ptr()) as usize } unsafe { ffi::gst_buffer_list_calculate_size(self.as_mut_ptr()) as usize }
} }

View file

@ -13,7 +13,7 @@ cfg_if::cfg_if! {
use std::mem; use std::mem;
use std::os::unix; use std::os::unix;
} else if #[cfg(all(not(doctest), doc))] { } else if #[cfg(feature = "dox")] {
// Declare a fake RawFd for doc generation on windows // Declare a fake RawFd for doc generation on windows
pub mod unix { pub mod unix {
pub mod io { pub mod io {
@ -39,7 +39,7 @@ impl UnixBusExtManual for Bus {
pollfd.fd pollfd.fd
} }
#[cfg(all(not(unix), all(not(doctest), doc)))] #[cfg(all(not(unix), feature = "dox"))]
unix::io::RawFd {} unix::io::RawFd {}
} }
} }

View file

@ -13,7 +13,7 @@ cfg_if::cfg_if! {
use std::mem; use std::mem;
use std::os::windows; use std::os::windows;
} else if #[cfg(all(not(doctest), doc))] { } else if #[cfg(feature = "dox")] {
// Declare a fake RawHandle for doc generation on unix // Declare a fake RawHandle for doc generation on unix
pub mod windows { pub mod windows {
pub mod io { pub mod io {
@ -39,7 +39,7 @@ impl WindowsBusExtManual for Bus {
pollfd.fd as *mut _ pollfd.fd as *mut _
} }
#[cfg(all(not(windows), all(not(doctest), doc)))] #[cfg(all(not(windows), feature = "dox"))]
windows::io::RawHandle {} windows::io::RawHandle {}
} }
} }

View file

@ -249,8 +249,8 @@ impl CapsRef {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn set_features_simple(&mut self, features: Option<CapsFeatures>) { pub fn set_features_simple(&mut self, features: Option<CapsFeatures>) {
unsafe { unsafe {
ffi::gst_caps_set_features_simple( ffi::gst_caps_set_features_simple(

View file

@ -15,8 +15,8 @@ use crate::ClockSuccess;
use crate::ClockTime; use crate::ClockTime;
use crate::ClockTimeDiff; use crate::ClockTimeDiff;
use glib::ffi::{gboolean, gpointer}; use glib::ffi::{gboolean, gpointer};
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::prelude::*; use glib::prelude::*;
use glib::translate::*; use glib::translate::*;
use glib::IsA; use glib::IsA;
@ -66,14 +66,14 @@ impl ClockId {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn get_clock(&self) -> Option<Clock> { pub fn get_clock(&self) -> Option<Clock> {
unsafe { from_glib_full(ffi::gst_clock_id_get_clock(self.to_glib_none().0)) } unsafe { from_glib_full(ffi::gst_clock_id_get_clock(self.to_glib_none().0)) }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn uses_clock<P: IsA<Clock>>(&self, clock: &P) -> bool { pub fn uses_clock<P: IsA<Clock>>(&self, clock: &P) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_clock_id_uses_clock( from_glib(ffi::gst_clock_id_uses_clock(

View file

@ -27,28 +27,28 @@ use crate::StateChange;
use crate::StateChangeError; use crate::StateChangeError;
use crate::StateChangeReturn; use crate::StateChangeReturn;
use crate::StateChangeSuccess; use crate::StateChangeSuccess;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use glib::object::Cast; use glib::object::Cast;
use glib::object::IsA; use glib::object::IsA;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use glib::translate::FromGlibPtrBorrow; use glib::translate::FromGlibPtrBorrow;
use glib::translate::{ use glib::translate::{
from_glib, from_glib_full, from_glib_none, FromGlib, FromGlibPtrContainer, ToGlib, ToGlibPtr, from_glib, from_glib_full, from_glib_none, FromGlib, FromGlibPtrContainer, ToGlib, ToGlibPtr,
}; };
use std::ffi::CStr; use std::ffi::CStr;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use std::future::Future; use std::future::Future;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use std::marker::Unpin; use std::marker::Unpin;
use std::mem; use std::mem;
use std::num::NonZeroU64; use std::num::NonZeroU64;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use std::pin::Pin; use std::pin::Pin;
impl Element { impl Element {
@ -171,8 +171,8 @@ pub trait ElementExtManual: 'static {
fn get_element_flags(&self) -> ElementFlags; fn get_element_flags(&self) -> ElementFlags;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[allow(clippy::too_many_arguments)] #[allow(clippy::too_many_arguments)]
fn message_full_with_details<T: crate::MessageErrorDomain>( fn message_full_with_details<T: crate::MessageErrorDomain>(
&self, &self,
@ -201,24 +201,24 @@ pub trait ElementExtManual: 'static {
fn num_sink_pads(&self) -> u16; fn num_sink_pads(&self) -> u16;
fn num_src_pads(&self) -> u16; fn num_src_pads(&self) -> u16;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn add_property_deep_notify_watch( fn add_property_deep_notify_watch(
&self, &self,
property_name: Option<&str>, property_name: Option<&str>,
include_value: bool, include_value: bool,
) -> NotifyWatchId; ) -> NotifyWatchId;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn add_property_notify_watch( fn add_property_notify_watch(
&self, &self,
property_name: Option<&str>, property_name: Option<&str>,
include_value: bool, include_value: bool,
) -> NotifyWatchId; ) -> NotifyWatchId;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn remove_property_notify_watch(&self, watch_id: NotifyWatchId); fn remove_property_notify_watch(&self, watch_id: NotifyWatchId);
fn query_convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>( fn query_convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>(
@ -252,14 +252,14 @@ pub trait ElementExtManual: 'static {
seek_pos: V, seek_pos: V,
) -> Result<(), glib::error::BoolError>; ) -> Result<(), glib::error::BoolError>;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn call_async<F>(&self, func: F) fn call_async<F>(&self, func: F)
where where
F: FnOnce(&Self) + Send + 'static; F: FnOnce(&Self) + Send + 'static;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn call_async_future<F, T>( fn call_async_future<F, T>(
&self, &self,
func: F, func: F,
@ -423,8 +423,8 @@ impl<O: IsA<Element>> ElementExtManual for O {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn message_full_with_details<T: crate::MessageErrorDomain>( fn message_full_with_details<T: crate::MessageErrorDomain>(
&self, &self,
type_: ElementMessageType, type_: ElementMessageType,
@ -565,8 +565,8 @@ impl<O: IsA<Element>> ElementExtManual for O {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn add_property_deep_notify_watch( fn add_property_deep_notify_watch(
&self, &self,
property_name: Option<&str>, property_name: Option<&str>,
@ -582,8 +582,8 @@ impl<O: IsA<Element>> ElementExtManual for O {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn add_property_notify_watch( fn add_property_notify_watch(
&self, &self,
property_name: Option<&str>, property_name: Option<&str>,
@ -599,8 +599,8 @@ impl<O: IsA<Element>> ElementExtManual for O {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn remove_property_notify_watch(&self, watch_id: NotifyWatchId) { fn remove_property_notify_watch(&self, watch_id: NotifyWatchId) {
unsafe { unsafe {
ffi::gst_element_remove_property_notify_watch( ffi::gst_element_remove_property_notify_watch(
@ -772,8 +772,8 @@ impl<O: IsA<Element>> ElementExtManual for O {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn call_async<F>(&self, func: F) fn call_async<F>(&self, func: F)
where where
F: FnOnce(&Self) + Send + 'static, F: FnOnce(&Self) + Send + 'static,
@ -806,8 +806,8 @@ impl<O: IsA<Element>> ElementExtManual for O {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn call_async_future<F, T>( fn call_async_future<F, T>(
&self, &self,
func: F, func: F,

View file

@ -20,8 +20,8 @@ use std::ptr;
use glib::translate::{from_glib, from_glib_full, from_glib_none, ToGlib, ToGlibPtr}; use glib::translate::{from_glib, from_glib_full, from_glib_none, ToGlib, ToGlibPtr};
use glib::value::ToSendValue; use glib::value::ToSendValue;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use glib::translate::FromGlibPtrContainer; use glib::translate::FromGlibPtrContainer;
use crate::EventType; use crate::EventType;
@ -394,8 +394,8 @@ impl<'a> StreamStart<'a> {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_stream(&self) -> Option<crate::Stream> { pub fn get_stream(&self) -> Option<crate::Stream> {
unsafe { unsafe {
let mut stream = ptr::null_mut(); let mut stream = ptr::null_mut();
@ -459,23 +459,23 @@ impl<'a> Segment<'a> {
declare_concrete_event!(StreamCollection); declare_concrete_event!(StreamCollection);
impl<'a> StreamCollection<'a> { impl<'a> StreamCollection<'a> {
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[allow(clippy::new_ret_no_self)] #[allow(clippy::new_ret_no_self)]
pub fn new(stream_collection: &crate::StreamCollection) -> Event { pub fn new(stream_collection: &crate::StreamCollection) -> Event {
skip_assert_initialized!(); skip_assert_initialized!();
Self::builder(stream_collection).build() Self::builder(stream_collection).build()
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn builder(stream_collection: &crate::StreamCollection) -> StreamCollectionBuilder { pub fn builder(stream_collection: &crate::StreamCollection) -> StreamCollectionBuilder {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
StreamCollectionBuilder::new(stream_collection) StreamCollectionBuilder::new(stream_collection)
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_stream_collection(&self) -> crate::StreamCollection { pub fn get_stream_collection(&self) -> crate::StreamCollection {
unsafe { unsafe {
let mut stream_collection = ptr::null_mut(); let mut stream_collection = ptr::null_mut();
@ -582,23 +582,23 @@ impl<'a> SinkMessage<'a> {
declare_concrete_event!(StreamGroupDone); declare_concrete_event!(StreamGroupDone);
impl<'a> StreamGroupDone<'a> { impl<'a> StreamGroupDone<'a> {
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[allow(clippy::new_ret_no_self)] #[allow(clippy::new_ret_no_self)]
pub fn new(group_id: GroupId) -> Event { pub fn new(group_id: GroupId) -> Event {
skip_assert_initialized!(); skip_assert_initialized!();
Self::builder(group_id).build() Self::builder(group_id).build()
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn builder(group_id: GroupId) -> StreamGroupDoneBuilder<'a> { pub fn builder(group_id: GroupId) -> StreamGroupDoneBuilder<'a> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
StreamGroupDoneBuilder::new(group_id) StreamGroupDoneBuilder::new(group_id)
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_group_id(&self) -> GroupId { pub fn get_group_id(&self) -> GroupId {
unsafe { unsafe {
let mut group_id = mem::MaybeUninit::uninit(); let mut group_id = mem::MaybeUninit::uninit();
@ -890,8 +890,8 @@ impl<'a> Seek<'a> {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn get_trickmode_interval(&self) -> crate::ClockTime { pub fn get_trickmode_interval(&self) -> crate::ClockTime {
unsafe { unsafe {
let mut trickmode_interval = mem::MaybeUninit::uninit(); let mut trickmode_interval = mem::MaybeUninit::uninit();
@ -1037,23 +1037,23 @@ impl<'a> TocSelect<'a> {
declare_concrete_event!(SelectStreams); declare_concrete_event!(SelectStreams);
impl<'a> SelectStreams<'a> { impl<'a> SelectStreams<'a> {
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[allow(clippy::new_ret_no_self)] #[allow(clippy::new_ret_no_self)]
pub fn new(streams: &'a [&'a str]) -> Event { pub fn new(streams: &'a [&'a str]) -> Event {
skip_assert_initialized!(); skip_assert_initialized!();
Self::builder(streams).build() Self::builder(streams).build()
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn builder(streams: &'a [&'a str]) -> SelectStreamsBuilder { pub fn builder(streams: &'a [&'a str]) -> SelectStreamsBuilder {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
SelectStreamsBuilder::new(streams) SelectStreamsBuilder::new(streams)
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_streams(&self) -> Vec<String> { pub fn get_streams(&self) -> Vec<String> {
unsafe { unsafe {
let mut streams = ptr::null_mut(); let mut streams = ptr::null_mut();
@ -1281,8 +1281,8 @@ pub struct StreamStartBuilder<'a> {
stream_id: &'a str, stream_id: &'a str,
flags: Option<crate::StreamFlags>, flags: Option<crate::StreamFlags>,
group_id: Option<GroupId>, group_id: Option<GroupId>,
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
stream: Option<crate::Stream>, stream: Option<crate::Stream>,
} }
@ -1294,8 +1294,8 @@ impl<'a> StreamStartBuilder<'a> {
stream_id, stream_id,
flags: None, flags: None,
group_id: None, group_id: None,
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
stream: None, stream: None,
} }
} }
@ -1314,8 +1314,8 @@ impl<'a> StreamStartBuilder<'a> {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn stream(self, stream: crate::Stream) -> Self { pub fn stream(self, stream: crate::Stream) -> Self {
Self { Self {
stream: Some(stream), stream: Some(stream),
@ -1332,7 +1332,7 @@ impl<'a> StreamStartBuilder<'a> {
ffi::gst_event_set_group_id(ev, group_id.0.get()); ffi::gst_event_set_group_id(ev, group_id.0.get());
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
if let Some(ref stream) = s.stream { if let Some(ref stream) = s.stream {
ffi::gst_event_set_stream(ev, stream.to_glib_none().0); ffi::gst_event_set_stream(ev, stream.to_glib_none().0);
} }
@ -1375,15 +1375,15 @@ impl<'a> SegmentBuilder<'a> {
event_builder_generic_impl!(|s: &Self| ffi::gst_event_new_segment(s.segment.to_glib_none().0)); event_builder_generic_impl!(|s: &Self| ffi::gst_event_new_segment(s.segment.to_glib_none().0));
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub struct StreamCollectionBuilder<'a> { pub struct StreamCollectionBuilder<'a> {
builder: EventBuilder<'a>, builder: EventBuilder<'a>,
stream_collection: &'a crate::StreamCollection, stream_collection: &'a crate::StreamCollection,
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> StreamCollectionBuilder<'a> { impl<'a> StreamCollectionBuilder<'a> {
fn new(stream_collection: &'a crate::StreamCollection) -> Self { fn new(stream_collection: &'a crate::StreamCollection) -> Self {
skip_assert_initialized!(); skip_assert_initialized!();
@ -1466,15 +1466,15 @@ impl<'a> SinkMessageBuilder<'a> {
)); ));
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub struct StreamGroupDoneBuilder<'a> { pub struct StreamGroupDoneBuilder<'a> {
builder: EventBuilder<'a>, builder: EventBuilder<'a>,
group_id: GroupId, group_id: GroupId,
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> StreamGroupDoneBuilder<'a> { impl<'a> StreamGroupDoneBuilder<'a> {
fn new(group_id: GroupId) -> Self { fn new(group_id: GroupId) -> Self {
skip_assert_initialized!(); skip_assert_initialized!();
@ -1675,7 +1675,7 @@ impl<'a> SeekBuilder<'a> {
s.stop.get_value(), s.stop.get_value(),
); );
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
if let Some(trickmode_interval) = s.trickmode_interval { if let Some(trickmode_interval) = s.trickmode_interval {
ffi::gst_event_set_seek_trickmode_interval(ev, trickmode_interval.to_glib()); ffi::gst_event_set_seek_trickmode_interval(ev, trickmode_interval.to_glib());
} }
@ -1783,15 +1783,15 @@ impl<'a> TocSelectBuilder<'a> {
event_builder_generic_impl!(|s: &Self| ffi::gst_event_new_toc_select(s.uid.to_glib_none().0)); event_builder_generic_impl!(|s: &Self| ffi::gst_event_new_toc_select(s.uid.to_glib_none().0));
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub struct SelectStreamsBuilder<'a> { pub struct SelectStreamsBuilder<'a> {
builder: EventBuilder<'a>, builder: EventBuilder<'a>,
streams: &'a [&'a str], streams: &'a [&'a str],
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> SelectStreamsBuilder<'a> { impl<'a> SelectStreamsBuilder<'a> {
fn new(streams: &'a [&'a str]) -> Self { fn new(streams: &'a [&'a str]) -> Self {
skip_assert_initialized!(); skip_assert_initialized!();

View file

@ -120,8 +120,8 @@ pub fn parse_launchv_full(
} }
} }
#[cfg(any(feature = "v1_12", all(not(doctest), doc)))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_12")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
pub fn calculate_linear_regression( pub fn calculate_linear_regression(
xy: &[(u64, u64)], xy: &[(u64, u64)],
temp: Option<&mut [(u64, u64)]>, temp: Option<&mut [(u64, u64)]>,
@ -170,8 +170,8 @@ pub fn calculate_linear_regression(
} }
} }
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn type_is_plugin_api(type_: glib::types::Type) -> Option<crate::PluginAPIFlags> { pub fn type_is_plugin_api(type_: glib::types::Type) -> Option<crate::PluginAPIFlags> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {

View file

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![cfg_attr(all(not(doctest), doc), feature(doc_cfg))] #![cfg_attr(feature = "dox", feature(doc_cfg))]
#![recursion_limit = "256"] #![recursion_limit = "256"]
// Re-exported for the subclass gst_plugin_define! macro // Re-exported for the subclass gst_plugin_define! macro
@ -83,11 +83,11 @@ pub use crate::tags::{
mod tags_serde; mod tags_serde;
pub mod meta; pub mod meta;
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub use crate::meta::MetaSeqnum; pub use crate::meta::MetaSeqnum;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use crate::meta::ReferenceTimestampMeta; pub use crate::meta::ReferenceTimestampMeta;
pub use crate::meta::{Meta, MetaAPI, MetaRef, MetaRefMut, ParentBufferMeta, ProtectionMeta}; pub use crate::meta::{Meta, MetaAPI, MetaRef, MetaRefMut, ParentBufferMeta, ProtectionMeta};
pub mod buffer; pub mod buffer;
@ -122,11 +122,11 @@ pub use crate::static_caps::*;
mod static_pad_template; mod static_pad_template;
pub use crate::static_pad_template::*; pub use crate::static_pad_template::*;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub mod promise; pub mod promise;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use promise::{Promise, PromiseError}; pub use promise::{Promise, PromiseError};
pub mod bus; pub mod bus;
@ -143,16 +143,16 @@ mod allocation_params;
pub use self::allocation_params::AllocationParams; pub use self::allocation_params::AllocationParams;
// OS dependent Bus extensions (also import the other plateform mod for doc) // OS dependent Bus extensions (also import the other plateform mod for doc)
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
cfg_if::cfg_if! { cfg_if::cfg_if! {
if #[cfg(unix)] { if #[cfg(unix)] {
mod bus_unix; mod bus_unix;
#[cfg(all(not(doctest), doc))] #[cfg(feature = "dox")]
mod bus_windows; mod bus_windows;
} else { } else {
mod bus_windows; mod bus_windows;
#[cfg(all(not(doctest), doc))] #[cfg(feature = "dox")]
mod bus_unix; mod bus_unix;
} }
} }
@ -190,16 +190,16 @@ pub use crate::element::{
pub use crate::object::GstObjectExtManual; pub use crate::object::GstObjectExtManual;
// OS dependent Bus extensions (also import the other plateform trait for doc) // OS dependent Bus extensions (also import the other plateform trait for doc)
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
cfg_if::cfg_if! { cfg_if::cfg_if! {
if #[cfg(unix)] { if #[cfg(unix)] {
pub use bus_unix::UnixBusExtManual; pub use bus_unix::UnixBusExtManual;
#[cfg(all(not(doctest), doc))] #[cfg(feature = "dox")]
pub use bus_windows::WindowsBusExtManual; pub use bus_windows::WindowsBusExtManual;
} else { } else {
pub use bus_windows::WindowsBusExtManual; pub use bus_windows::WindowsBusExtManual;
#[cfg(all(not(doctest), doc))] #[cfg(feature = "dox")]
pub use bus_unix::UnixBusExtManual; pub use bus_unix::UnixBusExtManual;
} }
} }
@ -222,11 +222,11 @@ pub use crate::tag_setter::TagSetterExtManual;
mod plugin; mod plugin;
pub use crate::plugin::GstPluginExtManual; pub use crate::plugin::GstPluginExtManual;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub mod stream; pub mod stream;
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub mod stream_collection; pub mod stream_collection;
mod typefind; mod typefind;
@ -320,16 +320,16 @@ pub mod prelude {
pub use crate::element::{ElementClassExt, ElementExtManual}; pub use crate::element::{ElementClassExt, ElementExtManual};
// OS dependent Bus extensions (also import the other plateform trait for doc) // OS dependent Bus extensions (also import the other plateform trait for doc)
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
cfg_if::cfg_if! { cfg_if::cfg_if! {
if #[cfg(unix)] { if #[cfg(unix)] {
pub use crate::bus_unix::UnixBusExtManual; pub use crate::bus_unix::UnixBusExtManual;
#[cfg(all(not(doctest), doc))] #[cfg(feature = "dox")]
pub use crate::bus_windows::WindowsBusExtManual; pub use crate::bus_windows::WindowsBusExtManual;
} else { } else {
pub use crate::bus_windows::WindowsBusExtManual; pub use crate::bus_windows::WindowsBusExtManual;
#[cfg(all(not(doctest), doc))] #[cfg(feature = "dox")]
pub use crate::bus_unix::UnixBusExtManual; pub use crate::bus_unix::UnixBusExtManual;
} }
} }

View file

@ -267,8 +267,8 @@ impl<'a> Error<'a> {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_details(&self) -> Option<&StructureRef> { pub fn get_details(&self) -> Option<&StructureRef> {
unsafe { unsafe {
let mut details = ptr::null(); let mut details = ptr::null();
@ -317,8 +317,8 @@ impl<'a> Warning<'a> {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_details(&self) -> Option<&StructureRef> { pub fn get_details(&self) -> Option<&StructureRef> {
unsafe { unsafe {
let mut details = ptr::null(); let mut details = ptr::null();
@ -367,8 +367,8 @@ impl<'a> Info<'a> {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_details(&self) -> Option<&StructureRef> { pub fn get_details(&self) -> Option<&StructureRef> {
unsafe { unsafe {
let mut details = ptr::null(); let mut details = ptr::null();
@ -1338,23 +1338,23 @@ impl<'a> DeviceRemoved<'a> {
declare_concrete_message!(PropertyNotify); declare_concrete_message!(PropertyNotify);
impl<'a> PropertyNotify<'a> { impl<'a> PropertyNotify<'a> {
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[allow(clippy::new_ret_no_self)] #[allow(clippy::new_ret_no_self)]
pub fn new(property_name: &str) -> Message { pub fn new(property_name: &str) -> Message {
skip_assert_initialized!(); skip_assert_initialized!();
Self::builder(property_name).build() Self::builder(property_name).build()
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn builder(property_name: &str) -> PropertyNotifyBuilder { pub fn builder(property_name: &str) -> PropertyNotifyBuilder {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
PropertyNotifyBuilder::new(property_name) PropertyNotifyBuilder::new(property_name)
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get(&self) -> (Object, &str, Option<&'a glib::Value>) { pub fn get(&self) -> (Object, &str, Option<&'a glib::Value>) {
unsafe { unsafe {
let mut object = ptr::null_mut(); let mut object = ptr::null_mut();
@ -1383,23 +1383,23 @@ impl<'a> PropertyNotify<'a> {
declare_concrete_message!(StreamCollection); declare_concrete_message!(StreamCollection);
impl<'a> StreamCollection<'a> { impl<'a> StreamCollection<'a> {
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[allow(clippy::new_ret_no_self)] #[allow(clippy::new_ret_no_self)]
pub fn new(collection: &crate::StreamCollection) -> Message { pub fn new(collection: &crate::StreamCollection) -> Message {
skip_assert_initialized!(); skip_assert_initialized!();
Self::builder(collection).build() Self::builder(collection).build()
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn builder(collection: &crate::StreamCollection) -> StreamCollectionBuilder { pub fn builder(collection: &crate::StreamCollection) -> StreamCollectionBuilder {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
StreamCollectionBuilder::new(collection) StreamCollectionBuilder::new(collection)
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_stream_collection(&self) -> crate::StreamCollection { pub fn get_stream_collection(&self) -> crate::StreamCollection {
unsafe { unsafe {
let mut collection = ptr::null_mut(); let mut collection = ptr::null_mut();
@ -1413,23 +1413,23 @@ impl<'a> StreamCollection<'a> {
declare_concrete_message!(StreamsSelected); declare_concrete_message!(StreamsSelected);
impl<'a> StreamsSelected<'a> { impl<'a> StreamsSelected<'a> {
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[allow(clippy::new_ret_no_self)] #[allow(clippy::new_ret_no_self)]
pub fn new(collection: &crate::StreamCollection) -> Message { pub fn new(collection: &crate::StreamCollection) -> Message {
skip_assert_initialized!(); skip_assert_initialized!();
Self::builder(collection).build() Self::builder(collection).build()
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn builder(collection: &crate::StreamCollection) -> StreamsSelectedBuilder { pub fn builder(collection: &crate::StreamCollection) -> StreamsSelectedBuilder {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
StreamsSelectedBuilder::new(collection) StreamsSelectedBuilder::new(collection)
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_stream_collection(&self) -> crate::StreamCollection { pub fn get_stream_collection(&self) -> crate::StreamCollection {
unsafe { unsafe {
let mut collection = ptr::null_mut(); let mut collection = ptr::null_mut();
@ -1440,8 +1440,8 @@ impl<'a> StreamsSelected<'a> {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_streams(&self) -> Vec<crate::Stream> { pub fn get_streams(&self) -> Vec<crate::Stream> {
unsafe { unsafe {
let n = ffi::gst_message_streams_selected_get_size(self.as_mut_ptr()); let n = ffi::gst_message_streams_selected_get_size(self.as_mut_ptr());
@ -1460,23 +1460,23 @@ impl<'a> StreamsSelected<'a> {
declare_concrete_message!(Redirect); declare_concrete_message!(Redirect);
impl<'a> Redirect<'a> { impl<'a> Redirect<'a> {
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[allow(clippy::new_ret_no_self)] #[allow(clippy::new_ret_no_self)]
pub fn new(location: &str) -> Message { pub fn new(location: &str) -> Message {
skip_assert_initialized!(); skip_assert_initialized!();
Self::builder(location).build() Self::builder(location).build()
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn builder(location: &str) -> RedirectBuilder { pub fn builder(location: &str) -> RedirectBuilder {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
RedirectBuilder::new(location) RedirectBuilder::new(location)
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_entries(&self) -> Vec<(&str, Option<TagList>, Option<&StructureRef>)> { pub fn get_entries(&self) -> Vec<(&str, Option<TagList>, Option<&StructureRef>)> {
unsafe { unsafe {
let n = ffi::gst_message_get_num_redirect_entries(self.as_mut_ptr()); let n = ffi::gst_message_get_num_redirect_entries(self.as_mut_ptr());
@ -1514,16 +1514,16 @@ impl<'a> Redirect<'a> {
declare_concrete_message!(DeviceChanged); declare_concrete_message!(DeviceChanged);
impl<'a> DeviceChanged<'a> { impl<'a> DeviceChanged<'a> {
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[allow(clippy::new_ret_no_self)] #[allow(clippy::new_ret_no_self)]
pub fn new(device: &'a crate::Device, changed_device: &'a crate::Device) -> Message { pub fn new(device: &'a crate::Device, changed_device: &'a crate::Device) -> Message {
skip_assert_initialized!(); skip_assert_initialized!();
Self::builder(device, changed_device).build() Self::builder(device, changed_device).build()
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn builder( pub fn builder(
device: &'a crate::Device, device: &'a crate::Device,
changed_device: &'a crate::Device, changed_device: &'a crate::Device,
@ -1532,8 +1532,8 @@ impl<'a> DeviceChanged<'a> {
DeviceChangedBuilder::new(device, changed_device) DeviceChangedBuilder::new(device, changed_device)
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn get_device_changed(&self) -> (crate::Device, crate::Device) { pub fn get_device_changed(&self) -> (crate::Device, crate::Device) {
unsafe { unsafe {
let mut device = ptr::null_mut(); let mut device = ptr::null_mut();
@ -1580,8 +1580,8 @@ impl<'a> MessageBuilder<'a> {
} }
} }
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn other_fields(self, other_fields: &[(&'a str, &'a dyn ToSendValue)]) -> Self { fn other_fields(self, other_fields: &[(&'a str, &'a dyn ToSendValue)]) -> Self {
Self { Self {
other_fields: self other_fields: self
@ -1613,8 +1613,8 @@ macro_rules! message_builder_generic_impl {
} }
} }
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[allow(clippy::needless_update)] #[allow(clippy::needless_update)]
pub fn other_fields(self, other_fields: &[(&'a str, &'a dyn ToSendValue)]) -> Self { pub fn other_fields(self, other_fields: &[(&'a str, &'a dyn ToSendValue)]) -> Self {
Self { Self {
@ -1632,7 +1632,7 @@ macro_rules! message_builder_generic_impl {
ffi::gst_message_set_seqnum(msg, seqnum.0.get()); ffi::gst_message_set_seqnum(msg, seqnum.0.get());
} }
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
if !self.builder.other_fields.is_empty() { if !self.builder.other_fields.is_empty() {
let structure = ffi::gst_message_writable_structure(msg); let structure = ffi::gst_message_writable_structure(msg);
@ -1701,8 +1701,8 @@ impl<'a, T: MessageErrorDomain> ErrorBuilder<'a, T> {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn details(self, details: Structure) -> Self { pub fn details(self, details: Structure) -> Self {
Self { Self {
details: Some(details), details: Some(details),
@ -1712,7 +1712,7 @@ impl<'a, T: MessageErrorDomain> ErrorBuilder<'a, T> {
message_builder_generic_impl!(|s: &mut Self, src| { message_builder_generic_impl!(|s: &mut Self, src| {
cfg_if::cfg_if! { cfg_if::cfg_if! {
if #[cfg(any(feature = "v1_10", all(not(doctest), doc)))] { if #[cfg(any(feature = "v1_10", feature = "dox"))] {
let details = match s.details.take() { let details = match s.details.take() {
None => ptr::null_mut(), None => ptr::null_mut(),
Some(details) => details.into_ptr(), Some(details) => details.into_ptr(),
@ -1767,8 +1767,8 @@ impl<'a, T: MessageErrorDomain> WarningBuilder<'a, T> {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn details(self, details: Structure) -> Self { pub fn details(self, details: Structure) -> Self {
Self { Self {
details: Some(details), details: Some(details),
@ -1778,7 +1778,7 @@ impl<'a, T: MessageErrorDomain> WarningBuilder<'a, T> {
message_builder_generic_impl!(|s: &mut Self, src| { message_builder_generic_impl!(|s: &mut Self, src| {
cfg_if::cfg_if! { cfg_if::cfg_if! {
if #[cfg(any(feature = "v1_10", all(not(doctest), doc)))] { if #[cfg(any(feature = "v1_10", feature = "dox"))] {
let details = match s.details.take() { let details = match s.details.take() {
None => ptr::null_mut(), None => ptr::null_mut(),
Some(details) => details.into_ptr(), Some(details) => details.into_ptr(),
@ -1833,8 +1833,8 @@ impl<'a, T: MessageErrorDomain> InfoBuilder<'a, T> {
} }
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn details(self, details: Structure) -> Self { pub fn details(self, details: Structure) -> Self {
Self { Self {
details: Some(details), details: Some(details),
@ -1844,7 +1844,7 @@ impl<'a, T: MessageErrorDomain> InfoBuilder<'a, T> {
message_builder_generic_impl!(|s: &mut Self, src| { message_builder_generic_impl!(|s: &mut Self, src| {
cfg_if::cfg_if! { cfg_if::cfg_if! {
if #[cfg(any(feature = "v1_10", all(not(doctest), doc)))] { if #[cfg(any(feature = "v1_10", feature = "dox"))] {
let details = match s.details.take() { let details = match s.details.take() {
None => ptr::null_mut(), None => ptr::null_mut(),
Some(details) => details.into_ptr(), Some(details) => details.into_ptr(),
@ -2608,16 +2608,16 @@ impl<'a> DeviceRemovedBuilder<'a> {
)); ));
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub struct PropertyNotifyBuilder<'a> { pub struct PropertyNotifyBuilder<'a> {
builder: MessageBuilder<'a>, builder: MessageBuilder<'a>,
property_name: &'a str, property_name: &'a str,
value: Option<&'a dyn glib::ToSendValue>, value: Option<&'a dyn glib::ToSendValue>,
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> PropertyNotifyBuilder<'a> { impl<'a> PropertyNotifyBuilder<'a> {
fn new(property_name: &'a str) -> Self { fn new(property_name: &'a str) -> Self {
skip_assert_initialized!(); skip_assert_initialized!();
@ -2649,15 +2649,15 @@ impl<'a> PropertyNotifyBuilder<'a> {
}); });
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub struct StreamCollectionBuilder<'a> { pub struct StreamCollectionBuilder<'a> {
builder: MessageBuilder<'a>, builder: MessageBuilder<'a>,
collection: &'a crate::StreamCollection, collection: &'a crate::StreamCollection,
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> StreamCollectionBuilder<'a> { impl<'a> StreamCollectionBuilder<'a> {
fn new(collection: &'a crate::StreamCollection) -> Self { fn new(collection: &'a crate::StreamCollection) -> Self {
skip_assert_initialized!(); skip_assert_initialized!();
@ -2672,20 +2672,20 @@ impl<'a> StreamCollectionBuilder<'a> {
}); });
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub struct StreamsSelectedBuilder<'a> { pub struct StreamsSelectedBuilder<'a> {
builder: MessageBuilder<'a>, builder: MessageBuilder<'a>,
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
collection: &'a crate::StreamCollection, collection: &'a crate::StreamCollection,
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
streams: Option<&'a [&'a crate::Stream]>, streams: Option<&'a [&'a crate::Stream]>,
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> StreamsSelectedBuilder<'a> { impl<'a> StreamsSelectedBuilder<'a> {
fn new(collection: &'a crate::StreamCollection) -> Self { fn new(collection: &'a crate::StreamCollection) -> Self {
skip_assert_initialized!(); skip_assert_initialized!();
@ -2714,8 +2714,8 @@ impl<'a> StreamsSelectedBuilder<'a> {
}); });
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub struct RedirectBuilder<'a> { pub struct RedirectBuilder<'a> {
builder: MessageBuilder<'a>, builder: MessageBuilder<'a>,
location: &'a str, location: &'a str,
@ -2725,8 +2725,8 @@ pub struct RedirectBuilder<'a> {
entries: Option<&'a [(&'a str, Option<&'a TagList>, Option<&'a Structure>)]>, entries: Option<&'a [(&'a str, Option<&'a TagList>, Option<&'a Structure>)]>,
} }
#[cfg(any(feature = "v1_10", all(not(doctest), doc)))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> RedirectBuilder<'a> { impl<'a> RedirectBuilder<'a> {
fn new(location: &'a str) -> Self { fn new(location: &'a str) -> Self {
skip_assert_initialized!(); skip_assert_initialized!();
@ -2798,16 +2798,16 @@ impl<'a> RedirectBuilder<'a> {
}); });
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub struct DeviceChangedBuilder<'a> { pub struct DeviceChangedBuilder<'a> {
builder: MessageBuilder<'a>, builder: MessageBuilder<'a>,
device: &'a crate::Device, device: &'a crate::Device,
changed_device: &'a crate::Device, changed_device: &'a crate::Device,
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl<'a> DeviceChangedBuilder<'a> { impl<'a> DeviceChangedBuilder<'a> {
fn new(device: &'a crate::Device, changed_device: &'a crate::Device) -> Self { fn new(device: &'a crate::Device, changed_device: &'a crate::Device) -> Self {
skip_assert_initialized!(); skip_assert_initialized!();

View file

@ -12,18 +12,18 @@ use std::ops;
use crate::Buffer; use crate::Buffer;
use crate::BufferRef; use crate::BufferRef;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use crate::Caps; use crate::Caps;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use crate::CapsRef; use crate::CapsRef;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use crate::ClockTime; use crate::ClockTime;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use glib::translate::ToGlib; use glib::translate::ToGlib;
use glib::translate::{from_glib, from_glib_none, FromGlib, ToGlibPtr}; use glib::translate::{from_glib, from_glib_none, FromGlib, ToGlibPtr};
@ -71,8 +71,8 @@ pub unsafe trait MetaAPI: Sync + Send + Sized {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[derive(Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq)]
pub struct MetaSeqnum(u64); pub struct MetaSeqnum(u64);
@ -152,8 +152,8 @@ impl<'a, T: MetaAPI> MetaRef<'a, T> {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn get_seqnum(&self) -> MetaSeqnum { pub fn get_seqnum(&self) -> MetaSeqnum {
unsafe { unsafe {
let meta = self.meta as *const _ as *const ffi::GstMeta; let meta = self.meta as *const _ as *const ffi::GstMeta;
@ -188,8 +188,8 @@ impl<'a, T: MetaAPI, U> MetaRefMut<'a, T, U> {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn get_seqnum(&self) -> u64 { pub fn get_seqnum(&self) -> u64 {
unsafe { unsafe {
let meta = self.meta as *const _ as *const ffi::GstMeta; let meta = self.meta as *const _ as *const ffi::GstMeta;
@ -344,20 +344,20 @@ impl fmt::Debug for ProtectionMeta {
} }
} }
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[repr(transparent)] #[repr(transparent)]
pub struct ReferenceTimestampMeta(ffi::GstReferenceTimestampMeta); pub struct ReferenceTimestampMeta(ffi::GstReferenceTimestampMeta);
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
unsafe impl Send for ReferenceTimestampMeta {} unsafe impl Send for ReferenceTimestampMeta {}
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
unsafe impl Sync for ReferenceTimestampMeta {} unsafe impl Sync for ReferenceTimestampMeta {}
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
impl ReferenceTimestampMeta { impl ReferenceTimestampMeta {
pub fn add<'a>( pub fn add<'a>(
buffer: &'a mut BufferRef, buffer: &'a mut BufferRef,
@ -395,8 +395,8 @@ impl ReferenceTimestampMeta {
} }
} }
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
unsafe impl MetaAPI for ReferenceTimestampMeta { unsafe impl MetaAPI for ReferenceTimestampMeta {
type GstType = ffi::GstReferenceTimestampMeta; type GstType = ffi::GstReferenceTimestampMeta;
@ -405,8 +405,8 @@ unsafe impl MetaAPI for ReferenceTimestampMeta {
} }
} }
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
impl fmt::Debug for ReferenceTimestampMeta { impl fmt::Debug for ReferenceTimestampMeta {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("ReferenceTimestampMeta") f.debug_struct("ReferenceTimestampMeta")

View file

@ -7,16 +7,16 @@
// except according to those terms. // except according to those terms.
use crate::PadTemplate; use crate::PadTemplate;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use crate::StaticPadTemplate; use crate::StaticPadTemplate;
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use glib::translate::*; use glib::translate::*;
impl PadTemplate { impl PadTemplate {
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn from_static_pad_template_with_gtype( pub fn from_static_pad_template_with_gtype(
pad_template: &StaticPadTemplate, pad_template: &StaticPadTemplate,
pad_type: glib::types::Type, pad_type: glib::types::Type,

View file

@ -9,8 +9,8 @@
use glib::translate::*; use glib::translate::*;
pub trait GstParamSpecExt { pub trait GstParamSpecExt {
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn array( fn array(
name: &str, name: &str,
nick: &str, nick: &str,
@ -31,8 +31,8 @@ pub trait GstParamSpecExt {
} }
impl GstParamSpecExt for glib::ParamSpec { impl GstParamSpecExt for glib::ParamSpec {
#[cfg(any(feature = "v1_14", all(not(doctest), doc)))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn array( fn array(
name: &str, name: &str,
nick: &str, nick: &str,

View file

@ -1303,8 +1303,8 @@ impl<T: AsMutPtr> Context<T> {
declare_concrete_query!(Bitrate, T); declare_concrete_query!(Bitrate, T);
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl Bitrate<Query> { impl Bitrate<Query> {
pub fn new() -> Self { pub fn new() -> Self {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -1312,8 +1312,8 @@ impl Bitrate<Query> {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl Default for Bitrate<Query> { impl Default for Bitrate<Query> {
fn default() -> Self { fn default() -> Self {
Self::new() Self::new()
@ -1321,8 +1321,8 @@ impl Default for Bitrate<Query> {
} }
impl<T: AsPtr> Bitrate<T> { impl<T: AsPtr> Bitrate<T> {
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn get_bitrate(&self) -> u32 { pub fn get_bitrate(&self) -> u32 {
unsafe { unsafe {
let mut bitrate = mem::MaybeUninit::uninit(); let mut bitrate = mem::MaybeUninit::uninit();
@ -1333,8 +1333,8 @@ impl<T: AsPtr> Bitrate<T> {
} }
impl<T: AsMutPtr> Bitrate<T> { impl<T: AsMutPtr> Bitrate<T> {
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn set_bitrate(&mut self, bitrate: u32) { pub fn set_bitrate(&mut self, bitrate: u32) {
unsafe { unsafe {
ffi::gst_query_set_bitrate(self.0.as_mut_ptr(), bitrate); ffi::gst_query_set_bitrate(self.0.as_mut_ptr(), bitrate);

View file

@ -178,32 +178,32 @@ impl SampleRef {
} }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn set_buffer(&mut self, buffer: Option<&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) } unsafe { ffi::gst_sample_set_buffer(self.as_mut_ptr(), buffer.to_glib_none().0) }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn set_buffer_list(&mut self, buffer_list: Option<&BufferList>) { 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) } unsafe { ffi::gst_sample_set_buffer_list(self.as_mut_ptr(), buffer_list.to_glib_none().0) }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn set_caps(&mut self, caps: Option<&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) } unsafe { ffi::gst_sample_set_caps(self.as_mut_ptr(), caps.to_glib_none().0) }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn set_segment(&mut self, segment: Option<&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) } unsafe { ffi::gst_sample_set_segment(self.as_mut_ptr(), segment.to_glib_none().0) }
} }
#[cfg(any(feature = "v1_16", all(not(doctest), doc)))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn set_info(&mut self, info: Option<Structure>) { pub fn set_info(&mut self, info: Option<Structure>) {
unsafe { unsafe {
ffi::gst_sample_set_info( ffi::gst_sample_set_info(