From 1b0a20e52f3a32ea5087fcb1b18e35e99ab5a624 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 3 Jun 2020 14:26:16 +0200 Subject: [PATCH] regenerate --- gstreamer-app/src/auto/versions.txt | 4 +- gstreamer-audio/src/auto/versions.txt | 4 +- gstreamer-base/src/auto/aggregator.rs | 4 +- gstreamer-base/src/auto/versions.txt | 4 +- gstreamer-check/src/auto/versions.txt | 4 +- .../src/auto/base_effect.rs | 40 +- gstreamer-editing-services/src/auto/clip.rs | 235 +++++++ gstreamer-editing-services/src/auto/layer.rs | 60 ++ gstreamer-editing-services/src/auto/mod.rs | 2 + .../src/auto/project.rs | 2 +- .../src/auto/timeline.rs | 2 +- .../src/auto/timeline_element.rs | 45 ++ gstreamer-editing-services/src/auto/track.rs | 42 ++ .../src/auto/track_element.rs | 111 +++ .../src/auto/versions.txt | 4 +- gstreamer-gl/src/auto/gl_window.rs | 2 + gstreamer-gl/src/auto/versions.txt | 4 +- gstreamer-net/src/auto/versions.txt | 4 +- 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/rtsp_media.rs | 82 +++ .../src/auto/rtsp_media_factory.rs | 84 +++ .../src/auto/rtsp_stream_transport.rs | 32 + gstreamer-rtsp-server/src/auto/versions.txt | 4 +- gstreamer-rtsp/src/auto/rtsp_url.rs | 1 + gstreamer-rtsp/src/auto/versions.txt | 4 +- gstreamer-sdp/src/auto/versions.txt | 4 +- gstreamer-video/src/auto/enums.rs | 7 + gstreamer-video/src/auto/mod.rs | 1 + gstreamer-video/src/auto/versions.txt | 4 +- gstreamer-webrtc/src/auto/mod.rs | 5 + gstreamer-webrtc/src/auto/versions.txt | 4 +- .../src/auto/web_rtc_data_channel.rs | 649 ++++++++++++++++++ gstreamer/src/auto/versions.txt | 4 +- 35 files changed, 1432 insertions(+), 38 deletions(-) create mode 100644 gstreamer-webrtc/src/auto/web_rtc_data_channel.rs diff --git a/gstreamer-app/src/auto/versions.txt b/gstreamer-app/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-audio/src/auto/versions.txt b/gstreamer-audio/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-base/src/auto/aggregator.rs b/gstreamer-base/src/auto/aggregator.rs index b260e5fec..bb25ee7ae 100644 --- a/gstreamer-base/src/auto/aggregator.rs +++ b/gstreamer-base/src/auto/aggregator.rs @@ -52,7 +52,7 @@ pub trait AggregatorExt: 'static { fn simple_get_next_time(&self) -> gst::ClockTime; //#[cfg(any(feature = "v1_18", feature = "dox"))] - //fn update_segment(&self, segment: /*Ignored*/&mut gst::Segment); + //fn update_segment(&self, segment: /*Ignored*/&gst::Segment); fn get_property_start_time(&self) -> u64; @@ -134,7 +134,7 @@ impl> AggregatorExt for O { } //#[cfg(any(feature = "v1_18", feature = "dox"))] - //fn update_segment(&self, segment: /*Ignored*/&mut gst::Segment) { + //fn update_segment(&self, segment: /*Ignored*/&gst::Segment) { // unsafe { TODO: call gst_base_sys:gst_aggregator_update_segment() } //} diff --git a/gstreamer-base/src/auto/versions.txt b/gstreamer-base/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-check/src/auto/versions.txt b/gstreamer-check/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-editing-services/src/auto/base_effect.rs b/gstreamer-editing-services/src/auto/base_effect.rs index ab4b1614e..df97faff8 100644 --- a/gstreamer-editing-services/src/auto/base_effect.rs +++ b/gstreamer-editing-services/src/auto/base_effect.rs @@ -3,6 +3,7 @@ // DO NOT EDIT use ges_sys; +use glib::object::IsA; use glib::translate::*; use Extractable; use TimelineElement; @@ -16,6 +17,41 @@ glib_wrapper! { } } -impl BaseEffect {} - pub const NONE_BASE_EFFECT: Option<&BaseEffect> = None; + +pub trait BaseEffectExt: 'static { + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn is_time_effect(&self) -> bool; + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn register_time_property(&self, child_property_name: &str) -> bool; + + //#[cfg(any(feature = "v1_18", feature = "dox"))] + //fn set_time_translation_funcs(&self, source_to_sink_func: /*Unimplemented*/Fn(&BaseEffect, gst::ClockTime, /*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 3, id: 11 }) -> gst::ClockTime, sink_to_source_func: /*Unimplemented*/Fn(&BaseEffect, gst::ClockTime, /*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 3, id: 11 }) -> gst::ClockTime, user_data: /*Unimplemented*/Option) -> bool; +} + +impl> BaseEffectExt for O { + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn is_time_effect(&self) -> bool { + unsafe { + from_glib(ges_sys::ges_base_effect_is_time_effect( + self.as_ref().to_glib_none().0, + )) + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn register_time_property(&self, child_property_name: &str) -> bool { + unsafe { + from_glib(ges_sys::ges_base_effect_register_time_property( + self.as_ref().to_glib_none().0, + child_property_name.to_glib_none().0, + )) + } + } + + //#[cfg(any(feature = "v1_18", feature = "dox"))] + //fn set_time_translation_funcs(&self, source_to_sink_func: /*Unimplemented*/Fn(&BaseEffect, gst::ClockTime, /*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 3, id: 11 }) -> gst::ClockTime, sink_to_source_func: /*Unimplemented*/Fn(&BaseEffect, gst::ClockTime, /*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 3, id: 11 }) -> gst::ClockTime, user_data: /*Unimplemented*/Option) -> bool { + // unsafe { TODO: call ges_sys:ges_base_effect_set_time_translation_funcs() } + //} +} diff --git a/gstreamer-editing-services/src/auto/clip.rs b/gstreamer-editing-services/src/auto/clip.rs index d396b651a..b0ccf3916 100644 --- a/gstreamer-editing-services/src/auto/clip.rs +++ b/gstreamer-editing-services/src/auto/clip.rs @@ -9,7 +9,10 @@ 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; use gst; use std::boxed::Box as Box_; use std::mem::transmute; @@ -18,6 +21,7 @@ use Asset; use BaseEffect; use Container; use Extractable; +#[cfg(any(feature = "v1_18", feature = "dox"))] use FrameNumber; use Layer; use TimelineElement; @@ -44,6 +48,10 @@ pub trait ClipExt: 'static { track: &Q, ) -> Result; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn add_top_effect>(&self, effect: &P, index: i32) + -> Result<(), glib::Error>; + fn find_track_element>( &self, track: Option<&P>, @@ -57,10 +65,27 @@ pub trait ClipExt: 'static { type_: glib::types::Type, ) -> Vec; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_duration_limit(&self) -> gst::ClockTime; + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_internal_time_from_timeline_time>( + &self, + child: &P, + timeline_time: gst::ClockTime, + ) -> Result; + fn get_layer(&self) -> Option; fn get_supported_formats(&self) -> TrackType; + fn get_timeline_time_from_internal_time>( + &self, + child: &P, + internal_time: gst::ClockTime, + ) -> Result; + + #[cfg(any(feature = "v1_18", feature = "dox"))] fn get_timeline_time_from_source_frame( &self, frame_number: FrameNumber, @@ -74,6 +99,12 @@ pub trait ClipExt: 'static { fn move_to_layer>(&self, layer: &P) -> Result<(), glib::error::BoolError>; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn move_to_layer_full>(&self, layer: &P) -> Result<(), glib::Error>; + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn remove_top_effect>(&self, effect: &P) -> Result<(), glib::Error>; + fn set_supported_formats(&self, supportedformats: TrackType); fn set_top_effect_index>( @@ -82,6 +113,13 @@ pub trait ClipExt: 'static { newindex: u32, ) -> Result<(), glib::error::BoolError>; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_top_effect_index_full>( + &self, + effect: &P, + newindex: u32, + ) -> Result<(), glib::Error>; + fn set_top_effect_priority>( &self, effect: &P, @@ -90,6 +128,16 @@ pub trait ClipExt: 'static { fn split(&self, position: u64) -> Result; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn split_full(&self, position: u64) -> Result, glib::Error>; + + fn get_property_duration_limit(&self) -> u64; + + fn connect_property_duration_limit_notify( + &self, + f: F, + ) -> SignalHandlerId; + fn connect_property_layer_notify(&self, f: F) -> SignalHandlerId; fn connect_property_supported_formats_notify( @@ -130,6 +178,28 @@ impl> ClipExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn add_top_effect>( + &self, + effect: &P, + index: i32, + ) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ges_sys::ges_clip_add_top_effect( + self.as_ref().to_glib_none().0, + effect.as_ref().to_glib_none().0, + index, + &mut error, + ); + if error.is_null() { + Ok(()) + } else { + Err(from_glib_full(error)) + } + } + } + fn find_track_element>( &self, track: Option<&P>, @@ -160,6 +230,37 @@ impl> ClipExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_duration_limit(&self) -> gst::ClockTime { + unsafe { + from_glib(ges_sys::ges_clip_get_duration_limit( + self.as_ref().to_glib_none().0, + )) + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_internal_time_from_timeline_time>( + &self, + child: &P, + timeline_time: gst::ClockTime, + ) -> Result { + unsafe { + let mut error = ptr::null_mut(); + let ret = ges_sys::ges_clip_get_internal_time_from_timeline_time( + self.as_ref().to_glib_none().0, + child.as_ref().to_glib_none().0, + timeline_time.to_glib(), + &mut error, + ); + if error.is_null() { + Ok(from_glib(ret)) + } else { + Err(from_glib_full(error)) + } + } + } + fn get_layer(&self) -> Option { unsafe { from_glib_full(ges_sys::ges_clip_get_layer(self.as_ref().to_glib_none().0)) } } @@ -172,6 +273,28 @@ impl> ClipExt for O { } } + fn get_timeline_time_from_internal_time>( + &self, + child: &P, + internal_time: gst::ClockTime, + ) -> Result { + unsafe { + let mut error = ptr::null_mut(); + let ret = ges_sys::ges_clip_get_timeline_time_from_internal_time( + self.as_ref().to_glib_none().0, + child.as_ref().to_glib_none().0, + internal_time.to_glib(), + &mut error, + ); + if error.is_null() { + Ok(from_glib(ret)) + } else { + Err(from_glib_full(error)) + } + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] fn get_timeline_time_from_source_frame( &self, frame_number: FrameNumber, @@ -229,6 +352,40 @@ impl> ClipExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn move_to_layer_full>(&self, layer: &P) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ges_sys::ges_clip_move_to_layer_full( + self.as_ref().to_glib_none().0, + layer.as_ref().to_glib_none().0, + &mut error, + ); + if error.is_null() { + Ok(()) + } else { + Err(from_glib_full(error)) + } + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn remove_top_effect>(&self, effect: &P) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ges_sys::ges_clip_remove_top_effect( + self.as_ref().to_glib_none().0, + effect.as_ref().to_glib_none().0, + &mut error, + ); + if error.is_null() { + Ok(()) + } else { + Err(from_glib_full(error)) + } + } + } + fn set_supported_formats(&self, supportedformats: TrackType) { unsafe { ges_sys::ges_clip_set_supported_formats( @@ -255,6 +412,28 @@ impl> ClipExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_top_effect_index_full>( + &self, + effect: &P, + newindex: u32, + ) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ges_sys::ges_clip_set_top_effect_index_full( + self.as_ref().to_glib_none().0, + effect.as_ref().to_glib_none().0, + newindex, + &mut error, + ); + if error.is_null() { + Ok(()) + } else { + Err(from_glib_full(error)) + } + } + } + fn set_top_effect_priority>( &self, effect: &P, @@ -282,6 +461,62 @@ impl> ClipExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn split_full(&self, position: u64) -> Result, glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let ret = + ges_sys::ges_clip_split_full(self.as_ref().to_glib_none().0, position, &mut error); + if error.is_null() { + Ok(from_glib_none(ret)) + } else { + Err(from_glib_full(error)) + } + } + } + + 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() + } + } + + fn connect_property_duration_limit_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_duration_limit_trampoline( + this: *mut ges_sys::GESClip, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&Clip::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::duration-limit\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_duration_limit_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + fn connect_property_layer_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_layer_trampoline( this: *mut ges_sys::GESClip, diff --git a/gstreamer-editing-services/src/auto/layer.rs b/gstreamer-editing-services/src/auto/layer.rs index 6272bf882..091d0788a 100644 --- a/gstreamer-editing-services/src/auto/layer.rs +++ b/gstreamer-editing-services/src/auto/layer.rs @@ -13,6 +13,8 @@ use glib_sys; use gst; use std::boxed::Box as Box_; use std::mem::transmute; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use std::ptr; use Asset; use Clip; use Extractable; @@ -53,8 +55,21 @@ pub trait LayerExt: 'static { track_types: TrackType, ) -> Result; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn add_asset_full>( + &self, + asset: &P, + start: gst::ClockTime, + inpoint: gst::ClockTime, + duration: gst::ClockTime, + track_types: TrackType, + ) -> Result; + fn add_clip>(&self, clip: &P) -> Result<(), glib::error::BoolError>; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn add_clip_full>(&self, clip: &P) -> Result<(), glib::Error>; + fn get_active_for_track>(&self, track: &P) -> bool; fn get_auto_transition(&self) -> bool; @@ -119,6 +134,34 @@ impl> LayerExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn add_asset_full>( + &self, + asset: &P, + start: gst::ClockTime, + inpoint: gst::ClockTime, + duration: gst::ClockTime, + track_types: TrackType, + ) -> Result { + unsafe { + let mut error = ptr::null_mut(); + let ret = ges_sys::ges_layer_add_asset_full( + self.as_ref().to_glib_none().0, + asset.as_ref().to_glib_none().0, + start.to_glib(), + inpoint.to_glib(), + duration.to_glib(), + track_types.to_glib(), + &mut error, + ); + if error.is_null() { + Ok(from_glib_none(ret)) + } else { + Err(from_glib_full(error)) + } + } + } + fn add_clip>(&self, clip: &P) -> Result<(), glib::error::BoolError> { unsafe { glib_result_from_gboolean!( @@ -131,6 +174,23 @@ impl> LayerExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn add_clip_full>(&self, clip: &P) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ges_sys::ges_layer_add_clip_full( + self.as_ref().to_glib_none().0, + clip.as_ref().to_glib_none().0, + &mut error, + ); + if error.is_null() { + Ok(()) + } else { + Err(from_glib_full(error)) + } + } + } + fn get_active_for_track>(&self, track: &P) -> bool { unsafe { from_glib(ges_sys::ges_layer_get_active_for_track( diff --git a/gstreamer-editing-services/src/auto/mod.rs b/gstreamer-editing-services/src/auto/mod.rs index f79ea99f5..c4659b3d0 100644 --- a/gstreamer-editing-services/src/auto/mod.rs +++ b/gstreamer-editing-services/src/auto/mod.rs @@ -7,6 +7,7 @@ pub use self::asset::AssetExt; pub use self::asset::{Asset, AssetClass, NONE_ASSET}; mod base_effect; +pub use self::base_effect::BaseEffectExt; pub use self::base_effect::{BaseEffect, BaseEffectClass, NONE_BASE_EFFECT}; mod clip; @@ -83,6 +84,7 @@ pub use self::alias::FrameNumber; #[doc(hidden)] pub mod traits { pub use super::AssetExt; + pub use super::BaseEffectExt; pub use super::ClipExt; pub use super::EffectExt; pub use super::ExtractableExt; diff --git a/gstreamer-editing-services/src/auto/project.rs b/gstreamer-editing-services/src/auto/project.rs index 79d2ee040..228235162 100644 --- a/gstreamer-editing-services/src/auto/project.rs +++ b/gstreamer-editing-services/src/auto/project.rs @@ -246,7 +246,7 @@ impl> ProjectExt for O { self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0, uri.to_glib_none().0, - formatter_asset.map(|p| p.as_ref()).to_glib_none().0, + formatter_asset.map(|p| p.as_ref()).to_glib_full(), overwrite.to_glib(), &mut error, ); diff --git a/gstreamer-editing-services/src/auto/timeline.rs b/gstreamer-editing-services/src/auto/timeline.rs index c667b7281..f9c46d4cf 100644 --- a/gstreamer-editing-services/src/auto/timeline.rs +++ b/gstreamer-editing-services/src/auto/timeline.rs @@ -490,7 +490,7 @@ impl> TimelineExt for O { } //fn connect_group_removed(&self, f: F) -> SignalHandlerId { - // Empty ctype children: *.PtrArray TypeId { ns_id: 1, id: 52 } + // Empty ctype children: *.PtrArray TypeId { ns_id: 1, id: 53 } //} fn connect_layer_added(&self, f: F) -> SignalHandlerId { diff --git a/gstreamer-editing-services/src/auto/timeline_element.rs b/gstreamer-editing-services/src/auto/timeline_element.rs index 31eb97f0b..0714b1213 100644 --- a/gstreamer-editing-services/src/auto/timeline_element.rs +++ b/gstreamer-editing-services/src/auto/timeline_element.rs @@ -20,6 +20,8 @@ use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; #[cfg(any(feature = "v1_18", feature = "dox"))] +use std::ptr; +#[cfg(any(feature = "v1_18", feature = "dox"))] use Edge; #[cfg(any(feature = "v1_18", feature = "dox"))] use EditMode; @@ -54,6 +56,15 @@ pub trait TimelineElementExt: 'static { position: u64, ) -> bool; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn edit_full( + &self, + new_layer_priority: i64, + mode: EditMode, + edge: Edge, + position: u64, + ) -> Result<(), glib::Error>; + //fn get_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs); //fn get_child_property(&self, property_name: &str, value: /*Ignored*/glib::Value) -> bool; @@ -110,6 +121,9 @@ pub trait TimelineElementExt: 'static { //fn set_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/&glib::Value); + //#[cfg(any(feature = "v1_18", feature = "dox"))] + //fn set_child_property_full(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> Result<(), glib::Error>; + //fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); fn set_duration(&self, duration: gst::ClockTime) -> bool; @@ -203,6 +217,32 @@ impl> TimelineElementExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn edit_full( + &self, + new_layer_priority: i64, + mode: EditMode, + edge: Edge, + position: u64, + ) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ges_sys::ges_timeline_element_edit_full( + self.as_ref().to_glib_none().0, + new_layer_priority, + mode.to_glib(), + edge.to_glib(), + position, + &mut error, + ); + if error.is_null() { + Ok(()) + } else { + Err(from_glib_full(error)) + } + } + } + //fn get_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { // unsafe { TODO: call ges_sys:ges_timeline_element_get_child_properties() } //} @@ -402,6 +442,11 @@ impl> TimelineElementExt for O { // unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property_by_pspec() } //} + //#[cfg(any(feature = "v1_18", feature = "dox"))] + //fn set_child_property_full(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> Result<(), glib::Error> { + // unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property_full() } + //} + //fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { // unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property_valist() } //} diff --git a/gstreamer-editing-services/src/auto/track.rs b/gstreamer-editing-services/src/auto/track.rs index ff299f9b2..5e472a2ea 100644 --- a/gstreamer-editing-services/src/auto/track.rs +++ b/gstreamer-editing-services/src/auto/track.rs @@ -18,6 +18,8 @@ use gobject_sys; use gst; use std::boxed::Box as Box_; use std::mem::transmute; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use std::ptr; use Timeline; use TrackElement; use TrackType; @@ -42,6 +44,9 @@ pub const NONE_TRACK: Option<&Track> = None; pub trait GESTrackExt: 'static { fn add_element>(&self, object: &P) -> Result<(), glib::error::BoolError>; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn add_element_full>(&self, object: &P) -> Result<(), glib::Error>; + fn commit(&self) -> bool; fn get_caps(&self) -> Option; @@ -60,6 +65,9 @@ pub trait GESTrackExt: 'static { object: &P, ) -> Result<(), glib::error::BoolError>; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn remove_element_full>(&self, object: &P) -> Result<(), glib::Error>; + //fn set_create_element_for_gap_func gst::Element + 'static>(&self, func: P); fn set_mixing(&self, mixing: bool); @@ -120,6 +128,23 @@ impl> GESTrackExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn add_element_full>(&self, object: &P) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ges_sys::ges_track_add_element_full( + self.as_ref().to_glib_none().0, + object.as_ref().to_glib_none().0, + &mut error, + ); + if error.is_null() { + Ok(()) + } else { + Err(from_glib_full(error)) + } + } + } + fn commit(&self) -> bool { unsafe { from_glib(ges_sys::ges_track_commit(self.as_ref().to_glib_none().0)) } } @@ -176,6 +201,23 @@ impl> GESTrackExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn remove_element_full>(&self, object: &P) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ges_sys::ges_track_remove_element_full( + self.as_ref().to_glib_none().0, + object.as_ref().to_glib_none().0, + &mut error, + ); + if error.is_null() { + Ok(()) + } else { + Err(from_glib_full(error)) + } + } + } + //fn set_create_element_for_gap_func gst::Element + 'static>(&self, func: P) { // unsafe { TODO: call ges_sys:ges_track_set_create_element_for_gap_func() } //} diff --git a/gstreamer-editing-services/src/auto/track_element.rs b/gstreamer-editing-services/src/auto/track_element.rs index 2d362fc6c..d015ac007 100644 --- a/gstreamer-editing-services/src/auto/track_element.rs +++ b/gstreamer-editing-services/src/auto/track_element.rs @@ -43,6 +43,9 @@ pub trait TrackElementExt: 'static { whitelist: &[&str], ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn clamp_control_source(&self, property_name: &str); + #[cfg_attr(feature = "v1_18", deprecated)] fn edit( &self, @@ -54,6 +57,9 @@ pub trait TrackElementExt: 'static { //fn get_all_control_bindings(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 6, id: 83 }; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_auto_clamp_control_sources(&self) -> bool; + //fn get_control_binding(&self, property_name: &str) -> /*Ignored*/Option; fn get_element(&self) -> Option; @@ -70,12 +76,18 @@ pub trait TrackElementExt: 'static { fn is_active(&self) -> bool; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn is_core(&self) -> bool; + //fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option; fn remove_control_binding(&self, property_name: &str) -> Result<(), glib::error::BoolError>; fn set_active(&self, active: bool) -> bool; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_auto_clamp_control_sources(&self, auto_clamp: bool); + //fn set_control_source(&self, source: /*Ignored*/&gst::ControlSource, property_name: &str, binding_type: &str) -> bool; fn set_has_internal_source(&self, has_internal_source: bool); @@ -84,6 +96,10 @@ pub trait TrackElementExt: 'static { 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); + fn get_property_has_internal_source(&self) -> bool; //fn connect_control_binding_added(&self, f: F) -> SignalHandlerId; @@ -92,6 +108,11 @@ pub trait TrackElementExt: 'static { fn connect_property_active_notify(&self, f: F) -> SignalHandlerId; + fn connect_property_auto_clamp_control_sources_notify( + &self, + f: F, + ) -> SignalHandlerId; + fn connect_property_has_internal_source_notify( &self, f: F, @@ -121,6 +142,16 @@ impl> TrackElementExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn clamp_control_source(&self, property_name: &str) { + unsafe { + ges_sys::ges_track_element_clamp_control_source( + self.as_ref().to_glib_none().0, + property_name.to_glib_none().0, + ); + } + } + fn edit( &self, layers: &[Layer], @@ -146,6 +177,15 @@ impl> TrackElementExt for O { // unsafe { TODO: call ges_sys:ges_track_element_get_all_control_bindings() } //} + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_auto_clamp_control_sources(&self) -> bool { + unsafe { + from_glib(ges_sys::ges_track_element_get_auto_clamp_control_sources( + self.as_ref().to_glib_none().0, + )) + } + } + //fn get_control_binding(&self, property_name: &str) -> /*Ignored*/Option { // unsafe { TODO: call ges_sys:ges_track_element_get_control_binding() } //} @@ -206,6 +246,15 @@ impl> TrackElementExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn is_core(&self) -> bool { + unsafe { + from_glib(ges_sys::ges_track_element_is_core( + self.as_ref().to_glib_none().0, + )) + } + } + //fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option { // unsafe { TODO: call ges_sys:ges_track_element_lookup_child() } //} @@ -231,6 +280,16 @@ impl> TrackElementExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_auto_clamp_control_sources(&self, auto_clamp: bool) { + unsafe { + ges_sys::ges_track_element_set_auto_clamp_control_sources( + self.as_ref().to_glib_none().0, + auto_clamp.to_glib(), + ); + } + } + //fn set_control_source(&self, source: /*Ignored*/&gst::ControlSource, property_name: &str, binding_type: &str) -> bool { // unsafe { TODO: call ges_sys:ges_track_element_set_control_source() } //} @@ -268,6 +327,31 @@ 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, + ); + } + } + fn get_property_has_internal_source(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); @@ -315,6 +399,33 @@ impl> TrackElementExt for O { } } + fn connect_property_auto_clamp_control_sources_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_auto_clamp_control_sources_trampoline( + this: *mut ges_sys::GESTrackElement, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&TrackElement::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::auto-clamp-control-sources\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_auto_clamp_control_sources_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + fn connect_property_has_internal_source_notify( &self, f: F, diff --git a/gstreamer-editing-services/src/auto/versions.txt b/gstreamer-editing-services/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-gl/src/auto/gl_window.rs b/gstreamer-gl/src/auto/gl_window.rs index 71fe08adf..75b23b22d 100644 --- a/gstreamer-gl/src/auto/gl_window.rs +++ b/gstreamer-gl/src/auto/gl_window.rs @@ -70,6 +70,7 @@ pub trait GLWindowExt: 'static { fn send_mouse_event(&self, event_type: &str, button: i32, posx: f64, posy: f64); + #[cfg(any(feature = "v1_18", feature = "dox"))] fn send_scroll_event(&self, posx: f64, posy: f64, delta_x: f64, delta_y: f64); fn set_preferred_size(&self, width: i32, height: i32); @@ -204,6 +205,7 @@ impl> GLWindowExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] fn send_scroll_event(&self, posx: f64, posy: f64, delta_x: f64, delta_y: f64) { unsafe { gst_gl_sys::gst_gl_window_send_scroll_event( diff --git a/gstreamer-gl/src/auto/versions.txt b/gstreamer-gl/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-net/src/auto/versions.txt b/gstreamer-net/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-pbutils/src/auto/versions.txt b/gstreamer-pbutils/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-player/src/auto/versions.txt b/gstreamer-player/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-rtp/src/auto/versions.txt b/gstreamer-rtp/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_media.rs index 935ca16fd..7920d1487 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media.rs @@ -79,6 +79,9 @@ pub trait RTSPMediaExt: 'static { #[cfg(any(feature = "v1_16", feature = "dox"))] fn get_do_retransmission(&self) -> bool; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_dscp_qos(&self) -> i32; + fn get_element(&self) -> Option; fn get_latency(&self) -> u32; @@ -167,6 +170,9 @@ pub trait RTSPMediaExt: 'static { #[cfg(any(feature = "v1_16", feature = "dox"))] fn set_do_retransmission(&self, do_retransmission: bool); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_dscp_qos(&self, dscp_qos: i32); + fn set_eos_shutdown(&self, eos_shutdown: bool); fn set_latency(&self, latency: u32); @@ -220,6 +226,10 @@ pub trait RTSPMediaExt: 'static { fn set_property_bind_mcast_address(&self, bind_mcast_address: bool); + fn get_property_dscp_qos(&self) -> i32; + + fn set_property_dscp_qos(&self, dscp_qos: i32); + fn get_property_eos_shutdown(&self) -> bool; fn get_property_max_mcast_ttl(&self) -> u32; @@ -271,6 +281,11 @@ pub trait RTSPMediaExt: 'static { f: F, ) -> SignalHandlerId; + fn connect_property_dscp_qos_notify( + &self, + f: F, + ) -> SignalHandlerId; + fn connect_property_eos_shutdown_notify( &self, f: F, @@ -401,6 +416,11 @@ impl> RTSPMediaExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_dscp_qos(&self) -> i32 { + unsafe { gst_rtsp_server_sys::gst_rtsp_media_get_dscp_qos(self.as_ref().to_glib_none().0) } + } + fn get_element(&self) -> Option { unsafe { from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_element( @@ -700,6 +720,16 @@ impl> RTSPMediaExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_dscp_qos(&self, dscp_qos: i32) { + unsafe { + gst_rtsp_server_sys::gst_rtsp_media_set_dscp_qos( + self.as_ref().to_glib_none().0, + dscp_qos, + ); + } + } + fn set_eos_shutdown(&self, eos_shutdown: bool) { unsafe { gst_rtsp_server_sys::gst_rtsp_media_set_eos_shutdown( @@ -923,6 +953,31 @@ impl> RTSPMediaExt for O { } } + fn get_property_dscp_qos(&self) -> i32 { + 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"dscp-qos\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `dscp-qos` getter") + .unwrap() + } + } + + fn set_property_dscp_qos(&self, dscp_qos: i32) { + unsafe { + gobject_sys::g_object_set_property( + self.to_glib_none().0 as *mut gobject_sys::GObject, + b"dscp-qos\0".as_ptr() as *const _, + Value::from(&dscp_qos).to_glib_none().0, + ); + } + } + fn get_property_eos_shutdown(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); @@ -1268,6 +1323,33 @@ impl> RTSPMediaExt for O { } } + fn connect_property_dscp_qos_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_dscp_qos_trampoline( + this: *mut gst_rtsp_server_sys::GstRTSPMedia, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&RTSPMedia::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::dscp-qos\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_dscp_qos_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + fn connect_property_eos_shutdown_notify( &self, f: F, diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs b/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs index b269f7bef..968c9f151 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs @@ -66,6 +66,9 @@ pub trait RTSPMediaFactoryExt: 'static { #[cfg(any(feature = "v1_16", feature = "dox"))] fn get_do_retransmission(&self) -> bool; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_dscp_qos(&self) -> i32; + fn get_latency(&self) -> u32; fn get_launch(&self) -> Option; @@ -112,6 +115,9 @@ pub trait RTSPMediaFactoryExt: 'static { #[cfg(any(feature = "v1_16", feature = "dox"))] fn set_do_retransmission(&self, do_retransmission: bool); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_dscp_qos(&self, dscp_qos: i32); + fn set_eos_shutdown(&self, eos_shutdown: bool); fn set_latency(&self, latency: u32); @@ -147,6 +153,10 @@ pub trait RTSPMediaFactoryExt: 'static { fn set_property_bind_mcast_address(&self, bind_mcast_address: bool); + fn get_property_dscp_qos(&self) -> i32; + + fn set_property_dscp_qos(&self, dscp_qos: i32); + fn get_property_eos_shutdown(&self) -> bool; fn get_property_max_mcast_ttl(&self) -> u32; @@ -182,6 +192,11 @@ pub trait RTSPMediaFactoryExt: 'static { f: F, ) -> SignalHandlerId; + fn connect_property_dscp_qos_notify( + &self, + f: F, + ) -> SignalHandlerId; + fn connect_property_eos_shutdown_notify( &self, f: F, @@ -295,6 +310,13 @@ impl> RTSPMediaFactoryExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_dscp_qos(&self) -> i32 { + unsafe { + gst_rtsp_server_sys::gst_rtsp_media_factory_get_dscp_qos(self.as_ref().to_glib_none().0) + } + } + fn get_latency(&self) -> u32 { unsafe { gst_rtsp_server_sys::gst_rtsp_media_factory_get_latency(self.as_ref().to_glib_none().0) @@ -480,6 +502,16 @@ impl> RTSPMediaFactoryExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_dscp_qos(&self, dscp_qos: i32) { + unsafe { + gst_rtsp_server_sys::gst_rtsp_media_factory_set_dscp_qos( + self.as_ref().to_glib_none().0, + dscp_qos, + ); + } + } + fn set_eos_shutdown(&self, eos_shutdown: bool) { unsafe { gst_rtsp_server_sys::gst_rtsp_media_factory_set_eos_shutdown( @@ -638,6 +670,31 @@ impl> RTSPMediaFactoryExt for O { } } + fn get_property_dscp_qos(&self) -> i32 { + 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"dscp-qos\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `dscp-qos` getter") + .unwrap() + } + } + + fn set_property_dscp_qos(&self, dscp_qos: i32) { + unsafe { + gobject_sys::g_object_set_property( + self.to_glib_none().0 as *mut gobject_sys::GObject, + b"dscp-qos\0".as_ptr() as *const _, + Value::from(&dscp_qos).to_glib_none().0, + ); + } + } + fn get_property_eos_shutdown(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); @@ -858,6 +915,33 @@ impl> RTSPMediaFactoryExt for O { } } + fn connect_property_dscp_qos_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_dscp_qos_trampoline( + this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::dscp-qos\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_dscp_qos_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + fn connect_property_eos_shutdown_notify( &self, f: F, diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs index bcf2ebbf2..392146d0c 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs @@ -65,6 +65,9 @@ pub trait RTSPStreamTransportExt: 'static { fn set_message_sent(&self, message_sent: P); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_message_sent_full(&self, message_sent: P); + fn set_timed_out(&self, timedout: bool); //fn set_transport(&self, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport); @@ -226,6 +229,35 @@ impl> RTSPStreamTransportExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_message_sent_full(&self, message_sent: P) { + let message_sent_data: Box_

= Box_::new(message_sent); + unsafe extern "C" fn message_sent_func( + trans: *mut gst_rtsp_server_sys::GstRTSPStreamTransport, + user_data: glib_sys::gpointer, + ) { + let trans = from_glib_borrow(trans); + let callback: &P = &*(user_data as *mut _); + (*callback)(&trans); + } + let message_sent = Some(message_sent_func::

as _); + unsafe extern "C" fn notify_func( + data: glib_sys::gpointer, + ) { + let _callback: Box_

= Box_::from_raw(data as *mut _); + } + let destroy_call3 = Some(notify_func::

as _); + let super_callback0: Box_

= message_sent_data; + unsafe { + gst_rtsp_server_sys::gst_rtsp_stream_transport_set_message_sent_full( + self.as_ref().to_glib_none().0, + message_sent, + Box_::into_raw(super_callback0) as *mut _, + destroy_call3, + ); + } + } + fn set_timed_out(&self, timedout: bool) { unsafe { gst_rtsp_server_sys::gst_rtsp_stream_transport_set_timed_out( diff --git a/gstreamer-rtsp-server/src/auto/versions.txt b/gstreamer-rtsp-server/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-rtsp/src/auto/rtsp_url.rs b/gstreamer-rtsp/src/auto/rtsp_url.rs index 454747c57..7d071feb3 100644 --- a/gstreamer-rtsp/src/auto/rtsp_url.rs +++ b/gstreamer-rtsp/src/auto/rtsp_url.rs @@ -36,6 +36,7 @@ impl RTSPUrl { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] pub fn get_request_uri_with_control(&self, control_path: &str) -> Option { unsafe { from_glib_full(gst_rtsp_sys::gst_rtsp_url_get_request_uri_with_control( diff --git a/gstreamer-rtsp/src/auto/versions.txt b/gstreamer-rtsp/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-sdp/src/auto/versions.txt b/gstreamer-sdp/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-video/src/auto/enums.rs b/gstreamer-video/src/auto/enums.rs index d35ec8522..1e84832df 100644 --- a/gstreamer-video/src/auto/enums.rs +++ b/gstreamer-video/src/auto/enums.rs @@ -12,6 +12,7 @@ use glib::Type; use gobject_sys; use gst_video_sys; +#[cfg(any(feature = "v1_18", feature = "dox"))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] pub enum VideoAFDSpec { @@ -22,6 +23,7 @@ pub enum VideoAFDSpec { __Unknown(i32), } +#[cfg(any(feature = "v1_18", feature = "dox"))] #[doc(hidden)] impl ToGlib for VideoAFDSpec { type GlibType = gst_video_sys::GstVideoAFDSpec; @@ -36,6 +38,7 @@ impl ToGlib for VideoAFDSpec { } } +#[cfg(any(feature = "v1_18", feature = "dox"))] #[doc(hidden)] impl FromGlib for VideoAFDSpec { fn from_glib(value: gst_video_sys::GstVideoAFDSpec) -> Self { @@ -49,24 +52,28 @@ impl FromGlib for VideoAFDSpec { } } +#[cfg(any(feature = "v1_18", feature = "dox"))] impl StaticType for VideoAFDSpec { fn static_type() -> Type { unsafe { from_glib(gst_video_sys::gst_video_afd_spec_get_type()) } } } +#[cfg(any(feature = "v1_18", feature = "dox"))] impl<'a> FromValueOptional<'a> for VideoAFDSpec { 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 VideoAFDSpec { 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 VideoAFDSpec { 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-video/src/auto/mod.rs b/gstreamer-video/src/auto/mod.rs index 20df2fd7f..80b3eb9e3 100644 --- a/gstreamer-video/src/auto/mod.rs +++ b/gstreamer-video/src/auto/mod.rs @@ -21,6 +21,7 @@ pub use self::video_overlay::VideoOverlayExt; pub use self::video_overlay::{VideoOverlay, NONE_VIDEO_OVERLAY}; mod enums; +#[cfg(any(feature = "v1_18", feature = "dox"))] pub use self::enums::VideoAFDSpec; #[cfg(any(feature = "v1_18", feature = "dox"))] pub use self::enums::VideoAFDValue; diff --git a/gstreamer-video/src/auto/versions.txt b/gstreamer-video/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-webrtc/src/auto/mod.rs b/gstreamer-webrtc/src/auto/mod.rs index c9cbf53e6..88656a6f0 100644 --- a/gstreamer-webrtc/src/auto/mod.rs +++ b/gstreamer-webrtc/src/auto/mod.rs @@ -5,6 +5,11 @@ mod web_rtcdtls_transport; pub use self::web_rtcdtls_transport::{WebRTCDTLSTransport, WebRTCDTLSTransportClass}; +#[cfg(any(feature = "v1_18", feature = "dox"))] +mod web_rtc_data_channel; +#[cfg(any(feature = "v1_18", feature = "dox"))] +pub use self::web_rtc_data_channel::{WebRTCDataChannel, WebRTCDataChannelClass}; + mod web_rtcice_transport; pub use self::web_rtcice_transport::{WebRTCICETransport, WebRTCICETransportClass}; diff --git a/gstreamer-webrtc/src/auto/versions.txt b/gstreamer-webrtc/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7) diff --git a/gstreamer-webrtc/src/auto/web_rtc_data_channel.rs b/gstreamer-webrtc/src/auto/web_rtc_data_channel.rs new file mode 100644 index 000000000..33ac809d5 --- /dev/null +++ b/gstreamer-webrtc/src/auto/web_rtc_data_channel.rs @@ -0,0 +1,649 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// DO NOT EDIT + +use glib; +use glib::object::ObjectExt; +use glib::object::ObjectType as ObjectType_; +use glib::signal::connect_raw; +use glib::signal::SignalHandlerId; +use glib::translate::*; +use glib::GString; +use glib::StaticType; +use glib::Value; +use glib_sys; +use gobject_sys; +use gst_web_rtc_sys; +use libc; +use std::boxed::Box as Box_; +use std::mem::transmute; +use WebRTCDataChannelState; +use WebRTCPriorityType; + +glib_wrapper! { + pub struct WebRTCDataChannel(Object); + + match fn { + get_type => || gst_web_rtc_sys::gst_webrtc_data_channel_get_type(), + } +} + +impl WebRTCDataChannel { + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn close(&self) { + unsafe { + gst_web_rtc_sys::gst_webrtc_data_channel_close(self.to_glib_none().0); + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn on_buffered_amount_low(&self) { + unsafe { + gst_web_rtc_sys::gst_webrtc_data_channel_on_buffered_amount_low(self.to_glib_none().0); + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn on_close(&self) { + unsafe { + gst_web_rtc_sys::gst_webrtc_data_channel_on_close(self.to_glib_none().0); + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn on_message_data(&self, data: Option<&glib::Bytes>) { + unsafe { + gst_web_rtc_sys::gst_webrtc_data_channel_on_message_data( + self.to_glib_none().0, + data.to_glib_none().0, + ); + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn on_message_string(&self, str: Option<&str>) { + unsafe { + gst_web_rtc_sys::gst_webrtc_data_channel_on_message_string( + self.to_glib_none().0, + str.to_glib_none().0, + ); + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn on_open(&self) { + unsafe { + gst_web_rtc_sys::gst_webrtc_data_channel_on_open(self.to_glib_none().0); + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn send_data(&self, data: Option<&glib::Bytes>) { + unsafe { + gst_web_rtc_sys::gst_webrtc_data_channel_send_data( + self.to_glib_none().0, + data.to_glib_none().0, + ); + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn send_string(&self, str: Option<&str>) { + unsafe { + gst_web_rtc_sys::gst_webrtc_data_channel_send_string( + self.to_glib_none().0, + str.to_glib_none().0, + ); + } + } + + pub fn get_property_buffered_amount(&self) -> u64 { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_sys::g_object_get_property( + self.as_ptr() as *mut gobject_sys::GObject, + b"buffered-amount\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `buffered-amount` getter") + .unwrap() + } + } + + pub fn get_property_buffered_amount_low_threshold(&self) -> u64 { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_sys::g_object_get_property( + self.as_ptr() as *mut gobject_sys::GObject, + b"buffered-amount-low-threshold\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `buffered-amount-low-threshold` getter") + .unwrap() + } + } + + pub fn set_property_buffered_amount_low_threshold(&self, buffered_amount_low_threshold: u64) { + unsafe { + gobject_sys::g_object_set_property( + self.as_ptr() as *mut gobject_sys::GObject, + b"buffered-amount-low-threshold\0".as_ptr() as *const _, + Value::from(&buffered_amount_low_threshold).to_glib_none().0, + ); + } + } + + pub fn get_property_id(&self) -> i32 { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_sys::g_object_get_property( + self.as_ptr() as *mut gobject_sys::GObject, + b"id\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `id` getter") + .unwrap() + } + } + + pub fn get_property_label(&self) -> Option { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_sys::g_object_get_property( + self.as_ptr() as *mut gobject_sys::GObject, + b"label\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `label` getter") + } + } + + pub fn get_property_max_packet_lifetime(&self) -> i32 { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_sys::g_object_get_property( + self.as_ptr() as *mut gobject_sys::GObject, + b"max-packet-lifetime\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `max-packet-lifetime` getter") + .unwrap() + } + } + + pub fn get_property_max_retransmits(&self) -> i32 { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_sys::g_object_get_property( + self.as_ptr() as *mut gobject_sys::GObject, + b"max-retransmits\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `max-retransmits` getter") + .unwrap() + } + } + + pub fn get_property_negotiated(&self) -> bool { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_sys::g_object_get_property( + self.as_ptr() as *mut gobject_sys::GObject, + b"negotiated\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `negotiated` getter") + .unwrap() + } + } + + pub fn get_property_ordered(&self) -> bool { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_sys::g_object_get_property( + self.as_ptr() as *mut gobject_sys::GObject, + b"ordered\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `ordered` getter") + .unwrap() + } + } + + pub fn get_property_priority(&self) -> WebRTCPriorityType { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_sys::g_object_get_property( + self.as_ptr() as *mut gobject_sys::GObject, + b"priority\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `priority` getter") + .unwrap() + } + } + + pub fn get_property_protocol(&self) -> Option { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_sys::g_object_get_property( + self.as_ptr() as *mut gobject_sys::GObject, + b"protocol\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `protocol` getter") + } + } + + pub fn get_property_ready_state(&self) -> WebRTCDataChannelState { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_sys::g_object_get_property( + self.as_ptr() as *mut gobject_sys::GObject, + b"ready-state\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `ready-state` getter") + .unwrap() + } + } + + pub fn connect_close( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn close_trampoline( + this: *mut gst_web_rtc_sys::GstWebRTCDataChannel, + f: glib_sys::gpointer, + ) { + let f: &F = &*(f as *const F); + f(&from_glib_borrow(this)) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"close\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + close_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + pub fn emit_close(&self) { + let _ = unsafe { + glib::Object::from_glib_borrow(self.as_ptr() as *mut gobject_sys::GObject) + .emit("close", &[]) + .unwrap() + }; + } + + pub fn connect_on_buffered_amount_low( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn on_buffered_amount_low_trampoline< + F: Fn(&WebRTCDataChannel) + Send + Sync + 'static, + >( + this: *mut gst_web_rtc_sys::GstWebRTCDataChannel, + f: glib_sys::gpointer, + ) { + let f: &F = &*(f as *const F); + f(&from_glib_borrow(this)) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"on-buffered-amount-low\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + on_buffered_amount_low_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + pub fn connect_on_close( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn on_close_trampoline< + F: Fn(&WebRTCDataChannel) + Send + Sync + 'static, + >( + this: *mut gst_web_rtc_sys::GstWebRTCDataChannel, + f: glib_sys::gpointer, + ) { + let f: &F = &*(f as *const F); + f(&from_glib_borrow(this)) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"on-close\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + on_close_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + pub fn connect_on_error( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn on_error_trampoline< + F: Fn(&WebRTCDataChannel, &glib::Error) + Send + Sync + 'static, + >( + this: *mut gst_web_rtc_sys::GstWebRTCDataChannel, + error: *mut glib_sys::GError, + f: glib_sys::gpointer, + ) { + let f: &F = &*(f as *const F); + f(&from_glib_borrow(this), &from_glib_borrow(error)) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"on-error\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + on_error_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + pub fn connect_on_message_data< + F: Fn(&WebRTCDataChannel, Option<&glib::Bytes>) + Send + Sync + 'static, + >( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn on_message_data_trampoline< + F: Fn(&WebRTCDataChannel, Option<&glib::Bytes>) + Send + Sync + 'static, + >( + this: *mut gst_web_rtc_sys::GstWebRTCDataChannel, + data: *mut glib_sys::GBytes, + f: glib_sys::gpointer, + ) { + let f: &F = &*(f as *const F); + f( + &from_glib_borrow(this), + Option::::from_glib_borrow(data) + .as_ref() + .as_ref(), + ) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"on-message-data\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + on_message_data_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + pub fn connect_on_message_string< + F: Fn(&WebRTCDataChannel, Option<&str>) + Send + Sync + 'static, + >( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn on_message_string_trampoline< + F: Fn(&WebRTCDataChannel, Option<&str>) + Send + Sync + 'static, + >( + this: *mut gst_web_rtc_sys::GstWebRTCDataChannel, + data: *mut libc::c_char, + f: glib_sys::gpointer, + ) { + let f: &F = &*(f as *const F); + f( + &from_glib_borrow(this), + Option::::from_glib_borrow(data) + .as_ref() + .as_deref(), + ) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"on-message-string\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + on_message_string_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + pub fn connect_on_open( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn on_open_trampoline< + F: Fn(&WebRTCDataChannel) + Send + Sync + 'static, + >( + this: *mut gst_web_rtc_sys::GstWebRTCDataChannel, + f: glib_sys::gpointer, + ) { + let f: &F = &*(f as *const F); + f(&from_glib_borrow(this)) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"on-open\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + on_open_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + pub fn connect_send_data< + F: Fn(&WebRTCDataChannel, Option<&glib::Bytes>) + Send + Sync + 'static, + >( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn send_data_trampoline< + F: Fn(&WebRTCDataChannel, Option<&glib::Bytes>) + Send + Sync + 'static, + >( + this: *mut gst_web_rtc_sys::GstWebRTCDataChannel, + data: *mut glib_sys::GBytes, + f: glib_sys::gpointer, + ) { + let f: &F = &*(f as *const F); + f( + &from_glib_borrow(this), + Option::::from_glib_borrow(data) + .as_ref() + .as_ref(), + ) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"send-data\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + send_data_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + pub fn emit_send_data(&self, data: Option<&glib::Bytes>) { + let _ = unsafe { + glib::Object::from_glib_borrow(self.as_ptr() as *mut gobject_sys::GObject) + .emit("send-data", &[&data]) + .unwrap() + }; + } + + pub fn connect_send_string) + Send + Sync + 'static>( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn send_string_trampoline< + F: Fn(&WebRTCDataChannel, Option<&str>) + Send + Sync + 'static, + >( + this: *mut gst_web_rtc_sys::GstWebRTCDataChannel, + data: *mut libc::c_char, + f: glib_sys::gpointer, + ) { + let f: &F = &*(f as *const F); + f( + &from_glib_borrow(this), + Option::::from_glib_borrow(data) + .as_ref() + .as_deref(), + ) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"send-string\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + send_string_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + pub fn emit_send_string(&self, data: Option<&str>) { + let _ = unsafe { + glib::Object::from_glib_borrow(self.as_ptr() as *mut gobject_sys::GObject) + .emit("send-string", &[&data]) + .unwrap() + }; + } + + pub fn connect_property_buffered_amount_notify< + F: Fn(&WebRTCDataChannel) + Send + Sync + 'static, + >( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_buffered_amount_trampoline< + F: Fn(&WebRTCDataChannel) + Send + Sync + 'static, + >( + this: *mut gst_web_rtc_sys::GstWebRTCDataChannel, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) { + let f: &F = &*(f as *const F); + f(&from_glib_borrow(this)) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::buffered-amount\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_buffered_amount_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + pub fn connect_property_buffered_amount_low_threshold_notify< + F: Fn(&WebRTCDataChannel) + Send + Sync + 'static, + >( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_buffered_amount_low_threshold_trampoline< + F: Fn(&WebRTCDataChannel) + Send + Sync + 'static, + >( + this: *mut gst_web_rtc_sys::GstWebRTCDataChannel, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) { + let f: &F = &*(f as *const F); + f(&from_glib_borrow(this)) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::buffered-amount-low-threshold\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_buffered_amount_low_threshold_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + pub fn connect_property_ready_state_notify< + F: Fn(&WebRTCDataChannel) + Send + Sync + 'static, + >( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_ready_state_trampoline< + F: Fn(&WebRTCDataChannel) + Send + Sync + 'static, + >( + this: *mut gst_web_rtc_sys::GstWebRTCDataChannel, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) { + let f: &F = &*(f as *const F); + f(&from_glib_borrow(this)) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::ready-state\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_ready_state_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } +} + +unsafe impl Send for WebRTCDataChannel {} +unsafe impl Sync for WebRTCDataChannel {} diff --git a/gstreamer/src/auto/versions.txt b/gstreamer/src/auto/versions.txt index bec570929..e35f31b1c 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 @ 1f84b54) -from gir-files (https://github.com/gtk-rs/gir-files @ e5698c4a) +Generated by gir (https://github.com/gtk-rs/gir @ 2ec58ef) +from gir-files (https://github.com/gtk-rs/gir-files @ 9cf46cf7)