Add doc(cfg()) on all manual files

This commit is contained in:
Marijn Suijten 2020-11-19 10:56:42 +01:00
parent 9daa8d20a9
commit bd75778fcb
40 changed files with 287 additions and 0 deletions

View file

@ -239,6 +239,7 @@ impl AppSrc {
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[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

@ -37,6 +37,7 @@ pub trait AudioDecoderExtManual: 'static {
) -> Result<gst::FlowSuccess, gst::FlowError>; ) -> Result<gst::FlowSuccess, gst::FlowError>;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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>,
@ -45,6 +46,7 @@ pub trait AudioDecoderExtManual: 'static {
fn negotiate(&self) -> Result<(), gst::FlowError>; fn negotiate(&self) -> Result<(), gst::FlowError>;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn set_output_caps(&self, caps: &gst::Caps) -> Result<(), gst::FlowError>; fn set_output_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>;
@ -81,6 +83,7 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExtManual for O {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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,6 +111,7 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExtManual for O {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn set_output_caps(&self, caps: &gst::Caps) -> Result<(), gst::FlowError> { fn set_output_caps(&self, caps: &gst::Caps) -> Result<(), gst::FlowError> {
unsafe { unsafe {
let ret = from_glib(gst_audio_sys::gst_audio_decoder_set_output_caps( let ret = from_glib(gst_audio_sys::gst_audio_decoder_set_output_caps(

View file

@ -9,13 +9,16 @@
use std::fmt; use std::fmt;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::ptr; use std::ptr;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::slice; use std::slice;
use glib; use glib;
use glib::translate::{from_glib, ToGlib}; use glib::translate::{from_glib, ToGlib};
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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; use gst;
use gst::prelude::*; use gst::prelude::*;
@ -76,15 +79,19 @@ impl fmt::Debug for AudioClippingMeta {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[repr(transparent)] #[repr(transparent)]
pub struct AudioMeta(gst_audio_sys::GstAudioMeta); pub struct AudioMeta(gst_audio_sys::GstAudioMeta);
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl Send for AudioMeta {} unsafe impl Send for AudioMeta {}
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl Sync for AudioMeta {} unsafe impl Sync for AudioMeta {}
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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,
@ -190,6 +197,7 @@ impl AudioMeta {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl MetaAPI for AudioMeta { unsafe impl MetaAPI for AudioMeta {
type GstType = gst_audio_sys::GstAudioMeta; type GstType = gst_audio_sys::GstAudioMeta;
@ -199,6 +207,7 @@ unsafe impl MetaAPI for AudioMeta {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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

@ -15,6 +15,7 @@ use std::mem;
impl AudioStreamAlign { impl AudioStreamAlign {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[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

@ -33,6 +33,7 @@ pub fn audio_buffer_clip(
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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

@ -59,12 +59,15 @@ pub use audio_meta::*;
mod audio_channel_position; mod audio_channel_position;
pub use audio_channel_position::*; pub use audio_channel_position::*;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
mod audio_stream_align; mod audio_stream_align;
mod functions; mod functions;
pub use functions::*; pub use functions::*;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub mod audio_buffer; pub mod audio_buffer;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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

@ -86,11 +86,13 @@ impl UniqueAdapter {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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()
} }
@ -130,6 +132,7 @@ impl UniqueAdapter {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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,6 +146,7 @@ impl UniqueAdapter {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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()
} }
@ -156,6 +160,7 @@ impl UniqueAdapter {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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,19 +7,24 @@
// except according to those terms. // except according to those terms.
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::prelude::*; use glib::prelude::*;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::Value; use glib::Value;
use gst; use gst;
use gst_base_sys; use gst_base_sys;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::mem::transmute; use std::mem::transmute;
use std::ptr; use std::ptr;
use Aggregator; use Aggregator;
@ -30,27 +35,33 @@ 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", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn get_property_min_upstream_latency(&self) -> gst::ClockTime; fn get_property_min_upstream_latency(&self) -> gst::ClockTime;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn set_property_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime); fn set_property_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime);
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn selected_samples( fn selected_samples(
&self, &self,
pts: gst::ClockTime, pts: gst::ClockTime,
@ -60,6 +71,7 @@ pub trait AggregatorExtManual: 'static {
); );
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn connect_samples_selected< fn connect_samples_selected<
P, P,
F: Fn( F: Fn(
@ -104,6 +116,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -118,6 +131,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn get_property_min_upstream_latency(&self) -> gst::ClockTime { 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());
@ -134,6 +148,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn set_property_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime) { fn set_property_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime) {
unsafe { unsafe {
gobject_sys::g_object_set_property( gobject_sys::g_object_set_property(
@ -145,6 +160,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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,
@ -162,6 +178,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
} }
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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 {
gst_base_sys::gst_aggregator_update_segment( gst_base_sys::gst_aggregator_update_segment(
@ -172,6 +189,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn selected_samples( fn selected_samples(
&self, &self,
pts: gst::ClockTime, pts: gst::ClockTime,
@ -193,6 +211,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn connect_samples_selected< fn connect_samples_selected<
P, P,
F: Fn( F: Fn(
@ -263,6 +282,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe extern "C" fn notify_min_upstream_latency_trampoline<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 gst_base_sys::GstAggregator, this: *mut gst_base_sys::GstAggregator,
_param_spec: glib_sys::gpointer, _param_spec: glib_sys::gpointer,

View file

@ -29,6 +29,7 @@ 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", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::BoolError>; fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::BoolError>;
} }
@ -109,6 +110,7 @@ impl<O: IsA<BaseSrc>> BaseSrcExtManual for O {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::BoolError> { fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::BoolError> {
unsafe { unsafe {
let ret = from_glib(gst_base_sys::gst_base_src_new_segment( let ret = from_glib(gst_base_sys::gst_base_src_new_segment(

View file

@ -36,6 +36,7 @@ pub fn type_find_helper_for_data<P: IsA<gst::Object>, R: AsRef<[u8]>>(
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn type_find_helper_for_data_with_extension<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,
@ -82,6 +83,7 @@ pub fn type_find_helper_for_buffer<P: IsA<gst::Object>>(
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn type_find_helper_for_buffer_with_extension<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

@ -51,12 +51,16 @@ pub use adapter::*;
mod flow_combiner; mod flow_combiner;
pub use flow_combiner::*; pub use flow_combiner::*;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
mod aggregator; mod aggregator;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use aggregator::AggregatorExtManual; pub use aggregator::AggregatorExtManual;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
mod aggregator_pad; mod aggregator_pad;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[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 base_parse::BaseParseExtManual; pub use base_parse::BaseParseExtManual;
@ -81,8 +85,10 @@ pub mod prelude {
pub use gst::prelude::*; pub use gst::prelude::*;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use aggregator::AggregatorExtManual; pub use aggregator::AggregatorExtManual;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use aggregator_pad::AggregatorPadExtManual; pub use aggregator_pad::AggregatorPadExtManual;
pub use auto::traits::*; pub use auto::traits::*;
pub use base_parse::BaseParseExtManual; pub use base_parse::BaseParseExtManual;

View file

@ -39,6 +39,7 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -65,6 +66,7 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -84,6 +86,7 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -161,11 +164,13 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -192,6 +197,7 @@ pub trait AggregatorImplExt: ObjectSubclass {
) -> Result<gst::FlowSuccess, gst::FlowError>; ) -> Result<gst::FlowSuccess, gst::FlowError>;
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -206,6 +212,7 @@ pub trait AggregatorImplExt: ObjectSubclass {
) -> bool; ) -> bool;
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -221,6 +228,7 @@ pub trait AggregatorImplExt: ObjectSubclass {
) -> bool; ) -> bool;
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,9 +282,11 @@ pub trait AggregatorImplExt: ObjectSubclass {
) -> Result<(), gst::LoggableError>; ) -> Result<(), gst::LoggableError>;
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -345,6 +355,7 @@ impl<T: AggregatorImpl> AggregatorImplExt for T {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -387,6 +398,7 @@ impl<T: AggregatorImpl> AggregatorImplExt for T {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -431,6 +443,7 @@ impl<T: AggregatorImpl> AggregatorImplExt for T {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -682,6 +695,7 @@ impl<T: AggregatorImpl> AggregatorImplExt for T {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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();
@ -700,6 +714,7 @@ impl<T: AggregatorImpl> AggregatorImplExt for T {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -746,6 +761,7 @@ where
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", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
{ {
klass.sink_event_pre_queue = Some(aggregator_sink_event_pre_queue::<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>);
@ -814,6 +830,7 @@ where
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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 gst_base_sys::GstAggregator, ptr: *mut gst_base_sys::GstAggregator,
buffer_list: *mut gst_sys::GstBufferList, buffer_list: *mut gst_sys::GstBufferList,
@ -855,6 +872,7 @@ where
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe extern "C" fn aggregator_sink_event_pre_queue<T: AggregatorImpl>( unsafe extern "C" fn aggregator_sink_event_pre_queue<T: AggregatorImpl>(
ptr: *mut gst_base_sys::GstAggregator, ptr: *mut gst_base_sys::GstAggregator,
aggregator_pad: *mut gst_base_sys::GstAggregatorPad, aggregator_pad: *mut gst_base_sys::GstAggregatorPad,
@ -901,6 +919,7 @@ where
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe extern "C" fn aggregator_sink_query_pre_queue<T: AggregatorImpl>( unsafe extern "C" fn aggregator_sink_query_pre_queue<T: AggregatorImpl>(
ptr: *mut gst_base_sys::GstAggregator, ptr: *mut gst_base_sys::GstAggregator,
aggregator_pad: *mut gst_base_sys::GstAggregatorPad, aggregator_pad: *mut gst_base_sys::GstAggregatorPad,
@ -1154,6 +1173,7 @@ where
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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 gst_base_sys::GstAggregator, ptr: *mut gst_base_sys::GstAggregator,
) -> glib_sys::gboolean ) -> glib_sys::gboolean
@ -1171,6 +1191,7 @@ where
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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 gst_base_sys::GstAggregator, ptr: *mut gst_base_sys::GstAggregator,
pad: *mut gst_base_sys::GstAggregatorPad, pad: *mut gst_base_sys::GstAggregatorPad,

View file

@ -19,14 +19,18 @@ mod push_src;
pub use self::base_transform::BaseTransformMode; pub use self::base_transform::BaseTransformMode;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
mod aggregator; mod aggregator;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use super::aggregator_pad::{AggregatorPadImpl, AggregatorPadImplExt}; pub use super::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

@ -99,6 +99,7 @@ impl Harness {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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,
@ -493,6 +494,7 @@ impl Harness {
//} //}
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn take_all_data_as_buffer(&mut self) -> Result<gst::Buffer, glib::BoolError> { pub fn take_all_data_as_buffer(&mut self) -> Result<gst::Buffer, glib::BoolError> {
unsafe { unsafe {
Option::<_>::from_glib_full(gst_check_sys::gst_harness_take_all_data_as_buffer( Option::<_>::from_glib_full(gst_check_sys::gst_harness_take_all_data_as_buffer(
@ -503,6 +505,7 @@ impl Harness {
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn take_all_data_as_bytes(&mut self) -> Result<glib::Bytes, glib::BoolError> { pub fn take_all_data_as_bytes(&mut self) -> Result<glib::Bytes, glib::BoolError> {
unsafe { unsafe {
Option::<_>::from_glib_full(gst_check_sys::gst_harness_take_all_data_as_bytes( Option::<_>::from_glib_full(gst_check_sys::gst_harness_take_all_data_as_bytes(

View file

@ -38,6 +38,7 @@ impl TestClock {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn process_id(&self, pending_id: &gst::ClockId) -> bool { pub fn process_id(&self, pending_id: &gst::ClockId) -> bool {
unsafe { unsafe {
from_glib(gst_check_sys::gst_test_clock_process_id( from_glib(gst_check_sys::gst_test_clock_process_id(
@ -85,6 +86,7 @@ impl TestClock {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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

@ -51,10 +51,13 @@ pub use gl_context::GLContextExtManual;
mod gl_display; mod gl_display;
pub use gl_display::GL_DISPLAY_CONTEXT_TYPE; pub use gl_display::GL_DISPLAY_CONTEXT_TYPE;
#[cfg(any(feature = "egl", feature = "dox"))] #[cfg(any(feature = "egl", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "egl")))]
mod gl_display_egl; mod gl_display_egl;
#[cfg(any(feature = "wayland", feature = "dox"))] #[cfg(any(feature = "wayland", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland")))]
mod gl_display_wayland; mod gl_display_wayland;
#[cfg(any(feature = "x11", feature = "dox"))] #[cfg(any(feature = "x11", feature = "dox"))]
#[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 gl_video_frame::VideoFrameGLExt; pub use gl_video_frame::VideoFrameGLExt;

View file

@ -9,20 +9,25 @@
use RTSPMediaFactory; use RTSPMediaFactory;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use glib::translate::*; use glib::translate::*;
use glib::IsA; use glib::IsA;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use gst; use gst;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use gst_rtsp_server_sys; use gst_rtsp_server_sys;
pub trait RTSPMediaFactoryExtManual: 'static { pub trait RTSPMediaFactoryExtManual: 'static {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn add_role_from_structure(&self, structure: &gst::StructureRef); 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", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn add_role_from_structure(&self, structure: &gst::StructureRef) { fn add_role_from_structure(&self, structure: &gst::StructureRef) {
unsafe { unsafe {
gst_rtsp_server_sys::gst_rtsp_media_factory_add_role_from_structure( gst_rtsp_server_sys::gst_rtsp_media_factory_add_role_from_structure(

View file

@ -13,12 +13,14 @@ use std::ffi::CStr;
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub static CAPS_FEATURE_FORMAT_INTERLACED: Lazy<&'static str> = Lazy::new(|| unsafe { pub static CAPS_FEATURE_FORMAT_INTERLACED: Lazy<&'static str> = Lazy::new(|| unsafe {
CStr::from_ptr(gst_video_sys::GST_CAPS_FEATURE_FORMAT_INTERLACED) CStr::from_ptr(gst_video_sys::GST_CAPS_FEATURE_FORMAT_INTERLACED)
.to_str() .to_str()
.unwrap() .unwrap()
}); });
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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

@ -50,6 +50,7 @@ pub use auto::*;
mod caps_features; mod caps_features;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub use caps_features::{CAPS_FEATURES_FORMAT_INTERLACED, CAPS_FEATURE_FORMAT_INTERLACED}; pub use caps_features::{CAPS_FEATURES_FORMAT_INTERLACED, CAPS_FEATURE_FORMAT_INTERLACED};
pub use caps_features::{ pub use caps_features::{
CAPS_FEATURES_META_GST_VIDEO_AFFINE_TRANSFORMATION_META, CAPS_FEATURES_META_GST_VIDEO_AFFINE_TRANSFORMATION_META,
@ -81,20 +82,26 @@ mod video_overlay_composition;
pub use video_overlay_composition::*; pub use video_overlay_composition::*;
pub mod video_meta; pub mod video_meta;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub use video_meta::VideoCaptionMeta; pub use video_meta::VideoCaptionMeta;
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub use video_meta::{VideoAFDMeta, VideoBarMeta}; pub use video_meta::{VideoAFDMeta, VideoBarMeta};
pub use video_meta::{ pub use video_meta::{
VideoAffineTransformationMeta, VideoCropMeta, VideoMeta, VideoOverlayCompositionMeta, VideoAffineTransformationMeta, VideoCropMeta, VideoMeta, VideoOverlayCompositionMeta,
VideoRegionOfInterestMeta, VideoRegionOfInterestMeta,
}; };
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
mod video_time_code; mod video_time_code;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub use video_time_code::{ValidVideoTimeCode, VideoTimeCode, VideoTimeCodeMeta}; pub use video_time_code::{ValidVideoTimeCode, VideoTimeCode, VideoTimeCodeMeta};
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
mod video_time_code_interval; mod video_time_code_interval;
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
pub use video_time_code_interval::VideoTimeCodeInterval; pub use video_time_code_interval::VideoTimeCodeInterval;
mod video_buffer_pool; mod video_buffer_pool;
pub use video_buffer_pool::{ pub use video_buffer_pool::{

View file

@ -19,6 +19,7 @@ use VideoCodecFrame;
use VideoDecoder; use VideoDecoder;
use VideoFormat; use VideoFormat;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use VideoInterlaceMode; use VideoInterlaceMode;
extern "C" { extern "C" {
@ -37,6 +38,7 @@ extern "C" {
pub trait VideoDecoderExtManual: 'static { pub trait VideoDecoderExtManual: 'static {
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[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,
@ -66,6 +68,7 @@ pub trait VideoDecoderExtManual: 'static {
reference: Option<&VideoCodecState<Readable>>, reference: Option<&VideoCodecState<Readable>>,
) -> Result<VideoCodecState<InNegotiation>, gst::FlowError>; ) -> Result<VideoCodecState<InNegotiation>, gst::FlowError>;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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,6 +98,7 @@ pub trait VideoDecoderExtManual: 'static {
impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O { impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[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,
@ -274,6 +278,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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

@ -21,6 +21,7 @@ use VideoEncoder;
pub trait VideoEncoderExtManual: 'static { pub trait VideoEncoderExtManual: 'static {
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[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,
@ -39,6 +40,7 @@ pub trait VideoEncoderExtManual: 'static {
) -> Result<gst::FlowSuccess, gst::FlowError>; ) -> Result<gst::FlowSuccess, gst::FlowError>;
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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);
@ -59,6 +61,7 @@ pub trait VideoEncoderExtManual: 'static {
impl<O: IsA<VideoEncoder>> VideoEncoderExtManual for O { impl<O: IsA<VideoEncoder>> VideoEncoderExtManual for O {
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[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,6 +104,7 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExtManual for O {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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(gst_video_sys::gst_video_encoder_finish_subframe( from_glib(gst_video_sys::gst_video_encoder_finish_subframe(

View file

@ -217,6 +217,7 @@ impl fmt::Display for ::VideoChromaSite {
impl ::VideoTransferFunction { impl ::VideoTransferFunction {
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn from_iso(iso: u32) -> Result<::VideoTransferFunction, glib::BoolError> { pub fn from_iso(iso: u32) -> Result<::VideoTransferFunction, glib::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -230,11 +231,13 @@ impl ::VideoTransferFunction {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn to_iso(&self) -> u32 { pub fn to_iso(&self) -> u32 {
unsafe { gst_video_sys::gst_video_transfer_function_to_iso(self.to_glib()) } unsafe { gst_video_sys::gst_video_transfer_function_to_iso(self.to_glib()) }
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -254,6 +257,7 @@ impl ::VideoTransferFunction {
impl ::VideoColorMatrix { impl ::VideoColorMatrix {
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn from_iso(iso: u32) -> Result<::VideoColorMatrix, glib::BoolError> { pub fn from_iso(iso: u32) -> Result<::VideoColorMatrix, glib::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -267,6 +271,7 @@ impl ::VideoColorMatrix {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn to_iso(&self) -> u32 { pub fn to_iso(&self) -> u32 {
unsafe { gst_video_sys::gst_video_color_matrix_to_iso(self.to_glib()) } unsafe { gst_video_sys::gst_video_color_matrix_to_iso(self.to_glib()) }
} }
@ -274,6 +279,7 @@ impl ::VideoColorMatrix {
impl ::VideoColorPrimaries { impl ::VideoColorPrimaries {
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn from_iso(iso: u32) -> Result<::VideoColorPrimaries, glib::BoolError> { pub fn from_iso(iso: u32) -> Result<::VideoColorPrimaries, glib::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
@ -287,6 +293,7 @@ impl ::VideoColorPrimaries {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn to_iso(&self) -> u32 { pub fn to_iso(&self) -> u32 {
unsafe { gst_video_sys::gst_video_color_primaries_to_iso(self.to_glib()) } unsafe { gst_video_sys::gst_video_color_primaries_to_iso(self.to_glib()) }
} }
@ -339,6 +346,7 @@ impl fmt::Debug for VideoInfo {
.field("multiview_flags", &self.multiview_flags()); .field("multiview_flags", &self.multiview_flags());
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
{ {
b.field("field_order", &self.field_order()); b.field("field_order", &self.field_order());
}; };
@ -365,6 +373,7 @@ pub struct VideoInfoBuilder<'a> {
multiview_mode: Option<::VideoMultiviewMode>, multiview_mode: Option<::VideoMultiviewMode>,
multiview_flags: Option<::VideoMultiviewFlags>, multiview_flags: Option<::VideoMultiviewFlags>,
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
field_order: Option<::VideoFieldOrder>, field_order: Option<::VideoFieldOrder>,
} }
@ -511,6 +520,7 @@ impl<'a> VideoInfoBuilder<'a> {
} }
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
{ {
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;
@ -607,6 +617,7 @@ impl<'a> VideoInfoBuilder<'a> {
} }
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
pub fn field_order(self, field_order: ::VideoFieldOrder) -> Self { pub fn field_order(self, field_order: ::VideoFieldOrder) -> Self {
Self { Self {
field_order: Some(field_order), field_order: Some(field_order),
@ -620,6 +631,7 @@ impl VideoInfo {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
#[cfg(not(any(feature = "v1_12", feature = "dox")))] #[cfg(not(any(feature = "v1_12", feature = "dox")))]
#[cfg_attr(feature = "dox", doc(cfg(not(feature = "v1_12"))))]
{ {
VideoInfoBuilder { VideoInfoBuilder {
format, format,
@ -640,6 +652,7 @@ impl VideoInfo {
} }
} }
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
{ {
VideoInfoBuilder { VideoInfoBuilder {
format, format,
@ -715,6 +728,7 @@ impl VideoInfo {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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 == gst_video_sys::GST_VIDEO_INTERLACE_MODE_ALTERNATE { if self.0.interlace_mode == gst_video_sys::GST_VIDEO_INTERLACE_MODE_ALTERNATE {
(self.0.height as u32 + 1) / 2 (self.0.height as u32 + 1) / 2
@ -778,6 +792,7 @@ impl VideoInfo {
} }
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
pub fn field_order(&self) -> ::VideoFieldOrder { pub fn field_order(&self) -> ::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;
@ -988,6 +1003,7 @@ impl glib::translate::FromGlibPtrFull<*mut gst_video_sys::GstVideoInfo> for Vide
} }
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
impl ::VideoFieldOrder { impl ::VideoFieldOrder {
pub fn to_str<'a>(self) -> &'a str { pub fn to_str<'a>(self) -> &'a str {
unsafe { unsafe {
@ -1001,6 +1017,7 @@ impl ::VideoFieldOrder {
} }
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
impl str::FromStr for ::VideoFieldOrder { impl str::FromStr for ::VideoFieldOrder {
type Err = glib::error::BoolError; type Err = glib::error::BoolError;
@ -1016,6 +1033,7 @@ impl str::FromStr for ::VideoFieldOrder {
} }
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
impl fmt::Display for ::VideoFieldOrder { impl fmt::Display for ::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())
@ -1132,6 +1150,7 @@ mod tests {
} }
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[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();
@ -1151,6 +1170,7 @@ mod tests {
} }
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[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

@ -482,15 +482,19 @@ impl fmt::Debug for VideoOverlayCompositionMeta {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[repr(transparent)] #[repr(transparent)]
pub struct VideoCaptionMeta(gst_video_sys::GstVideoCaptionMeta); pub struct VideoCaptionMeta(gst_video_sys::GstVideoCaptionMeta);
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl Send for VideoCaptionMeta {} unsafe impl Send for VideoCaptionMeta {}
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl Sync for VideoCaptionMeta {} unsafe impl Sync for VideoCaptionMeta {}
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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,
@ -525,6 +529,7 @@ impl VideoCaptionMeta {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl MetaAPI for VideoCaptionMeta { unsafe impl MetaAPI for VideoCaptionMeta {
type GstType = gst_video_sys::GstVideoCaptionMeta; type GstType = gst_video_sys::GstVideoCaptionMeta;
@ -534,6 +539,7 @@ unsafe impl MetaAPI for VideoCaptionMeta {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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")
@ -544,15 +550,19 @@ impl fmt::Debug for VideoCaptionMeta {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[repr(transparent)] #[repr(transparent)]
pub struct VideoAFDMeta(gst_video_sys::GstVideoAFDMeta); pub struct VideoAFDMeta(gst_video_sys::GstVideoAFDMeta);
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl Send for VideoAFDMeta {} unsafe impl Send for VideoAFDMeta {}
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl Sync for VideoAFDMeta {} unsafe impl Sync for VideoAFDMeta {}
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -588,6 +598,7 @@ impl VideoAFDMeta {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl MetaAPI for VideoAFDMeta { unsafe impl MetaAPI for VideoAFDMeta {
type GstType = gst_video_sys::GstVideoAFDMeta; type GstType = gst_video_sys::GstVideoAFDMeta;
@ -597,6 +608,7 @@ unsafe impl MetaAPI for VideoAFDMeta {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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")
@ -608,15 +620,19 @@ impl fmt::Debug for VideoAFDMeta {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[repr(transparent)] #[repr(transparent)]
pub struct VideoBarMeta(gst_video_sys::GstVideoBarMeta); pub struct VideoBarMeta(gst_video_sys::GstVideoBarMeta);
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl Send for VideoBarMeta {} unsafe impl Send for VideoBarMeta {}
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl Sync for VideoBarMeta {} unsafe impl Sync for VideoBarMeta {}
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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,
@ -658,6 +674,7 @@ impl VideoBarMeta {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl MetaAPI for VideoBarMeta { unsafe impl MetaAPI for VideoBarMeta {
type GstType = gst_video_sys::GstVideoBarMeta; type GstType = gst_video_sys::GstVideoBarMeta;
@ -667,6 +684,7 @@ unsafe impl MetaAPI for VideoBarMeta {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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

@ -21,10 +21,12 @@ use std::fmt;
use std::mem; use std::mem;
use std::ptr; use std::ptr;
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
use std::str; use std::str;
use VideoTimeCodeFlags; use VideoTimeCodeFlags;
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
use VideoTimeCodeInterval; use VideoTimeCodeInterval;
pub struct VideoTimeCode(gst_video_sys::GstVideoTimeCode); pub struct VideoTimeCode(gst_video_sys::GstVideoTimeCode);
@ -72,6 +74,7 @@ impl VideoTimeCode {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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,
@ -183,6 +186,7 @@ impl ValidVideoTimeCode {
} }
// #[cfg(any(feature = "v1_16", feature = "dox"))] // #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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,
@ -201,6 +205,7 @@ impl ValidVideoTimeCode {
} }
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[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,
@ -481,6 +486,7 @@ generic_impl!(VideoTimeCode);
generic_impl!(ValidVideoTimeCode); generic_impl!(ValidVideoTimeCode);
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[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

@ -38,6 +38,7 @@ mod auto;
pub use auto::*; pub use auto::*;
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[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

@ -35,6 +35,7 @@ pub trait GstBinExtManual: 'static {
) -> SignalHandlerId; ) -> SignalHandlerId;
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> ::Iterator<Element>; fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> ::Iterator<Element>;
fn iterate_all_by_interface(&self, iface: glib::types::Type) -> ::Iterator<Element>; fn iterate_all_by_interface(&self, iface: glib::types::Type) -> ::Iterator<Element>;
fn iterate_elements(&self) -> ::Iterator<Element>; fn iterate_elements(&self) -> ::Iterator<Element>;
@ -110,6 +111,7 @@ impl<O: IsA<Bin>> GstBinExtManual for O {
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> ::Iterator<Element> { fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> ::Iterator<Element> {
unsafe { unsafe {
from_glib_full(gst_sys::gst_bin_iterate_all_by_element_factory_name( from_glib_full(gst_sys::gst_bin_iterate_all_by_element_factory_name(

View file

@ -1292,6 +1292,7 @@ mod tests {
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[test] #[test]
fn test_meta_foreach() { fn test_meta_foreach() {
::init().unwrap(); ::init().unwrap();
@ -1324,6 +1325,7 @@ mod tests {
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[test] #[test]
fn test_meta_foreach_mut() { fn test_meta_foreach_mut() {
::init().unwrap(); ::init().unwrap();

View file

@ -69,6 +69,7 @@ impl BufferListRef {
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn get_writable(&mut self, idx: u32) -> Option<&mut BufferRef> { pub fn get_writable(&mut self, idx: u32) -> Option<&mut BufferRef> {
unsafe { unsafe {
let ptr = gst_sys::gst_buffer_list_get_writable(self.as_mut_ptr(), idx); let ptr = gst_sys::gst_buffer_list_get_writable(self.as_mut_ptr(), idx);
@ -85,6 +86,7 @@ impl BufferListRef {
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn calculate_size(&self) -> usize { pub fn calculate_size(&self) -> usize {
unsafe { gst_sys::gst_buffer_list_calculate_size(self.as_mut_ptr()) as usize } unsafe { gst_sys::gst_buffer_list_calculate_size(self.as_mut_ptr()) as usize }
} }

View file

@ -254,6 +254,7 @@ impl CapsRef {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn set_features_simple(&mut self, features: Option<CapsFeatures>) { pub fn set_features_simple(&mut self, features: Option<CapsFeatures>) {
unsafe { unsafe {
gst_sys::gst_caps_set_features_simple( gst_sys::gst_caps_set_features_simple(

View file

@ -8,6 +8,7 @@
use glib; use glib;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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;
@ -71,11 +72,13 @@ impl ClockId {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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(gst_sys::gst_clock_id_get_clock(self.to_glib_none().0)) } unsafe { from_glib_full(gst_sys::gst_clock_id_get_clock(self.to_glib_none().0)) }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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(gst_sys::gst_clock_id_uses_clock( from_glib(gst_sys::gst_clock_id_uses_clock(

View file

@ -12,9 +12,11 @@ use once_cell::sync::Lazy;
use glib; use glib;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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,
@ -39,17 +41,21 @@ use StateChangeSuccess;
use std::ffi::CStr; use std::ffi::CStr;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use std::future::Future; use std::future::Future;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use std::pin::Pin; use std::pin::Pin;
use libc; use libc;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use glib_sys; use glib_sys;
use gobject_sys; use gobject_sys;
use gst_sys; use gst_sys;
@ -175,6 +181,7 @@ pub trait ElementExtManual: 'static {
fn get_element_flags(&self) -> ElementFlags; fn get_element_flags(&self) -> ElementFlags;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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: ::MessageErrorDomain>( fn message_full_with_details<T: ::MessageErrorDomain>(
&self, &self,
@ -204,6 +211,7 @@ pub trait ElementExtManual: 'static {
fn num_src_pads(&self) -> u16; fn num_src_pads(&self) -> u16;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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>,
@ -211,6 +219,7 @@ pub trait ElementExtManual: 'static {
) -> NotifyWatchId; ) -> NotifyWatchId;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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>,
@ -218,6 +227,7 @@ pub trait ElementExtManual: 'static {
) -> NotifyWatchId; ) -> NotifyWatchId;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn remove_property_notify_watch(&self, watch_id: NotifyWatchId); fn 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,11 +262,13 @@ pub trait ElementExtManual: 'static {
) -> Result<(), glib::error::BoolError>; ) -> Result<(), glib::error::BoolError>;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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,
@ -421,6 +433,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn message_full_with_details<T: ::MessageErrorDomain>( fn message_full_with_details<T: ::MessageErrorDomain>(
&self, &self,
type_: ElementMessageType, type_: ElementMessageType,
@ -565,6 +578,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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>,
@ -581,6 +595,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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>,
@ -597,6 +612,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn remove_property_notify_watch(&self, watch_id: NotifyWatchId) { fn remove_property_notify_watch(&self, watch_id: NotifyWatchId) {
unsafe { unsafe {
gst_sys::gst_element_remove_property_notify_watch( gst_sys::gst_element_remove_property_notify_watch(
@ -769,6 +785,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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,
@ -802,6 +819,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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

@ -23,6 +23,7 @@ use glib::translate::{from_glib, from_glib_full, from_glib_none, ToGlib, ToGlibP
use glib::value::ToSendValue; use glib::value::ToSendValue;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use glib::translate::FromGlibPtrContainer; use glib::translate::FromGlibPtrContainer;
use EventType; use EventType;
@ -396,6 +397,7 @@ impl<'a> StreamStart<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_stream(&self) -> Option<::Stream> { pub fn get_stream(&self) -> Option<::Stream> {
unsafe { unsafe {
let mut stream = ptr::null_mut(); let mut stream = ptr::null_mut();
@ -458,6 +460,7 @@ 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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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: &::StreamCollection) -> Event { pub fn new(stream_collection: &::StreamCollection) -> Event {
skip_assert_initialized!(); skip_assert_initialized!();
@ -465,12 +468,14 @@ impl<'a> StreamCollection<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn builder(stream_collection: &::StreamCollection) -> StreamCollectionBuilder { pub fn builder(stream_collection: &::StreamCollection) -> StreamCollectionBuilder {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
StreamCollectionBuilder::new(stream_collection) StreamCollectionBuilder::new(stream_collection)
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_stream_collection(&self) -> ::StreamCollection { pub fn get_stream_collection(&self) -> ::StreamCollection {
unsafe { unsafe {
let mut stream_collection = ptr::null_mut(); let mut stream_collection = ptr::null_mut();
@ -578,6 +583,7 @@ 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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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!();
@ -585,12 +591,14 @@ impl<'a> StreamGroupDone<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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();
@ -875,6 +883,7 @@ impl<'a> Seek<'a> {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn get_trickmode_interval(&self) -> ::ClockTime { pub fn get_trickmode_interval(&self) -> ::ClockTime {
unsafe { unsafe {
let mut trickmode_interval = mem::MaybeUninit::uninit(); let mut trickmode_interval = mem::MaybeUninit::uninit();
@ -1021,6 +1030,7 @@ 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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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!();
@ -1028,12 +1038,14 @@ impl<'a> SelectStreams<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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();
@ -1264,6 +1276,7 @@ pub struct StreamStartBuilder<'a> {
flags: Option<::StreamFlags>, flags: Option<::StreamFlags>,
group_id: Option<GroupId>, group_id: Option<GroupId>,
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
stream: Option<::Stream>, stream: Option<::Stream>,
} }
@ -1276,6 +1289,7 @@ impl<'a> StreamStartBuilder<'a> {
flags: None, flags: None,
group_id: None, group_id: None,
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
stream: None, stream: None,
} }
} }
@ -1295,6 +1309,7 @@ impl<'a> StreamStartBuilder<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn stream(self, stream: ::Stream) -> Self { pub fn stream(self, stream: ::Stream) -> Self {
Self { Self {
stream: Some(stream), stream: Some(stream),
@ -1312,6 +1327,7 @@ impl<'a> StreamStartBuilder<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
{ {
if let Some(ref stream) = s.stream { if let Some(ref stream) = s.stream {
gst_sys::gst_event_set_stream(ev, stream.to_glib_none().0); gst_sys::gst_event_set_stream(ev, stream.to_glib_none().0);
@ -1359,12 +1375,14 @@ impl<'a> SegmentBuilder<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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 ::StreamCollection, stream_collection: &'a ::StreamCollection,
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> StreamCollectionBuilder<'a> { impl<'a> StreamCollectionBuilder<'a> {
fn new(stream_collection: &'a ::StreamCollection) -> Self { fn new(stream_collection: &'a ::StreamCollection) -> Self {
skip_assert_initialized!(); skip_assert_initialized!();
@ -1448,12 +1466,14 @@ impl<'a> SinkMessageBuilder<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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!();
@ -1655,6 +1675,7 @@ impl<'a> SeekBuilder<'a> {
); );
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
{ {
if let Some(trickmode_interval) = s.trickmode_interval { if let Some(trickmode_interval) = s.trickmode_interval {
gst_sys::gst_event_set_seek_trickmode_interval( gst_sys::gst_event_set_seek_trickmode_interval(
@ -1770,12 +1791,14 @@ impl<'a> TocSelectBuilder<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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

@ -123,6 +123,7 @@ pub fn parse_launchv_full(
} }
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
#[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)]>,
@ -172,6 +173,7 @@ pub fn calculate_linear_regression(
} }
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn type_is_plugin_api(type_: glib::types::Type) -> Option<::PluginAPIFlags> { pub fn type_is_plugin_api(type_: glib::types::Type) -> Option<::PluginAPIFlags> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {

View file

@ -11,6 +11,7 @@
#[macro_use] #[macro_use]
extern crate bitflags; extern crate bitflags;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[macro_use] #[macro_use]
extern crate cfg_if; extern crate cfg_if;
extern crate libc; extern crate libc;
@ -120,8 +121,10 @@ mod tags_serde;
pub mod meta; pub mod meta;
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub use meta::MetaSeqnum; pub use meta::MetaSeqnum;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use meta::ReferenceTimestampMeta; pub use meta::ReferenceTimestampMeta;
pub use meta::{Meta, MetaAPI, MetaRef, MetaRefMut, ParentBufferMeta, ProtectionMeta}; pub use meta::{Meta, MetaAPI, MetaRef, MetaRefMut, ParentBufferMeta, ProtectionMeta};
pub mod buffer; pub mod buffer;
@ -157,8 +160,10 @@ mod static_pad_template;
pub use static_pad_template::*; pub use static_pad_template::*;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub mod promise; pub mod promise;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[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;
@ -176,6 +181,7 @@ 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", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
cfg_if! { cfg_if! {
if #[cfg(unix)] { if #[cfg(unix)] {
mod bus_unix; mod bus_unix;
@ -222,6 +228,7 @@ pub use 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", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
cfg_if! { cfg_if! {
if #[cfg(unix)] { if #[cfg(unix)] {
pub use bus_unix::UnixBusExtManual; pub use bus_unix::UnixBusExtManual;
@ -253,8 +260,10 @@ pub use tag_setter::TagSetterExtManual;
mod plugin; mod plugin;
pub use plugin::GstPluginExtManual; pub use plugin::GstPluginExtManual;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub mod stream; pub mod stream;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub mod stream_collection; pub mod stream_collection;
mod typefind; mod typefind;
@ -347,6 +356,7 @@ pub mod prelude {
// 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", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
cfg_if! { cfg_if! {
if #[cfg(unix)] { if #[cfg(unix)] {
pub use bus_unix::UnixBusExtManual; pub use bus_unix::UnixBusExtManual;

View file

@ -272,6 +272,7 @@ impl<'a> Error<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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();
@ -321,6 +322,7 @@ impl<'a> Warning<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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();
@ -370,6 +372,7 @@ impl<'a> Info<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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();
@ -1332,6 +1335,7 @@ 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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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!();
@ -1339,12 +1343,14 @@ impl<'a> PropertyNotify<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get(&self) -> (Object, &str, Option<&'a glib::Value>) { pub fn get(&self) -> (Object, &str, Option<&'a glib::Value>) {
unsafe { unsafe {
let mut object = ptr::null_mut(); let mut object = ptr::null_mut();
@ -1374,6 +1380,7 @@ 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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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: &::StreamCollection) -> Message { pub fn new(collection: &::StreamCollection) -> Message {
skip_assert_initialized!(); skip_assert_initialized!();
@ -1381,12 +1388,14 @@ impl<'a> StreamCollection<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn builder(collection: &::StreamCollection) -> StreamCollectionBuilder { pub fn builder(collection: &::StreamCollection) -> StreamCollectionBuilder {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
StreamCollectionBuilder::new(collection) StreamCollectionBuilder::new(collection)
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_stream_collection(&self) -> ::StreamCollection { pub fn get_stream_collection(&self) -> ::StreamCollection {
unsafe { unsafe {
let mut collection = ptr::null_mut(); let mut collection = ptr::null_mut();
@ -1401,6 +1410,7 @@ 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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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: &::StreamCollection) -> Message { pub fn new(collection: &::StreamCollection) -> Message {
skip_assert_initialized!(); skip_assert_initialized!();
@ -1408,12 +1418,14 @@ impl<'a> StreamsSelected<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn builder(collection: &::StreamCollection) -> StreamsSelectedBuilder { pub fn builder(collection: &::StreamCollection) -> StreamsSelectedBuilder {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
StreamsSelectedBuilder::new(collection) StreamsSelectedBuilder::new(collection)
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_stream_collection(&self) -> ::StreamCollection { pub fn get_stream_collection(&self) -> ::StreamCollection {
unsafe { unsafe {
let mut collection = ptr::null_mut(); let mut collection = ptr::null_mut();
@ -1425,6 +1437,7 @@ impl<'a> StreamsSelected<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_streams(&self) -> Vec<::Stream> { pub fn get_streams(&self) -> Vec<::Stream> {
unsafe { unsafe {
let n = gst_sys::gst_message_streams_selected_get_size(self.as_mut_ptr()); let n = gst_sys::gst_message_streams_selected_get_size(self.as_mut_ptr());
@ -1444,6 +1457,7 @@ impl<'a> StreamsSelected<'a> {
declare_concrete_message!(Redirect); declare_concrete_message!(Redirect);
impl<'a> Redirect<'a> { impl<'a> Redirect<'a> {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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!();
@ -1451,12 +1465,14 @@ impl<'a> Redirect<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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 = gst_sys::gst_message_get_num_redirect_entries(self.as_mut_ptr()); let n = gst_sys::gst_message_get_num_redirect_entries(self.as_mut_ptr());
@ -1495,6 +1511,7 @@ impl<'a> Redirect<'a> {
declare_concrete_message!(DeviceChanged); declare_concrete_message!(DeviceChanged);
impl<'a> DeviceChanged<'a> { impl<'a> DeviceChanged<'a> {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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 ::Device, changed_device: &'a ::Device) -> Message { pub fn new(device: &'a ::Device, changed_device: &'a ::Device) -> Message {
skip_assert_initialized!(); skip_assert_initialized!();
@ -1502,12 +1519,14 @@ impl<'a> DeviceChanged<'a> {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn builder(device: &'a ::Device, changed_device: &'a ::Device) -> DeviceChangedBuilder<'a> { pub fn builder(device: &'a ::Device, changed_device: &'a ::Device) -> DeviceChangedBuilder<'a> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
DeviceChangedBuilder::new(device, changed_device) DeviceChangedBuilder::new(device, changed_device)
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn get_device_changed(&self) -> (::Device, ::Device) { pub fn get_device_changed(&self) -> (::Device, ::Device) {
unsafe { unsafe {
let mut device = ptr::null_mut(); let mut device = ptr::null_mut();
@ -1555,6 +1574,7 @@ impl<'a> MessageBuilder<'a> {
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn other_fields(self, other_fields: &[(&'a str, &'a dyn ToSendValue)]) -> Self { fn other_fields(self, other_fields: &[(&'a str, &'a dyn ToSendValue)]) -> Self {
Self { Self {
other_fields: self other_fields: self
@ -1587,6 +1607,7 @@ macro_rules! message_builder_generic_impl {
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[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 {
@ -1605,6 +1626,7 @@ macro_rules! message_builder_generic_impl {
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
{ {
if !self.builder.other_fields.is_empty() { if !self.builder.other_fields.is_empty() {
let structure = gst_sys::gst_message_writable_structure(msg); let structure = gst_sys::gst_message_writable_structure(msg);
@ -1676,6 +1698,7 @@ impl<'a, T: MessageErrorDomain> ErrorBuilder<'a, T> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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),
@ -1685,6 +1708,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(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
{ {
let details = match s.details.take() { let details = match s.details.take() {
None => ptr::null_mut(), None => ptr::null_mut(),
@ -1742,6 +1766,7 @@ impl<'a, T: MessageErrorDomain> WarningBuilder<'a, T> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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),
@ -1751,6 +1776,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(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
{ {
let details = match s.details.take() { let details = match s.details.take() {
None => ptr::null_mut(), None => ptr::null_mut(),
@ -1808,6 +1834,7 @@ impl<'a, T: MessageErrorDomain> InfoBuilder<'a, T> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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),
@ -1817,6 +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(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
{ {
let details = match s.details.take() { let details = match s.details.take() {
None => ptr::null_mut(), None => ptr::null_mut(),
@ -2588,6 +2616,7 @@ impl<'a> DeviceRemovedBuilder<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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,
@ -2595,6 +2624,7 @@ pub struct PropertyNotifyBuilder<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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!();
@ -2627,12 +2657,14 @@ impl<'a> PropertyNotifyBuilder<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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 ::StreamCollection, collection: &'a ::StreamCollection,
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> StreamCollectionBuilder<'a> { impl<'a> StreamCollectionBuilder<'a> {
fn new(collection: &'a ::StreamCollection) -> Self { fn new(collection: &'a ::StreamCollection) -> Self {
skip_assert_initialized!(); skip_assert_initialized!();
@ -2651,15 +2683,19 @@ impl<'a> StreamCollectionBuilder<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
collection: &'a ::StreamCollection, collection: &'a ::StreamCollection,
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
streams: Option<&'a [&'a ::Stream]>, streams: Option<&'a [&'a ::Stream]>,
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> StreamsSelectedBuilder<'a> { impl<'a> StreamsSelectedBuilder<'a> {
fn new(collection: &'a ::StreamCollection) -> Self { fn new(collection: &'a ::StreamCollection) -> Self {
skip_assert_initialized!(); skip_assert_initialized!();
@ -2689,6 +2725,7 @@ impl<'a> StreamsSelectedBuilder<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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,
@ -2699,6 +2736,7 @@ pub struct RedirectBuilder<'a> {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[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!();
@ -2771,6 +2809,7 @@ impl<'a> RedirectBuilder<'a> {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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 ::Device, device: &'a ::Device,
@ -2778,6 +2817,7 @@ pub struct DeviceChangedBuilder<'a> {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl<'a> DeviceChangedBuilder<'a> { impl<'a> DeviceChangedBuilder<'a> {
fn new(device: &'a ::Device, changed_device: &'a ::Device) -> Self { fn new(device: &'a ::Device, changed_device: &'a ::Device) -> Self {
skip_assert_initialized!(); skip_assert_initialized!();

View file

@ -13,14 +13,18 @@ use std::ops;
use Buffer; use Buffer;
use BufferRef; use BufferRef;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use Caps; use Caps;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use CapsRef; use CapsRef;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use ClockTime; use ClockTime;
use glib; use glib;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[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};
use glib_sys; use glib_sys;
@ -71,6 +75,7 @@ pub unsafe trait MetaAPI: Sync + Send + Sized {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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);
@ -151,6 +156,7 @@ impl<'a, T: MetaAPI> MetaRef<'a, T> {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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 gst_sys::GstMeta; let meta = self.meta as *const _ as *const gst_sys::GstMeta;
@ -186,6 +192,7 @@ impl<'a, T: MetaAPI, U> MetaRefMut<'a, T, U> {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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 gst_sys::GstMeta; let meta = self.meta as *const _ as *const gst_sys::GstMeta;
@ -342,15 +349,19 @@ impl fmt::Debug for ProtectionMeta {
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[repr(transparent)] #[repr(transparent)]
pub struct ReferenceTimestampMeta(gst_sys::GstReferenceTimestampMeta); pub struct ReferenceTimestampMeta(gst_sys::GstReferenceTimestampMeta);
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
unsafe impl Send for ReferenceTimestampMeta {} unsafe impl Send for ReferenceTimestampMeta {}
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
unsafe impl Sync for ReferenceTimestampMeta {} unsafe impl Sync for ReferenceTimestampMeta {}
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[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,
@ -389,6 +400,7 @@ impl ReferenceTimestampMeta {
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
unsafe impl MetaAPI for ReferenceTimestampMeta { unsafe impl MetaAPI for ReferenceTimestampMeta {
type GstType = gst_sys::GstReferenceTimestampMeta; type GstType = gst_sys::GstReferenceTimestampMeta;
@ -398,6 +410,7 @@ unsafe impl MetaAPI for ReferenceTimestampMeta {
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[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,18 +7,23 @@
// except according to those terms. // except according to those terms.
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use glib::translate::*; use glib::translate::*;
use PadTemplate; use PadTemplate;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use StaticPadTemplate; use StaticPadTemplate;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use glib; use glib;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use gst_sys; use gst_sys;
impl PadTemplate { impl PadTemplate {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[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

@ -12,6 +12,7 @@ use gst_sys;
pub trait GstParamSpecExt { pub trait GstParamSpecExt {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn array( fn array(
name: &str, name: &str,
nick: &str, nick: &str,
@ -33,6 +34,7 @@ pub trait GstParamSpecExt {
impl GstParamSpecExt for glib::ParamSpec { impl GstParamSpecExt for glib::ParamSpec {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn array( fn array(
name: &str, name: &str,
nick: &str, nick: &str,

View file

@ -1337,6 +1337,7 @@ impl<T: AsMutPtr> Context<T> {
declare_concrete_query!(Bitrate, T); declare_concrete_query!(Bitrate, T);
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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!();
@ -1345,6 +1346,7 @@ impl Bitrate<Query> {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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()
@ -1353,6 +1355,7 @@ impl Default for Bitrate<Query> {
impl<T: AsPtr> Bitrate<T> { impl<T: AsPtr> Bitrate<T> {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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();
@ -1364,6 +1367,7 @@ impl<T: AsPtr> Bitrate<T> {
impl<T: AsMutPtr> Bitrate<T> { impl<T: AsMutPtr> Bitrate<T> {
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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 {
gst_sys::gst_query_set_bitrate(self.0.as_mut_ptr(), bitrate); gst_sys::gst_query_set_bitrate(self.0.as_mut_ptr(), bitrate);

View file

@ -182,11 +182,13 @@ impl SampleRef {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn set_buffer(&mut self, buffer: Option<&Buffer>) { pub fn set_buffer(&mut self, buffer: Option<&Buffer>) {
unsafe { gst_sys::gst_sample_set_buffer(self.as_mut_ptr(), buffer.to_glib_none().0) } unsafe { gst_sys::gst_sample_set_buffer(self.as_mut_ptr(), buffer.to_glib_none().0) }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn set_buffer_list(&mut self, buffer_list: Option<&BufferList>) { pub fn set_buffer_list(&mut self, buffer_list: Option<&BufferList>) {
unsafe { unsafe {
gst_sys::gst_sample_set_buffer_list(self.as_mut_ptr(), buffer_list.to_glib_none().0) gst_sys::gst_sample_set_buffer_list(self.as_mut_ptr(), buffer_list.to_glib_none().0)
@ -194,16 +196,19 @@ impl SampleRef {
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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 { gst_sys::gst_sample_set_caps(self.as_mut_ptr(), caps.to_glib_none().0) } unsafe { gst_sys::gst_sample_set_caps(self.as_mut_ptr(), caps.to_glib_none().0) }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn set_segment(&mut self, segment: Option<&Segment>) { pub fn set_segment(&mut self, segment: Option<&Segment>) {
unsafe { gst_sys::gst_sample_set_segment(self.as_mut_ptr(), segment.to_glib_none().0) } unsafe { gst_sys::gst_sample_set_segment(self.as_mut_ptr(), segment.to_glib_none().0) }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]
#[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 {
gst_sys::gst_sample_set_info( gst_sys::gst_sample_set_info(