From 448c1e10a0cd8cc2057671c5f872fcf4dd72140e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 6 Jul 2020 11:37:14 +0300 Subject: [PATCH] Regenerate --- gstreamer-app/src/auto/versions.txt | 4 +- gstreamer-audio/src/auto/audio_decoder.rs | 34 ++++++++ gstreamer-audio/src/auto/versions.txt | 4 +- gstreamer-base/src/auto/aggregator.rs | 76 +++++++++++++++++ gstreamer-base/src/auto/enums.rs | 82 ++++++++++++++++++- gstreamer-base/src/auto/mod.rs | 5 ++ gstreamer-base/src/auto/versions.txt | 4 +- gstreamer-check/src/auto/versions.txt | 4 +- gstreamer-editing-services/src/auto/clip.rs | 22 +---- gstreamer-editing-services/src/auto/layer.rs | 2 + .../src/auto/timeline_element.rs | 4 + .../src/auto/track_element.rs | 43 +++------- .../src/auto/uri_clip_asset.rs | 2 + .../src/auto/versions.txt | 4 +- gstreamer-gl/src/auto/versions.txt | 4 +- gstreamer-net/src/auto/versions.txt | 4 +- gstreamer-pbutils/src/auto/encoding_target.rs | 9 ++ gstreamer-pbutils/src/auto/versions.txt | 4 +- gstreamer-player/src/auto/versions.txt | 4 +- gstreamer-rtp/src/auto/versions.txt | 4 +- gstreamer-rtsp-server/src/auto/versions.txt | 4 +- gstreamer-rtsp/src/auto/versions.txt | 4 +- gstreamer-sdp/src/auto/versions.txt | 4 +- gstreamer-video/src/auto/versions.txt | 4 +- gstreamer-video/src/auto/video_decoder.rs | 34 ++++++++ gstreamer-video/src/auto/video_encoder.rs | 64 +++++++++++++++ gstreamer-webrtc/src/auto/versions.txt | 4 +- gstreamer/src/auto/flags.rs | 54 ++++++++++++ gstreamer/src/auto/functions.rs | 10 +++ gstreamer/src/auto/mod.rs | 2 + gstreamer/src/auto/pad_template.rs | 19 +++++ gstreamer/src/auto/versions.txt | 4 +- 32 files changed, 440 insertions(+), 86 deletions(-) diff --git a/gstreamer-app/src/auto/versions.txt b/gstreamer-app/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-app/src/auto/versions.txt +++ b/gstreamer-app/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer-audio/src/auto/audio_decoder.rs b/gstreamer-audio/src/auto/audio_decoder.rs index 0610c3f7f..350a8fddb 100644 --- a/gstreamer-audio/src/auto/audio_decoder.rs +++ b/gstreamer-audio/src/auto/audio_decoder.rs @@ -83,6 +83,12 @@ pub trait AudioDecoderExt: 'static { fn set_use_default_pad_acceptcaps(&self, use_: bool); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_max_errors_notify( + &self, + f: F, + ) -> SignalHandlerId; + fn connect_property_min_latency_notify( &self, f: F, @@ -324,6 +330,34 @@ impl> AudioDecoderExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_max_errors_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_max_errors_trampoline( + this: *mut gst_audio_sys::GstAudioDecoder, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&AudioDecoder::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::max-errors\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_max_errors_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + fn connect_property_min_latency_notify( &self, f: F, diff --git a/gstreamer-audio/src/auto/versions.txt b/gstreamer-audio/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-audio/src/auto/versions.txt +++ b/gstreamer-audio/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer-base/src/auto/aggregator.rs b/gstreamer-base/src/auto/aggregator.rs index bb25ee7ae..c178f20a4 100644 --- a/gstreamer-base/src/auto/aggregator.rs +++ b/gstreamer-base/src/auto/aggregator.rs @@ -15,6 +15,8 @@ use gst; use gst_base_sys; use std::boxed::Box as Box_; use std::mem::transmute; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use AggregatorStartTimeSelection; glib_wrapper! { pub struct Aggregator(Object) @extends gst::Element, gst::Object; @@ -58,6 +60,12 @@ pub trait AggregatorExt: 'static { fn set_property_start_time(&self, start_time: u64); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_property_start_time_selection(&self) -> AggregatorStartTimeSelection; + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_property_start_time_selection(&self, start_time_selection: AggregatorStartTimeSelection); + #[cfg(any(feature = "v1_14", feature = "dox"))] fn connect_property_latency_notify( &self, @@ -68,6 +76,12 @@ pub trait AggregatorExt: 'static { &self, f: F, ) -> SignalHandlerId; + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_start_time_selection_notify( + &self, + f: F, + ) -> SignalHandlerId; } impl> AggregatorExt for O { @@ -163,6 +177,37 @@ impl> AggregatorExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_property_start_time_selection(&self) -> AggregatorStartTimeSelection { + unsafe { + let mut value = + Value::from_type(::static_type()); + gobject_sys::g_object_get_property( + self.to_glib_none().0 as *mut gobject_sys::GObject, + b"start-time-selection\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `start-time-selection` getter") + .unwrap() + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_property_start_time_selection( + &self, + start_time_selection: AggregatorStartTimeSelection, + ) { + unsafe { + gobject_sys::g_object_set_property( + self.to_glib_none().0 as *mut gobject_sys::GObject, + b"start-time-selection\0".as_ptr() as *const _, + Value::from(&start_time_selection).to_glib_none().0, + ); + } + } + #[cfg(any(feature = "v1_14", feature = "dox"))] fn connect_property_latency_notify( &self, @@ -217,4 +262,35 @@ impl> AggregatorExt for O { ) } } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_start_time_selection_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_start_time_selection_trampoline< + P, + F: Fn(&P) + Send + Sync + 'static, + >( + this: *mut gst_base_sys::GstAggregator, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&Aggregator::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::start-time-selection\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_start_time_selection_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } } diff --git a/gstreamer-base/src/auto/enums.rs b/gstreamer-base/src/auto/enums.rs index db4949d05..50ae3633a 100644 --- a/gstreamer-base/src/auto/enums.rs +++ b/gstreamer-base/src/auto/enums.rs @@ -2,6 +2,86 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use gst_base_sys; use glib::translate::*; +use glib::value::FromValue; +use glib::value::FromValueOptional; +use glib::value::SetValue; +use glib::value::Value; +use glib::StaticType; +use glib::Type; +use gobject_sys; +use gst_base_sys; +#[cfg(any(feature = "v1_18", feature = "dox"))] +#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] +#[non_exhaustive] +pub enum AggregatorStartTimeSelection { + Zero, + First, + Set, + #[doc(hidden)] + __Unknown(i32), +} + +#[cfg(any(feature = "v1_18", feature = "dox"))] +#[doc(hidden)] +impl ToGlib for AggregatorStartTimeSelection { + type GlibType = gst_base_sys::GstAggregatorStartTimeSelection; + + fn to_glib(&self) -> gst_base_sys::GstAggregatorStartTimeSelection { + match *self { + AggregatorStartTimeSelection::Zero => { + gst_base_sys::GST_AGGREGATOR_START_TIME_SELECTION_ZERO + } + AggregatorStartTimeSelection::First => { + gst_base_sys::GST_AGGREGATOR_START_TIME_SELECTION_FIRST + } + AggregatorStartTimeSelection::Set => { + gst_base_sys::GST_AGGREGATOR_START_TIME_SELECTION_SET + } + AggregatorStartTimeSelection::__Unknown(value) => value, + } + } +} + +#[cfg(any(feature = "v1_18", feature = "dox"))] +#[doc(hidden)] +impl FromGlib for AggregatorStartTimeSelection { + fn from_glib(value: gst_base_sys::GstAggregatorStartTimeSelection) -> Self { + skip_assert_initialized!(); + match value { + 0 => AggregatorStartTimeSelection::Zero, + 1 => AggregatorStartTimeSelection::First, + 2 => AggregatorStartTimeSelection::Set, + value => AggregatorStartTimeSelection::__Unknown(value), + } + } +} + +#[cfg(any(feature = "v1_18", feature = "dox"))] +impl StaticType for AggregatorStartTimeSelection { + fn static_type() -> Type { + unsafe { from_glib(gst_base_sys::gst_aggregator_start_time_selection_get_type()) } + } +} + +#[cfg(any(feature = "v1_18", feature = "dox"))] +impl<'a> FromValueOptional<'a> for AggregatorStartTimeSelection { + unsafe fn from_value_optional(value: &Value) -> Option { + Some(FromValue::from_value(value)) + } +} + +#[cfg(any(feature = "v1_18", feature = "dox"))] +impl<'a> FromValue<'a> for AggregatorStartTimeSelection { + unsafe fn from_value(value: &Value) -> Self { + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) + } +} + +#[cfg(any(feature = "v1_18", feature = "dox"))] +impl SetValue for AggregatorStartTimeSelection { + unsafe fn set_value(value: &mut Value, this: &Self) { + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + } +} diff --git a/gstreamer-base/src/auto/mod.rs b/gstreamer-base/src/auto/mod.rs index 6e3f20227..83ff7dbbf 100644 --- a/gstreamer-base/src/auto/mod.rs +++ b/gstreamer-base/src/auto/mod.rs @@ -38,6 +38,11 @@ pub use self::base_transform::{BaseTransform, BaseTransformClass, NONE_BASE_TRAN mod push_src; pub use self::push_src::{PushSrc, PushSrcClass, NONE_PUSH_SRC}; +#[cfg(any(feature = "v1_18", feature = "dox"))] +mod enums; +#[cfg(any(feature = "v1_18", feature = "dox"))] +pub use self::enums::AggregatorStartTimeSelection; + mod flags; pub use self::flags::BaseParseFrameFlags; diff --git a/gstreamer-base/src/auto/versions.txt b/gstreamer-base/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-base/src/auto/versions.txt +++ b/gstreamer-base/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer-check/src/auto/versions.txt b/gstreamer-check/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-check/src/auto/versions.txt +++ b/gstreamer-check/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer-editing-services/src/auto/clip.rs b/gstreamer-editing-services/src/auto/clip.rs index c05390598..9a90670ce 100644 --- a/gstreamer-editing-services/src/auto/clip.rs +++ b/gstreamer-editing-services/src/auto/clip.rs @@ -9,10 +9,7 @@ use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; -use glib::StaticType; -use glib::Value; use glib_sys; -use gobject_sys; #[cfg(any(feature = "v1_18", feature = "dox"))] use gst; use std::boxed::Box as Box_; @@ -135,8 +132,7 @@ pub trait ClipExt: 'static { #[cfg(any(feature = "v1_18", feature = "dox"))] fn split_full(&self, position: u64) -> Result, glib::Error>; - fn get_property_duration_limit(&self) -> u64; - + #[cfg(any(feature = "v1_18", feature = "dox"))] fn connect_property_duration_limit_notify( &self, f: F, @@ -481,21 +477,7 @@ impl> ClipExt for O { } } - fn get_property_duration_limit(&self) -> u64 { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.to_glib_none().0 as *mut gobject_sys::GObject, - b"duration-limit\0".as_ptr() as *const _, - value.to_glib_none_mut().0, - ); - value - .get() - .expect("Return Value for property `duration-limit` getter") - .unwrap() - } - } - + #[cfg(any(feature = "v1_18", feature = "dox"))] fn connect_property_duration_limit_notify( &self, f: F, diff --git a/gstreamer-editing-services/src/auto/layer.rs b/gstreamer-editing-services/src/auto/layer.rs index 32673d2da..2bbd24934 100644 --- a/gstreamer-editing-services/src/auto/layer.rs +++ b/gstreamer-editing-services/src/auto/layer.rs @@ -100,6 +100,7 @@ pub trait LayerExt: 'static { fn set_timeline>(&self, timeline: &P); + //#[cfg(any(feature = "v1_18", feature = "dox"))] //fn connect_active_changed(&self, f: F) -> SignalHandlerId; fn connect_clip_added(&self, f: F) -> SignalHandlerId; @@ -301,6 +302,7 @@ impl> LayerExt for O { } } + //#[cfg(any(feature = "v1_18", feature = "dox"))] //fn connect_active_changed(&self, f: F) -> SignalHandlerId { // Empty ctype tracks: *.PtrArray TypeId { ns_id: 1, id: 17 } //} diff --git a/gstreamer-editing-services/src/auto/timeline_element.rs b/gstreamer-editing-services/src/auto/timeline_element.rs index 0714b1213..0b66d25d0 100644 --- a/gstreamer-editing-services/src/auto/timeline_element.rs +++ b/gstreamer-editing-services/src/auto/timeline_element.rs @@ -154,8 +154,10 @@ pub trait TimelineElementExt: 'static { fn set_property_serialize(&self, serialize: bool); + //#[cfg(any(feature = "v1_18", feature = "dox"))] //fn connect_child_property_added(&self, f: F) -> SignalHandlerId; + //#[cfg(any(feature = "v1_18", feature = "dox"))] //fn connect_child_property_removed(&self, f: F) -> SignalHandlerId; //fn connect_deep_notify(&self, f: F) -> SignalHandlerId; @@ -594,10 +596,12 @@ impl> TimelineElementExt for O { } } + //#[cfg(any(feature = "v1_18", feature = "dox"))] //fn connect_child_property_added(&self, f: F) -> SignalHandlerId { // Ignored prop: GObject.ParamSpec //} + //#[cfg(any(feature = "v1_18", feature = "dox"))] //fn connect_child_property_removed(&self, f: F) -> SignalHandlerId { // Ignored prop: GObject.ParamSpec //} diff --git a/gstreamer-editing-services/src/auto/track_element.rs b/gstreamer-editing-services/src/auto/track_element.rs index 8b9328773..aec6fdd61 100644 --- a/gstreamer-editing-services/src/auto/track_element.rs +++ b/gstreamer-editing-services/src/auto/track_element.rs @@ -92,16 +92,13 @@ pub trait TrackElementExt: 'static { //fn set_control_source(&self, source: /*Ignored*/&gst::ControlSource, property_name: &str, binding_type: &str) -> bool; #[cfg(any(feature = "v1_18", feature = "dox"))] - fn set_has_internal_source(&self, has_internal_source: bool); + fn set_has_internal_source(&self, has_internal_source: bool) -> bool; fn set_track_type(&self, type_: TrackType); fn get_property_active(&self) -> bool; - fn get_property_auto_clamp_control_sources(&self) -> bool; - - fn set_property_auto_clamp_control_sources(&self, auto_clamp_control_sources: bool); - + #[cfg(any(feature = "v1_18", feature = "dox"))] fn get_property_has_internal_source(&self) -> bool; //fn connect_control_binding_added(&self, f: F) -> SignalHandlerId; @@ -110,11 +107,13 @@ pub trait TrackElementExt: 'static { fn connect_property_active_notify(&self, f: F) -> SignalHandlerId; + #[cfg(any(feature = "v1_18", feature = "dox"))] fn connect_property_auto_clamp_control_sources_notify( &self, f: F, ) -> SignalHandlerId; + #[cfg(any(feature = "v1_18", feature = "dox"))] fn connect_property_has_internal_source_notify( &self, f: F, @@ -298,12 +297,12 @@ impl> TrackElementExt for O { //} #[cfg(any(feature = "v1_18", feature = "dox"))] - fn set_has_internal_source(&self, has_internal_source: bool) { + fn set_has_internal_source(&self, has_internal_source: bool) -> bool { unsafe { - ges_sys::ges_track_element_set_has_internal_source( + from_glib(ges_sys::ges_track_element_set_has_internal_source( self.as_ref().to_glib_none().0, has_internal_source.to_glib(), - ); + )) } } @@ -331,31 +330,7 @@ impl> TrackElementExt for O { } } - fn get_property_auto_clamp_control_sources(&self) -> bool { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.to_glib_none().0 as *mut gobject_sys::GObject, - b"auto-clamp-control-sources\0".as_ptr() as *const _, - value.to_glib_none_mut().0, - ); - value - .get() - .expect("Return Value for property `auto-clamp-control-sources` getter") - .unwrap() - } - } - - fn set_property_auto_clamp_control_sources(&self, auto_clamp_control_sources: bool) { - unsafe { - gobject_sys::g_object_set_property( - self.to_glib_none().0 as *mut gobject_sys::GObject, - b"auto-clamp-control-sources\0".as_ptr() as *const _, - Value::from(&auto_clamp_control_sources).to_glib_none().0, - ); - } - } - + #[cfg(any(feature = "v1_18", feature = "dox"))] fn get_property_has_internal_source(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); @@ -403,6 +378,7 @@ impl> TrackElementExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] fn connect_property_auto_clamp_control_sources_notify( &self, f: F, @@ -430,6 +406,7 @@ impl> TrackElementExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] fn connect_property_has_internal_source_notify( &self, f: F, diff --git a/gstreamer-editing-services/src/auto/uri_clip_asset.rs b/gstreamer-editing-services/src/auto/uri_clip_asset.rs index 817de7d1e..a8b01b483 100644 --- a/gstreamer-editing-services/src/auto/uri_clip_asset.rs +++ b/gstreamer-editing-services/src/auto/uri_clip_asset.rs @@ -66,6 +66,7 @@ pub trait UriClipAssetExt: 'static { fn get_stream_assets(&self) -> Vec; + #[cfg(any(feature = "v1_18", feature = "dox"))] fn is_image(&self) -> bool; fn set_property_duration(&self, duration: u64); @@ -116,6 +117,7 @@ impl> UriClipAssetExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] fn is_image(&self) -> bool { unsafe { from_glib(ges_sys::ges_uri_clip_asset_is_image( diff --git a/gstreamer-editing-services/src/auto/versions.txt b/gstreamer-editing-services/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-editing-services/src/auto/versions.txt +++ b/gstreamer-editing-services/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer-gl/src/auto/versions.txt b/gstreamer-gl/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-gl/src/auto/versions.txt +++ b/gstreamer-gl/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer-net/src/auto/versions.txt b/gstreamer-net/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-net/src/auto/versions.txt +++ b/gstreamer-net/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer-pbutils/src/auto/encoding_target.rs b/gstreamer-pbutils/src/auto/encoding_target.rs index 73cf574e0..fa2b19030 100644 --- a/gstreamer-pbutils/src/auto/encoding_target.rs +++ b/gstreamer-pbutils/src/auto/encoding_target.rs @@ -60,6 +60,15 @@ impl EncodingTarget { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn get_path(&self) -> Option { + unsafe { + from_glib_none(gst_pbutils_sys::gst_encoding_target_get_path( + self.to_glib_none().0, + )) + } + } + pub fn get_profile(&self, name: &str) -> Option { unsafe { from_glib_full(gst_pbutils_sys::gst_encoding_target_get_profile( diff --git a/gstreamer-pbutils/src/auto/versions.txt b/gstreamer-pbutils/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-pbutils/src/auto/versions.txt +++ b/gstreamer-pbutils/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer-player/src/auto/versions.txt b/gstreamer-player/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-player/src/auto/versions.txt +++ b/gstreamer-player/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer-rtp/src/auto/versions.txt b/gstreamer-rtp/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-rtp/src/auto/versions.txt +++ b/gstreamer-rtp/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer-rtsp-server/src/auto/versions.txt b/gstreamer-rtsp-server/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-rtsp-server/src/auto/versions.txt +++ b/gstreamer-rtsp-server/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer-rtsp/src/auto/versions.txt b/gstreamer-rtsp/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-rtsp/src/auto/versions.txt +++ b/gstreamer-rtsp/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer-sdp/src/auto/versions.txt b/gstreamer-sdp/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-sdp/src/auto/versions.txt +++ b/gstreamer-sdp/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer-video/src/auto/versions.txt b/gstreamer-video/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-video/src/auto/versions.txt +++ b/gstreamer-video/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer-video/src/auto/video_decoder.rs b/gstreamer-video/src/auto/video_decoder.rs index 9104f4ac3..a4b49ae07 100644 --- a/gstreamer-video/src/auto/video_decoder.rs +++ b/gstreamer-video/src/auto/video_decoder.rs @@ -81,6 +81,12 @@ pub trait VideoDecoderExt: 'static { #[cfg(any(feature = "v1_18", feature = "dox"))] fn set_property_qos(&self, qos: bool); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_max_errors_notify( + &self, + f: F, + ) -> SignalHandlerId; + #[cfg(any(feature = "v1_18", feature = "dox"))] fn connect_property_qos_notify( &self, @@ -248,6 +254,34 @@ impl> VideoDecoderExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_max_errors_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_max_errors_trampoline( + this: *mut gst_video_sys::GstVideoDecoder, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&VideoDecoder::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::max-errors\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_max_errors_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + #[cfg(any(feature = "v1_18", feature = "dox"))] fn connect_property_qos_notify( &self, diff --git a/gstreamer-video/src/auto/video_encoder.rs b/gstreamer-video/src/auto/video_encoder.rs index 1f66ba323..a6a2718ca 100644 --- a/gstreamer-video/src/auto/video_encoder.rs +++ b/gstreamer-video/src/auto/video_encoder.rs @@ -38,6 +38,9 @@ pub trait VideoEncoderExt: 'static { #[cfg(any(feature = "v1_14", feature = "dox"))] fn get_max_encode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_min_force_key_unit_interval(&self) -> gst::ClockTime; + #[cfg(any(feature = "v1_14", feature = "dox"))] fn is_qos_enabled(&self) -> bool; @@ -47,6 +50,9 @@ pub trait VideoEncoderExt: 'static { fn set_headers(&self, headers: &[&gst::Buffer]); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_min_force_key_unit_interval(&self, interval: gst::ClockTime); + fn set_min_pts(&self, min_pts: gst::ClockTime); #[cfg(any(feature = "v1_14", feature = "dox"))] @@ -56,6 +62,12 @@ pub trait VideoEncoderExt: 'static { fn set_property_qos(&self, qos: bool); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_min_force_key_unit_interval_notify( + &self, + f: F, + ) -> SignalHandlerId; + fn connect_property_qos_notify( &self, f: F, @@ -83,6 +95,17 @@ impl> VideoEncoderExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_min_force_key_unit_interval(&self) -> gst::ClockTime { + unsafe { + from_glib( + gst_video_sys::gst_video_encoder_get_min_force_key_unit_interval( + self.as_ref().to_glib_none().0, + ), + ) + } + } + #[cfg(any(feature = "v1_14", feature = "dox"))] fn is_qos_enabled(&self) -> bool { unsafe { @@ -121,6 +144,16 @@ impl> VideoEncoderExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_min_force_key_unit_interval(&self, interval: gst::ClockTime) { + unsafe { + gst_video_sys::gst_video_encoder_set_min_force_key_unit_interval( + self.as_ref().to_glib_none().0, + interval.to_glib(), + ); + } + } + fn set_min_pts(&self, min_pts: gst::ClockTime) { unsafe { gst_video_sys::gst_video_encoder_set_min_pts( @@ -165,6 +198,37 @@ impl> VideoEncoderExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_min_force_key_unit_interval_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_min_force_key_unit_interval_trampoline< + P, + F: Fn(&P) + Send + Sync + 'static, + >( + this: *mut gst_video_sys::GstVideoEncoder, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&VideoEncoder::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::min-force-key-unit-interval\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_min_force_key_unit_interval_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + fn connect_property_qos_notify( &self, f: F, diff --git a/gstreamer-webrtc/src/auto/versions.txt b/gstreamer-webrtc/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer-webrtc/src/auto/versions.txt +++ b/gstreamer-webrtc/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba) diff --git a/gstreamer/src/auto/flags.rs b/gstreamer/src/auto/flags.rs index ff2f72d6a..c9cfd8066 100644 --- a/gstreamer/src/auto/flags.rs +++ b/gstreamer/src/auto/flags.rs @@ -819,6 +819,60 @@ impl SetValue for PipelineFlags { } } +#[cfg(any(feature = "v1_18", feature = "dox"))] +bitflags! { + pub struct PluginAPIFlags: u32 { + const MEMBERS = 1; + } +} + +#[cfg(any(feature = "v1_18", feature = "dox"))] +#[doc(hidden)] +impl ToGlib for PluginAPIFlags { + type GlibType = gst_sys::GstPluginAPIFlags; + + fn to_glib(&self) -> gst_sys::GstPluginAPIFlags { + self.bits() + } +} + +#[cfg(any(feature = "v1_18", feature = "dox"))] +#[doc(hidden)] +impl FromGlib for PluginAPIFlags { + fn from_glib(value: gst_sys::GstPluginAPIFlags) -> PluginAPIFlags { + skip_assert_initialized!(); + PluginAPIFlags::from_bits_truncate(value) + } +} + +#[cfg(any(feature = "v1_18", feature = "dox"))] +impl StaticType for PluginAPIFlags { + fn static_type() -> Type { + unsafe { from_glib(gst_sys::gst_plugin_api_flags_get_type()) } + } +} + +#[cfg(any(feature = "v1_18", feature = "dox"))] +impl<'a> FromValueOptional<'a> for PluginAPIFlags { + unsafe fn from_value_optional(value: &Value) -> Option { + Some(FromValue::from_value(value)) + } +} + +#[cfg(any(feature = "v1_18", feature = "dox"))] +impl<'a> FromValue<'a> for PluginAPIFlags { + unsafe fn from_value(value: &Value) -> Self { + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) + } +} + +#[cfg(any(feature = "v1_18", feature = "dox"))] +impl SetValue for PluginAPIFlags { + unsafe fn set_value(value: &mut Value, this: &Self) { + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + } +} + bitflags! { pub struct PluginDependencyFlags: u32 { const RECURSE = 1; diff --git a/gstreamer/src/auto/functions.rs b/gstreamer/src/auto/functions.rs index 33312edf1..85820f17f 100644 --- a/gstreamer/src/auto/functions.rs +++ b/gstreamer/src/auto/functions.rs @@ -15,6 +15,8 @@ use ClockTime; use DebugGraphDetails; use DebugLevel; use Element; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use PluginAPIFlags; #[cfg(any(feature = "v1_12", feature = "dox"))] use StackTraceFlags; @@ -219,6 +221,14 @@ pub fn parse_launchv(argv: &[&str]) -> Result { // unsafe { TODO: call gst_sys:gst_tracing_register_hook() } //} +#[cfg(any(feature = "v1_18", feature = "dox"))] +pub fn type_mark_as_plugin_api(type_: glib::types::Type, flags: PluginAPIFlags) { + assert_initialized_main_thread!(); + unsafe { + gst_sys::gst_type_mark_as_plugin_api(type_.to_glib(), flags.to_glib()); + } +} + pub fn update_registry() -> Result<(), glib::error::BoolError> { assert_initialized_main_thread!(); unsafe { diff --git a/gstreamer/src/auto/mod.rs b/gstreamer/src/auto/mod.rs index 7ce9ceb4b..a5ef0e8e8 100644 --- a/gstreamer/src/auto/mod.rs +++ b/gstreamer/src/auto/mod.rs @@ -176,6 +176,8 @@ pub use self::flags::PadLinkCheck; pub use self::flags::PadProbeType; pub use self::flags::ParseFlags; pub use self::flags::PipelineFlags; +#[cfg(any(feature = "v1_18", feature = "dox"))] +pub use self::flags::PluginAPIFlags; pub use self::flags::PluginDependencyFlags; pub use self::flags::PluginFlags; pub use self::flags::SchedulingFlags; diff --git a/gstreamer/src/auto/pad_template.rs b/gstreamer/src/auto/pad_template.rs index 4f9ea59a2..fc183f90d 100644 --- a/gstreamer/src/auto/pad_template.rs +++ b/gstreamer/src/auto/pad_template.rs @@ -74,6 +74,15 @@ impl PadTemplate { unsafe { from_glib_full(gst_sys::gst_pad_template_get_caps(self.to_glib_none().0)) } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn get_documentation_caps(&self) -> Option { + unsafe { + from_glib_full(gst_sys::gst_pad_template_get_documentation_caps( + self.to_glib_none().0, + )) + } + } + pub fn pad_created>(&self, pad: &P) { unsafe { gst_sys::gst_pad_template_pad_created( @@ -83,6 +92,16 @@ impl PadTemplate { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn set_documentation_caps(&self, caps: &Caps) { + unsafe { + gst_sys::gst_pad_template_set_documentation_caps( + self.to_glib_none().0, + caps.to_glib_none().0, + ); + } + } + pub fn get_property_direction(&self) -> PadDirection { unsafe { let mut value = Value::from_type(::static_type()); diff --git a/gstreamer/src/auto/versions.txt b/gstreamer/src/auto/versions.txt index eaa6a3f46..58a91ab4b 100644 --- a/gstreamer/src/auto/versions.txt +++ b/gstreamer/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0) +Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0) +from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)