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_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn push_buffer_list(
&self,
list: gst::BufferList,

View file

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

View file

@ -9,13 +9,16 @@
use std::fmt;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::ptr;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::slice;
use glib;
use glib::translate::{from_glib, ToGlib};
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::translate::{from_glib_none, ToGlibPtr};
use gst;
use gst::prelude::*;
@ -76,15 +79,19 @@ impl fmt::Debug for AudioClippingMeta {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[repr(transparent)]
pub struct AudioMeta(gst_audio_sys::GstAudioMeta);
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl Send for AudioMeta {}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl Sync for AudioMeta {}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl AudioMeta {
pub fn add<'a>(
buffer: &'a mut gst::BufferRef,
@ -190,6 +197,7 @@ impl AudioMeta {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl MetaAPI for AudioMeta {
type GstType = gst_audio_sys::GstAudioMeta;
@ -199,6 +207,7 @@ unsafe impl MetaAPI for AudioMeta {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl fmt::Debug for AudioMeta {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("AudioMeta")

View file

@ -15,6 +15,7 @@ use std::mem;
impl AudioStreamAlign {
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn process(
&mut self,
discont: bool,

View file

@ -33,6 +33,7 @@ pub fn audio_buffer_clip(
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn audio_buffer_truncate(
buffer: gst::Buffer,
bpf: u32,

View file

@ -59,12 +59,15 @@ pub use audio_meta::*;
mod audio_channel_position;
pub use audio_channel_position::*;
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
mod audio_stream_align;
mod functions;
pub use functions::*;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub mod audio_buffer;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub use audio_buffer::{AudioBuffer, AudioBufferRef};
mod audio_decoder;

View file

@ -86,11 +86,13 @@ impl UniqueAdapter {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn distance_from_discont(&self) -> u64 {
self.0.distance_from_discont()
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn dts_at_discont(&self) -> gst::ClockTime {
self.0.dts_at_discont()
}
@ -130,6 +132,7 @@ impl UniqueAdapter {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn offset_at_discont(&self) -> u64 {
self.0.offset_at_discont()
}
@ -143,6 +146,7 @@ impl UniqueAdapter {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn prev_offset(&self) -> (u64, u64) {
self.0.prev_offset()
}
@ -156,6 +160,7 @@ impl UniqueAdapter {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn pts_at_discont(&self) -> gst::ClockTime {
self.0.pts_at_discont()
}

View file

@ -7,19 +7,24 @@
// except according to those terms.
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::prelude::*;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::signal::{connect_raw, SignalHandlerId};
use glib::translate::*;
use glib::IsA;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::Value;
use gst;
use gst_base_sys;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::boxed::Box as Box_;
use std::mem;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use std::mem::transmute;
use std::ptr;
use Aggregator;
@ -30,27 +35,33 @@ pub trait AggregatorExtManual: 'static {
fn finish_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError>;
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn finish_buffer_list(
&self,
bufferlist: gst::BufferList,
) -> Result<gst::FlowSuccess, gst::FlowError>;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn get_property_min_upstream_latency(&self) -> gst::ClockTime;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn set_property_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime);
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn connect_property_min_upstream_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId;
#[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>);
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn selected_samples(
&self,
pts: gst::ClockTime,
@ -60,6 +71,7 @@ pub trait AggregatorExtManual: 'static {
);
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn connect_samples_selected<
P,
F: Fn(
@ -104,6 +116,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn finish_buffer_list(
&self,
bufferlist: gst::BufferList,
@ -118,6 +131,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn get_property_min_upstream_latency(&self) -> gst::ClockTime {
unsafe {
let mut value = Value::from_type(<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_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn set_property_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime) {
unsafe {
gobject_sys::g_object_set_property(
@ -145,6 +160,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn connect_property_min_upstream_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
@ -162,6 +178,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
}
}
#[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>) {
unsafe {
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_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn selected_samples(
&self,
pts: gst::ClockTime,
@ -193,6 +211,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn connect_samples_selected<
P,
F: Fn(
@ -263,6 +282,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe extern "C" fn notify_min_upstream_latency_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstAggregator,
_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>;
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::BoolError>;
}
@ -109,6 +110,7 @@ impl<O: IsA<BaseSrc>> BaseSrcExtManual for O {
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::BoolError> {
unsafe {
let ret = from_glib(gst_base_sys::gst_base_src_new_segment(

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_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn type_find_helper_for_data_with_extension<P: IsA<gst::Object>, R: AsRef<[u8]>>(
obj: Option<&P>,
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_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn type_find_helper_for_buffer_with_extension<P: IsA<gst::Object>>(
obj: Option<&P>,
buf: &gst::Buffer,

View file

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

View file

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

View file

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

View file

@ -99,6 +99,7 @@ impl Harness {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn add_propose_allocation_meta(
&mut self,
api: glib::types::Type,
@ -493,6 +494,7 @@ impl Harness {
//}
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn take_all_data_as_buffer(&mut self) -> Result<gst::Buffer, glib::BoolError> {
unsafe {
Option::<_>::from_glib_full(gst_check_sys::gst_harness_take_all_data_as_buffer(
@ -503,6 +505,7 @@ impl Harness {
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub fn take_all_data_as_bytes(&mut self) -> Result<glib::Bytes, glib::BoolError> {
unsafe {
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_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
pub fn process_id(&self, pending_id: &gst::ClockId) -> bool {
unsafe {
from_glib(gst_check_sys::gst_test_clock_process_id(
@ -85,6 +86,7 @@ impl TestClock {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn timed_wait_for_multiple_pending_ids(
&self,
count: u32,

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -21,6 +21,7 @@ use VideoEncoder;
pub trait VideoEncoderExtManual: 'static {
#[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
fn allocate_output_frame(
&self,
frame: &mut VideoCodecFrame,
@ -39,6 +40,7 @@ pub trait VideoEncoderExtManual: 'static {
) -> Result<gst::FlowSuccess, gst::FlowError>;
#[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 get_latency(&self) -> (gst::ClockTime, gst::ClockTime);
@ -59,6 +61,7 @@ pub trait VideoEncoderExtManual: 'static {
impl<O: IsA<VideoEncoder>> VideoEncoderExtManual for O {
#[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
fn allocate_output_frame(
&self,
frame: &mut VideoCodecFrame,
@ -101,6 +104,7 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExtManual for O {
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError> {
let ret: gst::FlowReturn = unsafe {
from_glib(gst_video_sys::gst_video_encoder_finish_subframe(

View file

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

View file

@ -482,15 +482,19 @@ impl fmt::Debug for VideoOverlayCompositionMeta {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[repr(transparent)]
pub struct VideoCaptionMeta(gst_video_sys::GstVideoCaptionMeta);
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl Send for VideoCaptionMeta {}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl Sync for VideoCaptionMeta {}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl VideoCaptionMeta {
pub fn add<'a>(
buffer: &'a mut gst::BufferRef,
@ -525,6 +529,7 @@ impl VideoCaptionMeta {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
unsafe impl MetaAPI for VideoCaptionMeta {
type GstType = gst_video_sys::GstVideoCaptionMeta;
@ -534,6 +539,7 @@ unsafe impl MetaAPI for VideoCaptionMeta {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl fmt::Debug for VideoCaptionMeta {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("VideoCaptionMeta")
@ -544,15 +550,19 @@ impl fmt::Debug for VideoCaptionMeta {
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[repr(transparent)]
pub struct VideoAFDMeta(gst_video_sys::GstVideoAFDMeta);
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl Send for VideoAFDMeta {}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl Sync for VideoAFDMeta {}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl VideoAFDMeta {
pub fn add(
buffer: &mut gst::BufferRef,
@ -588,6 +598,7 @@ impl VideoAFDMeta {
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl MetaAPI for VideoAFDMeta {
type GstType = gst_video_sys::GstVideoAFDMeta;
@ -597,6 +608,7 @@ unsafe impl MetaAPI for VideoAFDMeta {
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl fmt::Debug for VideoAFDMeta {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("VideoAFDMeta")
@ -608,15 +620,19 @@ impl fmt::Debug for VideoAFDMeta {
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[repr(transparent)]
pub struct VideoBarMeta(gst_video_sys::GstVideoBarMeta);
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl Send for VideoBarMeta {}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl Sync for VideoBarMeta {}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl VideoBarMeta {
pub fn add(
buffer: &mut gst::BufferRef,
@ -658,6 +674,7 @@ impl VideoBarMeta {
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
unsafe impl MetaAPI for VideoBarMeta {
type GstType = gst_video_sys::GstVideoBarMeta;
@ -667,6 +684,7 @@ unsafe impl MetaAPI for VideoBarMeta {
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl fmt::Debug for VideoBarMeta {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("VideoBarMeta")

View file

@ -21,10 +21,12 @@ use std::fmt;
use std::mem;
use std::ptr;
#[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
use std::str;
use VideoTimeCodeFlags;
#[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
use VideoTimeCodeInterval;
pub struct VideoTimeCode(gst_video_sys::GstVideoTimeCode);
@ -72,6 +74,7 @@ impl VideoTimeCode {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn from_date_time(
fps: gst::Fraction,
dt: &glib::DateTime,
@ -183,6 +186,7 @@ impl ValidVideoTimeCode {
}
// #[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
// pub fn from_date_time(
// fps: gst::Fraction,
// dt: &glib::DateTime,
@ -201,6 +205,7 @@ impl ValidVideoTimeCode {
}
#[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
pub fn add_interval(
&self,
tc_inter: &VideoTimeCodeInterval,
@ -481,6 +486,7 @@ generic_impl!(VideoTimeCode);
generic_impl!(ValidVideoTimeCode);
#[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
impl str::FromStr for VideoTimeCode {
type Err = glib::error::BoolError;

View file

@ -38,6 +38,7 @@ mod auto;
pub use auto::*;
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
mod web_rtc_data_channel;
mod web_rtc_session_description;

View file

@ -35,6 +35,7 @@ pub trait GstBinExtManual: 'static {
) -> SignalHandlerId;
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> ::Iterator<Element>;
fn iterate_all_by_interface(&self, iface: glib::types::Type) -> ::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_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> ::Iterator<Element> {
unsafe {
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_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[test]
fn test_meta_foreach() {
::init().unwrap();
@ -1324,6 +1325,7 @@ mod tests {
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[test]
fn test_meta_foreach_mut() {
::init().unwrap();

View file

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

View file

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

View file

@ -8,6 +8,7 @@
use glib;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::prelude::*;
use glib::translate::*;
use glib::IsA;
@ -71,11 +72,13 @@ impl ClockId {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn get_clock(&self) -> Option<Clock> {
unsafe { from_glib_full(gst_sys::gst_clock_id_get_clock(self.to_glib_none().0)) }
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn uses_clock<P: IsA<Clock>>(&self, clock: &P) -> bool {
unsafe {
from_glib(gst_sys::gst_clock_id_uses_clock(

View file

@ -12,9 +12,11 @@ use once_cell::sync::Lazy;
use glib;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use glib::object::Cast;
use glib::object::IsA;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use glib::translate::FromGlibPtrBorrow;
use glib::translate::{
from_glib, from_glib_full, from_glib_none, FromGlib, FromGlibPtrContainer, ToGlib, ToGlibPtr,
@ -39,17 +41,21 @@ use StateChangeSuccess;
use std::ffi::CStr;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use std::future::Future;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use std::marker::Unpin;
use std::mem;
use std::num::NonZeroU64;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use std::pin::Pin;
use libc;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use glib_sys;
use gobject_sys;
use gst_sys;
@ -175,6 +181,7 @@ pub trait ElementExtManual: 'static {
fn get_element_flags(&self) -> ElementFlags;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[allow(clippy::too_many_arguments)]
fn message_full_with_details<T: ::MessageErrorDomain>(
&self,
@ -204,6 +211,7 @@ pub trait ElementExtManual: 'static {
fn num_src_pads(&self) -> u16;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn add_property_deep_notify_watch(
&self,
property_name: Option<&str>,
@ -211,6 +219,7 @@ pub trait ElementExtManual: 'static {
) -> NotifyWatchId;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn add_property_notify_watch(
&self,
property_name: Option<&str>,
@ -218,6 +227,7 @@ pub trait ElementExtManual: 'static {
) -> NotifyWatchId;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn remove_property_notify_watch(&self, watch_id: NotifyWatchId);
fn query_convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>(
@ -252,11 +262,13 @@ pub trait ElementExtManual: 'static {
) -> Result<(), glib::error::BoolError>;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn call_async<F>(&self, func: F)
where
F: FnOnce(&Self) + Send + 'static;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn call_async_future<F, T>(
&self,
func: F,
@ -421,6 +433,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn message_full_with_details<T: ::MessageErrorDomain>(
&self,
type_: ElementMessageType,
@ -565,6 +578,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn add_property_deep_notify_watch(
&self,
property_name: Option<&str>,
@ -581,6 +595,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn add_property_notify_watch(
&self,
property_name: Option<&str>,
@ -597,6 +612,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn remove_property_notify_watch(&self, watch_id: NotifyWatchId) {
unsafe {
gst_sys::gst_element_remove_property_notify_watch(
@ -769,6 +785,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn call_async<F>(&self, func: F)
where
F: FnOnce(&Self) + Send + 'static,
@ -802,6 +819,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
fn call_async_future<F, T>(
&self,
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;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
use glib::translate::FromGlibPtrContainer;
use EventType;
@ -396,6 +397,7 @@ impl<'a> StreamStart<'a> {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_stream(&self) -> Option<::Stream> {
unsafe {
let mut stream = ptr::null_mut();
@ -458,6 +460,7 @@ impl<'a> Segment<'a> {
declare_concrete_event!(StreamCollection);
impl<'a> StreamCollection<'a> {
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[allow(clippy::new_ret_no_self)]
pub fn new(stream_collection: &::StreamCollection) -> Event {
skip_assert_initialized!();
@ -465,12 +468,14 @@ impl<'a> StreamCollection<'a> {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn builder(stream_collection: &::StreamCollection) -> StreamCollectionBuilder {
assert_initialized_main_thread!();
StreamCollectionBuilder::new(stream_collection)
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_stream_collection(&self) -> ::StreamCollection {
unsafe {
let mut stream_collection = ptr::null_mut();
@ -578,6 +583,7 @@ impl<'a> SinkMessage<'a> {
declare_concrete_event!(StreamGroupDone);
impl<'a> StreamGroupDone<'a> {
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[allow(clippy::new_ret_no_self)]
pub fn new(group_id: GroupId) -> Event {
skip_assert_initialized!();
@ -585,12 +591,14 @@ impl<'a> StreamGroupDone<'a> {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn builder(group_id: GroupId) -> StreamGroupDoneBuilder<'a> {
assert_initialized_main_thread!();
StreamGroupDoneBuilder::new(group_id)
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_group_id(&self) -> GroupId {
unsafe {
let mut group_id = mem::MaybeUninit::uninit();
@ -875,6 +883,7 @@ impl<'a> Seek<'a> {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn get_trickmode_interval(&self) -> ::ClockTime {
unsafe {
let mut trickmode_interval = mem::MaybeUninit::uninit();
@ -1021,6 +1030,7 @@ impl<'a> TocSelect<'a> {
declare_concrete_event!(SelectStreams);
impl<'a> SelectStreams<'a> {
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[allow(clippy::new_ret_no_self)]
pub fn new(streams: &'a [&'a str]) -> Event {
skip_assert_initialized!();
@ -1028,12 +1038,14 @@ impl<'a> SelectStreams<'a> {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn builder(streams: &'a [&'a str]) -> SelectStreamsBuilder {
assert_initialized_main_thread!();
SelectStreamsBuilder::new(streams)
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn get_streams(&self) -> Vec<String> {
unsafe {
let mut streams = ptr::null_mut();
@ -1264,6 +1276,7 @@ pub struct StreamStartBuilder<'a> {
flags: Option<::StreamFlags>,
group_id: Option<GroupId>,
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
stream: Option<::Stream>,
}
@ -1276,6 +1289,7 @@ impl<'a> StreamStartBuilder<'a> {
flags: None,
group_id: None,
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
stream: None,
}
}
@ -1295,6 +1309,7 @@ impl<'a> StreamStartBuilder<'a> {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn stream(self, stream: ::Stream) -> Self {
Self {
stream: Some(stream),
@ -1312,6 +1327,7 @@ impl<'a> StreamStartBuilder<'a> {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
{
if let Some(ref stream) = s.stream {
gst_sys::gst_event_set_stream(ev, stream.to_glib_none().0);
@ -1359,12 +1375,14 @@ impl<'a> SegmentBuilder<'a> {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub struct StreamCollectionBuilder<'a> {
builder: EventBuilder<'a>,
stream_collection: &'a ::StreamCollection,
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> StreamCollectionBuilder<'a> {
fn new(stream_collection: &'a ::StreamCollection) -> Self {
skip_assert_initialized!();
@ -1448,12 +1466,14 @@ impl<'a> SinkMessageBuilder<'a> {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub struct StreamGroupDoneBuilder<'a> {
builder: EventBuilder<'a>,
group_id: GroupId,
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> StreamGroupDoneBuilder<'a> {
fn new(group_id: GroupId) -> Self {
skip_assert_initialized!();
@ -1655,6 +1675,7 @@ impl<'a> SeekBuilder<'a> {
);
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
{
if let Some(trickmode_interval) = s.trickmode_interval {
gst_sys::gst_event_set_seek_trickmode_interval(
@ -1770,12 +1791,14 @@ impl<'a> TocSelectBuilder<'a> {
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub struct SelectStreamsBuilder<'a> {
builder: EventBuilder<'a>,
streams: &'a [&'a str],
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> SelectStreamsBuilder<'a> {
fn new(streams: &'a [&'a str]) -> Self {
skip_assert_initialized!();

View file

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

View file

@ -11,6 +11,7 @@
#[macro_use]
extern crate bitflags;
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[macro_use]
extern crate cfg_if;
extern crate libc;
@ -120,8 +121,10 @@ mod tags_serde;
pub mod meta;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub use meta::MetaSeqnum;
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use meta::ReferenceTimestampMeta;
pub use meta::{Meta, MetaAPI, MetaRef, MetaRefMut, ParentBufferMeta, ProtectionMeta};
pub mod buffer;
@ -157,8 +160,10 @@ mod static_pad_template;
pub use static_pad_template::*;
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub mod promise;
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
pub use promise::{Promise, PromiseError};
pub mod bus;
@ -176,6 +181,7 @@ pub use self::allocation_params::AllocationParams;
// OS dependent Bus extensions (also import the other plateform mod for doc)
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
cfg_if! {
if #[cfg(unix)] {
mod bus_unix;
@ -222,6 +228,7 @@ pub use object::GstObjectExtManual;
// OS dependent Bus extensions (also import the other plateform trait for doc)
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
cfg_if! {
if #[cfg(unix)] {
pub use bus_unix::UnixBusExtManual;
@ -253,8 +260,10 @@ pub use tag_setter::TagSetterExtManual;
mod plugin;
pub use plugin::GstPluginExtManual;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub mod stream;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub mod stream_collection;
mod typefind;
@ -347,6 +356,7 @@ pub mod prelude {
// OS dependent Bus extensions (also import the other plateform trait for doc)
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
cfg_if! {
if #[cfg(unix)] {
pub use bus_unix::UnixBusExtManual;

View file

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

View file

@ -13,14 +13,18 @@ use std::ops;
use Buffer;
use BufferRef;
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use Caps;
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use CapsRef;
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use ClockTime;
use glib;
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use glib::translate::ToGlib;
use glib::translate::{from_glib, from_glib_none, FromGlib, ToGlibPtr};
use glib_sys;
@ -71,6 +75,7 @@ pub unsafe trait MetaAPI: Sync + Send + Sized {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
#[derive(Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq)]
pub struct MetaSeqnum(u64);
@ -151,6 +156,7 @@ impl<'a, T: MetaAPI> MetaRef<'a, T> {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn get_seqnum(&self) -> MetaSeqnum {
unsafe {
let meta = self.meta as *const _ as *const gst_sys::GstMeta;
@ -186,6 +192,7 @@ impl<'a, T: MetaAPI, U> MetaRefMut<'a, T, U> {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn get_seqnum(&self) -> u64 {
unsafe {
let meta = self.meta as *const _ as *const gst_sys::GstMeta;
@ -342,15 +349,19 @@ impl fmt::Debug for ProtectionMeta {
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
#[repr(transparent)]
pub struct ReferenceTimestampMeta(gst_sys::GstReferenceTimestampMeta);
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
unsafe impl Send for ReferenceTimestampMeta {}
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
unsafe impl Sync for ReferenceTimestampMeta {}
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
impl ReferenceTimestampMeta {
pub fn add<'a>(
buffer: &'a mut BufferRef,
@ -389,6 +400,7 @@ impl ReferenceTimestampMeta {
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
unsafe impl MetaAPI for ReferenceTimestampMeta {
type GstType = gst_sys::GstReferenceTimestampMeta;
@ -398,6 +410,7 @@ unsafe impl MetaAPI for ReferenceTimestampMeta {
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
impl fmt::Debug for ReferenceTimestampMeta {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("ReferenceTimestampMeta")

View file

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

View file

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

View file

@ -1337,6 +1337,7 @@ impl<T: AsMutPtr> Context<T> {
declare_concrete_query!(Bitrate, T);
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl Bitrate<Query> {
pub fn new() -> Self {
assert_initialized_main_thread!();
@ -1345,6 +1346,7 @@ impl Bitrate<Query> {
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl Default for Bitrate<Query> {
fn default() -> Self {
Self::new()
@ -1353,6 +1355,7 @@ impl Default for Bitrate<Query> {
impl<T: AsPtr> Bitrate<T> {
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn get_bitrate(&self) -> u32 {
unsafe {
let mut bitrate = mem::MaybeUninit::uninit();
@ -1364,6 +1367,7 @@ impl<T: AsPtr> Bitrate<T> {
impl<T: AsMutPtr> Bitrate<T> {
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
pub fn set_bitrate(&mut self, bitrate: u32) {
unsafe {
gst_sys::gst_query_set_bitrate(self.0.as_mut_ptr(), bitrate);

View file

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