diff --git a/gir b/gir index 2abca1147..4c1faa04d 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit 2abca1147143e5f5986f14bf6bc794e438bef193 +Subproject commit 4c1faa04ddb97fdd11a090509a85632b03ebdaf6 diff --git a/gstreamer-app/src/auto/versions.txt b/gstreamer-app/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-audio/src/auto/versions.txt b/gstreamer-audio/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-base/src/auto/aggregator.rs b/gstreamer-base/src/auto/aggregator.rs index 25dbc62d1..b260e5fec 100644 --- a/gstreamer-base/src/auto/aggregator.rs +++ b/gstreamer-base/src/auto/aggregator.rs @@ -39,6 +39,9 @@ pub trait AggregatorExt: 'static { #[cfg(any(feature = "v1_14", feature = "dox"))] fn get_latency(&self) -> gst::ClockTime; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn negotiate(&self) -> bool; + #[cfg(any(feature = "v1_14", feature = "dox"))] fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime); @@ -48,6 +51,9 @@ pub trait AggregatorExt: 'static { #[cfg(any(feature = "v1_16", feature = "dox"))] 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 get_property_start_time(&self) -> u64; fn set_property_start_time(&self, start_time: u64); @@ -88,6 +94,15 @@ impl> AggregatorExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn negotiate(&self) -> bool { + unsafe { + from_glib(gst_base_sys::gst_aggregator_negotiate( + self.as_ref().to_glib_none().0, + )) + } + } + #[cfg(any(feature = "v1_14", feature = "dox"))] fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime) { unsafe { @@ -118,6 +133,11 @@ impl> AggregatorExt for O { } } + //#[cfg(any(feature = "v1_18", feature = "dox"))] + //fn update_segment(&self, segment: /*Ignored*/&mut gst::Segment) { + // unsafe { TODO: call gst_base_sys:gst_aggregator_update_segment() } + //} + fn get_property_start_time(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); diff --git a/gstreamer-base/src/auto/base_sink.rs b/gstreamer-base/src/auto/base_sink.rs index 3cc737d2e..10cda457c 100644 --- a/gstreamer-base/src/auto/base_sink.rs +++ b/gstreamer-base/src/auto/base_sink.rs @@ -50,6 +50,9 @@ pub trait BaseSinkExt: 'static { fn get_render_delay(&self) -> gst::ClockTime; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_stats(&self) -> Option; + fn get_sync(&self) -> bool; fn get_throttle_time(&self) -> u64; @@ -146,6 +149,12 @@ pub trait BaseSinkExt: 'static { f: F, ) -> SignalHandlerId; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_stats_notify( + &self, + f: F, + ) -> SignalHandlerId; + fn connect_property_sync_notify( &self, f: F, @@ -221,6 +230,15 @@ impl> BaseSinkExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_stats(&self) -> Option { + unsafe { + from_glib_full(gst_base_sys::gst_base_sink_get_stats( + self.as_ref().to_glib_none().0, + )) + } + } + fn get_sync(&self) -> bool { unsafe { from_glib(gst_base_sys::gst_base_sink_get_sync( @@ -684,6 +702,34 @@ impl> BaseSinkExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_stats_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_stats_trampoline( + this: *mut gst_base_sys::GstBaseSink, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&BaseSink::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::stats\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_stats_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + fn connect_property_sync_notify( &self, f: F, diff --git a/gstreamer-base/src/auto/base_src.rs b/gstreamer-base/src/auto/base_src.rs index c2e2f3936..b6f06af0f 100644 --- a/gstreamer-base/src/auto/base_src.rs +++ b/gstreamer-base/src/auto/base_src.rs @@ -43,6 +43,9 @@ pub trait BaseSrcExt: 'static { fn is_live(&self) -> bool; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn negotiate(&self) -> bool; + fn new_seamless_segment(&self, start: i64, stop: i64, time: i64) -> bool; fn set_async(&self, async: bool); @@ -131,6 +134,15 @@ impl> BaseSrcExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn negotiate(&self) -> bool { + unsafe { + from_glib(gst_base_sys::gst_base_src_negotiate( + self.as_ref().to_glib_none().0, + )) + } + } + fn new_seamless_segment(&self, start: i64, stop: i64, time: i64) -> bool { unsafe { from_glib(gst_base_sys::gst_base_src_new_seamless_segment( diff --git a/gstreamer-base/src/auto/base_transform.rs b/gstreamer-base/src/auto/base_transform.rs index 705ad8c05..8b5a2488a 100644 --- a/gstreamer-base/src/auto/base_transform.rs +++ b/gstreamer-base/src/auto/base_transform.rs @@ -41,6 +41,9 @@ pub trait BaseTransformExt: 'static { fn is_qos_enabled(&self) -> bool; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn reconfigure(&self) -> bool; + fn reconfigure_sink(&self); fn reconfigure_src(&self); @@ -106,6 +109,15 @@ impl> BaseTransformExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn reconfigure(&self) -> bool { + unsafe { + from_glib(gst_base_sys::gst_base_transform_reconfigure( + self.as_ref().to_glib_none().0, + )) + } + } + fn reconfigure_sink(&self) { unsafe { gst_base_sys::gst_base_transform_reconfigure_sink(self.as_ref().to_glib_none().0); diff --git a/gstreamer-base/src/auto/versions.txt b/gstreamer-base/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-check/src/auto/test_clock.rs b/gstreamer-check/src/auto/test_clock.rs index fa8ab18d4..47aa1dcb2 100644 --- a/gstreamer-check/src/auto/test_clock.rs +++ b/gstreamer-check/src/auto/test_clock.rs @@ -70,6 +70,11 @@ impl TestClock { // unsafe { TODO: call gst_check_sys:gst_test_clock_peek_next_pending_id() } //} + //#[cfg(any(feature = "v1_18", feature = "dox"))] + //pub fn process_id(&self, pending_id: /*Ignored*/gst::ClockID) -> bool { + // unsafe { TODO: call gst_check_sys:gst_test_clock_process_id() } + //} + //pub fn process_id_list(&self, pending_list: /*Ignored*/&[&gst::ClockID]) -> u32 { // unsafe { TODO: call gst_check_sys:gst_test_clock_process_id_list() } //} diff --git a/gstreamer-check/src/auto/versions.txt b/gstreamer-check/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-editing-services/src/auto/alias.rs b/gstreamer-editing-services/src/auto/alias.rs new file mode 100644 index 000000000..4cf744a7e --- /dev/null +++ b/gstreamer-editing-services/src/auto/alias.rs @@ -0,0 +1,8 @@ +// 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 + +#[allow(unused_imports)] +use auto::*; + +pub type FrameNumber = i64; diff --git a/gstreamer-editing-services/src/auto/asset.rs b/gstreamer-editing-services/src/auto/asset.rs index 0009ee411..b3fa0bdb9 100644 --- a/gstreamer-editing-services/src/auto/asset.rs +++ b/gstreamer-editing-services/src/auto/asset.rs @@ -11,9 +11,7 @@ use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; -use glib::value::SetValueOptional; use glib::GString; -use glib::Value; use glib_sys; use gobject_sys; use std::boxed::Box as Box_; @@ -31,7 +29,7 @@ glib_wrapper! { } impl Asset { - pub fn needs_reload(extractable_type: glib::types::Type, id: &str) -> bool { + pub fn needs_reload(extractable_type: glib::types::Type, id: Option<&str>) -> bool { assert_initialized_main_thread!(); unsafe { from_glib(ges_sys::ges_asset_needs_reload( @@ -66,7 +64,7 @@ impl Asset { Q: FnOnce(Result) + Send + 'static, >( extractable_type: glib::types::Type, - id: &str, + id: Option<&str>, cancellable: Option<&P>, callback: Q, ) { @@ -103,15 +101,20 @@ impl Asset { pub fn request_async_future( extractable_type: glib::types::Type, - id: &str, + id: Option<&str>, ) -> Pin> + 'static>> { skip_assert_initialized!(); - let id = String::from(id); + let id = id.map(ToOwned::to_owned); Box_::pin(gio::GioFuture::new(&(), move |_obj, send| { let cancellable = gio::Cancellable::new(); - Self::request_async(extractable_type, &id, Some(&cancellable), move |res| { - send.resolve(res); - }); + Self::request_async( + extractable_type, + id.as_ref().map(::std::borrow::Borrow::borrow), + Some(&cancellable), + move |res| { + send.resolve(res); + }, + ); cancellable })) @@ -121,7 +124,7 @@ impl Asset { pub const NONE_ASSET: Option<&Asset> = None; pub trait AssetExt: 'static { - fn extract(&self) -> Result, glib::Error>; + fn extract(&self) -> Result; fn get_error(&self) -> Option; @@ -139,8 +142,6 @@ pub trait AssetExt: 'static { fn unproxy>(&self, proxy: &P) -> Result<(), glib::error::BoolError>; - fn set_property_proxy_target + SetValueOptional>(&self, proxy_target: Option<&P>); - fn connect_property_proxy_notify(&self, f: F) -> SignalHandlerId; fn connect_property_proxy_target_notify(&self, f: F) @@ -148,7 +149,7 @@ pub trait AssetExt: 'static { } impl> AssetExt for O { - fn extract(&self) -> Result, glib::Error> { + fn extract(&self) -> Result { unsafe { let mut error = ptr::null_mut(); let ret = ges_sys::ges_asset_extract(self.as_ref().to_glib_none().0, &mut error); @@ -220,19 +221,6 @@ impl> AssetExt for O { } } - fn set_property_proxy_target + SetValueOptional>( - &self, - proxy_target: Option<&P>, - ) { - unsafe { - gobject_sys::g_object_set_property( - self.to_glib_none().0 as *mut gobject_sys::GObject, - b"proxy-target\0".as_ptr() as *const _, - Value::from(proxy_target).to_glib_none().0, - ); - } - } - fn connect_property_proxy_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_proxy_trampoline( this: *mut ges_sys::GESAsset, diff --git a/gstreamer-editing-services/src/auto/clip.rs b/gstreamer-editing-services/src/auto/clip.rs index 8e4967b55..d396b651a 100644 --- a/gstreamer-editing-services/src/auto/clip.rs +++ b/gstreamer-editing-services/src/auto/clip.rs @@ -10,12 +10,15 @@ use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib_sys; +use gst; use std::boxed::Box as Box_; use std::mem::transmute; +use std::ptr; use Asset; use BaseEffect; use Container; use Extractable; +use FrameNumber; use Layer; use TimelineElement; use Track; @@ -35,6 +38,12 @@ pub const NONE_CLIP: Option<&Clip> = None; pub trait ClipExt: 'static { fn add_asset>(&self, asset: &P) -> Result; + fn add_child_to_track, Q: IsA>( + &self, + child: &P, + track: &Q, + ) -> Result; + fn find_track_element>( &self, track: Option<&P>, @@ -52,6 +61,11 @@ pub trait ClipExt: 'static { fn get_supported_formats(&self) -> TrackType; + fn get_timeline_time_from_source_frame( + &self, + frame_number: FrameNumber, + ) -> Result; + fn get_top_effect_index>(&self, effect: &P) -> i32; fn get_top_effect_position>(&self, effect: &P) -> i32; @@ -95,6 +109,27 @@ impl> ClipExt for O { } } + fn add_child_to_track, Q: IsA>( + &self, + child: &P, + track: &Q, + ) -> Result { + unsafe { + let mut error = ptr::null_mut(); + let ret = ges_sys::ges_clip_add_child_to_track( + self.as_ref().to_glib_none().0, + child.as_ref().to_glib_none().0, + track.as_ref().to_glib_none().0, + &mut error, + ); + if error.is_null() { + Ok(from_glib_none(ret)) + } else { + Err(from_glib_full(error)) + } + } + } + fn find_track_element>( &self, track: Option<&P>, @@ -137,6 +172,25 @@ impl> ClipExt for O { } } + fn get_timeline_time_from_source_frame( + &self, + frame_number: FrameNumber, + ) -> Result { + unsafe { + let mut error = ptr::null_mut(); + let ret = ges_sys::ges_clip_get_timeline_time_from_source_frame( + self.as_ref().to_glib_none().0, + frame_number, + &mut error, + ); + if error.is_null() { + Ok(from_glib(ret)) + } else { + Err(from_glib_full(error)) + } + } + } + fn get_top_effect_index>(&self, effect: &P) -> i32 { unsafe { ges_sys::ges_clip_get_top_effect_index( diff --git a/gstreamer-editing-services/src/auto/container.rs b/gstreamer-editing-services/src/auto/container.rs index 55717ba18..c1e43137a 100644 --- a/gstreamer-editing-services/src/auto/container.rs +++ b/gstreamer-editing-services/src/auto/container.rs @@ -41,6 +41,7 @@ pub const NONE_CONTAINER: Option<&Container> = None; pub trait GESContainerExt: 'static { fn add>(&self, child: &P) -> Result<(), glib::error::BoolError>; + #[cfg_attr(feature = "v1_18", deprecated)] fn edit( &self, layers: &[Layer], diff --git a/gstreamer-editing-services/src/auto/layer.rs b/gstreamer-editing-services/src/auto/layer.rs index e4016bdaa..6272bf882 100644 --- a/gstreamer-editing-services/src/auto/layer.rs +++ b/gstreamer-editing-services/src/auto/layer.rs @@ -17,6 +17,7 @@ use Asset; use Clip; use Extractable; use Timeline; +use Track; use TrackType; glib_wrapper! { @@ -54,6 +55,8 @@ pub trait LayerExt: 'static { fn add_clip>(&self, clip: &P) -> Result<(), glib::error::BoolError>; + fn get_active_for_track>(&self, track: &P) -> bool; + fn get_auto_transition(&self) -> bool; fn get_clips(&self) -> Vec; @@ -70,6 +73,8 @@ pub trait LayerExt: 'static { fn remove_clip>(&self, clip: &P) -> Result<(), glib::error::BoolError>; + fn set_active_for_tracks(&self, active: bool, tracks: &[Track]) -> bool; + fn set_auto_transition(&self, auto_transition: bool); #[cfg_attr(feature = "v1_16", deprecated)] @@ -77,6 +82,8 @@ pub trait LayerExt: 'static { fn set_timeline>(&self, timeline: &P); + //fn connect_active_changed(&self, f: F) -> SignalHandlerId; + fn connect_clip_added(&self, f: F) -> SignalHandlerId; fn connect_clip_removed(&self, f: F) -> SignalHandlerId; @@ -124,6 +131,15 @@ impl> LayerExt for O { } } + fn get_active_for_track>(&self, track: &P) -> bool { + unsafe { + from_glib(ges_sys::ges_layer_get_active_for_track( + self.as_ref().to_glib_none().0, + track.as_ref().to_glib_none().0, + )) + } + } + fn get_auto_transition(&self) -> bool { unsafe { from_glib(ges_sys::ges_layer_get_auto_transition( @@ -186,6 +202,16 @@ impl> LayerExt for O { } } + fn set_active_for_tracks(&self, active: bool, tracks: &[Track]) -> bool { + unsafe { + from_glib(ges_sys::ges_layer_set_active_for_tracks( + self.as_ref().to_glib_none().0, + active.to_glib(), + tracks.to_glib_none().0, + )) + } + } + fn set_auto_transition(&self, auto_transition: bool) { unsafe { ges_sys::ges_layer_set_auto_transition( @@ -210,6 +236,10 @@ impl> LayerExt for O { } } + //fn connect_active_changed(&self, f: F) -> SignalHandlerId { + // Empty ctype tracks: *.PtrArray TypeId { ns_id: 1, id: 17 } + //} + fn connect_clip_added(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn clip_added_trampoline( this: *mut ges_sys::GESLayer, diff --git a/gstreamer-editing-services/src/auto/mod.rs b/gstreamer-editing-services/src/auto/mod.rs index 74401c0fc..f79ea99f5 100644 --- a/gstreamer-editing-services/src/auto/mod.rs +++ b/gstreamer-editing-services/src/auto/mod.rs @@ -77,6 +77,9 @@ mod flags; pub use self::flags::PipelineFlags; pub use self::flags::TrackType; +mod alias; +pub use self::alias::FrameNumber; + #[doc(hidden)] pub mod traits { pub use super::AssetExt; diff --git a/gstreamer-editing-services/src/auto/project.rs b/gstreamer-editing-services/src/auto/project.rs index f210e4172..79d2ee040 100644 --- a/gstreamer-editing-services/src/auto/project.rs +++ b/gstreamer-editing-services/src/auto/project.rs @@ -44,6 +44,9 @@ pub trait ProjectExt: 'static { profile: &P, ) -> Result<(), glib::error::BoolError>; + //#[cfg(any(feature = "v1_18", feature = "dox"))] + //fn add_formatter(&self, formatter: /*Ignored*/&Formatter); + fn create_asset(&self, id: Option<&str>, extractable_type: glib::types::Type) -> bool; fn create_asset_sync( @@ -80,6 +83,12 @@ pub trait ProjectExt: 'static { fn connect_asset_removed(&self, f: F) -> SignalHandlerId; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_error_loading( + &self, + f: F, + ) -> SignalHandlerId; + fn connect_error_loading_asset( &self, f: F, @@ -87,6 +96,9 @@ pub trait ProjectExt: 'static { fn connect_loaded(&self, f: F) -> SignalHandlerId; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_loading(&self, f: F) -> SignalHandlerId; + fn connect_missing_uri Option + 'static>( &self, f: F, @@ -118,6 +130,11 @@ impl> ProjectExt for O { } } + //#[cfg(any(feature = "v1_18", feature = "dox"))] + //fn add_formatter(&self, formatter: /*Ignored*/&Formatter) { + // unsafe { TODO: call ges_sys:ges_project_add_formatter() } + //} + fn create_asset(&self, id: Option<&str>, extractable_type: glib::types::Type) -> bool { unsafe { from_glib(ges_sys::ges_project_create_asset( @@ -322,6 +339,42 @@ impl> ProjectExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_error_loading( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn error_loading_trampoline< + P, + F: Fn(&P, &Timeline, &glib::Error) + 'static, + >( + this: *mut ges_sys::GESProject, + timeline: *mut ges_sys::GESTimeline, + error: *mut glib_sys::GError, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f( + &Project::from_glib_borrow(this).unsafe_cast_ref(), + &from_glib_borrow(timeline), + &from_glib_borrow(error), + ) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"error-loading\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + error_loading_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + fn connect_error_loading_asset< F: Fn(&Self, &glib::Error, &str, glib::types::Type) + 'static, >( @@ -388,6 +441,34 @@ impl> ProjectExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_loading(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn loading_trampoline( + this: *mut ges_sys::GESProject, + timeline: *mut ges_sys::GESTimeline, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f( + &Project::from_glib_borrow(this).unsafe_cast_ref(), + &from_glib_borrow(timeline), + ) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"loading\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + loading_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + fn connect_missing_uri Option + 'static>( &self, f: F, diff --git a/gstreamer-editing-services/src/auto/timeline.rs b/gstreamer-editing-services/src/auto/timeline.rs index 2be3b70d9..c667b7281 100644 --- a/gstreamer-editing-services/src/auto/timeline.rs +++ b/gstreamer-editing-services/src/auto/timeline.rs @@ -16,6 +16,7 @@ use std::mem::transmute; use std::ptr; use Asset; use Extractable; +use FrameNumber; use Group; use Layer; use TimelineElement; @@ -64,6 +65,7 @@ impl Default for Timeline { pub const NONE_TIMELINE: Option<&Timeline> = None; pub trait TimelineExt: 'static { + #[cfg_attr(feature = "v1_18", deprecated)] fn add_layer>(&self, layer: &P) -> Result<(), glib::error::BoolError>; fn add_track>(&self, track: &P) -> Result<(), glib::error::BoolError>; @@ -80,6 +82,10 @@ pub trait TimelineExt: 'static { fn get_element(&self, name: &str) -> Option; + fn get_frame_at(&self, timestamp: gst::ClockTime) -> FrameNumber; + + fn get_frame_time(&self, frame_number: FrameNumber) -> gst::ClockTime; + fn get_groups(&self) -> Vec; fn get_layer(&self, priority: u32) -> Option; @@ -236,6 +242,21 @@ impl> TimelineExt for O { } } + fn get_frame_at(&self, timestamp: gst::ClockTime) -> FrameNumber { + unsafe { + ges_sys::ges_timeline_get_frame_at(self.as_ref().to_glib_none().0, timestamp.to_glib()) + } + } + + fn get_frame_time(&self, frame_number: FrameNumber) -> gst::ClockTime { + unsafe { + from_glib(ges_sys::ges_timeline_get_frame_time( + self.as_ref().to_glib_none().0, + frame_number, + )) + } + } + fn get_groups(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ges_sys::ges_timeline_get_groups( @@ -344,7 +365,7 @@ impl> TimelineExt for O { layer_priority: i32, ) -> Option { unsafe { - from_glib_none(ges_sys::ges_timeline_paste_element( + from_glib_full(ges_sys::ges_timeline_paste_element( self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0, position.to_glib(), @@ -469,7 +490,7 @@ impl> TimelineExt for O { } //fn connect_group_removed(&self, f: F) -> SignalHandlerId { - // Empty ctype children: *.PtrArray TypeId { ns_id: 1, id: 51 } + // Empty ctype children: *.PtrArray TypeId { ns_id: 1, id: 52 } //} fn connect_layer_added(&self, f: F) -> SignalHandlerId { @@ -527,7 +548,7 @@ impl> TimelineExt for O { } //fn connect_select_tracks_for_object(&self, f: F) -> SignalHandlerId { - // Empty ctype return value *.PtrArray TypeId { ns_id: 1, id: 16 } + // Empty ctype return value *.PtrArray TypeId { ns_id: 1, id: 17 } //} fn connect_snapping_ended( diff --git a/gstreamer-editing-services/src/auto/timeline_element.rs b/gstreamer-editing-services/src/auto/timeline_element.rs index 376327cfb..31eb97f0b 100644 --- a/gstreamer-editing-services/src/auto/timeline_element.rs +++ b/gstreamer-editing-services/src/auto/timeline_element.rs @@ -16,8 +16,16 @@ use glib_sys; use gobject_sys; use gst; use std::boxed::Box as Box_; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use std::mem; use std::mem::transmute; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use Edge; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use EditMode; use Extractable; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use Layer; use Timeline; use TrackType; @@ -36,6 +44,16 @@ pub trait TimelineElementExt: 'static { fn copy(&self, deep: bool) -> Result; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn edit( + &self, + layers: &[Layer], + new_layer_priority: i64, + mode: EditMode, + edge: Edge, + position: u64, + ) -> bool; + //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; @@ -55,6 +73,9 @@ pub trait TimelineElementExt: 'static { fn get_name(&self) -> Option; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_natural_framerate(&self) -> Option<(i32, i32)>; + fn get_parent(&self) -> Option; fn get_priority(&self) -> u32; @@ -102,6 +123,7 @@ pub trait TimelineElementExt: 'static { fn set_parent>(&self, parent: &P) -> Result<(), glib::error::BoolError>; + #[cfg_attr(feature = "v1_10", deprecated)] fn set_priority(&self, priority: u32) -> bool; fn set_start(&self, start: gst::ClockTime) -> bool; @@ -118,6 +140,10 @@ pub trait TimelineElementExt: 'static { fn set_property_serialize(&self, serialize: bool); + //fn connect_child_property_added(&self, f: F) -> SignalHandlerId; + + //fn connect_child_property_removed(&self, f: F) -> SignalHandlerId; + //fn connect_deep_notify(&self, f: F) -> SignalHandlerId; fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId; @@ -131,6 +157,7 @@ pub trait TimelineElementExt: 'static { fn connect_property_parent_notify(&self, f: F) -> SignalHandlerId; + #[cfg_attr(feature = "v1_10", deprecated)] fn connect_property_priority_notify(&self, f: F) -> SignalHandlerId; fn connect_property_serialize_notify(&self, f: F) -> SignalHandlerId; @@ -155,6 +182,27 @@ impl> TimelineElementExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn edit( + &self, + layers: &[Layer], + new_layer_priority: i64, + mode: EditMode, + edge: Edge, + position: u64, + ) -> bool { + unsafe { + from_glib(ges_sys::ges_timeline_element_edit( + self.as_ref().to_glib_none().0, + layers.to_glib_none().0, + new_layer_priority, + mode.to_glib(), + edge.to_glib(), + position, + )) + } + } + //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() } //} @@ -208,6 +256,26 @@ impl> TimelineElementExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_natural_framerate(&self) -> Option<(i32, i32)> { + unsafe { + let mut framerate_n = mem::MaybeUninit::uninit(); + let mut framerate_d = mem::MaybeUninit::uninit(); + let ret = from_glib(ges_sys::ges_timeline_element_get_natural_framerate( + self.as_ref().to_glib_none().0, + framerate_n.as_mut_ptr(), + framerate_d.as_mut_ptr(), + )); + let framerate_n = framerate_n.assume_init(); + let framerate_d = framerate_d.assume_init(); + if ret { + Some((framerate_n, framerate_d)) + } else { + None + } + } + } + fn get_parent(&self) -> Option { unsafe { from_glib_full(ges_sys::ges_timeline_element_get_parent( @@ -481,6 +549,14 @@ impl> TimelineElementExt for O { } } + //fn connect_child_property_added(&self, f: F) -> SignalHandlerId { + // Ignored prop: GObject.ParamSpec + //} + + //fn connect_child_property_removed(&self, f: F) -> SignalHandlerId { + // Ignored prop: GObject.ParamSpec + //} + //fn connect_deep_notify(&self, f: F) -> SignalHandlerId { // Ignored prop: GObject.ParamSpec //} diff --git a/gstreamer-editing-services/src/auto/track.rs b/gstreamer-editing-services/src/auto/track.rs index 14996b1bd..ff299f9b2 100644 --- a/gstreamer-editing-services/src/auto/track.rs +++ b/gstreamer-editing-services/src/auto/track.rs @@ -9,6 +9,8 @@ use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use glib::GString; use glib::StaticType; use glib::Value; use glib_sys; @@ -48,6 +50,9 @@ pub trait GESTrackExt: 'static { fn get_mixing(&self) -> bool; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_restriction_caps(&self) -> Option; + fn get_timeline(&self) -> Option; fn remove_element>( @@ -67,6 +72,12 @@ pub trait GESTrackExt: 'static { fn get_property_duration(&self) -> u64; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_property_id(&self) -> Option; + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_property_id(&self, id: Option<&str>); + fn get_property_restriction_caps(&self) -> Option; fn get_property_track_type(&self) -> TrackType; @@ -85,6 +96,9 @@ pub trait GESTrackExt: 'static { fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_id_notify(&self, f: F) -> SignalHandlerId; + fn connect_property_mixing_notify(&self, f: F) -> SignalHandlerId; fn connect_property_restriction_caps_notify( @@ -130,6 +144,15 @@ impl> GESTrackExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_restriction_caps(&self) -> Option { + unsafe { + from_glib_full(ges_sys::ges_track_get_restriction_caps( + self.as_ref().to_glib_none().0, + )) + } + } + fn get_timeline(&self) -> Option { unsafe { from_glib_none(ges_sys::ges_track_get_timeline( @@ -205,6 +228,30 @@ impl> GESTrackExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_property_id(&self) -> Option { + 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"id\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value.get().expect("Return Value for property `id` getter") + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_property_id(&self, id: Option<&str>) { + unsafe { + gobject_sys::g_object_set_property( + self.to_glib_none().0 as *mut gobject_sys::GObject, + b"id\0".as_ptr() as *const _, + Value::from(id).to_glib_none().0, + ); + } + } + fn get_property_restriction_caps(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); @@ -344,6 +391,31 @@ impl> GESTrackExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_id_notify(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn notify_id_trampoline( + this: *mut ges_sys::GESTrack, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&Track::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::id\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_id_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + fn connect_property_mixing_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_mixing_trampoline( this: *mut ges_sys::GESTrack, diff --git a/gstreamer-editing-services/src/auto/track_element.rs b/gstreamer-editing-services/src/auto/track_element.rs index b91a105a5..2d362fc6c 100644 --- a/gstreamer-editing-services/src/auto/track_element.rs +++ b/gstreamer-editing-services/src/auto/track_element.rs @@ -43,6 +43,7 @@ pub trait TrackElementExt: 'static { whitelist: &[&str], ); + #[cfg_attr(feature = "v1_18", deprecated)] fn edit( &self, layers: &[Layer], @@ -65,6 +66,8 @@ pub trait TrackElementExt: 'static { fn get_track_type(&self) -> TrackType; + fn has_internal_source(&self) -> bool; + fn is_active(&self) -> bool; //fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option; @@ -75,16 +78,25 @@ pub trait TrackElementExt: 'static { //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); + fn set_track_type(&self, type_: TrackType); fn get_property_active(&self) -> bool; + fn get_property_has_internal_source(&self) -> bool; + //fn connect_control_binding_added(&self, f: F) -> SignalHandlerId; //fn connect_control_binding_removed(&self, f: F) -> SignalHandlerId; fn connect_property_active_notify(&self, f: F) -> SignalHandlerId; + fn connect_property_has_internal_source_notify( + &self, + f: F, + ) -> SignalHandlerId; + fn connect_property_track_notify(&self, f: F) -> SignalHandlerId; fn connect_property_track_type_notify(&self, f: F) -> SignalHandlerId; @@ -178,6 +190,14 @@ impl> TrackElementExt for O { } } + fn has_internal_source(&self) -> bool { + unsafe { + from_glib(ges_sys::ges_track_element_has_internal_source( + self.as_ref().to_glib_none().0, + )) + } + } + fn is_active(&self) -> bool { unsafe { from_glib(ges_sys::ges_track_element_is_active( @@ -215,6 +235,15 @@ impl> TrackElementExt for O { // unsafe { TODO: call ges_sys:ges_track_element_set_control_source() } //} + fn set_has_internal_source(&self, has_internal_source: bool) { + unsafe { + ges_sys::ges_track_element_set_has_internal_source( + self.as_ref().to_glib_none().0, + has_internal_source.to_glib(), + ); + } + } + fn set_track_type(&self, type_: TrackType) { unsafe { ges_sys::ges_track_element_set_track_type( @@ -239,6 +268,21 @@ impl> TrackElementExt for O { } } + fn get_property_has_internal_source(&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"has-internal-source\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `has-internal-source` getter") + .unwrap() + } + } + //fn connect_control_binding_added(&self, f: F) -> SignalHandlerId { // Ignored control_binding: Gst.ControlBinding //} @@ -271,6 +315,33 @@ impl> TrackElementExt for O { } } + fn connect_property_has_internal_source_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_has_internal_source_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::has-internal-source\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_has_internal_source_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + fn connect_property_track_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_track_trampoline( this: *mut ges_sys::GESTrackElement, diff --git a/gstreamer-editing-services/src/auto/uri_clip_asset.rs b/gstreamer-editing-services/src/auto/uri_clip_asset.rs index 2b25004e2..817de7d1e 100644 --- a/gstreamer-editing-services/src/auto/uri_clip_asset.rs +++ b/gstreamer-editing-services/src/auto/uri_clip_asset.rs @@ -9,6 +9,8 @@ use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use glib::StaticType; use glib::Value; use glib_sys; use gobject_sys; @@ -59,13 +61,25 @@ pub trait UriClipAssetExt: 'static { fn get_info(&self) -> Option; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_max_duration(&self) -> gst::ClockTime; + fn get_stream_assets(&self) -> Vec; fn is_image(&self) -> bool; fn set_property_duration(&self, duration: u64); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_property_is_nested_timeline(&self) -> bool; + fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId; + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_is_nested_timeline_notify( + &self, + f: F, + ) -> SignalHandlerId; } impl> UriClipAssetExt for O { @@ -85,6 +99,15 @@ impl> UriClipAssetExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_max_duration(&self) -> gst::ClockTime { + unsafe { + from_glib(ges_sys::ges_uri_clip_asset_get_max_duration( + self.as_ref().to_glib_none().0, + )) + } + } + fn get_stream_assets(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ges_sys::ges_uri_clip_asset_get_stream_assets( @@ -111,6 +134,22 @@ impl> UriClipAssetExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_property_is_nested_timeline(&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"is-nested-timeline\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `is-nested-timeline` getter") + .unwrap() + } + } + fn connect_property_duration_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_duration_trampoline( this: *mut ges_sys::GESUriClipAsset, @@ -134,4 +173,32 @@ impl> UriClipAssetExt for O { ) } } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_is_nested_timeline_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_is_nested_timeline_trampoline( + this: *mut ges_sys::GESUriClipAsset, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&UriClipAsset::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::is-nested-timeline\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_is_nested_timeline_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } } diff --git a/gstreamer-editing-services/src/auto/uri_source_asset.rs b/gstreamer-editing-services/src/auto/uri_source_asset.rs index aa64fa306..338e46bc7 100644 --- a/gstreamer-editing-services/src/auto/uri_source_asset.rs +++ b/gstreamer-editing-services/src/auto/uri_source_asset.rs @@ -26,6 +26,8 @@ pub trait UriSourceAssetExt: 'static { fn get_stream_info(&self) -> Option; fn get_stream_uri(&self) -> Option; + + fn is_image(&self) -> bool; } impl> UriSourceAssetExt for O { @@ -52,4 +54,12 @@ impl> UriSourceAssetExt for O { )) } } + + fn is_image(&self) -> bool { + unsafe { + from_glib(ges_sys::ges_uri_source_asset_is_image( + self.as_ref().to_glib_none().0, + )) + } + } } diff --git a/gstreamer-editing-services/src/auto/versions.txt b/gstreamer-editing-services/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-editing-services/src/lib.rs b/gstreamer-editing-services/src/lib.rs index 1f3b6d825..b5ffc82a4 100644 --- a/gstreamer-editing-services/src/lib.rs +++ b/gstreamer-editing-services/src/lib.rs @@ -41,12 +41,6 @@ pub fn init() -> Result<(), glib::BoolError> { } } -/// Deinitialize GStreamer Editing Services -/// -/// # Safety -/// -/// This must only be called once during the lifetime of the process, once no GStreamer threads -/// are running anymore and all GStreamer resources are released. pub unsafe fn deinit() { ges_sys::ges_deinit(); } diff --git a/gstreamer-gl/src/auto/enums.rs b/gstreamer-gl/src/auto/enums.rs index df872b9a1..4064c3eb7 100644 --- a/gstreamer-gl/src/auto/enums.rs +++ b/gstreamer-gl/src/auto/enums.rs @@ -129,6 +129,9 @@ pub enum GLFormat { Rgba16, DepthComponent16, Depth24Stencil8, + Rgb10A2, + R16, + Rg16, #[doc(hidden)] __Unknown(i32), } @@ -155,6 +158,9 @@ impl ToGlib for GLFormat { GLFormat::Rgba16 => gst_gl_sys::GST_GL_RGBA16, GLFormat::DepthComponent16 => gst_gl_sys::GST_GL_DEPTH_COMPONENT16, GLFormat::Depth24Stencil8 => gst_gl_sys::GST_GL_DEPTH24_STENCIL8, + GLFormat::Rgb10A2 => gst_gl_sys::GST_GL_RGB10_A2, + GLFormat::R16 => gst_gl_sys::GST_GL_R16, + GLFormat::Rg16 => gst_gl_sys::GST_GL_RG16, GLFormat::__Unknown(value) => value, } } @@ -181,6 +187,9 @@ impl FromGlib for GLFormat { 32859 => GLFormat::Rgba16, 33189 => GLFormat::DepthComponent16, 35056 => GLFormat::Depth24Stencil8, + 32857 => GLFormat::Rgb10A2, + 33322 => GLFormat::R16, + 33324 => GLFormat::Rg16, value => GLFormat::__Unknown(value), } } diff --git a/gstreamer-gl/src/auto/flags.rs b/gstreamer-gl/src/auto/flags.rs index 683bc1350..efdcb2431 100644 --- a/gstreamer-gl/src/auto/flags.rs +++ b/gstreamer-gl/src/auto/flags.rs @@ -75,6 +75,7 @@ bitflags! { const EGL = 32; const VIV_FB = 64; const GBM = 128; + const EGL_DEVICE = 256; const ANY = 4294967295; } } diff --git a/gstreamer-gl/src/auto/gl_base_filter.rs b/gstreamer-gl/src/auto/gl_base_filter.rs index c082162ab..7c0f3dd0e 100644 --- a/gstreamer-gl/src/auto/gl_base_filter.rs +++ b/gstreamer-gl/src/auto/gl_base_filter.rs @@ -34,6 +34,9 @@ pub trait GLBaseFilterExt: 'static { #[cfg(any(feature = "v1_16", feature = "dox"))] fn find_gl_context(&self) -> bool; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_gl_context(&self) -> Option; + fn get_property_context(&self) -> Option; fn connect_property_context_notify( @@ -52,6 +55,15 @@ impl> GLBaseFilterExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_gl_context(&self) -> Option { + unsafe { + from_glib_full(gst_gl_sys::gst_gl_base_filter_get_gl_context( + self.as_ref().to_glib_none().0, + )) + } + } + fn get_property_context(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); diff --git a/gstreamer-gl/src/auto/gl_display.rs b/gstreamer-gl/src/auto/gl_display.rs index 701a9dbb4..ded68b67c 100644 --- a/gstreamer-gl/src/auto/gl_display.rs +++ b/gstreamer-gl/src/auto/gl_display.rs @@ -57,14 +57,23 @@ pub trait GLDisplayExt: 'static { fn filter_gl_api(&self, gl_api: GLAPI); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_foreign_display(&self) -> bool; + fn get_gl_api(&self) -> GLAPI; fn get_gl_api_unlocked(&self) -> GLAPI; fn get_handle_type(&self) -> GLDisplayType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn remove_context>(&self, context: &P); + fn remove_window>(&self, window: &P) -> Result<(), glib::error::BoolError>; + //#[cfg(any(feature = "v1_18", feature = "dox"))] + //fn retrieve_window(&self, data: /*Unimplemented*/Option, compare_func: /*Unimplemented*/FnMut(/*Unimplemented*/Option, /*Unimplemented*/Option) -> i32) -> Option; + fn connect_create_context GLContext + Send + Sync + 'static>( &self, f: F, @@ -123,6 +132,15 @@ impl> GLDisplayExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_foreign_display(&self) -> bool { + unsafe { + from_glib(gst_gl_sys::gst_gl_display_get_foreign_display( + self.as_ref().to_glib_none().0, + )) + } + } + fn get_gl_api(&self) -> GLAPI { unsafe { from_glib(gst_gl_sys::gst_gl_display_get_gl_api( @@ -147,6 +165,16 @@ impl> GLDisplayExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn remove_context>(&self, context: &P) { + unsafe { + gst_gl_sys::gst_gl_display_remove_context( + self.as_ref().to_glib_none().0, + context.as_ref().to_glib_none().0, + ); + } + } + fn remove_window>(&self, window: &P) -> Result<(), glib::error::BoolError> { unsafe { glib_result_from_gboolean!( @@ -159,6 +187,11 @@ impl> GLDisplayExt for O { } } + //#[cfg(any(feature = "v1_18", feature = "dox"))] + //fn retrieve_window(&self, data: /*Unimplemented*/Option, compare_func: /*Unimplemented*/FnMut(/*Unimplemented*/Option, /*Unimplemented*/Option) -> i32) -> Option { + // unsafe { TODO: call gst_gl_sys:gst_gl_display_retrieve_window() } + //} + fn connect_create_context GLContext + Send + Sync + 'static>( &self, f: F, diff --git a/gstreamer-gl/src/auto/gl_window.rs b/gstreamer-gl/src/auto/gl_window.rs index df361644a..71fe08adf 100644 --- a/gstreamer-gl/src/auto/gl_window.rs +++ b/gstreamer-gl/src/auto/gl_window.rs @@ -55,6 +55,9 @@ pub trait GLWindowExt: 'static { fn handle_events(&self, handle_events: bool); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn has_output_surface(&self) -> bool; + fn queue_resize(&self); fn quit(&self); @@ -67,6 +70,8 @@ pub trait GLWindowExt: 'static { fn send_mouse_event(&self, event_type: &str, button: i32, posx: f64, posy: f64); + fn send_scroll_event(&self, posx: f64, posy: f64, delta_x: f64, delta_y: f64); + fn set_preferred_size(&self, width: i32, height: i32); fn set_render_rectangle( @@ -88,6 +93,12 @@ pub trait GLWindowExt: 'static { &self, f: F, ) -> SignalHandlerId; + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_scroll_event( + &self, + f: F, + ) -> SignalHandlerId; } impl> GLWindowExt for O { @@ -138,6 +149,15 @@ impl> GLWindowExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn has_output_surface(&self) -> bool { + unsafe { + from_glib(gst_gl_sys::gst_gl_window_has_output_surface( + self.as_ref().to_glib_none().0, + )) + } + } + fn queue_resize(&self) { unsafe { gst_gl_sys::gst_gl_window_queue_resize(self.as_ref().to_glib_none().0); @@ -184,6 +204,18 @@ impl> GLWindowExt for O { } } + 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( + self.as_ref().to_glib_none().0, + posx, + posy, + delta_x, + delta_y, + ); + } + } + fn set_preferred_size(&self, width: i32, height: i32) { unsafe { gst_gl_sys::gst_gl_window_set_preferred_size( @@ -294,4 +326,44 @@ impl> GLWindowExt for O { ) } } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_scroll_event( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn scroll_event_trampoline< + P, + F: Fn(&P, f64, f64, f64, f64) + Send + Sync + 'static, + >( + this: *mut gst_gl_sys::GstGLWindow, + x: libc::c_double, + y: libc::c_double, + delta_x: libc::c_double, + delta_y: libc::c_double, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f( + &GLWindow::from_glib_borrow(this).unsafe_cast_ref(), + x, + y, + delta_x, + delta_y, + ) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"scroll-event\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + scroll_event_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } } diff --git a/gstreamer-gl/src/auto/versions.txt b/gstreamer-gl/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-net/src/auto/versions.txt b/gstreamer-net/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-pbutils/src/auto/encoding_profile.rs b/gstreamer-pbutils/src/auto/encoding_profile.rs index 55ea5b111..5809901bb 100644 --- a/gstreamer-pbutils/src/auto/encoding_profile.rs +++ b/gstreamer-pbutils/src/auto/encoding_profile.rs @@ -72,6 +72,9 @@ pub trait EncodingProfileExt: 'static { fn get_preset_name(&self) -> Option; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_single_segment(&self) -> bool; + fn get_type_nick(&self) -> Option; fn is_enabled(&self) -> bool; @@ -161,6 +164,15 @@ impl> EncodingProfileExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_single_segment(&self) -> bool { + unsafe { + from_glib(gst_pbutils_sys::gst_encoding_profile_get_single_segment( + self.as_ref().to_glib_none().0, + )) + } + } + fn get_type_nick(&self) -> Option { unsafe { from_glib_none(gst_pbutils_sys::gst_encoding_profile_get_type_nick( diff --git a/gstreamer-pbutils/src/auto/versions.txt b/gstreamer-pbutils/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-player/src/auto/versions.txt b/gstreamer-player/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-rtp/src/auto/enums.rs b/gstreamer-rtp/src/auto/enums.rs index 7d6011d3b..11987fc06 100644 --- a/gstreamer-rtp/src/auto/enums.rs +++ b/gstreamer-rtp/src/auto/enums.rs @@ -20,8 +20,8 @@ pub enum RTCPFBType { RtpfbTypeTmmbr, RtpfbTypeTmmbn, RtpfbTypeRtcpSrReq, + RtpfbTypeTwcc, PsfbTypeSli, - PsfbTypeAfb, PsfbTypeTstn, PsfbTypeVbcn, #[doc(hidden)] @@ -39,8 +39,8 @@ impl ToGlib for RTCPFBType { RTCPFBType::RtpfbTypeTmmbr => gst_rtp_sys::GST_RTCP_RTPFB_TYPE_TMMBR, RTCPFBType::RtpfbTypeTmmbn => gst_rtp_sys::GST_RTCP_RTPFB_TYPE_TMMBN, RTCPFBType::RtpfbTypeRtcpSrReq => gst_rtp_sys::GST_RTCP_RTPFB_TYPE_RTCP_SR_REQ, + RTCPFBType::RtpfbTypeTwcc => gst_rtp_sys::GST_RTCP_RTPFB_TYPE_TWCC, RTCPFBType::PsfbTypeSli => gst_rtp_sys::GST_RTCP_PSFB_TYPE_SLI, - RTCPFBType::PsfbTypeAfb => gst_rtp_sys::GST_RTCP_PSFB_TYPE_AFB, RTCPFBType::PsfbTypeTstn => gst_rtp_sys::GST_RTCP_PSFB_TYPE_TSTN, RTCPFBType::PsfbTypeVbcn => gst_rtp_sys::GST_RTCP_PSFB_TYPE_VBCN, RTCPFBType::__Unknown(value) => value, @@ -58,8 +58,8 @@ impl FromGlib for RTCPFBType { 3 => RTCPFBType::RtpfbTypeTmmbr, 4 => RTCPFBType::RtpfbTypeTmmbn, 5 => RTCPFBType::RtpfbTypeRtcpSrReq, + 15 => RTCPFBType::RtpfbTypeTwcc, 2 => RTCPFBType::PsfbTypeSli, - 15 => RTCPFBType::PsfbTypeAfb, 6 => RTCPFBType::PsfbTypeTstn, 7 => RTCPFBType::PsfbTypeVbcn, value => RTCPFBType::__Unknown(value), diff --git a/gstreamer-rtp/src/auto/versions.txt b/gstreamer-rtp/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-rtsp-server/src/auto/rtsp_client.rs b/gstreamer-rtsp-server/src/auto/rtsp_client.rs index 6fd65a950..9c7b96a45 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_client.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_client.rs @@ -24,6 +24,8 @@ use RTSPFilterResult; use RTSPMountPoints; use RTSPSession; use RTSPSessionPool; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use RTSPStreamTransport; use RTSPThreadPool; glib_wrapper! { @@ -59,10 +61,16 @@ pub trait RTSPClientExt: 'static { //fn get_connection(&self) -> /*Ignored*/Option; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_content_length_limit(&self) -> u32; + fn get_mount_points(&self) -> Option; fn get_session_pool(&self) -> Option; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_stream_transport(&self, channel: u8) -> Option; + fn get_thread_pool(&self) -> Option; //fn handle_message(&self, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult; @@ -78,6 +86,9 @@ pub trait RTSPClientExt: 'static { //fn set_connection(&self, conn: /*Ignored*/&mut gst_rtsp::RTSPConnection) -> bool; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_content_length_limit(&self, limit: u32); + fn set_mount_points>(&self, mounts: Option<&P>); //fn set_send_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, bool) -> bool, user_data: /*Unimplemented*/Option); @@ -93,6 +104,10 @@ pub trait RTSPClientExt: 'static { fn set_property_drop_backlog(&self, drop_backlog: bool); + fn get_property_post_session_timeout(&self) -> i32; + + fn set_property_post_session_timeout(&self, post_session_timeout: i32); + fn connect_announce_request( &self, f: F, @@ -249,6 +264,11 @@ pub trait RTSPClientExt: 'static { f: F, ) -> SignalHandlerId; + fn connect_property_post_session_timeout_notify( + &self, + f: F, + ) -> SignalHandlerId; + fn connect_property_session_pool_notify( &self, f: F, @@ -274,6 +294,15 @@ impl> RTSPClientExt for O { // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_get_connection() } //} + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_content_length_limit(&self) -> u32 { + unsafe { + gst_rtsp_server_sys::gst_rtsp_client_get_content_length_limit( + self.as_ref().to_glib_none().0, + ) + } + } + fn get_mount_points(&self) -> Option { unsafe { from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_mount_points( @@ -290,6 +319,16 @@ impl> RTSPClientExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_stream_transport(&self, channel: u8) -> Option { + unsafe { + from_glib_none(gst_rtsp_server_sys::gst_rtsp_client_get_stream_transport( + self.as_ref().to_glib_none().0, + channel, + )) + } + } + fn get_thread_pool(&self) -> Option { unsafe { from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_thread_pool( @@ -362,6 +401,16 @@ impl> RTSPClientExt for O { // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_set_connection() } //} + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_content_length_limit(&self, limit: u32) { + unsafe { + gst_rtsp_server_sys::gst_rtsp_client_set_content_length_limit( + self.as_ref().to_glib_none().0, + limit, + ); + } + } + fn set_mount_points>(&self, mounts: Option<&P>) { unsafe { gst_rtsp_server_sys::gst_rtsp_client_set_mount_points( @@ -423,6 +472,31 @@ impl> RTSPClientExt for O { } } + fn get_property_post_session_timeout(&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"post-session-timeout\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `post-session-timeout` getter") + .unwrap() + } + } + + fn set_property_post_session_timeout(&self, post_session_timeout: i32) { + unsafe { + gobject_sys::g_object_set_property( + self.to_glib_none().0 as *mut gobject_sys::GObject, + b"post-session-timeout\0".as_ptr() as *const _, + Value::from(&post_session_timeout).to_glib_none().0, + ); + } + } + fn connect_announce_request( &self, f: F, @@ -1284,6 +1358,36 @@ impl> RTSPClientExt for O { } } + fn connect_property_post_session_timeout_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_post_session_timeout_trampoline< + P, + F: Fn(&P) + Send + Sync + 'static, + >( + this: *mut gst_rtsp_server_sys::GstRTSPClient, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&RTSPClient::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::post-session-timeout\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_post_session_timeout_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + fn connect_property_session_pool_notify( &self, f: F, diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_media.rs index c8568d241..935ca16fd 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media.rs @@ -18,6 +18,8 @@ use gst_rtsp; use gst_rtsp_server_sys; use libc; use std::boxed::Box as Box_; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use std::mem; use std::mem::transmute; use RTSPAddressPool; use RTSPMediaStatus; @@ -96,6 +98,12 @@ pub trait RTSPMediaExt: 'static { fn get_range_string(&self, play: bool, unit: gst_rtsp::RTSPRangeUnit) -> Option; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_rate_control(&self) -> bool; + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_rates(&self) -> Option<(f64, f64)>; + fn get_retransmission_time(&self) -> gst::ClockTime; fn get_status(&self) -> RTSPMediaStatus; @@ -110,11 +118,17 @@ pub trait RTSPMediaExt: 'static { //fn handle_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage) -> bool; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn has_completed_sender(&self) -> bool; + #[cfg(any(feature = "v1_16", feature = "dox"))] fn is_bind_mcast_address(&self) -> bool; fn is_eos_shutdown(&self) -> bool; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn is_receive_only(&self) -> bool; + fn is_reusable(&self) -> bool; fn is_shared(&self) -> bool; @@ -123,15 +137,21 @@ pub trait RTSPMediaExt: 'static { fn is_time_provider(&self) -> bool; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn lock(&self); + fn n_streams(&self) -> u32; fn prepare(&self, thread: Option<&RTSPThread>) -> Result<(), glib::error::BoolError>; //fn seek(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange) -> bool; - //#[cfg(any(feature = "v1_14", feature = "dox"))] + //#[cfg(any(feature = "v1_18", feature = "dox"))] //fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool; + //#[cfg(any(feature = "v1_18", feature = "dox"))] + //fn seek_trickmode(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags, rate: f64, trickmode_interval: gst::ClockTime) -> bool; + //#[cfg(any(feature = "v1_14", feature = "dox"))] //fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff; @@ -166,6 +186,9 @@ pub trait RTSPMediaExt: 'static { fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_rate_control(&self, enabled: bool); + fn set_retransmission_time(&self, time: gst::ClockTime); fn set_reusable(&self, reusable: bool); @@ -184,6 +207,9 @@ pub trait RTSPMediaExt: 'static { fn suspend(&self) -> Result<(), glib::error::BoolError>; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn unlock(&self); + fn unprepare(&self) -> Result<(), glib::error::BoolError>; fn unsuspend(&self) -> Result<(), glib::error::BoolError>; @@ -440,6 +466,35 @@ impl> RTSPMediaExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_rate_control(&self) -> bool { + unsafe { + from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_rate_control( + self.as_ref().to_glib_none().0, + )) + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_rates(&self) -> Option<(f64, f64)> { + unsafe { + let mut rate = mem::MaybeUninit::uninit(); + let mut applied_rate = mem::MaybeUninit::uninit(); + let ret = from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_rates( + self.as_ref().to_glib_none().0, + rate.as_mut_ptr(), + applied_rate.as_mut_ptr(), + )); + let rate = rate.assume_init(); + let applied_rate = applied_rate.assume_init(); + if ret { + Some((rate, applied_rate)) + } else { + None + } + } + } + fn get_retransmission_time(&self) -> gst::ClockTime { unsafe { from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_retransmission_time( @@ -489,6 +544,15 @@ impl> RTSPMediaExt for O { // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_handle_sdp() } //} + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn has_completed_sender(&self) -> bool { + unsafe { + from_glib(gst_rtsp_server_sys::gst_rtsp_media_has_completed_sender( + self.as_ref().to_glib_none().0, + )) + } + } + #[cfg(any(feature = "v1_16", feature = "dox"))] fn is_bind_mcast_address(&self) -> bool { unsafe { @@ -506,6 +570,15 @@ impl> RTSPMediaExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn is_receive_only(&self) -> bool { + unsafe { + from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_receive_only( + self.as_ref().to_glib_none().0, + )) + } + } + fn is_reusable(&self) -> bool { unsafe { from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_reusable( @@ -538,6 +611,13 @@ impl> RTSPMediaExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn lock(&self) { + unsafe { + gst_rtsp_server_sys::gst_rtsp_media_lock(self.as_ref().to_glib_none().0); + } + } + fn n_streams(&self) -> u32 { unsafe { gst_rtsp_server_sys::gst_rtsp_media_n_streams(self.as_ref().to_glib_none().0) } } @@ -558,11 +638,16 @@ impl> RTSPMediaExt for O { // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seek() } //} - //#[cfg(any(feature = "v1_14", feature = "dox"))] + //#[cfg(any(feature = "v1_18", feature = "dox"))] //fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool { // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seek_full() } //} + //#[cfg(any(feature = "v1_18", feature = "dox"))] + //fn seek_trickmode(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags, rate: f64, trickmode_interval: gst::ClockTime) -> bool { + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seek_trickmode() } + //} + //#[cfg(any(feature = "v1_14", feature = "dox"))] //fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff { // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seekable() } @@ -692,6 +777,16 @@ impl> RTSPMediaExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_rate_control(&self, enabled: bool) { + unsafe { + gst_rtsp_server_sys::gst_rtsp_media_set_rate_control( + self.as_ref().to_glib_none().0, + enabled.to_glib(), + ); + } + } + fn set_retransmission_time(&self, time: gst::ClockTime) { unsafe { gst_rtsp_server_sys::gst_rtsp_media_set_retransmission_time( @@ -769,6 +864,13 @@ impl> RTSPMediaExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn unlock(&self) { + unsafe { + gst_rtsp_server_sys::gst_rtsp_media_unlock(self.as_ref().to_glib_none().0); + } + } + fn unprepare(&self) -> Result<(), glib::error::BoolError> { unsafe { glib_result_from_gboolean!( diff --git a/gstreamer-rtsp-server/src/auto/rtsp_server.rs b/gstreamer-rtsp-server/src/auto/rtsp_server.rs index a8b127d2e..2bb0cc7c0 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_server.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_server.rs @@ -10,7 +10,10 @@ 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_rtsp_server_sys; use std::boxed::Box as Box_; use std::mem::transmute; @@ -90,6 +93,9 @@ pub trait RTSPServerExt: 'static { fn get_bound_port(&self) -> i32; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_content_length_limit(&self) -> u32; + fn get_mount_points(&self) -> Option; fn get_service(&self) -> Option; @@ -104,6 +110,9 @@ pub trait RTSPServerExt: 'static { fn set_backlog(&self, backlog: i32); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_content_length_limit(&self, limit: u32); + fn set_mount_points>(&self, mounts: Option<&P>); fn set_service(&self, service: &str); @@ -120,6 +129,10 @@ pub trait RTSPServerExt: 'static { initial_buffer: Option<&str>, ) -> Result<(), glib::error::BoolError>; + fn get_property_content_length_limit(&self) -> u32; + + fn set_property_content_length_limit(&self, content_length_limit: u32); + fn connect_client_connected( &self, f: F, @@ -140,6 +153,11 @@ pub trait RTSPServerExt: 'static { f: F, ) -> SignalHandlerId; + fn connect_property_content_length_limit_notify( + &self, + f: F, + ) -> SignalHandlerId; + fn connect_property_mount_points_notify( &self, f: F, @@ -264,6 +282,15 @@ impl> RTSPServerExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_content_length_limit(&self) -> u32 { + unsafe { + gst_rtsp_server_sys::gst_rtsp_server_get_content_length_limit( + self.as_ref().to_glib_none().0, + ) + } + } + fn get_mount_points(&self) -> Option { unsafe { from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_get_mount_points( @@ -323,6 +350,16 @@ impl> RTSPServerExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_content_length_limit(&self, limit: u32) { + unsafe { + gst_rtsp_server_sys::gst_rtsp_server_set_content_length_limit( + self.as_ref().to_glib_none().0, + limit, + ); + } + } + fn set_mount_points>(&self, mounts: Option<&P>) { unsafe { gst_rtsp_server_sys::gst_rtsp_server_set_mount_points( @@ -380,6 +417,31 @@ impl> RTSPServerExt for O { } } + fn get_property_content_length_limit(&self) -> u32 { + 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"content-length-limit\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `content-length-limit` getter") + .unwrap() + } + } + + fn set_property_content_length_limit(&self, content_length_limit: u32) { + unsafe { + gobject_sys::g_object_set_property( + self.to_glib_none().0 as *mut gobject_sys::GObject, + b"content-length-limit\0".as_ptr() as *const _, + Value::from(&content_length_limit).to_glib_none().0, + ); + } + } + fn connect_client_connected( &self, f: F, @@ -494,6 +556,36 @@ impl> RTSPServerExt for O { } } + fn connect_property_content_length_limit_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_content_length_limit_trampoline< + P, + F: Fn(&P) + Send + Sync + 'static, + >( + this: *mut gst_rtsp_server_sys::GstRTSPServer, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&RTSPServer::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::content-length-limit\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_content_length_limit_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + fn connect_property_mount_points_notify( &self, f: F, diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session.rs b/gstreamer-rtsp-server/src/auto/rtsp_session.rs index 52d2e04a9..f4e66901d 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session.rs @@ -83,10 +83,19 @@ pub trait RTSPSessionExt: 'static { fn touch(&self); + fn get_property_extra_timeout(&self) -> u32; + + fn set_property_extra_timeout(&self, extra_timeout: u32); + fn get_property_timeout_always_visible(&self) -> bool; fn set_property_timeout_always_visible(&self, timeout_always_visible: bool); + fn connect_property_extra_timeout_notify( + &self, + f: F, + ) -> SignalHandlerId; + fn connect_property_timeout_notify( &self, f: F, @@ -253,6 +262,31 @@ impl> RTSPSessionExt for O { } } + fn get_property_extra_timeout(&self) -> u32 { + 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"extra-timeout\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `extra-timeout` getter") + .unwrap() + } + } + + fn set_property_extra_timeout(&self, extra_timeout: u32) { + unsafe { + gobject_sys::g_object_set_property( + self.to_glib_none().0 as *mut gobject_sys::GObject, + b"extra-timeout\0".as_ptr() as *const _, + Value::from(&extra_timeout).to_glib_none().0, + ); + } + } + fn get_property_timeout_always_visible(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); @@ -278,6 +312,33 @@ impl> RTSPSessionExt for O { } } + fn connect_property_extra_timeout_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_extra_timeout_trampoline( + this: *mut gst_rtsp_server_sys::GstRTSPSession, + _param_spec: glib_sys::gpointer, + f: glib_sys::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&RTSPSession::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::extra-timeout\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_extra_timeout_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + fn connect_property_timeout_notify( &self, f: F, diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs index 932f9a7bb..e7d73520d 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs @@ -110,6 +110,12 @@ pub trait RTSPStreamExt: 'static { fn get_publish_clock_mode(&self) -> RTSPPublishClockMode; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_rate_control(&self) -> bool; + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_rates(&self) -> Option<(f64, f64)>; + fn get_retransmission_pt(&self) -> u32; fn get_retransmission_time(&self) -> gst::ClockTime; @@ -242,6 +248,9 @@ pub trait RTSPStreamExt: 'static { fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode); + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_rate_control(&self, enabled: bool); + fn set_retransmission_pt(&self, rtx_pt: u32); fn set_retransmission_time(&self, time: gst::ClockTime); @@ -466,6 +475,35 @@ impl> RTSPStreamExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_rate_control(&self) -> bool { + unsafe { + from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_rate_control( + self.as_ref().to_glib_none().0, + )) + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_rates(&self) -> Option<(f64, f64)> { + unsafe { + let mut rate = mem::MaybeUninit::uninit(); + let mut applied_rate = mem::MaybeUninit::uninit(); + let ret = from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_rates( + self.as_ref().to_glib_none().0, + rate.as_mut_ptr(), + applied_rate.as_mut_ptr(), + )); + let rate = rate.assume_init(); + let applied_rate = applied_rate.assume_init(); + if ret { + Some((rate, applied_rate)) + } else { + None + } + } + } + fn get_retransmission_pt(&self) -> u32 { unsafe { gst_rtsp_server_sys::gst_rtsp_stream_get_retransmission_pt( @@ -948,6 +986,16 @@ impl> RTSPStreamExt for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_rate_control(&self, enabled: bool) { + unsafe { + gst_rtsp_server_sys::gst_rtsp_stream_set_rate_control( + self.as_ref().to_glib_none().0, + enabled.to_glib(), + ); + } + } + fn set_retransmission_pt(&self, rtx_pt: u32) { unsafe { gst_rtsp_server_sys::gst_rtsp_stream_set_retransmission_pt( diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs index cf1654fbf..bcf2ebbf2 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs @@ -47,12 +47,12 @@ pub trait RTSPStreamTransportExt: 'static { fn send_rtcp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError>; //#[cfg(any(feature = "v1_16", feature = "dox"))] - //fn send_rtcp_list(&self, buffer_list: /*Ignored*/&mut gst::BufferList) -> bool; + //fn send_rtcp_list(&self, buffer_list: /*Ignored*/&gst::BufferList) -> bool; fn send_rtp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError>; //#[cfg(any(feature = "v1_16", feature = "dox"))] - //fn send_rtp_list(&self, buffer_list: /*Ignored*/&mut gst::BufferList) -> bool; + //fn send_rtp_list(&self, buffer_list: /*Ignored*/&gst::BufferList) -> bool; fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError>; @@ -140,7 +140,7 @@ impl> RTSPStreamTransportExt for O { } //#[cfg(any(feature = "v1_16", feature = "dox"))] - //fn send_rtcp_list(&self, buffer_list: /*Ignored*/&mut gst::BufferList) -> bool { + //fn send_rtcp_list(&self, buffer_list: /*Ignored*/&gst::BufferList) -> bool { // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_send_rtcp_list() } //} @@ -157,7 +157,7 @@ impl> RTSPStreamTransportExt for O { } //#[cfg(any(feature = "v1_16", feature = "dox"))] - //fn send_rtp_list(&self, buffer_list: /*Ignored*/&mut gst::BufferList) -> bool { + //fn send_rtp_list(&self, buffer_list: /*Ignored*/&gst::BufferList) -> bool { // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_send_rtp_list() } //} diff --git a/gstreamer-rtsp-server/src/auto/versions.txt b/gstreamer-rtsp-server/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-rtsp/src/auto/rtsp_url.rs b/gstreamer-rtsp/src/auto/rtsp_url.rs index 0edbd0033..454747c57 100644 --- a/gstreamer-rtsp/src/auto/rtsp_url.rs +++ b/gstreamer-rtsp/src/auto/rtsp_url.rs @@ -36,6 +36,15 @@ impl RTSPUrl { } } + 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( + self.to_glib_none().0, + control_path.to_glib_none().0, + )) + } + } + pub fn set_port(&mut self, port: u16) -> RTSPResult { unsafe { from_glib(gst_rtsp_sys::gst_rtsp_url_set_port( diff --git a/gstreamer-rtsp/src/auto/versions.txt b/gstreamer-rtsp/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-sdp/src/auto/versions.txt b/gstreamer-sdp/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-video/src/auto/enums.rs b/gstreamer-video/src/auto/enums.rs index 294686e9b..d35ec8522 100644 --- a/gstreamer-video/src/auto/enums.rs +++ b/gstreamer-video/src/auto/enums.rs @@ -14,66 +14,6 @@ use gst_video_sys; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] -pub enum VideoAlphaMode { - Copy, - Set, - Mult, - #[doc(hidden)] - __Unknown(i32), -} - -#[doc(hidden)] -impl ToGlib for VideoAlphaMode { - type GlibType = gst_video_sys::GstVideoAlphaMode; - - fn to_glib(&self) -> gst_video_sys::GstVideoAlphaMode { - match *self { - VideoAlphaMode::Copy => gst_video_sys::GST_VIDEO_ALPHA_MODE_COPY, - VideoAlphaMode::Set => gst_video_sys::GST_VIDEO_ALPHA_MODE_SET, - VideoAlphaMode::Mult => gst_video_sys::GST_VIDEO_ALPHA_MODE_MULT, - VideoAlphaMode::__Unknown(value) => value, - } - } -} - -#[doc(hidden)] -impl FromGlib for VideoAlphaMode { - fn from_glib(value: gst_video_sys::GstVideoAlphaMode) -> Self { - skip_assert_initialized!(); - match value { - 0 => VideoAlphaMode::Copy, - 1 => VideoAlphaMode::Set, - 2 => VideoAlphaMode::Mult, - value => VideoAlphaMode::__Unknown(value), - } - } -} - -impl StaticType for VideoAlphaMode { - fn static_type() -> Type { - unsafe { from_glib(gst_video_sys::gst_video_alpha_mode_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for VideoAlphaMode { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for VideoAlphaMode { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for VideoAlphaMode { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] pub enum VideoAFDSpec { DvbEtsi, AtscA53, @@ -135,6 +75,7 @@ impl SetValue for VideoAFDSpec { #[cfg(any(feature = "v1_18", feature = "dox"))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] +#[non_exhaustive] pub enum VideoAFDValue { Unavailable, _169TopAligned, @@ -230,6 +171,67 @@ impl SetValue for VideoAFDValue { } } +#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] +#[non_exhaustive] +pub enum VideoAlphaMode { + Copy, + Set, + Mult, + #[doc(hidden)] + __Unknown(i32), +} + +#[doc(hidden)] +impl ToGlib for VideoAlphaMode { + type GlibType = gst_video_sys::GstVideoAlphaMode; + + fn to_glib(&self) -> gst_video_sys::GstVideoAlphaMode { + match *self { + VideoAlphaMode::Copy => gst_video_sys::GST_VIDEO_ALPHA_MODE_COPY, + VideoAlphaMode::Set => gst_video_sys::GST_VIDEO_ALPHA_MODE_SET, + VideoAlphaMode::Mult => gst_video_sys::GST_VIDEO_ALPHA_MODE_MULT, + VideoAlphaMode::__Unknown(value) => value, + } + } +} + +#[doc(hidden)] +impl FromGlib for VideoAlphaMode { + fn from_glib(value: gst_video_sys::GstVideoAlphaMode) -> Self { + skip_assert_initialized!(); + match value { + 0 => VideoAlphaMode::Copy, + 1 => VideoAlphaMode::Set, + 2 => VideoAlphaMode::Mult, + value => VideoAlphaMode::__Unknown(value), + } + } +} + +impl StaticType for VideoAlphaMode { + fn static_type() -> Type { + unsafe { from_glib(gst_video_sys::gst_video_alpha_mode_get_type()) } + } +} + +impl<'a> FromValueOptional<'a> for VideoAlphaMode { + unsafe fn from_value_optional(value: &Value) -> Option { + Some(FromValue::from_value(value)) + } +} + +impl<'a> FromValue<'a> for VideoAlphaMode { + unsafe fn from_value(value: &Value) -> Self { + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) + } +} + +impl SetValue for VideoAlphaMode { + unsafe fn set_value(value: &mut Value, this: &Self) { + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + } +} + #[cfg(any(feature = "v1_16", feature = "dox"))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -758,6 +760,17 @@ pub enum VideoFormat { Y410, Vuya, Bgr10a2Le, + Rgb10a2Le, + Y44416be, + Y44416le, + P016Be, + P016Le, + P012Be, + P012Le, + Y212Be, + Y212Le, + Y412Be, + Y412Le, #[doc(hidden)] __Unknown(i32), } @@ -854,6 +867,17 @@ impl ToGlib for VideoFormat { VideoFormat::Y410 => gst_video_sys::GST_VIDEO_FORMAT_Y410, VideoFormat::Vuya => gst_video_sys::GST_VIDEO_FORMAT_VUYA, VideoFormat::Bgr10a2Le => gst_video_sys::GST_VIDEO_FORMAT_BGR10A2_LE, + VideoFormat::Rgb10a2Le => gst_video_sys::GST_VIDEO_FORMAT_RGB10A2_LE, + VideoFormat::Y44416be => gst_video_sys::GST_VIDEO_FORMAT_Y444_16BE, + VideoFormat::Y44416le => gst_video_sys::GST_VIDEO_FORMAT_Y444_16LE, + VideoFormat::P016Be => gst_video_sys::GST_VIDEO_FORMAT_P016_BE, + VideoFormat::P016Le => gst_video_sys::GST_VIDEO_FORMAT_P016_LE, + VideoFormat::P012Be => gst_video_sys::GST_VIDEO_FORMAT_P012_BE, + VideoFormat::P012Le => gst_video_sys::GST_VIDEO_FORMAT_P012_LE, + VideoFormat::Y212Be => gst_video_sys::GST_VIDEO_FORMAT_Y212_BE, + VideoFormat::Y212Le => gst_video_sys::GST_VIDEO_FORMAT_Y212_LE, + VideoFormat::Y412Be => gst_video_sys::GST_VIDEO_FORMAT_Y412_BE, + VideoFormat::Y412Le => gst_video_sys::GST_VIDEO_FORMAT_Y412_LE, VideoFormat::__Unknown(value) => value, } } @@ -950,6 +974,17 @@ impl FromGlib for VideoFormat { 83 => VideoFormat::Y410, 84 => VideoFormat::Vuya, 85 => VideoFormat::Bgr10a2Le, + 86 => VideoFormat::Rgb10a2Le, + 87 => VideoFormat::Y44416be, + 88 => VideoFormat::Y44416le, + 89 => VideoFormat::P016Be, + 90 => VideoFormat::P016Le, + 91 => VideoFormat::P012Be, + 92 => VideoFormat::P012Le, + 93 => VideoFormat::Y212Be, + 94 => VideoFormat::Y212Le, + 95 => VideoFormat::Y412Be, + 96 => VideoFormat::Y412Le, value => VideoFormat::__Unknown(value), } } @@ -1575,6 +1610,9 @@ pub enum VideoTransferFunction { Log316, Bt202012, Adobergb, + Bt202010, + Smpte2084, + AribStdB67, #[doc(hidden)] __Unknown(i32), } @@ -1598,6 +1636,9 @@ impl ToGlib for VideoTransferFunction { VideoTransferFunction::Log316 => gst_video_sys::GST_VIDEO_TRANSFER_LOG316, VideoTransferFunction::Bt202012 => gst_video_sys::GST_VIDEO_TRANSFER_BT2020_12, VideoTransferFunction::Adobergb => gst_video_sys::GST_VIDEO_TRANSFER_ADOBERGB, + VideoTransferFunction::Bt202010 => gst_video_sys::GST_VIDEO_TRANSFER_BT2020_10, + VideoTransferFunction::Smpte2084 => gst_video_sys::GST_VIDEO_TRANSFER_SMPTE2084, + VideoTransferFunction::AribStdB67 => gst_video_sys::GST_VIDEO_TRANSFER_ARIB_STD_B67, VideoTransferFunction::__Unknown(value) => value, } } @@ -1621,6 +1662,9 @@ impl FromGlib for VideoTransferFunction 10 => VideoTransferFunction::Log316, 11 => VideoTransferFunction::Bt202012, 12 => VideoTransferFunction::Adobergb, + 13 => VideoTransferFunction::Bt202010, + 14 => VideoTransferFunction::Smpte2084, + 15 => VideoTransferFunction::AribStdB67, value => VideoTransferFunction::__Unknown(value), } } diff --git a/gstreamer-video/src/auto/flags.rs b/gstreamer-video/src/auto/flags.rs index 0a5e540a1..0b086640f 100644 --- a/gstreamer-video/src/auto/flags.rs +++ b/gstreamer-video/src/auto/flags.rs @@ -22,6 +22,7 @@ bitflags! { const FIRST_IN_BUNDLE = 33554432; const TOP_FIELD = 10485760; const BOTTOM_FIELD = 8388608; + const MARKER = 512; const LAST = 268435456; } } @@ -486,3 +487,31 @@ impl FromGlib for VideoTimeCodeFlags { VideoTimeCodeFlags::from_bits_truncate(value) } } + +#[cfg(any(feature = "v1_10", feature = "dox"))] +impl StaticType for VideoTimeCodeFlags { + fn static_type() -> Type { + unsafe { from_glib(gst_video_sys::gst_video_time_code_flags_get_type()) } + } +} + +#[cfg(any(feature = "v1_10", feature = "dox"))] +impl<'a> FromValueOptional<'a> for VideoTimeCodeFlags { + unsafe fn from_value_optional(value: &Value) -> Option { + Some(FromValue::from_value(value)) + } +} + +#[cfg(any(feature = "v1_10", feature = "dox"))] +impl<'a> FromValue<'a> for VideoTimeCodeFlags { + unsafe fn from_value(value: &Value) -> Self { + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) + } +} + +#[cfg(any(feature = "v1_10", feature = "dox"))] +impl SetValue for VideoTimeCodeFlags { + unsafe fn set_value(value: &mut Value, this: &Self) { + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + } +} diff --git a/gstreamer-video/src/auto/versions.txt b/gstreamer-video/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-video/src/auto/video_decoder.rs b/gstreamer-video/src/auto/video_decoder.rs index 77da5b97e..9104f4ac3 100644 --- a/gstreamer-video/src/auto/video_decoder.rs +++ b/gstreamer-video/src/auto/video_decoder.rs @@ -3,10 +3,28 @@ // DO NOT EDIT use glib; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use glib::object::Cast; use glib::object::IsA; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use glib::signal::connect_raw; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use glib::signal::SignalHandlerId; use glib::translate::*; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use glib::StaticType; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use glib::Value; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use glib_sys; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use gobject_sys; use gst; use gst_video_sys; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use std::boxed::Box as Box_; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use std::mem::transmute; use VideoCodecFrame; glib_wrapper! { @@ -56,6 +74,18 @@ pub trait VideoDecoderExt: 'static { fn set_packetized(&self, packetized: bool); fn set_use_default_pad_acceptcaps(&self, use_: bool); + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_property_qos(&self) -> bool; + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_property_qos(&self, qos: bool); + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_qos_notify( + &self, + f: F, + ) -> SignalHandlerId; } impl> VideoDecoderExt for O { @@ -190,4 +220,59 @@ impl> VideoDecoderExt for O { ); } } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_property_qos(&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"qos\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `qos` getter") + .unwrap() + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn set_property_qos(&self, qos: bool) { + unsafe { + gobject_sys::g_object_set_property( + self.to_glib_none().0 as *mut gobject_sys::GObject, + b"qos\0".as_ptr() as *const _, + Value::from(&qos).to_glib_none().0, + ); + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn connect_property_qos_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_qos_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::qos\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_qos_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } } diff --git a/gstreamer-video/src/video_encoder.rs b/gstreamer-video/src/video_encoder.rs index 910fde89f..764fb2d9a 100644 --- a/gstreamer-video/src/video_encoder.rs +++ b/gstreamer-video/src/video_encoder.rs @@ -38,7 +38,6 @@ pub trait VideoEncoderExtManual: 'static { frame: Option, ) -> Result; - #[cfg(any(feature = "v1_18", feature = "dox"))] fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result; diff --git a/gstreamer-webrtc/src/auto/versions.txt b/gstreamer-webrtc/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs b/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs index 683c134c9..47c8041ea 100644 --- a/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs +++ b/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs @@ -3,13 +3,25 @@ // DO NOT EDIT use glib::object::ObjectType as ObjectType_; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use glib::signal::connect_raw; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use glib::signal::SignalHandlerId; use glib::translate::*; use glib::StaticType; use glib::Value; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use glib_sys; use gobject_sys; use gst_web_rtc_sys; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use std::boxed::Box as Box_; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use std::mem::transmute; use WebRTCRTPReceiver; use WebRTCRTPSender; +#[cfg(any(feature = "v1_18", feature = "dox"))] +use WebRTCRTPTransceiverDirection; glib_wrapper! { pub struct WebRTCRTPTransceiver(Object); @@ -20,6 +32,34 @@ glib_wrapper! { } impl WebRTCRTPTransceiver { + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn get_property_direction(&self) -> WebRTCRTPTransceiverDirection { + unsafe { + let mut value = + Value::from_type(::static_type()); + gobject_sys::g_object_get_property( + self.as_ptr() as *mut gobject_sys::GObject, + b"direction\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `direction` getter") + .unwrap() + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn set_property_direction(&self, direction: WebRTCRTPTransceiverDirection) { + unsafe { + gobject_sys::g_object_set_property( + self.as_ptr() as *mut gobject_sys::GObject, + b"direction\0".as_ptr() as *const _, + Value::from(&direction).to_glib_none().0, + ); + } + } + pub fn get_property_mlineindex(&self) -> u32 { unsafe { let mut value = Value::from_type(::static_type()); @@ -62,6 +102,36 @@ impl WebRTCRTPTransceiver { .expect("Return Value for property `sender` getter") } } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn connect_property_direction_notify< + F: Fn(&WebRTCRTPTransceiver) + Send + Sync + 'static, + >( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_direction_trampoline< + F: Fn(&WebRTCRTPTransceiver) + Send + Sync + 'static, + >( + this: *mut gst_web_rtc_sys::GstWebRTCRTPTransceiver, + _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::direction\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_direction_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } } unsafe impl Send for WebRTCRTPTransceiver {} diff --git a/gstreamer/src/auto/allocator.rs b/gstreamer/src/auto/allocator.rs index 71b7b499f..1c595cb62 100644 --- a/gstreamer/src/auto/allocator.rs +++ b/gstreamer/src/auto/allocator.rs @@ -40,7 +40,7 @@ pub const NONE_ALLOCATOR: Option<&Allocator> = None; pub trait AllocatorExt: 'static { //fn alloc(&self, size: usize, params: /*Ignored*/Option<&mut AllocationParams>) -> /*Ignored*/Option; - //fn free(&self, memory: /*Ignored*/&mut Memory); + //fn free(&self, memory: /*Ignored*/&Memory); fn set_default(&self); } @@ -50,7 +50,7 @@ impl> AllocatorExt for O { // unsafe { TODO: call gst_sys:gst_allocator_alloc() } //} - //fn free(&self, memory: /*Ignored*/&mut Memory) { + //fn free(&self, memory: /*Ignored*/&Memory) { // unsafe { TODO: call gst_sys:gst_allocator_free() } //} diff --git a/gstreamer/src/auto/bin.rs b/gstreamer/src/auto/bin.rs index 53ab763fa..fedfe6ab5 100644 --- a/gstreamer/src/auto/bin.rs +++ b/gstreamer/src/auto/bin.rs @@ -61,6 +61,9 @@ pub trait GstBinExt: 'static { #[cfg(any(feature = "v1_10", feature = "dox"))] fn get_suppressed_flags(&self) -> ElementFlags; + //#[cfg(any(feature = "v1_18", feature = "dox"))] + //fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> /*Ignored*/Option; + //fn iterate_all_by_interface(&self, iface: glib::types::Type) -> /*Ignored*/Option; //fn iterate_elements(&self) -> /*Ignored*/Option; @@ -187,6 +190,11 @@ impl> GstBinExt for O { } } + //#[cfg(any(feature = "v1_18", feature = "dox"))] + //fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> /*Ignored*/Option { + // unsafe { TODO: call gst_sys:gst_bin_iterate_all_by_element_factory_name() } + //} + //fn iterate_all_by_interface(&self, iface: glib::types::Type) -> /*Ignored*/Option { // unsafe { TODO: call gst_sys:gst_bin_iterate_all_by_interface() } //} diff --git a/gstreamer/src/auto/date_time.rs b/gstreamer/src/auto/date_time.rs index 2dd351b87..0503d7043 100644 --- a/gstreamer/src/auto/date_time.rs +++ b/gstreamer/src/auto/date_time.rs @@ -62,11 +62,27 @@ impl DateTime { unsafe { from_glib_full(gst_sys::gst_date_time_new_from_unix_epoch_local_time(secs)) } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn new_from_unix_epoch_local_time_usecs(usecs: i64) -> DateTime { + assert_initialized_main_thread!(); + unsafe { + from_glib_full(gst_sys::gst_date_time_new_from_unix_epoch_local_time_usecs( + usecs, + )) + } + } + pub fn new_from_unix_epoch_utc(secs: i64) -> DateTime { assert_initialized_main_thread!(); unsafe { from_glib_full(gst_sys::gst_date_time_new_from_unix_epoch_utc(secs)) } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn new_from_unix_epoch_utc_usecs(usecs: i64) -> DateTime { + assert_initialized_main_thread!(); + unsafe { from_glib_full(gst_sys::gst_date_time_new_from_unix_epoch_utc_usecs(usecs)) } + } + pub fn new_local_time( year: i32, month: i32, diff --git a/gstreamer/src/auto/enums.rs b/gstreamer/src/auto/enums.rs index e298ee0d4..cdb226768 100644 --- a/gstreamer/src/auto/enums.rs +++ b/gstreamer/src/auto/enums.rs @@ -338,6 +338,7 @@ pub enum ClockType { Realtime, Monotonic, Other, + Tai, #[doc(hidden)] __Unknown(i32), } @@ -351,6 +352,7 @@ impl ToGlib for ClockType { ClockType::Realtime => gst_sys::GST_CLOCK_TYPE_REALTIME, ClockType::Monotonic => gst_sys::GST_CLOCK_TYPE_MONOTONIC, ClockType::Other => gst_sys::GST_CLOCK_TYPE_OTHER, + ClockType::Tai => gst_sys::GST_CLOCK_TYPE_TAI, ClockType::__Unknown(value) => value, } } @@ -364,6 +366,7 @@ impl FromGlib for ClockType { 0 => ClockType::Realtime, 1 => ClockType::Monotonic, 2 => ClockType::Other, + 3 => ClockType::Tai, value => ClockType::__Unknown(value), } } @@ -624,6 +627,7 @@ pub enum EventType { Protection, SegmentDone, Gap, + InstantRateChange, Qos, Seek, Navigation, @@ -632,6 +636,7 @@ pub enum EventType { Reconfigure, TocSelect, SelectStreams, + InstantRateSyncTime, CustomUpstream, CustomDownstream, CustomDownstreamOob, @@ -664,6 +669,7 @@ impl ToGlib for EventType { EventType::Protection => gst_sys::GST_EVENT_PROTECTION, EventType::SegmentDone => gst_sys::GST_EVENT_SEGMENT_DONE, EventType::Gap => gst_sys::GST_EVENT_GAP, + EventType::InstantRateChange => gst_sys::GST_EVENT_INSTANT_RATE_CHANGE, EventType::Qos => gst_sys::GST_EVENT_QOS, EventType::Seek => gst_sys::GST_EVENT_SEEK, EventType::Navigation => gst_sys::GST_EVENT_NAVIGATION, @@ -672,6 +678,7 @@ impl ToGlib for EventType { EventType::Reconfigure => gst_sys::GST_EVENT_RECONFIGURE, EventType::TocSelect => gst_sys::GST_EVENT_TOC_SELECT, EventType::SelectStreams => gst_sys::GST_EVENT_SELECT_STREAMS, + EventType::InstantRateSyncTime => gst_sys::GST_EVENT_INSTANT_RATE_SYNC_TIME, EventType::CustomUpstream => gst_sys::GST_EVENT_CUSTOM_UPSTREAM, EventType::CustomDownstream => gst_sys::GST_EVENT_CUSTOM_DOWNSTREAM, EventType::CustomDownstreamOob => gst_sys::GST_EVENT_CUSTOM_DOWNSTREAM_OOB, @@ -704,6 +711,7 @@ impl FromGlib for EventType { 33310 => EventType::Protection, 38406 => EventType::SegmentDone, 40966 => EventType::Gap, + 46090 => EventType::InstantRateChange, 48641 => EventType::Qos, 51201 => EventType::Seek, 53761 => EventType::Navigation, @@ -712,6 +720,7 @@ impl FromGlib for EventType { 61441 => EventType::Reconfigure, 64001 => EventType::TocSelect, 66561 => EventType::SelectStreams, + 66817 => EventType::InstantRateSyncTime, 69121 => EventType::CustomUpstream, 71686 => EventType::CustomDownstream, 74242 => EventType::CustomDownstreamOob, diff --git a/gstreamer/src/auto/flags.rs b/gstreamer/src/auto/flags.rs index 936e741e9..4455af565 100644 --- a/gstreamer/src/auto/flags.rs +++ b/gstreamer/src/auto/flags.rs @@ -992,6 +992,8 @@ bitflags! { const SNAP_NEAREST = 96; const TRICKMODE_KEY_UNITS = 128; const TRICKMODE_NO_AUDIO = 256; + const TRICKMODE_FORWARD_PREDICTED = 512; + const INSTANT_RATE_CHANGE = 1024; } } @@ -1045,6 +1047,7 @@ bitflags! { const SKIP = 16; const SEGMENT = 8; const TRICKMODE_KEY_UNITS = 128; + const TRICKMODE_FORWARD_PREDICTED = 512; const TRICKMODE_NO_AUDIO = 256; } } @@ -1093,6 +1096,7 @@ impl SetValue for SegmentFlags { #[cfg(any(feature = "v1_12", feature = "dox"))] bitflags! { pub struct StackTraceFlags: u32 { + const NONE = 0; const FULL = 1; } } diff --git a/gstreamer/src/auto/functions.rs b/gstreamer/src/auto/functions.rs index 26e637d7d..d2af315df 100644 --- a/gstreamer/src/auto/functions.rs +++ b/gstreamer/src/auto/functions.rs @@ -210,6 +210,15 @@ pub fn parse_launchv(argv: &[&str]) -> Result { } } +//#[cfg(any(feature = "v1_18", feature = "dox"))] +//pub fn tracing_get_active_tracers() -> /*Ignored*/Vec { +// unsafe { TODO: call gst_sys:gst_tracing_get_active_tracers() } +//} + +//pub fn tracing_register_hook(tracer: /*Ignored*/&Tracer, detail: &str, func: P) { +// unsafe { TODO: call gst_sys:gst_tracing_register_hook() } +//} + pub fn update_registry() -> Result<(), glib::error::BoolError> { assert_initialized_main_thread!(); unsafe { diff --git a/gstreamer/src/auto/pad.rs b/gstreamer/src/auto/pad.rs index c69653ce9..6cb7f3976 100644 --- a/gstreamer/src/auto/pad.rs +++ b/gstreamer/src/auto/pad.rs @@ -103,6 +103,9 @@ pub trait PadExt: 'static { fn get_peer(&self) -> Option; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_single_internal_link(&self) -> Option; + fn get_sticky_event(&self, event_type: EventType, idx: u32) -> Option; #[cfg(any(feature = "v1_10", feature = "dox"))] @@ -325,6 +328,15 @@ impl> PadExt for O { unsafe { from_glib_full(gst_sys::gst_pad_get_peer(self.as_ref().to_glib_none().0)) } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn get_single_internal_link(&self) -> Option { + unsafe { + from_glib_full(gst_sys::gst_pad_get_single_internal_link( + self.as_ref().to_glib_none().0, + )) + } + } + fn get_sticky_event(&self, event_type: EventType, idx: u32) -> Option { unsafe { from_glib_full(gst_sys::gst_pad_get_sticky_event( diff --git a/gstreamer/src/auto/versions.txt b/gstreamer/src/auto/versions.txt index 6e53bc700..bb253028d 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 @ b3eb90b) -from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37) +Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0) +from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7) diff --git a/gstreamer/src/bus_unix.rs b/gstreamer/src/bus_unix.rs index c072d325e..966cdfbbc 100644 --- a/gstreamer/src/bus_unix.rs +++ b/gstreamer/src/bus_unix.rs @@ -31,7 +31,6 @@ pub trait UnixBusExtManual: 'static { } impl UnixBusExtManual for Bus { - /// This is supported on **Unix** only. fn get_pollfd(&self) -> unix::io::RawFd { #[cfg(unix)] unsafe { diff --git a/gstreamer/src/bus_windows.rs b/gstreamer/src/bus_windows.rs index ca2d5db9f..f8ab4de4a 100644 --- a/gstreamer/src/bus_windows.rs +++ b/gstreamer/src/bus_windows.rs @@ -31,7 +31,6 @@ pub trait WindowsBusExtManual: 'static { } impl WindowsBusExtManual for Bus { - /// This is supported on **Windows** only. fn get_pollfd(&self) -> windows::io::RawHandle { #[cfg(windows)] unsafe { diff --git a/gstreamer/src/date_time.rs b/gstreamer/src/date_time.rs index 0e6caedef..fb805b79f 100644 --- a/gstreamer/src/date_time.rs +++ b/gstreamer/src/date_time.rs @@ -13,7 +13,6 @@ use std::fmt; use DateTime; impl DateTime { - /// Get the [`DateTime`](struct.DateTime.html) in UTC pub fn to_utc(&self) -> Result { if !self.has_time() { // No time => no TZ offset @@ -67,25 +66,25 @@ impl DateTime { } impl cmp::PartialOrd for DateTime { - /// *NOTE 1:* When comparing a partially defined [`DateTime`](struct.DateTime.html) `d1` - /// such as *"2019/8/20"* with a [`DateTime`](struct.DateTime.html) with a time part `d2` - /// such as *"2019/8/20 21:10"*: - /// - /// - `d1` includes `d2`, - /// - neither `d1` < `d2` nor `d1` > `d2`, - /// - and `d1` != `d2`, - /// - /// so we can only return `None`. - /// - /// This is the reason why [`DateTime`](struct.DateTime.html) neither implements - /// [`Ord`](https://doc.rust-lang.org/nightly/std/cmp/trait.Ord.html) - /// nor [`Eq`](https://doc.rust-lang.org/nightly/std/cmp/trait.Eq.html). - /// - /// *NOTE 2:* When comparing a [`DateTime`](struct.DateTime.html) `d1` without a TZ offset - /// such as *"2019/8/20"* with a [`DateTime`](struct.DateTime.html) `d2` with a TZ offset - /// such as *"2019/8/20 21:10 +02:00"*, we can't tell in which TZ `d1` is expressed and which - /// time should be considered for an offset, therefore the two [`DateTime`s](struct.DateTime.html) - /// are compared in the same TZ. + // *NOTE 1:* When comparing a partially defined [`DateTime`](struct.DateTime.html) `d1` + // such as *"2019/8/20"* with a [`DateTime`](struct.DateTime.html) with a time part `d2` + // such as *"2019/8/20 21:10"*: + // + // - `d1` includes `d2`, + // - neither `d1` < `d2` nor `d1` > `d2`, + // - and `d1` != `d2`, + // + // so we can only return `None`. + // + // This is the reason why [`DateTime`](struct.DateTime.html) neither implements + // [`Ord`](https://doc.rust-lang.org/nightly/std/cmp/trait.Ord.html) + // nor [`Eq`](https://doc.rust-lang.org/nightly/std/cmp/trait.Eq.html). + // + // *NOTE 2:* When comparing a [`DateTime`](struct.DateTime.html) `d1` without a TZ offset + // such as *"2019/8/20"* with a [`DateTime`](struct.DateTime.html) `d2` with a TZ offset + // such as *"2019/8/20 21:10 +02:00"*, we can't tell in which TZ `d1` is expressed and which + // time should be considered for an offset, therefore the two [`DateTime`s](struct.DateTime.html) + // are compared in the same TZ. fn partial_cmp(&self, other: &Self) -> Option { #[inline] fn get_cmp(delta: i32) -> Option { @@ -187,7 +186,6 @@ impl cmp::PartialOrd for DateTime { } impl cmp::PartialEq for DateTime { - /// See the notes for the [`DateTime` `PartialOrd` trait](struct.DateTime.html#impl-PartialOrd%3CDateTime%3E) fn eq(&self, other: &Self) -> bool { self.partial_cmp(other) .map_or_else(|| false, |cmp| cmp == cmp::Ordering::Equal) diff --git a/gstreamer/src/structure.rs b/gstreamer/src/structure.rs index 3825e5676..d8bd897f9 100644 --- a/gstreamer/src/structure.rs +++ b/gstreamer/src/structure.rs @@ -28,9 +28,6 @@ use glib_sys::gpointer; use gobject_sys; use gst_sys; -/// An error returned from the [`get`](struct.StructureRef.html#method.get) -/// or [`get_some`](struct.StructureRef.html#method.get_some) functions -/// on a [`StructureRef`](struct.StructureRef.html) #[derive(Clone, Debug, Eq, PartialEq)] pub enum GetError<'name> { FieldNotFound {