diff --git a/gstreamer-allocators/src/auto/phys_memory_allocator.rs b/gstreamer-allocators/src/auto/phys_memory_allocator.rs index 6538ed863..b96352cfa 100644 --- a/gstreamer-allocators/src/auto/phys_memory_allocator.rs +++ b/gstreamer-allocators/src/auto/phys_memory_allocator.rs @@ -21,6 +21,11 @@ impl PhysMemoryAllocator { unsafe impl Send for PhysMemoryAllocator {} unsafe impl Sync for PhysMemoryAllocator {} -pub trait PhysMemoryAllocatorExt: 'static {} +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait PhysMemoryAllocatorExt: IsA + sealed::Sealed + 'static {} impl> PhysMemoryAllocatorExt for O {} diff --git a/gstreamer-allocators/src/auto/versions.txt b/gstreamer-allocators/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-allocators/src/auto/versions.txt +++ b/gstreamer-allocators/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-allocators/sys/src/auto/versions.txt b/gstreamer-allocators/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-allocators/sys/src/auto/versions.txt +++ b/gstreamer-allocators/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-allocators/sys/tests/abi.rs b/gstreamer-allocators/sys/tests/abi.rs index 46bd3c035..2c1e8193d 100644 --- a/gstreamer-allocators/sys/tests/abi.rs +++ b/gstreamer-allocators/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_allocators_sys::*; use std::env; diff --git a/gstreamer-app/src/auto/versions.txt b/gstreamer-app/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-app/src/auto/versions.txt +++ b/gstreamer-app/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-app/sys/src/auto/versions.txt b/gstreamer-app/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-app/sys/src/auto/versions.txt +++ b/gstreamer-app/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-app/sys/tests/abi.rs b/gstreamer-app/sys/tests/abi.rs index 970c865c2..677f95918 100644 --- a/gstreamer-app/sys/tests/abi.rs +++ b/gstreamer-app/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_app_sys::*; use std::env; diff --git a/gstreamer-audio/src/auto/audio_aggregator.rs b/gstreamer-audio/src/auto/audio_aggregator.rs index 8139cfd4d..62e811011 100644 --- a/gstreamer-audio/src/auto/audio_aggregator.rs +++ b/gstreamer-audio/src/auto/audio_aggregator.rs @@ -26,65 +26,38 @@ impl AudioAggregator { unsafe impl Send for AudioAggregator {} unsafe impl Sync for AudioAggregator {} -pub trait AudioAggregatorExt: 'static { - #[doc(alias = "alignment-threshold")] - fn alignment_threshold(&self) -> u64; - - #[doc(alias = "alignment-threshold")] - fn set_alignment_threshold(&self, alignment_threshold: u64); - - #[doc(alias = "discont-wait")] - fn discont_wait(&self) -> u64; - - #[doc(alias = "discont-wait")] - fn set_discont_wait(&self, discont_wait: u64); - - #[doc(alias = "output-buffer-duration")] - fn output_buffer_duration(&self) -> u64; - - #[doc(alias = "output-buffer-duration")] - fn set_output_buffer_duration(&self, output_buffer_duration: u64); - - #[doc(alias = "alignment-threshold")] - fn connect_alignment_threshold_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "discont-wait")] - fn connect_discont_wait_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "output-buffer-duration")] - fn connect_output_buffer_duration_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> AudioAggregatorExt for O { +pub trait AudioAggregatorExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "alignment-threshold")] fn alignment_threshold(&self) -> u64 { glib::ObjectExt::property(self.as_ref(), "alignment-threshold") } + #[doc(alias = "alignment-threshold")] fn set_alignment_threshold(&self, alignment_threshold: u64) { glib::ObjectExt::set_property(self.as_ref(), "alignment-threshold", alignment_threshold) } + #[doc(alias = "discont-wait")] fn discont_wait(&self) -> u64 { glib::ObjectExt::property(self.as_ref(), "discont-wait") } + #[doc(alias = "discont-wait")] fn set_discont_wait(&self, discont_wait: u64) { glib::ObjectExt::set_property(self.as_ref(), "discont-wait", discont_wait) } + #[doc(alias = "output-buffer-duration")] fn output_buffer_duration(&self) -> u64 { glib::ObjectExt::property(self.as_ref(), "output-buffer-duration") } + #[doc(alias = "output-buffer-duration")] fn set_output_buffer_duration(&self, output_buffer_duration: u64) { glib::ObjectExt::set_property( self.as_ref(), @@ -93,6 +66,7 @@ impl> AudioAggregatorExt for O { ) } + #[doc(alias = "alignment-threshold")] fn connect_alignment_threshold_notify( &self, f: F, @@ -121,6 +95,7 @@ impl> AudioAggregatorExt for O { } } + #[doc(alias = "discont-wait")] fn connect_discont_wait_notify( &self, f: F, @@ -149,6 +124,7 @@ impl> AudioAggregatorExt for O { } } + #[doc(alias = "output-buffer-duration")] fn connect_output_buffer_duration_notify( &self, f: F, @@ -177,3 +153,5 @@ impl> AudioAggregatorExt for O { } } } + +impl> AudioAggregatorExt for O {} diff --git a/gstreamer-audio/src/auto/audio_aggregator_convert_pad.rs b/gstreamer-audio/src/auto/audio_aggregator_convert_pad.rs index 490e2c762..b69de5a23 100644 --- a/gstreamer-audio/src/auto/audio_aggregator_convert_pad.rs +++ b/gstreamer-audio/src/auto/audio_aggregator_convert_pad.rs @@ -27,29 +27,25 @@ impl AudioAggregatorConvertPad { unsafe impl Send for AudioAggregatorConvertPad {} unsafe impl Sync for AudioAggregatorConvertPad {} -pub trait AudioAggregatorConvertPadExt: 'static { - //#[doc(alias = "converter-config")] - //fn converter_config(&self) -> /*Ignored*/Option; - - //#[doc(alias = "converter-config")] - //fn set_converter_config(&self, converter_config: /*Ignored*/Option<&gst::Structure>); - - #[doc(alias = "converter-config")] - fn connect_converter_config_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> AudioAggregatorConvertPadExt for O { +pub trait AudioAggregatorConvertPadExt: + IsA + sealed::Sealed + 'static +{ + //#[doc(alias = "converter-config")] //fn converter_config(&self) -> /*Ignored*/Option { // glib::ObjectExt::property(self.as_ref(), "converter-config") //} + //#[doc(alias = "converter-config")] //fn set_converter_config(&self, converter_config: /*Ignored*/Option<&gst::Structure>) { // glib::ObjectExt::set_property(self.as_ref(),"converter-config", converter_config) //} + #[doc(alias = "converter-config")] fn connect_converter_config_notify( &self, f: F, @@ -78,3 +74,5 @@ impl> AudioAggregatorConvertPadExt for O { } } } + +impl> AudioAggregatorConvertPadExt for O {} diff --git a/gstreamer-audio/src/auto/audio_aggregator_pad.rs b/gstreamer-audio/src/auto/audio_aggregator_pad.rs index f7d338748..d72fe70f9 100644 --- a/gstreamer-audio/src/auto/audio_aggregator_pad.rs +++ b/gstreamer-audio/src/auto/audio_aggregator_pad.rs @@ -30,41 +30,29 @@ impl AudioAggregatorPad { unsafe impl Send for AudioAggregatorPad {} unsafe impl Sync for AudioAggregatorPad {} -pub trait AudioAggregatorPadExt: 'static { - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "qos-messages")] - fn is_qos_messages(&self) -> bool; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "qos-messages")] - fn set_qos_messages(&self, qos_messages: bool); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "qos-messages")] - fn connect_qos_messages_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> AudioAggregatorPadExt for O { +pub trait AudioAggregatorPadExt: IsA + sealed::Sealed + 'static { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "qos-messages")] fn is_qos_messages(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "qos-messages") } #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "qos-messages")] fn set_qos_messages(&self, qos_messages: bool) { glib::ObjectExt::set_property(self.as_ref(), "qos-messages", qos_messages) } #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "qos-messages")] fn connect_qos_messages_notify( &self, f: F, @@ -93,3 +81,5 @@ impl> AudioAggregatorPadExt for O { } } } + +impl> AudioAggregatorPadExt for O {} diff --git a/gstreamer-audio/src/auto/audio_base_sink.rs b/gstreamer-audio/src/auto/audio_base_sink.rs index 366bfbb34..02248b452 100644 --- a/gstreamer-audio/src/auto/audio_base_sink.rs +++ b/gstreamer-audio/src/auto/audio_base_sink.rs @@ -26,123 +26,19 @@ impl AudioBaseSink { unsafe impl Send for AudioBaseSink {} unsafe impl Sync for AudioBaseSink {} -pub trait AudioBaseSinkExt: 'static { - //#[doc(alias = "gst_audio_base_sink_create_ringbuffer")] - //fn create_ringbuffer(&self) -> /*Ignored*/Option; - - #[doc(alias = "gst_audio_base_sink_get_alignment_threshold")] - #[doc(alias = "get_alignment_threshold")] - fn alignment_threshold(&self) -> gst::ClockTime; - - #[doc(alias = "gst_audio_base_sink_get_discont_wait")] - #[doc(alias = "get_discont_wait")] - fn discont_wait(&self) -> gst::ClockTime; - - #[doc(alias = "gst_audio_base_sink_get_drift_tolerance")] - #[doc(alias = "get_drift_tolerance")] - fn drift_tolerance(&self) -> i64; - - #[doc(alias = "gst_audio_base_sink_get_provide_clock")] - #[doc(alias = "get_provide_clock")] - fn is_provide_clock(&self) -> bool; - - //#[doc(alias = "gst_audio_base_sink_get_slave_method")] - //#[doc(alias = "get_slave_method")] - //fn slave_method(&self) -> /*Ignored*/AudioBaseSinkSlaveMethod; - - #[doc(alias = "gst_audio_base_sink_report_device_failure")] - fn report_device_failure(&self); - - #[doc(alias = "gst_audio_base_sink_set_alignment_threshold")] - fn set_alignment_threshold(&self, alignment_threshold: gst::ClockTime); - - //#[doc(alias = "gst_audio_base_sink_set_custom_slaving_callback")] - //fn set_custom_slaving_callback(&self, callback: /*Unimplemented*/Fn(&AudioBaseSink, impl Into>, impl Into>, gst::ClockTimeDiff, /*Ignored*/AudioBaseSinkDiscontReason), user_data: /*Unimplemented*/Option); - - #[doc(alias = "gst_audio_base_sink_set_discont_wait")] - fn set_discont_wait(&self, discont_wait: gst::ClockTime); - - #[doc(alias = "gst_audio_base_sink_set_drift_tolerance")] - fn set_drift_tolerance(&self, drift_tolerance: i64); - - #[doc(alias = "gst_audio_base_sink_set_provide_clock")] - fn set_provide_clock(&self, provide: bool); - - //#[doc(alias = "gst_audio_base_sink_set_slave_method")] - //fn set_slave_method(&self, method: /*Ignored*/AudioBaseSinkSlaveMethod); - - #[doc(alias = "buffer-time")] - fn buffer_time(&self) -> i64; - - #[doc(alias = "buffer-time")] - fn set_buffer_time(&self, buffer_time: i64); - - #[doc(alias = "can-activate-pull")] - fn can_activate_pull(&self) -> bool; - - #[doc(alias = "can-activate-pull")] - fn set_can_activate_pull(&self, can_activate_pull: bool); - - #[doc(alias = "latency-time")] - fn latency_time(&self) -> i64; - - #[doc(alias = "latency-time")] - fn set_latency_time(&self, latency_time: i64); - - #[doc(alias = "alignment-threshold")] - fn connect_alignment_threshold_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "buffer-time")] - fn connect_buffer_time_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "can-activate-pull")] - fn connect_can_activate_pull_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "discont-wait")] - fn connect_discont_wait_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "drift-tolerance")] - fn connect_drift_tolerance_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "latency-time")] - fn connect_latency_time_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "provide-clock")] - fn connect_provide_clock_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "slave-method")] - fn connect_slave_method_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> AudioBaseSinkExt for O { +pub trait AudioBaseSinkExt: IsA + sealed::Sealed + 'static { + //#[doc(alias = "gst_audio_base_sink_create_ringbuffer")] //fn create_ringbuffer(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi:gst_audio_base_sink_create_ringbuffer() } //} + #[doc(alias = "gst_audio_base_sink_get_alignment_threshold")] + #[doc(alias = "get_alignment_threshold")] fn alignment_threshold(&self) -> gst::ClockTime { unsafe { try_from_glib(ffi::gst_audio_base_sink_get_alignment_threshold( @@ -152,6 +48,8 @@ impl> AudioBaseSinkExt for O { } } + #[doc(alias = "gst_audio_base_sink_get_discont_wait")] + #[doc(alias = "get_discont_wait")] fn discont_wait(&self) -> gst::ClockTime { unsafe { try_from_glib(ffi::gst_audio_base_sink_get_discont_wait( @@ -161,10 +59,14 @@ impl> AudioBaseSinkExt for O { } } + #[doc(alias = "gst_audio_base_sink_get_drift_tolerance")] + #[doc(alias = "get_drift_tolerance")] fn drift_tolerance(&self) -> i64 { unsafe { ffi::gst_audio_base_sink_get_drift_tolerance(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_audio_base_sink_get_provide_clock")] + #[doc(alias = "get_provide_clock")] fn is_provide_clock(&self) -> bool { unsafe { from_glib(ffi::gst_audio_base_sink_get_provide_clock( @@ -173,16 +75,20 @@ impl> AudioBaseSinkExt for O { } } + //#[doc(alias = "gst_audio_base_sink_get_slave_method")] + //#[doc(alias = "get_slave_method")] //fn slave_method(&self) -> /*Ignored*/AudioBaseSinkSlaveMethod { // unsafe { TODO: call ffi:gst_audio_base_sink_get_slave_method() } //} + #[doc(alias = "gst_audio_base_sink_report_device_failure")] fn report_device_failure(&self) { unsafe { ffi::gst_audio_base_sink_report_device_failure(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_audio_base_sink_set_alignment_threshold")] fn set_alignment_threshold(&self, alignment_threshold: gst::ClockTime) { unsafe { ffi::gst_audio_base_sink_set_alignment_threshold( @@ -192,10 +98,12 @@ impl> AudioBaseSinkExt for O { } } + //#[doc(alias = "gst_audio_base_sink_set_custom_slaving_callback")] //fn set_custom_slaving_callback(&self, callback: /*Unimplemented*/Fn(&AudioBaseSink, impl Into>, impl Into>, gst::ClockTimeDiff, /*Ignored*/AudioBaseSinkDiscontReason), user_data: /*Unimplemented*/Option) { // unsafe { TODO: call ffi:gst_audio_base_sink_set_custom_slaving_callback() } //} + #[doc(alias = "gst_audio_base_sink_set_discont_wait")] fn set_discont_wait(&self, discont_wait: gst::ClockTime) { unsafe { ffi::gst_audio_base_sink_set_discont_wait( @@ -205,6 +113,7 @@ impl> AudioBaseSinkExt for O { } } + #[doc(alias = "gst_audio_base_sink_set_drift_tolerance")] fn set_drift_tolerance(&self, drift_tolerance: i64) { unsafe { ffi::gst_audio_base_sink_set_drift_tolerance( @@ -214,6 +123,7 @@ impl> AudioBaseSinkExt for O { } } + #[doc(alias = "gst_audio_base_sink_set_provide_clock")] fn set_provide_clock(&self, provide: bool) { unsafe { ffi::gst_audio_base_sink_set_provide_clock( @@ -223,34 +133,42 @@ impl> AudioBaseSinkExt for O { } } + //#[doc(alias = "gst_audio_base_sink_set_slave_method")] //fn set_slave_method(&self, method: /*Ignored*/AudioBaseSinkSlaveMethod) { // unsafe { TODO: call ffi:gst_audio_base_sink_set_slave_method() } //} + #[doc(alias = "buffer-time")] fn buffer_time(&self) -> i64 { glib::ObjectExt::property(self.as_ref(), "buffer-time") } + #[doc(alias = "buffer-time")] fn set_buffer_time(&self, buffer_time: i64) { glib::ObjectExt::set_property(self.as_ref(), "buffer-time", buffer_time) } + #[doc(alias = "can-activate-pull")] fn can_activate_pull(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "can-activate-pull") } + #[doc(alias = "can-activate-pull")] fn set_can_activate_pull(&self, can_activate_pull: bool) { glib::ObjectExt::set_property(self.as_ref(), "can-activate-pull", can_activate_pull) } + #[doc(alias = "latency-time")] fn latency_time(&self) -> i64 { glib::ObjectExt::property(self.as_ref(), "latency-time") } + #[doc(alias = "latency-time")] fn set_latency_time(&self, latency_time: i64) { glib::ObjectExt::set_property(self.as_ref(), "latency-time", latency_time) } + #[doc(alias = "alignment-threshold")] fn connect_alignment_threshold_notify( &self, f: F, @@ -279,6 +197,7 @@ impl> AudioBaseSinkExt for O { } } + #[doc(alias = "buffer-time")] fn connect_buffer_time_notify( &self, f: F, @@ -307,6 +226,7 @@ impl> AudioBaseSinkExt for O { } } + #[doc(alias = "can-activate-pull")] fn connect_can_activate_pull_notify( &self, f: F, @@ -335,6 +255,7 @@ impl> AudioBaseSinkExt for O { } } + #[doc(alias = "discont-wait")] fn connect_discont_wait_notify( &self, f: F, @@ -363,6 +284,7 @@ impl> AudioBaseSinkExt for O { } } + #[doc(alias = "drift-tolerance")] fn connect_drift_tolerance_notify( &self, f: F, @@ -391,6 +313,7 @@ impl> AudioBaseSinkExt for O { } } + #[doc(alias = "latency-time")] fn connect_latency_time_notify( &self, f: F, @@ -419,6 +342,7 @@ impl> AudioBaseSinkExt for O { } } + #[doc(alias = "provide-clock")] fn connect_provide_clock_notify( &self, f: F, @@ -447,6 +371,7 @@ impl> AudioBaseSinkExt for O { } } + #[doc(alias = "slave-method")] fn connect_slave_method_notify( &self, f: F, @@ -475,3 +400,5 @@ impl> AudioBaseSinkExt for O { } } } + +impl> AudioBaseSinkExt for O {} diff --git a/gstreamer-audio/src/auto/audio_base_src.rs b/gstreamer-audio/src/auto/audio_base_src.rs index a8865f5fb..fba60797c 100644 --- a/gstreamer-audio/src/auto/audio_base_src.rs +++ b/gstreamer-audio/src/auto/audio_base_src.rs @@ -26,84 +26,19 @@ impl AudioBaseSrc { unsafe impl Send for AudioBaseSrc {} unsafe impl Sync for AudioBaseSrc {} -pub trait AudioBaseSrcExt: 'static { - //#[doc(alias = "gst_audio_base_src_create_ringbuffer")] - //fn create_ringbuffer(&self) -> /*Ignored*/Option; - - #[doc(alias = "gst_audio_base_src_get_provide_clock")] - #[doc(alias = "get_provide_clock")] - fn is_provide_clock(&self) -> bool; - - //#[doc(alias = "gst_audio_base_src_get_slave_method")] - //#[doc(alias = "get_slave_method")] - //fn slave_method(&self) -> /*Ignored*/AudioBaseSrcSlaveMethod; - - #[doc(alias = "gst_audio_base_src_set_provide_clock")] - fn set_provide_clock(&self, provide: bool); - - //#[doc(alias = "gst_audio_base_src_set_slave_method")] - //fn set_slave_method(&self, method: /*Ignored*/AudioBaseSrcSlaveMethod); - - #[doc(alias = "actual-buffer-time")] - fn actual_buffer_time(&self) -> i64; - - #[doc(alias = "actual-latency-time")] - fn actual_latency_time(&self) -> i64; - - #[doc(alias = "buffer-time")] - fn buffer_time(&self) -> i64; - - #[doc(alias = "buffer-time")] - fn set_buffer_time(&self, buffer_time: i64); - - #[doc(alias = "latency-time")] - fn latency_time(&self) -> i64; - - #[doc(alias = "latency-time")] - fn set_latency_time(&self, latency_time: i64); - - #[doc(alias = "actual-buffer-time")] - fn connect_actual_buffer_time_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "actual-latency-time")] - fn connect_actual_latency_time_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "buffer-time")] - fn connect_buffer_time_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "latency-time")] - fn connect_latency_time_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "provide-clock")] - fn connect_provide_clock_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "slave-method")] - fn connect_slave_method_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> AudioBaseSrcExt for O { +pub trait AudioBaseSrcExt: IsA + sealed::Sealed + 'static { + //#[doc(alias = "gst_audio_base_src_create_ringbuffer")] //fn create_ringbuffer(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi:gst_audio_base_src_create_ringbuffer() } //} + #[doc(alias = "gst_audio_base_src_get_provide_clock")] + #[doc(alias = "get_provide_clock")] fn is_provide_clock(&self) -> bool { unsafe { from_glib(ffi::gst_audio_base_src_get_provide_clock( @@ -112,10 +47,13 @@ impl> AudioBaseSrcExt for O { } } + //#[doc(alias = "gst_audio_base_src_get_slave_method")] + //#[doc(alias = "get_slave_method")] //fn slave_method(&self) -> /*Ignored*/AudioBaseSrcSlaveMethod { // unsafe { TODO: call ffi:gst_audio_base_src_get_slave_method() } //} + #[doc(alias = "gst_audio_base_src_set_provide_clock")] fn set_provide_clock(&self, provide: bool) { unsafe { ffi::gst_audio_base_src_set_provide_clock( @@ -125,34 +63,42 @@ impl> AudioBaseSrcExt for O { } } + //#[doc(alias = "gst_audio_base_src_set_slave_method")] //fn set_slave_method(&self, method: /*Ignored*/AudioBaseSrcSlaveMethod) { // unsafe { TODO: call ffi:gst_audio_base_src_set_slave_method() } //} + #[doc(alias = "actual-buffer-time")] fn actual_buffer_time(&self) -> i64 { glib::ObjectExt::property(self.as_ref(), "actual-buffer-time") } + #[doc(alias = "actual-latency-time")] fn actual_latency_time(&self) -> i64 { glib::ObjectExt::property(self.as_ref(), "actual-latency-time") } + #[doc(alias = "buffer-time")] fn buffer_time(&self) -> i64 { glib::ObjectExt::property(self.as_ref(), "buffer-time") } + #[doc(alias = "buffer-time")] fn set_buffer_time(&self, buffer_time: i64) { glib::ObjectExt::set_property(self.as_ref(), "buffer-time", buffer_time) } + #[doc(alias = "latency-time")] fn latency_time(&self) -> i64 { glib::ObjectExt::property(self.as_ref(), "latency-time") } + #[doc(alias = "latency-time")] fn set_latency_time(&self, latency_time: i64) { glib::ObjectExt::set_property(self.as_ref(), "latency-time", latency_time) } + #[doc(alias = "actual-buffer-time")] fn connect_actual_buffer_time_notify( &self, f: F, @@ -181,6 +127,7 @@ impl> AudioBaseSrcExt for O { } } + #[doc(alias = "actual-latency-time")] fn connect_actual_latency_time_notify( &self, f: F, @@ -209,6 +156,7 @@ impl> AudioBaseSrcExt for O { } } + #[doc(alias = "buffer-time")] fn connect_buffer_time_notify( &self, f: F, @@ -237,6 +185,7 @@ impl> AudioBaseSrcExt for O { } } + #[doc(alias = "latency-time")] fn connect_latency_time_notify( &self, f: F, @@ -265,6 +214,7 @@ impl> AudioBaseSrcExt for O { } } + #[doc(alias = "provide-clock")] fn connect_provide_clock_notify( &self, f: F, @@ -293,6 +243,7 @@ impl> AudioBaseSrcExt for O { } } + #[doc(alias = "slave-method")] fn connect_slave_method_notify( &self, f: F, @@ -321,3 +272,5 @@ impl> AudioBaseSrcExt for O { } } } + +impl> AudioBaseSrcExt for O {} diff --git a/gstreamer-audio/src/auto/audio_decoder.rs b/gstreamer-audio/src/auto/audio_decoder.rs index 5488ff9bd..ba223391d 100644 --- a/gstreamer-audio/src/auto/audio_decoder.rs +++ b/gstreamer-audio/src/auto/audio_decoder.rs @@ -27,135 +27,13 @@ impl AudioDecoder { unsafe impl Send for AudioDecoder {} unsafe impl Sync for AudioDecoder {} -pub trait AudioDecoderExt: 'static { - #[doc(alias = "gst_audio_decoder_allocate_output_buffer")] - fn allocate_output_buffer(&self, size: usize) -> gst::Buffer; - - #[doc(alias = "gst_audio_decoder_finish_frame")] - fn finish_frame( - &self, - buf: Option, - frames: i32, - ) -> Result; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_audio_decoder_finish_subframe")] - fn finish_subframe(&self, buf: Option) - -> Result; - - #[doc(alias = "gst_audio_decoder_get_audio_info")] - #[doc(alias = "get_audio_info")] - fn audio_info(&self) -> AudioInfo; - - #[doc(alias = "gst_audio_decoder_get_delay")] - #[doc(alias = "get_delay")] - fn delay(&self) -> i32; - - #[doc(alias = "gst_audio_decoder_get_drainable")] - #[doc(alias = "get_drainable")] - fn is_drainable(&self) -> bool; - - #[doc(alias = "gst_audio_decoder_get_estimate_rate")] - #[doc(alias = "get_estimate_rate")] - fn estimate_rate(&self) -> i32; - - #[doc(alias = "gst_audio_decoder_get_latency")] - #[doc(alias = "get_latency")] - fn latency(&self) -> (gst::ClockTime, Option); - - #[doc(alias = "gst_audio_decoder_get_max_errors")] - #[doc(alias = "get_max_errors")] - fn max_errors(&self) -> i32; - - #[doc(alias = "gst_audio_decoder_get_min_latency")] - #[doc(alias = "get_min_latency")] - fn min_latency(&self) -> gst::ClockTime; - - #[doc(alias = "gst_audio_decoder_get_needs_format")] - #[doc(alias = "get_needs_format")] - fn needs_format(&self) -> bool; - - #[doc(alias = "gst_audio_decoder_get_parse_state")] - #[doc(alias = "get_parse_state")] - fn parse_state(&self) -> (bool, bool); - - #[doc(alias = "gst_audio_decoder_get_plc")] - #[doc(alias = "get_plc")] - fn is_plc(&self) -> bool; - - #[doc(alias = "gst_audio_decoder_get_plc_aware")] - #[doc(alias = "get_plc_aware")] - fn plc_aware(&self) -> i32; - - #[doc(alias = "gst_audio_decoder_get_tolerance")] - #[doc(alias = "get_tolerance")] - fn tolerance(&self) -> gst::ClockTime; - - #[doc(alias = "gst_audio_decoder_merge_tags")] - fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode); - - #[doc(alias = "gst_audio_decoder_proxy_getcaps")] - fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps; - - #[doc(alias = "gst_audio_decoder_set_allocation_caps")] - fn set_allocation_caps(&self, allocation_caps: Option<&gst::Caps>); - - #[doc(alias = "gst_audio_decoder_set_drainable")] - fn set_drainable(&self, enabled: bool); - - #[doc(alias = "gst_audio_decoder_set_estimate_rate")] - fn set_estimate_rate(&self, enabled: bool); - - #[doc(alias = "gst_audio_decoder_set_latency")] - fn set_latency(&self, min: gst::ClockTime, max: impl Into>); - - #[doc(alias = "gst_audio_decoder_set_max_errors")] - fn set_max_errors(&self, num: i32); - - #[doc(alias = "gst_audio_decoder_set_min_latency")] - fn set_min_latency(&self, num: gst::ClockTime); - - #[doc(alias = "gst_audio_decoder_set_needs_format")] - fn set_needs_format(&self, enabled: bool); - - #[doc(alias = "gst_audio_decoder_set_plc")] - fn set_plc(&self, enabled: bool); - - #[doc(alias = "gst_audio_decoder_set_plc_aware")] - fn set_plc_aware(&self, plc: bool); - - #[doc(alias = "gst_audio_decoder_set_tolerance")] - fn set_tolerance(&self, tolerance: gst::ClockTime); - - #[doc(alias = "gst_audio_decoder_set_use_default_pad_acceptcaps")] - fn set_use_default_pad_acceptcaps(&self, use_: bool); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "max-errors")] - fn connect_max_errors_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "min-latency")] - fn connect_min_latency_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "plc")] - fn connect_plc_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "tolerance")] - fn connect_tolerance_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> AudioDecoderExt for O { +pub trait AudioDecoderExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_audio_decoder_allocate_output_buffer")] fn allocate_output_buffer(&self, size: usize) -> gst::Buffer { unsafe { from_glib_full(ffi::gst_audio_decoder_allocate_output_buffer( @@ -165,6 +43,7 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_finish_frame")] fn finish_frame( &self, buf: Option, @@ -181,6 +60,7 @@ impl> AudioDecoderExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_audio_decoder_finish_subframe")] fn finish_subframe( &self, buf: Option, @@ -193,6 +73,8 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_get_audio_info")] + #[doc(alias = "get_audio_info")] fn audio_info(&self) -> AudioInfo { unsafe { from_glib_none(ffi::gst_audio_decoder_get_audio_info( @@ -201,10 +83,14 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_get_delay")] + #[doc(alias = "get_delay")] fn delay(&self) -> i32 { unsafe { ffi::gst_audio_decoder_get_delay(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_audio_decoder_get_drainable")] + #[doc(alias = "get_drainable")] fn is_drainable(&self) -> bool { unsafe { from_glib(ffi::gst_audio_decoder_get_drainable( @@ -213,10 +99,14 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_get_estimate_rate")] + #[doc(alias = "get_estimate_rate")] fn estimate_rate(&self) -> i32 { unsafe { ffi::gst_audio_decoder_get_estimate_rate(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_audio_decoder_get_latency")] + #[doc(alias = "get_latency")] fn latency(&self) -> (gst::ClockTime, Option) { unsafe { let mut min = mem::MaybeUninit::uninit(); @@ -233,10 +123,14 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_get_max_errors")] + #[doc(alias = "get_max_errors")] fn max_errors(&self) -> i32 { unsafe { ffi::gst_audio_decoder_get_max_errors(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_audio_decoder_get_min_latency")] + #[doc(alias = "get_min_latency")] fn min_latency(&self) -> gst::ClockTime { unsafe { try_from_glib(ffi::gst_audio_decoder_get_min_latency( @@ -246,6 +140,8 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_get_needs_format")] + #[doc(alias = "get_needs_format")] fn needs_format(&self) -> bool { unsafe { from_glib(ffi::gst_audio_decoder_get_needs_format( @@ -254,6 +150,8 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_get_parse_state")] + #[doc(alias = "get_parse_state")] fn parse_state(&self) -> (bool, bool) { unsafe { let mut sync = mem::MaybeUninit::uninit(); @@ -267,6 +165,8 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_get_plc")] + #[doc(alias = "get_plc")] fn is_plc(&self) -> bool { unsafe { from_glib(ffi::gst_audio_decoder_get_plc( @@ -275,10 +175,14 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_get_plc_aware")] + #[doc(alias = "get_plc_aware")] fn plc_aware(&self) -> i32 { unsafe { ffi::gst_audio_decoder_get_plc_aware(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_audio_decoder_get_tolerance")] + #[doc(alias = "get_tolerance")] fn tolerance(&self) -> gst::ClockTime { unsafe { try_from_glib(ffi::gst_audio_decoder_get_tolerance( @@ -288,6 +192,7 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_merge_tags")] fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode) { unsafe { ffi::gst_audio_decoder_merge_tags( @@ -298,6 +203,7 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_proxy_getcaps")] fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps { unsafe { from_glib_full(ffi::gst_audio_decoder_proxy_getcaps( @@ -308,6 +214,7 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_set_allocation_caps")] fn set_allocation_caps(&self, allocation_caps: Option<&gst::Caps>) { unsafe { ffi::gst_audio_decoder_set_allocation_caps( @@ -317,6 +224,7 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_set_drainable")] fn set_drainable(&self, enabled: bool) { unsafe { ffi::gst_audio_decoder_set_drainable( @@ -326,6 +234,7 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_set_estimate_rate")] fn set_estimate_rate(&self, enabled: bool) { unsafe { ffi::gst_audio_decoder_set_estimate_rate( @@ -335,6 +244,7 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_set_latency")] fn set_latency(&self, min: gst::ClockTime, max: impl Into>) { unsafe { ffi::gst_audio_decoder_set_latency( @@ -345,18 +255,21 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_set_max_errors")] fn set_max_errors(&self, num: i32) { unsafe { ffi::gst_audio_decoder_set_max_errors(self.as_ref().to_glib_none().0, num); } } + #[doc(alias = "gst_audio_decoder_set_min_latency")] fn set_min_latency(&self, num: gst::ClockTime) { unsafe { ffi::gst_audio_decoder_set_min_latency(self.as_ref().to_glib_none().0, num.into_glib()); } } + #[doc(alias = "gst_audio_decoder_set_needs_format")] fn set_needs_format(&self, enabled: bool) { unsafe { ffi::gst_audio_decoder_set_needs_format( @@ -366,18 +279,21 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_set_plc")] fn set_plc(&self, enabled: bool) { unsafe { ffi::gst_audio_decoder_set_plc(self.as_ref().to_glib_none().0, enabled.into_glib()); } } + #[doc(alias = "gst_audio_decoder_set_plc_aware")] fn set_plc_aware(&self, plc: bool) { unsafe { ffi::gst_audio_decoder_set_plc_aware(self.as_ref().to_glib_none().0, plc.into_glib()); } } + #[doc(alias = "gst_audio_decoder_set_tolerance")] fn set_tolerance(&self, tolerance: gst::ClockTime) { unsafe { ffi::gst_audio_decoder_set_tolerance( @@ -387,6 +303,7 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "gst_audio_decoder_set_use_default_pad_acceptcaps")] fn set_use_default_pad_acceptcaps(&self, use_: bool) { unsafe { ffi::gst_audio_decoder_set_use_default_pad_acceptcaps( @@ -398,6 +315,7 @@ impl> AudioDecoderExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "max-errors")] fn connect_max_errors_notify( &self, f: F, @@ -426,6 +344,7 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "min-latency")] fn connect_min_latency_notify( &self, f: F, @@ -454,6 +373,7 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "plc")] fn connect_plc_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_plc_trampoline< P: IsA, @@ -479,6 +399,7 @@ impl> AudioDecoderExt for O { } } + #[doc(alias = "tolerance")] fn connect_tolerance_notify( &self, f: F, @@ -507,3 +428,5 @@ impl> AudioDecoderExt for O { } } } + +impl> AudioDecoderExt for O {} diff --git a/gstreamer-audio/src/auto/audio_encoder.rs b/gstreamer-audio/src/auto/audio_encoder.rs index cbb9887dc..49071a326 100644 --- a/gstreamer-audio/src/auto/audio_encoder.rs +++ b/gstreamer-audio/src/auto/audio_encoder.rs @@ -27,133 +27,13 @@ impl AudioEncoder { unsafe impl Send for AudioEncoder {} unsafe impl Sync for AudioEncoder {} -pub trait AudioEncoderExt: 'static { - #[doc(alias = "gst_audio_encoder_allocate_output_buffer")] - fn allocate_output_buffer(&self, size: usize) -> gst::Buffer; - - #[doc(alias = "gst_audio_encoder_finish_frame")] - fn finish_frame( - &self, - buffer: Option, - samples: i32, - ) -> Result; - - #[doc(alias = "gst_audio_encoder_get_audio_info")] - #[doc(alias = "get_audio_info")] - fn audio_info(&self) -> AudioInfo; - - #[doc(alias = "gst_audio_encoder_get_drainable")] - #[doc(alias = "get_drainable")] - fn is_drainable(&self) -> bool; - - #[doc(alias = "gst_audio_encoder_get_frame_max")] - #[doc(alias = "get_frame_max")] - fn frame_max(&self) -> i32; - - #[doc(alias = "gst_audio_encoder_get_frame_samples_max")] - #[doc(alias = "get_frame_samples_max")] - fn frame_samples_max(&self) -> i32; - - #[doc(alias = "gst_audio_encoder_get_frame_samples_min")] - #[doc(alias = "get_frame_samples_min")] - fn frame_samples_min(&self) -> i32; - - #[doc(alias = "gst_audio_encoder_get_hard_min")] - #[doc(alias = "get_hard_min")] - fn is_hard_min(&self) -> bool; - - #[doc(alias = "gst_audio_encoder_get_hard_resync")] - #[doc(alias = "get_hard_resync")] - fn is_hard_resync(&self) -> bool; - - #[doc(alias = "gst_audio_encoder_get_latency")] - #[doc(alias = "get_latency")] - fn latency(&self) -> (gst::ClockTime, Option); - - #[doc(alias = "gst_audio_encoder_get_lookahead")] - #[doc(alias = "get_lookahead")] - fn lookahead(&self) -> i32; - - #[doc(alias = "gst_audio_encoder_get_mark_granule")] - #[doc(alias = "get_mark_granule")] - fn is_mark_granule(&self) -> bool; - - #[doc(alias = "gst_audio_encoder_get_perfect_timestamp")] - #[doc(alias = "get_perfect_timestamp")] - fn is_perfect_timestamp(&self) -> bool; - - #[doc(alias = "gst_audio_encoder_get_tolerance")] - #[doc(alias = "get_tolerance")] - fn tolerance(&self) -> gst::ClockTime; - - #[doc(alias = "gst_audio_encoder_merge_tags")] - fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode); - - #[doc(alias = "gst_audio_encoder_proxy_getcaps")] - fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps; - - #[doc(alias = "gst_audio_encoder_set_allocation_caps")] - fn set_allocation_caps(&self, allocation_caps: Option<&gst::Caps>); - - #[doc(alias = "gst_audio_encoder_set_drainable")] - fn set_drainable(&self, enabled: bool); - - #[doc(alias = "gst_audio_encoder_set_frame_max")] - fn set_frame_max(&self, num: i32); - - #[doc(alias = "gst_audio_encoder_set_frame_samples_max")] - fn set_frame_samples_max(&self, num: i32); - - #[doc(alias = "gst_audio_encoder_set_frame_samples_min")] - fn set_frame_samples_min(&self, num: i32); - - #[doc(alias = "gst_audio_encoder_set_hard_min")] - fn set_hard_min(&self, enabled: bool); - - #[doc(alias = "gst_audio_encoder_set_hard_resync")] - fn set_hard_resync(&self, enabled: bool); - - #[doc(alias = "gst_audio_encoder_set_latency")] - fn set_latency(&self, min: gst::ClockTime, max: impl Into>); - - #[doc(alias = "gst_audio_encoder_set_lookahead")] - fn set_lookahead(&self, num: i32); - - #[doc(alias = "gst_audio_encoder_set_mark_granule")] - fn set_mark_granule(&self, enabled: bool); - - #[doc(alias = "gst_audio_encoder_set_perfect_timestamp")] - fn set_perfect_timestamp(&self, enabled: bool); - - #[doc(alias = "gst_audio_encoder_set_tolerance")] - fn set_tolerance(&self, tolerance: gst::ClockTime); - - #[doc(alias = "hard-resync")] - fn connect_hard_resync_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "mark-granule")] - fn connect_mark_granule_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "perfect-timestamp")] - fn connect_perfect_timestamp_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "tolerance")] - fn connect_tolerance_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> AudioEncoderExt for O { +pub trait AudioEncoderExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_audio_encoder_allocate_output_buffer")] fn allocate_output_buffer(&self, size: usize) -> gst::Buffer { unsafe { from_glib_full(ffi::gst_audio_encoder_allocate_output_buffer( @@ -163,6 +43,7 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_finish_frame")] fn finish_frame( &self, buffer: Option, @@ -177,6 +58,8 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_get_audio_info")] + #[doc(alias = "get_audio_info")] fn audio_info(&self) -> AudioInfo { unsafe { from_glib_none(ffi::gst_audio_encoder_get_audio_info( @@ -185,6 +68,8 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_get_drainable")] + #[doc(alias = "get_drainable")] fn is_drainable(&self) -> bool { unsafe { from_glib(ffi::gst_audio_encoder_get_drainable( @@ -193,18 +78,26 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_get_frame_max")] + #[doc(alias = "get_frame_max")] fn frame_max(&self) -> i32 { unsafe { ffi::gst_audio_encoder_get_frame_max(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_audio_encoder_get_frame_samples_max")] + #[doc(alias = "get_frame_samples_max")] fn frame_samples_max(&self) -> i32 { unsafe { ffi::gst_audio_encoder_get_frame_samples_max(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_audio_encoder_get_frame_samples_min")] + #[doc(alias = "get_frame_samples_min")] fn frame_samples_min(&self) -> i32 { unsafe { ffi::gst_audio_encoder_get_frame_samples_min(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_audio_encoder_get_hard_min")] + #[doc(alias = "get_hard_min")] fn is_hard_min(&self) -> bool { unsafe { from_glib(ffi::gst_audio_encoder_get_hard_min( @@ -213,6 +106,8 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_get_hard_resync")] + #[doc(alias = "get_hard_resync")] fn is_hard_resync(&self) -> bool { unsafe { from_glib(ffi::gst_audio_encoder_get_hard_resync( @@ -221,6 +116,8 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_get_latency")] + #[doc(alias = "get_latency")] fn latency(&self) -> (gst::ClockTime, Option) { unsafe { let mut min = mem::MaybeUninit::uninit(); @@ -237,10 +134,14 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_get_lookahead")] + #[doc(alias = "get_lookahead")] fn lookahead(&self) -> i32 { unsafe { ffi::gst_audio_encoder_get_lookahead(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_audio_encoder_get_mark_granule")] + #[doc(alias = "get_mark_granule")] fn is_mark_granule(&self) -> bool { unsafe { from_glib(ffi::gst_audio_encoder_get_mark_granule( @@ -249,6 +150,8 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_get_perfect_timestamp")] + #[doc(alias = "get_perfect_timestamp")] fn is_perfect_timestamp(&self) -> bool { unsafe { from_glib(ffi::gst_audio_encoder_get_perfect_timestamp( @@ -257,6 +160,8 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_get_tolerance")] + #[doc(alias = "get_tolerance")] fn tolerance(&self) -> gst::ClockTime { unsafe { try_from_glib(ffi::gst_audio_encoder_get_tolerance( @@ -266,6 +171,7 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_merge_tags")] fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode) { unsafe { ffi::gst_audio_encoder_merge_tags( @@ -276,6 +182,7 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_proxy_getcaps")] fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps { unsafe { from_glib_full(ffi::gst_audio_encoder_proxy_getcaps( @@ -286,6 +193,7 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_set_allocation_caps")] fn set_allocation_caps(&self, allocation_caps: Option<&gst::Caps>) { unsafe { ffi::gst_audio_encoder_set_allocation_caps( @@ -295,6 +203,7 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_set_drainable")] fn set_drainable(&self, enabled: bool) { unsafe { ffi::gst_audio_encoder_set_drainable( @@ -304,24 +213,28 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_set_frame_max")] fn set_frame_max(&self, num: i32) { unsafe { ffi::gst_audio_encoder_set_frame_max(self.as_ref().to_glib_none().0, num); } } + #[doc(alias = "gst_audio_encoder_set_frame_samples_max")] fn set_frame_samples_max(&self, num: i32) { unsafe { ffi::gst_audio_encoder_set_frame_samples_max(self.as_ref().to_glib_none().0, num); } } + #[doc(alias = "gst_audio_encoder_set_frame_samples_min")] fn set_frame_samples_min(&self, num: i32) { unsafe { ffi::gst_audio_encoder_set_frame_samples_min(self.as_ref().to_glib_none().0, num); } } + #[doc(alias = "gst_audio_encoder_set_hard_min")] fn set_hard_min(&self, enabled: bool) { unsafe { ffi::gst_audio_encoder_set_hard_min( @@ -331,6 +244,7 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_set_hard_resync")] fn set_hard_resync(&self, enabled: bool) { unsafe { ffi::gst_audio_encoder_set_hard_resync( @@ -340,6 +254,7 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_set_latency")] fn set_latency(&self, min: gst::ClockTime, max: impl Into>) { unsafe { ffi::gst_audio_encoder_set_latency( @@ -350,12 +265,14 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_set_lookahead")] fn set_lookahead(&self, num: i32) { unsafe { ffi::gst_audio_encoder_set_lookahead(self.as_ref().to_glib_none().0, num); } } + #[doc(alias = "gst_audio_encoder_set_mark_granule")] fn set_mark_granule(&self, enabled: bool) { unsafe { ffi::gst_audio_encoder_set_mark_granule( @@ -365,6 +282,7 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_set_perfect_timestamp")] fn set_perfect_timestamp(&self, enabled: bool) { unsafe { ffi::gst_audio_encoder_set_perfect_timestamp( @@ -374,6 +292,7 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "gst_audio_encoder_set_tolerance")] fn set_tolerance(&self, tolerance: gst::ClockTime) { unsafe { ffi::gst_audio_encoder_set_tolerance( @@ -383,6 +302,7 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "hard-resync")] fn connect_hard_resync_notify( &self, f: F, @@ -411,6 +331,7 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "mark-granule")] fn connect_mark_granule_notify( &self, f: F, @@ -439,6 +360,7 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "perfect-timestamp")] fn connect_perfect_timestamp_notify( &self, f: F, @@ -467,6 +389,7 @@ impl> AudioEncoderExt for O { } } + #[doc(alias = "tolerance")] fn connect_tolerance_notify( &self, f: F, @@ -495,3 +418,5 @@ impl> AudioEncoderExt for O { } } } + +impl> AudioEncoderExt for O {} diff --git a/gstreamer-audio/src/auto/stream_volume.rs b/gstreamer-audio/src/auto/stream_volume.rs index 9f5903617..ae90abbc4 100644 --- a/gstreamer-audio/src/auto/stream_volume.rs +++ b/gstreamer-audio/src/auto/stream_volume.rs @@ -33,29 +33,14 @@ impl StreamVolume { unsafe impl Send for StreamVolume {} unsafe impl Sync for StreamVolume {} -pub trait StreamVolumeExt: 'static { - #[doc(alias = "gst_stream_volume_get_mute")] - #[doc(alias = "get_mute")] - fn is_muted(&self) -> bool; - - #[doc(alias = "gst_stream_volume_get_volume")] - #[doc(alias = "get_volume")] - fn volume(&self, format: StreamVolumeFormat) -> f64; - - #[doc(alias = "gst_stream_volume_set_mute")] - fn set_mute(&self, mute: bool); - - #[doc(alias = "gst_stream_volume_set_volume")] - fn set_volume(&self, format: StreamVolumeFormat, val: f64); - - #[doc(alias = "mute")] - fn connect_mute_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "volume")] - fn connect_volume_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> StreamVolumeExt for O { +pub trait StreamVolumeExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_stream_volume_get_mute")] + #[doc(alias = "get_mute")] fn is_muted(&self) -> bool { unsafe { from_glib(ffi::gst_stream_volume_get_mute( @@ -64,18 +49,22 @@ impl> StreamVolumeExt for O { } } + #[doc(alias = "gst_stream_volume_get_volume")] + #[doc(alias = "get_volume")] fn volume(&self, format: StreamVolumeFormat) -> f64 { unsafe { ffi::gst_stream_volume_get_volume(self.as_ref().to_glib_none().0, format.into_glib()) } } + #[doc(alias = "gst_stream_volume_set_mute")] fn set_mute(&self, mute: bool) { unsafe { ffi::gst_stream_volume_set_mute(self.as_ref().to_glib_none().0, mute.into_glib()); } } + #[doc(alias = "gst_stream_volume_set_volume")] fn set_volume(&self, format: StreamVolumeFormat, val: f64) { unsafe { ffi::gst_stream_volume_set_volume( @@ -86,6 +75,7 @@ impl> StreamVolumeExt for O { } } + #[doc(alias = "mute")] fn connect_mute_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_mute_trampoline< P: IsA, @@ -111,6 +101,7 @@ impl> StreamVolumeExt for O { } } + #[doc(alias = "volume")] fn connect_volume_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_volume_trampoline< P: IsA, @@ -136,3 +127,5 @@ impl> StreamVolumeExt for O { } } } + +impl> StreamVolumeExt for O {} diff --git a/gstreamer-audio/src/auto/versions.txt b/gstreamer-audio/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-audio/src/auto/versions.txt +++ b/gstreamer-audio/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-audio/sys/src/auto/versions.txt b/gstreamer-audio/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-audio/sys/src/auto/versions.txt +++ b/gstreamer-audio/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-audio/sys/tests/abi.rs b/gstreamer-audio/sys/tests/abi.rs index 8c5b3f068..c38232a75 100644 --- a/gstreamer-audio/sys/tests/abi.rs +++ b/gstreamer-audio/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_audio_sys::*; use std::env; diff --git a/gstreamer-base/src/auto/aggregator.rs b/gstreamer-base/src/auto/aggregator.rs index 738593922..53e39144b 100644 --- a/gstreamer-base/src/auto/aggregator.rs +++ b/gstreamer-base/src/auto/aggregator.rs @@ -29,127 +29,13 @@ impl Aggregator { unsafe impl Send for Aggregator {} unsafe impl Sync for Aggregator {} -pub trait AggregatorExt: 'static { - #[doc(alias = "gst_aggregator_finish_buffer")] - fn finish_buffer(&self, buffer: gst::Buffer) -> Result; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_aggregator_finish_buffer_list")] - fn finish_buffer_list( - &self, - bufferlist: gst::BufferList, - ) -> Result; - - #[doc(alias = "gst_aggregator_get_buffer_pool")] - #[doc(alias = "get_buffer_pool")] - fn buffer_pool(&self) -> Option; - - #[cfg(feature = "v1_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] - #[doc(alias = "gst_aggregator_get_force_live")] - #[doc(alias = "get_force_live")] - fn is_force_live(&self) -> bool; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_aggregator_get_ignore_inactive_pads")] - #[doc(alias = "get_ignore_inactive_pads")] - fn ignores_inactive_pads(&self) -> bool; - - #[doc(alias = "gst_aggregator_get_latency")] - #[doc(alias = "get_latency")] - fn latency(&self) -> Option; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_aggregator_negotiate")] - fn negotiate(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_aggregator_peek_next_sample")] - fn peek_next_sample(&self, pad: &impl IsA) -> Option; - - #[cfg(feature = "v1_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] - #[doc(alias = "gst_aggregator_set_force_live")] - fn set_force_live(&self, force_live: bool); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_aggregator_set_ignore_inactive_pads")] - fn set_ignore_inactive_pads(&self, ignore: bool); - - #[doc(alias = "gst_aggregator_set_latency")] - fn set_latency( - &self, - min_latency: gst::ClockTime, - max_latency: impl Into>, - ); - - #[doc(alias = "gst_aggregator_set_src_caps")] - fn set_src_caps(&self, caps: &gst::Caps); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_aggregator_simple_get_next_time")] - fn simple_get_next_time(&self) -> Option; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "emit-signals")] - fn emits_signals(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "emit-signals")] - fn set_emit_signals(&self, emit_signals: bool); - - #[doc(alias = "start-time")] - fn start_time(&self) -> u64; - - #[doc(alias = "start-time")] - fn set_start_time(&self, start_time: u64); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "start-time-selection")] - fn start_time_selection(&self) -> AggregatorStartTimeSelection; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "start-time-selection")] - fn set_start_time_selection(&self, start_time_selection: AggregatorStartTimeSelection); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "emit-signals")] - fn connect_emit_signals_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "latency")] - fn connect_latency_notify(&self, f: F) - -> SignalHandlerId; - - #[doc(alias = "start-time")] - fn connect_start_time_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "start-time-selection")] - fn connect_start_time_selection_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> AggregatorExt for O { +pub trait AggregatorExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_aggregator_finish_buffer")] fn finish_buffer(&self, buffer: gst::Buffer) -> Result { unsafe { try_from_glib(ffi::gst_aggregator_finish_buffer( @@ -161,6 +47,7 @@ impl> AggregatorExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_aggregator_finish_buffer_list")] fn finish_buffer_list( &self, bufferlist: gst::BufferList, @@ -173,6 +60,8 @@ impl> AggregatorExt for O { } } + #[doc(alias = "gst_aggregator_get_buffer_pool")] + #[doc(alias = "get_buffer_pool")] fn buffer_pool(&self) -> Option { unsafe { from_glib_full(ffi::gst_aggregator_get_buffer_pool( @@ -183,6 +72,8 @@ impl> AggregatorExt for O { #[cfg(feature = "v1_22")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] + #[doc(alias = "gst_aggregator_get_force_live")] + #[doc(alias = "get_force_live")] fn is_force_live(&self) -> bool { unsafe { from_glib(ffi::gst_aggregator_get_force_live( @@ -193,6 +84,8 @@ impl> AggregatorExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_aggregator_get_ignore_inactive_pads")] + #[doc(alias = "get_ignore_inactive_pads")] fn ignores_inactive_pads(&self) -> bool { unsafe { from_glib(ffi::gst_aggregator_get_ignore_inactive_pads( @@ -201,6 +94,8 @@ impl> AggregatorExt for O { } } + #[doc(alias = "gst_aggregator_get_latency")] + #[doc(alias = "get_latency")] fn latency(&self) -> Option { unsafe { from_glib(ffi::gst_aggregator_get_latency( @@ -211,6 +106,7 @@ impl> AggregatorExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_aggregator_negotiate")] fn negotiate(&self) -> bool { unsafe { from_glib(ffi::gst_aggregator_negotiate( @@ -221,6 +117,7 @@ impl> AggregatorExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_aggregator_peek_next_sample")] fn peek_next_sample(&self, pad: &impl IsA) -> Option { unsafe { from_glib_full(ffi::gst_aggregator_peek_next_sample( @@ -232,6 +129,7 @@ impl> AggregatorExt for O { #[cfg(feature = "v1_22")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] + #[doc(alias = "gst_aggregator_set_force_live")] fn set_force_live(&self, force_live: bool) { unsafe { ffi::gst_aggregator_set_force_live( @@ -243,6 +141,7 @@ impl> AggregatorExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_aggregator_set_ignore_inactive_pads")] fn set_ignore_inactive_pads(&self, ignore: bool) { unsafe { ffi::gst_aggregator_set_ignore_inactive_pads( @@ -252,6 +151,7 @@ impl> AggregatorExt for O { } } + #[doc(alias = "gst_aggregator_set_latency")] fn set_latency( &self, min_latency: gst::ClockTime, @@ -266,6 +166,7 @@ impl> AggregatorExt for O { } } + #[doc(alias = "gst_aggregator_set_src_caps")] fn set_src_caps(&self, caps: &gst::Caps) { unsafe { ffi::gst_aggregator_set_src_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0); @@ -274,6 +175,7 @@ impl> AggregatorExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_aggregator_simple_get_next_time")] fn simple_get_next_time(&self) -> Option { unsafe { from_glib(ffi::gst_aggregator_simple_get_next_time( @@ -284,38 +186,45 @@ impl> AggregatorExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "emit-signals")] fn emits_signals(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "emit-signals") } #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "emit-signals")] fn set_emit_signals(&self, emit_signals: bool) { glib::ObjectExt::set_property(self.as_ref(), "emit-signals", emit_signals) } + #[doc(alias = "start-time")] fn start_time(&self) -> u64 { glib::ObjectExt::property(self.as_ref(), "start-time") } + #[doc(alias = "start-time")] fn set_start_time(&self, start_time: u64) { glib::ObjectExt::set_property(self.as_ref(), "start-time", start_time) } #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "start-time-selection")] fn start_time_selection(&self) -> AggregatorStartTimeSelection { glib::ObjectExt::property(self.as_ref(), "start-time-selection") } #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "start-time-selection")] fn set_start_time_selection(&self, start_time_selection: AggregatorStartTimeSelection) { glib::ObjectExt::set_property(self.as_ref(), "start-time-selection", start_time_selection) } #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "emit-signals")] fn connect_emit_signals_notify( &self, f: F, @@ -344,6 +253,7 @@ impl> AggregatorExt for O { } } + #[doc(alias = "latency")] fn connect_latency_notify( &self, f: F, @@ -372,6 +282,7 @@ impl> AggregatorExt for O { } } + #[doc(alias = "start-time")] fn connect_start_time_notify( &self, f: F, @@ -402,6 +313,7 @@ impl> AggregatorExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "start-time-selection")] fn connect_start_time_selection_notify( &self, f: F, @@ -430,3 +342,5 @@ impl> AggregatorExt for O { } } } + +impl> AggregatorExt for O {} diff --git a/gstreamer-base/src/auto/aggregator_pad.rs b/gstreamer-base/src/auto/aggregator_pad.rs index 68fc4938c..a08099828 100644 --- a/gstreamer-base/src/auto/aggregator_pad.rs +++ b/gstreamer-base/src/auto/aggregator_pad.rs @@ -26,55 +26,13 @@ impl AggregatorPad { unsafe impl Send for AggregatorPad {} unsafe impl Sync for AggregatorPad {} -pub trait AggregatorPadExt: 'static { - #[doc(alias = "gst_aggregator_pad_drop_buffer")] - fn drop_buffer(&self) -> bool; - - #[cfg(feature = "v1_14_1")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_14_1")))] - #[doc(alias = "gst_aggregator_pad_has_buffer")] - fn has_buffer(&self) -> bool; - - #[doc(alias = "gst_aggregator_pad_is_eos")] - fn is_eos(&self) -> bool; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_aggregator_pad_is_inactive")] - fn is_inactive(&self) -> bool; - - #[doc(alias = "gst_aggregator_pad_peek_buffer")] - fn peek_buffer(&self) -> Option; - - #[doc(alias = "gst_aggregator_pad_pop_buffer")] - fn pop_buffer(&self) -> Option; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "emit-signals")] - fn emits_signals(&self) -> bool; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "emit-signals")] - fn set_emit_signals(&self, emit_signals: bool); - - #[doc(alias = "buffer-consumed")] - fn connect_buffer_consumed( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "emit-signals")] - fn connect_emit_signals_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> AggregatorPadExt for O { +pub trait AggregatorPadExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_aggregator_pad_drop_buffer")] fn drop_buffer(&self) -> bool { unsafe { from_glib(ffi::gst_aggregator_pad_drop_buffer( @@ -85,6 +43,7 @@ impl> AggregatorPadExt for O { #[cfg(feature = "v1_14_1")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_14_1")))] + #[doc(alias = "gst_aggregator_pad_has_buffer")] fn has_buffer(&self) -> bool { unsafe { from_glib(ffi::gst_aggregator_pad_has_buffer( @@ -93,6 +52,7 @@ impl> AggregatorPadExt for O { } } + #[doc(alias = "gst_aggregator_pad_is_eos")] fn is_eos(&self) -> bool { unsafe { from_glib(ffi::gst_aggregator_pad_is_eos( @@ -103,6 +63,7 @@ impl> AggregatorPadExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_aggregator_pad_is_inactive")] fn is_inactive(&self) -> bool { unsafe { from_glib(ffi::gst_aggregator_pad_is_inactive( @@ -111,6 +72,7 @@ impl> AggregatorPadExt for O { } } + #[doc(alias = "gst_aggregator_pad_peek_buffer")] fn peek_buffer(&self) -> Option { unsafe { from_glib_full(ffi::gst_aggregator_pad_peek_buffer( @@ -119,6 +81,7 @@ impl> AggregatorPadExt for O { } } + #[doc(alias = "gst_aggregator_pad_pop_buffer")] fn pop_buffer(&self) -> Option { unsafe { from_glib_full(ffi::gst_aggregator_pad_pop_buffer( @@ -129,16 +92,19 @@ impl> AggregatorPadExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "emit-signals")] fn emits_signals(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "emit-signals") } #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "emit-signals")] fn set_emit_signals(&self, emit_signals: bool) { glib::ObjectExt::set_property(self.as_ref(), "emit-signals", emit_signals) } + #[doc(alias = "buffer-consumed")] fn connect_buffer_consumed( &self, f: F, @@ -172,6 +138,7 @@ impl> AggregatorPadExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "emit-signals")] fn connect_emit_signals_notify( &self, f: F, @@ -200,3 +167,5 @@ impl> AggregatorPadExt for O { } } } + +impl> AggregatorPadExt for O {} diff --git a/gstreamer-base/src/auto/base_parse.rs b/gstreamer-base/src/auto/base_parse.rs index 84a9cf9b5..e63e46eeb 100644 --- a/gstreamer-base/src/auto/base_parse.rs +++ b/gstreamer-base/src/auto/base_parse.rs @@ -26,61 +26,13 @@ impl BaseParse { unsafe impl Send for BaseParse {} unsafe impl Sync for BaseParse {} -pub trait BaseParseExt: 'static { - #[doc(alias = "gst_base_parse_add_index_entry")] - fn add_index_entry(&self, offset: u64, ts: gst::ClockTime, key: bool, force: bool) -> bool; - - #[doc(alias = "gst_base_parse_drain")] - fn drain(&self); - - #[doc(alias = "gst_base_parse_merge_tags")] - fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode); - - #[doc(alias = "gst_base_parse_set_average_bitrate")] - fn set_average_bitrate(&self, bitrate: u32); - - #[doc(alias = "gst_base_parse_set_has_timing_info")] - fn set_has_timing_info(&self, has_timing: bool); - - #[doc(alias = "gst_base_parse_set_infer_ts")] - fn set_infer_ts(&self, infer_ts: bool); - - #[doc(alias = "gst_base_parse_set_latency")] - fn set_latency( - &self, - min_latency: gst::ClockTime, - max_latency: impl Into>, - ); - - #[doc(alias = "gst_base_parse_set_min_frame_size")] - fn set_min_frame_size(&self, min_size: u32); - - #[doc(alias = "gst_base_parse_set_passthrough")] - fn set_passthrough(&self, passthrough: bool); - - #[doc(alias = "gst_base_parse_set_pts_interpolation")] - fn set_pts_interpolation(&self, pts_interpolate: bool); - - #[doc(alias = "gst_base_parse_set_syncable")] - fn set_syncable(&self, syncable: bool); - - #[doc(alias = "gst_base_parse_set_ts_at_offset")] - fn set_ts_at_offset(&self, offset: usize); - - #[doc(alias = "disable-passthrough")] - fn is_disable_passthrough(&self) -> bool; - - #[doc(alias = "disable-passthrough")] - fn set_disable_passthrough(&self, disable_passthrough: bool); - - #[doc(alias = "disable-passthrough")] - fn connect_disable_passthrough_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> BaseParseExt for O { +pub trait BaseParseExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_base_parse_add_index_entry")] fn add_index_entry(&self, offset: u64, ts: gst::ClockTime, key: bool, force: bool) -> bool { unsafe { from_glib(ffi::gst_base_parse_add_index_entry( @@ -93,12 +45,14 @@ impl> BaseParseExt for O { } } + #[doc(alias = "gst_base_parse_drain")] fn drain(&self) { unsafe { ffi::gst_base_parse_drain(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_base_parse_merge_tags")] fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode) { unsafe { ffi::gst_base_parse_merge_tags( @@ -109,12 +63,14 @@ impl> BaseParseExt for O { } } + #[doc(alias = "gst_base_parse_set_average_bitrate")] fn set_average_bitrate(&self, bitrate: u32) { unsafe { ffi::gst_base_parse_set_average_bitrate(self.as_ref().to_glib_none().0, bitrate); } } + #[doc(alias = "gst_base_parse_set_has_timing_info")] fn set_has_timing_info(&self, has_timing: bool) { unsafe { ffi::gst_base_parse_set_has_timing_info( @@ -124,12 +80,14 @@ impl> BaseParseExt for O { } } + #[doc(alias = "gst_base_parse_set_infer_ts")] fn set_infer_ts(&self, infer_ts: bool) { unsafe { ffi::gst_base_parse_set_infer_ts(self.as_ref().to_glib_none().0, infer_ts.into_glib()); } } + #[doc(alias = "gst_base_parse_set_latency")] fn set_latency( &self, min_latency: gst::ClockTime, @@ -144,12 +102,14 @@ impl> BaseParseExt for O { } } + #[doc(alias = "gst_base_parse_set_min_frame_size")] fn set_min_frame_size(&self, min_size: u32) { unsafe { ffi::gst_base_parse_set_min_frame_size(self.as_ref().to_glib_none().0, min_size); } } + #[doc(alias = "gst_base_parse_set_passthrough")] fn set_passthrough(&self, passthrough: bool) { unsafe { ffi::gst_base_parse_set_passthrough( @@ -159,6 +119,7 @@ impl> BaseParseExt for O { } } + #[doc(alias = "gst_base_parse_set_pts_interpolation")] fn set_pts_interpolation(&self, pts_interpolate: bool) { unsafe { ffi::gst_base_parse_set_pts_interpolation( @@ -168,26 +129,31 @@ impl> BaseParseExt for O { } } + #[doc(alias = "gst_base_parse_set_syncable")] fn set_syncable(&self, syncable: bool) { unsafe { ffi::gst_base_parse_set_syncable(self.as_ref().to_glib_none().0, syncable.into_glib()); } } + #[doc(alias = "gst_base_parse_set_ts_at_offset")] fn set_ts_at_offset(&self, offset: usize) { unsafe { ffi::gst_base_parse_set_ts_at_offset(self.as_ref().to_glib_none().0, offset); } } + #[doc(alias = "disable-passthrough")] fn is_disable_passthrough(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "disable-passthrough") } + #[doc(alias = "disable-passthrough")] fn set_disable_passthrough(&self, disable_passthrough: bool) { glib::ObjectExt::set_property(self.as_ref(), "disable-passthrough", disable_passthrough) } + #[doc(alias = "disable-passthrough")] fn connect_disable_passthrough_notify( &self, f: F, @@ -216,3 +182,5 @@ impl> BaseParseExt for O { } } } + +impl> BaseParseExt for O {} diff --git a/gstreamer-base/src/auto/base_sink.rs b/gstreamer-base/src/auto/base_sink.rs index 4e86ab5e8..8efdc13ad 100644 --- a/gstreamer-base/src/auto/base_sink.rs +++ b/gstreamer-base/src/auto/base_sink.rs @@ -26,205 +26,25 @@ impl BaseSink { unsafe impl Send for BaseSink {} unsafe impl Sync for BaseSink {} -pub trait BaseSinkExt: 'static { - //#[doc(alias = "gst_base_sink_do_preroll")] - //fn do_preroll(&self, obj: /*Ignored*/&gst::MiniObject) -> Result; - - #[doc(alias = "gst_base_sink_get_blocksize")] - #[doc(alias = "get_blocksize")] - fn blocksize(&self) -> u32; - - #[doc(alias = "gst_base_sink_get_drop_out_of_segment")] - #[doc(alias = "get_drop_out_of_segment")] - fn drops_out_of_segment(&self) -> bool; - - #[doc(alias = "gst_base_sink_get_last_sample")] - #[doc(alias = "get_last_sample")] - fn last_sample(&self) -> Option; - - #[doc(alias = "gst_base_sink_get_latency")] - #[doc(alias = "get_latency")] - fn latency(&self) -> gst::ClockTime; - - #[doc(alias = "gst_base_sink_get_max_bitrate")] - #[doc(alias = "get_max_bitrate")] - fn max_bitrate(&self) -> u64; - - #[doc(alias = "gst_base_sink_get_max_lateness")] - #[doc(alias = "get_max_lateness")] - fn max_lateness(&self) -> i64; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_base_sink_get_processing_deadline")] - #[doc(alias = "get_processing_deadline")] - fn processing_deadline(&self) -> gst::ClockTime; - - #[doc(alias = "gst_base_sink_get_render_delay")] - #[doc(alias = "get_render_delay")] - fn render_delay(&self) -> gst::ClockTime; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_base_sink_get_stats")] - #[doc(alias = "get_stats")] - fn stats(&self) -> gst::Structure; - - #[doc(alias = "gst_base_sink_get_sync")] - #[doc(alias = "get_sync")] - fn is_sync(&self) -> bool; - - #[doc(alias = "gst_base_sink_get_throttle_time")] - #[doc(alias = "get_throttle_time")] - fn throttle_time(&self) -> u64; - - #[doc(alias = "gst_base_sink_get_ts_offset")] - #[doc(alias = "get_ts_offset")] - fn ts_offset(&self) -> gst::ClockTimeDiff; - - #[doc(alias = "gst_base_sink_set_blocksize")] - fn set_blocksize(&self, blocksize: u32); - - #[doc(alias = "gst_base_sink_set_drop_out_of_segment")] - fn set_drop_out_of_segment(&self, drop_out_of_segment: bool); - - #[doc(alias = "gst_base_sink_set_max_bitrate")] - fn set_max_bitrate(&self, max_bitrate: u64); - - #[doc(alias = "gst_base_sink_set_max_lateness")] - fn set_max_lateness(&self, max_lateness: i64); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_base_sink_set_processing_deadline")] - fn set_processing_deadline(&self, processing_deadline: gst::ClockTime); - - #[doc(alias = "gst_base_sink_set_render_delay")] - fn set_render_delay(&self, delay: gst::ClockTime); - - #[doc(alias = "gst_base_sink_set_sync")] - fn set_sync(&self, sync: bool); - - #[doc(alias = "gst_base_sink_set_throttle_time")] - fn set_throttle_time(&self, throttle: u64); - - #[doc(alias = "gst_base_sink_set_ts_offset")] - fn set_ts_offset(&self, offset: gst::ClockTimeDiff); - - #[doc(alias = "gst_base_sink_wait")] - fn wait( - &self, - time: impl Into>, - ) -> (Result, gst::ClockTimeDiff); - - #[doc(alias = "gst_base_sink_wait_clock")] - fn wait_clock( - &self, - time: gst::ClockTime, - ) -> ( - Result, - gst::ClockTimeDiff, - ); - - #[doc(alias = "gst_base_sink_wait_preroll")] - fn wait_preroll(&self) -> Result; - - #[doc(alias = "async")] - fn is_async(&self) -> bool; - - #[doc(alias = "async")] - fn set_async(&self, async_: bool); - - #[doc(alias = "enable-last-sample")] - fn enables_last_sample(&self) -> bool; - - #[doc(alias = "enable-last-sample")] - fn set_enable_last_sample(&self, enable_last_sample: bool); - - fn is_qos(&self) -> bool; - - fn set_qos(&self, qos: bool); - - #[doc(alias = "async")] - fn connect_async_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "blocksize")] - fn connect_blocksize_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "enable-last-sample")] - fn connect_enable_last_sample_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "last-sample")] - fn connect_last_sample_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "max-bitrate")] - fn connect_max_bitrate_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "max-lateness")] - fn connect_max_lateness_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "processing-deadline")] - fn connect_processing_deadline_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "qos")] - fn connect_qos_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "render-delay")] - fn connect_render_delay_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "stats")] - fn connect_stats_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "sync")] - fn connect_sync_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "throttle-time")] - fn connect_throttle_time_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "ts-offset")] - fn connect_ts_offset_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> BaseSinkExt for O { +pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { + //#[doc(alias = "gst_base_sink_do_preroll")] //fn do_preroll(&self, obj: /*Ignored*/&gst::MiniObject) -> Result { // unsafe { TODO: call ffi:gst_base_sink_do_preroll() } //} + #[doc(alias = "gst_base_sink_get_blocksize")] + #[doc(alias = "get_blocksize")] fn blocksize(&self) -> u32 { unsafe { ffi::gst_base_sink_get_blocksize(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_base_sink_get_drop_out_of_segment")] + #[doc(alias = "get_drop_out_of_segment")] fn drops_out_of_segment(&self) -> bool { unsafe { from_glib(ffi::gst_base_sink_get_drop_out_of_segment( @@ -233,6 +53,8 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "gst_base_sink_get_last_sample")] + #[doc(alias = "get_last_sample")] fn last_sample(&self) -> Option { unsafe { from_glib_full(ffi::gst_base_sink_get_last_sample( @@ -241,6 +63,8 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "gst_base_sink_get_latency")] + #[doc(alias = "get_latency")] fn latency(&self) -> gst::ClockTime { unsafe { try_from_glib(ffi::gst_base_sink_get_latency( @@ -250,16 +74,22 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "gst_base_sink_get_max_bitrate")] + #[doc(alias = "get_max_bitrate")] fn max_bitrate(&self) -> u64 { unsafe { ffi::gst_base_sink_get_max_bitrate(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_base_sink_get_max_lateness")] + #[doc(alias = "get_max_lateness")] fn max_lateness(&self) -> i64 { unsafe { ffi::gst_base_sink_get_max_lateness(self.as_ref().to_glib_none().0) } } #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_base_sink_get_processing_deadline")] + #[doc(alias = "get_processing_deadline")] fn processing_deadline(&self) -> gst::ClockTime { unsafe { try_from_glib(ffi::gst_base_sink_get_processing_deadline( @@ -269,6 +99,8 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "gst_base_sink_get_render_delay")] + #[doc(alias = "get_render_delay")] fn render_delay(&self) -> gst::ClockTime { unsafe { try_from_glib(ffi::gst_base_sink_get_render_delay( @@ -280,28 +112,38 @@ impl> BaseSinkExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_base_sink_get_stats")] + #[doc(alias = "get_stats")] fn stats(&self) -> gst::Structure { unsafe { from_glib_full(ffi::gst_base_sink_get_stats(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_base_sink_get_sync")] + #[doc(alias = "get_sync")] fn is_sync(&self) -> bool { unsafe { from_glib(ffi::gst_base_sink_get_sync(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_base_sink_get_throttle_time")] + #[doc(alias = "get_throttle_time")] fn throttle_time(&self) -> u64 { unsafe { ffi::gst_base_sink_get_throttle_time(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_base_sink_get_ts_offset")] + #[doc(alias = "get_ts_offset")] fn ts_offset(&self) -> gst::ClockTimeDiff { unsafe { ffi::gst_base_sink_get_ts_offset(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_base_sink_set_blocksize")] fn set_blocksize(&self, blocksize: u32) { unsafe { ffi::gst_base_sink_set_blocksize(self.as_ref().to_glib_none().0, blocksize); } } + #[doc(alias = "gst_base_sink_set_drop_out_of_segment")] fn set_drop_out_of_segment(&self, drop_out_of_segment: bool) { unsafe { ffi::gst_base_sink_set_drop_out_of_segment( @@ -311,12 +153,14 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "gst_base_sink_set_max_bitrate")] fn set_max_bitrate(&self, max_bitrate: u64) { unsafe { ffi::gst_base_sink_set_max_bitrate(self.as_ref().to_glib_none().0, max_bitrate); } } + #[doc(alias = "gst_base_sink_set_max_lateness")] fn set_max_lateness(&self, max_lateness: i64) { unsafe { ffi::gst_base_sink_set_max_lateness(self.as_ref().to_glib_none().0, max_lateness); @@ -325,6 +169,7 @@ impl> BaseSinkExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_base_sink_set_processing_deadline")] fn set_processing_deadline(&self, processing_deadline: gst::ClockTime) { unsafe { ffi::gst_base_sink_set_processing_deadline( @@ -334,30 +179,35 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "gst_base_sink_set_render_delay")] fn set_render_delay(&self, delay: gst::ClockTime) { unsafe { ffi::gst_base_sink_set_render_delay(self.as_ref().to_glib_none().0, delay.into_glib()); } } + #[doc(alias = "gst_base_sink_set_sync")] fn set_sync(&self, sync: bool) { unsafe { ffi::gst_base_sink_set_sync(self.as_ref().to_glib_none().0, sync.into_glib()); } } + #[doc(alias = "gst_base_sink_set_throttle_time")] fn set_throttle_time(&self, throttle: u64) { unsafe { ffi::gst_base_sink_set_throttle_time(self.as_ref().to_glib_none().0, throttle); } } + #[doc(alias = "gst_base_sink_set_ts_offset")] fn set_ts_offset(&self, offset: gst::ClockTimeDiff) { unsafe { ffi::gst_base_sink_set_ts_offset(self.as_ref().to_glib_none().0, offset); } } + #[doc(alias = "gst_base_sink_wait")] fn wait( &self, time: impl Into>, @@ -373,6 +223,7 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "gst_base_sink_wait_clock")] fn wait_clock( &self, time: gst::ClockTime, @@ -391,6 +242,7 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "gst_base_sink_wait_preroll")] fn wait_preroll(&self) -> Result { unsafe { try_from_glib(ffi::gst_base_sink_wait_preroll( @@ -399,18 +251,22 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "async")] fn is_async(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "async") } + #[doc(alias = "async")] fn set_async(&self, async_: bool) { glib::ObjectExt::set_property(self.as_ref(), "async", async_) } + #[doc(alias = "enable-last-sample")] fn enables_last_sample(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "enable-last-sample") } + #[doc(alias = "enable-last-sample")] fn set_enable_last_sample(&self, enable_last_sample: bool) { glib::ObjectExt::set_property(self.as_ref(), "enable-last-sample", enable_last_sample) } @@ -423,6 +279,7 @@ impl> BaseSinkExt for O { glib::ObjectExt::set_property(self.as_ref(), "qos", qos) } + #[doc(alias = "async")] fn connect_async_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_async_trampoline< P: IsA, @@ -448,6 +305,7 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "blocksize")] fn connect_blocksize_notify( &self, f: F, @@ -476,6 +334,7 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "enable-last-sample")] fn connect_enable_last_sample_notify( &self, f: F, @@ -504,6 +363,7 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "last-sample")] fn connect_last_sample_notify( &self, f: F, @@ -532,6 +392,7 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "max-bitrate")] fn connect_max_bitrate_notify( &self, f: F, @@ -560,6 +421,7 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "max-lateness")] fn connect_max_lateness_notify( &self, f: F, @@ -590,6 +452,7 @@ impl> BaseSinkExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "processing-deadline")] fn connect_processing_deadline_notify( &self, f: F, @@ -618,6 +481,7 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "qos")] fn connect_qos_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_qos_trampoline< P: IsA, @@ -643,6 +507,7 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "render-delay")] fn connect_render_delay_notify( &self, f: F, @@ -673,6 +538,7 @@ impl> BaseSinkExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "stats")] fn connect_stats_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_stats_trampoline< P: IsA, @@ -698,6 +564,7 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "sync")] fn connect_sync_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_sync_trampoline< P: IsA, @@ -723,6 +590,7 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "throttle-time")] fn connect_throttle_time_notify( &self, f: F, @@ -751,6 +619,7 @@ impl> BaseSinkExt for O { } } + #[doc(alias = "ts-offset")] fn connect_ts_offset_notify( &self, f: F, @@ -779,3 +648,5 @@ impl> BaseSinkExt for O { } } } + +impl> BaseSinkExt for O {} diff --git a/gstreamer-base/src/auto/base_src.rs b/gstreamer-base/src/auto/base_src.rs index 68f58d4bd..f280a7f67 100644 --- a/gstreamer-base/src/auto/base_src.rs +++ b/gstreamer-base/src/auto/base_src.rs @@ -27,118 +27,20 @@ impl BaseSrc { unsafe impl Send for BaseSrc {} unsafe impl Sync for BaseSrc {} -pub trait BaseSrcExt: 'static { - #[doc(alias = "gst_base_src_get_blocksize")] - #[doc(alias = "get_blocksize")] - fn blocksize(&self) -> u32; - - #[doc(alias = "gst_base_src_get_buffer_pool")] - #[doc(alias = "get_buffer_pool")] - fn buffer_pool(&self) -> Option; - - #[doc(alias = "gst_base_src_get_do_timestamp")] - #[doc(alias = "get_do_timestamp")] - fn does_timestamp(&self) -> bool; - - #[doc(alias = "gst_base_src_is_async")] - fn is_async(&self) -> bool; - - #[doc(alias = "gst_base_src_is_live")] - fn is_live(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_base_src_negotiate")] - fn negotiate(&self) -> bool; - - #[cfg_attr(feature = "v1_18", deprecated = "Since 1.18")] - #[allow(deprecated)] - #[doc(alias = "gst_base_src_new_seamless_segment")] - fn new_seamless_segment(&self, start: i64, stop: i64, time: i64) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_base_src_new_segment")] - fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::error::BoolError>; - - #[cfg(feature = "v1_24")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] - #[doc(alias = "gst_base_src_push_segment")] - fn push_segment(&self, segment: &gst::Segment) -> bool; - - #[doc(alias = "gst_base_src_set_async")] - fn set_async(&self, async_: bool); - - #[doc(alias = "gst_base_src_set_automatic_eos")] - fn set_automatic_eos(&self, automatic_eos: bool); - - #[doc(alias = "gst_base_src_set_blocksize")] - fn set_blocksize(&self, blocksize: u32); - - #[doc(alias = "gst_base_src_set_caps")] - fn set_caps(&self, caps: &gst::Caps) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_base_src_set_do_timestamp")] - fn set_do_timestamp(&self, timestamp: bool); - - #[doc(alias = "gst_base_src_set_dynamic_size")] - fn set_dynamic_size(&self, dynamic: bool); - - #[doc(alias = "gst_base_src_set_format")] - fn set_format(&self, format: gst::Format); - - #[doc(alias = "gst_base_src_set_live")] - fn set_live(&self, live: bool); - - #[doc(alias = "gst_base_src_start_complete")] - fn start_complete(&self, ret: impl Into); - - #[doc(alias = "gst_base_src_start_wait")] - fn start_wait(&self) -> Result; - - #[doc(alias = "gst_base_src_wait_playing")] - fn wait_playing(&self) -> Result; - - #[doc(alias = "num-buffers")] - fn num_buffers(&self) -> i32; - - #[doc(alias = "num-buffers")] - fn set_num_buffers(&self, num_buffers: i32); - - fn is_typefind(&self) -> bool; - - fn set_typefind(&self, typefind: bool); - - #[doc(alias = "blocksize")] - fn connect_blocksize_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "do-timestamp")] - fn connect_do_timestamp_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "num-buffers")] - fn connect_num_buffers_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "typefind")] - fn connect_typefind_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> BaseSrcExt for O { +pub trait BaseSrcExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_base_src_get_blocksize")] + #[doc(alias = "get_blocksize")] fn blocksize(&self) -> u32 { unsafe { ffi::gst_base_src_get_blocksize(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_base_src_get_buffer_pool")] + #[doc(alias = "get_buffer_pool")] fn buffer_pool(&self) -> Option { unsafe { from_glib_full(ffi::gst_base_src_get_buffer_pool( @@ -147,6 +49,8 @@ impl> BaseSrcExt for O { } } + #[doc(alias = "gst_base_src_get_do_timestamp")] + #[doc(alias = "get_do_timestamp")] fn does_timestamp(&self) -> bool { unsafe { from_glib(ffi::gst_base_src_get_do_timestamp( @@ -155,21 +59,26 @@ impl> BaseSrcExt for O { } } + #[doc(alias = "gst_base_src_is_async")] fn is_async(&self) -> bool { unsafe { from_glib(ffi::gst_base_src_is_async(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_base_src_is_live")] fn is_live(&self) -> bool { unsafe { from_glib(ffi::gst_base_src_is_live(self.as_ref().to_glib_none().0)) } } #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_base_src_negotiate")] fn negotiate(&self) -> bool { unsafe { from_glib(ffi::gst_base_src_negotiate(self.as_ref().to_glib_none().0)) } } + #[cfg_attr(feature = "v1_18", deprecated = "Since 1.18")] #[allow(deprecated)] + #[doc(alias = "gst_base_src_new_seamless_segment")] fn new_seamless_segment(&self, start: i64, stop: i64, time: i64) -> bool { unsafe { from_glib(ffi::gst_base_src_new_seamless_segment( @@ -183,6 +92,7 @@ impl> BaseSrcExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_base_src_new_segment")] fn new_segment(&self, segment: &gst::Segment) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -197,6 +107,7 @@ impl> BaseSrcExt for O { #[cfg(feature = "v1_24")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] + #[doc(alias = "gst_base_src_push_segment")] fn push_segment(&self, segment: &gst::Segment) -> bool { unsafe { from_glib(ffi::gst_base_src_push_segment( @@ -206,12 +117,14 @@ impl> BaseSrcExt for O { } } + #[doc(alias = "gst_base_src_set_async")] fn set_async(&self, async_: bool) { unsafe { ffi::gst_base_src_set_async(self.as_ref().to_glib_none().0, async_.into_glib()); } } + #[doc(alias = "gst_base_src_set_automatic_eos")] fn set_automatic_eos(&self, automatic_eos: bool) { unsafe { ffi::gst_base_src_set_automatic_eos( @@ -221,12 +134,14 @@ impl> BaseSrcExt for O { } } + #[doc(alias = "gst_base_src_set_blocksize")] fn set_blocksize(&self, blocksize: u32) { unsafe { ffi::gst_base_src_set_blocksize(self.as_ref().to_glib_none().0, blocksize); } } + #[doc(alias = "gst_base_src_set_caps")] fn set_caps(&self, caps: &gst::Caps) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -236,6 +151,7 @@ impl> BaseSrcExt for O { } } + #[doc(alias = "gst_base_src_set_do_timestamp")] fn set_do_timestamp(&self, timestamp: bool) { unsafe { ffi::gst_base_src_set_do_timestamp( @@ -245,24 +161,28 @@ impl> BaseSrcExt for O { } } + #[doc(alias = "gst_base_src_set_dynamic_size")] fn set_dynamic_size(&self, dynamic: bool) { unsafe { ffi::gst_base_src_set_dynamic_size(self.as_ref().to_glib_none().0, dynamic.into_glib()); } } + #[doc(alias = "gst_base_src_set_format")] fn set_format(&self, format: gst::Format) { unsafe { ffi::gst_base_src_set_format(self.as_ref().to_glib_none().0, format.into_glib()); } } + #[doc(alias = "gst_base_src_set_live")] fn set_live(&self, live: bool) { unsafe { ffi::gst_base_src_set_live(self.as_ref().to_glib_none().0, live.into_glib()); } } + #[doc(alias = "gst_base_src_start_complete")] fn start_complete(&self, ret: impl Into) { unsafe { ffi::gst_base_src_start_complete( @@ -272,10 +192,12 @@ impl> BaseSrcExt for O { } } + #[doc(alias = "gst_base_src_start_wait")] fn start_wait(&self) -> Result { unsafe { try_from_glib(ffi::gst_base_src_start_wait(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_base_src_wait_playing")] fn wait_playing(&self) -> Result { unsafe { try_from_glib(ffi::gst_base_src_wait_playing( @@ -284,10 +206,12 @@ impl> BaseSrcExt for O { } } + #[doc(alias = "num-buffers")] fn num_buffers(&self) -> i32 { glib::ObjectExt::property(self.as_ref(), "num-buffers") } + #[doc(alias = "num-buffers")] fn set_num_buffers(&self, num_buffers: i32) { glib::ObjectExt::set_property(self.as_ref(), "num-buffers", num_buffers) } @@ -300,6 +224,7 @@ impl> BaseSrcExt for O { glib::ObjectExt::set_property(self.as_ref(), "typefind", typefind) } + #[doc(alias = "blocksize")] fn connect_blocksize_notify( &self, f: F, @@ -328,6 +253,7 @@ impl> BaseSrcExt for O { } } + #[doc(alias = "do-timestamp")] fn connect_do_timestamp_notify( &self, f: F, @@ -356,6 +282,7 @@ impl> BaseSrcExt for O { } } + #[doc(alias = "num-buffers")] fn connect_num_buffers_notify( &self, f: F, @@ -384,6 +311,7 @@ impl> BaseSrcExt for O { } } + #[doc(alias = "typefind")] fn connect_typefind_notify( &self, f: F, @@ -412,3 +340,5 @@ impl> BaseSrcExt for O { } } } + +impl> BaseSrcExt for O {} diff --git a/gstreamer-base/src/auto/base_transform.rs b/gstreamer-base/src/auto/base_transform.rs index 4c28b8a65..9a6eb436c 100644 --- a/gstreamer-base/src/auto/base_transform.rs +++ b/gstreamer-base/src/auto/base_transform.rs @@ -26,55 +26,14 @@ impl BaseTransform { unsafe impl Send for BaseTransform {} unsafe impl Sync for BaseTransform {} -pub trait BaseTransformExt: 'static { - #[doc(alias = "gst_base_transform_get_buffer_pool")] - #[doc(alias = "get_buffer_pool")] - fn buffer_pool(&self) -> Option; - - #[doc(alias = "gst_base_transform_is_in_place")] - fn is_in_place(&self) -> bool; - - #[doc(alias = "gst_base_transform_is_passthrough")] - fn is_passthrough(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_base_transform_reconfigure")] - fn reconfigure(&self) -> bool; - - #[doc(alias = "gst_base_transform_reconfigure_sink")] - fn reconfigure_sink(&self); - - #[doc(alias = "gst_base_transform_reconfigure_src")] - fn reconfigure_src(&self); - - #[doc(alias = "gst_base_transform_set_gap_aware")] - fn set_gap_aware(&self, gap_aware: bool); - - #[doc(alias = "gst_base_transform_set_in_place")] - fn set_in_place(&self, in_place: bool); - - #[doc(alias = "gst_base_transform_set_passthrough")] - fn set_passthrough(&self, passthrough: bool); - - #[doc(alias = "gst_base_transform_set_prefer_passthrough")] - fn set_prefer_passthrough(&self, prefer_passthrough: bool); - - #[doc(alias = "gst_base_transform_update_qos")] - fn update_qos(&self, proportion: f64, diff: gst::ClockTimeDiff, timestamp: gst::ClockTime); - - #[doc(alias = "gst_base_transform_update_src_caps")] - fn update_src_caps(&self, updated_caps: &gst::Caps) -> Result<(), glib::error::BoolError>; - - fn is_qos(&self) -> bool; - - fn set_qos(&self, qos: bool); - - #[doc(alias = "qos")] - fn connect_qos_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> BaseTransformExt for O { +pub trait BaseTransformExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_base_transform_get_buffer_pool")] + #[doc(alias = "get_buffer_pool")] fn buffer_pool(&self) -> Option { unsafe { from_glib_full(ffi::gst_base_transform_get_buffer_pool( @@ -83,6 +42,7 @@ impl> BaseTransformExt for O { } } + #[doc(alias = "gst_base_transform_is_in_place")] fn is_in_place(&self) -> bool { unsafe { from_glib(ffi::gst_base_transform_is_in_place( @@ -91,6 +51,7 @@ impl> BaseTransformExt for O { } } + #[doc(alias = "gst_base_transform_is_passthrough")] fn is_passthrough(&self) -> bool { unsafe { from_glib(ffi::gst_base_transform_is_passthrough( @@ -101,6 +62,7 @@ impl> BaseTransformExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_base_transform_reconfigure")] fn reconfigure(&self) -> bool { unsafe { from_glib(ffi::gst_base_transform_reconfigure( @@ -109,18 +71,21 @@ impl> BaseTransformExt for O { } } + #[doc(alias = "gst_base_transform_reconfigure_sink")] fn reconfigure_sink(&self) { unsafe { ffi::gst_base_transform_reconfigure_sink(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_base_transform_reconfigure_src")] fn reconfigure_src(&self) { unsafe { ffi::gst_base_transform_reconfigure_src(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_base_transform_set_gap_aware")] fn set_gap_aware(&self, gap_aware: bool) { unsafe { ffi::gst_base_transform_set_gap_aware( @@ -130,6 +95,7 @@ impl> BaseTransformExt for O { } } + #[doc(alias = "gst_base_transform_set_in_place")] fn set_in_place(&self, in_place: bool) { unsafe { ffi::gst_base_transform_set_in_place( @@ -139,6 +105,7 @@ impl> BaseTransformExt for O { } } + #[doc(alias = "gst_base_transform_set_passthrough")] fn set_passthrough(&self, passthrough: bool) { unsafe { ffi::gst_base_transform_set_passthrough( @@ -148,6 +115,7 @@ impl> BaseTransformExt for O { } } + #[doc(alias = "gst_base_transform_set_prefer_passthrough")] fn set_prefer_passthrough(&self, prefer_passthrough: bool) { unsafe { ffi::gst_base_transform_set_prefer_passthrough( @@ -157,6 +125,7 @@ impl> BaseTransformExt for O { } } + #[doc(alias = "gst_base_transform_update_qos")] fn update_qos(&self, proportion: f64, diff: gst::ClockTimeDiff, timestamp: gst::ClockTime) { unsafe { ffi::gst_base_transform_update_qos( @@ -168,6 +137,7 @@ impl> BaseTransformExt for O { } } + #[doc(alias = "gst_base_transform_update_src_caps")] fn update_src_caps(&self, updated_caps: &gst::Caps) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -188,6 +158,7 @@ impl> BaseTransformExt for O { glib::ObjectExt::set_property(self.as_ref(), "qos", qos) } + #[doc(alias = "qos")] fn connect_qos_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_qos_trampoline< P: IsA, @@ -213,3 +184,5 @@ impl> BaseTransformExt for O { } } } + +impl> BaseTransformExt for O {} diff --git a/gstreamer-base/src/auto/versions.txt b/gstreamer-base/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-base/src/auto/versions.txt +++ b/gstreamer-base/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-base/sys/src/auto/versions.txt b/gstreamer-base/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-base/sys/src/auto/versions.txt +++ b/gstreamer-base/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-base/sys/tests/abi.rs b/gstreamer-base/sys/tests/abi.rs index d9095baec..1a539d207 100644 --- a/gstreamer-base/sys/tests/abi.rs +++ b/gstreamer-base/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_base_sys::*; use std::env; diff --git a/gstreamer-check/src/auto/versions.txt b/gstreamer-check/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-check/src/auto/versions.txt +++ b/gstreamer-check/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-check/sys/src/auto/versions.txt b/gstreamer-check/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-check/sys/src/auto/versions.txt +++ b/gstreamer-check/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-check/sys/tests/abi.rs b/gstreamer-check/sys/tests/abi.rs index fee0ec182..7e16f273b 100644 --- a/gstreamer-check/sys/tests/abi.rs +++ b/gstreamer-check/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_check_sys::*; use std::env; diff --git a/gstreamer-controller/src/auto/argb_control_binding.rs b/gstreamer-controller/src/auto/argb_control_binding.rs index 933fc8926..11004a03a 100644 --- a/gstreamer-controller/src/auto/argb_control_binding.rs +++ b/gstreamer-controller/src/auto/argb_control_binding.rs @@ -49,89 +49,53 @@ impl ARGBControlBinding { unsafe impl Send for ARGBControlBinding {} unsafe impl Sync for ARGBControlBinding {} -pub trait ARGBControlBindingExt: 'static { - #[doc(alias = "control-source-a")] - fn control_source_a(&self) -> Option; - - #[doc(alias = "control-source-a")] - fn set_control_source_a>(&self, control_source_a: Option<&P>); - - #[doc(alias = "control-source-b")] - fn control_source_b(&self) -> Option; - - #[doc(alias = "control-source-b")] - fn set_control_source_b>(&self, control_source_b: Option<&P>); - - #[doc(alias = "control-source-g")] - fn control_source_g(&self) -> Option; - - #[doc(alias = "control-source-g")] - fn set_control_source_g>(&self, control_source_g: Option<&P>); - - #[doc(alias = "control-source-r")] - fn control_source_r(&self) -> Option; - - #[doc(alias = "control-source-r")] - fn set_control_source_r>(&self, control_source_r: Option<&P>); - - #[doc(alias = "control-source-a")] - fn connect_control_source_a_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "control-source-b")] - fn connect_control_source_b_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "control-source-g")] - fn connect_control_source_g_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "control-source-r")] - fn connect_control_source_r_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> ARGBControlBindingExt for O { +pub trait ARGBControlBindingExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "control-source-a")] fn control_source_a(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "control-source-a") } + #[doc(alias = "control-source-a")] fn set_control_source_a>(&self, control_source_a: Option<&P>) { glib::ObjectExt::set_property(self.as_ref(), "control-source-a", control_source_a) } + #[doc(alias = "control-source-b")] fn control_source_b(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "control-source-b") } + #[doc(alias = "control-source-b")] fn set_control_source_b>(&self, control_source_b: Option<&P>) { glib::ObjectExt::set_property(self.as_ref(), "control-source-b", control_source_b) } + #[doc(alias = "control-source-g")] fn control_source_g(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "control-source-g") } + #[doc(alias = "control-source-g")] fn set_control_source_g>(&self, control_source_g: Option<&P>) { glib::ObjectExt::set_property(self.as_ref(), "control-source-g", control_source_g) } + #[doc(alias = "control-source-r")] fn control_source_r(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "control-source-r") } + #[doc(alias = "control-source-r")] fn set_control_source_r>(&self, control_source_r: Option<&P>) { glib::ObjectExt::set_property(self.as_ref(), "control-source-r", control_source_r) } + #[doc(alias = "control-source-a")] fn connect_control_source_a_notify( &self, f: F, @@ -160,6 +124,7 @@ impl> ARGBControlBindingExt for O { } } + #[doc(alias = "control-source-b")] fn connect_control_source_b_notify( &self, f: F, @@ -188,6 +153,7 @@ impl> ARGBControlBindingExt for O { } } + #[doc(alias = "control-source-g")] fn connect_control_source_g_notify( &self, f: F, @@ -216,6 +182,7 @@ impl> ARGBControlBindingExt for O { } } + #[doc(alias = "control-source-r")] fn connect_control_source_r_notify( &self, f: F, @@ -244,3 +211,5 @@ impl> ARGBControlBindingExt for O { } } } + +impl> ARGBControlBindingExt for O {} diff --git a/gstreamer-controller/src/auto/direct_control_binding.rs b/gstreamer-controller/src/auto/direct_control_binding.rs index 1a18e2892..d7e415dc6 100644 --- a/gstreamer-controller/src/auto/direct_control_binding.rs +++ b/gstreamer-controller/src/auto/direct_control_binding.rs @@ -60,35 +60,27 @@ impl DirectControlBinding { unsafe impl Send for DirectControlBinding {} unsafe impl Sync for DirectControlBinding {} -pub trait DirectControlBindingExt: 'static { - fn is_absolute(&self) -> bool; - - #[doc(alias = "control-source")] - fn control_source(&self) -> Option; - - #[doc(alias = "control-source")] - fn set_control_source>(&self, control_source: Option<&P>); - - #[doc(alias = "control-source")] - fn connect_control_source_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> DirectControlBindingExt for O { +pub trait DirectControlBindingExt: IsA + sealed::Sealed + 'static { fn is_absolute(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "absolute") } + #[doc(alias = "control-source")] fn control_source(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "control-source") } + #[doc(alias = "control-source")] fn set_control_source>(&self, control_source: Option<&P>) { glib::ObjectExt::set_property(self.as_ref(), "control-source", control_source) } + #[doc(alias = "control-source")] fn connect_control_source_notify( &self, f: F, @@ -117,3 +109,5 @@ impl> DirectControlBindingExt for O { } } } + +impl> DirectControlBindingExt for O {} diff --git a/gstreamer-controller/src/auto/interpolation_control_source.rs b/gstreamer-controller/src/auto/interpolation_control_source.rs index 815720c32..a779d944a 100644 --- a/gstreamer-controller/src/auto/interpolation_control_source.rs +++ b/gstreamer-controller/src/auto/interpolation_control_source.rs @@ -42,16 +42,14 @@ impl Default for InterpolationControlSource { unsafe impl Send for InterpolationControlSource {} unsafe impl Sync for InterpolationControlSource {} -pub trait InterpolationControlSourceExt: 'static { - fn mode(&self) -> InterpolationMode; - - fn set_mode(&self, mode: InterpolationMode); - - #[doc(alias = "mode")] - fn connect_mode_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> InterpolationControlSourceExt for O { +pub trait InterpolationControlSourceExt: + IsA + sealed::Sealed + 'static +{ fn mode(&self) -> InterpolationMode { glib::ObjectExt::property(self.as_ref(), "mode") } @@ -60,6 +58,7 @@ impl> InterpolationControlSourceExt for O { glib::ObjectExt::set_property(self.as_ref(), "mode", mode) } + #[doc(alias = "mode")] fn connect_mode_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_mode_trampoline< P: IsA, @@ -85,3 +84,5 @@ impl> InterpolationControlSourceExt for O { } } } + +impl> InterpolationControlSourceExt for O {} diff --git a/gstreamer-controller/src/auto/lfo_control_source.rs b/gstreamer-controller/src/auto/lfo_control_source.rs index 379e63966..14ba770b7 100644 --- a/gstreamer-controller/src/auto/lfo_control_source.rs +++ b/gstreamer-controller/src/auto/lfo_control_source.rs @@ -41,56 +41,12 @@ impl Default for LFOControlSource { unsafe impl Send for LFOControlSource {} unsafe impl Sync for LFOControlSource {} -pub trait LFOControlSourceExt: 'static { - fn amplitude(&self) -> f64; - - fn set_amplitude(&self, amplitude: f64); - - fn frequency(&self) -> f64; - - fn set_frequency(&self, frequency: f64); - - fn offset(&self) -> f64; - - fn set_offset(&self, offset: f64); - - fn timeshift(&self) -> u64; - - fn set_timeshift(&self, timeshift: u64); - - fn waveform(&self) -> LFOWaveform; - - fn set_waveform(&self, waveform: LFOWaveform); - - #[doc(alias = "amplitude")] - fn connect_amplitude_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "frequency")] - fn connect_frequency_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "offset")] - fn connect_offset_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "timeshift")] - fn connect_timeshift_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "waveform")] - fn connect_waveform_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> LFOControlSourceExt for O { +pub trait LFOControlSourceExt: IsA + sealed::Sealed + 'static { fn amplitude(&self) -> f64 { glib::ObjectExt::property(self.as_ref(), "amplitude") } @@ -131,6 +87,7 @@ impl> LFOControlSourceExt for O { glib::ObjectExt::set_property(self.as_ref(), "waveform", waveform) } + #[doc(alias = "amplitude")] fn connect_amplitude_notify( &self, f: F, @@ -159,6 +116,7 @@ impl> LFOControlSourceExt for O { } } + #[doc(alias = "frequency")] fn connect_frequency_notify( &self, f: F, @@ -187,6 +145,7 @@ impl> LFOControlSourceExt for O { } } + #[doc(alias = "offset")] fn connect_offset_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_offset_trampoline< P: IsA, @@ -212,6 +171,7 @@ impl> LFOControlSourceExt for O { } } + #[doc(alias = "timeshift")] fn connect_timeshift_notify( &self, f: F, @@ -240,6 +200,7 @@ impl> LFOControlSourceExt for O { } } + #[doc(alias = "waveform")] fn connect_waveform_notify( &self, f: F, @@ -268,3 +229,5 @@ impl> LFOControlSourceExt for O { } } } + +impl> LFOControlSourceExt for O {} diff --git a/gstreamer-controller/src/auto/timed_value_control_source.rs b/gstreamer-controller/src/auto/timed_value_control_source.rs index e9cd261ac..fca826178 100644 --- a/gstreamer-controller/src/auto/timed_value_control_source.rs +++ b/gstreamer-controller/src/auto/timed_value_control_source.rs @@ -27,62 +27,32 @@ impl TimedValueControlSource { unsafe impl Send for TimedValueControlSource {} unsafe impl Sync for TimedValueControlSource {} -pub trait TimedValueControlSourceExt: 'static { - //#[doc(alias = "gst_timed_value_control_source_find_control_point_iter")] - //fn find_control_point_iter(&self, timestamp: impl Into>) -> /*Ignored*/Option; - - //#[doc(alias = "gst_timed_value_control_source_get_all")] - //#[doc(alias = "get_all")] - //fn all(&self) -> /*Ignored*/Vec; - - #[doc(alias = "gst_timed_value_control_source_get_count")] - #[doc(alias = "get_count")] - fn count(&self) -> i32; - - #[doc(alias = "gst_timed_value_control_source_set")] - fn set(&self, timestamp: gst::ClockTime, value: f64) -> bool; - - //#[doc(alias = "gst_timed_value_control_source_set_from_list")] - //fn set_from_list(&self, timedvalues: /*Ignored*/&[gst::TimedValue]) -> bool; - - #[doc(alias = "gst_timed_value_control_source_unset")] - fn unset(&self, timestamp: gst::ClockTime) -> bool; - - #[doc(alias = "gst_timed_value_control_source_unset_all")] - fn unset_all(&self); - - #[doc(alias = "value-added")] - fn connect_value_added( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "value-changed")] - fn connect_value_changed( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "value-removed")] - fn connect_value_removed( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> TimedValueControlSourceExt for O { +pub trait TimedValueControlSourceExt: + IsA + sealed::Sealed + 'static +{ + //#[doc(alias = "gst_timed_value_control_source_find_control_point_iter")] //fn find_control_point_iter(&self, timestamp: impl Into>) -> /*Ignored*/Option { // unsafe { TODO: call ffi:gst_timed_value_control_source_find_control_point_iter() } //} + //#[doc(alias = "gst_timed_value_control_source_get_all")] + //#[doc(alias = "get_all")] //fn all(&self) -> /*Ignored*/Vec { // unsafe { TODO: call ffi:gst_timed_value_control_source_get_all() } //} + #[doc(alias = "gst_timed_value_control_source_get_count")] + #[doc(alias = "get_count")] fn count(&self) -> i32 { unsafe { ffi::gst_timed_value_control_source_get_count(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_timed_value_control_source_set")] fn set(&self, timestamp: gst::ClockTime, value: f64) -> bool { unsafe { from_glib(ffi::gst_timed_value_control_source_set( @@ -93,10 +63,12 @@ impl> TimedValueControlSourceExt for O { } } + //#[doc(alias = "gst_timed_value_control_source_set_from_list")] //fn set_from_list(&self, timedvalues: /*Ignored*/&[gst::TimedValue]) -> bool { // unsafe { TODO: call ffi:gst_timed_value_control_source_set_from_list() } //} + #[doc(alias = "gst_timed_value_control_source_unset")] fn unset(&self, timestamp: gst::ClockTime) -> bool { unsafe { from_glib(ffi::gst_timed_value_control_source_unset( @@ -106,12 +78,14 @@ impl> TimedValueControlSourceExt for O { } } + #[doc(alias = "gst_timed_value_control_source_unset_all")] fn unset_all(&self) { unsafe { ffi::gst_timed_value_control_source_unset_all(self.as_ref().to_glib_none().0); } } + #[doc(alias = "value-added")] fn connect_value_added( &self, f: F, @@ -143,6 +117,7 @@ impl> TimedValueControlSourceExt for O { } } + #[doc(alias = "value-changed")] fn connect_value_changed( &self, f: F, @@ -174,6 +149,7 @@ impl> TimedValueControlSourceExt for O { } } + #[doc(alias = "value-removed")] fn connect_value_removed( &self, f: F, @@ -205,3 +181,5 @@ impl> TimedValueControlSourceExt for O { } } } + +impl> TimedValueControlSourceExt for O {} diff --git a/gstreamer-controller/src/auto/trigger_control_source.rs b/gstreamer-controller/src/auto/trigger_control_source.rs index fba516044..2b7ab30ae 100644 --- a/gstreamer-controller/src/auto/trigger_control_source.rs +++ b/gstreamer-controller/src/auto/trigger_control_source.rs @@ -41,19 +41,12 @@ impl Default for TriggerControlSource { unsafe impl Send for TriggerControlSource {} unsafe impl Sync for TriggerControlSource {} -pub trait TriggerControlSourceExt: 'static { - fn tolerance(&self) -> i64; - - fn set_tolerance(&self, tolerance: i64); - - #[doc(alias = "tolerance")] - fn connect_tolerance_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> TriggerControlSourceExt for O { +pub trait TriggerControlSourceExt: IsA + sealed::Sealed + 'static { fn tolerance(&self) -> i64 { glib::ObjectExt::property(self.as_ref(), "tolerance") } @@ -62,6 +55,7 @@ impl> TriggerControlSourceExt for O { glib::ObjectExt::set_property(self.as_ref(), "tolerance", tolerance) } + #[doc(alias = "tolerance")] fn connect_tolerance_notify( &self, f: F, @@ -90,3 +84,5 @@ impl> TriggerControlSourceExt for O { } } } + +impl> TriggerControlSourceExt for O {} diff --git a/gstreamer-controller/src/auto/versions.txt b/gstreamer-controller/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-controller/src/auto/versions.txt +++ b/gstreamer-controller/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-controller/sys/src/auto/versions.txt b/gstreamer-controller/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-controller/sys/src/auto/versions.txt +++ b/gstreamer-controller/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-controller/sys/tests/abi.rs b/gstreamer-controller/sys/tests/abi.rs index 3958a4e59..cb9c6fefc 100644 --- a/gstreamer-controller/sys/tests/abi.rs +++ b/gstreamer-controller/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_controller_sys::*; use std::env; diff --git a/gstreamer-editing-services/src/auto/asset.rs b/gstreamer-editing-services/src/auto/asset.rs index 6e5222435..09e16a989 100644 --- a/gstreamer-editing-services/src/auto/asset.rs +++ b/gstreamer-editing-services/src/auto/asset.rs @@ -129,52 +129,13 @@ impl Asset { unsafe impl Send for Asset {} unsafe impl Sync for Asset {} -pub trait AssetExt: 'static { - #[doc(alias = "ges_asset_extract")] - fn extract(&self) -> Result; - - #[doc(alias = "ges_asset_get_error")] - #[doc(alias = "get_error")] - fn error(&self) -> Option; - - #[doc(alias = "ges_asset_get_extractable_type")] - #[doc(alias = "get_extractable_type")] - fn extractable_type(&self) -> glib::types::Type; - - #[doc(alias = "ges_asset_get_id")] - #[doc(alias = "get_id")] - fn id(&self) -> glib::GString; - - #[doc(alias = "ges_asset_get_proxy")] - #[doc(alias = "get_proxy")] - #[must_use] - fn proxy(&self) -> Option; - - #[doc(alias = "ges_asset_get_proxy_target")] - #[doc(alias = "get_proxy_target")] - #[must_use] - fn proxy_target(&self) -> Option; - - #[doc(alias = "ges_asset_list_proxies")] - fn list_proxies(&self) -> Vec; - - #[doc(alias = "ges_asset_set_proxy")] - fn set_proxy(&self, proxy: Option<&impl IsA>) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_asset_unproxy")] - fn unproxy(&self, proxy: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "proxy")] - fn connect_proxy_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "proxy-target")] - fn connect_proxy_target_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> AssetExt for O { +pub trait AssetExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_asset_extract")] fn extract(&self) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -187,10 +148,14 @@ impl> AssetExt for O { } } + #[doc(alias = "ges_asset_get_error")] + #[doc(alias = "get_error")] fn error(&self) -> Option { unsafe { from_glib_none(ffi::ges_asset_get_error(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_asset_get_extractable_type")] + #[doc(alias = "get_extractable_type")] fn extractable_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::ges_asset_get_extractable_type( @@ -199,14 +164,22 @@ impl> AssetExt for O { } } + #[doc(alias = "ges_asset_get_id")] + #[doc(alias = "get_id")] fn id(&self) -> glib::GString { unsafe { from_glib_none(ffi::ges_asset_get_id(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_asset_get_proxy")] + #[doc(alias = "get_proxy")] + #[must_use] fn proxy(&self) -> Option { unsafe { from_glib_none(ffi::ges_asset_get_proxy(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_asset_get_proxy_target")] + #[doc(alias = "get_proxy_target")] + #[must_use] fn proxy_target(&self) -> Option { unsafe { from_glib_none(ffi::ges_asset_get_proxy_target( @@ -215,6 +188,7 @@ impl> AssetExt for O { } } + #[doc(alias = "ges_asset_list_proxies")] fn list_proxies(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::ges_asset_list_proxies( @@ -223,6 +197,7 @@ impl> AssetExt for O { } } + #[doc(alias = "ges_asset_set_proxy")] fn set_proxy(&self, proxy: Option<&impl IsA>) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -235,6 +210,7 @@ impl> AssetExt for O { } } + #[doc(alias = "ges_asset_unproxy")] fn unproxy(&self, proxy: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -247,6 +223,7 @@ impl> AssetExt for O { } } + #[doc(alias = "proxy")] fn connect_proxy_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_proxy_trampoline< P: IsA, @@ -272,6 +249,7 @@ impl> AssetExt for O { } } + #[doc(alias = "proxy-target")] fn connect_proxy_target_notify( &self, f: F, @@ -300,3 +278,5 @@ impl> AssetExt for O { } } } + +impl> AssetExt for O {} diff --git a/gstreamer-editing-services/src/auto/audio_test_source.rs b/gstreamer-editing-services/src/auto/audio_test_source.rs index e6844ebd8..91e86002c 100644 --- a/gstreamer-editing-services/src/auto/audio_test_source.rs +++ b/gstreamer-editing-services/src/auto/audio_test_source.rs @@ -19,40 +19,37 @@ impl AudioTestSource { pub const NONE: Option<&'static AudioTestSource> = None; } -pub trait AudioTestSourceExt: 'static { - #[doc(alias = "ges_audio_test_source_get_freq")] - #[doc(alias = "get_freq")] - fn freq(&self) -> f64; - - #[doc(alias = "ges_audio_test_source_get_volume")] - #[doc(alias = "get_volume")] - fn volume(&self) -> f64; - - #[doc(alias = "ges_audio_test_source_set_freq")] - fn set_freq(&self, freq: f64); - - #[doc(alias = "ges_audio_test_source_set_volume")] - fn set_volume(&self, volume: f64); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> AudioTestSourceExt for O { +pub trait AudioTestSourceExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_audio_test_source_get_freq")] + #[doc(alias = "get_freq")] fn freq(&self) -> f64 { unsafe { ffi::ges_audio_test_source_get_freq(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_audio_test_source_get_volume")] + #[doc(alias = "get_volume")] fn volume(&self) -> f64 { unsafe { ffi::ges_audio_test_source_get_volume(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_audio_test_source_set_freq")] fn set_freq(&self, freq: f64) { unsafe { ffi::ges_audio_test_source_set_freq(self.as_ref().to_glib_none().0, freq); } } + #[doc(alias = "ges_audio_test_source_set_volume")] fn set_volume(&self, volume: f64) { unsafe { ffi::ges_audio_test_source_set_volume(self.as_ref().to_glib_none().0, volume); } } } + +impl> AudioTestSourceExt for O {} diff --git a/gstreamer-editing-services/src/auto/audio_uri_source.rs b/gstreamer-editing-services/src/auto/audio_uri_source.rs index 7653ab0fc..1683bbc1f 100644 --- a/gstreamer-editing-services/src/auto/audio_uri_source.rs +++ b/gstreamer-editing-services/src/auto/audio_uri_source.rs @@ -19,12 +19,15 @@ impl AudioUriSource { pub const NONE: Option<&'static AudioUriSource> = None; } -pub trait AudioUriSourceExt: 'static { - fn uri(&self) -> Option; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> AudioUriSourceExt for O { +pub trait AudioUriSourceExt: IsA + sealed::Sealed + 'static { fn uri(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "uri") } } + +impl> AudioUriSourceExt for O {} diff --git a/gstreamer-editing-services/src/auto/base_effect.rs b/gstreamer-editing-services/src/auto/base_effect.rs index c05bff1f7..0758a3f2f 100644 --- a/gstreamer-editing-services/src/auto/base_effect.rs +++ b/gstreamer-editing-services/src/auto/base_effect.rs @@ -22,21 +22,15 @@ impl BaseEffect { pub const NONE: Option<&'static BaseEffect> = None; } -pub trait BaseEffectExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait BaseEffectExt: IsA + sealed::Sealed + 'static { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "ges_base_effect_is_time_effect")] - fn is_time_effect(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_base_effect_register_time_property")] - fn register_time_property(&self, child_property_name: &str) -> bool; -} - -impl> BaseEffectExt for O { - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn is_time_effect(&self) -> bool { unsafe { from_glib(ffi::ges_base_effect_is_time_effect( @@ -47,6 +41,7 @@ impl> BaseEffectExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_base_effect_register_time_property")] fn register_time_property(&self, child_property_name: &str) -> bool { unsafe { from_glib(ffi::ges_base_effect_register_time_property( @@ -56,3 +51,5 @@ impl> BaseEffectExt for O { } } } + +impl> BaseEffectExt for O {} diff --git a/gstreamer-editing-services/src/auto/clip.rs b/gstreamer-editing-services/src/auto/clip.rs index addcd1355..3328b2f54 100644 --- a/gstreamer-editing-services/src/auto/clip.rs +++ b/gstreamer-editing-services/src/auto/clip.rs @@ -33,154 +33,13 @@ impl Clip { pub const NONE: Option<&'static Clip> = None; } -pub trait ClipExt: 'static { - #[doc(alias = "ges_clip_add_asset")] - fn add_asset(&self, asset: &impl IsA) -> Result; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_clip_add_child_to_track")] - fn add_child_to_track( - &self, - child: &impl IsA, - track: &impl IsA, - ) -> Result; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_clip_add_top_effect")] - fn add_top_effect(&self, effect: &impl IsA, index: i32) -> Result<(), glib::Error>; - - #[doc(alias = "ges_clip_find_track_element")] - fn find_track_element( - &self, - track: Option<&impl IsA>, - type_: glib::types::Type, - ) -> Option; - - #[doc(alias = "ges_clip_find_track_elements")] - fn find_track_elements( - &self, - track: Option<&impl IsA>, - track_type: TrackType, - type_: glib::types::Type, - ) -> Vec; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_clip_get_duration_limit")] - #[doc(alias = "get_duration_limit")] - fn duration_limit(&self) -> gst::ClockTime; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_clip_get_internal_time_from_timeline_time")] - #[doc(alias = "get_internal_time_from_timeline_time")] - fn internal_time_from_timeline_time( - &self, - child: &impl IsA, - timeline_time: impl Into>, - ) -> Result, glib::Error>; - - #[doc(alias = "ges_clip_get_layer")] - #[doc(alias = "get_layer")] - fn layer(&self) -> Option; - - #[doc(alias = "ges_clip_get_supported_formats")] - #[doc(alias = "get_supported_formats")] - fn supported_formats(&self) -> TrackType; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_clip_get_timeline_time_from_internal_time")] - #[doc(alias = "get_timeline_time_from_internal_time")] - fn timeline_time_from_internal_time( - &self, - child: &impl IsA, - internal_time: impl Into>, - ) -> Result, glib::Error>; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_clip_get_timeline_time_from_source_frame")] - #[doc(alias = "get_timeline_time_from_source_frame")] - fn timeline_time_from_source_frame( - &self, - frame_number: FrameNumber, - ) -> Result, glib::Error>; - - #[doc(alias = "ges_clip_get_top_effect_index")] - #[doc(alias = "get_top_effect_index")] - fn top_effect_index(&self, effect: &impl IsA) -> i32; - - #[doc(alias = "ges_clip_get_top_effect_position")] - #[doc(alias = "get_top_effect_position")] - fn top_effect_position(&self, effect: &impl IsA) -> i32; - - #[doc(alias = "ges_clip_get_top_effects")] - #[doc(alias = "get_top_effects")] - fn top_effects(&self) -> Vec; - - #[doc(alias = "ges_clip_move_to_layer")] - fn move_to_layer(&self, layer: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_clip_move_to_layer_full")] - fn move_to_layer_full(&self, layer: &impl IsA) -> Result<(), glib::Error>; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_clip_remove_top_effect")] - fn remove_top_effect(&self, effect: &impl IsA) -> Result<(), glib::Error>; - - #[doc(alias = "ges_clip_set_supported_formats")] - fn set_supported_formats(&self, supportedformats: TrackType); - - #[doc(alias = "ges_clip_set_top_effect_index")] - fn set_top_effect_index( - &self, - effect: &impl IsA, - newindex: u32, - ) -> Result<(), glib::error::BoolError>; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_clip_set_top_effect_index_full")] - fn set_top_effect_index_full( - &self, - effect: &impl IsA, - newindex: u32, - ) -> Result<(), glib::Error>; - - #[doc(alias = "ges_clip_set_top_effect_priority")] - fn set_top_effect_priority( - &self, - effect: &impl IsA, - newpriority: u32, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_clip_split")] - fn split(&self, position: u64) -> Result; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_clip_split_full")] - fn split_full(&self, position: u64) -> Result, glib::Error>; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "duration-limit")] - fn connect_duration_limit_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "layer")] - fn connect_layer_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "supported-formats")] - fn connect_supported_formats_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> ClipExt for O { +pub trait ClipExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_clip_add_asset")] fn add_asset(&self, asset: &impl IsA) -> Result { unsafe { Option::<_>::from_glib_none(ffi::ges_clip_add_asset( @@ -193,6 +52,7 @@ impl> ClipExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_clip_add_child_to_track")] fn add_child_to_track( &self, child: &impl IsA, @@ -216,6 +76,7 @@ impl> ClipExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_clip_add_top_effect")] fn add_top_effect(&self, effect: &impl IsA, index: i32) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -234,6 +95,7 @@ impl> ClipExt for O { } } + #[doc(alias = "ges_clip_find_track_element")] fn find_track_element( &self, track: Option<&impl IsA>, @@ -248,6 +110,7 @@ impl> ClipExt for O { } } + #[doc(alias = "ges_clip_find_track_elements")] fn find_track_elements( &self, track: Option<&impl IsA>, @@ -266,6 +129,8 @@ impl> ClipExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_clip_get_duration_limit")] + #[doc(alias = "get_duration_limit")] fn duration_limit(&self) -> gst::ClockTime { unsafe { try_from_glib(ffi::ges_clip_get_duration_limit( @@ -277,6 +142,8 @@ impl> ClipExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_clip_get_internal_time_from_timeline_time")] + #[doc(alias = "get_internal_time_from_timeline_time")] fn internal_time_from_timeline_time( &self, child: &impl IsA, @@ -298,10 +165,14 @@ impl> ClipExt for O { } } + #[doc(alias = "ges_clip_get_layer")] + #[doc(alias = "get_layer")] fn layer(&self) -> Option { unsafe { from_glib_full(ffi::ges_clip_get_layer(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_clip_get_supported_formats")] + #[doc(alias = "get_supported_formats")] fn supported_formats(&self) -> TrackType { unsafe { from_glib(ffi::ges_clip_get_supported_formats( @@ -312,6 +183,8 @@ impl> ClipExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_clip_get_timeline_time_from_internal_time")] + #[doc(alias = "get_timeline_time_from_internal_time")] fn timeline_time_from_internal_time( &self, child: &impl IsA, @@ -335,6 +208,8 @@ impl> ClipExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_clip_get_timeline_time_from_source_frame")] + #[doc(alias = "get_timeline_time_from_source_frame")] fn timeline_time_from_source_frame( &self, frame_number: FrameNumber, @@ -354,6 +229,8 @@ impl> ClipExt for O { } } + #[doc(alias = "ges_clip_get_top_effect_index")] + #[doc(alias = "get_top_effect_index")] fn top_effect_index(&self, effect: &impl IsA) -> i32 { unsafe { ffi::ges_clip_get_top_effect_index( @@ -363,6 +240,8 @@ impl> ClipExt for O { } } + #[doc(alias = "ges_clip_get_top_effect_position")] + #[doc(alias = "get_top_effect_position")] fn top_effect_position(&self, effect: &impl IsA) -> i32 { unsafe { ffi::ges_clip_get_top_effect_position( @@ -372,6 +251,8 @@ impl> ClipExt for O { } } + #[doc(alias = "ges_clip_get_top_effects")] + #[doc(alias = "get_top_effects")] fn top_effects(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::ges_clip_get_top_effects( @@ -380,6 +261,7 @@ impl> ClipExt for O { } } + #[doc(alias = "ges_clip_move_to_layer")] fn move_to_layer(&self, layer: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -394,6 +276,7 @@ impl> ClipExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_clip_move_to_layer_full")] fn move_to_layer_full(&self, layer: &impl IsA) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -413,6 +296,7 @@ impl> ClipExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_clip_remove_top_effect")] fn remove_top_effect(&self, effect: &impl IsA) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -430,6 +314,7 @@ impl> ClipExt for O { } } + #[doc(alias = "ges_clip_set_supported_formats")] fn set_supported_formats(&self, supportedformats: TrackType) { unsafe { ffi::ges_clip_set_supported_formats( @@ -439,6 +324,7 @@ impl> ClipExt for O { } } + #[doc(alias = "ges_clip_set_top_effect_index")] fn set_top_effect_index( &self, effect: &impl IsA, @@ -458,6 +344,7 @@ impl> ClipExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_clip_set_top_effect_index_full")] fn set_top_effect_index_full( &self, effect: &impl IsA, @@ -480,6 +367,7 @@ impl> ClipExt for O { } } + #[doc(alias = "ges_clip_set_top_effect_priority")] fn set_top_effect_priority( &self, effect: &impl IsA, @@ -497,6 +385,7 @@ impl> ClipExt for O { } } + #[doc(alias = "ges_clip_split")] fn split(&self, position: u64) -> Result { unsafe { Option::<_>::from_glib_none(ffi::ges_clip_split( @@ -509,6 +398,7 @@ impl> ClipExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_clip_split_full")] fn split_full(&self, position: u64) -> Result, glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -524,6 +414,7 @@ impl> ClipExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "duration-limit")] fn connect_duration_limit_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_duration_limit_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESClip, @@ -546,6 +437,7 @@ impl> ClipExt for O { } } + #[doc(alias = "layer")] fn connect_layer_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_layer_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESClip, @@ -568,6 +460,7 @@ impl> ClipExt for O { } } + #[doc(alias = "supported-formats")] fn connect_supported_formats_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_supported_formats_trampoline< P: IsA, @@ -593,3 +486,5 @@ impl> ClipExt for O { } } } + +impl> ClipExt for O {} diff --git a/gstreamer-editing-services/src/auto/clip_asset.rs b/gstreamer-editing-services/src/auto/clip_asset.rs index 5133aa4a2..0ae4a9cd5 100644 --- a/gstreamer-editing-services/src/auto/clip_asset.rs +++ b/gstreamer-editing-services/src/auto/clip_asset.rs @@ -33,36 +33,16 @@ impl ClipAsset { unsafe impl Send for ClipAsset {} unsafe impl Sync for ClipAsset {} -pub trait ClipAssetExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait ClipAssetExt: IsA + sealed::Sealed + 'static { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "ges_clip_asset_get_frame_time")] #[doc(alias = "get_frame_time")] - fn frame_time(&self, frame_number: FrameNumber) -> Option; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_clip_asset_get_natural_framerate")] - #[doc(alias = "get_natural_framerate")] - fn natural_framerate(&self) -> Option<(i32, i32)>; - - #[doc(alias = "ges_clip_asset_get_supported_formats")] - #[doc(alias = "get_supported_formats")] - fn supported_formats(&self) -> TrackType; - - #[doc(alias = "ges_clip_asset_set_supported_formats")] - fn set_supported_formats(&self, supportedformats: TrackType); - - #[doc(alias = "supported-formats")] - fn connect_supported_formats_notify( - &self, - f: F, - ) -> SignalHandlerId; -} - -impl> ClipAssetExt for O { - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn frame_time(&self, frame_number: FrameNumber) -> Option { unsafe { from_glib(ffi::ges_clip_asset_get_frame_time( @@ -74,6 +54,8 @@ impl> ClipAssetExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_clip_asset_get_natural_framerate")] + #[doc(alias = "get_natural_framerate")] fn natural_framerate(&self) -> Option<(i32, i32)> { unsafe { let mut framerate_n = mem::MaybeUninit::uninit(); @@ -91,6 +73,8 @@ impl> ClipAssetExt for O { } } + #[doc(alias = "ges_clip_asset_get_supported_formats")] + #[doc(alias = "get_supported_formats")] fn supported_formats(&self) -> TrackType { unsafe { from_glib(ffi::ges_clip_asset_get_supported_formats( @@ -99,6 +83,7 @@ impl> ClipAssetExt for O { } } + #[doc(alias = "ges_clip_asset_set_supported_formats")] fn set_supported_formats(&self, supportedformats: TrackType) { unsafe { ffi::ges_clip_asset_set_supported_formats( @@ -108,6 +93,7 @@ impl> ClipAssetExt for O { } } + #[doc(alias = "supported-formats")] fn connect_supported_formats_notify( &self, f: F, @@ -136,3 +122,5 @@ impl> ClipAssetExt for O { } } } + +impl> ClipAssetExt for O {} diff --git a/gstreamer-editing-services/src/auto/container.rs b/gstreamer-editing-services/src/auto/container.rs index ce46a44f3..79f74d85e 100644 --- a/gstreamer-editing-services/src/auto/container.rs +++ b/gstreamer-editing-services/src/auto/container.rs @@ -31,51 +31,13 @@ impl Container { } } -pub trait GESContainerExt: 'static { - #[doc(alias = "ges_container_add")] - fn add(&self, child: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[cfg_attr(feature = "v1_18", deprecated = "Since 1.18")] - #[allow(deprecated)] - #[doc(alias = "ges_container_edit")] - fn edit( - &self, - layers: &[Layer], - new_layer_priority: i32, - mode: EditMode, - edge: Edge, - position: u64, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_container_get_children")] - #[doc(alias = "get_children")] - fn children(&self, recursive: bool) -> Vec; - - #[doc(alias = "ges_container_remove")] - fn remove(&self, child: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_container_ungroup")] - fn ungroup(self, recursive: bool) -> Vec; - - fn height(&self) -> u32; - - #[doc(alias = "child-added")] - fn connect_child_added( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "child-removed")] - fn connect_child_removed( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "height")] - fn connect_height_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> GESContainerExt for O { +pub trait GESContainerExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_container_add")] fn add(&self, child: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -88,7 +50,9 @@ impl> GESContainerExt for O { } } + #[cfg_attr(feature = "v1_18", deprecated = "Since 1.18")] #[allow(deprecated)] + #[doc(alias = "ges_container_edit")] fn edit( &self, layers: &[Layer], @@ -112,6 +76,8 @@ impl> GESContainerExt for O { } } + #[doc(alias = "ges_container_get_children")] + #[doc(alias = "get_children")] fn children(&self, recursive: bool) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::ges_container_get_children( @@ -121,6 +87,7 @@ impl> GESContainerExt for O { } } + #[doc(alias = "ges_container_remove")] fn remove(&self, child: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -133,6 +100,7 @@ impl> GESContainerExt for O { } } + #[doc(alias = "ges_container_ungroup")] fn ungroup(self, recursive: bool) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::ges_container_ungroup( @@ -146,6 +114,7 @@ impl> GESContainerExt for O { glib::ObjectExt::property(self.as_ref(), "height") } + #[doc(alias = "child-added")] fn connect_child_added( &self, f: F, @@ -177,6 +146,7 @@ impl> GESContainerExt for O { } } + #[doc(alias = "child-removed")] fn connect_child_removed( &self, f: F, @@ -208,6 +178,7 @@ impl> GESContainerExt for O { } } + #[doc(alias = "height")] fn connect_height_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_height_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESContainer, @@ -230,3 +201,5 @@ impl> GESContainerExt for O { } } } + +impl> GESContainerExt for O {} diff --git a/gstreamer-editing-services/src/auto/effect.rs b/gstreamer-editing-services/src/auto/effect.rs index 92134c73d..699775e2f 100644 --- a/gstreamer-editing-services/src/auto/effect.rs +++ b/gstreamer-editing-services/src/auto/effect.rs @@ -28,13 +28,16 @@ impl Effect { } } -pub trait EffectExt: 'static { - #[doc(alias = "bin-description")] - fn bin_description(&self) -> Option; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> EffectExt for O { +pub trait EffectExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "bin-description")] fn bin_description(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "bin-description") } } + +impl> EffectExt for O {} diff --git a/gstreamer-editing-services/src/auto/effect_clip.rs b/gstreamer-editing-services/src/auto/effect_clip.rs index 88729010c..98fee22d3 100644 --- a/gstreamer-editing-services/src/auto/effect_clip.rs +++ b/gstreamer-editing-services/src/auto/effect_clip.rs @@ -35,20 +35,21 @@ impl EffectClip { } } -pub trait EffectClipExt: 'static { - #[doc(alias = "audio-bin-description")] - fn audio_bin_description(&self) -> Option; - - #[doc(alias = "video-bin-description")] - fn video_bin_description(&self) -> Option; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> EffectClipExt for O { +pub trait EffectClipExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "audio-bin-description")] fn audio_bin_description(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "audio-bin-description") } + #[doc(alias = "video-bin-description")] fn video_bin_description(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "video-bin-description") } } + +impl> EffectClipExt for O {} diff --git a/gstreamer-editing-services/src/auto/extractable.rs b/gstreamer-editing-services/src/auto/extractable.rs index 9174b0c46..906cbf14b 100644 --- a/gstreamer-editing-services/src/auto/extractable.rs +++ b/gstreamer-editing-services/src/auto/extractable.rs @@ -19,20 +19,14 @@ impl Extractable { pub const NONE: Option<&'static Extractable> = None; } -pub trait ExtractableExt: 'static { - #[doc(alias = "ges_extractable_get_asset")] - #[doc(alias = "get_asset")] - fn asset(&self) -> Option; - - #[doc(alias = "ges_extractable_get_id")] - #[doc(alias = "get_id")] - fn id(&self) -> glib::GString; - - #[doc(alias = "ges_extractable_set_asset")] - fn set_asset(&self, asset: &impl IsA) -> Result<(), glib::error::BoolError>; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> ExtractableExt for O { +pub trait ExtractableExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_extractable_get_asset")] + #[doc(alias = "get_asset")] fn asset(&self) -> Option { unsafe { from_glib_none(ffi::ges_extractable_get_asset( @@ -41,10 +35,13 @@ impl> ExtractableExt for O { } } + #[doc(alias = "ges_extractable_get_id")] + #[doc(alias = "get_id")] fn id(&self) -> glib::GString { unsafe { from_glib_full(ffi::ges_extractable_get_id(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_extractable_set_asset")] fn set_asset(&self, asset: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -57,3 +54,5 @@ impl> ExtractableExt for O { } } } + +impl> ExtractableExt for O {} diff --git a/gstreamer-editing-services/src/auto/formatter.rs b/gstreamer-editing-services/src/auto/formatter.rs index 954419b8e..400e4999c 100644 --- a/gstreamer-editing-services/src/auto/formatter.rs +++ b/gstreamer-editing-services/src/auto/formatter.rs @@ -59,25 +59,15 @@ impl Formatter { } } -pub trait FormatterExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait FormatterExt: IsA + sealed::Sealed + 'static { #[cfg_attr(feature = "v1_18", deprecated = "Since 1.18")] #[allow(deprecated)] #[doc(alias = "ges_formatter_load_from_uri")] - fn load_from_uri(&self, timeline: &impl IsA, uri: &str) -> Result<(), glib::Error>; - - #[cfg_attr(feature = "v1_18", deprecated = "Since 1.18")] - #[allow(deprecated)] - #[doc(alias = "ges_formatter_save_to_uri")] - fn save_to_uri( - &self, - timeline: &impl IsA, - uri: &str, - overwrite: bool, - ) -> Result<(), glib::Error>; -} - -impl> FormatterExt for O { - #[allow(deprecated)] fn load_from_uri(&self, timeline: &impl IsA, uri: &str) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -96,7 +86,9 @@ impl> FormatterExt for O { } } + #[cfg_attr(feature = "v1_18", deprecated = "Since 1.18")] #[allow(deprecated)] + #[doc(alias = "ges_formatter_save_to_uri")] fn save_to_uri( &self, timeline: &impl IsA, @@ -121,3 +113,5 @@ impl> FormatterExt for O { } } } + +impl> FormatterExt for O {} diff --git a/gstreamer-editing-services/src/auto/image_source.rs b/gstreamer-editing-services/src/auto/image_source.rs index 69d1529fa..cc7e3fb9f 100644 --- a/gstreamer-editing-services/src/auto/image_source.rs +++ b/gstreamer-editing-services/src/auto/image_source.rs @@ -19,12 +19,15 @@ impl ImageSource { pub const NONE: Option<&'static ImageSource> = None; } -pub trait ImageSourceExt: 'static { - fn uri(&self) -> Option; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> ImageSourceExt for O { +pub trait ImageSourceExt: IsA + sealed::Sealed + 'static { fn uri(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "uri") } } + +impl> ImageSourceExt for O {} diff --git a/gstreamer-editing-services/src/auto/layer.rs b/gstreamer-editing-services/src/auto/layer.rs index 277e028ca..ee92401ca 100644 --- a/gstreamer-editing-services/src/auto/layer.rs +++ b/gstreamer-editing-services/src/auto/layer.rs @@ -43,113 +43,13 @@ impl Default for Layer { } } -pub trait LayerExt: 'static { - #[doc(alias = "ges_layer_add_asset")] - fn add_asset( - &self, - asset: &impl IsA, - start: impl Into>, - inpoint: impl Into>, - duration: impl Into>, - track_types: TrackType, - ) -> Result; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_layer_add_asset_full")] - fn add_asset_full( - &self, - asset: &impl IsA, - start: impl Into>, - inpoint: impl Into>, - duration: impl Into>, - track_types: TrackType, - ) -> Result; - - #[doc(alias = "ges_layer_add_clip")] - fn add_clip(&self, clip: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_layer_add_clip_full")] - fn add_clip_full(&self, clip: &impl IsA) -> Result<(), glib::Error>; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_layer_get_active_for_track")] - #[doc(alias = "get_active_for_track")] - fn is_active_for_track(&self, track: &impl IsA) -> bool; - - #[doc(alias = "ges_layer_get_auto_transition")] - #[doc(alias = "get_auto_transition")] - fn is_auto_transition(&self) -> bool; - - #[doc(alias = "ges_layer_get_clips")] - #[doc(alias = "get_clips")] - fn clips(&self) -> Vec; - - #[doc(alias = "ges_layer_get_clips_in_interval")] - #[doc(alias = "get_clips_in_interval")] - fn clips_in_interval( - &self, - start: impl Into>, - end: impl Into>, - ) -> Vec; - - #[doc(alias = "ges_layer_get_duration")] - #[doc(alias = "get_duration")] - fn duration(&self) -> gst::ClockTime; - - #[doc(alias = "ges_layer_get_priority")] - #[doc(alias = "get_priority")] - fn priority(&self) -> u32; - - #[doc(alias = "ges_layer_get_timeline")] - #[doc(alias = "get_timeline")] - fn timeline(&self) -> Option; - - #[doc(alias = "ges_layer_is_empty")] - fn is_empty(&self) -> bool; - - #[doc(alias = "ges_layer_remove_clip")] - fn remove_clip(&self, clip: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_layer_set_active_for_tracks")] - fn set_active_for_tracks(&self, active: bool, tracks: &[Track]) -> bool; - - #[doc(alias = "ges_layer_set_auto_transition")] - fn set_auto_transition(&self, auto_transition: bool); - - #[cfg_attr(feature = "v1_16", deprecated = "Since 1.16")] - #[allow(deprecated)] - #[doc(alias = "ges_layer_set_priority")] - fn set_priority(&self, priority: u32); - - #[doc(alias = "ges_layer_set_timeline")] - fn set_timeline(&self, timeline: &impl IsA); - - //#[cfg(feature = "v1_18")] - //#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - //#[doc(alias = "active-changed")] - //fn connect_active_changed(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "clip-added")] - fn connect_clip_added(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "clip-removed")] - fn connect_clip_removed(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "auto-transition")] - fn connect_auto_transition_notify(&self, f: F) -> SignalHandlerId; - - #[cfg_attr(feature = "v1_16", deprecated = "Since 1.16")] - #[doc(alias = "priority")] - fn connect_priority_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> LayerExt for O { +pub trait LayerExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_layer_add_asset")] fn add_asset( &self, asset: &impl IsA, @@ -173,6 +73,7 @@ impl> LayerExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_layer_add_asset_full")] fn add_asset_full( &self, asset: &impl IsA, @@ -200,6 +101,7 @@ impl> LayerExt for O { } } + #[doc(alias = "ges_layer_add_clip")] fn add_clip(&self, clip: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -214,6 +116,7 @@ impl> LayerExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_layer_add_clip_full")] fn add_clip_full(&self, clip: &impl IsA) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -233,6 +136,8 @@ impl> LayerExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_layer_get_active_for_track")] + #[doc(alias = "get_active_for_track")] fn is_active_for_track(&self, track: &impl IsA) -> bool { unsafe { from_glib(ffi::ges_layer_get_active_for_track( @@ -242,6 +147,8 @@ impl> LayerExt for O { } } + #[doc(alias = "ges_layer_get_auto_transition")] + #[doc(alias = "get_auto_transition")] fn is_auto_transition(&self) -> bool { unsafe { from_glib(ffi::ges_layer_get_auto_transition( @@ -250,6 +157,8 @@ impl> LayerExt for O { } } + #[doc(alias = "ges_layer_get_clips")] + #[doc(alias = "get_clips")] fn clips(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::ges_layer_get_clips( @@ -258,6 +167,8 @@ impl> LayerExt for O { } } + #[doc(alias = "ges_layer_get_clips_in_interval")] + #[doc(alias = "get_clips_in_interval")] fn clips_in_interval( &self, start: impl Into>, @@ -272,6 +183,8 @@ impl> LayerExt for O { } } + #[doc(alias = "ges_layer_get_duration")] + #[doc(alias = "get_duration")] fn duration(&self) -> gst::ClockTime { unsafe { try_from_glib(ffi::ges_layer_get_duration(self.as_ref().to_glib_none().0)) @@ -279,18 +192,24 @@ impl> LayerExt for O { } } + #[doc(alias = "ges_layer_get_priority")] + #[doc(alias = "get_priority")] fn priority(&self) -> u32 { unsafe { ffi::ges_layer_get_priority(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_layer_get_timeline")] + #[doc(alias = "get_timeline")] fn timeline(&self) -> Option { unsafe { from_glib_none(ffi::ges_layer_get_timeline(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_layer_is_empty")] fn is_empty(&self) -> bool { unsafe { from_glib(ffi::ges_layer_is_empty(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_layer_remove_clip")] fn remove_clip(&self, clip: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -305,6 +224,7 @@ impl> LayerExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_layer_set_active_for_tracks")] fn set_active_for_tracks(&self, active: bool, tracks: &[Track]) -> bool { unsafe { from_glib(ffi::ges_layer_set_active_for_tracks( @@ -315,6 +235,7 @@ impl> LayerExt for O { } } + #[doc(alias = "ges_layer_set_auto_transition")] fn set_auto_transition(&self, auto_transition: bool) { unsafe { ffi::ges_layer_set_auto_transition( @@ -324,13 +245,16 @@ impl> LayerExt for O { } } + #[cfg_attr(feature = "v1_16", deprecated = "Since 1.16")] #[allow(deprecated)] + #[doc(alias = "ges_layer_set_priority")] fn set_priority(&self, priority: u32) { unsafe { ffi::ges_layer_set_priority(self.as_ref().to_glib_none().0, priority); } } + #[doc(alias = "ges_layer_set_timeline")] fn set_timeline(&self, timeline: &impl IsA) { unsafe { ffi::ges_layer_set_timeline( @@ -342,10 +266,12 @@ impl> LayerExt for O { //#[cfg(feature = "v1_18")] //#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + //#[doc(alias = "active-changed")] //fn connect_active_changed(&self, f: F) -> SignalHandlerId { // Empty ctype tracks: *.PtrArray TypeId { ns_id: 1, id: 17 } //} + #[doc(alias = "clip-added")] fn connect_clip_added(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn clip_added_trampoline, F: Fn(&P, &Clip) + 'static>( this: *mut ffi::GESLayer, @@ -371,6 +297,7 @@ impl> LayerExt for O { } } + #[doc(alias = "clip-removed")] fn connect_clip_removed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn clip_removed_trampoline, F: Fn(&P, &Clip) + 'static>( this: *mut ffi::GESLayer, @@ -396,6 +323,7 @@ impl> LayerExt for O { } } + #[doc(alias = "auto-transition")] fn connect_auto_transition_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_auto_transition_trampoline< P: IsA, @@ -421,6 +349,8 @@ impl> LayerExt for O { } } + #[cfg_attr(feature = "v1_16", deprecated = "Since 1.16")] + #[doc(alias = "priority")] fn connect_priority_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_priority_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESLayer, @@ -443,3 +373,5 @@ impl> LayerExt for O { } } } + +impl> LayerExt for O {} diff --git a/gstreamer-editing-services/src/auto/meta_container.rs b/gstreamer-editing-services/src/auto/meta_container.rs index b1b14b39a..f247282ba 100644 --- a/gstreamer-editing-services/src/auto/meta_container.rs +++ b/gstreamer-editing-services/src/auto/meta_container.rs @@ -27,164 +27,13 @@ impl MetaContainer { pub const NONE: Option<&'static MetaContainer> = None; } -pub trait MetaContainerExt: 'static { - #[doc(alias = "ges_meta_container_add_metas_from_string")] - fn add_metas_from_string(&self, str: &str) -> bool; - - #[doc(alias = "ges_meta_container_check_meta_registered")] - fn check_meta_registered(&self, meta_item: &str) -> Option<(MetaFlag, glib::types::Type)>; - - #[doc(alias = "ges_meta_container_foreach")] - fn foreach(&self, func: P); - - #[doc(alias = "ges_meta_container_get_boolean")] - #[doc(alias = "get_boolean")] - fn boolean(&self, meta_item: &str) -> Option; - - #[doc(alias = "ges_meta_container_get_date")] - #[doc(alias = "get_date")] - fn date(&self, meta_item: &str) -> Option; - - #[doc(alias = "ges_meta_container_get_date_time")] - #[doc(alias = "get_date_time")] - fn date_time(&self, meta_item: &str) -> Option; - - #[doc(alias = "ges_meta_container_get_double")] - #[doc(alias = "get_double")] - fn double(&self, meta_item: &str) -> Option; - - #[doc(alias = "ges_meta_container_get_float")] - #[doc(alias = "get_float")] - fn float(&self, meta_item: &str) -> Option; - - #[doc(alias = "ges_meta_container_get_int")] - #[doc(alias = "get_int")] - fn int(&self, meta_item: &str) -> Option; - - #[doc(alias = "ges_meta_container_get_int64")] - #[doc(alias = "get_int64")] - fn int64(&self, meta_item: &str) -> Option; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_meta_container_get_marker_list")] - #[doc(alias = "get_marker_list")] - fn marker_list(&self, key: &str) -> Option; - - #[doc(alias = "ges_meta_container_get_meta")] - #[doc(alias = "get_meta")] - fn meta(&self, key: &str) -> Option; - - #[doc(alias = "ges_meta_container_get_string")] - #[doc(alias = "get_string")] - fn string(&self, meta_item: &str) -> Option; - - #[doc(alias = "ges_meta_container_get_uint")] - #[doc(alias = "get_uint")] - fn uint(&self, meta_item: &str) -> Option; - - #[doc(alias = "ges_meta_container_get_uint64")] - #[doc(alias = "get_uint64")] - fn uint64(&self, meta_item: &str) -> Option; - - #[doc(alias = "ges_meta_container_metas_to_string")] - fn metas_to_string(&self) -> glib::GString; - - #[doc(alias = "ges_meta_container_register_meta")] - fn register_meta(&self, flags: MetaFlag, meta_item: &str, value: &glib::Value) -> bool; - - #[doc(alias = "ges_meta_container_register_meta_boolean")] - fn register_meta_boolean(&self, flags: MetaFlag, meta_item: &str, value: bool) -> bool; - - #[doc(alias = "ges_meta_container_register_meta_date")] - fn register_meta_date(&self, flags: MetaFlag, meta_item: &str, value: &glib::Date) -> bool; - - #[doc(alias = "ges_meta_container_register_meta_date_time")] - fn register_meta_date_time( - &self, - flags: MetaFlag, - meta_item: &str, - value: &gst::DateTime, - ) -> bool; - - #[doc(alias = "ges_meta_container_register_meta_double")] - fn register_meta_double(&self, flags: MetaFlag, meta_item: &str, value: f64) -> bool; - - #[doc(alias = "ges_meta_container_register_meta_float")] - fn register_meta_float(&self, flags: MetaFlag, meta_item: &str, value: f32) -> bool; - - #[doc(alias = "ges_meta_container_register_meta_int")] - fn register_meta_int(&self, flags: MetaFlag, meta_item: &str, value: i32) -> bool; - - #[doc(alias = "ges_meta_container_register_meta_int64")] - fn register_meta_int64(&self, flags: MetaFlag, meta_item: &str, value: i64) -> bool; - - #[doc(alias = "ges_meta_container_register_meta_string")] - fn register_meta_string(&self, flags: MetaFlag, meta_item: &str, value: &str) -> bool; - - #[doc(alias = "ges_meta_container_register_meta_uint")] - fn register_meta_uint(&self, flags: MetaFlag, meta_item: &str, value: u32) -> bool; - - #[doc(alias = "ges_meta_container_register_meta_uint64")] - fn register_meta_uint64(&self, flags: MetaFlag, meta_item: &str, value: u64) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_meta_container_register_static_meta")] - fn register_static_meta( - &self, - flags: MetaFlag, - meta_item: &str, - type_: glib::types::Type, - ) -> bool; - - #[doc(alias = "ges_meta_container_set_boolean")] - fn set_boolean(&self, meta_item: &str, value: bool) -> bool; - - #[doc(alias = "ges_meta_container_set_date")] - fn set_date(&self, meta_item: &str, value: &glib::Date) -> bool; - - #[doc(alias = "ges_meta_container_set_date_time")] - fn set_date_time(&self, meta_item: &str, value: &gst::DateTime) -> bool; - - #[doc(alias = "ges_meta_container_set_double")] - fn set_double(&self, meta_item: &str, value: f64) -> bool; - - #[doc(alias = "ges_meta_container_set_float")] - fn set_float(&self, meta_item: &str, value: f32) -> bool; - - #[doc(alias = "ges_meta_container_set_int")] - fn set_int(&self, meta_item: &str, value: i32) -> bool; - - #[doc(alias = "ges_meta_container_set_int64")] - fn set_int64(&self, meta_item: &str, value: i64) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_meta_container_set_marker_list")] - fn set_marker_list(&self, meta_item: &str, list: &MarkerList) -> bool; - - #[doc(alias = "ges_meta_container_set_meta")] - fn set_meta(&self, meta_item: &str, value: Option<&glib::Value>) -> bool; - - #[doc(alias = "ges_meta_container_set_string")] - fn set_string(&self, meta_item: &str, value: &str) -> bool; - - #[doc(alias = "ges_meta_container_set_uint")] - fn set_uint(&self, meta_item: &str, value: u32) -> bool; - - #[doc(alias = "ges_meta_container_set_uint64")] - fn set_uint64(&self, meta_item: &str, value: u64) -> bool; - - #[doc(alias = "notify-meta")] - fn connect_notify_meta) + 'static>( - &self, - detail: Option<&str>, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> MetaContainerExt for O { +pub trait MetaContainerExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_meta_container_add_metas_from_string")] fn add_metas_from_string(&self, str: &str) -> bool { unsafe { from_glib(ffi::ges_meta_container_add_metas_from_string( @@ -194,6 +43,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_check_meta_registered")] fn check_meta_registered(&self, meta_item: &str) -> Option<(MetaFlag, glib::types::Type)> { unsafe { let mut flags = mem::MaybeUninit::uninit(); @@ -215,6 +65,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_foreach")] fn foreach(&self, func: P) { let func_data: P = func; unsafe extern "C" fn func_func( @@ -240,6 +91,8 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_get_boolean")] + #[doc(alias = "get_boolean")] fn boolean(&self, meta_item: &str) -> Option { unsafe { let mut dest = mem::MaybeUninit::uninit(); @@ -256,6 +109,8 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_get_date")] + #[doc(alias = "get_date")] fn date(&self, meta_item: &str) -> Option { unsafe { let mut dest = ptr::null_mut(); @@ -272,6 +127,8 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_get_date_time")] + #[doc(alias = "get_date_time")] fn date_time(&self, meta_item: &str) -> Option { unsafe { let mut dest = ptr::null_mut(); @@ -288,6 +145,8 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_get_double")] + #[doc(alias = "get_double")] fn double(&self, meta_item: &str) -> Option { unsafe { let mut dest = mem::MaybeUninit::uninit(); @@ -304,6 +163,8 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_get_float")] + #[doc(alias = "get_float")] fn float(&self, meta_item: &str) -> Option { unsafe { let mut dest = mem::MaybeUninit::uninit(); @@ -320,6 +181,8 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_get_int")] + #[doc(alias = "get_int")] fn int(&self, meta_item: &str) -> Option { unsafe { let mut dest = mem::MaybeUninit::uninit(); @@ -336,6 +199,8 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_get_int64")] + #[doc(alias = "get_int64")] fn int64(&self, meta_item: &str) -> Option { unsafe { let mut dest = mem::MaybeUninit::uninit(); @@ -354,6 +219,8 @@ impl> MetaContainerExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_meta_container_get_marker_list")] + #[doc(alias = "get_marker_list")] fn marker_list(&self, key: &str) -> Option { unsafe { from_glib_full(ffi::ges_meta_container_get_marker_list( @@ -363,6 +230,8 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_get_meta")] + #[doc(alias = "get_meta")] fn meta(&self, key: &str) -> Option { unsafe { from_glib_none(ffi::ges_meta_container_get_meta( @@ -372,6 +241,8 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_get_string")] + #[doc(alias = "get_string")] fn string(&self, meta_item: &str) -> Option { unsafe { from_glib_none(ffi::ges_meta_container_get_string( @@ -381,6 +252,8 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_get_uint")] + #[doc(alias = "get_uint")] fn uint(&self, meta_item: &str) -> Option { unsafe { let mut dest = mem::MaybeUninit::uninit(); @@ -397,6 +270,8 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_get_uint64")] + #[doc(alias = "get_uint64")] fn uint64(&self, meta_item: &str) -> Option { unsafe { let mut dest = mem::MaybeUninit::uninit(); @@ -413,6 +288,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_metas_to_string")] fn metas_to_string(&self) -> glib::GString { unsafe { from_glib_full(ffi::ges_meta_container_metas_to_string( @@ -421,6 +297,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_register_meta")] fn register_meta(&self, flags: MetaFlag, meta_item: &str, value: &glib::Value) -> bool { unsafe { from_glib(ffi::ges_meta_container_register_meta( @@ -432,6 +309,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_register_meta_boolean")] fn register_meta_boolean(&self, flags: MetaFlag, meta_item: &str, value: bool) -> bool { unsafe { from_glib(ffi::ges_meta_container_register_meta_boolean( @@ -443,6 +321,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_register_meta_date")] fn register_meta_date(&self, flags: MetaFlag, meta_item: &str, value: &glib::Date) -> bool { unsafe { from_glib(ffi::ges_meta_container_register_meta_date( @@ -454,6 +333,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_register_meta_date_time")] fn register_meta_date_time( &self, flags: MetaFlag, @@ -470,6 +350,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_register_meta_double")] fn register_meta_double(&self, flags: MetaFlag, meta_item: &str, value: f64) -> bool { unsafe { from_glib(ffi::ges_meta_container_register_meta_double( @@ -481,6 +362,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_register_meta_float")] fn register_meta_float(&self, flags: MetaFlag, meta_item: &str, value: f32) -> bool { unsafe { from_glib(ffi::ges_meta_container_register_meta_float( @@ -492,6 +374,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_register_meta_int")] fn register_meta_int(&self, flags: MetaFlag, meta_item: &str, value: i32) -> bool { unsafe { from_glib(ffi::ges_meta_container_register_meta_int( @@ -503,6 +386,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_register_meta_int64")] fn register_meta_int64(&self, flags: MetaFlag, meta_item: &str, value: i64) -> bool { unsafe { from_glib(ffi::ges_meta_container_register_meta_int64( @@ -514,6 +398,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_register_meta_string")] fn register_meta_string(&self, flags: MetaFlag, meta_item: &str, value: &str) -> bool { unsafe { from_glib(ffi::ges_meta_container_register_meta_string( @@ -525,6 +410,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_register_meta_uint")] fn register_meta_uint(&self, flags: MetaFlag, meta_item: &str, value: u32) -> bool { unsafe { from_glib(ffi::ges_meta_container_register_meta_uint( @@ -536,6 +422,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_register_meta_uint64")] fn register_meta_uint64(&self, flags: MetaFlag, meta_item: &str, value: u64) -> bool { unsafe { from_glib(ffi::ges_meta_container_register_meta_uint64( @@ -549,6 +436,7 @@ impl> MetaContainerExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_meta_container_register_static_meta")] fn register_static_meta( &self, flags: MetaFlag, @@ -565,6 +453,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_set_boolean")] fn set_boolean(&self, meta_item: &str, value: bool) -> bool { unsafe { from_glib(ffi::ges_meta_container_set_boolean( @@ -575,6 +464,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_set_date")] fn set_date(&self, meta_item: &str, value: &glib::Date) -> bool { unsafe { from_glib(ffi::ges_meta_container_set_date( @@ -585,6 +475,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_set_date_time")] fn set_date_time(&self, meta_item: &str, value: &gst::DateTime) -> bool { unsafe { from_glib(ffi::ges_meta_container_set_date_time( @@ -595,6 +486,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_set_double")] fn set_double(&self, meta_item: &str, value: f64) -> bool { unsafe { from_glib(ffi::ges_meta_container_set_double( @@ -605,6 +497,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_set_float")] fn set_float(&self, meta_item: &str, value: f32) -> bool { unsafe { from_glib(ffi::ges_meta_container_set_float( @@ -615,6 +508,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_set_int")] fn set_int(&self, meta_item: &str, value: i32) -> bool { unsafe { from_glib(ffi::ges_meta_container_set_int( @@ -625,6 +519,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_set_int64")] fn set_int64(&self, meta_item: &str, value: i64) -> bool { unsafe { from_glib(ffi::ges_meta_container_set_int64( @@ -637,6 +532,7 @@ impl> MetaContainerExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_meta_container_set_marker_list")] fn set_marker_list(&self, meta_item: &str, list: &MarkerList) -> bool { unsafe { from_glib(ffi::ges_meta_container_set_marker_list( @@ -647,6 +543,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_set_meta")] fn set_meta(&self, meta_item: &str, value: Option<&glib::Value>) -> bool { unsafe { from_glib(ffi::ges_meta_container_set_meta( @@ -657,6 +554,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_set_string")] fn set_string(&self, meta_item: &str, value: &str) -> bool { unsafe { from_glib(ffi::ges_meta_container_set_string( @@ -667,6 +565,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_set_uint")] fn set_uint(&self, meta_item: &str, value: u32) -> bool { unsafe { from_glib(ffi::ges_meta_container_set_uint( @@ -677,6 +576,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "ges_meta_container_set_uint64")] fn set_uint64(&self, meta_item: &str, value: u64) -> bool { unsafe { from_glib(ffi::ges_meta_container_set_uint64( @@ -687,6 +587,7 @@ impl> MetaContainerExt for O { } } + #[doc(alias = "notify-meta")] fn connect_notify_meta) + 'static>( &self, detail: Option<&str>, @@ -727,3 +628,5 @@ impl> MetaContainerExt for O { } } } + +impl> MetaContainerExt for O {} diff --git a/gstreamer-editing-services/src/auto/multi_file_source.rs b/gstreamer-editing-services/src/auto/multi_file_source.rs index 264cc94d2..bb1e31cb8 100644 --- a/gstreamer-editing-services/src/auto/multi_file_source.rs +++ b/gstreamer-editing-services/src/auto/multi_file_source.rs @@ -25,12 +25,15 @@ impl MultiFileSource { } } -pub trait MultiFileSourceExt: 'static { - fn uri(&self) -> Option; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> MultiFileSourceExt for O { +pub trait MultiFileSourceExt: IsA + sealed::Sealed + 'static { fn uri(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "uri") } } + +impl> MultiFileSourceExt for O {} diff --git a/gstreamer-editing-services/src/auto/pipeline.rs b/gstreamer-editing-services/src/auto/pipeline.rs index e401ca010..0b42c5dc6 100644 --- a/gstreamer-editing-services/src/auto/pipeline.rs +++ b/gstreamer-editing-services/src/auto/pipeline.rs @@ -36,103 +36,20 @@ impl Default for Pipeline { } } -pub trait GESPipelineExt: 'static { - #[doc(alias = "ges_pipeline_get_mode")] - #[doc(alias = "get_mode")] - fn mode(&self) -> PipelineFlags; - - #[doc(alias = "ges_pipeline_get_thumbnail")] - #[doc(alias = "get_thumbnail")] - fn thumbnail(&self, caps: &gst::Caps) -> Option; - - #[doc(alias = "ges_pipeline_get_thumbnail_rgb24")] - #[doc(alias = "get_thumbnail_rgb24")] - fn thumbnail_rgb24(&self, width: i32, height: i32) -> Option; - - #[doc(alias = "ges_pipeline_preview_get_audio_sink")] - fn preview_get_audio_sink(&self) -> Option; - - #[doc(alias = "ges_pipeline_preview_get_video_sink")] - fn preview_get_video_sink(&self) -> Option; - - #[doc(alias = "ges_pipeline_preview_set_audio_sink")] - fn preview_set_audio_sink(&self, sink: Option<&impl IsA>); - - #[doc(alias = "ges_pipeline_preview_set_video_sink")] - fn preview_set_video_sink(&self, sink: Option<&impl IsA>); - - #[doc(alias = "ges_pipeline_save_thumbnail")] - fn save_thumbnail( - &self, - width: i32, - height: i32, - format: &str, - location: &str, - ) -> Result<(), glib::Error>; - - #[doc(alias = "ges_pipeline_set_mode")] - fn set_mode(&self, mode: PipelineFlags) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_pipeline_set_render_settings")] - fn set_render_settings( - &self, - output_uri: &str, - profile: &impl IsA, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_pipeline_set_timeline")] - fn set_timeline(&self, timeline: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "audio-filter")] - fn audio_filter(&self) -> Option; - - #[doc(alias = "audio-filter")] - fn set_audio_filter>(&self, audio_filter: Option<&P>); - - #[doc(alias = "audio-sink")] - fn audio_sink(&self) -> Option; - - #[doc(alias = "audio-sink")] - fn set_audio_sink>(&self, audio_sink: Option<&P>); - - fn timeline(&self) -> Option; - - #[doc(alias = "video-filter")] - fn video_filter(&self) -> Option; - - #[doc(alias = "video-filter")] - fn set_video_filter>(&self, video_filter: Option<&P>); - - #[doc(alias = "video-sink")] - fn video_sink(&self) -> Option; - - #[doc(alias = "video-sink")] - fn set_video_sink>(&self, video_sink: Option<&P>); - - #[doc(alias = "audio-filter")] - fn connect_audio_filter_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "audio-sink")] - fn connect_audio_sink_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "mode")] - fn connect_mode_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "timeline")] - fn connect_timeline_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "video-filter")] - fn connect_video_filter_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "video-sink")] - fn connect_video_sink_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> GESPipelineExt for O { +pub trait GESPipelineExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_pipeline_get_mode")] + #[doc(alias = "get_mode")] fn mode(&self) -> PipelineFlags { unsafe { from_glib(ffi::ges_pipeline_get_mode(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_pipeline_get_thumbnail")] + #[doc(alias = "get_thumbnail")] fn thumbnail(&self, caps: &gst::Caps) -> Option { unsafe { from_glib_full(ffi::ges_pipeline_get_thumbnail( @@ -142,6 +59,8 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "ges_pipeline_get_thumbnail_rgb24")] + #[doc(alias = "get_thumbnail_rgb24")] fn thumbnail_rgb24(&self, width: i32, height: i32) -> Option { unsafe { from_glib_full(ffi::ges_pipeline_get_thumbnail_rgb24( @@ -152,6 +71,7 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "ges_pipeline_preview_get_audio_sink")] fn preview_get_audio_sink(&self) -> Option { unsafe { from_glib_full(ffi::ges_pipeline_preview_get_audio_sink( @@ -160,6 +80,7 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "ges_pipeline_preview_get_video_sink")] fn preview_get_video_sink(&self) -> Option { unsafe { from_glib_full(ffi::ges_pipeline_preview_get_video_sink( @@ -168,6 +89,7 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "ges_pipeline_preview_set_audio_sink")] fn preview_set_audio_sink(&self, sink: Option<&impl IsA>) { unsafe { ffi::ges_pipeline_preview_set_audio_sink( @@ -177,6 +99,7 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "ges_pipeline_preview_set_video_sink")] fn preview_set_video_sink(&self, sink: Option<&impl IsA>) { unsafe { ffi::ges_pipeline_preview_set_video_sink( @@ -186,6 +109,7 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "ges_pipeline_save_thumbnail")] fn save_thumbnail( &self, width: i32, @@ -212,6 +136,7 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "ges_pipeline_set_mode")] fn set_mode(&self, mode: PipelineFlags) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -221,6 +146,7 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "ges_pipeline_set_render_settings")] fn set_render_settings( &self, output_uri: &str, @@ -238,6 +164,7 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "ges_pipeline_set_timeline")] fn set_timeline(&self, timeline: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -250,18 +177,22 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "audio-filter")] fn audio_filter(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "audio-filter") } + #[doc(alias = "audio-filter")] fn set_audio_filter>(&self, audio_filter: Option<&P>) { glib::ObjectExt::set_property(self.as_ref(), "audio-filter", audio_filter) } + #[doc(alias = "audio-sink")] fn audio_sink(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "audio-sink") } + #[doc(alias = "audio-sink")] fn set_audio_sink>(&self, audio_sink: Option<&P>) { glib::ObjectExt::set_property(self.as_ref(), "audio-sink", audio_sink) } @@ -270,22 +201,27 @@ impl> GESPipelineExt for O { glib::ObjectExt::property(self.as_ref(), "timeline") } + #[doc(alias = "video-filter")] fn video_filter(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "video-filter") } + #[doc(alias = "video-filter")] fn set_video_filter>(&self, video_filter: Option<&P>) { glib::ObjectExt::set_property(self.as_ref(), "video-filter", video_filter) } + #[doc(alias = "video-sink")] fn video_sink(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "video-sink") } + #[doc(alias = "video-sink")] fn set_video_sink>(&self, video_sink: Option<&P>) { glib::ObjectExt::set_property(self.as_ref(), "video-sink", video_sink) } + #[doc(alias = "audio-filter")] fn connect_audio_filter_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_audio_filter_trampoline< P: IsA, @@ -311,6 +247,7 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "audio-sink")] fn connect_audio_sink_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_audio_sink_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESPipeline, @@ -333,6 +270,7 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "mode")] fn connect_mode_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_mode_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESPipeline, @@ -355,6 +293,7 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "timeline")] fn connect_timeline_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_timeline_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESPipeline, @@ -377,6 +316,7 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "video-filter")] fn connect_video_filter_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_video_filter_trampoline< P: IsA, @@ -402,6 +342,7 @@ impl> GESPipelineExt for O { } } + #[doc(alias = "video-sink")] fn connect_video_sink_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_video_sink_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESPipeline, @@ -424,3 +365,5 @@ impl> GESPipelineExt for O { } } } + +impl> GESPipelineExt for O {} diff --git a/gstreamer-editing-services/src/auto/project.rs b/gstreamer-editing-services/src/auto/project.rs index 97bf4bff4..d80781f73 100644 --- a/gstreamer-editing-services/src/auto/project.rs +++ b/gstreamer-editing-services/src/auto/project.rs @@ -33,103 +33,13 @@ impl Project { } } -pub trait ProjectExt: 'static { - #[doc(alias = "ges_project_add_asset")] - fn add_asset(&self, asset: &impl IsA) -> bool; - - #[doc(alias = "ges_project_add_encoding_profile")] - fn add_encoding_profile( - &self, - profile: &impl IsA, - ) -> Result<(), glib::error::BoolError>; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_project_add_formatter")] - fn add_formatter(&self, formatter: &impl IsA); - - #[doc(alias = "ges_project_create_asset")] - fn create_asset(&self, id: Option<&str>, extractable_type: glib::types::Type) -> bool; - - #[doc(alias = "ges_project_create_asset_sync")] - fn create_asset_sync( - &self, - id: Option<&str>, - extractable_type: glib::types::Type, - ) -> Result, glib::Error>; - - #[doc(alias = "ges_project_get_asset")] - #[doc(alias = "get_asset")] - fn asset(&self, id: &str, extractable_type: glib::types::Type) -> Option; - - #[doc(alias = "ges_project_get_loading_assets")] - #[doc(alias = "get_loading_assets")] - fn loading_assets(&self) -> Vec; - - #[doc(alias = "ges_project_get_uri")] - #[doc(alias = "get_uri")] - fn uri(&self) -> Option; - - #[doc(alias = "ges_project_list_assets")] - fn list_assets(&self, filter: glib::types::Type) -> Vec; - - #[doc(alias = "ges_project_list_encoding_profiles")] - fn list_encoding_profiles(&self) -> Vec; - - #[doc(alias = "ges_project_load")] - fn load(&self, timeline: &impl IsA) -> Result<(), glib::Error>; - - #[doc(alias = "ges_project_remove_asset")] - fn remove_asset(&self, asset: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_project_save")] - fn save( - &self, - timeline: &impl IsA, - uri: &str, - formatter_asset: Option>, - overwrite: bool, - ) -> Result<(), glib::Error>; - - #[doc(alias = "asset-added")] - fn connect_asset_added(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "asset-loading")] - fn connect_asset_loading(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "asset-removed")] - fn connect_asset_removed(&self, f: F) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "error-loading")] - fn connect_error_loading( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "error-loading-asset")] - fn connect_error_loading_asset( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "loaded")] - fn connect_loaded(&self, f: F) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "loading")] - fn connect_loading(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "missing-uri")] - fn connect_missing_uri Option + 'static>( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> ProjectExt for O { +pub trait ProjectExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_project_add_asset")] fn add_asset(&self, asset: &impl IsA) -> bool { unsafe { from_glib(ffi::ges_project_add_asset( @@ -139,6 +49,7 @@ impl> ProjectExt for O { } } + #[doc(alias = "ges_project_add_encoding_profile")] fn add_encoding_profile( &self, profile: &impl IsA, @@ -156,6 +67,7 @@ impl> ProjectExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_project_add_formatter")] fn add_formatter(&self, formatter: &impl IsA) { unsafe { ffi::ges_project_add_formatter( @@ -165,6 +77,7 @@ impl> ProjectExt for O { } } + #[doc(alias = "ges_project_create_asset")] fn create_asset(&self, id: Option<&str>, extractable_type: glib::types::Type) -> bool { unsafe { from_glib(ffi::ges_project_create_asset( @@ -175,6 +88,7 @@ impl> ProjectExt for O { } } + #[doc(alias = "ges_project_create_asset_sync")] fn create_asset_sync( &self, id: Option<&str>, @@ -196,6 +110,8 @@ impl> ProjectExt for O { } } + #[doc(alias = "ges_project_get_asset")] + #[doc(alias = "get_asset")] fn asset(&self, id: &str, extractable_type: glib::types::Type) -> Option { unsafe { from_glib_full(ffi::ges_project_get_asset( @@ -206,6 +122,8 @@ impl> ProjectExt for O { } } + #[doc(alias = "ges_project_get_loading_assets")] + #[doc(alias = "get_loading_assets")] fn loading_assets(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::ges_project_get_loading_assets( @@ -214,10 +132,13 @@ impl> ProjectExt for O { } } + #[doc(alias = "ges_project_get_uri")] + #[doc(alias = "get_uri")] fn uri(&self) -> Option { unsafe { from_glib_full(ffi::ges_project_get_uri(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_project_list_assets")] fn list_assets(&self, filter: glib::types::Type) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::ges_project_list_assets( @@ -227,6 +148,7 @@ impl> ProjectExt for O { } } + #[doc(alias = "ges_project_list_encoding_profiles")] fn list_encoding_profiles(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::ges_project_list_encoding_profiles( @@ -235,6 +157,7 @@ impl> ProjectExt for O { } } + #[doc(alias = "ges_project_load")] fn load(&self, timeline: &impl IsA) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -252,6 +175,7 @@ impl> ProjectExt for O { } } + #[doc(alias = "ges_project_remove_asset")] fn remove_asset(&self, asset: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -264,6 +188,7 @@ impl> ProjectExt for O { } } + #[doc(alias = "ges_project_save")] fn save( &self, timeline: &impl IsA, @@ -290,6 +215,7 @@ impl> ProjectExt for O { } } + #[doc(alias = "asset-added")] fn connect_asset_added(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn asset_added_trampoline< P: IsA, @@ -318,6 +244,7 @@ impl> ProjectExt for O { } } + #[doc(alias = "asset-loading")] fn connect_asset_loading(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn asset_loading_trampoline< P: IsA, @@ -346,6 +273,7 @@ impl> ProjectExt for O { } } + #[doc(alias = "asset-removed")] fn connect_asset_removed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn asset_removed_trampoline< P: IsA, @@ -376,6 +304,7 @@ impl> ProjectExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "error-loading")] fn connect_error_loading( &self, f: F, @@ -409,6 +338,7 @@ impl> ProjectExt for O { } } + #[doc(alias = "error-loading-asset")] fn connect_error_loading_asset< F: Fn(&Self, &glib::Error, &str, glib::types::Type) + 'static, >( @@ -446,6 +376,7 @@ impl> ProjectExt for O { } } + #[doc(alias = "loaded")] fn connect_loaded(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn loaded_trampoline, F: Fn(&P, &Timeline) + 'static>( this: *mut ffi::GESProject, @@ -473,6 +404,7 @@ impl> ProjectExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "loading")] fn connect_loading(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn loading_trampoline, F: Fn(&P, &Timeline) + 'static>( this: *mut ffi::GESProject, @@ -498,6 +430,7 @@ impl> ProjectExt for O { } } + #[doc(alias = "missing-uri")] fn connect_missing_uri< F: Fn(&Self, &glib::Error, &Asset) -> Option + 'static, >( @@ -534,3 +467,5 @@ impl> ProjectExt for O { } } } + +impl> ProjectExt for O {} diff --git a/gstreamer-editing-services/src/auto/test_clip.rs b/gstreamer-editing-services/src/auto/test_clip.rs index da043e2cf..d7c76d088 100644 --- a/gstreamer-editing-services/src/auto/test_clip.rs +++ b/gstreamer-editing-services/src/auto/test_clip.rs @@ -39,60 +39,26 @@ impl TestClip { } } -pub trait TestClipExt: 'static { - #[doc(alias = "ges_test_clip_get_frequency")] - #[doc(alias = "get_frequency")] - fn frequency(&self) -> f64; - - #[doc(alias = "ges_test_clip_get_volume")] - #[doc(alias = "get_volume")] - fn volume(&self) -> f64; - - #[doc(alias = "ges_test_clip_get_vpattern")] - #[doc(alias = "get_vpattern")] - fn vpattern(&self) -> VideoTestPattern; - - #[doc(alias = "ges_test_clip_is_muted")] - fn is_muted(&self) -> bool; - - #[doc(alias = "ges_test_clip_set_frequency")] - fn set_frequency(&self, freq: f64); - - #[doc(alias = "ges_test_clip_set_mute")] - fn set_mute(&self, mute: bool); - - #[doc(alias = "ges_test_clip_set_volume")] - fn set_volume(&self, volume: f64); - - #[doc(alias = "ges_test_clip_set_vpattern")] - fn set_vpattern(&self, vpattern: VideoTestPattern); - - fn freq(&self) -> f64; - - fn set_freq(&self, freq: f64); - - #[doc(alias = "freq")] - fn connect_freq_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "mute")] - fn connect_mute_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "volume")] - fn connect_volume_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "vpattern")] - fn connect_vpattern_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> TestClipExt for O { +pub trait TestClipExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_test_clip_get_frequency")] + #[doc(alias = "get_frequency")] fn frequency(&self) -> f64 { unsafe { ffi::ges_test_clip_get_frequency(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_test_clip_get_volume")] + #[doc(alias = "get_volume")] fn volume(&self) -> f64 { unsafe { ffi::ges_test_clip_get_volume(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_test_clip_get_vpattern")] + #[doc(alias = "get_vpattern")] fn vpattern(&self) -> VideoTestPattern { unsafe { from_glib(ffi::ges_test_clip_get_vpattern( @@ -101,28 +67,33 @@ impl> TestClipExt for O { } } + #[doc(alias = "ges_test_clip_is_muted")] fn is_muted(&self) -> bool { unsafe { from_glib(ffi::ges_test_clip_is_muted(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_test_clip_set_frequency")] fn set_frequency(&self, freq: f64) { unsafe { ffi::ges_test_clip_set_frequency(self.as_ref().to_glib_none().0, freq); } } + #[doc(alias = "ges_test_clip_set_mute")] fn set_mute(&self, mute: bool) { unsafe { ffi::ges_test_clip_set_mute(self.as_ref().to_glib_none().0, mute.into_glib()); } } + #[doc(alias = "ges_test_clip_set_volume")] fn set_volume(&self, volume: f64) { unsafe { ffi::ges_test_clip_set_volume(self.as_ref().to_glib_none().0, volume); } } + #[doc(alias = "ges_test_clip_set_vpattern")] fn set_vpattern(&self, vpattern: VideoTestPattern) { unsafe { ffi::ges_test_clip_set_vpattern(self.as_ref().to_glib_none().0, vpattern.into_glib()); @@ -137,6 +108,7 @@ impl> TestClipExt for O { glib::ObjectExt::set_property(self.as_ref(), "freq", freq) } + #[doc(alias = "freq")] fn connect_freq_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_freq_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTestClip, @@ -159,6 +131,7 @@ impl> TestClipExt for O { } } + #[doc(alias = "mute")] fn connect_mute_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_mute_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTestClip, @@ -181,6 +154,7 @@ impl> TestClipExt for O { } } + #[doc(alias = "volume")] fn connect_volume_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_volume_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTestClip, @@ -203,6 +177,7 @@ impl> TestClipExt for O { } } + #[doc(alias = "vpattern")] fn connect_vpattern_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_vpattern_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTestClip, @@ -225,3 +200,5 @@ impl> TestClipExt for O { } } } + +impl> TestClipExt for O {} diff --git a/gstreamer-editing-services/src/auto/text_overlay.rs b/gstreamer-editing-services/src/auto/text_overlay.rs index c27fdeadb..c8d80054d 100644 --- a/gstreamer-editing-services/src/auto/text_overlay.rs +++ b/gstreamer-editing-services/src/auto/text_overlay.rs @@ -30,62 +30,20 @@ impl TextOverlay { } } -pub trait TextOverlayExt: 'static { - #[doc(alias = "ges_text_overlay_get_color")] - #[doc(alias = "get_color")] - fn color(&self) -> u32; - - #[doc(alias = "ges_text_overlay_get_font_desc")] - #[doc(alias = "get_font_desc")] - fn font_desc(&self) -> Option; - - #[doc(alias = "ges_text_overlay_get_halignment")] - #[doc(alias = "get_halignment")] - fn halignment(&self) -> TextHAlign; - - #[doc(alias = "ges_text_overlay_get_text")] - #[doc(alias = "get_text")] - fn text(&self) -> Option; - - #[doc(alias = "ges_text_overlay_get_valignment")] - #[doc(alias = "get_valignment")] - fn valignment(&self) -> TextVAlign; - - #[doc(alias = "ges_text_overlay_get_xpos")] - #[doc(alias = "get_xpos")] - fn xpos(&self) -> f64; - - #[doc(alias = "ges_text_overlay_get_ypos")] - #[doc(alias = "get_ypos")] - fn ypos(&self) -> f64; - - #[doc(alias = "ges_text_overlay_set_color")] - fn set_color(&self, color: u32); - - #[doc(alias = "ges_text_overlay_set_font_desc")] - fn set_font_desc(&self, font_desc: Option<&str>); - - #[doc(alias = "ges_text_overlay_set_halignment")] - fn set_halignment(&self, halign: TextHAlign); - - #[doc(alias = "ges_text_overlay_set_text")] - fn set_text(&self, text: Option<&str>); - - #[doc(alias = "ges_text_overlay_set_valignment")] - fn set_valignment(&self, valign: TextVAlign); - - #[doc(alias = "ges_text_overlay_set_xpos")] - fn set_xpos(&self, position: f64); - - #[doc(alias = "ges_text_overlay_set_ypos")] - fn set_ypos(&self, position: f64); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> TextOverlayExt for O { +pub trait TextOverlayExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_text_overlay_get_color")] + #[doc(alias = "get_color")] fn color(&self) -> u32 { unsafe { ffi::ges_text_overlay_get_color(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_text_overlay_get_font_desc")] + #[doc(alias = "get_font_desc")] fn font_desc(&self) -> Option { unsafe { from_glib_none(ffi::ges_text_overlay_get_font_desc( @@ -94,6 +52,8 @@ impl> TextOverlayExt for O { } } + #[doc(alias = "ges_text_overlay_get_halignment")] + #[doc(alias = "get_halignment")] fn halignment(&self) -> TextHAlign { unsafe { from_glib(ffi::ges_text_overlay_get_halignment( @@ -102,6 +62,8 @@ impl> TextOverlayExt for O { } } + #[doc(alias = "ges_text_overlay_get_text")] + #[doc(alias = "get_text")] fn text(&self) -> Option { unsafe { from_glib_none(ffi::ges_text_overlay_get_text( @@ -110,6 +72,8 @@ impl> TextOverlayExt for O { } } + #[doc(alias = "ges_text_overlay_get_valignment")] + #[doc(alias = "get_valignment")] fn valignment(&self) -> TextVAlign { unsafe { from_glib(ffi::ges_text_overlay_get_valignment( @@ -118,20 +82,26 @@ impl> TextOverlayExt for O { } } + #[doc(alias = "ges_text_overlay_get_xpos")] + #[doc(alias = "get_xpos")] fn xpos(&self) -> f64 { unsafe { ffi::ges_text_overlay_get_xpos(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_text_overlay_get_ypos")] + #[doc(alias = "get_ypos")] fn ypos(&self) -> f64 { unsafe { ffi::ges_text_overlay_get_ypos(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_text_overlay_set_color")] fn set_color(&self, color: u32) { unsafe { ffi::ges_text_overlay_set_color(self.as_ref().to_glib_none().0, color); } } + #[doc(alias = "ges_text_overlay_set_font_desc")] fn set_font_desc(&self, font_desc: Option<&str>) { unsafe { ffi::ges_text_overlay_set_font_desc( @@ -141,6 +111,7 @@ impl> TextOverlayExt for O { } } + #[doc(alias = "ges_text_overlay_set_halignment")] fn set_halignment(&self, halign: TextHAlign) { unsafe { ffi::ges_text_overlay_set_halignment( @@ -150,12 +121,14 @@ impl> TextOverlayExt for O { } } + #[doc(alias = "ges_text_overlay_set_text")] fn set_text(&self, text: Option<&str>) { unsafe { ffi::ges_text_overlay_set_text(self.as_ref().to_glib_none().0, text.to_glib_none().0); } } + #[doc(alias = "ges_text_overlay_set_valignment")] fn set_valignment(&self, valign: TextVAlign) { unsafe { ffi::ges_text_overlay_set_valignment( @@ -165,15 +138,19 @@ impl> TextOverlayExt for O { } } + #[doc(alias = "ges_text_overlay_set_xpos")] fn set_xpos(&self, position: f64) { unsafe { ffi::ges_text_overlay_set_xpos(self.as_ref().to_glib_none().0, position); } } + #[doc(alias = "ges_text_overlay_set_ypos")] fn set_ypos(&self, position: f64) { unsafe { ffi::ges_text_overlay_set_ypos(self.as_ref().to_glib_none().0, position); } } } + +impl> TextOverlayExt for O {} diff --git a/gstreamer-editing-services/src/auto/text_overlay_clip.rs b/gstreamer-editing-services/src/auto/text_overlay_clip.rs index 9cca05f4c..6f828e932 100644 --- a/gstreamer-editing-services/src/auto/text_overlay_clip.rs +++ b/gstreamer-editing-services/src/auto/text_overlay_clip.rs @@ -33,87 +33,20 @@ impl TextOverlayClip { } } -pub trait TextOverlayClipExt: 'static { - #[doc(alias = "ges_text_overlay_clip_get_color")] - #[doc(alias = "get_color")] - fn color(&self) -> u32; - - #[doc(alias = "ges_text_overlay_clip_get_font_desc")] - #[doc(alias = "get_font_desc")] - fn font_desc(&self) -> Option; - - #[doc(alias = "ges_text_overlay_clip_get_halignment")] - #[doc(alias = "get_halignment")] - fn halignment(&self) -> TextHAlign; - - #[doc(alias = "ges_text_overlay_clip_get_text")] - #[doc(alias = "get_text")] - fn text(&self) -> Option; - - #[doc(alias = "ges_text_overlay_clip_get_valignment")] - #[doc(alias = "get_valignment")] - fn valignment(&self) -> TextVAlign; - - #[doc(alias = "ges_text_overlay_clip_get_xpos")] - #[doc(alias = "get_xpos")] - fn xpos(&self) -> f64; - - #[doc(alias = "ges_text_overlay_clip_get_ypos")] - #[doc(alias = "get_ypos")] - fn ypos(&self) -> f64; - - #[doc(alias = "ges_text_overlay_clip_set_color")] - fn set_color(&self, color: u32); - - #[doc(alias = "ges_text_overlay_clip_set_font_desc")] - fn set_font_desc(&self, font_desc: Option<&str>); - - #[doc(alias = "ges_text_overlay_clip_set_halign")] - fn set_halign(&self, halign: TextHAlign); - - #[doc(alias = "ges_text_overlay_clip_set_text")] - fn set_text(&self, text: Option<&str>); - - #[doc(alias = "ges_text_overlay_clip_set_valign")] - fn set_valign(&self, valign: TextVAlign); - - #[doc(alias = "ges_text_overlay_clip_set_xpos")] - fn set_xpos(&self, position: f64); - - #[doc(alias = "ges_text_overlay_clip_set_ypos")] - fn set_ypos(&self, position: f64); - - fn set_halignment(&self, halignment: TextHAlign); - - fn set_valignment(&self, valignment: TextVAlign); - - #[doc(alias = "color")] - fn connect_color_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "font-desc")] - fn connect_font_desc_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "halignment")] - fn connect_halignment_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "text")] - fn connect_text_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "valignment")] - fn connect_valignment_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "xpos")] - fn connect_xpos_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "ypos")] - fn connect_ypos_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> TextOverlayClipExt for O { +pub trait TextOverlayClipExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_text_overlay_clip_get_color")] + #[doc(alias = "get_color")] fn color(&self) -> u32 { unsafe { ffi::ges_text_overlay_clip_get_color(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_text_overlay_clip_get_font_desc")] + #[doc(alias = "get_font_desc")] fn font_desc(&self) -> Option { unsafe { from_glib_none(ffi::ges_text_overlay_clip_get_font_desc( @@ -122,6 +55,8 @@ impl> TextOverlayClipExt for O { } } + #[doc(alias = "ges_text_overlay_clip_get_halignment")] + #[doc(alias = "get_halignment")] fn halignment(&self) -> TextHAlign { unsafe { from_glib(ffi::ges_text_overlay_clip_get_halignment( @@ -130,6 +65,8 @@ impl> TextOverlayClipExt for O { } } + #[doc(alias = "ges_text_overlay_clip_get_text")] + #[doc(alias = "get_text")] fn text(&self) -> Option { unsafe { from_glib_none(ffi::ges_text_overlay_clip_get_text( @@ -138,6 +75,8 @@ impl> TextOverlayClipExt for O { } } + #[doc(alias = "ges_text_overlay_clip_get_valignment")] + #[doc(alias = "get_valignment")] fn valignment(&self) -> TextVAlign { unsafe { from_glib(ffi::ges_text_overlay_clip_get_valignment( @@ -146,20 +85,26 @@ impl> TextOverlayClipExt for O { } } + #[doc(alias = "ges_text_overlay_clip_get_xpos")] + #[doc(alias = "get_xpos")] fn xpos(&self) -> f64 { unsafe { ffi::ges_text_overlay_clip_get_xpos(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_text_overlay_clip_get_ypos")] + #[doc(alias = "get_ypos")] fn ypos(&self) -> f64 { unsafe { ffi::ges_text_overlay_clip_get_ypos(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_text_overlay_clip_set_color")] fn set_color(&self, color: u32) { unsafe { ffi::ges_text_overlay_clip_set_color(self.as_ref().to_glib_none().0, color); } } + #[doc(alias = "ges_text_overlay_clip_set_font_desc")] fn set_font_desc(&self, font_desc: Option<&str>) { unsafe { ffi::ges_text_overlay_clip_set_font_desc( @@ -169,6 +114,7 @@ impl> TextOverlayClipExt for O { } } + #[doc(alias = "ges_text_overlay_clip_set_halign")] fn set_halign(&self, halign: TextHAlign) { unsafe { ffi::ges_text_overlay_clip_set_halign( @@ -178,6 +124,7 @@ impl> TextOverlayClipExt for O { } } + #[doc(alias = "ges_text_overlay_clip_set_text")] fn set_text(&self, text: Option<&str>) { unsafe { ffi::ges_text_overlay_clip_set_text( @@ -187,6 +134,7 @@ impl> TextOverlayClipExt for O { } } + #[doc(alias = "ges_text_overlay_clip_set_valign")] fn set_valign(&self, valign: TextVAlign) { unsafe { ffi::ges_text_overlay_clip_set_valign( @@ -196,12 +144,14 @@ impl> TextOverlayClipExt for O { } } + #[doc(alias = "ges_text_overlay_clip_set_xpos")] fn set_xpos(&self, position: f64) { unsafe { ffi::ges_text_overlay_clip_set_xpos(self.as_ref().to_glib_none().0, position); } } + #[doc(alias = "ges_text_overlay_clip_set_ypos")] fn set_ypos(&self, position: f64) { unsafe { ffi::ges_text_overlay_clip_set_ypos(self.as_ref().to_glib_none().0, position); @@ -216,6 +166,7 @@ impl> TextOverlayClipExt for O { glib::ObjectExt::set_property(self.as_ref(), "valignment", valignment) } + #[doc(alias = "color")] fn connect_color_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_color_trampoline< P: IsA, @@ -241,6 +192,7 @@ impl> TextOverlayClipExt for O { } } + #[doc(alias = "font-desc")] fn connect_font_desc_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_font_desc_trampoline< P: IsA, @@ -266,6 +218,7 @@ impl> TextOverlayClipExt for O { } } + #[doc(alias = "halignment")] fn connect_halignment_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_halignment_trampoline< P: IsA, @@ -291,6 +244,7 @@ impl> TextOverlayClipExt for O { } } + #[doc(alias = "text")] fn connect_text_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_text_trampoline< P: IsA, @@ -316,6 +270,7 @@ impl> TextOverlayClipExt for O { } } + #[doc(alias = "valignment")] fn connect_valignment_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_valignment_trampoline< P: IsA, @@ -341,6 +296,7 @@ impl> TextOverlayClipExt for O { } } + #[doc(alias = "xpos")] fn connect_xpos_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_xpos_trampoline< P: IsA, @@ -366,6 +322,7 @@ impl> TextOverlayClipExt for O { } } + #[doc(alias = "ypos")] fn connect_ypos_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_ypos_trampoline< P: IsA, @@ -391,3 +348,5 @@ impl> TextOverlayClipExt for O { } } } + +impl> TextOverlayClipExt for O {} diff --git a/gstreamer-editing-services/src/auto/timeline.rs b/gstreamer-editing-services/src/auto/timeline.rs index 43f0e13c3..00de8f713 100644 --- a/gstreamer-editing-services/src/auto/timeline.rs +++ b/gstreamer-editing-services/src/auto/timeline.rs @@ -63,196 +63,15 @@ impl Default for Timeline { } } -pub trait TimelineExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait TimelineExt: IsA + sealed::Sealed + 'static { #[cfg_attr(feature = "v1_18", deprecated = "Since 1.18")] #[allow(deprecated)] #[doc(alias = "ges_timeline_add_layer")] - fn add_layer(&self, layer: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_timeline_add_track")] - fn add_track(&self, track: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_timeline_append_layer")] - fn append_layer(&self) -> Layer; - - #[doc(alias = "ges_timeline_commit")] - fn commit(&self) -> bool; - - #[doc(alias = "ges_timeline_commit_sync")] - fn commit_sync(&self) -> bool; - - #[cfg(feature = "v1_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] - #[doc(alias = "ges_timeline_disable_edit_apis")] - fn disable_edit_apis(&self, disable_edit_apis: bool); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "ges_timeline_freeze_commit")] - fn freeze_commit(&self); - - #[doc(alias = "ges_timeline_get_auto_transition")] - #[doc(alias = "get_auto_transition")] - fn is_auto_transition(&self) -> bool; - - #[doc(alias = "ges_timeline_get_duration")] - #[doc(alias = "get_duration")] - fn duration(&self) -> gst::ClockTime; - - #[cfg(feature = "v1_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] - #[doc(alias = "ges_timeline_get_edit_apis_disabled")] - #[doc(alias = "get_edit_apis_disabled")] - fn is_edit_apis_disabled(&self) -> bool; - - #[doc(alias = "ges_timeline_get_element")] - #[doc(alias = "get_element")] - fn element(&self, name: &str) -> Option; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_timeline_get_frame_at")] - #[doc(alias = "get_frame_at")] - fn frame_at(&self, timestamp: gst::ClockTime) -> FrameNumber; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_timeline_get_frame_time")] - #[doc(alias = "get_frame_time")] - fn frame_time(&self, frame_number: FrameNumber) -> Option; - - #[doc(alias = "ges_timeline_get_groups")] - #[doc(alias = "get_groups")] - fn groups(&self) -> Vec; - - #[doc(alias = "ges_timeline_get_layer")] - #[doc(alias = "get_layer")] - fn layer(&self, priority: u32) -> Option; - - #[doc(alias = "ges_timeline_get_layers")] - #[doc(alias = "get_layers")] - fn layers(&self) -> Vec; - - #[doc(alias = "ges_timeline_get_pad_for_track")] - #[doc(alias = "get_pad_for_track")] - fn pad_for_track(&self, track: &impl IsA) -> Option; - - #[doc(alias = "ges_timeline_get_snapping_distance")] - #[doc(alias = "get_snapping_distance")] - fn snapping_distance(&self) -> Option; - - #[doc(alias = "ges_timeline_get_track_for_pad")] - #[doc(alias = "get_track_for_pad")] - fn track_for_pad(&self, pad: &impl IsA) -> Option; - - #[doc(alias = "ges_timeline_get_tracks")] - #[doc(alias = "get_tracks")] - fn tracks(&self) -> Vec; - - #[doc(alias = "ges_timeline_is_empty")] - fn is_empty(&self) -> bool; - - #[doc(alias = "ges_timeline_load_from_uri")] - fn load_from_uri(&self, uri: &str) -> Result<(), glib::Error>; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "ges_timeline_move_layer")] - fn move_layer( - &self, - layer: &impl IsA, - new_layer_priority: u32, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_timeline_paste_element")] - fn paste_element( - &self, - element: &impl IsA, - position: gst::ClockTime, - layer_priority: i32, - ) -> Option; - - #[doc(alias = "ges_timeline_remove_layer")] - fn remove_layer(&self, layer: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_timeline_remove_track")] - fn remove_track(&self, track: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_timeline_save_to_uri")] - fn save_to_uri( - &self, - uri: &str, - formatter_asset: Option<&impl IsA>, - overwrite: bool, - ) -> Result<(), glib::Error>; - - #[doc(alias = "ges_timeline_set_auto_transition")] - fn set_auto_transition(&self, auto_transition: bool); - - #[doc(alias = "ges_timeline_set_snapping_distance")] - fn set_snapping_distance(&self, snapping_distance: gst::ClockTime); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "ges_timeline_thaw_commit")] - fn thaw_commit(&self); - - #[doc(alias = "commited")] - fn connect_commited(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "group-added")] - fn connect_group_added(&self, f: F) -> SignalHandlerId; - - //#[doc(alias = "group-removed")] - //fn connect_group_removed(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "layer-added")] - fn connect_layer_added(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "layer-removed")] - fn connect_layer_removed(&self, f: F) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "select-element-track")] - fn connect_select_element_track Option + 'static>( - &self, - f: F, - ) -> SignalHandlerId; - - //#[doc(alias = "select-tracks-for-object")] - //fn connect_select_tracks_for_object(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "snapping-ended")] - fn connect_snapping_ended( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "snapping-started")] - fn connect_snapping_started( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "track-added")] - fn connect_track_added(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "track-removed")] - fn connect_track_removed(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "auto-transition")] - fn connect_auto_transition_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "duration")] - fn connect_duration_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "snapping-distance")] - fn connect_snapping_distance_notify(&self, f: F) -> SignalHandlerId; -} - -impl> TimelineExt for O { - #[allow(deprecated)] fn add_layer(&self, layer: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -265,6 +84,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_add_track")] fn add_track(&self, track: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -277,6 +97,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_append_layer")] fn append_layer(&self) -> Layer { unsafe { from_glib_none(ffi::ges_timeline_append_layer( @@ -285,10 +106,12 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_commit")] fn commit(&self) -> bool { unsafe { from_glib(ffi::ges_timeline_commit(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_timeline_commit_sync")] fn commit_sync(&self) -> bool { unsafe { from_glib(ffi::ges_timeline_commit_sync( @@ -299,6 +122,7 @@ impl> TimelineExt for O { #[cfg(feature = "v1_22")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] + #[doc(alias = "ges_timeline_disable_edit_apis")] fn disable_edit_apis(&self, disable_edit_apis: bool) { unsafe { ffi::ges_timeline_disable_edit_apis( @@ -310,12 +134,15 @@ impl> TimelineExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "ges_timeline_freeze_commit")] fn freeze_commit(&self) { unsafe { ffi::ges_timeline_freeze_commit(self.as_ref().to_glib_none().0); } } + #[doc(alias = "ges_timeline_get_auto_transition")] + #[doc(alias = "get_auto_transition")] fn is_auto_transition(&self) -> bool { unsafe { from_glib(ffi::ges_timeline_get_auto_transition( @@ -324,6 +151,8 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_get_duration")] + #[doc(alias = "get_duration")] fn duration(&self) -> gst::ClockTime { unsafe { try_from_glib(ffi::ges_timeline_get_duration( @@ -335,6 +164,8 @@ impl> TimelineExt for O { #[cfg(feature = "v1_22")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] + #[doc(alias = "ges_timeline_get_edit_apis_disabled")] + #[doc(alias = "get_edit_apis_disabled")] fn is_edit_apis_disabled(&self) -> bool { unsafe { from_glib(ffi::ges_timeline_get_edit_apis_disabled( @@ -343,6 +174,8 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_get_element")] + #[doc(alias = "get_element")] fn element(&self, name: &str) -> Option { unsafe { from_glib_full(ffi::ges_timeline_get_element( @@ -354,6 +187,8 @@ impl> TimelineExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_timeline_get_frame_at")] + #[doc(alias = "get_frame_at")] fn frame_at(&self, timestamp: gst::ClockTime) -> FrameNumber { unsafe { ffi::ges_timeline_get_frame_at(self.as_ref().to_glib_none().0, timestamp.into_glib()) @@ -362,6 +197,8 @@ impl> TimelineExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_timeline_get_frame_time")] + #[doc(alias = "get_frame_time")] fn frame_time(&self, frame_number: FrameNumber) -> Option { unsafe { from_glib(ffi::ges_timeline_get_frame_time( @@ -371,6 +208,8 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_get_groups")] + #[doc(alias = "get_groups")] fn groups(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::ges_timeline_get_groups( @@ -379,6 +218,8 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_get_layer")] + #[doc(alias = "get_layer")] fn layer(&self, priority: u32) -> Option { unsafe { from_glib_full(ffi::ges_timeline_get_layer( @@ -388,6 +229,8 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_get_layers")] + #[doc(alias = "get_layers")] fn layers(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::ges_timeline_get_layers( @@ -396,6 +239,8 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_get_pad_for_track")] + #[doc(alias = "get_pad_for_track")] fn pad_for_track(&self, track: &impl IsA) -> Option { unsafe { from_glib_none(ffi::ges_timeline_get_pad_for_track( @@ -405,6 +250,8 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_get_snapping_distance")] + #[doc(alias = "get_snapping_distance")] fn snapping_distance(&self) -> Option { unsafe { from_glib(ffi::ges_timeline_get_snapping_distance( @@ -413,6 +260,8 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_get_track_for_pad")] + #[doc(alias = "get_track_for_pad")] fn track_for_pad(&self, pad: &impl IsA) -> Option { unsafe { from_glib_none(ffi::ges_timeline_get_track_for_pad( @@ -422,6 +271,8 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_get_tracks")] + #[doc(alias = "get_tracks")] fn tracks(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::ges_timeline_get_tracks( @@ -430,10 +281,12 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_is_empty")] fn is_empty(&self) -> bool { unsafe { from_glib(ffi::ges_timeline_is_empty(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_timeline_load_from_uri")] fn load_from_uri(&self, uri: &str) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -453,6 +306,7 @@ impl> TimelineExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "ges_timeline_move_layer")] fn move_layer( &self, layer: &impl IsA, @@ -470,6 +324,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_paste_element")] fn paste_element( &self, element: &impl IsA, @@ -486,6 +341,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_remove_layer")] fn remove_layer(&self, layer: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -498,6 +354,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_remove_track")] fn remove_track(&self, track: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -510,6 +367,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_save_to_uri")] fn save_to_uri( &self, uri: &str, @@ -534,6 +392,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_set_auto_transition")] fn set_auto_transition(&self, auto_transition: bool) { unsafe { ffi::ges_timeline_set_auto_transition( @@ -543,6 +402,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "ges_timeline_set_snapping_distance")] fn set_snapping_distance(&self, snapping_distance: gst::ClockTime) { unsafe { ffi::ges_timeline_set_snapping_distance( @@ -554,12 +414,14 @@ impl> TimelineExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "ges_timeline_thaw_commit")] fn thaw_commit(&self) { unsafe { ffi::ges_timeline_thaw_commit(self.as_ref().to_glib_none().0); } } + #[doc(alias = "commited")] fn connect_commited(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn commited_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTimeline, @@ -581,6 +443,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "group-added")] fn connect_group_added(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn group_added_trampoline< P: IsA, @@ -609,10 +472,12 @@ impl> TimelineExt for O { } } + //#[doc(alias = "group-removed")] //fn connect_group_removed(&self, f: F) -> SignalHandlerId { // Empty ctype children: *.PtrArray TypeId { ns_id: 1, id: 54 } //} + #[doc(alias = "layer-added")] fn connect_layer_added(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn layer_added_trampoline< P: IsA, @@ -641,6 +506,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "layer-removed")] fn connect_layer_removed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn layer_removed_trampoline< P: IsA, @@ -671,6 +537,7 @@ impl> TimelineExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "select-element-track")] fn connect_select_element_track< F: Fn(&Self, &Clip, &TrackElement) -> Option + 'static, >( @@ -707,10 +574,12 @@ impl> TimelineExt for O { } } + //#[doc(alias = "select-tracks-for-object")] //fn connect_select_tracks_for_object(&self, f: F) -> SignalHandlerId { // Empty ctype return value *.PtrArray TypeId { ns_id: 1, id: 17 } //} + #[doc(alias = "snapping-ended")] fn connect_snapping_ended( &self, f: F, @@ -746,6 +615,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "snapping-started")] fn connect_snapping_started( &self, f: F, @@ -781,6 +651,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "track-added")] fn connect_track_added(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn track_added_trampoline< P: IsA, @@ -809,6 +680,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "track-removed")] fn connect_track_removed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn track_removed_trampoline< P: IsA, @@ -837,6 +709,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "auto-transition")] fn connect_auto_transition_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_auto_transition_trampoline< P: IsA, @@ -862,6 +735,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "duration")] fn connect_duration_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_duration_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTimeline, @@ -884,6 +758,7 @@ impl> TimelineExt for O { } } + #[doc(alias = "snapping-distance")] fn connect_snapping_distance_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_snapping_distance_trampoline< P: IsA, @@ -909,3 +784,5 @@ impl> TimelineExt for O { } } } + +impl> TimelineExt for O {} diff --git a/gstreamer-editing-services/src/auto/timeline_element.rs b/gstreamer-editing-services/src/auto/timeline_element.rs index dc836b134..af7b939aa 100644 --- a/gstreamer-editing-services/src/auto/timeline_element.rs +++ b/gstreamer-editing-services/src/auto/timeline_element.rs @@ -28,255 +28,13 @@ impl TimelineElement { pub const NONE: Option<&'static TimelineElement> = None; } -pub trait TimelineElementExt: 'static { - #[doc(alias = "ges_timeline_element_add_child_property")] - fn add_child_property( - &self, - pspec: impl AsRef, - child: &impl IsA, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_timeline_element_copy")] - #[must_use] - fn copy(&self, deep: bool) -> TimelineElement; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_timeline_element_edit")] - fn edit( - &self, - layers: &[Layer], - new_layer_priority: i64, - mode: EditMode, - edge: Edge, - position: u64, - ) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_timeline_element_edit_full")] - fn edit_full( - &self, - new_layer_priority: i64, - mode: EditMode, - edge: Edge, - position: u64, - ) -> Result<(), glib::Error>; - - //#[doc(alias = "ges_timeline_element_get_child_properties")] - //#[doc(alias = "get_child_properties")] - //fn child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs); - - #[doc(alias = "ges_timeline_element_get_child_property")] - #[doc(alias = "get_child_property")] - fn child_property(&self, property_name: &str) -> Option; - - #[doc(alias = "ges_timeline_element_get_child_property_by_pspec")] - #[doc(alias = "get_child_property_by_pspec")] - fn child_property_by_pspec(&self, pspec: impl AsRef) -> glib::Value; - - //#[doc(alias = "ges_timeline_element_get_child_property_valist")] - //#[doc(alias = "get_child_property_valist")] - //fn child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); - - #[doc(alias = "ges_timeline_element_get_duration")] - #[doc(alias = "get_duration")] - fn duration(&self) -> gst::ClockTime; - - #[doc(alias = "ges_timeline_element_get_inpoint")] - #[doc(alias = "get_inpoint")] - fn inpoint(&self) -> gst::ClockTime; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "ges_timeline_element_get_layer_priority")] - #[doc(alias = "get_layer_priority")] - fn layer_priority(&self) -> u32; - - #[doc(alias = "ges_timeline_element_get_max_duration")] - #[doc(alias = "get_max_duration")] - fn max_duration(&self) -> Option; - - #[doc(alias = "ges_timeline_element_get_name")] - #[doc(alias = "get_name")] - fn name(&self) -> Option; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_timeline_element_get_natural_framerate")] - #[doc(alias = "get_natural_framerate")] - fn natural_framerate(&self) -> Option<(i32, i32)>; - - #[doc(alias = "ges_timeline_element_get_parent")] - #[doc(alias = "get_parent")] - #[must_use] - fn parent(&self) -> Option; - - #[doc(alias = "ges_timeline_element_get_priority")] - #[doc(alias = "get_priority")] - fn priority(&self) -> u32; - - #[doc(alias = "ges_timeline_element_get_start")] - #[doc(alias = "get_start")] - fn start(&self) -> gst::ClockTime; - - #[doc(alias = "ges_timeline_element_get_timeline")] - #[doc(alias = "get_timeline")] - fn timeline(&self) -> Option; - - #[doc(alias = "ges_timeline_element_get_toplevel_parent")] - #[doc(alias = "get_toplevel_parent")] - #[must_use] - fn toplevel_parent(&self) -> TimelineElement; - - #[doc(alias = "ges_timeline_element_get_track_types")] - #[doc(alias = "get_track_types")] - fn track_types(&self) -> TrackType; - - #[doc(alias = "ges_timeline_element_list_children_properties")] - fn list_children_properties(&self) -> Vec; - - #[doc(alias = "ges_timeline_element_lookup_child")] - fn lookup_child(&self, prop_name: &str) -> Option<(glib::Object, glib::ParamSpec)>; - - #[doc(alias = "ges_timeline_element_paste")] - fn paste(&self, paste_position: gst::ClockTime) -> Result; - - #[doc(alias = "ges_timeline_element_remove_child_property")] - fn remove_child_property( - &self, - pspec: impl AsRef, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_timeline_element_ripple")] - fn ripple(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_timeline_element_ripple_end")] - fn ripple_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_timeline_element_roll_end")] - fn roll_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_timeline_element_roll_start")] - fn roll_start(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError>; - - //#[doc(alias = "ges_timeline_element_set_child_properties")] - //fn set_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs); - - #[doc(alias = "ges_timeline_element_set_child_property")] - fn set_child_property( - &self, - property_name: &str, - value: &glib::Value, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_timeline_element_set_child_property_by_pspec")] - fn set_child_property_by_pspec(&self, pspec: impl AsRef, value: &glib::Value); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_timeline_element_set_child_property_full")] - fn set_child_property_full( - &self, - property_name: &str, - value: &glib::Value, - ) -> Result<(), glib::Error>; - - //#[doc(alias = "ges_timeline_element_set_child_property_valist")] - //fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); - - #[doc(alias = "ges_timeline_element_set_duration")] - fn set_duration(&self, duration: impl Into>) -> bool; - - #[doc(alias = "ges_timeline_element_set_inpoint")] - fn set_inpoint(&self, inpoint: gst::ClockTime) -> bool; - - #[doc(alias = "ges_timeline_element_set_max_duration")] - fn set_max_duration(&self, maxduration: impl Into>) -> bool; - - #[doc(alias = "ges_timeline_element_set_name")] - fn set_name(&self, name: Option<&str>) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_timeline_element_set_parent")] - fn set_parent(&self, parent: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[deprecated = "Since 1.10"] - #[allow(deprecated)] - #[doc(alias = "ges_timeline_element_set_priority")] - fn set_priority(&self, priority: u32) -> bool; - - #[doc(alias = "ges_timeline_element_set_start")] - fn set_start(&self, start: gst::ClockTime) -> bool; - - #[doc(alias = "ges_timeline_element_set_timeline")] - fn set_timeline(&self, timeline: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_timeline_element_trim")] - fn trim(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "in-point")] - fn in_point(&self) -> u64; - - #[doc(alias = "in-point")] - fn set_in_point(&self, in_point: u64); - - fn is_serialize(&self) -> bool; - - fn set_serialize(&self, serialize: bool); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "child-property-added")] - fn connect_child_property_added( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "child-property-removed")] - fn connect_child_property_removed( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "deep-notify")] - fn connect_deep_notify( - &self, - detail: Option<&str>, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "duration")] - fn connect_duration_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "in-point")] - fn connect_in_point_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "max-duration")] - fn connect_max_duration_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "name")] - fn connect_name_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "parent")] - fn connect_parent_notify(&self, f: F) -> SignalHandlerId; - - #[deprecated = "Since 1.10"] - #[doc(alias = "priority")] - fn connect_priority_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "serialize")] - fn connect_serialize_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "start")] - fn connect_start_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "timeline")] - fn connect_timeline_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> TimelineElementExt for O { +pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_timeline_element_add_child_property")] fn add_child_property( &self, pspec: impl AsRef, @@ -294,6 +52,8 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_copy")] + #[must_use] fn copy(&self, deep: bool) -> TimelineElement { unsafe { from_glib_none(ffi::ges_timeline_element_copy( @@ -305,6 +65,7 @@ impl> TimelineElementExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_timeline_element_edit")] fn edit( &self, layers: &[Layer], @@ -327,6 +88,7 @@ impl> TimelineElementExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_timeline_element_edit_full")] fn edit_full( &self, new_layer_priority: i64, @@ -353,10 +115,14 @@ impl> TimelineElementExt for O { } } + //#[doc(alias = "ges_timeline_element_get_child_properties")] + //#[doc(alias = "get_child_properties")] //fn child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) { // unsafe { TODO: call ffi:ges_timeline_element_get_child_properties() } //} + #[doc(alias = "ges_timeline_element_get_child_property")] + #[doc(alias = "get_child_property")] fn child_property(&self, property_name: &str) -> Option { unsafe { let mut value = glib::Value::uninitialized(); @@ -373,6 +139,8 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_get_child_property_by_pspec")] + #[doc(alias = "get_child_property_by_pspec")] fn child_property_by_pspec(&self, pspec: impl AsRef) -> glib::Value { unsafe { let mut value = glib::Value::uninitialized(); @@ -385,10 +153,14 @@ impl> TimelineElementExt for O { } } + //#[doc(alias = "ges_timeline_element_get_child_property_valist")] + //#[doc(alias = "get_child_property_valist")] //fn child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { // unsafe { TODO: call ffi:ges_timeline_element_get_child_property_valist() } //} + #[doc(alias = "ges_timeline_element_get_duration")] + #[doc(alias = "get_duration")] fn duration(&self) -> gst::ClockTime { unsafe { try_from_glib(ffi::ges_timeline_element_get_duration( @@ -398,6 +170,8 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_get_inpoint")] + #[doc(alias = "get_inpoint")] fn inpoint(&self) -> gst::ClockTime { unsafe { try_from_glib(ffi::ges_timeline_element_get_inpoint( @@ -409,10 +183,14 @@ impl> TimelineElementExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "ges_timeline_element_get_layer_priority")] + #[doc(alias = "get_layer_priority")] fn layer_priority(&self) -> u32 { unsafe { ffi::ges_timeline_element_get_layer_priority(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_timeline_element_get_max_duration")] + #[doc(alias = "get_max_duration")] fn max_duration(&self) -> Option { unsafe { from_glib(ffi::ges_timeline_element_get_max_duration( @@ -421,6 +199,8 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_get_name")] + #[doc(alias = "get_name")] fn name(&self) -> Option { unsafe { from_glib_full(ffi::ges_timeline_element_get_name( @@ -431,6 +211,8 @@ impl> TimelineElementExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_timeline_element_get_natural_framerate")] + #[doc(alias = "get_natural_framerate")] fn natural_framerate(&self) -> Option<(i32, i32)> { unsafe { let mut framerate_n = mem::MaybeUninit::uninit(); @@ -448,6 +230,9 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_get_parent")] + #[doc(alias = "get_parent")] + #[must_use] fn parent(&self) -> Option { unsafe { from_glib_full(ffi::ges_timeline_element_get_parent( @@ -456,10 +241,14 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_get_priority")] + #[doc(alias = "get_priority")] fn priority(&self) -> u32 { unsafe { ffi::ges_timeline_element_get_priority(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_timeline_element_get_start")] + #[doc(alias = "get_start")] fn start(&self) -> gst::ClockTime { unsafe { try_from_glib(ffi::ges_timeline_element_get_start( @@ -469,6 +258,8 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_get_timeline")] + #[doc(alias = "get_timeline")] fn timeline(&self) -> Option { unsafe { from_glib_full(ffi::ges_timeline_element_get_timeline( @@ -477,6 +268,9 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_get_toplevel_parent")] + #[doc(alias = "get_toplevel_parent")] + #[must_use] fn toplevel_parent(&self) -> TimelineElement { unsafe { from_glib_full(ffi::ges_timeline_element_get_toplevel_parent( @@ -485,6 +279,8 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_get_track_types")] + #[doc(alias = "get_track_types")] fn track_types(&self) -> TrackType { unsafe { from_glib(ffi::ges_timeline_element_get_track_types( @@ -493,6 +289,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_list_children_properties")] fn list_children_properties(&self) -> Vec { unsafe { let mut n_properties = mem::MaybeUninit::uninit(); @@ -507,6 +304,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_lookup_child")] fn lookup_child(&self, prop_name: &str) -> Option<(glib::Object, glib::ParamSpec)> { unsafe { let mut child = ptr::null_mut(); @@ -525,6 +323,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_paste")] fn paste(&self, paste_position: gst::ClockTime) -> Result { unsafe { Option::<_>::from_glib_full(ffi::ges_timeline_element_paste( @@ -535,6 +334,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_remove_child_property")] fn remove_child_property( &self, pspec: impl AsRef, @@ -550,6 +350,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_ripple")] fn ripple(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -559,6 +360,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_ripple_end")] fn ripple_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -571,6 +373,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_roll_end")] fn roll_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -580,6 +383,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_roll_start")] fn roll_start(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -592,10 +396,12 @@ impl> TimelineElementExt for O { } } + //#[doc(alias = "ges_timeline_element_set_child_properties")] //fn set_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) { // unsafe { TODO: call ffi:ges_timeline_element_set_child_properties() } //} + #[doc(alias = "ges_timeline_element_set_child_property")] fn set_child_property( &self, property_name: &str, @@ -613,6 +419,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_set_child_property_by_pspec")] fn set_child_property_by_pspec(&self, pspec: impl AsRef, value: &glib::Value) { unsafe { ffi::ges_timeline_element_set_child_property_by_pspec( @@ -625,6 +432,7 @@ impl> TimelineElementExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_timeline_element_set_child_property_full")] fn set_child_property_full( &self, property_name: &str, @@ -647,10 +455,12 @@ impl> TimelineElementExt for O { } } + //#[doc(alias = "ges_timeline_element_set_child_property_valist")] //fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { // unsafe { TODO: call ffi:ges_timeline_element_set_child_property_valist() } //} + #[doc(alias = "ges_timeline_element_set_duration")] fn set_duration(&self, duration: impl Into>) -> bool { unsafe { from_glib(ffi::ges_timeline_element_set_duration( @@ -660,6 +470,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_set_inpoint")] fn set_inpoint(&self, inpoint: gst::ClockTime) -> bool { unsafe { from_glib(ffi::ges_timeline_element_set_inpoint( @@ -669,6 +480,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_set_max_duration")] fn set_max_duration(&self, maxduration: impl Into>) -> bool { unsafe { from_glib(ffi::ges_timeline_element_set_max_duration( @@ -678,6 +490,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_set_name")] fn set_name(&self, name: Option<&str>) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -690,6 +503,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_set_parent")] fn set_parent(&self, parent: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -702,7 +516,9 @@ impl> TimelineElementExt for O { } } + #[deprecated = "Since 1.10"] #[allow(deprecated)] + #[doc(alias = "ges_timeline_element_set_priority")] fn set_priority(&self, priority: u32) -> bool { unsafe { from_glib(ffi::ges_timeline_element_set_priority( @@ -712,6 +528,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_set_start")] fn set_start(&self, start: gst::ClockTime) -> bool { unsafe { from_glib(ffi::ges_timeline_element_set_start( @@ -721,6 +538,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_set_timeline")] fn set_timeline(&self, timeline: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -733,6 +551,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "ges_timeline_element_trim")] fn trim(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -742,10 +561,12 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "in-point")] fn in_point(&self) -> u64 { glib::ObjectExt::property(self.as_ref(), "in-point") } + #[doc(alias = "in-point")] fn set_in_point(&self, in_point: u64) { glib::ObjectExt::set_property(self.as_ref(), "in-point", in_point) } @@ -760,6 +581,7 @@ impl> TimelineElementExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "child-property-added")] fn connect_child_property_added( &self, f: F, @@ -795,6 +617,7 @@ impl> TimelineElementExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "child-property-removed")] fn connect_child_property_removed( &self, f: F, @@ -828,6 +651,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "deep-notify")] fn connect_deep_notify( &self, detail: Option<&str>, @@ -866,6 +690,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "duration")] fn connect_duration_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_duration_trampoline< P: IsA, @@ -891,6 +716,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "in-point")] fn connect_in_point_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_in_point_trampoline< P: IsA, @@ -916,6 +742,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "max-duration")] fn connect_max_duration_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_max_duration_trampoline< P: IsA, @@ -941,6 +768,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "name")] fn connect_name_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_name_trampoline< P: IsA, @@ -966,6 +794,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "parent")] fn connect_parent_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_parent_trampoline< P: IsA, @@ -991,6 +820,8 @@ impl> TimelineElementExt for O { } } + #[deprecated = "Since 1.10"] + #[doc(alias = "priority")] fn connect_priority_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_priority_trampoline< P: IsA, @@ -1016,6 +847,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "serialize")] fn connect_serialize_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_serialize_trampoline< P: IsA, @@ -1041,6 +873,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "start")] fn connect_start_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_start_trampoline< P: IsA, @@ -1066,6 +899,7 @@ impl> TimelineElementExt for O { } } + #[doc(alias = "timeline")] fn connect_timeline_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_timeline_trampoline< P: IsA, @@ -1091,3 +925,5 @@ impl> TimelineElementExt for O { } } } + +impl> TimelineElementExt for O {} diff --git a/gstreamer-editing-services/src/auto/title_clip.rs b/gstreamer-editing-services/src/auto/title_clip.rs index b4243b238..f417d847e 100644 --- a/gstreamer-editing-services/src/auto/title_clip.rs +++ b/gstreamer-editing-services/src/auto/title_clip.rs @@ -34,141 +34,24 @@ impl TitleClip { } } -pub trait TitleClipExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait TitleClipExt: IsA + sealed::Sealed + 'static { #[deprecated = "Since 1.6"] #[allow(deprecated)] #[doc(alias = "ges_title_clip_get_background_color")] #[doc(alias = "get_background_color")] - fn background_color(&self) -> u32; + fn background_color(&self) -> u32 { + unsafe { ffi::ges_title_clip_get_background_color(self.as_ref().to_glib_none().0) } + } #[deprecated = "Since 1.6"] #[allow(deprecated)] #[doc(alias = "ges_title_clip_get_font_desc")] #[doc(alias = "get_font_desc")] - fn font_desc(&self) -> Option; - - #[deprecated = "Since 1.6"] - #[allow(deprecated)] - #[doc(alias = "ges_title_clip_get_halignment")] - #[doc(alias = "get_halignment")] - fn halignment(&self) -> TextHAlign; - - #[deprecated = "Since 1.6"] - #[allow(deprecated)] - #[doc(alias = "ges_title_clip_get_text")] - #[doc(alias = "get_text")] - fn text(&self) -> Option; - - #[deprecated = "Since 1.6"] - #[allow(deprecated)] - #[doc(alias = "ges_title_clip_get_text_color")] - #[doc(alias = "get_text_color")] - fn text_color(&self) -> u32; - - #[deprecated = "Since 1.6"] - #[allow(deprecated)] - #[doc(alias = "ges_title_clip_get_valignment")] - #[doc(alias = "get_valignment")] - fn valignment(&self) -> TextVAlign; - - #[deprecated = "Since 1.6"] - #[allow(deprecated)] - #[doc(alias = "ges_title_clip_get_xpos")] - #[doc(alias = "get_xpos")] - fn xpos(&self) -> f64; - - #[deprecated = "Since 1.6"] - #[allow(deprecated)] - #[doc(alias = "ges_title_clip_get_ypos")] - #[doc(alias = "get_ypos")] - fn ypos(&self) -> f64; - - #[deprecated = "Since 1.6"] - #[allow(deprecated)] - #[doc(alias = "ges_title_clip_set_background")] - fn set_background(&self, background: u32); - - #[deprecated = "Since 1.6"] - #[allow(deprecated)] - #[doc(alias = "ges_title_clip_set_color")] - fn set_color(&self, color: u32); - - #[deprecated = "Since 1.6"] - #[allow(deprecated)] - #[doc(alias = "ges_title_clip_set_font_desc")] - fn set_font_desc(&self, font_desc: Option<&str>); - - #[deprecated = "Since 1.6"] - #[allow(deprecated)] - #[doc(alias = "ges_title_clip_set_halignment")] - fn set_halignment(&self, halign: TextHAlign); - - #[deprecated = "Since 1.6"] - #[allow(deprecated)] - #[doc(alias = "ges_title_clip_set_text")] - fn set_text(&self, text: Option<&str>); - - #[deprecated = "Since 1.6"] - #[allow(deprecated)] - #[doc(alias = "ges_title_clip_set_valignment")] - fn set_valignment(&self, valign: TextVAlign); - - #[deprecated = "Since 1.6"] - #[allow(deprecated)] - #[doc(alias = "ges_title_clip_set_xpos")] - fn set_xpos(&self, position: f64); - - #[deprecated = "Since 1.6"] - #[allow(deprecated)] - #[doc(alias = "ges_title_clip_set_ypos")] - fn set_ypos(&self, position: f64); - - #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")] - fn background(&self) -> u32; - - #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")] - fn color(&self) -> u32; - - #[deprecated = "Since 1.6"] - #[doc(alias = "background")] - fn connect_background_notify(&self, f: F) -> SignalHandlerId; - - #[deprecated = "Since 1.6"] - #[doc(alias = "color")] - fn connect_color_notify(&self, f: F) -> SignalHandlerId; - - #[deprecated = "Since 1.6"] - #[doc(alias = "font-desc")] - fn connect_font_desc_notify(&self, f: F) -> SignalHandlerId; - - #[deprecated = "Since 1.6"] - #[doc(alias = "halignment")] - fn connect_halignment_notify(&self, f: F) -> SignalHandlerId; - - #[deprecated = "Since 1.6"] - #[doc(alias = "text")] - fn connect_text_notify(&self, f: F) -> SignalHandlerId; - - #[deprecated = "Since 1.6"] - #[doc(alias = "valignment")] - fn connect_valignment_notify(&self, f: F) -> SignalHandlerId; - - #[deprecated = "Since 1.6"] - #[doc(alias = "xpos")] - fn connect_xpos_notify(&self, f: F) -> SignalHandlerId; - - #[deprecated = "Since 1.6"] - #[doc(alias = "ypos")] - fn connect_ypos_notify(&self, f: F) -> SignalHandlerId; -} - -impl> TitleClipExt for O { - #[allow(deprecated)] - fn background_color(&self) -> u32 { - unsafe { ffi::ges_title_clip_get_background_color(self.as_ref().to_glib_none().0) } - } - - #[allow(deprecated)] fn font_desc(&self) -> Option { unsafe { from_glib_full(ffi::ges_title_clip_get_font_desc( @@ -177,7 +60,10 @@ impl> TitleClipExt for O { } } + #[deprecated = "Since 1.6"] #[allow(deprecated)] + #[doc(alias = "ges_title_clip_get_halignment")] + #[doc(alias = "get_halignment")] fn halignment(&self) -> TextHAlign { unsafe { from_glib(ffi::ges_title_clip_get_halignment( @@ -186,17 +72,26 @@ impl> TitleClipExt for O { } } + #[deprecated = "Since 1.6"] #[allow(deprecated)] + #[doc(alias = "ges_title_clip_get_text")] + #[doc(alias = "get_text")] fn text(&self) -> Option { unsafe { from_glib_full(ffi::ges_title_clip_get_text(self.as_ref().to_glib_none().0)) } } + #[deprecated = "Since 1.6"] #[allow(deprecated)] + #[doc(alias = "ges_title_clip_get_text_color")] + #[doc(alias = "get_text_color")] fn text_color(&self) -> u32 { unsafe { ffi::ges_title_clip_get_text_color(self.as_ref().to_glib_none().0) } } + #[deprecated = "Since 1.6"] #[allow(deprecated)] + #[doc(alias = "ges_title_clip_get_valignment")] + #[doc(alias = "get_valignment")] fn valignment(&self) -> TextVAlign { unsafe { from_glib(ffi::ges_title_clip_get_valignment( @@ -205,31 +100,43 @@ impl> TitleClipExt for O { } } + #[deprecated = "Since 1.6"] #[allow(deprecated)] + #[doc(alias = "ges_title_clip_get_xpos")] + #[doc(alias = "get_xpos")] fn xpos(&self) -> f64 { unsafe { ffi::ges_title_clip_get_xpos(self.as_ref().to_glib_none().0) } } + #[deprecated = "Since 1.6"] #[allow(deprecated)] + #[doc(alias = "ges_title_clip_get_ypos")] + #[doc(alias = "get_ypos")] fn ypos(&self) -> f64 { unsafe { ffi::ges_title_clip_get_ypos(self.as_ref().to_glib_none().0) } } + #[deprecated = "Since 1.6"] #[allow(deprecated)] + #[doc(alias = "ges_title_clip_set_background")] fn set_background(&self, background: u32) { unsafe { ffi::ges_title_clip_set_background(self.as_ref().to_glib_none().0, background); } } + #[deprecated = "Since 1.6"] #[allow(deprecated)] + #[doc(alias = "ges_title_clip_set_color")] fn set_color(&self, color: u32) { unsafe { ffi::ges_title_clip_set_color(self.as_ref().to_glib_none().0, color); } } + #[deprecated = "Since 1.6"] #[allow(deprecated)] + #[doc(alias = "ges_title_clip_set_font_desc")] fn set_font_desc(&self, font_desc: Option<&str>) { unsafe { ffi::ges_title_clip_set_font_desc( @@ -239,49 +146,63 @@ impl> TitleClipExt for O { } } + #[deprecated = "Since 1.6"] #[allow(deprecated)] + #[doc(alias = "ges_title_clip_set_halignment")] fn set_halignment(&self, halign: TextHAlign) { unsafe { ffi::ges_title_clip_set_halignment(self.as_ref().to_glib_none().0, halign.into_glib()); } } + #[deprecated = "Since 1.6"] #[allow(deprecated)] + #[doc(alias = "ges_title_clip_set_text")] fn set_text(&self, text: Option<&str>) { unsafe { ffi::ges_title_clip_set_text(self.as_ref().to_glib_none().0, text.to_glib_none().0); } } + #[deprecated = "Since 1.6"] #[allow(deprecated)] + #[doc(alias = "ges_title_clip_set_valignment")] fn set_valignment(&self, valign: TextVAlign) { unsafe { ffi::ges_title_clip_set_valignment(self.as_ref().to_glib_none().0, valign.into_glib()); } } + #[deprecated = "Since 1.6"] #[allow(deprecated)] + #[doc(alias = "ges_title_clip_set_xpos")] fn set_xpos(&self, position: f64) { unsafe { ffi::ges_title_clip_set_xpos(self.as_ref().to_glib_none().0, position); } } + #[deprecated = "Since 1.6"] #[allow(deprecated)] + #[doc(alias = "ges_title_clip_set_ypos")] fn set_ypos(&self, position: f64) { unsafe { ffi::ges_title_clip_set_ypos(self.as_ref().to_glib_none().0, position); } } + #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")] fn background(&self) -> u32 { glib::ObjectExt::property(self.as_ref(), "background") } + #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")] fn color(&self) -> u32 { glib::ObjectExt::property(self.as_ref(), "color") } + #[deprecated = "Since 1.6"] + #[doc(alias = "background")] fn connect_background_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_background_trampoline< P: IsA, @@ -307,6 +228,8 @@ impl> TitleClipExt for O { } } + #[deprecated = "Since 1.6"] + #[doc(alias = "color")] fn connect_color_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_color_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTitleClip, @@ -329,6 +252,8 @@ impl> TitleClipExt for O { } } + #[deprecated = "Since 1.6"] + #[doc(alias = "font-desc")] fn connect_font_desc_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_font_desc_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTitleClip, @@ -351,6 +276,8 @@ impl> TitleClipExt for O { } } + #[deprecated = "Since 1.6"] + #[doc(alias = "halignment")] fn connect_halignment_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_halignment_trampoline< P: IsA, @@ -376,6 +303,8 @@ impl> TitleClipExt for O { } } + #[deprecated = "Since 1.6"] + #[doc(alias = "text")] fn connect_text_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_text_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTitleClip, @@ -398,6 +327,8 @@ impl> TitleClipExt for O { } } + #[deprecated = "Since 1.6"] + #[doc(alias = "valignment")] fn connect_valignment_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_valignment_trampoline< P: IsA, @@ -423,6 +354,8 @@ impl> TitleClipExt for O { } } + #[deprecated = "Since 1.6"] + #[doc(alias = "xpos")] fn connect_xpos_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_xpos_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTitleClip, @@ -445,6 +378,8 @@ impl> TitleClipExt for O { } } + #[deprecated = "Since 1.6"] + #[doc(alias = "ypos")] fn connect_ypos_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_ypos_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTitleClip, @@ -467,3 +402,5 @@ impl> TitleClipExt for O { } } } + +impl> TitleClipExt for O {} diff --git a/gstreamer-editing-services/src/auto/title_source.rs b/gstreamer-editing-services/src/auto/title_source.rs index ef7657e07..ed35f01af 100644 --- a/gstreamer-editing-services/src/auto/title_source.rs +++ b/gstreamer-editing-services/src/auto/title_source.rs @@ -23,74 +23,22 @@ impl TitleSource { pub const NONE: Option<&'static TitleSource> = None; } -pub trait TitleSourceExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait TitleSourceExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_title_source_get_background_color")] #[doc(alias = "get_background_color")] - fn background_color(&self) -> u32; + fn background_color(&self) -> u32 { + unsafe { ffi::ges_title_source_get_background_color(self.as_ref().to_glib_none().0) } + } #[cfg_attr(feature = "v1_16", deprecated = "Since 1.16")] #[allow(deprecated)] #[doc(alias = "ges_title_source_get_font_desc")] #[doc(alias = "get_font_desc")] - fn font_desc(&self) -> Option; - - #[doc(alias = "ges_title_source_get_halignment")] - #[doc(alias = "get_halignment")] - fn halignment(&self) -> TextHAlign; - - #[cfg_attr(feature = "v1_16", deprecated = "Since 1.16")] - #[allow(deprecated)] - #[doc(alias = "ges_title_source_get_text")] - #[doc(alias = "get_text")] - fn text(&self) -> Option; - - #[doc(alias = "ges_title_source_get_text_color")] - #[doc(alias = "get_text_color")] - fn text_color(&self) -> u32; - - #[doc(alias = "ges_title_source_get_valignment")] - #[doc(alias = "get_valignment")] - fn valignment(&self) -> TextVAlign; - - #[doc(alias = "ges_title_source_get_xpos")] - #[doc(alias = "get_xpos")] - fn xpos(&self) -> f64; - - #[doc(alias = "ges_title_source_get_ypos")] - #[doc(alias = "get_ypos")] - fn ypos(&self) -> f64; - - #[doc(alias = "ges_title_source_set_background_color")] - fn set_background_color(&self, color: u32); - - #[doc(alias = "ges_title_source_set_font_desc")] - fn set_font_desc(&self, font_desc: Option<&str>); - - #[doc(alias = "ges_title_source_set_halignment")] - fn set_halignment(&self, halign: TextHAlign); - - #[doc(alias = "ges_title_source_set_text")] - fn set_text(&self, text: Option<&str>); - - #[doc(alias = "ges_title_source_set_text_color")] - fn set_text_color(&self, color: u32); - - #[doc(alias = "ges_title_source_set_valignment")] - fn set_valignment(&self, valign: TextVAlign); - - #[doc(alias = "ges_title_source_set_xpos")] - fn set_xpos(&self, position: f64); - - #[doc(alias = "ges_title_source_set_ypos")] - fn set_ypos(&self, position: f64); -} - -impl> TitleSourceExt for O { - fn background_color(&self) -> u32 { - unsafe { ffi::ges_title_source_get_background_color(self.as_ref().to_glib_none().0) } - } - - #[allow(deprecated)] fn font_desc(&self) -> Option { unsafe { from_glib_full(ffi::ges_title_source_get_font_desc( @@ -99,6 +47,8 @@ impl> TitleSourceExt for O { } } + #[doc(alias = "ges_title_source_get_halignment")] + #[doc(alias = "get_halignment")] fn halignment(&self) -> TextHAlign { unsafe { from_glib(ffi::ges_title_source_get_halignment( @@ -107,7 +57,10 @@ impl> TitleSourceExt for O { } } + #[cfg_attr(feature = "v1_16", deprecated = "Since 1.16")] #[allow(deprecated)] + #[doc(alias = "ges_title_source_get_text")] + #[doc(alias = "get_text")] fn text(&self) -> Option { unsafe { from_glib_full(ffi::ges_title_source_get_text( @@ -116,10 +69,14 @@ impl> TitleSourceExt for O { } } + #[doc(alias = "ges_title_source_get_text_color")] + #[doc(alias = "get_text_color")] fn text_color(&self) -> u32 { unsafe { ffi::ges_title_source_get_text_color(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_title_source_get_valignment")] + #[doc(alias = "get_valignment")] fn valignment(&self) -> TextVAlign { unsafe { from_glib(ffi::ges_title_source_get_valignment( @@ -128,20 +85,26 @@ impl> TitleSourceExt for O { } } + #[doc(alias = "ges_title_source_get_xpos")] + #[doc(alias = "get_xpos")] fn xpos(&self) -> f64 { unsafe { ffi::ges_title_source_get_xpos(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_title_source_get_ypos")] + #[doc(alias = "get_ypos")] fn ypos(&self) -> f64 { unsafe { ffi::ges_title_source_get_ypos(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_title_source_set_background_color")] fn set_background_color(&self, color: u32) { unsafe { ffi::ges_title_source_set_background_color(self.as_ref().to_glib_none().0, color); } } + #[doc(alias = "ges_title_source_set_font_desc")] fn set_font_desc(&self, font_desc: Option<&str>) { unsafe { ffi::ges_title_source_set_font_desc( @@ -151,6 +114,7 @@ impl> TitleSourceExt for O { } } + #[doc(alias = "ges_title_source_set_halignment")] fn set_halignment(&self, halign: TextHAlign) { unsafe { ffi::ges_title_source_set_halignment( @@ -160,18 +124,21 @@ impl> TitleSourceExt for O { } } + #[doc(alias = "ges_title_source_set_text")] fn set_text(&self, text: Option<&str>) { unsafe { ffi::ges_title_source_set_text(self.as_ref().to_glib_none().0, text.to_glib_none().0); } } + #[doc(alias = "ges_title_source_set_text_color")] fn set_text_color(&self, color: u32) { unsafe { ffi::ges_title_source_set_text_color(self.as_ref().to_glib_none().0, color); } } + #[doc(alias = "ges_title_source_set_valignment")] fn set_valignment(&self, valign: TextVAlign) { unsafe { ffi::ges_title_source_set_valignment( @@ -181,15 +148,19 @@ impl> TitleSourceExt for O { } } + #[doc(alias = "ges_title_source_set_xpos")] fn set_xpos(&self, position: f64) { unsafe { ffi::ges_title_source_set_xpos(self.as_ref().to_glib_none().0, position); } } + #[doc(alias = "ges_title_source_set_ypos")] fn set_ypos(&self, position: f64) { unsafe { ffi::ges_title_source_set_ypos(self.as_ref().to_glib_none().0, position); } } } + +impl> TitleSourceExt for O {} diff --git a/gstreamer-editing-services/src/auto/track.rs b/gstreamer-editing-services/src/auto/track.rs index ccc375d36..20e667fab 100644 --- a/gstreamer-editing-services/src/auto/track.rs +++ b/gstreamer-editing-services/src/auto/track.rs @@ -33,111 +33,13 @@ impl Track { } } -pub trait GESTrackExt: 'static { - #[doc(alias = "ges_track_add_element")] - fn add_element(&self, object: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_track_add_element_full")] - fn add_element_full(&self, object: &impl IsA) -> Result<(), glib::Error>; - - #[doc(alias = "ges_track_commit")] - fn commit(&self) -> bool; - - #[doc(alias = "ges_track_get_caps")] - #[doc(alias = "get_caps")] - fn caps(&self) -> Option; - - #[doc(alias = "ges_track_get_elements")] - #[doc(alias = "get_elements")] - fn elements(&self) -> Vec; - - #[doc(alias = "ges_track_get_mixing")] - #[doc(alias = "get_mixing")] - fn is_mixing(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_track_get_restriction_caps")] - #[doc(alias = "get_restriction_caps")] - fn restriction_caps(&self) -> Option; - - #[doc(alias = "ges_track_get_timeline")] - #[doc(alias = "get_timeline")] - fn timeline(&self) -> Option; - - #[doc(alias = "ges_track_remove_element")] - fn remove_element(&self, object: &impl IsA) - -> Result<(), glib::error::BoolError>; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_track_remove_element_full")] - fn remove_element_full(&self, object: &impl IsA) -> Result<(), glib::Error>; - - //#[doc(alias = "ges_track_set_create_element_for_gap_func")] - //fn set_create_element_for_gap_func gst::Element + 'static>(&self, func: P); - - #[doc(alias = "ges_track_set_mixing")] - fn set_mixing(&self, mixing: bool); - - #[doc(alias = "ges_track_set_restriction_caps")] - fn set_restriction_caps(&self, caps: &gst::Caps); - - #[doc(alias = "ges_track_set_timeline")] - fn set_timeline(&self, timeline: &impl IsA); - - #[doc(alias = "ges_track_update_restriction_caps")] - fn update_restriction_caps(&self, caps: &gst::Caps); - - fn duration(&self) -> u64; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - fn id(&self) -> Option; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - fn set_id(&self, id: Option<&str>); - - #[doc(alias = "restriction-caps")] - fn get_property_restriction_caps(&self) -> Option; - - #[doc(alias = "track-type")] - fn track_type(&self) -> TrackType; - - #[doc(alias = "commited")] - fn connect_commited(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "track-element-added")] - fn connect_track_element_added( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "track-element-removed")] - fn connect_track_element_removed( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "duration")] - fn connect_duration_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "id")] - fn connect_id_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "mixing")] - fn connect_mixing_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "restriction-caps")] - fn connect_restriction_caps_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> GESTrackExt for O { +pub trait GESTrackExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_track_add_element")] fn add_element(&self, object: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -152,6 +54,7 @@ impl> GESTrackExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_track_add_element_full")] fn add_element_full(&self, object: &impl IsA) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -169,14 +72,19 @@ impl> GESTrackExt for O { } } + #[doc(alias = "ges_track_commit")] fn commit(&self) -> bool { unsafe { from_glib(ffi::ges_track_commit(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_track_get_caps")] + #[doc(alias = "get_caps")] fn caps(&self) -> Option { unsafe { from_glib_none(ffi::ges_track_get_caps(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_track_get_elements")] + #[doc(alias = "get_elements")] fn elements(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::ges_track_get_elements( @@ -185,12 +93,16 @@ impl> GESTrackExt for O { } } + #[doc(alias = "ges_track_get_mixing")] + #[doc(alias = "get_mixing")] fn is_mixing(&self) -> bool { unsafe { from_glib(ffi::ges_track_get_mixing(self.as_ref().to_glib_none().0)) } } #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_track_get_restriction_caps")] + #[doc(alias = "get_restriction_caps")] fn restriction_caps(&self) -> Option { unsafe { from_glib_full(ffi::ges_track_get_restriction_caps( @@ -199,10 +111,13 @@ impl> GESTrackExt for O { } } + #[doc(alias = "ges_track_get_timeline")] + #[doc(alias = "get_timeline")] fn timeline(&self) -> Option { unsafe { from_glib_none(ffi::ges_track_get_timeline(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_track_remove_element")] fn remove_element( &self, object: &impl IsA, @@ -220,6 +135,7 @@ impl> GESTrackExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_track_remove_element_full")] fn remove_element_full(&self, object: &impl IsA) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -237,16 +153,19 @@ impl> GESTrackExt for O { } } + //#[doc(alias = "ges_track_set_create_element_for_gap_func")] //fn set_create_element_for_gap_func gst::Element + 'static>(&self, func: P) { // unsafe { TODO: call ffi:ges_track_set_create_element_for_gap_func() } //} + #[doc(alias = "ges_track_set_mixing")] fn set_mixing(&self, mixing: bool) { unsafe { ffi::ges_track_set_mixing(self.as_ref().to_glib_none().0, mixing.into_glib()); } } + #[doc(alias = "ges_track_set_restriction_caps")] fn set_restriction_caps(&self, caps: &gst::Caps) { unsafe { ffi::ges_track_set_restriction_caps( @@ -256,6 +175,7 @@ impl> GESTrackExt for O { } } + #[doc(alias = "ges_track_set_timeline")] fn set_timeline(&self, timeline: &impl IsA) { unsafe { ffi::ges_track_set_timeline( @@ -265,6 +185,7 @@ impl> GESTrackExt for O { } } + #[doc(alias = "ges_track_update_restriction_caps")] fn update_restriction_caps(&self, caps: &gst::Caps) { unsafe { ffi::ges_track_update_restriction_caps( @@ -290,14 +211,17 @@ impl> GESTrackExt for O { glib::ObjectExt::set_property(self.as_ref(), "id", id) } + #[doc(alias = "restriction-caps")] fn get_property_restriction_caps(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "restriction-caps") } + #[doc(alias = "track-type")] fn track_type(&self) -> TrackType { glib::ObjectExt::property(self.as_ref(), "track-type") } + #[doc(alias = "commited")] fn connect_commited(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn commited_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTrack, @@ -319,6 +243,7 @@ impl> GESTrackExt for O { } } + #[doc(alias = "track-element-added")] fn connect_track_element_added( &self, f: F, @@ -350,6 +275,7 @@ impl> GESTrackExt for O { } } + #[doc(alias = "track-element-removed")] fn connect_track_element_removed( &self, f: F, @@ -381,6 +307,7 @@ impl> GESTrackExt for O { } } + #[doc(alias = "duration")] fn connect_duration_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_duration_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTrack, @@ -405,6 +332,7 @@ impl> GESTrackExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "id")] fn connect_id_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_id_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTrack, @@ -427,6 +355,7 @@ impl> GESTrackExt for O { } } + #[doc(alias = "mixing")] fn connect_mixing_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_mixing_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTrack, @@ -449,6 +378,7 @@ impl> GESTrackExt for O { } } + #[doc(alias = "restriction-caps")] fn connect_restriction_caps_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_restriction_caps_trampoline< P: IsA, @@ -474,3 +404,5 @@ impl> GESTrackExt for O { } } } + +impl> GESTrackExt for O {} diff --git a/gstreamer-editing-services/src/auto/track_element.rs b/gstreamer-editing-services/src/auto/track_element.rs index 478f051eb..f390cf392 100644 --- a/gstreamer-editing-services/src/auto/track_element.rs +++ b/gstreamer-editing-services/src/auto/track_element.rs @@ -25,180 +25,13 @@ impl TrackElement { pub const NONE: Option<&'static TrackElement> = None; } -pub trait TrackElementExt: 'static { - #[doc(alias = "ges_track_element_add_children_props")] - fn add_children_props( - &self, - element: &impl IsA, - wanted_categories: &[&str], - blacklist: &[&str], - whitelist: &[&str], - ); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_track_element_clamp_control_source")] - fn clamp_control_source(&self, property_name: &str); - - #[cfg_attr(feature = "v1_18", deprecated = "Since 1.18")] - #[allow(deprecated)] - #[doc(alias = "ges_track_element_edit")] - fn edit( - &self, - layers: &[Layer], - mode: EditMode, - edge: Edge, - position: u64, - ) -> Result<(), glib::error::BoolError>; - - //#[doc(alias = "ges_track_element_get_all_control_bindings")] - //#[doc(alias = "get_all_control_bindings")] - //fn all_control_bindings(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 6, id: 87 }; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_track_element_get_auto_clamp_control_sources")] - #[doc(alias = "get_auto_clamp_control_sources")] - fn is_auto_clamp_control_sources(&self) -> bool; - - //#[doc(alias = "ges_track_element_get_child_properties")] - //#[doc(alias = "get_child_properties")] - //fn child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs); - - #[doc(alias = "ges_track_element_get_child_property")] - #[doc(alias = "get_child_property")] - fn child_property(&self, property_name: &str) -> Option; - - #[doc(alias = "ges_track_element_get_child_property_by_pspec")] - #[doc(alias = "get_child_property_by_pspec")] - fn child_property_by_pspec(&self, pspec: impl AsRef) -> glib::Value; - - //#[doc(alias = "ges_track_element_get_child_property_valist")] - //#[doc(alias = "get_child_property_valist")] - //fn child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); - - #[doc(alias = "ges_track_element_get_control_binding")] - #[doc(alias = "get_control_binding")] - fn control_binding(&self, property_name: &str) -> Option; - - #[doc(alias = "ges_track_element_get_element")] - #[doc(alias = "get_element")] - fn element(&self) -> Option; - - #[doc(alias = "ges_track_element_get_gnlobject")] - #[doc(alias = "get_gnlobject")] - fn gnlobject(&self) -> gst::Element; - - #[doc(alias = "ges_track_element_get_nleobject")] - #[doc(alias = "get_nleobject")] - fn nleobject(&self) -> gst::Element; - - #[doc(alias = "ges_track_element_get_track")] - #[doc(alias = "get_track")] - fn track(&self) -> Option; - - #[doc(alias = "ges_track_element_get_track_type")] - #[doc(alias = "get_track_type")] - fn track_type(&self) -> TrackType; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_track_element_has_internal_source")] - fn has_internal_source(&self) -> bool; - - #[doc(alias = "ges_track_element_is_active")] - fn is_active(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_track_element_is_core")] - fn is_core(&self) -> bool; - - #[doc(alias = "ges_track_element_list_children_properties")] - fn list_children_properties(&self) -> Vec; - - #[doc(alias = "ges_track_element_lookup_child")] - fn lookup_child(&self, prop_name: &str) -> Option<(gst::Element, glib::ParamSpec)>; - - #[doc(alias = "ges_track_element_remove_control_binding")] - fn remove_control_binding(&self, property_name: &str) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_track_element_set_active")] - fn set_active(&self, active: bool) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_track_element_set_auto_clamp_control_sources")] - fn set_auto_clamp_control_sources(&self, auto_clamp: bool); - - //#[doc(alias = "ges_track_element_set_child_properties")] - //fn set_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs); - - #[doc(alias = "ges_track_element_set_child_property")] - fn set_child_property( - &self, - property_name: &str, - value: &glib::Value, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "ges_track_element_set_child_property_by_pspec")] - fn set_child_property_by_pspec(&self, pspec: impl AsRef, value: &glib::Value); - - //#[doc(alias = "ges_track_element_set_child_property_valist")] - //fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); - - #[doc(alias = "ges_track_element_set_control_source")] - fn set_control_source( - &self, - source: &impl IsA, - property_name: &str, - binding_type: &str, - ) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_track_element_set_has_internal_source")] - fn set_has_internal_source(&self, has_internal_source: bool) -> bool; - - #[doc(alias = "ges_track_element_set_track_type")] - fn set_track_type(&self, type_: TrackType); - - #[doc(alias = "control-binding-added")] - fn connect_control_binding_added( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "control-binding-removed")] - fn connect_control_binding_removed( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "active")] - fn connect_active_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "auto-clamp-control-sources")] - fn connect_auto_clamp_control_sources_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "has-internal-source")] - fn connect_has_internal_source_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "track")] - fn connect_track_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "track-type")] - fn connect_track_type_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> TrackElementExt for O { +pub trait TrackElementExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_track_element_add_children_props")] fn add_children_props( &self, element: &impl IsA, @@ -219,6 +52,7 @@ impl> TrackElementExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_track_element_clamp_control_source")] fn clamp_control_source(&self, property_name: &str) { unsafe { ffi::ges_track_element_clamp_control_source( @@ -228,7 +62,9 @@ impl> TrackElementExt for O { } } + #[cfg_attr(feature = "v1_18", deprecated = "Since 1.18")] #[allow(deprecated)] + #[doc(alias = "ges_track_element_edit")] fn edit( &self, layers: &[Layer], @@ -250,12 +86,16 @@ impl> TrackElementExt for O { } } + //#[doc(alias = "ges_track_element_get_all_control_bindings")] + //#[doc(alias = "get_all_control_bindings")] //fn all_control_bindings(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 6, id: 87 } { // unsafe { TODO: call ffi:ges_track_element_get_all_control_bindings() } //} #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_track_element_get_auto_clamp_control_sources")] + #[doc(alias = "get_auto_clamp_control_sources")] fn is_auto_clamp_control_sources(&self) -> bool { unsafe { from_glib(ffi::ges_track_element_get_auto_clamp_control_sources( @@ -264,10 +104,14 @@ impl> TrackElementExt for O { } } + //#[doc(alias = "ges_track_element_get_child_properties")] + //#[doc(alias = "get_child_properties")] //fn child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) { // unsafe { TODO: call ffi:ges_track_element_get_child_properties() } //} + #[doc(alias = "ges_track_element_get_child_property")] + #[doc(alias = "get_child_property")] fn child_property(&self, property_name: &str) -> Option { unsafe { let mut value = glib::Value::uninitialized(); @@ -284,6 +128,8 @@ impl> TrackElementExt for O { } } + #[doc(alias = "ges_track_element_get_child_property_by_pspec")] + #[doc(alias = "get_child_property_by_pspec")] fn child_property_by_pspec(&self, pspec: impl AsRef) -> glib::Value { unsafe { let mut value = glib::Value::uninitialized(); @@ -296,10 +142,14 @@ impl> TrackElementExt for O { } } + //#[doc(alias = "ges_track_element_get_child_property_valist")] + //#[doc(alias = "get_child_property_valist")] //fn child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { // unsafe { TODO: call ffi:ges_track_element_get_child_property_valist() } //} + #[doc(alias = "ges_track_element_get_control_binding")] + #[doc(alias = "get_control_binding")] fn control_binding(&self, property_name: &str) -> Option { unsafe { from_glib_none(ffi::ges_track_element_get_control_binding( @@ -309,6 +159,8 @@ impl> TrackElementExt for O { } } + #[doc(alias = "ges_track_element_get_element")] + #[doc(alias = "get_element")] fn element(&self) -> Option { unsafe { from_glib_none(ffi::ges_track_element_get_element( @@ -317,6 +169,8 @@ impl> TrackElementExt for O { } } + #[doc(alias = "ges_track_element_get_gnlobject")] + #[doc(alias = "get_gnlobject")] fn gnlobject(&self) -> gst::Element { unsafe { from_glib_none(ffi::ges_track_element_get_gnlobject( @@ -325,6 +179,8 @@ impl> TrackElementExt for O { } } + #[doc(alias = "ges_track_element_get_nleobject")] + #[doc(alias = "get_nleobject")] fn nleobject(&self) -> gst::Element { unsafe { from_glib_none(ffi::ges_track_element_get_nleobject( @@ -333,6 +189,8 @@ impl> TrackElementExt for O { } } + #[doc(alias = "ges_track_element_get_track")] + #[doc(alias = "get_track")] fn track(&self) -> Option { unsafe { from_glib_none(ffi::ges_track_element_get_track( @@ -341,6 +199,8 @@ impl> TrackElementExt for O { } } + #[doc(alias = "ges_track_element_get_track_type")] + #[doc(alias = "get_track_type")] fn track_type(&self) -> TrackType { unsafe { from_glib(ffi::ges_track_element_get_track_type( @@ -351,6 +211,7 @@ impl> TrackElementExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_track_element_has_internal_source")] fn has_internal_source(&self) -> bool { unsafe { from_glib(ffi::ges_track_element_has_internal_source( @@ -359,6 +220,7 @@ impl> TrackElementExt for O { } } + #[doc(alias = "ges_track_element_is_active")] fn is_active(&self) -> bool { unsafe { from_glib(ffi::ges_track_element_is_active( @@ -369,6 +231,7 @@ impl> TrackElementExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_track_element_is_core")] fn is_core(&self) -> bool { unsafe { from_glib(ffi::ges_track_element_is_core( @@ -377,6 +240,7 @@ impl> TrackElementExt for O { } } + #[doc(alias = "ges_track_element_list_children_properties")] fn list_children_properties(&self) -> Vec { unsafe { let mut n_properties = mem::MaybeUninit::uninit(); @@ -391,6 +255,7 @@ impl> TrackElementExt for O { } } + #[doc(alias = "ges_track_element_lookup_child")] fn lookup_child(&self, prop_name: &str) -> Option<(gst::Element, glib::ParamSpec)> { unsafe { let mut element = ptr::null_mut(); @@ -409,6 +274,7 @@ impl> TrackElementExt for O { } } + #[doc(alias = "ges_track_element_remove_control_binding")] fn remove_control_binding(&self, property_name: &str) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -421,6 +287,7 @@ impl> TrackElementExt for O { } } + #[doc(alias = "ges_track_element_set_active")] fn set_active(&self, active: bool) -> bool { unsafe { from_glib(ffi::ges_track_element_set_active( @@ -432,6 +299,7 @@ impl> TrackElementExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_track_element_set_auto_clamp_control_sources")] fn set_auto_clamp_control_sources(&self, auto_clamp: bool) { unsafe { ffi::ges_track_element_set_auto_clamp_control_sources( @@ -441,10 +309,12 @@ impl> TrackElementExt for O { } } + //#[doc(alias = "ges_track_element_set_child_properties")] //fn set_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) { // unsafe { TODO: call ffi:ges_track_element_set_child_properties() } //} + #[doc(alias = "ges_track_element_set_child_property")] fn set_child_property( &self, property_name: &str, @@ -462,6 +332,7 @@ impl> TrackElementExt for O { } } + #[doc(alias = "ges_track_element_set_child_property_by_pspec")] fn set_child_property_by_pspec(&self, pspec: impl AsRef, value: &glib::Value) { unsafe { ffi::ges_track_element_set_child_property_by_pspec( @@ -472,10 +343,12 @@ impl> TrackElementExt for O { } } + //#[doc(alias = "ges_track_element_set_child_property_valist")] //fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { // unsafe { TODO: call ffi:ges_track_element_set_child_property_valist() } //} + #[doc(alias = "ges_track_element_set_control_source")] fn set_control_source( &self, source: &impl IsA, @@ -494,6 +367,7 @@ impl> TrackElementExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_track_element_set_has_internal_source")] fn set_has_internal_source(&self, has_internal_source: bool) -> bool { unsafe { from_glib(ffi::ges_track_element_set_has_internal_source( @@ -503,6 +377,7 @@ impl> TrackElementExt for O { } } + #[doc(alias = "ges_track_element_set_track_type")] fn set_track_type(&self, type_: TrackType) { unsafe { ffi::ges_track_element_set_track_type( @@ -512,6 +387,7 @@ impl> TrackElementExt for O { } } + #[doc(alias = "control-binding-added")] fn connect_control_binding_added( &self, f: F, @@ -543,6 +419,7 @@ impl> TrackElementExt for O { } } + #[doc(alias = "control-binding-removed")] fn connect_control_binding_removed( &self, f: F, @@ -574,6 +451,7 @@ impl> TrackElementExt for O { } } + #[doc(alias = "active")] fn connect_active_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_active_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTrackElement, @@ -598,6 +476,7 @@ impl> TrackElementExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "auto-clamp-control-sources")] fn connect_auto_clamp_control_sources_notify( &self, f: F, @@ -628,6 +507,7 @@ impl> TrackElementExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "has-internal-source")] fn connect_has_internal_source_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_has_internal_source_trampoline< P: IsA, @@ -653,6 +533,7 @@ impl> TrackElementExt for O { } } + #[doc(alias = "track")] fn connect_track_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_track_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESTrackElement, @@ -675,6 +556,7 @@ impl> TrackElementExt for O { } } + #[doc(alias = "track-type")] fn connect_track_type_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_track_type_trampoline< P: IsA, @@ -700,3 +582,5 @@ impl> TrackElementExt for O { } } } + +impl> TrackElementExt for O {} diff --git a/gstreamer-editing-services/src/auto/track_element_asset.rs b/gstreamer-editing-services/src/auto/track_element_asset.rs index ba19b428c..41220e94b 100644 --- a/gstreamer-editing-services/src/auto/track_element_asset.rs +++ b/gstreamer-editing-services/src/auto/track_element_asset.rs @@ -30,30 +30,16 @@ impl TrackElementAsset { unsafe impl Send for TrackElementAsset {} unsafe impl Sync for TrackElementAsset {} -pub trait TrackElementAssetExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait TrackElementAssetExt: IsA + sealed::Sealed + 'static { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "ges_track_element_asset_get_natural_framerate")] #[doc(alias = "get_natural_framerate")] - fn natural_framerate(&self) -> Option<(i32, i32)>; - - #[doc(alias = "ges_track_element_asset_get_track_type")] - #[doc(alias = "get_track_type")] - fn track_type(&self) -> TrackType; - - #[doc(alias = "ges_track_element_asset_set_track_type")] - fn set_track_type(&self, type_: TrackType); - - #[doc(alias = "track-type")] - fn connect_track_type_notify( - &self, - f: F, - ) -> SignalHandlerId; -} - -impl> TrackElementAssetExt for O { - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn natural_framerate(&self) -> Option<(i32, i32)> { unsafe { let mut framerate_n = mem::MaybeUninit::uninit(); @@ -71,6 +57,8 @@ impl> TrackElementAssetExt for O { } } + #[doc(alias = "ges_track_element_asset_get_track_type")] + #[doc(alias = "get_track_type")] fn track_type(&self) -> TrackType { unsafe { from_glib(ffi::ges_track_element_asset_get_track_type( @@ -79,6 +67,7 @@ impl> TrackElementAssetExt for O { } } + #[doc(alias = "ges_track_element_asset_set_track_type")] fn set_track_type(&self, type_: TrackType) { unsafe { ffi::ges_track_element_asset_set_track_type( @@ -88,6 +77,7 @@ impl> TrackElementAssetExt for O { } } + #[doc(alias = "track-type")] fn connect_track_type_notify( &self, f: F, @@ -116,3 +106,5 @@ impl> TrackElementAssetExt for O { } } } + +impl> TrackElementAssetExt for O {} diff --git a/gstreamer-editing-services/src/auto/transition_clip.rs b/gstreamer-editing-services/src/auto/transition_clip.rs index b0b1821ea..6b5a8934e 100644 --- a/gstreamer-editing-services/src/auto/transition_clip.rs +++ b/gstreamer-editing-services/src/auto/transition_clip.rs @@ -40,16 +40,12 @@ impl TransitionClip { } } -pub trait TransitionClipExt: 'static { - fn vtype(&self) -> VideoStandardTransitionType; - - fn set_vtype(&self, vtype: VideoStandardTransitionType); - - #[doc(alias = "vtype")] - fn connect_vtype_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> TransitionClipExt for O { +pub trait TransitionClipExt: IsA + sealed::Sealed + 'static { fn vtype(&self) -> VideoStandardTransitionType { glib::ObjectExt::property(self.as_ref(), "vtype") } @@ -58,6 +54,7 @@ impl> TransitionClipExt for O { glib::ObjectExt::set_property(self.as_ref(), "vtype", vtype) } + #[doc(alias = "vtype")] fn connect_vtype_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_vtype_trampoline< P: IsA, @@ -83,3 +80,5 @@ impl> TransitionClipExt for O { } } } + +impl> TransitionClipExt for O {} diff --git a/gstreamer-editing-services/src/auto/uri_clip.rs b/gstreamer-editing-services/src/auto/uri_clip.rs index 88c1b8030..1d9014d6c 100644 --- a/gstreamer-editing-services/src/auto/uri_clip.rs +++ b/gstreamer-editing-services/src/auto/uri_clip.rs @@ -33,55 +33,43 @@ impl UriClip { } } -pub trait UriClipExt: 'static { - #[doc(alias = "ges_uri_clip_get_uri")] - #[doc(alias = "get_uri")] - fn uri(&self) -> glib::GString; - - #[doc(alias = "ges_uri_clip_is_image")] - fn is_image(&self) -> bool; - - #[doc(alias = "ges_uri_clip_is_muted")] - fn is_muted(&self) -> bool; - - #[doc(alias = "ges_uri_clip_set_is_image")] - fn set_is_image(&self, is_image: bool); - - #[doc(alias = "ges_uri_clip_set_mute")] - fn set_mute(&self, mute: bool); - - #[doc(alias = "is-image")] - fn connect_is_image_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "mute")] - fn connect_mute_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> UriClipExt for O { +pub trait UriClipExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_uri_clip_get_uri")] + #[doc(alias = "get_uri")] fn uri(&self) -> glib::GString { unsafe { from_glib_none(ffi::ges_uri_clip_get_uri(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_uri_clip_is_image")] fn is_image(&self) -> bool { unsafe { from_glib(ffi::ges_uri_clip_is_image(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_uri_clip_is_muted")] fn is_muted(&self) -> bool { unsafe { from_glib(ffi::ges_uri_clip_is_muted(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "ges_uri_clip_set_is_image")] fn set_is_image(&self, is_image: bool) { unsafe { ffi::ges_uri_clip_set_is_image(self.as_ref().to_glib_none().0, is_image.into_glib()); } } + #[doc(alias = "ges_uri_clip_set_mute")] fn set_mute(&self, mute: bool) { unsafe { ffi::ges_uri_clip_set_mute(self.as_ref().to_glib_none().0, mute.into_glib()); } } + #[doc(alias = "is-image")] fn connect_is_image_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_is_image_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESUriClip, @@ -104,6 +92,7 @@ impl> UriClipExt for O { } } + #[doc(alias = "mute")] fn connect_mute_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_mute_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GESUriClip, @@ -126,3 +115,5 @@ impl> UriClipExt for O { } } } + +impl> UriClipExt for O {} diff --git a/gstreamer-editing-services/src/auto/uri_clip_asset.rs b/gstreamer-editing-services/src/auto/uri_clip_asset.rs index 36df8e4d1..97893bf1e 100644 --- a/gstreamer-editing-services/src/auto/uri_clip_asset.rs +++ b/gstreamer-editing-services/src/auto/uri_clip_asset.rs @@ -68,53 +68,14 @@ impl UriClipAsset { unsafe impl Send for UriClipAsset {} unsafe impl Sync for UriClipAsset {} -pub trait UriClipAssetExt: 'static { - #[doc(alias = "ges_uri_clip_asset_get_duration")] - #[doc(alias = "get_duration")] - fn duration(&self) -> Option; - - #[doc(alias = "ges_uri_clip_asset_get_info")] - #[doc(alias = "get_info")] - fn info(&self) -> gst_pbutils::DiscovererInfo; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_uri_clip_asset_get_max_duration")] - #[doc(alias = "get_max_duration")] - fn max_duration(&self) -> Option; - - #[doc(alias = "ges_uri_clip_asset_get_stream_assets")] - #[doc(alias = "get_stream_assets")] - fn stream_assets(&self) -> Vec; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_uri_clip_asset_is_image")] - fn is_image(&self) -> bool; - - fn set_duration(&self, duration: u64); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "is-nested-timeline")] - fn is_nested_timeline(&self) -> bool; - - #[doc(alias = "duration")] - fn connect_duration_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "is-nested-timeline")] - fn connect_is_nested_timeline_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> UriClipAssetExt for O { +pub trait UriClipAssetExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_uri_clip_asset_get_duration")] + #[doc(alias = "get_duration")] fn duration(&self) -> Option { unsafe { from_glib(ffi::ges_uri_clip_asset_get_duration( @@ -123,6 +84,8 @@ impl> UriClipAssetExt for O { } } + #[doc(alias = "ges_uri_clip_asset_get_info")] + #[doc(alias = "get_info")] fn info(&self) -> gst_pbutils::DiscovererInfo { unsafe { from_glib_none(ffi::ges_uri_clip_asset_get_info(const_override( @@ -133,6 +96,8 @@ impl> UriClipAssetExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_uri_clip_asset_get_max_duration")] + #[doc(alias = "get_max_duration")] fn max_duration(&self) -> Option { unsafe { from_glib(ffi::ges_uri_clip_asset_get_max_duration( @@ -141,6 +106,8 @@ impl> UriClipAssetExt for O { } } + #[doc(alias = "ges_uri_clip_asset_get_stream_assets")] + #[doc(alias = "get_stream_assets")] fn stream_assets(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::ges_uri_clip_asset_get_stream_assets( @@ -151,6 +118,7 @@ impl> UriClipAssetExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_uri_clip_asset_is_image")] fn is_image(&self) -> bool { unsafe { from_glib(ffi::ges_uri_clip_asset_is_image( @@ -165,10 +133,12 @@ impl> UriClipAssetExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "is-nested-timeline")] fn is_nested_timeline(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "is-nested-timeline") } + #[doc(alias = "duration")] fn connect_duration_notify( &self, f: F, @@ -199,6 +169,7 @@ impl> UriClipAssetExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "is-nested-timeline")] fn connect_is_nested_timeline_notify( &self, f: F, @@ -227,3 +198,5 @@ impl> UriClipAssetExt for O { } } } + +impl> UriClipAssetExt for O {} diff --git a/gstreamer-editing-services/src/auto/uri_source_asset.rs b/gstreamer-editing-services/src/auto/uri_source_asset.rs index 2a29bee46..572575c83 100644 --- a/gstreamer-editing-services/src/auto/uri_source_asset.rs +++ b/gstreamer-editing-services/src/auto/uri_source_asset.rs @@ -22,26 +22,14 @@ impl UriSourceAsset { unsafe impl Send for UriSourceAsset {} unsafe impl Sync for UriSourceAsset {} -pub trait UriSourceAssetExt: 'static { - #[doc(alias = "ges_uri_source_asset_get_filesource_asset")] - #[doc(alias = "get_filesource_asset")] - fn filesource_asset(&self) -> UriClipAsset; - - #[doc(alias = "ges_uri_source_asset_get_stream_info")] - #[doc(alias = "get_stream_info")] - fn stream_info(&self) -> gst_pbutils::DiscovererStreamInfo; - - #[doc(alias = "ges_uri_source_asset_get_stream_uri")] - #[doc(alias = "get_stream_uri")] - fn stream_uri(&self) -> glib::GString; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "ges_uri_source_asset_is_image")] - fn is_image(&self) -> bool; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> UriSourceAssetExt for O { +pub trait UriSourceAssetExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_uri_source_asset_get_filesource_asset")] + #[doc(alias = "get_filesource_asset")] fn filesource_asset(&self) -> UriClipAsset { unsafe { from_glib_none(ffi::ges_uri_source_asset_get_filesource_asset( @@ -50,6 +38,8 @@ impl> UriSourceAssetExt for O { } } + #[doc(alias = "ges_uri_source_asset_get_stream_info")] + #[doc(alias = "get_stream_info")] fn stream_info(&self) -> gst_pbutils::DiscovererStreamInfo { unsafe { from_glib_none(ffi::ges_uri_source_asset_get_stream_info( @@ -58,6 +48,8 @@ impl> UriSourceAssetExt for O { } } + #[doc(alias = "ges_uri_source_asset_get_stream_uri")] + #[doc(alias = "get_stream_uri")] fn stream_uri(&self) -> glib::GString { unsafe { from_glib_none(ffi::ges_uri_source_asset_get_stream_uri( @@ -68,6 +60,7 @@ impl> UriSourceAssetExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "ges_uri_source_asset_is_image")] fn is_image(&self) -> bool { unsafe { from_glib(ffi::ges_uri_source_asset_is_image( @@ -76,3 +69,5 @@ impl> UriSourceAssetExt for O { } } } + +impl> UriSourceAssetExt for O {} diff --git a/gstreamer-editing-services/src/auto/versions.txt b/gstreamer-editing-services/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-editing-services/src/auto/versions.txt +++ b/gstreamer-editing-services/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-editing-services/src/auto/video_source.rs b/gstreamer-editing-services/src/auto/video_source.rs index fb8d96b75..c2ae33912 100644 --- a/gstreamer-editing-services/src/auto/video_source.rs +++ b/gstreamer-editing-services/src/auto/video_source.rs @@ -25,17 +25,16 @@ impl VideoSource { pub const NONE: Option<&'static VideoSource> = None; } -pub trait VideoSourceExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait VideoSourceExt: IsA + sealed::Sealed + 'static { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "ges_video_source_get_natural_size")] #[doc(alias = "get_natural_size")] - fn natural_size(&self) -> Option<(i32, i32)>; -} - -impl> VideoSourceExt for O { - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] fn natural_size(&self) -> Option<(i32, i32)> { unsafe { let mut width = mem::MaybeUninit::uninit(); @@ -53,3 +52,5 @@ impl> VideoSourceExt for O { } } } + +impl> VideoSourceExt for O {} diff --git a/gstreamer-editing-services/src/auto/video_test_source.rs b/gstreamer-editing-services/src/auto/video_test_source.rs index ebad1b438..5b016c775 100644 --- a/gstreamer-editing-services/src/auto/video_test_source.rs +++ b/gstreamer-editing-services/src/auto/video_test_source.rs @@ -22,16 +22,14 @@ impl VideoTestSource { pub const NONE: Option<&'static VideoTestSource> = None; } -pub trait VideoTestSourceExt: 'static { - #[doc(alias = "ges_video_test_source_get_pattern")] - #[doc(alias = "get_pattern")] - fn pattern(&self) -> VideoTestPattern; - - #[doc(alias = "ges_video_test_source_set_pattern")] - fn set_pattern(&self, pattern: VideoTestPattern); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> VideoTestSourceExt for O { +pub trait VideoTestSourceExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "ges_video_test_source_get_pattern")] + #[doc(alias = "get_pattern")] fn pattern(&self) -> VideoTestPattern { unsafe { from_glib(ffi::ges_video_test_source_get_pattern( @@ -40,6 +38,7 @@ impl> VideoTestSourceExt for O { } } + #[doc(alias = "ges_video_test_source_set_pattern")] fn set_pattern(&self, pattern: VideoTestPattern) { unsafe { ffi::ges_video_test_source_set_pattern( @@ -49,3 +48,5 @@ impl> VideoTestSourceExt for O { } } } + +impl> VideoTestSourceExt for O {} diff --git a/gstreamer-editing-services/src/auto/video_transition.rs b/gstreamer-editing-services/src/auto/video_transition.rs index aba5526e2..212272e33 100644 --- a/gstreamer-editing-services/src/auto/video_transition.rs +++ b/gstreamer-editing-services/src/auto/video_transition.rs @@ -40,58 +40,22 @@ impl Default for VideoTransition { } } -pub trait VideoTransitionExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait VideoTransitionExt: IsA + sealed::Sealed + 'static { #[cfg_attr(feature = "v1_20", deprecated = "Since 1.20")] #[allow(deprecated)] #[doc(alias = "ges_video_transition_get_border")] #[doc(alias = "get_border")] - fn border(&self) -> i32; - - #[doc(alias = "ges_video_transition_get_transition_type")] - #[doc(alias = "get_transition_type")] - fn transition_type(&self) -> VideoStandardTransitionType; - - #[cfg_attr(feature = "v1_20", deprecated = "Since 1.20")] - #[allow(deprecated)] - #[doc(alias = "ges_video_transition_is_inverted")] - fn is_inverted(&self) -> bool; - - #[cfg_attr(feature = "v1_20", deprecated = "Since 1.20")] - #[allow(deprecated)] - #[doc(alias = "ges_video_transition_set_border")] - fn set_border(&self, value: u32); - - #[cfg_attr(feature = "v1_20", deprecated = "Since 1.20")] - #[allow(deprecated)] - #[doc(alias = "ges_video_transition_set_inverted")] - fn set_inverted(&self, inverted: bool); - - #[doc(alias = "ges_video_transition_set_transition_type")] - fn set_transition_type(&self, type_: VideoStandardTransitionType) -> bool; - - #[cfg_attr(feature = "v1_20", deprecated = "Since 1.20")] - fn inverts(&self) -> bool; - - #[cfg_attr(feature = "v1_20", deprecated = "Since 1.20")] - fn set_invert(&self, invert: bool); - - #[doc(alias = "border")] - fn connect_border_notify(&self, f: F) -> SignalHandlerId; - - #[cfg_attr(feature = "v1_20", deprecated = "Since 1.20")] - #[doc(alias = "invert")] - fn connect_invert_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "transition-type")] - fn connect_transition_type_notify(&self, f: F) -> SignalHandlerId; -} - -impl> VideoTransitionExt for O { - #[allow(deprecated)] fn border(&self) -> i32 { unsafe { ffi::ges_video_transition_get_border(self.as_ref().to_glib_none().0) } } + #[doc(alias = "ges_video_transition_get_transition_type")] + #[doc(alias = "get_transition_type")] fn transition_type(&self) -> VideoStandardTransitionType { unsafe { from_glib(ffi::ges_video_transition_get_transition_type( @@ -100,7 +64,9 @@ impl> VideoTransitionExt for O { } } + #[cfg_attr(feature = "v1_20", deprecated = "Since 1.20")] #[allow(deprecated)] + #[doc(alias = "ges_video_transition_is_inverted")] fn is_inverted(&self) -> bool { unsafe { from_glib(ffi::ges_video_transition_is_inverted( @@ -109,14 +75,18 @@ impl> VideoTransitionExt for O { } } + #[cfg_attr(feature = "v1_20", deprecated = "Since 1.20")] #[allow(deprecated)] + #[doc(alias = "ges_video_transition_set_border")] fn set_border(&self, value: u32) { unsafe { ffi::ges_video_transition_set_border(self.as_ref().to_glib_none().0, value); } } + #[cfg_attr(feature = "v1_20", deprecated = "Since 1.20")] #[allow(deprecated)] + #[doc(alias = "ges_video_transition_set_inverted")] fn set_inverted(&self, inverted: bool) { unsafe { ffi::ges_video_transition_set_inverted( @@ -126,6 +96,7 @@ impl> VideoTransitionExt for O { } } + #[doc(alias = "ges_video_transition_set_transition_type")] fn set_transition_type(&self, type_: VideoStandardTransitionType) -> bool { unsafe { from_glib(ffi::ges_video_transition_set_transition_type( @@ -135,14 +106,17 @@ impl> VideoTransitionExt for O { } } + #[cfg_attr(feature = "v1_20", deprecated = "Since 1.20")] fn inverts(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "invert") } + #[cfg_attr(feature = "v1_20", deprecated = "Since 1.20")] fn set_invert(&self, invert: bool) { glib::ObjectExt::set_property(self.as_ref(), "invert", invert) } + #[doc(alias = "border")] fn connect_border_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_border_trampoline< P: IsA, @@ -168,6 +142,8 @@ impl> VideoTransitionExt for O { } } + #[cfg_attr(feature = "v1_20", deprecated = "Since 1.20")] + #[doc(alias = "invert")] fn connect_invert_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_invert_trampoline< P: IsA, @@ -193,6 +169,7 @@ impl> VideoTransitionExt for O { } } + #[doc(alias = "transition-type")] fn connect_transition_type_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_transition_type_trampoline< P: IsA, @@ -218,3 +195,5 @@ impl> VideoTransitionExt for O { } } } + +impl> VideoTransitionExt for O {} diff --git a/gstreamer-editing-services/src/auto/video_uri_source.rs b/gstreamer-editing-services/src/auto/video_uri_source.rs index 62e202612..087cede87 100644 --- a/gstreamer-editing-services/src/auto/video_uri_source.rs +++ b/gstreamer-editing-services/src/auto/video_uri_source.rs @@ -19,12 +19,15 @@ impl VideoUriSource { pub const NONE: Option<&'static VideoUriSource> = None; } -pub trait VideoUriSourceExt: 'static { - fn uri(&self) -> Option; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> VideoUriSourceExt for O { +pub trait VideoUriSourceExt: IsA + sealed::Sealed + 'static { fn uri(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "uri") } } + +impl> VideoUriSourceExt for O {} diff --git a/gstreamer-editing-services/sys/src/auto/versions.txt b/gstreamer-editing-services/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-editing-services/sys/src/auto/versions.txt +++ b/gstreamer-editing-services/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-editing-services/sys/tests/abi.rs b/gstreamer-editing-services/sys/tests/abi.rs index 8b15a3f51..964aa1c3e 100644 --- a/gstreamer-editing-services/sys/tests/abi.rs +++ b/gstreamer-editing-services/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_editing_services_sys::*; use std::env; diff --git a/gstreamer-gl/egl/src/auto/versions.txt b/gstreamer-gl/egl/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-gl/egl/src/auto/versions.txt +++ b/gstreamer-gl/egl/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-gl/egl/sys/src/auto/versions.txt b/gstreamer-gl/egl/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-gl/egl/sys/src/auto/versions.txt +++ b/gstreamer-gl/egl/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-gl/egl/sys/tests/abi.rs b/gstreamer-gl/egl/sys/tests/abi.rs index 0a6d16c88..3782d3e74 100644 --- a/gstreamer-gl/egl/sys/tests/abi.rs +++ b/gstreamer-gl/egl/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_gl_egl_sys::*; use std::env; diff --git a/gstreamer-gl/src/auto/gl_base_filter.rs b/gstreamer-gl/src/auto/gl_base_filter.rs index 9767c11ce..ee3aa80d2 100644 --- a/gstreamer-gl/src/auto/gl_base_filter.rs +++ b/gstreamer-gl/src/auto/gl_base_filter.rs @@ -27,28 +27,15 @@ impl GLBaseFilter { unsafe impl Send for GLBaseFilter {} unsafe impl Sync for GLBaseFilter {} -pub trait GLBaseFilterExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait GLBaseFilterExt: IsA + sealed::Sealed + 'static { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_gl_base_filter_find_gl_context")] - fn find_gl_context(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_gl_base_filter_get_gl_context")] - #[doc(alias = "get_gl_context")] - fn gl_context(&self) -> Option; - - fn context(&self) -> Option; - - #[doc(alias = "context")] - fn connect_context_notify(&self, f: F) - -> SignalHandlerId; -} - -impl> GLBaseFilterExt for O { - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] fn find_gl_context(&self) -> bool { unsafe { from_glib(ffi::gst_gl_base_filter_find_gl_context( @@ -59,6 +46,8 @@ impl> GLBaseFilterExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_gl_base_filter_get_gl_context")] + #[doc(alias = "get_gl_context")] fn gl_context(&self) -> Option { unsafe { from_glib_full(ffi::gst_gl_base_filter_get_gl_context( @@ -71,6 +60,7 @@ impl> GLBaseFilterExt for O { glib::ObjectExt::property(self.as_ref(), "context") } + #[doc(alias = "context")] fn connect_context_notify( &self, f: F, @@ -99,3 +89,5 @@ impl> GLBaseFilterExt for O { } } } + +impl> GLBaseFilterExt for O {} diff --git a/gstreamer-gl/src/auto/gl_base_src.rs b/gstreamer-gl/src/auto/gl_base_src.rs index edcfb9766..c3ae3d7f7 100644 --- a/gstreamer-gl/src/auto/gl_base_src.rs +++ b/gstreamer-gl/src/auto/gl_base_src.rs @@ -26,29 +26,23 @@ impl GLBaseSrc { unsafe impl Send for GLBaseSrc {} unsafe impl Sync for GLBaseSrc {} -pub trait GLBaseSrcExt: 'static { - #[doc(alias = "timestamp-offset")] - fn timestamp_offset(&self) -> i64; - - #[doc(alias = "timestamp-offset")] - fn set_timestamp_offset(&self, timestamp_offset: i64); - - #[doc(alias = "timestamp-offset")] - fn connect_timestamp_offset_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> GLBaseSrcExt for O { +pub trait GLBaseSrcExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "timestamp-offset")] fn timestamp_offset(&self) -> i64 { glib::ObjectExt::property(self.as_ref(), "timestamp-offset") } + #[doc(alias = "timestamp-offset")] fn set_timestamp_offset(&self, timestamp_offset: i64) { glib::ObjectExt::set_property(self.as_ref(), "timestamp-offset", timestamp_offset) } + #[doc(alias = "timestamp-offset")] fn connect_timestamp_offset_notify( &self, f: F, @@ -77,3 +71,5 @@ impl> GLBaseSrcExt for O { } } } + +impl> GLBaseSrcExt for O {} diff --git a/gstreamer-gl/src/auto/gl_buffer_pool.rs b/gstreamer-gl/src/auto/gl_buffer_pool.rs index 1482a78bc..683be94be 100644 --- a/gstreamer-gl/src/auto/gl_buffer_pool.rs +++ b/gstreamer-gl/src/auto/gl_buffer_pool.rs @@ -36,17 +36,16 @@ impl GLBufferPool { unsafe impl Send for GLBufferPool {} unsafe impl Sync for GLBufferPool {} -pub trait GLBufferPoolExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait GLBufferPoolExt: IsA + sealed::Sealed + 'static { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_gl_buffer_pool_get_gl_allocation_params")] #[doc(alias = "get_gl_allocation_params")] - fn gl_allocation_params(&self) -> Option; -} - -impl> GLBufferPoolExt for O { - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] fn gl_allocation_params(&self) -> Option { unsafe { from_glib_full(ffi::gst_gl_buffer_pool_get_gl_allocation_params( @@ -55,3 +54,5 @@ impl> GLBufferPoolExt for O { } } } + +impl> GLBufferPoolExt for O {} diff --git a/gstreamer-gl/src/auto/gl_context.rs b/gstreamer-gl/src/auto/gl_context.rs index 19d6ae51b..6268bfd23 100644 --- a/gstreamer-gl/src/auto/gl_context.rs +++ b/gstreamer-gl/src/auto/gl_context.rs @@ -52,99 +52,13 @@ impl GLContext { unsafe impl Send for GLContext {} unsafe impl Sync for GLContext {} -pub trait GLContextExt: 'static { - #[doc(alias = "gst_gl_context_activate")] - fn activate(&self, activate: bool) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_gl_context_can_share")] - fn can_share(&self, other_context: &impl IsA) -> bool; - - #[doc(alias = "gst_gl_context_check_feature")] - fn check_feature(&self, feature: &str) -> bool; - - #[doc(alias = "gst_gl_context_check_framebuffer_status")] - fn check_framebuffer_status(&self, fbo_target: u32) -> bool; - - #[doc(alias = "gst_gl_context_check_gl_version")] - fn check_gl_version(&self, api: GLAPI, maj: i32, min: i32) -> bool; - - #[doc(alias = "gst_gl_context_clear_framebuffer")] - fn clear_framebuffer(&self); - - #[doc(alias = "gst_gl_context_clear_shader")] - fn clear_shader(&self); - - #[doc(alias = "gst_gl_context_create")] - fn create(&self, other_context: Option<&impl IsA>) -> Result<(), glib::Error>; - - #[doc(alias = "gst_gl_context_destroy")] - fn destroy(&self); - - #[doc(alias = "gst_gl_context_fill_info")] - fn fill_info(&self) -> Result<(), glib::Error>; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_gl_context_get_config")] - #[doc(alias = "get_config")] - fn config(&self) -> Option; - - #[doc(alias = "gst_gl_context_get_display")] - #[doc(alias = "get_display")] - fn display(&self) -> GLDisplay; - - #[doc(alias = "gst_gl_context_get_gl_api")] - #[doc(alias = "get_gl_api")] - fn gl_api(&self) -> GLAPI; - - #[doc(alias = "gst_gl_context_get_gl_platform")] - #[doc(alias = "get_gl_platform")] - fn gl_platform(&self) -> GLPlatform; - - #[doc(alias = "gst_gl_context_get_gl_platform_version")] - #[doc(alias = "get_gl_platform_version")] - fn gl_platform_version(&self) -> (i32, i32); - - #[doc(alias = "gst_gl_context_get_gl_version")] - #[doc(alias = "get_gl_version")] - fn gl_version(&self) -> (i32, i32); - - #[doc(alias = "gst_gl_context_get_window")] - #[doc(alias = "get_window")] - fn window(&self) -> Option; - - #[doc(alias = "gst_gl_context_is_shared")] - fn is_shared(&self) -> bool; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_gl_context_request_config")] - fn request_config(&self, gl_config: Option) -> bool; - - #[doc(alias = "gst_gl_context_set_shared_with")] - fn set_shared_with(&self, share: &impl IsA); - - #[doc(alias = "gst_gl_context_set_window")] - fn set_window(&self, window: impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_gl_context_supports_glsl_profile_version")] - fn supports_glsl_profile_version(&self, version: GLSLVersion, profile: GLSLProfile) -> bool; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_gl_context_supports_precision")] - fn supports_precision(&self, version: GLSLVersion, profile: GLSLProfile) -> bool; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_gl_context_supports_precision_highp")] - fn supports_precision_highp(&self, version: GLSLVersion, profile: GLSLProfile) -> bool; - - #[doc(alias = "gst_gl_context_swap_buffers")] - fn swap_buffers(&self); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> GLContextExt for O { +pub trait GLContextExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_gl_context_activate")] fn activate(&self, activate: bool) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -154,6 +68,7 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_can_share")] fn can_share(&self, other_context: &impl IsA) -> bool { unsafe { from_glib(ffi::gst_gl_context_can_share( @@ -163,6 +78,7 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_check_feature")] fn check_feature(&self, feature: &str) -> bool { unsafe { from_glib(ffi::gst_gl_context_check_feature( @@ -172,6 +88,7 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_check_framebuffer_status")] fn check_framebuffer_status(&self, fbo_target: u32) -> bool { unsafe { from_glib(ffi::gst_gl_context_check_framebuffer_status( @@ -181,6 +98,7 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_check_gl_version")] fn check_gl_version(&self, api: GLAPI, maj: i32, min: i32) -> bool { unsafe { from_glib(ffi::gst_gl_context_check_gl_version( @@ -192,18 +110,21 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_clear_framebuffer")] fn clear_framebuffer(&self) { unsafe { ffi::gst_gl_context_clear_framebuffer(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_gl_context_clear_shader")] fn clear_shader(&self) { unsafe { ffi::gst_gl_context_clear_shader(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_gl_context_create")] fn create(&self, other_context: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -221,12 +142,14 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_destroy")] fn destroy(&self) { unsafe { ffi::gst_gl_context_destroy(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_gl_context_fill_info")] fn fill_info(&self) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -242,6 +165,8 @@ impl> GLContextExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_gl_context_get_config")] + #[doc(alias = "get_config")] fn config(&self) -> Option { unsafe { from_glib_full(ffi::gst_gl_context_get_config( @@ -250,6 +175,8 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_get_display")] + #[doc(alias = "get_display")] fn display(&self) -> GLDisplay { unsafe { from_glib_full(ffi::gst_gl_context_get_display( @@ -258,6 +185,8 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_get_gl_api")] + #[doc(alias = "get_gl_api")] fn gl_api(&self) -> GLAPI { unsafe { from_glib(ffi::gst_gl_context_get_gl_api( @@ -266,6 +195,8 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_get_gl_platform")] + #[doc(alias = "get_gl_platform")] fn gl_platform(&self) -> GLPlatform { unsafe { from_glib(ffi::gst_gl_context_get_gl_platform( @@ -274,6 +205,8 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_get_gl_platform_version")] + #[doc(alias = "get_gl_platform_version")] fn gl_platform_version(&self) -> (i32, i32) { unsafe { let mut major = mem::MaybeUninit::uninit(); @@ -287,6 +220,8 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_get_gl_version")] + #[doc(alias = "get_gl_version")] fn gl_version(&self) -> (i32, i32) { unsafe { let mut maj = mem::MaybeUninit::uninit(); @@ -300,6 +235,8 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_get_window")] + #[doc(alias = "get_window")] fn window(&self) -> Option { unsafe { from_glib_full(ffi::gst_gl_context_get_window( @@ -308,6 +245,7 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_is_shared")] fn is_shared(&self) -> bool { unsafe { from_glib(ffi::gst_gl_context_is_shared( @@ -318,6 +256,7 @@ impl> GLContextExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_gl_context_request_config")] fn request_config(&self, gl_config: Option) -> bool { unsafe { from_glib(ffi::gst_gl_context_request_config( @@ -327,6 +266,7 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_set_shared_with")] fn set_shared_with(&self, share: &impl IsA) { unsafe { ffi::gst_gl_context_set_shared_with( @@ -336,6 +276,7 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_set_window")] fn set_window(&self, window: impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -348,6 +289,7 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_supports_glsl_profile_version")] fn supports_glsl_profile_version(&self, version: GLSLVersion, profile: GLSLProfile) -> bool { unsafe { from_glib(ffi::gst_gl_context_supports_glsl_profile_version( @@ -360,6 +302,7 @@ impl> GLContextExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_gl_context_supports_precision")] fn supports_precision(&self, version: GLSLVersion, profile: GLSLProfile) -> bool { unsafe { from_glib(ffi::gst_gl_context_supports_precision( @@ -372,6 +315,7 @@ impl> GLContextExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_gl_context_supports_precision_highp")] fn supports_precision_highp(&self, version: GLSLVersion, profile: GLSLProfile) -> bool { unsafe { from_glib(ffi::gst_gl_context_supports_precision_highp( @@ -382,9 +326,12 @@ impl> GLContextExt for O { } } + #[doc(alias = "gst_gl_context_swap_buffers")] fn swap_buffers(&self) { unsafe { ffi::gst_gl_context_swap_buffers(self.as_ref().to_glib_none().0); } } } + +impl> GLContextExt for O {} diff --git a/gstreamer-gl/src/auto/gl_display.rs b/gstreamer-gl/src/auto/gl_display.rs index d7fa9dbe2..19f651c72 100644 --- a/gstreamer-gl/src/auto/gl_display.rs +++ b/gstreamer-gl/src/auto/gl_display.rs @@ -48,43 +48,13 @@ impl Default for GLDisplay { unsafe impl Send for GLDisplay {} unsafe impl Sync for GLDisplay {} -pub trait GLDisplayExt: 'static { - #[doc(alias = "gst_gl_display_create_window")] - fn create_window(&self) -> Result; - - #[doc(alias = "gst_gl_display_filter_gl_api")] - fn filter_gl_api(&self, gl_api: GLAPI); - - #[doc(alias = "gst_gl_display_get_gl_api")] - #[doc(alias = "get_gl_api")] - fn gl_api(&self) -> GLAPI; - - #[doc(alias = "gst_gl_display_get_gl_api_unlocked")] - #[doc(alias = "get_gl_api_unlocked")] - fn gl_api_unlocked(&self) -> GLAPI; - - #[doc(alias = "gst_gl_display_get_handle_type")] - #[doc(alias = "get_handle_type")] - fn handle_type(&self) -> GLDisplayType; - - #[doc(alias = "gst_gl_display_remove_window")] - fn remove_window(&self, window: &impl IsA) -> Result<(), glib::error::BoolError>; - - //#[cfg(feature = "v1_18")] - //#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - //#[doc(alias = "gst_gl_display_retrieve_window")] - //fn retrieve_window(&self, data: /*Unimplemented*/Option, compare_func: /*Unimplemented*/FnMut(/*Unimplemented*/Option) -> i32) -> Option; - - #[doc(alias = "create-context")] - fn connect_create_context< - F: Fn(&Self, &GLContext) -> Option + Send + Sync + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> GLDisplayExt for O { +pub trait GLDisplayExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_gl_display_create_window")] fn create_window(&self) -> Result { unsafe { Option::<_>::from_glib_full(ffi::gst_gl_display_create_window( @@ -94,12 +64,15 @@ impl> GLDisplayExt for O { } } + #[doc(alias = "gst_gl_display_filter_gl_api")] fn filter_gl_api(&self, gl_api: GLAPI) { unsafe { ffi::gst_gl_display_filter_gl_api(self.as_ref().to_glib_none().0, gl_api.into_glib()); } } + #[doc(alias = "gst_gl_display_get_gl_api")] + #[doc(alias = "get_gl_api")] fn gl_api(&self) -> GLAPI { unsafe { from_glib(ffi::gst_gl_display_get_gl_api( @@ -108,6 +81,8 @@ impl> GLDisplayExt for O { } } + #[doc(alias = "gst_gl_display_get_gl_api_unlocked")] + #[doc(alias = "get_gl_api_unlocked")] fn gl_api_unlocked(&self) -> GLAPI { unsafe { from_glib(ffi::gst_gl_display_get_gl_api_unlocked( @@ -116,6 +91,8 @@ impl> GLDisplayExt for O { } } + #[doc(alias = "gst_gl_display_get_handle_type")] + #[doc(alias = "get_handle_type")] fn handle_type(&self) -> GLDisplayType { unsafe { from_glib(ffi::gst_gl_display_get_handle_type( @@ -124,6 +101,7 @@ impl> GLDisplayExt for O { } } + #[doc(alias = "gst_gl_display_remove_window")] fn remove_window(&self, window: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -138,10 +116,12 @@ impl> GLDisplayExt for O { //#[cfg(feature = "v1_18")] //#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + //#[doc(alias = "gst_gl_display_retrieve_window")] //fn retrieve_window(&self, data: /*Unimplemented*/Option, compare_func: /*Unimplemented*/FnMut(/*Unimplemented*/Option) -> i32) -> Option { // unsafe { TODO: call ffi:gst_gl_display_retrieve_window() } //} + #[doc(alias = "create-context")] fn connect_create_context< F: Fn(&Self, &GLContext) -> Option + Send + Sync + 'static, >( @@ -176,3 +156,5 @@ impl> GLDisplayExt for O { } } } + +impl> GLDisplayExt for O {} diff --git a/gstreamer-gl/src/auto/gl_filter.rs b/gstreamer-gl/src/auto/gl_filter.rs index 4fb5d24bc..3f47d3517 100644 --- a/gstreamer-gl/src/auto/gl_filter.rs +++ b/gstreamer-gl/src/auto/gl_filter.rs @@ -22,36 +22,20 @@ impl GLFilter { unsafe impl Send for GLFilter {} unsafe impl Sync for GLFilter {} -pub trait GLFilterExt: 'static { - #[doc(alias = "gst_gl_filter_draw_fullscreen_quad")] - fn draw_fullscreen_quad(&self); - - #[doc(alias = "gst_gl_filter_filter_texture")] - fn filter_texture( - &self, - input: &gst::Buffer, - output: &gst::Buffer, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_gl_filter_render_to_target")] - fn render_to_target bool>( - &self, - input: &GLMemory, - output: &GLMemory, - func: P, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_gl_filter_render_to_target_with_shader")] - fn render_to_target_with_shader(&self, input: &GLMemory, output: &GLMemory, shader: &GLShader); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> GLFilterExt for O { +pub trait GLFilterExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_gl_filter_draw_fullscreen_quad")] fn draw_fullscreen_quad(&self) { unsafe { ffi::gst_gl_filter_draw_fullscreen_quad(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_gl_filter_filter_texture")] fn filter_texture( &self, input: &gst::Buffer, @@ -69,6 +53,7 @@ impl> GLFilterExt for O { } } + #[doc(alias = "gst_gl_filter_render_to_target")] fn render_to_target bool>( &self, input: &GLMemory, @@ -102,6 +87,7 @@ impl> GLFilterExt for O { } } + #[doc(alias = "gst_gl_filter_render_to_target_with_shader")] fn render_to_target_with_shader(&self, input: &GLMemory, output: &GLMemory, shader: &GLShader) { unsafe { ffi::gst_gl_filter_render_to_target_with_shader( @@ -113,3 +99,5 @@ impl> GLFilterExt for O { } } } + +impl> GLFilterExt for O {} diff --git a/gstreamer-gl/src/auto/gl_framebuffer.rs b/gstreamer-gl/src/auto/gl_framebuffer.rs index c7d267ea3..104b9389c 100644 --- a/gstreamer-gl/src/auto/gl_framebuffer.rs +++ b/gstreamer-gl/src/auto/gl_framebuffer.rs @@ -50,23 +50,13 @@ impl GLFramebuffer { unsafe impl Send for GLFramebuffer {} unsafe impl Sync for GLFramebuffer {} -pub trait GLFramebufferExt: 'static { - #[doc(alias = "gst_gl_framebuffer_attach")] - unsafe fn attach(&self, attachment_point: u32, mem: &mut GLBaseMemory); - - #[doc(alias = "gst_gl_framebuffer_bind")] - fn bind(&self); - - #[doc(alias = "gst_gl_framebuffer_get_effective_dimensions")] - #[doc(alias = "get_effective_dimensions")] - fn effective_dimensions(&self) -> (u32, u32); - - #[doc(alias = "gst_gl_framebuffer_get_id")] - #[doc(alias = "get_id")] - fn id(&self) -> u32; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> GLFramebufferExt for O { +pub trait GLFramebufferExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_gl_framebuffer_attach")] unsafe fn attach(&self, attachment_point: u32, mem: &mut GLBaseMemory) { ffi::gst_gl_framebuffer_attach( self.as_ref().to_glib_none().0, @@ -75,12 +65,15 @@ impl> GLFramebufferExt for O { ); } + #[doc(alias = "gst_gl_framebuffer_bind")] fn bind(&self) { unsafe { ffi::gst_gl_framebuffer_bind(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_gl_framebuffer_get_effective_dimensions")] + #[doc(alias = "get_effective_dimensions")] fn effective_dimensions(&self) -> (u32, u32) { unsafe { let mut width = mem::MaybeUninit::uninit(); @@ -94,7 +87,11 @@ impl> GLFramebufferExt for O { } } + #[doc(alias = "gst_gl_framebuffer_get_id")] + #[doc(alias = "get_id")] fn id(&self) -> u32 { unsafe { ffi::gst_gl_framebuffer_get_id(self.as_ref().to_glib_none().0) } } } + +impl> GLFramebufferExt for O {} diff --git a/gstreamer-gl/src/auto/gl_window.rs b/gstreamer-gl/src/auto/gl_window.rs index 2017a6936..cdad87778 100644 --- a/gstreamer-gl/src/auto/gl_window.rs +++ b/gstreamer-gl/src/auto/gl_window.rs @@ -33,101 +33,15 @@ impl GLWindow { unsafe impl Send for GLWindow {} unsafe impl Sync for GLWindow {} -pub trait GLWindowExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait GLWindowExt: IsA + sealed::Sealed + 'static { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_gl_window_controls_viewport")] - fn controls_viewport(&self) -> bool; - - #[doc(alias = "gst_gl_window_draw")] - fn draw(&self); - - #[doc(alias = "gst_gl_window_get_context")] - #[doc(alias = "get_context")] - fn context(&self) -> GLContext; - - #[doc(alias = "gst_gl_window_get_surface_dimensions")] - #[doc(alias = "get_surface_dimensions")] - fn surface_dimensions(&self) -> (u32, u32); - - #[doc(alias = "gst_gl_window_handle_events")] - fn handle_events(&self, handle_events: bool); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_gl_window_has_output_surface")] - fn has_output_surface(&self) -> bool; - - #[doc(alias = "gst_gl_window_queue_resize")] - fn queue_resize(&self); - - #[doc(alias = "gst_gl_window_quit")] - fn quit(&self); - - #[doc(alias = "gst_gl_window_resize")] - fn resize(&self, width: u32, height: u32); - - #[doc(alias = "gst_gl_window_run")] - fn run(&self); - - #[doc(alias = "gst_gl_window_send_key_event")] - fn send_key_event(&self, event_type: &str, key_str: &str); - - #[doc(alias = "gst_gl_window_send_mouse_event")] - fn send_mouse_event(&self, event_type: &str, button: i32, posx: f64, posy: f64); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_gl_window_send_scroll_event")] - fn send_scroll_event(&self, posx: f64, posy: f64, delta_x: f64, delta_y: f64); - - #[doc(alias = "gst_gl_window_set_preferred_size")] - fn set_preferred_size(&self, width: i32, height: i32); - - #[doc(alias = "gst_gl_window_set_render_rectangle")] - fn set_render_rectangle( - &self, - x: i32, - y: i32, - width: i32, - height: i32, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_gl_window_show")] - fn show(&self); - - #[doc(alias = "key-event")] - fn connect_key_event( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "mouse-event")] - fn connect_mouse_event( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "scroll-event")] - fn connect_scroll_event( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "window-handle-changed")] - fn connect_window_handle_changed( - &self, - f: F, - ) -> SignalHandlerId; -} - -impl> GLWindowExt for O { - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] fn controls_viewport(&self) -> bool { unsafe { from_glib(ffi::gst_gl_window_controls_viewport( @@ -136,12 +50,15 @@ impl> GLWindowExt for O { } } + #[doc(alias = "gst_gl_window_draw")] fn draw(&self) { unsafe { ffi::gst_gl_window_draw(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_gl_window_get_context")] + #[doc(alias = "get_context")] fn context(&self) -> GLContext { unsafe { from_glib_full(ffi::gst_gl_window_get_context( @@ -150,6 +67,8 @@ impl> GLWindowExt for O { } } + #[doc(alias = "gst_gl_window_get_surface_dimensions")] + #[doc(alias = "get_surface_dimensions")] fn surface_dimensions(&self) -> (u32, u32) { unsafe { let mut width = mem::MaybeUninit::uninit(); @@ -163,6 +82,7 @@ impl> GLWindowExt for O { } } + #[doc(alias = "gst_gl_window_handle_events")] fn handle_events(&self, handle_events: bool) { unsafe { ffi::gst_gl_window_handle_events( @@ -174,6 +94,7 @@ impl> GLWindowExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_gl_window_has_output_surface")] fn has_output_surface(&self) -> bool { unsafe { from_glib(ffi::gst_gl_window_has_output_surface( @@ -182,30 +103,35 @@ impl> GLWindowExt for O { } } + #[doc(alias = "gst_gl_window_queue_resize")] fn queue_resize(&self) { unsafe { ffi::gst_gl_window_queue_resize(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_gl_window_quit")] fn quit(&self) { unsafe { ffi::gst_gl_window_quit(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_gl_window_resize")] fn resize(&self, width: u32, height: u32) { unsafe { ffi::gst_gl_window_resize(self.as_ref().to_glib_none().0, width, height); } } + #[doc(alias = "gst_gl_window_run")] fn run(&self) { unsafe { ffi::gst_gl_window_run(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_gl_window_send_key_event")] fn send_key_event(&self, event_type: &str, key_str: &str) { unsafe { ffi::gst_gl_window_send_key_event( @@ -216,6 +142,7 @@ impl> GLWindowExt for O { } } + #[doc(alias = "gst_gl_window_send_mouse_event")] fn send_mouse_event(&self, event_type: &str, button: i32, posx: f64, posy: f64) { unsafe { ffi::gst_gl_window_send_mouse_event( @@ -230,6 +157,7 @@ impl> GLWindowExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_gl_window_send_scroll_event")] fn send_scroll_event(&self, posx: f64, posy: f64, delta_x: f64, delta_y: f64) { unsafe { ffi::gst_gl_window_send_scroll_event( @@ -242,12 +170,14 @@ impl> GLWindowExt for O { } } + #[doc(alias = "gst_gl_window_set_preferred_size")] fn set_preferred_size(&self, width: i32, height: i32) { unsafe { ffi::gst_gl_window_set_preferred_size(self.as_ref().to_glib_none().0, width, height); } } + #[doc(alias = "gst_gl_window_set_render_rectangle")] fn set_render_rectangle( &self, x: i32, @@ -269,12 +199,14 @@ impl> GLWindowExt for O { } } + #[doc(alias = "gst_gl_window_show")] fn show(&self) { unsafe { ffi::gst_gl_window_show(self.as_ref().to_glib_none().0); } } + #[doc(alias = "key-event")] fn connect_key_event( &self, f: F, @@ -308,6 +240,7 @@ impl> GLWindowExt for O { } } + #[doc(alias = "mouse-event")] fn connect_mouse_event( &self, f: F, @@ -347,6 +280,7 @@ impl> GLWindowExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "scroll-event")] fn connect_scroll_event( &self, f: F, @@ -386,6 +320,7 @@ impl> GLWindowExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "window-handle-changed")] fn connect_window_handle_changed( &self, f: F, @@ -413,3 +348,5 @@ impl> GLWindowExt for O { } } } + +impl> GLWindowExt for O {} diff --git a/gstreamer-gl/src/auto/versions.txt b/gstreamer-gl/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-gl/src/auto/versions.txt +++ b/gstreamer-gl/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-gl/sys/src/auto/versions.txt b/gstreamer-gl/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-gl/sys/src/auto/versions.txt +++ b/gstreamer-gl/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-gl/sys/tests/abi.rs b/gstreamer-gl/sys/tests/abi.rs index 2ca6ce84a..9af4c33d9 100644 --- a/gstreamer-gl/sys/tests/abi.rs +++ b/gstreamer-gl/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_gl_sys::*; use std::env; diff --git a/gstreamer-gl/wayland/src/auto/versions.txt b/gstreamer-gl/wayland/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-gl/wayland/src/auto/versions.txt +++ b/gstreamer-gl/wayland/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-gl/wayland/sys/src/auto/versions.txt b/gstreamer-gl/wayland/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-gl/wayland/sys/src/auto/versions.txt +++ b/gstreamer-gl/wayland/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-gl/wayland/sys/tests/abi.rs b/gstreamer-gl/wayland/sys/tests/abi.rs index 867f77aae..8daac0b67 100644 --- a/gstreamer-gl/wayland/sys/tests/abi.rs +++ b/gstreamer-gl/wayland/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_gl_wayland_sys::*; use std::env; diff --git a/gstreamer-gl/x11/src/auto/versions.txt b/gstreamer-gl/x11/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-gl/x11/src/auto/versions.txt +++ b/gstreamer-gl/x11/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-gl/x11/sys/src/auto/versions.txt b/gstreamer-gl/x11/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-gl/x11/sys/src/auto/versions.txt +++ b/gstreamer-gl/x11/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-gl/x11/sys/tests/abi.rs b/gstreamer-gl/x11/sys/tests/abi.rs index 4e4f4d1cf..3c50e2e87 100644 --- a/gstreamer-gl/x11/sys/tests/abi.rs +++ b/gstreamer-gl/x11/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_gl_x11_sys::*; use std::env; diff --git a/gstreamer-mpegts/src/auto/versions.txt b/gstreamer-mpegts/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-mpegts/src/auto/versions.txt +++ b/gstreamer-mpegts/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-mpegts/sys/src/auto/versions.txt b/gstreamer-mpegts/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-mpegts/sys/src/auto/versions.txt +++ b/gstreamer-mpegts/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-mpegts/sys/tests/abi.rs b/gstreamer-mpegts/sys/tests/abi.rs index 853ef6340..a0846cf8d 100644 --- a/gstreamer-mpegts/sys/tests/abi.rs +++ b/gstreamer-mpegts/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_mpegts_sys::*; use std::env; diff --git a/gstreamer-net/src/auto/versions.txt b/gstreamer-net/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-net/src/auto/versions.txt +++ b/gstreamer-net/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-net/sys/src/auto/versions.txt b/gstreamer-net/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-net/sys/src/auto/versions.txt +++ b/gstreamer-net/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-net/sys/tests/abi.rs b/gstreamer-net/sys/tests/abi.rs index f0fe7768d..0362e319d 100644 --- a/gstreamer-net/sys/tests/abi.rs +++ b/gstreamer-net/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_net_sys::*; use std::env; diff --git a/gstreamer-pbutils/src/auto/audio_visualizer.rs b/gstreamer-pbutils/src/auto/audio_visualizer.rs index 85f3ba87f..54f98f357 100644 --- a/gstreamer-pbutils/src/auto/audio_visualizer.rs +++ b/gstreamer-pbutils/src/auto/audio_visualizer.rs @@ -27,32 +27,18 @@ impl AudioVisualizer { unsafe impl Send for AudioVisualizer {} unsafe impl Sync for AudioVisualizer {} -pub trait AudioVisualizerExt: 'static { - #[doc(alias = "shade-amount")] - fn shade_amount(&self) -> u32; - - #[doc(alias = "shade-amount")] - fn set_shade_amount(&self, shade_amount: u32); - - fn shader(&self) -> AudioVisualizerShader; - - fn set_shader(&self, shader: AudioVisualizerShader); - - #[doc(alias = "shade-amount")] - fn connect_shade_amount_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "shader")] - fn connect_shader_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> AudioVisualizerExt for O { +pub trait AudioVisualizerExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "shade-amount")] fn shade_amount(&self) -> u32 { glib::ObjectExt::property(self.as_ref(), "shade-amount") } + #[doc(alias = "shade-amount")] fn set_shade_amount(&self, shade_amount: u32) { glib::ObjectExt::set_property(self.as_ref(), "shade-amount", shade_amount) } @@ -65,6 +51,7 @@ impl> AudioVisualizerExt for O { glib::ObjectExt::set_property(self.as_ref(), "shader", shader) } + #[doc(alias = "shade-amount")] fn connect_shade_amount_notify( &self, f: F, @@ -93,6 +80,7 @@ impl> AudioVisualizerExt for O { } } + #[doc(alias = "shader")] fn connect_shader_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_shader_trampoline< P: IsA, @@ -118,3 +106,5 @@ impl> AudioVisualizerExt for O { } } } + +impl> AudioVisualizerExt for O {} diff --git a/gstreamer-pbutils/src/auto/discoverer_stream_info.rs b/gstreamer-pbutils/src/auto/discoverer_stream_info.rs index d72b236c8..4975e7e10 100644 --- a/gstreamer-pbutils/src/auto/discoverer_stream_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_stream_info.rs @@ -21,49 +21,14 @@ impl DiscovererStreamInfo { unsafe impl Send for DiscovererStreamInfo {} unsafe impl Sync for DiscovererStreamInfo {} -pub trait DiscovererStreamInfoExt: 'static { - #[doc(alias = "gst_discoverer_stream_info_get_caps")] - #[doc(alias = "get_caps")] - fn caps(&self) -> Option; - - #[doc(alias = "gst_discoverer_stream_info_get_misc")] - #[doc(alias = "get_misc")] - fn misc(&self) -> Option; - - #[doc(alias = "gst_discoverer_stream_info_get_next")] - #[doc(alias = "get_next")] - #[must_use] - fn next(&self) -> Option; - - #[doc(alias = "gst_discoverer_stream_info_get_previous")] - #[doc(alias = "get_previous")] - #[must_use] - fn previous(&self) -> Option; - - #[doc(alias = "gst_discoverer_stream_info_get_stream_id")] - #[doc(alias = "get_stream_id")] - fn stream_id(&self) -> Option; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_discoverer_stream_info_get_stream_number")] - #[doc(alias = "get_stream_number")] - fn stream_number(&self) -> i32; - - #[doc(alias = "gst_discoverer_stream_info_get_stream_type_nick")] - #[doc(alias = "get_stream_type_nick")] - fn stream_type_nick(&self) -> glib::GString; - - #[doc(alias = "gst_discoverer_stream_info_get_tags")] - #[doc(alias = "get_tags")] - fn tags(&self) -> Option; - - #[doc(alias = "gst_discoverer_stream_info_get_toc")] - #[doc(alias = "get_toc")] - fn toc(&self) -> Option; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> DiscovererStreamInfoExt for O { +pub trait DiscovererStreamInfoExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_discoverer_stream_info_get_caps")] + #[doc(alias = "get_caps")] fn caps(&self) -> Option { unsafe { from_glib_full(ffi::gst_discoverer_stream_info_get_caps( @@ -72,6 +37,8 @@ impl> DiscovererStreamInfoExt for O { } } + #[doc(alias = "gst_discoverer_stream_info_get_misc")] + #[doc(alias = "get_misc")] fn misc(&self) -> Option { unsafe { from_glib_none(ffi::gst_discoverer_stream_info_get_misc( @@ -80,6 +47,9 @@ impl> DiscovererStreamInfoExt for O { } } + #[doc(alias = "gst_discoverer_stream_info_get_next")] + #[doc(alias = "get_next")] + #[must_use] fn next(&self) -> Option { unsafe { from_glib_full(ffi::gst_discoverer_stream_info_get_next( @@ -88,6 +58,9 @@ impl> DiscovererStreamInfoExt for O { } } + #[doc(alias = "gst_discoverer_stream_info_get_previous")] + #[doc(alias = "get_previous")] + #[must_use] fn previous(&self) -> Option { unsafe { from_glib_full(ffi::gst_discoverer_stream_info_get_previous( @@ -96,6 +69,8 @@ impl> DiscovererStreamInfoExt for O { } } + #[doc(alias = "gst_discoverer_stream_info_get_stream_id")] + #[doc(alias = "get_stream_id")] fn stream_id(&self) -> Option { unsafe { from_glib_none(ffi::gst_discoverer_stream_info_get_stream_id( @@ -106,10 +81,14 @@ impl> DiscovererStreamInfoExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_discoverer_stream_info_get_stream_number")] + #[doc(alias = "get_stream_number")] fn stream_number(&self) -> i32 { unsafe { ffi::gst_discoverer_stream_info_get_stream_number(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_discoverer_stream_info_get_stream_type_nick")] + #[doc(alias = "get_stream_type_nick")] fn stream_type_nick(&self) -> glib::GString { unsafe { from_glib_none(ffi::gst_discoverer_stream_info_get_stream_type_nick( @@ -118,6 +97,8 @@ impl> DiscovererStreamInfoExt for O { } } + #[doc(alias = "gst_discoverer_stream_info_get_tags")] + #[doc(alias = "get_tags")] fn tags(&self) -> Option { unsafe { from_glib_none(ffi::gst_discoverer_stream_info_get_tags( @@ -126,6 +107,8 @@ impl> DiscovererStreamInfoExt for O { } } + #[doc(alias = "gst_discoverer_stream_info_get_toc")] + #[doc(alias = "get_toc")] fn toc(&self) -> Option { unsafe { from_glib_none(ffi::gst_discoverer_stream_info_get_toc( @@ -134,3 +117,5 @@ impl> DiscovererStreamInfoExt for O { } } } + +impl> DiscovererStreamInfoExt for O {} diff --git a/gstreamer-pbutils/src/auto/encoding_profile.rs b/gstreamer-pbutils/src/auto/encoding_profile.rs index 7e646d505..c9a9405d2 100644 --- a/gstreamer-pbutils/src/auto/encoding_profile.rs +++ b/gstreamer-pbutils/src/auto/encoding_profile.rs @@ -57,73 +57,14 @@ impl EncodingProfile { unsafe impl Send for EncodingProfile {} unsafe impl Sync for EncodingProfile {} -pub trait EncodingProfileExt: 'static { - #[doc(alias = "gst_encoding_profile_copy")] - #[must_use] - fn copy(&self) -> EncodingProfile; - - #[doc(alias = "gst_encoding_profile_get_allow_dynamic_output")] - #[doc(alias = "get_allow_dynamic_output")] - fn allows_dynamic_output(&self) -> bool; - - #[doc(alias = "gst_encoding_profile_get_description")] - #[doc(alias = "get_description")] - fn description(&self) -> Option; - - #[doc(alias = "gst_encoding_profile_get_file_extension")] - #[doc(alias = "get_file_extension")] - fn file_extension(&self) -> Option; - - #[doc(alias = "gst_encoding_profile_get_format")] - #[doc(alias = "get_format")] - fn format(&self) -> gst::Caps; - - #[doc(alias = "gst_encoding_profile_get_input_caps")] - #[doc(alias = "get_input_caps")] - fn input_caps(&self) -> gst::Caps; - - #[doc(alias = "gst_encoding_profile_get_name")] - #[doc(alias = "get_name")] - fn name(&self) -> Option; - - #[doc(alias = "gst_encoding_profile_get_presence")] - #[doc(alias = "get_presence")] - fn presence(&self) -> u32; - - #[doc(alias = "gst_encoding_profile_get_preset")] - #[doc(alias = "get_preset")] - fn preset(&self) -> Option; - - #[doc(alias = "gst_encoding_profile_get_preset_name")] - #[doc(alias = "get_preset_name")] - fn preset_name(&self) -> Option; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_encoding_profile_get_single_segment")] - #[doc(alias = "get_single_segment")] - fn is_single_segment(&self) -> bool; - - #[doc(alias = "gst_encoding_profile_get_type_nick")] - #[doc(alias = "get_type_nick")] - fn type_nick(&self) -> glib::GString; - - #[doc(alias = "gst_encoding_profile_is_enabled")] - fn is_enabled(&self) -> bool; - - #[doc(alias = "gst_encoding_profile_is_equal")] - fn is_equal(&self, b: &impl IsA) -> bool; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "element-properties")] - fn connect_element_properties_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> EncodingProfileExt for O { +pub trait EncodingProfileExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_encoding_profile_copy")] + #[must_use] fn copy(&self) -> EncodingProfile { unsafe { from_glib_full(ffi::gst_encoding_profile_copy( @@ -132,6 +73,8 @@ impl> EncodingProfileExt for O { } } + #[doc(alias = "gst_encoding_profile_get_allow_dynamic_output")] + #[doc(alias = "get_allow_dynamic_output")] fn allows_dynamic_output(&self) -> bool { unsafe { from_glib(ffi::gst_encoding_profile_get_allow_dynamic_output( @@ -140,6 +83,8 @@ impl> EncodingProfileExt for O { } } + #[doc(alias = "gst_encoding_profile_get_description")] + #[doc(alias = "get_description")] fn description(&self) -> Option { unsafe { from_glib_none(ffi::gst_encoding_profile_get_description( @@ -148,6 +93,8 @@ impl> EncodingProfileExt for O { } } + #[doc(alias = "gst_encoding_profile_get_file_extension")] + #[doc(alias = "get_file_extension")] fn file_extension(&self) -> Option { unsafe { from_glib_none(ffi::gst_encoding_profile_get_file_extension( @@ -156,6 +103,8 @@ impl> EncodingProfileExt for O { } } + #[doc(alias = "gst_encoding_profile_get_format")] + #[doc(alias = "get_format")] fn format(&self) -> gst::Caps { unsafe { from_glib_full(ffi::gst_encoding_profile_get_format( @@ -164,6 +113,8 @@ impl> EncodingProfileExt for O { } } + #[doc(alias = "gst_encoding_profile_get_input_caps")] + #[doc(alias = "get_input_caps")] fn input_caps(&self) -> gst::Caps { unsafe { from_glib_full(ffi::gst_encoding_profile_get_input_caps( @@ -172,6 +123,8 @@ impl> EncodingProfileExt for O { } } + #[doc(alias = "gst_encoding_profile_get_name")] + #[doc(alias = "get_name")] fn name(&self) -> Option { unsafe { from_glib_none(ffi::gst_encoding_profile_get_name( @@ -180,10 +133,14 @@ impl> EncodingProfileExt for O { } } + #[doc(alias = "gst_encoding_profile_get_presence")] + #[doc(alias = "get_presence")] fn presence(&self) -> u32 { unsafe { ffi::gst_encoding_profile_get_presence(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_encoding_profile_get_preset")] + #[doc(alias = "get_preset")] fn preset(&self) -> Option { unsafe { from_glib_none(ffi::gst_encoding_profile_get_preset( @@ -192,6 +149,8 @@ impl> EncodingProfileExt for O { } } + #[doc(alias = "gst_encoding_profile_get_preset_name")] + #[doc(alias = "get_preset_name")] fn preset_name(&self) -> Option { unsafe { from_glib_none(ffi::gst_encoding_profile_get_preset_name( @@ -202,6 +161,8 @@ impl> EncodingProfileExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_encoding_profile_get_single_segment")] + #[doc(alias = "get_single_segment")] fn is_single_segment(&self) -> bool { unsafe { from_glib(ffi::gst_encoding_profile_get_single_segment( @@ -210,6 +171,8 @@ impl> EncodingProfileExt for O { } } + #[doc(alias = "gst_encoding_profile_get_type_nick")] + #[doc(alias = "get_type_nick")] fn type_nick(&self) -> glib::GString { unsafe { from_glib_none(ffi::gst_encoding_profile_get_type_nick( @@ -218,6 +181,7 @@ impl> EncodingProfileExt for O { } } + #[doc(alias = "gst_encoding_profile_is_enabled")] fn is_enabled(&self) -> bool { unsafe { from_glib(ffi::gst_encoding_profile_is_enabled( @@ -226,6 +190,7 @@ impl> EncodingProfileExt for O { } } + #[doc(alias = "gst_encoding_profile_is_equal")] fn is_equal(&self, b: &impl IsA) -> bool { unsafe { from_glib(ffi::gst_encoding_profile_is_equal( @@ -237,6 +202,7 @@ impl> EncodingProfileExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "element-properties")] fn connect_element_properties_notify( &self, f: F, @@ -265,3 +231,5 @@ impl> EncodingProfileExt for O { } } } + +impl> EncodingProfileExt for O {} diff --git a/gstreamer-pbutils/src/auto/versions.txt b/gstreamer-pbutils/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-pbutils/src/auto/versions.txt +++ b/gstreamer-pbutils/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-pbutils/sys/src/auto/versions.txt b/gstreamer-pbutils/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-pbutils/sys/src/auto/versions.txt +++ b/gstreamer-pbutils/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-pbutils/sys/tests/abi.rs b/gstreamer-pbutils/sys/tests/abi.rs index 8dc3a196c..6635dfd97 100644 --- a/gstreamer-pbutils/sys/tests/abi.rs +++ b/gstreamer-pbutils/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_pbutils_sys::*; use std::env; diff --git a/gstreamer-play/src/auto/play_stream_info.rs b/gstreamer-play/src/auto/play_stream_info.rs index 5fc2f133c..7a87aeef5 100644 --- a/gstreamer-play/src/auto/play_stream_info.rs +++ b/gstreamer-play/src/auto/play_stream_info.rs @@ -21,29 +21,14 @@ impl PlayStreamInfo { unsafe impl Send for PlayStreamInfo {} unsafe impl Sync for PlayStreamInfo {} -pub trait PlayStreamInfoExt: 'static { - #[doc(alias = "gst_play_stream_info_get_caps")] - #[doc(alias = "get_caps")] - fn caps(&self) -> Option; - - #[doc(alias = "gst_play_stream_info_get_codec")] - #[doc(alias = "get_codec")] - fn codec(&self) -> Option; - - #[doc(alias = "gst_play_stream_info_get_index")] - #[doc(alias = "get_index")] - fn index(&self) -> i32; - - #[doc(alias = "gst_play_stream_info_get_stream_type")] - #[doc(alias = "get_stream_type")] - fn stream_type(&self) -> glib::GString; - - #[doc(alias = "gst_play_stream_info_get_tags")] - #[doc(alias = "get_tags")] - fn tags(&self) -> Option; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> PlayStreamInfoExt for O { +pub trait PlayStreamInfoExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_play_stream_info_get_caps")] + #[doc(alias = "get_caps")] fn caps(&self) -> Option { unsafe { from_glib_none(ffi::gst_play_stream_info_get_caps(const_override( @@ -52,6 +37,8 @@ impl> PlayStreamInfoExt for O { } } + #[doc(alias = "gst_play_stream_info_get_codec")] + #[doc(alias = "get_codec")] fn codec(&self) -> Option { unsafe { from_glib_none(ffi::gst_play_stream_info_get_codec(const_override( @@ -60,12 +47,16 @@ impl> PlayStreamInfoExt for O { } } + #[doc(alias = "gst_play_stream_info_get_index")] + #[doc(alias = "get_index")] fn index(&self) -> i32 { unsafe { ffi::gst_play_stream_info_get_index(const_override(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_play_stream_info_get_stream_type")] + #[doc(alias = "get_stream_type")] fn stream_type(&self) -> glib::GString { unsafe { from_glib_none(ffi::gst_play_stream_info_get_stream_type(const_override( @@ -74,6 +65,8 @@ impl> PlayStreamInfoExt for O { } } + #[doc(alias = "gst_play_stream_info_get_tags")] + #[doc(alias = "get_tags")] fn tags(&self) -> Option { unsafe { from_glib_none(ffi::gst_play_stream_info_get_tags(const_override( @@ -82,3 +75,5 @@ impl> PlayStreamInfoExt for O { } } } + +impl> PlayStreamInfoExt for O {} diff --git a/gstreamer-play/src/auto/play_video_renderer.rs b/gstreamer-play/src/auto/play_video_renderer.rs index f3e40abf7..ed806bc9d 100644 --- a/gstreamer-play/src/auto/play_video_renderer.rs +++ b/gstreamer-play/src/auto/play_video_renderer.rs @@ -21,6 +21,11 @@ impl PlayVideoRenderer { unsafe impl Send for PlayVideoRenderer {} unsafe impl Sync for PlayVideoRenderer {} -pub trait PlayVideoRendererExt: 'static {} +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait PlayVideoRendererExt: IsA + sealed::Sealed + 'static {} impl> PlayVideoRendererExt for O {} diff --git a/gstreamer-play/src/auto/versions.txt b/gstreamer-play/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-play/src/auto/versions.txt +++ b/gstreamer-play/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-play/sys/src/auto/versions.txt b/gstreamer-play/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-play/sys/src/auto/versions.txt +++ b/gstreamer-play/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-play/sys/tests/abi.rs b/gstreamer-play/sys/tests/abi.rs index f35fa979f..18f3c5359 100644 --- a/gstreamer-play/sys/tests/abi.rs +++ b/gstreamer-play/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_play_sys::*; use std::env; diff --git a/gstreamer-player/src/auto/player_signal_dispatcher.rs b/gstreamer-player/src/auto/player_signal_dispatcher.rs index 6b2206faf..b9d27b26b 100644 --- a/gstreamer-player/src/auto/player_signal_dispatcher.rs +++ b/gstreamer-player/src/auto/player_signal_dispatcher.rs @@ -21,6 +21,14 @@ impl PlayerSignalDispatcher { unsafe impl Send for PlayerSignalDispatcher {} unsafe impl Sync for PlayerSignalDispatcher {} -pub trait PlayerSignalDispatcherExt: 'static {} +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait PlayerSignalDispatcherExt: + IsA + sealed::Sealed + 'static +{ +} impl> PlayerSignalDispatcherExt for O {} diff --git a/gstreamer-player/src/auto/player_stream_info.rs b/gstreamer-player/src/auto/player_stream_info.rs index 2c337afcf..8fa08f603 100644 --- a/gstreamer-player/src/auto/player_stream_info.rs +++ b/gstreamer-player/src/auto/player_stream_info.rs @@ -21,29 +21,14 @@ impl PlayerStreamInfo { unsafe impl Send for PlayerStreamInfo {} unsafe impl Sync for PlayerStreamInfo {} -pub trait PlayerStreamInfoExt: 'static { - #[doc(alias = "gst_player_stream_info_get_caps")] - #[doc(alias = "get_caps")] - fn caps(&self) -> Option; - - #[doc(alias = "gst_player_stream_info_get_codec")] - #[doc(alias = "get_codec")] - fn codec(&self) -> Option; - - #[doc(alias = "gst_player_stream_info_get_index")] - #[doc(alias = "get_index")] - fn index(&self) -> i32; - - #[doc(alias = "gst_player_stream_info_get_stream_type")] - #[doc(alias = "get_stream_type")] - fn stream_type(&self) -> glib::GString; - - #[doc(alias = "gst_player_stream_info_get_tags")] - #[doc(alias = "get_tags")] - fn tags(&self) -> Option; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> PlayerStreamInfoExt for O { +pub trait PlayerStreamInfoExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_player_stream_info_get_caps")] + #[doc(alias = "get_caps")] fn caps(&self) -> Option { unsafe { from_glib_none(ffi::gst_player_stream_info_get_caps(const_override( @@ -52,6 +37,8 @@ impl> PlayerStreamInfoExt for O { } } + #[doc(alias = "gst_player_stream_info_get_codec")] + #[doc(alias = "get_codec")] fn codec(&self) -> Option { unsafe { from_glib_none(ffi::gst_player_stream_info_get_codec(const_override( @@ -60,12 +47,16 @@ impl> PlayerStreamInfoExt for O { } } + #[doc(alias = "gst_player_stream_info_get_index")] + #[doc(alias = "get_index")] fn index(&self) -> i32 { unsafe { ffi::gst_player_stream_info_get_index(const_override(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_player_stream_info_get_stream_type")] + #[doc(alias = "get_stream_type")] fn stream_type(&self) -> glib::GString { unsafe { from_glib_none(ffi::gst_player_stream_info_get_stream_type(const_override( @@ -74,6 +65,8 @@ impl> PlayerStreamInfoExt for O { } } + #[doc(alias = "gst_player_stream_info_get_tags")] + #[doc(alias = "get_tags")] fn tags(&self) -> Option { unsafe { from_glib_none(ffi::gst_player_stream_info_get_tags(const_override( @@ -82,3 +75,5 @@ impl> PlayerStreamInfoExt for O { } } } + +impl> PlayerStreamInfoExt for O {} diff --git a/gstreamer-player/src/auto/player_video_renderer.rs b/gstreamer-player/src/auto/player_video_renderer.rs index 6d549dfcd..49b067232 100644 --- a/gstreamer-player/src/auto/player_video_renderer.rs +++ b/gstreamer-player/src/auto/player_video_renderer.rs @@ -21,6 +21,11 @@ impl PlayerVideoRenderer { unsafe impl Send for PlayerVideoRenderer {} unsafe impl Sync for PlayerVideoRenderer {} -pub trait PlayerVideoRendererExt: 'static {} +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait PlayerVideoRendererExt: IsA + sealed::Sealed + 'static {} impl> PlayerVideoRendererExt for O {} diff --git a/gstreamer-player/src/auto/versions.txt b/gstreamer-player/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-player/src/auto/versions.txt +++ b/gstreamer-player/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-player/sys/src/auto/versions.txt b/gstreamer-player/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-player/sys/src/auto/versions.txt +++ b/gstreamer-player/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-player/sys/tests/abi.rs b/gstreamer-player/sys/tests/abi.rs index 4024ec792..a395a390c 100644 --- a/gstreamer-player/sys/tests/abi.rs +++ b/gstreamer-player/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_player_sys::*; use std::env; diff --git a/gstreamer-rtp/src/auto/rtp_base_depayload.rs b/gstreamer-rtp/src/auto/rtp_base_depayload.rs index 7e6e74f7f..df6cbea18 100644 --- a/gstreamer-rtp/src/auto/rtp_base_depayload.rs +++ b/gstreamer-rtp/src/auto/rtp_base_depayload.rs @@ -29,120 +29,15 @@ impl RTPBaseDepayload { unsafe impl Send for RTPBaseDepayload {} unsafe impl Sync for RTPBaseDepayload {} -pub trait RTPBaseDepayloadExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait RTPBaseDepayloadExt: IsA + sealed::Sealed + 'static { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_rtp_base_depayload_is_source_info_enabled")] - fn is_source_info_enabled(&self) -> bool; - - #[doc(alias = "gst_rtp_base_depayload_push")] - fn push(&self, out_buf: gst::Buffer) -> Result; - - #[doc(alias = "gst_rtp_base_depayload_push_list")] - fn push_list(&self, out_list: gst::BufferList) -> Result; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtp_base_depayload_set_source_info_enabled")] - fn set_source_info_enabled(&self, enable: bool); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "auto-header-extension")] - fn is_auto_header_extension(&self) -> bool; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "auto-header-extension")] - fn set_auto_header_extension(&self, auto_header_extension: bool); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "max-reorder")] - fn max_reorder(&self) -> i32; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "max-reorder")] - fn set_max_reorder(&self, max_reorder: i32); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "source-info")] - fn is_source_info(&self) -> bool; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "source-info")] - fn set_source_info(&self, source_info: bool); - - fn stats(&self) -> Option; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "add-extension")] - fn connect_add_extension( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - fn emit_add_extension(&self, ext: &RTPHeaderExtension); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "clear-extensions")] - fn connect_clear_extensions( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - fn emit_clear_extensions(&self); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "request-extension")] - fn connect_request_extension< - F: Fn(&Self, u32, Option<&str>) -> Option + Send + Sync + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "auto-header-extension")] - fn connect_auto_header_extension_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "max-reorder")] - fn connect_max_reorder_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "source-info")] - fn connect_source_info_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "stats")] - fn connect_stats_notify(&self, f: F) -> SignalHandlerId; -} - -impl> RTPBaseDepayloadExt for O { - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] fn is_source_info_enabled(&self) -> bool { unsafe { from_glib(ffi::gst_rtp_base_depayload_is_source_info_enabled( @@ -151,6 +46,7 @@ impl> RTPBaseDepayloadExt for O { } } + #[doc(alias = "gst_rtp_base_depayload_push")] fn push(&self, out_buf: gst::Buffer) -> Result { unsafe { try_from_glib(ffi::gst_rtp_base_depayload_push( @@ -160,6 +56,7 @@ impl> RTPBaseDepayloadExt for O { } } + #[doc(alias = "gst_rtp_base_depayload_push_list")] fn push_list(&self, out_list: gst::BufferList) -> Result { unsafe { try_from_glib(ffi::gst_rtp_base_depayload_push_list( @@ -171,6 +68,7 @@ impl> RTPBaseDepayloadExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtp_base_depayload_set_source_info_enabled")] fn set_source_info_enabled(&self, enable: bool) { unsafe { ffi::gst_rtp_base_depayload_set_source_info_enabled( @@ -182,12 +80,14 @@ impl> RTPBaseDepayloadExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "auto-header-extension")] fn is_auto_header_extension(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "auto-header-extension") } #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "auto-header-extension")] fn set_auto_header_extension(&self, auto_header_extension: bool) { glib::ObjectExt::set_property( self.as_ref(), @@ -198,24 +98,28 @@ impl> RTPBaseDepayloadExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "max-reorder")] fn max_reorder(&self) -> i32 { glib::ObjectExt::property(self.as_ref(), "max-reorder") } #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "max-reorder")] fn set_max_reorder(&self, max_reorder: i32) { glib::ObjectExt::set_property(self.as_ref(), "max-reorder", max_reorder) } #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "source-info")] fn is_source_info(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "source-info") } #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "source-info")] fn set_source_info(&self, source_info: bool) { glib::ObjectExt::set_property(self.as_ref(), "source-info", source_info) } @@ -226,6 +130,7 @@ impl> RTPBaseDepayloadExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "add-extension")] fn connect_add_extension( &self, f: F, @@ -265,6 +170,7 @@ impl> RTPBaseDepayloadExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "clear-extensions")] fn connect_clear_extensions( &self, f: F, @@ -300,6 +206,7 @@ impl> RTPBaseDepayloadExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "request-extension")] fn connect_request_extension< F: Fn(&Self, u32, Option<&str>) -> Option + Send + Sync + 'static, >( @@ -341,6 +248,7 @@ impl> RTPBaseDepayloadExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "auto-header-extension")] fn connect_auto_header_extension_notify( &self, f: F, @@ -371,6 +279,7 @@ impl> RTPBaseDepayloadExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "max-reorder")] fn connect_max_reorder_notify( &self, f: F, @@ -401,6 +310,7 @@ impl> RTPBaseDepayloadExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "source-info")] fn connect_source_info_notify( &self, f: F, @@ -429,6 +339,7 @@ impl> RTPBaseDepayloadExt for O { } } + #[doc(alias = "stats")] fn connect_stats_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_stats_trampoline< P: IsA, @@ -454,3 +365,5 @@ impl> RTPBaseDepayloadExt for O { } } } + +impl> RTPBaseDepayloadExt for O {} diff --git a/gstreamer-rtp/src/auto/rtp_base_payload.rs b/gstreamer-rtp/src/auto/rtp_base_payload.rs index b39025c9f..ce4a6fd12 100644 --- a/gstreamer-rtp/src/auto/rtp_base_payload.rs +++ b/gstreamer-rtp/src/auto/rtp_base_payload.rs @@ -29,261 +29,15 @@ impl RTPBasePayload { unsafe impl Send for RTPBasePayload {} unsafe impl Sync for RTPBasePayload {} -pub trait RTPBasePayloadExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_rtp_base_payload_allocate_output_buffer")] - fn allocate_output_buffer(&self, payload_len: u32, pad_len: u8, csrc_count: u8) -> gst::Buffer; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtp_base_payload_get_source_count")] - #[doc(alias = "get_source_count")] - fn source_count(&self, buffer: &gst::Buffer) -> u32; - - #[doc(alias = "gst_rtp_base_payload_is_filled")] - fn is_filled(&self, size: u32, duration: impl Into>) -> bool; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtp_base_payload_is_source_info_enabled")] - fn is_source_info_enabled(&self) -> bool; - - #[doc(alias = "gst_rtp_base_payload_push")] - fn push(&self, buffer: gst::Buffer) -> Result; - - #[doc(alias = "gst_rtp_base_payload_push_list")] - fn push_list(&self, list: gst::BufferList) -> Result; - - #[doc(alias = "gst_rtp_base_payload_set_options")] - fn set_options(&self, media: &str, dynamic: bool, encoding_name: &str, clock_rate: u32); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtp_base_payload_set_source_info_enabled")] - fn set_source_info_enabled(&self, enable: bool); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "auto-header-extension")] - fn is_auto_header_extension(&self) -> bool; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "auto-header-extension")] - fn set_auto_header_extension(&self, auto_header_extension: bool); - - #[doc(alias = "max-ptime")] - fn max_ptime(&self) -> i64; - - #[doc(alias = "max-ptime")] - fn set_max_ptime(&self, max_ptime: i64); - - #[doc(alias = "min-ptime")] - fn min_ptime(&self) -> i64; - - #[doc(alias = "min-ptime")] - fn set_min_ptime(&self, min_ptime: i64); - - fn mtu(&self) -> u32; - - fn set_mtu(&self, mtu: u32); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "onvif-no-rate-control")] - fn is_onvif_no_rate_control(&self) -> bool; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "onvif-no-rate-control")] - fn set_onvif_no_rate_control(&self, onvif_no_rate_control: bool); - - #[doc(alias = "perfect-rtptime")] - fn is_perfect_rtptime(&self) -> bool; - - #[doc(alias = "perfect-rtptime")] - fn set_perfect_rtptime(&self, perfect_rtptime: bool); - - fn pt(&self) -> u32; - - fn set_pt(&self, pt: u32); - - #[doc(alias = "ptime-multiple")] - fn ptime_multiple(&self) -> i64; - - #[doc(alias = "ptime-multiple")] - fn set_ptime_multiple(&self, ptime_multiple: i64); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "scale-rtptime")] - fn is_scale_rtptime(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "scale-rtptime")] - fn set_scale_rtptime(&self, scale_rtptime: bool); - - fn seqnum(&self) -> u32; - - #[doc(alias = "seqnum-offset")] - fn seqnum_offset(&self) -> i32; - - #[doc(alias = "seqnum-offset")] - fn set_seqnum_offset(&self, seqnum_offset: i32); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "source-info")] - fn is_source_info(&self) -> bool; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "source-info")] - fn set_source_info(&self, source_info: bool); - - fn ssrc(&self) -> u32; - - fn set_ssrc(&self, ssrc: u32); - - fn stats(&self) -> Option; - - fn timestamp(&self) -> u32; - - #[doc(alias = "timestamp-offset")] - fn timestamp_offset(&self) -> u32; - - #[doc(alias = "timestamp-offset")] - fn set_timestamp_offset(&self, timestamp_offset: u32); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "add-extension")] - fn connect_add_extension( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - fn emit_add_extension(&self, ext: &RTPHeaderExtension); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "clear-extensions")] - fn connect_clear_extensions( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - fn emit_clear_extensions(&self); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "request-extension")] - fn connect_request_extension< - F: Fn(&Self, u32, &str) -> Option + Send + Sync + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "auto-header-extension")] - fn connect_auto_header_extension_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "max-ptime")] - fn connect_max_ptime_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "min-ptime")] - fn connect_min_ptime_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "mtu")] - fn connect_mtu_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "onvif-no-rate-control")] - fn connect_onvif_no_rate_control_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "perfect-rtptime")] - fn connect_perfect_rtptime_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "pt")] - fn connect_pt_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "ptime-multiple")] - fn connect_ptime_multiple_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "scale-rtptime")] - fn connect_scale_rtptime_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "seqnum")] - fn connect_seqnum_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "seqnum-offset")] - fn connect_seqnum_offset_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "source-info")] - fn connect_source_info_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "ssrc")] - fn connect_ssrc_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "stats")] - fn connect_stats_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "timestamp")] - fn connect_timestamp_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "timestamp-offset")] - fn connect_timestamp_offset_notify( - &self, - f: F, - ) -> SignalHandlerId; -} - -impl> RTPBasePayloadExt for O { - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] fn allocate_output_buffer(&self, payload_len: u32, pad_len: u8, csrc_count: u8) -> gst::Buffer { unsafe { from_glib_full(ffi::gst_rtp_base_payload_allocate_output_buffer( @@ -297,6 +51,8 @@ impl> RTPBasePayloadExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtp_base_payload_get_source_count")] + #[doc(alias = "get_source_count")] fn source_count(&self, buffer: &gst::Buffer) -> u32 { unsafe { ffi::gst_rtp_base_payload_get_source_count( @@ -306,6 +62,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "gst_rtp_base_payload_is_filled")] fn is_filled(&self, size: u32, duration: impl Into>) -> bool { unsafe { from_glib(ffi::gst_rtp_base_payload_is_filled( @@ -318,6 +75,7 @@ impl> RTPBasePayloadExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtp_base_payload_is_source_info_enabled")] fn is_source_info_enabled(&self) -> bool { unsafe { from_glib(ffi::gst_rtp_base_payload_is_source_info_enabled( @@ -326,6 +84,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "gst_rtp_base_payload_push")] fn push(&self, buffer: gst::Buffer) -> Result { unsafe { try_from_glib(ffi::gst_rtp_base_payload_push( @@ -335,6 +94,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "gst_rtp_base_payload_push_list")] fn push_list(&self, list: gst::BufferList) -> Result { unsafe { try_from_glib(ffi::gst_rtp_base_payload_push_list( @@ -344,6 +104,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "gst_rtp_base_payload_set_options")] fn set_options(&self, media: &str, dynamic: bool, encoding_name: &str, clock_rate: u32) { unsafe { ffi::gst_rtp_base_payload_set_options( @@ -358,6 +119,7 @@ impl> RTPBasePayloadExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtp_base_payload_set_source_info_enabled")] fn set_source_info_enabled(&self, enable: bool) { unsafe { ffi::gst_rtp_base_payload_set_source_info_enabled( @@ -369,12 +131,14 @@ impl> RTPBasePayloadExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "auto-header-extension")] fn is_auto_header_extension(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "auto-header-extension") } #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "auto-header-extension")] fn set_auto_header_extension(&self, auto_header_extension: bool) { glib::ObjectExt::set_property( self.as_ref(), @@ -383,18 +147,22 @@ impl> RTPBasePayloadExt for O { ) } + #[doc(alias = "max-ptime")] fn max_ptime(&self) -> i64 { glib::ObjectExt::property(self.as_ref(), "max-ptime") } + #[doc(alias = "max-ptime")] fn set_max_ptime(&self, max_ptime: i64) { glib::ObjectExt::set_property(self.as_ref(), "max-ptime", max_ptime) } + #[doc(alias = "min-ptime")] fn min_ptime(&self) -> i64 { glib::ObjectExt::property(self.as_ref(), "min-ptime") } + #[doc(alias = "min-ptime")] fn set_min_ptime(&self, min_ptime: i64) { glib::ObjectExt::set_property(self.as_ref(), "min-ptime", min_ptime) } @@ -409,12 +177,14 @@ impl> RTPBasePayloadExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "onvif-no-rate-control")] fn is_onvif_no_rate_control(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "onvif-no-rate-control") } #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "onvif-no-rate-control")] fn set_onvif_no_rate_control(&self, onvif_no_rate_control: bool) { glib::ObjectExt::set_property( self.as_ref(), @@ -423,10 +193,12 @@ impl> RTPBasePayloadExt for O { ) } + #[doc(alias = "perfect-rtptime")] fn is_perfect_rtptime(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "perfect-rtptime") } + #[doc(alias = "perfect-rtptime")] fn set_perfect_rtptime(&self, perfect_rtptime: bool) { glib::ObjectExt::set_property(self.as_ref(), "perfect-rtptime", perfect_rtptime) } @@ -439,22 +211,26 @@ impl> RTPBasePayloadExt for O { glib::ObjectExt::set_property(self.as_ref(), "pt", pt) } + #[doc(alias = "ptime-multiple")] fn ptime_multiple(&self) -> i64 { glib::ObjectExt::property(self.as_ref(), "ptime-multiple") } + #[doc(alias = "ptime-multiple")] fn set_ptime_multiple(&self, ptime_multiple: i64) { glib::ObjectExt::set_property(self.as_ref(), "ptime-multiple", ptime_multiple) } #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "scale-rtptime")] fn is_scale_rtptime(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "scale-rtptime") } #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "scale-rtptime")] fn set_scale_rtptime(&self, scale_rtptime: bool) { glib::ObjectExt::set_property(self.as_ref(), "scale-rtptime", scale_rtptime) } @@ -463,22 +239,26 @@ impl> RTPBasePayloadExt for O { glib::ObjectExt::property(self.as_ref(), "seqnum") } + #[doc(alias = "seqnum-offset")] fn seqnum_offset(&self) -> i32 { glib::ObjectExt::property(self.as_ref(), "seqnum-offset") } + #[doc(alias = "seqnum-offset")] fn set_seqnum_offset(&self, seqnum_offset: i32) { glib::ObjectExt::set_property(self.as_ref(), "seqnum-offset", seqnum_offset) } #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "source-info")] fn is_source_info(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "source-info") } #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "source-info")] fn set_source_info(&self, source_info: bool) { glib::ObjectExt::set_property(self.as_ref(), "source-info", source_info) } @@ -499,16 +279,19 @@ impl> RTPBasePayloadExt for O { glib::ObjectExt::property(self.as_ref(), "timestamp") } + #[doc(alias = "timestamp-offset")] fn timestamp_offset(&self) -> u32 { glib::ObjectExt::property(self.as_ref(), "timestamp-offset") } + #[doc(alias = "timestamp-offset")] fn set_timestamp_offset(&self, timestamp_offset: u32) { glib::ObjectExt::set_property(self.as_ref(), "timestamp-offset", timestamp_offset) } #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "add-extension")] fn connect_add_extension( &self, f: F, @@ -548,6 +331,7 @@ impl> RTPBasePayloadExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "clear-extensions")] fn connect_clear_extensions( &self, f: F, @@ -583,6 +367,7 @@ impl> RTPBasePayloadExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "request-extension")] fn connect_request_extension< F: Fn(&Self, u32, &str) -> Option + Send + Sync + 'static, >( @@ -621,6 +406,7 @@ impl> RTPBasePayloadExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "auto-header-extension")] fn connect_auto_header_extension_notify( &self, f: F, @@ -649,6 +435,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "max-ptime")] fn connect_max_ptime_notify( &self, f: F, @@ -677,6 +464,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "min-ptime")] fn connect_min_ptime_notify( &self, f: F, @@ -705,6 +493,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "mtu")] fn connect_mtu_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_mtu_trampoline< P: IsA, @@ -732,6 +521,7 @@ impl> RTPBasePayloadExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "onvif-no-rate-control")] fn connect_onvif_no_rate_control_notify( &self, f: F, @@ -760,6 +550,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "perfect-rtptime")] fn connect_perfect_rtptime_notify( &self, f: F, @@ -788,6 +579,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "pt")] fn connect_pt_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_pt_trampoline< P: IsA, @@ -813,6 +605,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "ptime-multiple")] fn connect_ptime_multiple_notify( &self, f: F, @@ -843,6 +636,7 @@ impl> RTPBasePayloadExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "scale-rtptime")] fn connect_scale_rtptime_notify( &self, f: F, @@ -871,6 +665,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "seqnum")] fn connect_seqnum_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_seqnum_trampoline< P: IsA, @@ -896,6 +691,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "seqnum-offset")] fn connect_seqnum_offset_notify( &self, f: F, @@ -926,6 +722,7 @@ impl> RTPBasePayloadExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "source-info")] fn connect_source_info_notify( &self, f: F, @@ -954,6 +751,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "ssrc")] fn connect_ssrc_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_ssrc_trampoline< P: IsA, @@ -979,6 +777,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "stats")] fn connect_stats_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_stats_trampoline< P: IsA, @@ -1004,6 +803,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "timestamp")] fn connect_timestamp_notify( &self, f: F, @@ -1032,6 +832,7 @@ impl> RTPBasePayloadExt for O { } } + #[doc(alias = "timestamp-offset")] fn connect_timestamp_offset_notify( &self, f: F, @@ -1060,3 +861,5 @@ impl> RTPBasePayloadExt for O { } } } + +impl> RTPBasePayloadExt for O {} diff --git a/gstreamer-rtp/src/auto/rtp_header_extension.rs b/gstreamer-rtp/src/auto/rtp_header_extension.rs index 3c122371a..85f54c5f2 100644 --- a/gstreamer-rtp/src/auto/rtp_header_extension.rs +++ b/gstreamer-rtp/src/auto/rtp_header_extension.rs @@ -32,51 +32,14 @@ impl RTPHeaderExtension { unsafe impl Send for RTPHeaderExtension {} unsafe impl Sync for RTPHeaderExtension {} -pub trait RTPHeaderExtensionExt: 'static { - #[doc(alias = "gst_rtp_header_extension_get_direction")] - #[doc(alias = "get_direction")] - fn direction(&self) -> RTPHeaderExtensionDirection; - - #[doc(alias = "gst_rtp_header_extension_get_id")] - #[doc(alias = "get_id")] - fn id(&self) -> u32; - - #[doc(alias = "gst_rtp_header_extension_get_max_size")] - #[doc(alias = "get_max_size")] - fn max_size(&self, input_meta: &gst::Buffer) -> usize; - - #[doc(alias = "gst_rtp_header_extension_get_sdp_caps_field_name")] - #[doc(alias = "get_sdp_caps_field_name")] - fn sdp_caps_field_name(&self) -> glib::GString; - - #[doc(alias = "gst_rtp_header_extension_get_supported_flags")] - #[doc(alias = "get_supported_flags")] - fn supported_flags(&self) -> RTPHeaderExtensionFlags; - - #[doc(alias = "gst_rtp_header_extension_get_uri")] - #[doc(alias = "get_uri")] - fn uri(&self) -> Option; - - #[doc(alias = "gst_rtp_header_extension_set_attributes_from_caps")] - fn set_attributes_from_caps(&self, caps: &gst::Caps) -> bool; - - #[doc(alias = "gst_rtp_header_extension_set_direction")] - fn set_direction(&self, direction: RTPHeaderExtensionDirection); - - #[doc(alias = "gst_rtp_header_extension_set_id")] - fn set_id(&self, ext_id: u32); - - #[doc(alias = "gst_rtp_header_extension_set_non_rtp_sink_caps")] - fn set_non_rtp_sink_caps(&self, caps: &gst::Caps) -> bool; - - #[doc(alias = "gst_rtp_header_extension_set_wants_update_non_rtp_src_caps")] - fn set_wants_update_non_rtp_src_caps(&self, state: bool); - - #[doc(alias = "gst_rtp_header_extension_wants_update_non_rtp_src_caps")] - fn wants_update_non_rtp_src_caps(&self) -> bool; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTPHeaderExtensionExt for O { +pub trait RTPHeaderExtensionExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_rtp_header_extension_get_direction")] + #[doc(alias = "get_direction")] fn direction(&self) -> RTPHeaderExtensionDirection { unsafe { from_glib(ffi::gst_rtp_header_extension_get_direction( @@ -85,10 +48,14 @@ impl> RTPHeaderExtensionExt for O { } } + #[doc(alias = "gst_rtp_header_extension_get_id")] + #[doc(alias = "get_id")] fn id(&self) -> u32 { unsafe { ffi::gst_rtp_header_extension_get_id(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtp_header_extension_get_max_size")] + #[doc(alias = "get_max_size")] fn max_size(&self, input_meta: &gst::Buffer) -> usize { unsafe { ffi::gst_rtp_header_extension_get_max_size( @@ -98,6 +65,8 @@ impl> RTPHeaderExtensionExt for O { } } + #[doc(alias = "gst_rtp_header_extension_get_sdp_caps_field_name")] + #[doc(alias = "get_sdp_caps_field_name")] fn sdp_caps_field_name(&self) -> glib::GString { unsafe { from_glib_full(ffi::gst_rtp_header_extension_get_sdp_caps_field_name( @@ -106,6 +75,8 @@ impl> RTPHeaderExtensionExt for O { } } + #[doc(alias = "gst_rtp_header_extension_get_supported_flags")] + #[doc(alias = "get_supported_flags")] fn supported_flags(&self) -> RTPHeaderExtensionFlags { unsafe { from_glib(ffi::gst_rtp_header_extension_get_supported_flags( @@ -114,6 +85,8 @@ impl> RTPHeaderExtensionExt for O { } } + #[doc(alias = "gst_rtp_header_extension_get_uri")] + #[doc(alias = "get_uri")] fn uri(&self) -> Option { unsafe { from_glib_none(ffi::gst_rtp_header_extension_get_uri( @@ -122,6 +95,7 @@ impl> RTPHeaderExtensionExt for O { } } + #[doc(alias = "gst_rtp_header_extension_set_attributes_from_caps")] fn set_attributes_from_caps(&self, caps: &gst::Caps) -> bool { unsafe { from_glib(ffi::gst_rtp_header_extension_set_attributes_from_caps( @@ -131,6 +105,7 @@ impl> RTPHeaderExtensionExt for O { } } + #[doc(alias = "gst_rtp_header_extension_set_direction")] fn set_direction(&self, direction: RTPHeaderExtensionDirection) { unsafe { ffi::gst_rtp_header_extension_set_direction( @@ -140,12 +115,14 @@ impl> RTPHeaderExtensionExt for O { } } + #[doc(alias = "gst_rtp_header_extension_set_id")] fn set_id(&self, ext_id: u32) { unsafe { ffi::gst_rtp_header_extension_set_id(self.as_ref().to_glib_none().0, ext_id); } } + #[doc(alias = "gst_rtp_header_extension_set_non_rtp_sink_caps")] fn set_non_rtp_sink_caps(&self, caps: &gst::Caps) -> bool { unsafe { from_glib(ffi::gst_rtp_header_extension_set_non_rtp_sink_caps( @@ -155,6 +132,7 @@ impl> RTPHeaderExtensionExt for O { } } + #[doc(alias = "gst_rtp_header_extension_set_wants_update_non_rtp_src_caps")] fn set_wants_update_non_rtp_src_caps(&self, state: bool) { unsafe { ffi::gst_rtp_header_extension_set_wants_update_non_rtp_src_caps( @@ -164,6 +142,7 @@ impl> RTPHeaderExtensionExt for O { } } + #[doc(alias = "gst_rtp_header_extension_wants_update_non_rtp_src_caps")] fn wants_update_non_rtp_src_caps(&self) -> bool { unsafe { from_glib(ffi::gst_rtp_header_extension_wants_update_non_rtp_src_caps( @@ -172,3 +151,5 @@ impl> RTPHeaderExtensionExt for O { } } } + +impl> RTPHeaderExtensionExt for O {} diff --git a/gstreamer-rtp/src/auto/versions.txt b/gstreamer-rtp/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-rtp/src/auto/versions.txt +++ b/gstreamer-rtp/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-rtp/sys/src/auto/versions.txt b/gstreamer-rtp/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-rtp/sys/src/auto/versions.txt +++ b/gstreamer-rtp/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-rtp/sys/tests/abi.rs b/gstreamer-rtp/sys/tests/abi.rs index 21f2a3481..244ec3b03 100644 --- a/gstreamer-rtp/sys/tests/abi.rs +++ b/gstreamer-rtp/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_rtp_sys::*; use std::env; diff --git a/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs index 8b14da15f..8a2ed6111 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs @@ -34,35 +34,13 @@ impl Default for RTSPAddressPool { unsafe impl Send for RTSPAddressPool {} unsafe impl Sync for RTSPAddressPool {} -pub trait RTSPAddressPoolExt: 'static { - #[doc(alias = "gst_rtsp_address_pool_acquire_address")] - fn acquire_address( - &self, - flags: RTSPAddressFlags, - n_ports: i32, - ) -> Result; - - #[doc(alias = "gst_rtsp_address_pool_add_range")] - fn add_range( - &self, - min_address: &str, - max_address: &str, - min_port: u16, - max_port: u16, - ttl: u8, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_rtsp_address_pool_clear")] - fn clear(&self); - - #[doc(alias = "gst_rtsp_address_pool_dump")] - fn dump(&self); - - #[doc(alias = "gst_rtsp_address_pool_has_unicast_addresses")] - fn has_unicast_addresses(&self) -> bool; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTSPAddressPoolExt for O { +pub trait RTSPAddressPoolExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_rtsp_address_pool_acquire_address")] fn acquire_address( &self, flags: RTSPAddressFlags, @@ -78,6 +56,7 @@ impl> RTSPAddressPoolExt for O { } } + #[doc(alias = "gst_rtsp_address_pool_add_range")] fn add_range( &self, min_address: &str, @@ -101,18 +80,21 @@ impl> RTSPAddressPoolExt for O { } } + #[doc(alias = "gst_rtsp_address_pool_clear")] fn clear(&self) { unsafe { ffi::gst_rtsp_address_pool_clear(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_rtsp_address_pool_dump")] fn dump(&self) { unsafe { ffi::gst_rtsp_address_pool_dump(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_rtsp_address_pool_has_unicast_addresses")] fn has_unicast_addresses(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_address_pool_has_unicast_addresses( @@ -121,3 +103,5 @@ impl> RTSPAddressPoolExt for O { } } } + +impl> RTSPAddressPoolExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_auth.rs b/gstreamer-rtsp-server/src/auto/rtsp_auth.rs index 51764f30c..45d7870af 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_auth.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_auth.rs @@ -61,80 +61,13 @@ impl Default for RTSPAuth { unsafe impl Send for RTSPAuth {} unsafe impl Sync for RTSPAuth {} -pub trait RTSPAuthExt: 'static { - #[doc(alias = "gst_rtsp_auth_add_basic")] - fn add_basic(&self, basic: &str, token: &RTSPToken); - - #[doc(alias = "gst_rtsp_auth_add_digest")] - fn add_digest(&self, user: &str, pass: &str, token: &RTSPToken); - - #[doc(alias = "gst_rtsp_auth_get_default_token")] - #[doc(alias = "get_default_token")] - fn default_token(&self) -> Option; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_auth_get_realm")] - #[doc(alias = "get_realm")] - fn realm(&self) -> Option; - - #[doc(alias = "gst_rtsp_auth_get_supported_methods")] - #[doc(alias = "get_supported_methods")] - fn supported_methods(&self) -> gst_rtsp::RTSPAuthMethod; - - #[doc(alias = "gst_rtsp_auth_get_tls_authentication_mode")] - #[doc(alias = "get_tls_authentication_mode")] - fn tls_authentication_mode(&self) -> gio::TlsAuthenticationMode; - - #[doc(alias = "gst_rtsp_auth_get_tls_certificate")] - #[doc(alias = "get_tls_certificate")] - fn tls_certificate(&self) -> Option; - - #[doc(alias = "gst_rtsp_auth_get_tls_database")] - #[doc(alias = "get_tls_database")] - fn tls_database(&self) -> Option; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_auth_parse_htdigest")] - fn parse_htdigest(&self, path: impl AsRef, token: &RTSPToken) -> bool; - - #[doc(alias = "gst_rtsp_auth_remove_basic")] - fn remove_basic(&self, basic: &str); - - #[doc(alias = "gst_rtsp_auth_remove_digest")] - fn remove_digest(&self, user: &str); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_auth_set_realm")] - fn set_realm(&self, realm: Option<&str>); - - #[doc(alias = "gst_rtsp_auth_set_supported_methods")] - fn set_supported_methods(&self, methods: gst_rtsp::RTSPAuthMethod); - - #[doc(alias = "gst_rtsp_auth_set_tls_authentication_mode")] - fn set_tls_authentication_mode(&self, mode: gio::TlsAuthenticationMode); - - #[doc(alias = "gst_rtsp_auth_set_tls_certificate")] - fn set_tls_certificate(&self, cert: Option<&impl IsA>); - - #[doc(alias = "gst_rtsp_auth_set_tls_database")] - fn set_tls_database(&self, database: Option<&impl IsA>); - - #[doc(alias = "accept-certificate")] - fn connect_accept_certificate< - F: Fn(&Self, &gio::TlsConnection, &gio::TlsCertificate, gio::TlsCertificateFlags) -> bool - + Send - + Sync - + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTSPAuthExt for O { +pub trait RTSPAuthExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_rtsp_auth_add_basic")] fn add_basic(&self, basic: &str, token: &RTSPToken) { unsafe { ffi::gst_rtsp_auth_add_basic( @@ -145,6 +78,7 @@ impl> RTSPAuthExt for O { } } + #[doc(alias = "gst_rtsp_auth_add_digest")] fn add_digest(&self, user: &str, pass: &str, token: &RTSPToken) { unsafe { ffi::gst_rtsp_auth_add_digest( @@ -156,6 +90,8 @@ impl> RTSPAuthExt for O { } } + #[doc(alias = "gst_rtsp_auth_get_default_token")] + #[doc(alias = "get_default_token")] fn default_token(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_auth_get_default_token( @@ -166,10 +102,14 @@ impl> RTSPAuthExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_auth_get_realm")] + #[doc(alias = "get_realm")] fn realm(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_auth_get_realm(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_rtsp_auth_get_supported_methods")] + #[doc(alias = "get_supported_methods")] fn supported_methods(&self) -> gst_rtsp::RTSPAuthMethod { unsafe { from_glib(ffi::gst_rtsp_auth_get_supported_methods( @@ -178,6 +118,8 @@ impl> RTSPAuthExt for O { } } + #[doc(alias = "gst_rtsp_auth_get_tls_authentication_mode")] + #[doc(alias = "get_tls_authentication_mode")] fn tls_authentication_mode(&self) -> gio::TlsAuthenticationMode { unsafe { from_glib(ffi::gst_rtsp_auth_get_tls_authentication_mode( @@ -186,6 +128,8 @@ impl> RTSPAuthExt for O { } } + #[doc(alias = "gst_rtsp_auth_get_tls_certificate")] + #[doc(alias = "get_tls_certificate")] fn tls_certificate(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_auth_get_tls_certificate( @@ -194,6 +138,8 @@ impl> RTSPAuthExt for O { } } + #[doc(alias = "gst_rtsp_auth_get_tls_database")] + #[doc(alias = "get_tls_database")] fn tls_database(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_auth_get_tls_database( @@ -204,6 +150,7 @@ impl> RTSPAuthExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_auth_parse_htdigest")] fn parse_htdigest(&self, path: impl AsRef, token: &RTSPToken) -> bool { unsafe { from_glib(ffi::gst_rtsp_auth_parse_htdigest( @@ -214,12 +161,14 @@ impl> RTSPAuthExt for O { } } + #[doc(alias = "gst_rtsp_auth_remove_basic")] fn remove_basic(&self, basic: &str) { unsafe { ffi::gst_rtsp_auth_remove_basic(self.as_ref().to_glib_none().0, basic.to_glib_none().0); } } + #[doc(alias = "gst_rtsp_auth_remove_digest")] fn remove_digest(&self, user: &str) { unsafe { ffi::gst_rtsp_auth_remove_digest(self.as_ref().to_glib_none().0, user.to_glib_none().0); @@ -228,12 +177,14 @@ impl> RTSPAuthExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_auth_set_realm")] fn set_realm(&self, realm: Option<&str>) { unsafe { ffi::gst_rtsp_auth_set_realm(self.as_ref().to_glib_none().0, realm.to_glib_none().0); } } + #[doc(alias = "gst_rtsp_auth_set_supported_methods")] fn set_supported_methods(&self, methods: gst_rtsp::RTSPAuthMethod) { unsafe { ffi::gst_rtsp_auth_set_supported_methods( @@ -243,6 +194,7 @@ impl> RTSPAuthExt for O { } } + #[doc(alias = "gst_rtsp_auth_set_tls_authentication_mode")] fn set_tls_authentication_mode(&self, mode: gio::TlsAuthenticationMode) { unsafe { ffi::gst_rtsp_auth_set_tls_authentication_mode( @@ -252,6 +204,7 @@ impl> RTSPAuthExt for O { } } + #[doc(alias = "gst_rtsp_auth_set_tls_certificate")] fn set_tls_certificate(&self, cert: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_auth_set_tls_certificate( @@ -261,6 +214,7 @@ impl> RTSPAuthExt for O { } } + #[doc(alias = "gst_rtsp_auth_set_tls_database")] fn set_tls_database(&self, database: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_auth_set_tls_database( @@ -270,6 +224,7 @@ impl> RTSPAuthExt for O { } } + #[doc(alias = "accept-certificate")] fn connect_accept_certificate< F: Fn(&Self, &gio::TlsConnection, &gio::TlsCertificate, gio::TlsCertificateFlags) -> bool + Send @@ -314,3 +269,5 @@ impl> RTSPAuthExt for O { } } } + +impl> RTSPAuthExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_client.rs b/gstreamer-rtsp-server/src/auto/rtsp_client.rs index b274dcba7..c39153813 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_client.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_client.rs @@ -45,284 +45,21 @@ impl Default for RTSPClient { unsafe impl Send for RTSPClient {} unsafe impl Sync for RTSPClient {} -pub trait RTSPClientExt: 'static { - #[doc(alias = "gst_rtsp_client_close")] - fn close(&self); - - #[doc(alias = "gst_rtsp_client_get_auth")] - #[doc(alias = "get_auth")] - fn auth(&self) -> Option; - - //#[doc(alias = "gst_rtsp_client_get_connection")] - //#[doc(alias = "get_connection")] - //fn connection(&self) -> /*Ignored*/Option; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_client_get_content_length_limit")] - #[doc(alias = "get_content_length_limit")] - fn content_length_limit(&self) -> u32; - - #[doc(alias = "gst_rtsp_client_get_mount_points")] - #[doc(alias = "get_mount_points")] - fn mount_points(&self) -> Option; - - #[doc(alias = "gst_rtsp_client_get_session_pool")] - #[doc(alias = "get_session_pool")] - fn session_pool(&self) -> Option; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_client_get_stream_transport")] - #[doc(alias = "get_stream_transport")] - fn stream_transport(&self, channel: u8) -> Option; - - #[doc(alias = "gst_rtsp_client_get_thread_pool")] - #[doc(alias = "get_thread_pool")] - fn thread_pool(&self) -> Option; - - //#[doc(alias = "gst_rtsp_client_handle_message")] - //fn handle_message(&self, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult; - - //#[doc(alias = "gst_rtsp_client_send_message")] - //fn send_message(&self, session: Option<&impl IsA>, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult; - - #[doc(alias = "gst_rtsp_client_session_filter")] - fn session_filter( - &self, - func: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)>, - ) -> Vec; - - #[doc(alias = "gst_rtsp_client_set_auth")] - fn set_auth(&self, auth: Option<&impl IsA>); - - //#[doc(alias = "gst_rtsp_client_set_connection")] - //fn set_connection(&self, conn: /*Ignored*/gst_rtsp::RTSPConnection) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_client_set_content_length_limit")] - fn set_content_length_limit(&self, limit: u32); - - #[doc(alias = "gst_rtsp_client_set_mount_points")] - fn set_mount_points(&self, mounts: Option<&impl IsA>); - - //#[cfg(feature = "v1_16")] - //#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - //#[doc(alias = "gst_rtsp_client_set_send_messages_func")] - //fn set_send_messages_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, u32, bool) -> bool, user_data: /*Unimplemented*/Option); - - #[doc(alias = "gst_rtsp_client_set_session_pool")] - fn set_session_pool(&self, pool: Option<&impl IsA>); - - #[doc(alias = "gst_rtsp_client_set_thread_pool")] - fn set_thread_pool(&self, pool: Option<&impl IsA>); - - #[doc(alias = "drop-backlog")] - fn is_drop_backlog(&self) -> bool; - - #[doc(alias = "drop-backlog")] - fn set_drop_backlog(&self, drop_backlog: bool); - - #[doc(alias = "post-session-timeout")] - fn post_session_timeout(&self) -> i32; - - #[doc(alias = "post-session-timeout")] - fn set_post_session_timeout(&self, post_session_timeout: i32); - - #[doc(alias = "announce-request")] - fn connect_announce_request( - &self, - f: F, - ) -> SignalHandlerId; - - //#[doc(alias = "check-requirements")] - //fn connect_check_requirements(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "closed")] - fn connect_closed(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "describe-request")] - fn connect_describe_request( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "get-parameter-request")] - fn connect_get_parameter_request( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "handle-response")] - fn connect_handle_response( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "new-session")] - fn connect_new_session( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "options-request")] - fn connect_options_request( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "pause-request")] - fn connect_pause_request( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "play-request")] - fn connect_play_request( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "pre-announce-request")] - fn connect_pre_announce_request< - F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "pre-describe-request")] - fn connect_pre_describe_request< - F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "pre-get-parameter-request")] - fn connect_pre_get_parameter_request< - F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "pre-options-request")] - fn connect_pre_options_request< - F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "pre-pause-request")] - fn connect_pre_pause_request< - F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "pre-play-request")] - fn connect_pre_play_request< - F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "pre-record-request")] - fn connect_pre_record_request< - F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "pre-set-parameter-request")] - fn connect_pre_set_parameter_request< - F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "pre-setup-request")] - fn connect_pre_setup_request< - F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "pre-teardown-request")] - fn connect_pre_teardown_request< - F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "record-request")] - fn connect_record_request( - &self, - f: F, - ) -> SignalHandlerId; - - //#[doc(alias = "send-message")] - //fn connect_send_message(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "set-parameter-request")] - fn connect_set_parameter_request( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "setup-request")] - fn connect_setup_request( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "teardown-request")] - fn connect_teardown_request( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "drop-backlog")] - fn connect_drop_backlog_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "mount-points")] - fn connect_mount_points_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "post-session-timeout")] - fn connect_post_session_timeout_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "session-pool")] - fn connect_session_pool_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTSPClientExt for O { +pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_rtsp_client_close")] fn close(&self) { unsafe { ffi::gst_rtsp_client_close(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_rtsp_client_get_auth")] + #[doc(alias = "get_auth")] fn auth(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_client_get_auth( @@ -331,16 +68,22 @@ impl> RTSPClientExt for O { } } + //#[doc(alias = "gst_rtsp_client_get_connection")] + //#[doc(alias = "get_connection")] //fn connection(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi:gst_rtsp_client_get_connection() } //} #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_client_get_content_length_limit")] + #[doc(alias = "get_content_length_limit")] fn content_length_limit(&self) -> u32 { unsafe { ffi::gst_rtsp_client_get_content_length_limit(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_client_get_mount_points")] + #[doc(alias = "get_mount_points")] fn mount_points(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_client_get_mount_points( @@ -349,6 +92,8 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "gst_rtsp_client_get_session_pool")] + #[doc(alias = "get_session_pool")] fn session_pool(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_client_get_session_pool( @@ -359,6 +104,8 @@ impl> RTSPClientExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_client_get_stream_transport")] + #[doc(alias = "get_stream_transport")] fn stream_transport(&self, channel: u8) -> Option { unsafe { from_glib_none(ffi::gst_rtsp_client_get_stream_transport( @@ -368,6 +115,8 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "gst_rtsp_client_get_thread_pool")] + #[doc(alias = "get_thread_pool")] fn thread_pool(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_client_get_thread_pool( @@ -376,14 +125,17 @@ impl> RTSPClientExt for O { } } + //#[doc(alias = "gst_rtsp_client_handle_message")] //fn handle_message(&self, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult { // unsafe { TODO: call ffi:gst_rtsp_client_handle_message() } //} + //#[doc(alias = "gst_rtsp_client_send_message")] //fn send_message(&self, session: Option<&impl IsA>, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult { // unsafe { TODO: call ffi:gst_rtsp_client_send_message() } //} + #[doc(alias = "gst_rtsp_client_session_filter")] fn session_filter( &self, func: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)>, @@ -425,6 +177,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "gst_rtsp_client_set_auth")] fn set_auth(&self, auth: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_client_set_auth( @@ -434,18 +187,21 @@ impl> RTSPClientExt for O { } } + //#[doc(alias = "gst_rtsp_client_set_connection")] //fn set_connection(&self, conn: /*Ignored*/gst_rtsp::RTSPConnection) -> bool { // unsafe { TODO: call ffi:gst_rtsp_client_set_connection() } //} #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_client_set_content_length_limit")] fn set_content_length_limit(&self, limit: u32) { unsafe { ffi::gst_rtsp_client_set_content_length_limit(self.as_ref().to_glib_none().0, limit); } } + #[doc(alias = "gst_rtsp_client_set_mount_points")] fn set_mount_points(&self, mounts: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_client_set_mount_points( @@ -457,10 +213,12 @@ impl> RTSPClientExt for O { //#[cfg(feature = "v1_16")] //#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + //#[doc(alias = "gst_rtsp_client_set_send_messages_func")] //fn set_send_messages_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, u32, bool) -> bool, user_data: /*Unimplemented*/Option) { // unsafe { TODO: call ffi:gst_rtsp_client_set_send_messages_func() } //} + #[doc(alias = "gst_rtsp_client_set_session_pool")] fn set_session_pool(&self, pool: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_client_set_session_pool( @@ -470,6 +228,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "gst_rtsp_client_set_thread_pool")] fn set_thread_pool(&self, pool: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_client_set_thread_pool( @@ -479,22 +238,27 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "drop-backlog")] fn is_drop_backlog(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "drop-backlog") } + #[doc(alias = "drop-backlog")] fn set_drop_backlog(&self, drop_backlog: bool) { glib::ObjectExt::set_property(self.as_ref(), "drop-backlog", drop_backlog) } + #[doc(alias = "post-session-timeout")] fn post_session_timeout(&self) -> i32 { glib::ObjectExt::property(self.as_ref(), "post-session-timeout") } + #[doc(alias = "post-session-timeout")] fn set_post_session_timeout(&self, post_session_timeout: i32) { glib::ObjectExt::set_property(self.as_ref(), "post-session-timeout", post_session_timeout) } + #[doc(alias = "announce-request")] fn connect_announce_request( &self, f: F, @@ -526,10 +290,12 @@ impl> RTSPClientExt for O { } } + //#[doc(alias = "check-requirements")] //fn connect_check_requirements(&self, f: F) -> SignalHandlerId { // Empty ctype arr: *.CArray TypeId { ns_id: 0, id: 28 } //} + #[doc(alias = "closed")] fn connect_closed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn closed_trampoline< P: IsA, @@ -554,6 +320,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "describe-request")] fn connect_describe_request( &self, f: F, @@ -585,6 +352,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "get-parameter-request")] fn connect_get_parameter_request( &self, f: F, @@ -616,6 +384,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "handle-response")] fn connect_handle_response( &self, f: F, @@ -647,6 +416,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "new-session")] fn connect_new_session( &self, f: F, @@ -678,6 +448,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "options-request")] fn connect_options_request( &self, f: F, @@ -709,6 +480,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "pause-request")] fn connect_pause_request( &self, f: F, @@ -740,6 +512,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "play-request")] fn connect_play_request( &self, f: F, @@ -771,6 +544,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "pre-announce-request")] fn connect_pre_announce_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -805,6 +579,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "pre-describe-request")] fn connect_pre_describe_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -839,6 +614,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "pre-get-parameter-request")] fn connect_pre_get_parameter_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -873,6 +649,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "pre-options-request")] fn connect_pre_options_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -907,6 +684,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "pre-pause-request")] fn connect_pre_pause_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -941,6 +719,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "pre-play-request")] fn connect_pre_play_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -975,6 +754,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "pre-record-request")] fn connect_pre_record_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -1009,6 +789,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "pre-set-parameter-request")] fn connect_pre_set_parameter_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -1043,6 +824,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "pre-setup-request")] fn connect_pre_setup_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -1077,6 +859,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "pre-teardown-request")] fn connect_pre_teardown_request< F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static, >( @@ -1111,6 +894,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "record-request")] fn connect_record_request( &self, f: F, @@ -1142,10 +926,12 @@ impl> RTSPClientExt for O { } } + //#[doc(alias = "send-message")] //fn connect_send_message(&self, f: F) -> SignalHandlerId { // Ignored message: GstRtsp.RTSPMessage //} + #[doc(alias = "set-parameter-request")] fn connect_set_parameter_request( &self, f: F, @@ -1177,6 +963,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "setup-request")] fn connect_setup_request( &self, f: F, @@ -1208,6 +995,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "teardown-request")] fn connect_teardown_request( &self, f: F, @@ -1239,6 +1027,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "drop-backlog")] fn connect_drop_backlog_notify( &self, f: F, @@ -1267,6 +1056,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "mount-points")] fn connect_mount_points_notify( &self, f: F, @@ -1295,6 +1085,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "post-session-timeout")] fn connect_post_session_timeout_notify( &self, f: F, @@ -1323,6 +1114,7 @@ impl> RTSPClientExt for O { } } + #[doc(alias = "session-pool")] fn connect_session_pool_notify( &self, f: F, @@ -1351,3 +1143,5 @@ impl> RTSPClientExt for O { } } } + +impl> RTSPClientExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_media.rs index f8dbeaffc..f184bc5a3 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media.rs @@ -39,433 +39,15 @@ impl RTSPMedia { unsafe impl Send for RTSPMedia {} unsafe impl Sync for RTSPMedia {} -pub trait RTSPMediaExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { #[cfg(feature = "v1_24")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] #[doc(alias = "gst_rtsp_media_can_be_shared")] - fn can_be_shared(&self) -> bool; - - #[doc(alias = "gst_rtsp_media_collect_streams")] - fn collect_streams(&self); - - //#[doc(alias = "gst_rtsp_media_complete_pipeline")] - //fn complete_pipeline(&self, transports: /*Ignored*/&[gst_rtsp::RTSPTransport]) -> bool; - - #[doc(alias = "gst_rtsp_media_create_stream")] - fn create_stream( - &self, - payloader: &impl IsA, - pad: &impl IsA, - ) -> RTSPStream; - - #[doc(alias = "gst_rtsp_media_find_stream")] - fn find_stream(&self, control: &str) -> Option; - - #[doc(alias = "gst_rtsp_media_get_address_pool")] - #[doc(alias = "get_address_pool")] - fn address_pool(&self) -> Option; - - #[doc(alias = "gst_rtsp_media_get_base_time")] - #[doc(alias = "get_base_time")] - fn base_time(&self) -> Option; - - #[doc(alias = "gst_rtsp_media_get_buffer_size")] - #[doc(alias = "get_buffer_size")] - fn buffer_size(&self) -> u32; - - #[doc(alias = "gst_rtsp_media_get_clock")] - #[doc(alias = "get_clock")] - fn clock(&self) -> Option; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_media_get_do_retransmission")] - #[doc(alias = "get_do_retransmission")] - fn does_retransmission(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_media_get_dscp_qos")] - #[doc(alias = "get_dscp_qos")] - fn dscp_qos(&self) -> i32; - - #[doc(alias = "gst_rtsp_media_get_element")] - #[doc(alias = "get_element")] - fn element(&self) -> gst::Element; - - #[doc(alias = "gst_rtsp_media_get_latency")] - #[doc(alias = "get_latency")] - fn latency(&self) -> u32; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_media_get_max_mcast_ttl")] - #[doc(alias = "get_max_mcast_ttl")] - fn max_mcast_ttl(&self) -> u32; - - #[doc(alias = "gst_rtsp_media_get_multicast_iface")] - #[doc(alias = "get_multicast_iface")] - fn multicast_iface(&self) -> Option; - - //#[doc(alias = "gst_rtsp_media_get_permissions")] - //#[doc(alias = "get_permissions")] - //fn permissions(&self) -> /*Ignored*/Option; - - #[doc(alias = "gst_rtsp_media_get_profiles")] - #[doc(alias = "get_profiles")] - fn profiles(&self) -> gst_rtsp::RTSPProfile; - - #[doc(alias = "gst_rtsp_media_get_protocols")] - #[doc(alias = "get_protocols")] - fn protocols(&self) -> gst_rtsp::RTSPLowerTrans; - - #[doc(alias = "gst_rtsp_media_get_publish_clock_mode")] - #[doc(alias = "get_publish_clock_mode")] - fn publish_clock_mode(&self) -> RTSPPublishClockMode; - - #[doc(alias = "gst_rtsp_media_get_range_string")] - #[doc(alias = "get_range_string")] - fn range_string(&self, play: bool, unit: gst_rtsp::RTSPRangeUnit) -> Option; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_media_get_rate_control")] - #[doc(alias = "get_rate_control")] - fn is_rate_control(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_media_get_rates")] - #[doc(alias = "get_rates")] - fn rates(&self) -> Option<(f64, f64)>; - - #[doc(alias = "gst_rtsp_media_get_retransmission_time")] - #[doc(alias = "get_retransmission_time")] - fn retransmission_time(&self) -> Option; - - #[doc(alias = "gst_rtsp_media_get_status")] - #[doc(alias = "get_status")] - fn status(&self) -> RTSPMediaStatus; - - #[doc(alias = "gst_rtsp_media_get_stream")] - #[doc(alias = "get_stream")] - fn stream(&self, idx: u32) -> Option; - - #[doc(alias = "gst_rtsp_media_get_suspend_mode")] - #[doc(alias = "get_suspend_mode")] - fn suspend_mode(&self) -> RTSPSuspendMode; - - #[doc(alias = "gst_rtsp_media_get_time_provider")] - #[doc(alias = "get_time_provider")] - fn time_provider(&self, address: Option<&str>, port: u16) -> Option; - - #[doc(alias = "gst_rtsp_media_get_transport_mode")] - #[doc(alias = "get_transport_mode")] - fn transport_mode(&self) -> RTSPTransportMode; - - //#[doc(alias = "gst_rtsp_media_handle_sdp")] - //fn handle_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_media_has_completed_sender")] - fn has_completed_sender(&self) -> bool; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_media_is_bind_mcast_address")] - fn is_bind_mcast_address(&self) -> bool; - - #[doc(alias = "gst_rtsp_media_is_eos_shutdown")] - fn is_eos_shutdown(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_media_is_receive_only")] - fn is_receive_only(&self) -> bool; - - #[doc(alias = "gst_rtsp_media_is_reusable")] - fn is_reusable(&self) -> bool; - - #[doc(alias = "gst_rtsp_media_is_shared")] - fn is_shared(&self) -> bool; - - #[doc(alias = "gst_rtsp_media_is_stop_on_disconnect")] - fn is_stop_on_disconnect(&self) -> bool; - - #[doc(alias = "gst_rtsp_media_is_time_provider")] - fn is_time_provider(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_media_lock")] - fn lock(&self); - - #[doc(alias = "gst_rtsp_media_n_streams")] - fn n_streams(&self) -> u32; - - #[doc(alias = "gst_rtsp_media_prepare")] - fn prepare(&self, thread: Option) -> Result<(), glib::error::BoolError>; - - //#[doc(alias = "gst_rtsp_media_seek")] - //fn seek(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange) -> bool; - - //#[cfg(feature = "v1_18")] - //#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - //#[doc(alias = "gst_rtsp_media_seek_full")] - //fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool; - - //#[cfg(feature = "v1_18")] - //#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - //#[doc(alias = "gst_rtsp_media_seek_trickmode")] - //fn seek_trickmode(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags, rate: f64, trickmode_interval: impl Into>) -> bool; - - //#[doc(alias = "gst_rtsp_media_seekable")] - //fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff; - - #[doc(alias = "gst_rtsp_media_set_address_pool")] - fn set_address_pool(&self, pool: Option<&impl IsA>); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_media_set_bind_mcast_address")] - fn set_bind_mcast_address(&self, bind_mcast_addr: bool); - - #[doc(alias = "gst_rtsp_media_set_buffer_size")] - fn set_buffer_size(&self, size: u32); - - #[doc(alias = "gst_rtsp_media_set_clock")] - fn set_clock(&self, clock: Option<&impl IsA>); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_media_set_do_retransmission")] - fn set_do_retransmission(&self, do_retransmission: bool); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_media_set_dscp_qos")] - fn set_dscp_qos(&self, dscp_qos: i32); - - #[doc(alias = "gst_rtsp_media_set_eos_shutdown")] - fn set_eos_shutdown(&self, eos_shutdown: bool); - - #[doc(alias = "gst_rtsp_media_set_latency")] - fn set_latency(&self, latency: u32); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_media_set_max_mcast_ttl")] - fn set_max_mcast_ttl(&self, ttl: u32) -> bool; - - #[doc(alias = "gst_rtsp_media_set_multicast_iface")] - fn set_multicast_iface(&self, multicast_iface: Option<&str>); - - //#[doc(alias = "gst_rtsp_media_set_permissions")] - //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>); - - #[doc(alias = "gst_rtsp_media_set_pipeline_state")] - fn set_pipeline_state(&self, state: gst::State); - - #[doc(alias = "gst_rtsp_media_set_profiles")] - fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile); - - #[doc(alias = "gst_rtsp_media_set_protocols")] - fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans); - - #[doc(alias = "gst_rtsp_media_set_publish_clock_mode")] - fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_media_set_rate_control")] - fn set_rate_control(&self, enabled: bool); - - #[doc(alias = "gst_rtsp_media_set_retransmission_time")] - fn set_retransmission_time(&self, time: impl Into>); - - #[doc(alias = "gst_rtsp_media_set_reusable")] - fn set_reusable(&self, reusable: bool); - - #[doc(alias = "gst_rtsp_media_set_shared")] - fn set_shared(&self, shared: bool); - - #[doc(alias = "gst_rtsp_media_set_state")] - fn set_state(&self, state: gst::State, transports: &[RTSPStreamTransport]) -> bool; - - #[doc(alias = "gst_rtsp_media_set_stop_on_disconnect")] - fn set_stop_on_disconnect(&self, stop_on_disconnect: bool); - - #[doc(alias = "gst_rtsp_media_set_suspend_mode")] - fn set_suspend_mode(&self, mode: RTSPSuspendMode); - - #[doc(alias = "gst_rtsp_media_set_transport_mode")] - fn set_transport_mode(&self, mode: RTSPTransportMode); - - //#[doc(alias = "gst_rtsp_media_setup_sdp")] - //fn setup_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage, info: /*Ignored*/&mut SDPInfo) -> bool; - - #[doc(alias = "gst_rtsp_media_suspend")] - fn suspend(&self) -> Result<(), glib::error::BoolError>; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_media_unlock")] - fn unlock(&self); - - #[doc(alias = "gst_rtsp_media_unprepare")] - fn unprepare(&self) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_rtsp_media_unsuspend")] - fn unsuspend(&self) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_rtsp_media_use_time_provider")] - fn use_time_provider(&self, time_provider: bool); - - #[doc(alias = "bind-mcast-address")] - fn get_property_bind_mcast_address(&self) -> bool; - - #[doc(alias = "bind-mcast-address")] - fn set_property_bind_mcast_address(&self, bind_mcast_address: bool); - - #[doc(alias = "dscp-qos")] - fn get_property_dscp_qos(&self) -> i32; - - #[doc(alias = "dscp-qos")] - fn set_property_dscp_qos(&self, dscp_qos: i32); - - #[doc(alias = "max-mcast-ttl")] - fn get_property_max_mcast_ttl(&self) -> u32; - - #[doc(alias = "max-mcast-ttl")] - fn set_property_max_mcast_ttl(&self, max_mcast_ttl: u32); - - #[doc(alias = "time-provider")] - fn set_time_provider(&self, time_provider: bool); - - #[cfg(feature = "v1_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] - #[doc(alias = "handle-message")] - fn connect_handle_message bool + Send + Sync + 'static>( - &self, - detail: Option<&str>, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "new-state")] - fn connect_new_state(&self, f: F) - -> SignalHandlerId; - - #[doc(alias = "new-stream")] - fn connect_new_stream( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "prepared")] - fn connect_prepared(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "removed-stream")] - fn connect_removed_stream( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "target-state")] - fn connect_target_state( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "unprepared")] - fn connect_unprepared(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "bind-mcast-address")] - fn connect_bind_mcast_address_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "buffer-size")] - fn connect_buffer_size_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "clock")] - fn connect_clock_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "dscp-qos")] - fn connect_dscp_qos_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "eos-shutdown")] - fn connect_eos_shutdown_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "latency")] - fn connect_latency_notify(&self, f: F) - -> SignalHandlerId; - - #[doc(alias = "max-mcast-ttl")] - fn connect_max_mcast_ttl_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "profiles")] - fn connect_profiles_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "protocols")] - fn connect_protocols_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "reusable")] - fn connect_reusable_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "shared")] - fn connect_shared_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "stop-on-disconnect")] - fn connect_stop_on_disconnect_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "suspend-mode")] - fn connect_suspend_mode_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "time-provider")] - fn connect_time_provider_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "transport-mode")] - fn connect_transport_mode_notify( - &self, - f: F, - ) -> SignalHandlerId; -} - -impl> RTSPMediaExt for O { - #[cfg(feature = "v1_24")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] fn can_be_shared(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_can_be_shared( @@ -474,16 +56,19 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_collect_streams")] fn collect_streams(&self) { unsafe { ffi::gst_rtsp_media_collect_streams(self.as_ref().to_glib_none().0); } } + //#[doc(alias = "gst_rtsp_media_complete_pipeline")] //fn complete_pipeline(&self, transports: /*Ignored*/&[gst_rtsp::RTSPTransport]) -> bool { // unsafe { TODO: call ffi:gst_rtsp_media_complete_pipeline() } //} + #[doc(alias = "gst_rtsp_media_create_stream")] fn create_stream( &self, payloader: &impl IsA, @@ -498,6 +83,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_find_stream")] fn find_stream(&self, control: &str) -> Option { unsafe { from_glib_none(ffi::gst_rtsp_media_find_stream( @@ -507,6 +93,8 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_get_address_pool")] + #[doc(alias = "get_address_pool")] fn address_pool(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_media_get_address_pool( @@ -515,6 +103,8 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_get_base_time")] + #[doc(alias = "get_base_time")] fn base_time(&self) -> Option { unsafe { from_glib(ffi::gst_rtsp_media_get_base_time( @@ -523,10 +113,14 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_get_buffer_size")] + #[doc(alias = "get_buffer_size")] fn buffer_size(&self) -> u32 { unsafe { ffi::gst_rtsp_media_get_buffer_size(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_media_get_clock")] + #[doc(alias = "get_clock")] fn clock(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_media_get_clock( @@ -537,6 +131,8 @@ impl> RTSPMediaExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_media_get_do_retransmission")] + #[doc(alias = "get_do_retransmission")] fn does_retransmission(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_get_do_retransmission( @@ -547,10 +143,14 @@ impl> RTSPMediaExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_media_get_dscp_qos")] + #[doc(alias = "get_dscp_qos")] fn dscp_qos(&self) -> i32 { unsafe { ffi::gst_rtsp_media_get_dscp_qos(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_media_get_element")] + #[doc(alias = "get_element")] fn element(&self) -> gst::Element { unsafe { from_glib_full(ffi::gst_rtsp_media_get_element( @@ -559,16 +159,22 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_get_latency")] + #[doc(alias = "get_latency")] fn latency(&self) -> u32 { unsafe { ffi::gst_rtsp_media_get_latency(self.as_ref().to_glib_none().0) } } #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_media_get_max_mcast_ttl")] + #[doc(alias = "get_max_mcast_ttl")] fn max_mcast_ttl(&self) -> u32 { unsafe { ffi::gst_rtsp_media_get_max_mcast_ttl(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_media_get_multicast_iface")] + #[doc(alias = "get_multicast_iface")] fn multicast_iface(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_media_get_multicast_iface( @@ -577,10 +183,14 @@ impl> RTSPMediaExt for O { } } + //#[doc(alias = "gst_rtsp_media_get_permissions")] + //#[doc(alias = "get_permissions")] //fn permissions(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi:gst_rtsp_media_get_permissions() } //} + #[doc(alias = "gst_rtsp_media_get_profiles")] + #[doc(alias = "get_profiles")] fn profiles(&self) -> gst_rtsp::RTSPProfile { unsafe { from_glib(ffi::gst_rtsp_media_get_profiles( @@ -589,6 +199,8 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_get_protocols")] + #[doc(alias = "get_protocols")] fn protocols(&self) -> gst_rtsp::RTSPLowerTrans { unsafe { from_glib(ffi::gst_rtsp_media_get_protocols( @@ -597,6 +209,8 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_get_publish_clock_mode")] + #[doc(alias = "get_publish_clock_mode")] fn publish_clock_mode(&self) -> RTSPPublishClockMode { unsafe { from_glib(ffi::gst_rtsp_media_get_publish_clock_mode( @@ -605,6 +219,8 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_get_range_string")] + #[doc(alias = "get_range_string")] fn range_string(&self, play: bool, unit: gst_rtsp::RTSPRangeUnit) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_media_get_range_string( @@ -617,6 +233,8 @@ impl> RTSPMediaExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_media_get_rate_control")] + #[doc(alias = "get_rate_control")] fn is_rate_control(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_get_rate_control( @@ -627,6 +245,8 @@ impl> RTSPMediaExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_media_get_rates")] + #[doc(alias = "get_rates")] fn rates(&self) -> Option<(f64, f64)> { unsafe { let mut rate = mem::MaybeUninit::uninit(); @@ -644,6 +264,8 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_get_retransmission_time")] + #[doc(alias = "get_retransmission_time")] fn retransmission_time(&self) -> Option { unsafe { from_glib(ffi::gst_rtsp_media_get_retransmission_time( @@ -652,6 +274,8 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_get_status")] + #[doc(alias = "get_status")] fn status(&self) -> RTSPMediaStatus { unsafe { from_glib(ffi::gst_rtsp_media_get_status( @@ -660,6 +284,8 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_get_stream")] + #[doc(alias = "get_stream")] fn stream(&self, idx: u32) -> Option { unsafe { from_glib_none(ffi::gst_rtsp_media_get_stream( @@ -669,6 +295,8 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_get_suspend_mode")] + #[doc(alias = "get_suspend_mode")] fn suspend_mode(&self) -> RTSPSuspendMode { unsafe { from_glib(ffi::gst_rtsp_media_get_suspend_mode( @@ -677,6 +305,8 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_get_time_provider")] + #[doc(alias = "get_time_provider")] fn time_provider(&self, address: Option<&str>, port: u16) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_media_get_time_provider( @@ -687,6 +317,8 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_get_transport_mode")] + #[doc(alias = "get_transport_mode")] fn transport_mode(&self) -> RTSPTransportMode { unsafe { from_glib(ffi::gst_rtsp_media_get_transport_mode( @@ -695,12 +327,14 @@ impl> RTSPMediaExt for O { } } + //#[doc(alias = "gst_rtsp_media_handle_sdp")] //fn handle_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage) -> bool { // unsafe { TODO: call ffi:gst_rtsp_media_handle_sdp() } //} #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_media_has_completed_sender")] fn has_completed_sender(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_has_completed_sender( @@ -711,6 +345,7 @@ impl> RTSPMediaExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_media_is_bind_mcast_address")] fn is_bind_mcast_address(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_is_bind_mcast_address( @@ -719,6 +354,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_is_eos_shutdown")] fn is_eos_shutdown(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_is_eos_shutdown( @@ -729,6 +365,7 @@ impl> RTSPMediaExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_media_is_receive_only")] fn is_receive_only(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_is_receive_only( @@ -737,6 +374,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_is_reusable")] fn is_reusable(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_is_reusable( @@ -745,6 +383,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_is_shared")] fn is_shared(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_is_shared( @@ -753,6 +392,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_is_stop_on_disconnect")] fn is_stop_on_disconnect(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_is_stop_on_disconnect( @@ -761,6 +401,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_is_time_provider")] fn is_time_provider(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_is_time_provider( @@ -771,16 +412,19 @@ impl> RTSPMediaExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_media_lock")] fn lock(&self) { unsafe { ffi::gst_rtsp_media_lock(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_rtsp_media_n_streams")] fn n_streams(&self) -> u32 { unsafe { ffi::gst_rtsp_media_n_streams(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_media_prepare")] fn prepare(&self, thread: Option) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -790,26 +434,31 @@ impl> RTSPMediaExt for O { } } + //#[doc(alias = "gst_rtsp_media_seek")] //fn seek(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange) -> bool { // unsafe { TODO: call ffi:gst_rtsp_media_seek() } //} //#[cfg(feature = "v1_18")] //#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + //#[doc(alias = "gst_rtsp_media_seek_full")] //fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool { // unsafe { TODO: call ffi:gst_rtsp_media_seek_full() } //} //#[cfg(feature = "v1_18")] //#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + //#[doc(alias = "gst_rtsp_media_seek_trickmode")] //fn seek_trickmode(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags, rate: f64, trickmode_interval: impl Into>) -> bool { // unsafe { TODO: call ffi:gst_rtsp_media_seek_trickmode() } //} + //#[doc(alias = "gst_rtsp_media_seekable")] //fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff { // unsafe { TODO: call ffi:gst_rtsp_media_seekable() } //} + #[doc(alias = "gst_rtsp_media_set_address_pool")] fn set_address_pool(&self, pool: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_media_set_address_pool( @@ -821,6 +470,7 @@ impl> RTSPMediaExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_media_set_bind_mcast_address")] fn set_bind_mcast_address(&self, bind_mcast_addr: bool) { unsafe { ffi::gst_rtsp_media_set_bind_mcast_address( @@ -830,12 +480,14 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_set_buffer_size")] fn set_buffer_size(&self, size: u32) { unsafe { ffi::gst_rtsp_media_set_buffer_size(self.as_ref().to_glib_none().0, size); } } + #[doc(alias = "gst_rtsp_media_set_clock")] fn set_clock(&self, clock: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_media_set_clock( @@ -847,6 +499,7 @@ impl> RTSPMediaExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_media_set_do_retransmission")] fn set_do_retransmission(&self, do_retransmission: bool) { unsafe { ffi::gst_rtsp_media_set_do_retransmission( @@ -858,12 +511,14 @@ impl> RTSPMediaExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_media_set_dscp_qos")] fn set_dscp_qos(&self, dscp_qos: i32) { unsafe { ffi::gst_rtsp_media_set_dscp_qos(self.as_ref().to_glib_none().0, dscp_qos); } } + #[doc(alias = "gst_rtsp_media_set_eos_shutdown")] fn set_eos_shutdown(&self, eos_shutdown: bool) { unsafe { ffi::gst_rtsp_media_set_eos_shutdown( @@ -873,6 +528,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_set_latency")] fn set_latency(&self, latency: u32) { unsafe { ffi::gst_rtsp_media_set_latency(self.as_ref().to_glib_none().0, latency); @@ -881,6 +537,7 @@ impl> RTSPMediaExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_media_set_max_mcast_ttl")] fn set_max_mcast_ttl(&self, ttl: u32) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_set_max_mcast_ttl( @@ -890,6 +547,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_set_multicast_iface")] fn set_multicast_iface(&self, multicast_iface: Option<&str>) { unsafe { ffi::gst_rtsp_media_set_multicast_iface( @@ -899,10 +557,12 @@ impl> RTSPMediaExt for O { } } + //#[doc(alias = "gst_rtsp_media_set_permissions")] //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>) { // unsafe { TODO: call ffi:gst_rtsp_media_set_permissions() } //} + #[doc(alias = "gst_rtsp_media_set_pipeline_state")] fn set_pipeline_state(&self, state: gst::State) { unsafe { ffi::gst_rtsp_media_set_pipeline_state( @@ -912,12 +572,14 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_set_profiles")] fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile) { unsafe { ffi::gst_rtsp_media_set_profiles(self.as_ref().to_glib_none().0, profiles.into_glib()); } } + #[doc(alias = "gst_rtsp_media_set_protocols")] fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans) { unsafe { ffi::gst_rtsp_media_set_protocols( @@ -927,6 +589,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_set_publish_clock_mode")] fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) { unsafe { ffi::gst_rtsp_media_set_publish_clock_mode( @@ -938,6 +601,7 @@ impl> RTSPMediaExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_media_set_rate_control")] fn set_rate_control(&self, enabled: bool) { unsafe { ffi::gst_rtsp_media_set_rate_control( @@ -947,6 +611,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_set_retransmission_time")] fn set_retransmission_time(&self, time: impl Into>) { unsafe { ffi::gst_rtsp_media_set_retransmission_time( @@ -956,18 +621,21 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_set_reusable")] fn set_reusable(&self, reusable: bool) { unsafe { ffi::gst_rtsp_media_set_reusable(self.as_ref().to_glib_none().0, reusable.into_glib()); } } + #[doc(alias = "gst_rtsp_media_set_shared")] fn set_shared(&self, shared: bool) { unsafe { ffi::gst_rtsp_media_set_shared(self.as_ref().to_glib_none().0, shared.into_glib()); } } + #[doc(alias = "gst_rtsp_media_set_state")] fn set_state(&self, state: gst::State, transports: &[RTSPStreamTransport]) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_set_state( @@ -978,6 +646,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_set_stop_on_disconnect")] fn set_stop_on_disconnect(&self, stop_on_disconnect: bool) { unsafe { ffi::gst_rtsp_media_set_stop_on_disconnect( @@ -987,12 +656,14 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_set_suspend_mode")] fn set_suspend_mode(&self, mode: RTSPSuspendMode) { unsafe { ffi::gst_rtsp_media_set_suspend_mode(self.as_ref().to_glib_none().0, mode.into_glib()); } } + #[doc(alias = "gst_rtsp_media_set_transport_mode")] fn set_transport_mode(&self, mode: RTSPTransportMode) { unsafe { ffi::gst_rtsp_media_set_transport_mode( @@ -1002,10 +673,12 @@ impl> RTSPMediaExt for O { } } + //#[doc(alias = "gst_rtsp_media_setup_sdp")] //fn setup_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage, info: /*Ignored*/&mut SDPInfo) -> bool { // unsafe { TODO: call ffi:gst_rtsp_media_setup_sdp() } //} + #[doc(alias = "gst_rtsp_media_suspend")] fn suspend(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -1017,12 +690,14 @@ impl> RTSPMediaExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_media_unlock")] fn unlock(&self) { unsafe { ffi::gst_rtsp_media_unlock(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_rtsp_media_unprepare")] fn unprepare(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -1032,6 +707,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_unsuspend")] fn unsuspend(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -1041,6 +717,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "gst_rtsp_media_use_time_provider")] fn use_time_provider(&self, time_provider: bool) { unsafe { ffi::gst_rtsp_media_use_time_provider( @@ -1050,36 +727,44 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "bind-mcast-address")] fn get_property_bind_mcast_address(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "bind-mcast-address") } + #[doc(alias = "bind-mcast-address")] fn set_property_bind_mcast_address(&self, bind_mcast_address: bool) { glib::ObjectExt::set_property(self.as_ref(), "bind-mcast-address", bind_mcast_address) } + #[doc(alias = "dscp-qos")] fn get_property_dscp_qos(&self) -> i32 { glib::ObjectExt::property(self.as_ref(), "dscp-qos") } + #[doc(alias = "dscp-qos")] fn set_property_dscp_qos(&self, dscp_qos: i32) { glib::ObjectExt::set_property(self.as_ref(), "dscp-qos", dscp_qos) } + #[doc(alias = "max-mcast-ttl")] fn get_property_max_mcast_ttl(&self) -> u32 { glib::ObjectExt::property(self.as_ref(), "max-mcast-ttl") } + #[doc(alias = "max-mcast-ttl")] fn set_property_max_mcast_ttl(&self, max_mcast_ttl: u32) { glib::ObjectExt::set_property(self.as_ref(), "max-mcast-ttl", max_mcast_ttl) } + #[doc(alias = "time-provider")] fn set_time_provider(&self, time_provider: bool) { glib::ObjectExt::set_property(self.as_ref(), "time-provider", time_provider) } #[cfg(feature = "v1_22")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] + #[doc(alias = "handle-message")] fn connect_handle_message bool + Send + Sync + 'static>( &self, detail: Option<&str>, @@ -1117,6 +802,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "new-state")] fn connect_new_state( &self, f: F, @@ -1145,6 +831,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "new-stream")] fn connect_new_stream( &self, f: F, @@ -1176,6 +863,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "prepared")] fn connect_prepared(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn prepared_trampoline< P: IsA, @@ -1200,6 +888,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "removed-stream")] fn connect_removed_stream( &self, f: F, @@ -1231,6 +920,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "target-state")] fn connect_target_state( &self, f: F, @@ -1259,6 +949,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "unprepared")] fn connect_unprepared(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn unprepared_trampoline< P: IsA, @@ -1283,6 +974,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "bind-mcast-address")] fn connect_bind_mcast_address_notify( &self, f: F, @@ -1311,6 +1003,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "buffer-size")] fn connect_buffer_size_notify( &self, f: F, @@ -1339,6 +1032,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "clock")] fn connect_clock_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_clock_trampoline< P: IsA, @@ -1364,6 +1058,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "dscp-qos")] fn connect_dscp_qos_notify( &self, f: F, @@ -1392,6 +1087,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "eos-shutdown")] fn connect_eos_shutdown_notify( &self, f: F, @@ -1420,6 +1116,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "latency")] fn connect_latency_notify( &self, f: F, @@ -1448,6 +1145,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "max-mcast-ttl")] fn connect_max_mcast_ttl_notify( &self, f: F, @@ -1476,6 +1174,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "profiles")] fn connect_profiles_notify( &self, f: F, @@ -1504,6 +1203,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "protocols")] fn connect_protocols_notify( &self, f: F, @@ -1532,6 +1232,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "reusable")] fn connect_reusable_notify( &self, f: F, @@ -1560,6 +1261,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "shared")] fn connect_shared_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_shared_trampoline< P: IsA, @@ -1585,6 +1287,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "stop-on-disconnect")] fn connect_stop_on_disconnect_notify( &self, f: F, @@ -1613,6 +1316,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "suspend-mode")] fn connect_suspend_mode_notify( &self, f: F, @@ -1641,6 +1345,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "time-provider")] fn connect_time_provider_notify( &self, f: F, @@ -1669,6 +1374,7 @@ impl> RTSPMediaExt for O { } } + #[doc(alias = "transport-mode")] fn connect_transport_mode_notify( &self, f: F, @@ -1697,3 +1403,5 @@ impl> RTSPMediaExt for O { } } } + +impl> RTSPMediaExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs b/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs index 148a72b99..8129e73db 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs @@ -39,305 +39,18 @@ impl Default for RTSPMediaFactory { unsafe impl Send for RTSPMediaFactory {} unsafe impl Sync for RTSPMediaFactory {} -pub trait RTSPMediaFactoryExt: 'static { - //#[doc(alias = "gst_rtsp_media_factory_add_role")] - //fn add_role(&self, role: &str, fieldname: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs); - - #[doc(alias = "gst_rtsp_media_factory_construct")] - fn construct(&self, url: &gst_rtsp::RTSPUrl) -> Result; - - #[doc(alias = "gst_rtsp_media_factory_create_element")] - fn create_element(&self, url: &gst_rtsp::RTSPUrl) -> Result; - - #[doc(alias = "gst_rtsp_media_factory_get_address_pool")] - #[doc(alias = "get_address_pool")] - fn address_pool(&self) -> Option; - - #[doc(alias = "gst_rtsp_media_factory_get_buffer_size")] - #[doc(alias = "get_buffer_size")] - fn buffer_size(&self) -> u32; - - #[doc(alias = "gst_rtsp_media_factory_get_clock")] - #[doc(alias = "get_clock")] - fn clock(&self) -> Option; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_media_factory_get_do_retransmission")] - #[doc(alias = "get_do_retransmission")] - fn does_retransmission(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_media_factory_get_dscp_qos")] - #[doc(alias = "get_dscp_qos")] - fn dscp_qos(&self) -> i32; - - #[doc(alias = "gst_rtsp_media_factory_get_latency")] - #[doc(alias = "get_latency")] - fn latency(&self) -> u32; - - #[doc(alias = "gst_rtsp_media_factory_get_launch")] - #[doc(alias = "get_launch")] - fn launch(&self) -> Option; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_media_factory_get_max_mcast_ttl")] - #[doc(alias = "get_max_mcast_ttl")] - fn max_mcast_ttl(&self) -> u32; - - #[doc(alias = "gst_rtsp_media_factory_get_media_gtype")] - #[doc(alias = "get_media_gtype")] - fn media_gtype(&self) -> glib::types::Type; - - #[doc(alias = "gst_rtsp_media_factory_get_multicast_iface")] - #[doc(alias = "get_multicast_iface")] - fn multicast_iface(&self) -> Option; - - //#[doc(alias = "gst_rtsp_media_factory_get_permissions")] - //#[doc(alias = "get_permissions")] - //fn permissions(&self) -> /*Ignored*/Option; - - #[doc(alias = "gst_rtsp_media_factory_get_profiles")] - #[doc(alias = "get_profiles")] - fn profiles(&self) -> gst_rtsp::RTSPProfile; - - #[doc(alias = "gst_rtsp_media_factory_get_protocols")] - #[doc(alias = "get_protocols")] - fn protocols(&self) -> gst_rtsp::RTSPLowerTrans; - - #[doc(alias = "gst_rtsp_media_factory_get_publish_clock_mode")] - #[doc(alias = "get_publish_clock_mode")] - fn publish_clock_mode(&self) -> RTSPPublishClockMode; - - #[doc(alias = "gst_rtsp_media_factory_get_retransmission_time")] - #[doc(alias = "get_retransmission_time")] - fn retransmission_time(&self) -> Option; - - #[doc(alias = "gst_rtsp_media_factory_get_suspend_mode")] - #[doc(alias = "get_suspend_mode")] - fn suspend_mode(&self) -> RTSPSuspendMode; - - #[doc(alias = "gst_rtsp_media_factory_get_transport_mode")] - #[doc(alias = "get_transport_mode")] - fn transport_mode(&self) -> RTSPTransportMode; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_media_factory_is_bind_mcast_address")] - fn is_bind_mcast_address(&self) -> bool; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_rtsp_media_factory_is_enable_rtcp")] - fn is_enable_rtcp(&self) -> bool; - - #[doc(alias = "gst_rtsp_media_factory_is_eos_shutdown")] - fn is_eos_shutdown(&self) -> bool; - - #[doc(alias = "gst_rtsp_media_factory_is_shared")] - fn is_shared(&self) -> bool; - - #[doc(alias = "gst_rtsp_media_factory_is_stop_on_disonnect")] - fn is_stop_on_disonnect(&self) -> bool; - - #[doc(alias = "gst_rtsp_media_factory_set_address_pool")] - fn set_address_pool(&self, pool: Option<&impl IsA>); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_media_factory_set_bind_mcast_address")] - fn set_bind_mcast_address(&self, bind_mcast_addr: bool); - - #[doc(alias = "gst_rtsp_media_factory_set_buffer_size")] - fn set_buffer_size(&self, size: u32); - - #[doc(alias = "gst_rtsp_media_factory_set_clock")] - fn set_clock(&self, clock: Option<&impl IsA>); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_media_factory_set_do_retransmission")] - fn set_do_retransmission(&self, do_retransmission: bool); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_media_factory_set_dscp_qos")] - fn set_dscp_qos(&self, dscp_qos: i32); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_rtsp_media_factory_set_enable_rtcp")] - fn set_enable_rtcp(&self, enable: bool); - - #[doc(alias = "gst_rtsp_media_factory_set_eos_shutdown")] - fn set_eos_shutdown(&self, eos_shutdown: bool); - - #[doc(alias = "gst_rtsp_media_factory_set_latency")] - fn set_latency(&self, latency: u32); - - #[doc(alias = "gst_rtsp_media_factory_set_launch")] - fn set_launch(&self, launch: &str); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_media_factory_set_max_mcast_ttl")] - fn set_max_mcast_ttl(&self, ttl: u32) -> bool; - - #[doc(alias = "gst_rtsp_media_factory_set_media_gtype")] - fn set_media_gtype(&self, media_gtype: glib::types::Type); - - #[doc(alias = "gst_rtsp_media_factory_set_multicast_iface")] - fn set_multicast_iface(&self, multicast_iface: Option<&str>); - - //#[doc(alias = "gst_rtsp_media_factory_set_permissions")] - //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>); - - #[doc(alias = "gst_rtsp_media_factory_set_profiles")] - fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile); - - #[doc(alias = "gst_rtsp_media_factory_set_protocols")] - fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans); - - #[doc(alias = "gst_rtsp_media_factory_set_publish_clock_mode")] - fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode); - - #[doc(alias = "gst_rtsp_media_factory_set_retransmission_time")] - fn set_retransmission_time(&self, time: impl Into>); - - #[doc(alias = "gst_rtsp_media_factory_set_shared")] - fn set_shared(&self, shared: bool); - - #[doc(alias = "gst_rtsp_media_factory_set_stop_on_disconnect")] - fn set_stop_on_disconnect(&self, stop_on_disconnect: bool); - - #[doc(alias = "gst_rtsp_media_factory_set_suspend_mode")] - fn set_suspend_mode(&self, mode: RTSPSuspendMode); - - #[doc(alias = "gst_rtsp_media_factory_set_transport_mode")] - fn set_transport_mode(&self, mode: RTSPTransportMode); - - #[doc(alias = "bind-mcast-address")] - fn get_property_bind_mcast_address(&self) -> bool; - - #[doc(alias = "bind-mcast-address")] - fn set_property_bind_mcast_address(&self, bind_mcast_address: bool); - - #[doc(alias = "dscp-qos")] - fn get_property_dscp_qos(&self) -> i32; - - #[doc(alias = "dscp-qos")] - fn set_property_dscp_qos(&self, dscp_qos: i32); - - #[doc(alias = "max-mcast-ttl")] - fn get_property_max_mcast_ttl(&self) -> u32; - - #[doc(alias = "max-mcast-ttl")] - fn set_property_max_mcast_ttl(&self, max_mcast_ttl: u32); - - #[doc(alias = "stop-on-disconnect")] - fn is_stop_on_disconnect(&self) -> bool; - - #[doc(alias = "media-configure")] - fn connect_media_configure( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "media-constructed")] - fn connect_media_constructed( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "bind-mcast-address")] - fn connect_bind_mcast_address_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "buffer-size")] - fn connect_buffer_size_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "clock")] - fn connect_clock_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "dscp-qos")] - fn connect_dscp_qos_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "enable-rtcp")] - fn connect_enable_rtcp_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "eos-shutdown")] - fn connect_eos_shutdown_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "latency")] - fn connect_latency_notify(&self, f: F) - -> SignalHandlerId; - - #[doc(alias = "launch")] - fn connect_launch_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "max-mcast-ttl")] - fn connect_max_mcast_ttl_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "profiles")] - fn connect_profiles_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "protocols")] - fn connect_protocols_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "shared")] - fn connect_shared_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "stop-on-disconnect")] - fn connect_stop_on_disconnect_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "suspend-mode")] - fn connect_suspend_mode_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "transport-mode")] - fn connect_transport_mode_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTSPMediaFactoryExt for O { +pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static { + //#[doc(alias = "gst_rtsp_media_factory_add_role")] //fn add_role(&self, role: &str, fieldname: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) { // unsafe { TODO: call ffi:gst_rtsp_media_factory_add_role() } //} + #[doc(alias = "gst_rtsp_media_factory_construct")] fn construct(&self, url: &gst_rtsp::RTSPUrl) -> Result { unsafe { Option::<_>::from_glib_full(ffi::gst_rtsp_media_factory_construct( @@ -348,6 +61,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_create_element")] fn create_element(&self, url: &gst_rtsp::RTSPUrl) -> Result { unsafe { Option::<_>::from_glib_none(ffi::gst_rtsp_media_factory_create_element( @@ -358,6 +72,8 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_get_address_pool")] + #[doc(alias = "get_address_pool")] fn address_pool(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_media_factory_get_address_pool( @@ -366,10 +82,14 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_get_buffer_size")] + #[doc(alias = "get_buffer_size")] fn buffer_size(&self) -> u32 { unsafe { ffi::gst_rtsp_media_factory_get_buffer_size(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_media_factory_get_clock")] + #[doc(alias = "get_clock")] fn clock(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_media_factory_get_clock( @@ -380,6 +100,8 @@ impl> RTSPMediaFactoryExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_media_factory_get_do_retransmission")] + #[doc(alias = "get_do_retransmission")] fn does_retransmission(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_factory_get_do_retransmission( @@ -390,14 +112,20 @@ impl> RTSPMediaFactoryExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_media_factory_get_dscp_qos")] + #[doc(alias = "get_dscp_qos")] fn dscp_qos(&self) -> i32 { unsafe { ffi::gst_rtsp_media_factory_get_dscp_qos(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_media_factory_get_latency")] + #[doc(alias = "get_latency")] fn latency(&self) -> u32 { unsafe { ffi::gst_rtsp_media_factory_get_latency(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_media_factory_get_launch")] + #[doc(alias = "get_launch")] fn launch(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_media_factory_get_launch( @@ -408,10 +136,14 @@ impl> RTSPMediaFactoryExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_media_factory_get_max_mcast_ttl")] + #[doc(alias = "get_max_mcast_ttl")] fn max_mcast_ttl(&self) -> u32 { unsafe { ffi::gst_rtsp_media_factory_get_max_mcast_ttl(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_media_factory_get_media_gtype")] + #[doc(alias = "get_media_gtype")] fn media_gtype(&self) -> glib::types::Type { unsafe { from_glib(ffi::gst_rtsp_media_factory_get_media_gtype( @@ -420,6 +152,8 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_get_multicast_iface")] + #[doc(alias = "get_multicast_iface")] fn multicast_iface(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_media_factory_get_multicast_iface( @@ -428,10 +162,14 @@ impl> RTSPMediaFactoryExt for O { } } + //#[doc(alias = "gst_rtsp_media_factory_get_permissions")] + //#[doc(alias = "get_permissions")] //fn permissions(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi:gst_rtsp_media_factory_get_permissions() } //} + #[doc(alias = "gst_rtsp_media_factory_get_profiles")] + #[doc(alias = "get_profiles")] fn profiles(&self) -> gst_rtsp::RTSPProfile { unsafe { from_glib(ffi::gst_rtsp_media_factory_get_profiles( @@ -440,6 +178,8 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_get_protocols")] + #[doc(alias = "get_protocols")] fn protocols(&self) -> gst_rtsp::RTSPLowerTrans { unsafe { from_glib(ffi::gst_rtsp_media_factory_get_protocols( @@ -448,6 +188,8 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_get_publish_clock_mode")] + #[doc(alias = "get_publish_clock_mode")] fn publish_clock_mode(&self) -> RTSPPublishClockMode { unsafe { from_glib(ffi::gst_rtsp_media_factory_get_publish_clock_mode( @@ -456,6 +198,8 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_get_retransmission_time")] + #[doc(alias = "get_retransmission_time")] fn retransmission_time(&self) -> Option { unsafe { from_glib(ffi::gst_rtsp_media_factory_get_retransmission_time( @@ -464,6 +208,8 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_get_suspend_mode")] + #[doc(alias = "get_suspend_mode")] fn suspend_mode(&self) -> RTSPSuspendMode { unsafe { from_glib(ffi::gst_rtsp_media_factory_get_suspend_mode( @@ -472,6 +218,8 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_get_transport_mode")] + #[doc(alias = "get_transport_mode")] fn transport_mode(&self) -> RTSPTransportMode { unsafe { from_glib(ffi::gst_rtsp_media_factory_get_transport_mode( @@ -482,6 +230,7 @@ impl> RTSPMediaFactoryExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_media_factory_is_bind_mcast_address")] fn is_bind_mcast_address(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_factory_is_bind_mcast_address( @@ -492,6 +241,7 @@ impl> RTSPMediaFactoryExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_rtsp_media_factory_is_enable_rtcp")] fn is_enable_rtcp(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_factory_is_enable_rtcp( @@ -500,6 +250,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_is_eos_shutdown")] fn is_eos_shutdown(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_factory_is_eos_shutdown( @@ -508,6 +259,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_is_shared")] fn is_shared(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_factory_is_shared( @@ -516,6 +268,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_is_stop_on_disonnect")] fn is_stop_on_disonnect(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_factory_is_stop_on_disonnect( @@ -524,6 +277,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_set_address_pool")] fn set_address_pool(&self, pool: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_media_factory_set_address_pool( @@ -535,6 +289,7 @@ impl> RTSPMediaFactoryExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_media_factory_set_bind_mcast_address")] fn set_bind_mcast_address(&self, bind_mcast_addr: bool) { unsafe { ffi::gst_rtsp_media_factory_set_bind_mcast_address( @@ -544,12 +299,14 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_set_buffer_size")] fn set_buffer_size(&self, size: u32) { unsafe { ffi::gst_rtsp_media_factory_set_buffer_size(self.as_ref().to_glib_none().0, size); } } + #[doc(alias = "gst_rtsp_media_factory_set_clock")] fn set_clock(&self, clock: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_media_factory_set_clock( @@ -561,6 +318,7 @@ impl> RTSPMediaFactoryExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_media_factory_set_do_retransmission")] fn set_do_retransmission(&self, do_retransmission: bool) { unsafe { ffi::gst_rtsp_media_factory_set_do_retransmission( @@ -572,6 +330,7 @@ impl> RTSPMediaFactoryExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_media_factory_set_dscp_qos")] fn set_dscp_qos(&self, dscp_qos: i32) { unsafe { ffi::gst_rtsp_media_factory_set_dscp_qos(self.as_ref().to_glib_none().0, dscp_qos); @@ -580,6 +339,7 @@ impl> RTSPMediaFactoryExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_rtsp_media_factory_set_enable_rtcp")] fn set_enable_rtcp(&self, enable: bool) { unsafe { ffi::gst_rtsp_media_factory_set_enable_rtcp( @@ -589,6 +349,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_set_eos_shutdown")] fn set_eos_shutdown(&self, eos_shutdown: bool) { unsafe { ffi::gst_rtsp_media_factory_set_eos_shutdown( @@ -598,12 +359,14 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_set_latency")] fn set_latency(&self, latency: u32) { unsafe { ffi::gst_rtsp_media_factory_set_latency(self.as_ref().to_glib_none().0, latency); } } + #[doc(alias = "gst_rtsp_media_factory_set_launch")] fn set_launch(&self, launch: &str) { unsafe { ffi::gst_rtsp_media_factory_set_launch( @@ -615,6 +378,7 @@ impl> RTSPMediaFactoryExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_media_factory_set_max_mcast_ttl")] fn set_max_mcast_ttl(&self, ttl: u32) -> bool { unsafe { from_glib(ffi::gst_rtsp_media_factory_set_max_mcast_ttl( @@ -624,6 +388,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_set_media_gtype")] fn set_media_gtype(&self, media_gtype: glib::types::Type) { unsafe { ffi::gst_rtsp_media_factory_set_media_gtype( @@ -633,6 +398,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_set_multicast_iface")] fn set_multicast_iface(&self, multicast_iface: Option<&str>) { unsafe { ffi::gst_rtsp_media_factory_set_multicast_iface( @@ -642,10 +408,12 @@ impl> RTSPMediaFactoryExt for O { } } + //#[doc(alias = "gst_rtsp_media_factory_set_permissions")] //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>) { // unsafe { TODO: call ffi:gst_rtsp_media_factory_set_permissions() } //} + #[doc(alias = "gst_rtsp_media_factory_set_profiles")] fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile) { unsafe { ffi::gst_rtsp_media_factory_set_profiles( @@ -655,6 +423,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_set_protocols")] fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans) { unsafe { ffi::gst_rtsp_media_factory_set_protocols( @@ -664,6 +433,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_set_publish_clock_mode")] fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) { unsafe { ffi::gst_rtsp_media_factory_set_publish_clock_mode( @@ -673,6 +443,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_set_retransmission_time")] fn set_retransmission_time(&self, time: impl Into>) { unsafe { ffi::gst_rtsp_media_factory_set_retransmission_time( @@ -682,6 +453,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_set_shared")] fn set_shared(&self, shared: bool) { unsafe { ffi::gst_rtsp_media_factory_set_shared( @@ -691,6 +463,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_set_stop_on_disconnect")] fn set_stop_on_disconnect(&self, stop_on_disconnect: bool) { unsafe { ffi::gst_rtsp_media_factory_set_stop_on_disconnect( @@ -700,6 +473,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_set_suspend_mode")] fn set_suspend_mode(&self, mode: RTSPSuspendMode) { unsafe { ffi::gst_rtsp_media_factory_set_suspend_mode( @@ -709,6 +483,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_set_transport_mode")] fn set_transport_mode(&self, mode: RTSPTransportMode) { unsafe { ffi::gst_rtsp_media_factory_set_transport_mode( @@ -718,34 +493,42 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "bind-mcast-address")] fn get_property_bind_mcast_address(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "bind-mcast-address") } + #[doc(alias = "bind-mcast-address")] fn set_property_bind_mcast_address(&self, bind_mcast_address: bool) { glib::ObjectExt::set_property(self.as_ref(), "bind-mcast-address", bind_mcast_address) } + #[doc(alias = "dscp-qos")] fn get_property_dscp_qos(&self) -> i32 { glib::ObjectExt::property(self.as_ref(), "dscp-qos") } + #[doc(alias = "dscp-qos")] fn set_property_dscp_qos(&self, dscp_qos: i32) { glib::ObjectExt::set_property(self.as_ref(), "dscp-qos", dscp_qos) } + #[doc(alias = "max-mcast-ttl")] fn get_property_max_mcast_ttl(&self) -> u32 { glib::ObjectExt::property(self.as_ref(), "max-mcast-ttl") } + #[doc(alias = "max-mcast-ttl")] fn set_property_max_mcast_ttl(&self, max_mcast_ttl: u32) { glib::ObjectExt::set_property(self.as_ref(), "max-mcast-ttl", max_mcast_ttl) } + #[doc(alias = "stop-on-disconnect")] fn is_stop_on_disconnect(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "stop-on-disconnect") } + #[doc(alias = "media-configure")] fn connect_media_configure( &self, f: F, @@ -777,6 +560,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "media-constructed")] fn connect_media_constructed( &self, f: F, @@ -808,6 +592,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "bind-mcast-address")] fn connect_bind_mcast_address_notify( &self, f: F, @@ -836,6 +621,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "buffer-size")] fn connect_buffer_size_notify( &self, f: F, @@ -864,6 +650,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "clock")] fn connect_clock_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_clock_trampoline< P: IsA, @@ -889,6 +676,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "dscp-qos")] fn connect_dscp_qos_notify( &self, f: F, @@ -919,6 +707,7 @@ impl> RTSPMediaFactoryExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "enable-rtcp")] fn connect_enable_rtcp_notify( &self, f: F, @@ -947,6 +736,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "eos-shutdown")] fn connect_eos_shutdown_notify( &self, f: F, @@ -975,6 +765,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "latency")] fn connect_latency_notify( &self, f: F, @@ -1003,6 +794,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "launch")] fn connect_launch_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_launch_trampoline< P: IsA, @@ -1028,6 +820,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "max-mcast-ttl")] fn connect_max_mcast_ttl_notify( &self, f: F, @@ -1056,6 +849,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "profiles")] fn connect_profiles_notify( &self, f: F, @@ -1084,6 +878,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "protocols")] fn connect_protocols_notify( &self, f: F, @@ -1112,6 +907,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "shared")] fn connect_shared_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_shared_trampoline< P: IsA, @@ -1137,6 +933,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "stop-on-disconnect")] fn connect_stop_on_disconnect_notify( &self, f: F, @@ -1165,6 +962,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "suspend-mode")] fn connect_suspend_mode_notify( &self, f: F, @@ -1193,6 +991,7 @@ impl> RTSPMediaFactoryExt for O { } } + #[doc(alias = "transport-mode")] fn connect_transport_mode_notify( &self, f: F, @@ -1221,3 +1020,5 @@ impl> RTSPMediaFactoryExt for O { } } } + +impl> RTSPMediaFactoryExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs b/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs index 18724bed3..9596ef420 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs @@ -39,31 +39,14 @@ impl Default for RTSPMediaFactoryURI { unsafe impl Send for RTSPMediaFactoryURI {} unsafe impl Sync for RTSPMediaFactoryURI {} -pub trait RTSPMediaFactoryURIExt: 'static { - #[doc(alias = "gst_rtsp_media_factory_uri_get_uri")] - #[doc(alias = "get_uri")] - fn uri(&self) -> glib::GString; - - #[doc(alias = "gst_rtsp_media_factory_uri_set_uri")] - fn set_uri(&self, uri: &str); - - #[doc(alias = "use-gstpay")] - fn uses_gstpay(&self) -> bool; - - #[doc(alias = "use-gstpay")] - fn set_use_gstpay(&self, use_gstpay: bool); - - #[doc(alias = "uri")] - fn connect_uri_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "use-gstpay")] - fn connect_use_gstpay_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTSPMediaFactoryURIExt for O { +pub trait RTSPMediaFactoryURIExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_rtsp_media_factory_uri_get_uri")] + #[doc(alias = "get_uri")] fn uri(&self) -> glib::GString { unsafe { from_glib_full(ffi::gst_rtsp_media_factory_uri_get_uri( @@ -72,6 +55,7 @@ impl> RTSPMediaFactoryURIExt for O { } } + #[doc(alias = "gst_rtsp_media_factory_uri_set_uri")] fn set_uri(&self, uri: &str) { unsafe { ffi::gst_rtsp_media_factory_uri_set_uri( @@ -81,14 +65,17 @@ impl> RTSPMediaFactoryURIExt for O { } } + #[doc(alias = "use-gstpay")] fn uses_gstpay(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "use-gstpay") } + #[doc(alias = "use-gstpay")] fn set_use_gstpay(&self, use_gstpay: bool) { glib::ObjectExt::set_property(self.as_ref(), "use-gstpay", use_gstpay) } + #[doc(alias = "uri")] fn connect_uri_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_uri_trampoline< P: IsA, @@ -114,6 +101,7 @@ impl> RTSPMediaFactoryURIExt for O { } } + #[doc(alias = "use-gstpay")] fn connect_use_gstpay_notify( &self, f: F, @@ -142,3 +130,5 @@ impl> RTSPMediaFactoryURIExt for O { } } } + +impl> RTSPMediaFactoryURIExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs b/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs index e5ea40d42..90dd783e4 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs @@ -35,22 +35,13 @@ impl Default for RTSPMountPoints { unsafe impl Send for RTSPMountPoints {} unsafe impl Sync for RTSPMountPoints {} -pub trait RTSPMountPointsExt: 'static { - #[doc(alias = "gst_rtsp_mount_points_add_factory")] - fn add_factory(&self, path: &str, factory: impl IsA); - - #[doc(alias = "gst_rtsp_mount_points_make_path")] - fn make_path(&self, url: &gst_rtsp::RTSPUrl) -> Result; - - #[doc(alias = "gst_rtsp_mount_points_match")] - #[doc(alias = "match")] - fn match_(&self, path: &str) -> (RTSPMediaFactory, i32); - - #[doc(alias = "gst_rtsp_mount_points_remove_factory")] - fn remove_factory(&self, path: &str); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTSPMountPointsExt for O { +pub trait RTSPMountPointsExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_rtsp_mount_points_add_factory")] fn add_factory(&self, path: &str, factory: impl IsA) { unsafe { ffi::gst_rtsp_mount_points_add_factory( @@ -61,6 +52,7 @@ impl> RTSPMountPointsExt for O { } } + #[doc(alias = "gst_rtsp_mount_points_make_path")] fn make_path(&self, url: &gst_rtsp::RTSPUrl) -> Result { unsafe { Option::<_>::from_glib_full(ffi::gst_rtsp_mount_points_make_path( @@ -71,6 +63,8 @@ impl> RTSPMountPointsExt for O { } } + #[doc(alias = "gst_rtsp_mount_points_match")] + #[doc(alias = "match")] fn match_(&self, path: &str) -> (RTSPMediaFactory, i32) { unsafe { let mut matched = mem::MaybeUninit::uninit(); @@ -83,6 +77,7 @@ impl> RTSPMountPointsExt for O { } } + #[doc(alias = "gst_rtsp_mount_points_remove_factory")] fn remove_factory(&self, path: &str) { unsafe { ffi::gst_rtsp_mount_points_remove_factory( @@ -92,3 +87,5 @@ impl> RTSPMountPointsExt for O { } } } + +impl> RTSPMountPointsExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_onvif_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_onvif_media.rs index 8e0add493..0b0f66173 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_onvif_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_onvif_media.rs @@ -22,19 +22,13 @@ impl RTSPOnvifMedia { unsafe impl Send for RTSPOnvifMedia {} unsafe impl Sync for RTSPOnvifMedia {} -pub trait RTSPOnvifMediaExt: 'static { - #[doc(alias = "gst_rtsp_onvif_media_collect_backchannel")] - fn collect_backchannel(&self) -> bool; - - #[doc(alias = "gst_rtsp_onvif_media_get_backchannel_bandwidth")] - #[doc(alias = "get_backchannel_bandwidth")] - fn backchannel_bandwidth(&self) -> u32; - - #[doc(alias = "gst_rtsp_onvif_media_set_backchannel_bandwidth")] - fn set_backchannel_bandwidth(&self, bandwidth: u32); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTSPOnvifMediaExt for O { +pub trait RTSPOnvifMediaExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_rtsp_onvif_media_collect_backchannel")] fn collect_backchannel(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_onvif_media_collect_backchannel( @@ -43,12 +37,15 @@ impl> RTSPOnvifMediaExt for O { } } + #[doc(alias = "gst_rtsp_onvif_media_get_backchannel_bandwidth")] + #[doc(alias = "get_backchannel_bandwidth")] fn backchannel_bandwidth(&self) -> u32 { unsafe { ffi::gst_rtsp_onvif_media_get_backchannel_bandwidth(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_onvif_media_set_backchannel_bandwidth")] fn set_backchannel_bandwidth(&self, bandwidth: u32) { unsafe { ffi::gst_rtsp_onvif_media_set_backchannel_bandwidth( @@ -58,3 +55,5 @@ impl> RTSPOnvifMediaExt for O { } } } + +impl> RTSPOnvifMediaExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_onvif_media_factory.rs b/gstreamer-rtsp-server/src/auto/rtsp_onvif_media_factory.rs index b263eb175..c6d6590e1 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_onvif_media_factory.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_onvif_media_factory.rs @@ -36,36 +36,14 @@ impl Default for RTSPOnvifMediaFactory { unsafe impl Send for RTSPOnvifMediaFactory {} unsafe impl Sync for RTSPOnvifMediaFactory {} -pub trait RTSPOnvifMediaFactoryExt: 'static { - #[doc(alias = "gst_rtsp_onvif_media_factory_get_backchannel_bandwidth")] - #[doc(alias = "get_backchannel_bandwidth")] - fn backchannel_bandwidth(&self) -> u32; - - #[doc(alias = "gst_rtsp_onvif_media_factory_get_backchannel_launch")] - #[doc(alias = "get_backchannel_launch")] - fn backchannel_launch(&self) -> Option; - - #[doc(alias = "gst_rtsp_onvif_media_factory_has_backchannel_support")] - fn has_backchannel_support(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_onvif_media_factory_has_replay_support")] - fn has_replay_support(&self) -> bool; - - #[doc(alias = "gst_rtsp_onvif_media_factory_set_backchannel_bandwidth")] - fn set_backchannel_bandwidth(&self, bandwidth: u32); - - #[doc(alias = "gst_rtsp_onvif_media_factory_set_backchannel_launch")] - fn set_backchannel_launch(&self, launch: Option<&str>); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_onvif_media_factory_set_replay_support")] - fn set_replay_support(&self, has_replay_support: bool); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTSPOnvifMediaFactoryExt for O { +pub trait RTSPOnvifMediaFactoryExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_rtsp_onvif_media_factory_get_backchannel_bandwidth")] + #[doc(alias = "get_backchannel_bandwidth")] fn backchannel_bandwidth(&self) -> u32 { unsafe { ffi::gst_rtsp_onvif_media_factory_get_backchannel_bandwidth( @@ -74,6 +52,8 @@ impl> RTSPOnvifMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_onvif_media_factory_get_backchannel_launch")] + #[doc(alias = "get_backchannel_launch")] fn backchannel_launch(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_onvif_media_factory_get_backchannel_launch( @@ -82,6 +62,7 @@ impl> RTSPOnvifMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_onvif_media_factory_has_backchannel_support")] fn has_backchannel_support(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_onvif_media_factory_has_backchannel_support( @@ -92,6 +73,7 @@ impl> RTSPOnvifMediaFactoryExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_onvif_media_factory_has_replay_support")] fn has_replay_support(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_onvif_media_factory_has_replay_support( @@ -100,6 +82,7 @@ impl> RTSPOnvifMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_onvif_media_factory_set_backchannel_bandwidth")] fn set_backchannel_bandwidth(&self, bandwidth: u32) { unsafe { ffi::gst_rtsp_onvif_media_factory_set_backchannel_bandwidth( @@ -109,6 +92,7 @@ impl> RTSPOnvifMediaFactoryExt for O { } } + #[doc(alias = "gst_rtsp_onvif_media_factory_set_backchannel_launch")] fn set_backchannel_launch(&self, launch: Option<&str>) { unsafe { ffi::gst_rtsp_onvif_media_factory_set_backchannel_launch( @@ -120,6 +104,7 @@ impl> RTSPOnvifMediaFactoryExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_onvif_media_factory_set_replay_support")] fn set_replay_support(&self, has_replay_support: bool) { unsafe { ffi::gst_rtsp_onvif_media_factory_set_replay_support( @@ -129,3 +114,5 @@ impl> RTSPOnvifMediaFactoryExt for O { } } } + +impl> RTSPOnvifMediaFactoryExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_server.rs b/gstreamer-rtsp-server/src/auto/rtsp_server.rs index cf6b77f4f..ed8872dce 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_server.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_server.rs @@ -60,148 +60,13 @@ impl Default for RTSPServer { unsafe impl Send for RTSPServer {} unsafe impl Sync for RTSPServer {} -pub trait RTSPServerExt: 'static { - #[doc(alias = "gst_rtsp_server_client_filter")] - fn client_filter( - &self, - func: Option<&mut dyn (FnMut(&RTSPServer, &RTSPClient) -> RTSPFilterResult)>, - ) -> Vec; - - #[doc(alias = "gst_rtsp_server_create_socket")] - fn create_socket( - &self, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "gst_rtsp_server_create_source")] - fn create_source( - &self, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "gst_rtsp_server_get_address")] - #[doc(alias = "get_address")] - fn address(&self) -> Option; - - #[doc(alias = "gst_rtsp_server_get_auth")] - #[doc(alias = "get_auth")] - fn auth(&self) -> Option; - - #[doc(alias = "gst_rtsp_server_get_backlog")] - #[doc(alias = "get_backlog")] - fn backlog(&self) -> i32; - - #[doc(alias = "gst_rtsp_server_get_bound_port")] - #[doc(alias = "get_bound_port")] - fn bound_port(&self) -> i32; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_server_get_content_length_limit")] - #[doc(alias = "get_content_length_limit")] - fn content_length_limit(&self) -> u32; - - #[doc(alias = "gst_rtsp_server_get_mount_points")] - #[doc(alias = "get_mount_points")] - fn mount_points(&self) -> Option; - - #[doc(alias = "gst_rtsp_server_get_service")] - #[doc(alias = "get_service")] - fn service(&self) -> glib::GString; - - #[doc(alias = "gst_rtsp_server_get_session_pool")] - #[doc(alias = "get_session_pool")] - fn session_pool(&self) -> Option; - - #[doc(alias = "gst_rtsp_server_get_thread_pool")] - #[doc(alias = "get_thread_pool")] - fn thread_pool(&self) -> Option; - - #[doc(alias = "gst_rtsp_server_set_address")] - fn set_address(&self, address: &str); - - #[doc(alias = "gst_rtsp_server_set_auth")] - fn set_auth(&self, auth: Option<&impl IsA>); - - #[doc(alias = "gst_rtsp_server_set_backlog")] - fn set_backlog(&self, backlog: i32); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_server_set_content_length_limit")] - fn set_content_length_limit(&self, limit: u32); - - #[doc(alias = "gst_rtsp_server_set_mount_points")] - fn set_mount_points(&self, mounts: Option<&impl IsA>); - - #[doc(alias = "gst_rtsp_server_set_service")] - fn set_service(&self, service: &str); - - #[doc(alias = "gst_rtsp_server_set_session_pool")] - fn set_session_pool(&self, pool: Option<&impl IsA>); - - #[doc(alias = "gst_rtsp_server_set_thread_pool")] - fn set_thread_pool(&self, pool: Option<&impl IsA>); - - #[doc(alias = "gst_rtsp_server_transfer_connection")] - fn transfer_connection( - &self, - socket: impl IsA, - ip: &str, - port: i32, - initial_buffer: Option<&str>, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "content-length-limit")] - fn get_property_content_length_limit(&self) -> u32; - - #[doc(alias = "content-length-limit")] - fn set_property_content_length_limit(&self, content_length_limit: u32); - - #[doc(alias = "client-connected")] - fn connect_client_connected( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "address")] - fn connect_address_notify(&self, f: F) - -> SignalHandlerId; - - #[doc(alias = "backlog")] - fn connect_backlog_notify(&self, f: F) - -> SignalHandlerId; - - #[doc(alias = "bound-port")] - fn connect_bound_port_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "content-length-limit")] - fn connect_content_length_limit_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "mount-points")] - fn connect_mount_points_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "service")] - fn connect_service_notify(&self, f: F) - -> SignalHandlerId; - - #[doc(alias = "session-pool")] - fn connect_session_pool_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTSPServerExt for O { +pub trait RTSPServerExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_rtsp_server_client_filter")] fn client_filter( &self, func: Option<&mut dyn (FnMut(&RTSPServer, &RTSPClient) -> RTSPFilterResult)>, @@ -243,6 +108,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_create_socket")] fn create_socket( &self, cancellable: Option<&impl IsA>, @@ -262,6 +128,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_create_source")] fn create_source( &self, cancellable: Option<&impl IsA>, @@ -281,6 +148,8 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_get_address")] + #[doc(alias = "get_address")] fn address(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_server_get_address( @@ -289,6 +158,8 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_get_auth")] + #[doc(alias = "get_auth")] fn auth(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_server_get_auth( @@ -297,20 +168,28 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_get_backlog")] + #[doc(alias = "get_backlog")] fn backlog(&self) -> i32 { unsafe { ffi::gst_rtsp_server_get_backlog(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_server_get_bound_port")] + #[doc(alias = "get_bound_port")] fn bound_port(&self) -> i32 { unsafe { ffi::gst_rtsp_server_get_bound_port(self.as_ref().to_glib_none().0) } } #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_server_get_content_length_limit")] + #[doc(alias = "get_content_length_limit")] fn content_length_limit(&self) -> u32 { unsafe { ffi::gst_rtsp_server_get_content_length_limit(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_server_get_mount_points")] + #[doc(alias = "get_mount_points")] fn mount_points(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_server_get_mount_points( @@ -319,6 +198,8 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_get_service")] + #[doc(alias = "get_service")] fn service(&self) -> glib::GString { unsafe { from_glib_full(ffi::gst_rtsp_server_get_service( @@ -327,6 +208,8 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_get_session_pool")] + #[doc(alias = "get_session_pool")] fn session_pool(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_server_get_session_pool( @@ -335,6 +218,8 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_get_thread_pool")] + #[doc(alias = "get_thread_pool")] fn thread_pool(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_server_get_thread_pool( @@ -343,6 +228,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_set_address")] fn set_address(&self, address: &str) { unsafe { ffi::gst_rtsp_server_set_address( @@ -352,6 +238,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_set_auth")] fn set_auth(&self, auth: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_server_set_auth( @@ -361,6 +248,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_set_backlog")] fn set_backlog(&self, backlog: i32) { unsafe { ffi::gst_rtsp_server_set_backlog(self.as_ref().to_glib_none().0, backlog); @@ -369,12 +257,14 @@ impl> RTSPServerExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_server_set_content_length_limit")] fn set_content_length_limit(&self, limit: u32) { unsafe { ffi::gst_rtsp_server_set_content_length_limit(self.as_ref().to_glib_none().0, limit); } } + #[doc(alias = "gst_rtsp_server_set_mount_points")] fn set_mount_points(&self, mounts: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_server_set_mount_points( @@ -384,6 +274,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_set_service")] fn set_service(&self, service: &str) { unsafe { ffi::gst_rtsp_server_set_service( @@ -393,6 +284,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_set_session_pool")] fn set_session_pool(&self, pool: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_server_set_session_pool( @@ -402,6 +294,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_set_thread_pool")] fn set_thread_pool(&self, pool: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_server_set_thread_pool( @@ -411,6 +304,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "gst_rtsp_server_transfer_connection")] fn transfer_connection( &self, socket: impl IsA, @@ -432,14 +326,17 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "content-length-limit")] fn get_property_content_length_limit(&self) -> u32 { glib::ObjectExt::property(self.as_ref(), "content-length-limit") } + #[doc(alias = "content-length-limit")] fn set_property_content_length_limit(&self, content_length_limit: u32) { glib::ObjectExt::set_property(self.as_ref(), "content-length-limit", content_length_limit) } + #[doc(alias = "client-connected")] fn connect_client_connected( &self, f: F, @@ -471,6 +368,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "address")] fn connect_address_notify( &self, f: F, @@ -499,6 +397,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "backlog")] fn connect_backlog_notify( &self, f: F, @@ -527,6 +426,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "bound-port")] fn connect_bound_port_notify( &self, f: F, @@ -555,6 +455,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "content-length-limit")] fn connect_content_length_limit_notify( &self, f: F, @@ -583,6 +484,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "mount-points")] fn connect_mount_points_notify( &self, f: F, @@ -611,6 +513,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "service")] fn connect_service_notify( &self, f: F, @@ -639,6 +542,7 @@ impl> RTSPServerExt for O { } } + #[doc(alias = "session-pool")] fn connect_session_pool_notify( &self, f: F, @@ -667,3 +571,5 @@ impl> RTSPServerExt for O { } } } + +impl> RTSPServerExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session.rs b/gstreamer-rtsp-server/src/auto/rtsp_session.rs index dad7d1f4a..1cd779105 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session.rs @@ -33,91 +33,20 @@ impl RTSPSession { unsafe impl Send for RTSPSession {} unsafe impl Sync for RTSPSession {} -pub trait RTSPSessionExt: 'static { - #[doc(alias = "gst_rtsp_session_allow_expire")] - fn allow_expire(&self); - - #[doc(alias = "gst_rtsp_session_filter")] - fn filter( - &self, - func: Option<&mut dyn (FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult)>, - ) -> Vec; - - #[doc(alias = "gst_rtsp_session_get_header")] - #[doc(alias = "get_header")] - fn header(&self) -> Option; - - #[doc(alias = "gst_rtsp_session_get_sessionid")] - #[doc(alias = "get_sessionid")] - fn sessionid(&self) -> Option; - - #[doc(alias = "gst_rtsp_session_get_timeout")] - #[doc(alias = "get_timeout")] - fn timeout(&self) -> u32; - - //#[doc(alias = "gst_rtsp_session_is_expired")] - //fn is_expired(&self, now: /*Ignored*/&mut glib::TimeVal) -> bool; - - #[doc(alias = "gst_rtsp_session_is_expired_usec")] - fn is_expired_usec(&self, now: i64) -> bool; - - #[doc(alias = "gst_rtsp_session_manage_media")] - fn manage_media(&self, path: &str, media: impl IsA) -> RTSPSessionMedia; - - //#[doc(alias = "gst_rtsp_session_next_timeout")] - //fn next_timeout(&self, now: /*Ignored*/&mut glib::TimeVal) -> i32; - - #[doc(alias = "gst_rtsp_session_next_timeout_usec")] - fn next_timeout_usec(&self, now: i64) -> i32; - - #[doc(alias = "gst_rtsp_session_prevent_expire")] - fn prevent_expire(&self); - - #[doc(alias = "gst_rtsp_session_release_media")] - fn release_media(&self, media: &impl IsA) -> bool; - - #[doc(alias = "gst_rtsp_session_set_timeout")] - fn set_timeout(&self, timeout: u32); - - #[doc(alias = "gst_rtsp_session_touch")] - fn touch(&self); - - #[doc(alias = "extra-timeout")] - fn extra_timeout(&self) -> u32; - - #[doc(alias = "extra-timeout")] - fn set_extra_timeout(&self, extra_timeout: u32); - - #[doc(alias = "timeout-always-visible")] - fn is_timeout_always_visible(&self) -> bool; - - #[doc(alias = "timeout-always-visible")] - fn set_timeout_always_visible(&self, timeout_always_visible: bool); - - #[doc(alias = "extra-timeout")] - fn connect_extra_timeout_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "timeout")] - fn connect_timeout_notify(&self, f: F) - -> SignalHandlerId; - - #[doc(alias = "timeout-always-visible")] - fn connect_timeout_always_visible_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTSPSessionExt for O { +pub trait RTSPSessionExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_rtsp_session_allow_expire")] fn allow_expire(&self) { unsafe { ffi::gst_rtsp_session_allow_expire(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_rtsp_session_filter")] fn filter( &self, func: Option<&mut dyn (FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult)>, @@ -162,6 +91,8 @@ impl> RTSPSessionExt for O { } } + #[doc(alias = "gst_rtsp_session_get_header")] + #[doc(alias = "get_header")] fn header(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_session_get_header( @@ -170,6 +101,8 @@ impl> RTSPSessionExt for O { } } + #[doc(alias = "gst_rtsp_session_get_sessionid")] + #[doc(alias = "get_sessionid")] fn sessionid(&self) -> Option { unsafe { from_glib_none(ffi::gst_rtsp_session_get_sessionid( @@ -178,14 +111,18 @@ impl> RTSPSessionExt for O { } } + #[doc(alias = "gst_rtsp_session_get_timeout")] + #[doc(alias = "get_timeout")] fn timeout(&self) -> u32 { unsafe { ffi::gst_rtsp_session_get_timeout(self.as_ref().to_glib_none().0) } } + //#[doc(alias = "gst_rtsp_session_is_expired")] //fn is_expired(&self, now: /*Ignored*/&mut glib::TimeVal) -> bool { // unsafe { TODO: call ffi:gst_rtsp_session_is_expired() } //} + #[doc(alias = "gst_rtsp_session_is_expired_usec")] fn is_expired_usec(&self, now: i64) -> bool { unsafe { from_glib(ffi::gst_rtsp_session_is_expired_usec( @@ -195,6 +132,7 @@ impl> RTSPSessionExt for O { } } + #[doc(alias = "gst_rtsp_session_manage_media")] fn manage_media(&self, path: &str, media: impl IsA) -> RTSPSessionMedia { unsafe { from_glib_none(ffi::gst_rtsp_session_manage_media( @@ -205,20 +143,24 @@ impl> RTSPSessionExt for O { } } + //#[doc(alias = "gst_rtsp_session_next_timeout")] //fn next_timeout(&self, now: /*Ignored*/&mut glib::TimeVal) -> i32 { // unsafe { TODO: call ffi:gst_rtsp_session_next_timeout() } //} + #[doc(alias = "gst_rtsp_session_next_timeout_usec")] fn next_timeout_usec(&self, now: i64) -> i32 { unsafe { ffi::gst_rtsp_session_next_timeout_usec(self.as_ref().to_glib_none().0, now) } } + #[doc(alias = "gst_rtsp_session_prevent_expire")] fn prevent_expire(&self) { unsafe { ffi::gst_rtsp_session_prevent_expire(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_rtsp_session_release_media")] fn release_media(&self, media: &impl IsA) -> bool { unsafe { from_glib(ffi::gst_rtsp_session_release_media( @@ -228,30 +170,36 @@ impl> RTSPSessionExt for O { } } + #[doc(alias = "gst_rtsp_session_set_timeout")] fn set_timeout(&self, timeout: u32) { unsafe { ffi::gst_rtsp_session_set_timeout(self.as_ref().to_glib_none().0, timeout); } } + #[doc(alias = "gst_rtsp_session_touch")] fn touch(&self) { unsafe { ffi::gst_rtsp_session_touch(self.as_ref().to_glib_none().0); } } + #[doc(alias = "extra-timeout")] fn extra_timeout(&self) -> u32 { glib::ObjectExt::property(self.as_ref(), "extra-timeout") } + #[doc(alias = "extra-timeout")] fn set_extra_timeout(&self, extra_timeout: u32) { glib::ObjectExt::set_property(self.as_ref(), "extra-timeout", extra_timeout) } + #[doc(alias = "timeout-always-visible")] fn is_timeout_always_visible(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "timeout-always-visible") } + #[doc(alias = "timeout-always-visible")] fn set_timeout_always_visible(&self, timeout_always_visible: bool) { glib::ObjectExt::set_property( self.as_ref(), @@ -260,6 +208,7 @@ impl> RTSPSessionExt for O { ) } + #[doc(alias = "extra-timeout")] fn connect_extra_timeout_notify( &self, f: F, @@ -288,6 +237,7 @@ impl> RTSPSessionExt for O { } } + #[doc(alias = "timeout")] fn connect_timeout_notify( &self, f: F, @@ -316,6 +266,7 @@ impl> RTSPSessionExt for O { } } + #[doc(alias = "timeout-always-visible")] fn connect_timeout_always_visible_notify( &self, f: F, @@ -344,3 +295,5 @@ impl> RTSPSessionExt for O { } } } + +impl> RTSPSessionExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs index 7e7e16ec7..7b24ab727 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs @@ -34,52 +34,19 @@ impl RTSPSessionMedia { unsafe impl Send for RTSPSessionMedia {} unsafe impl Sync for RTSPSessionMedia {} -pub trait RTSPSessionMediaExt: 'static { - //#[doc(alias = "gst_rtsp_session_media_alloc_channels")] - //fn alloc_channels(&self, range: /*Ignored*/gst_rtsp::RTSPRange) -> bool; - - #[doc(alias = "gst_rtsp_session_media_get_base_time")] - #[doc(alias = "get_base_time")] - fn base_time(&self) -> Option; - - #[doc(alias = "gst_rtsp_session_media_get_media")] - #[doc(alias = "get_media")] - fn media(&self) -> Option; - - #[doc(alias = "gst_rtsp_session_media_get_rtpinfo")] - #[doc(alias = "get_rtpinfo")] - fn rtpinfo(&self) -> Option; - - //#[doc(alias = "gst_rtsp_session_media_get_rtsp_state")] - //#[doc(alias = "get_rtsp_state")] - //fn rtsp_state(&self) -> /*Ignored*/gst_rtsp::RTSPState; - - #[doc(alias = "gst_rtsp_session_media_get_transport")] - #[doc(alias = "get_transport")] - fn transport(&self, idx: u32) -> Option; - - #[doc(alias = "gst_rtsp_session_media_get_transports")] - #[doc(alias = "get_transports")] - fn transports(&self) -> Vec; - - #[doc(alias = "gst_rtsp_session_media_matches")] - fn matches(&self, path: &str) -> Option; - - //#[doc(alias = "gst_rtsp_session_media_set_rtsp_state")] - //fn set_rtsp_state(&self, state: /*Ignored*/gst_rtsp::RTSPState); - - #[doc(alias = "gst_rtsp_session_media_set_state")] - fn set_state(&self, state: gst::State) -> Result<(), glib::error::BoolError>; - - //#[doc(alias = "gst_rtsp_session_media_set_transport")] - //fn set_transport(&self, stream: &impl IsA, tr: /*Ignored*/gst_rtsp::RTSPTransport) -> RTSPStreamTransport; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTSPSessionMediaExt for O { +pub trait RTSPSessionMediaExt: IsA + sealed::Sealed + 'static { + //#[doc(alias = "gst_rtsp_session_media_alloc_channels")] //fn alloc_channels(&self, range: /*Ignored*/gst_rtsp::RTSPRange) -> bool { // unsafe { TODO: call ffi:gst_rtsp_session_media_alloc_channels() } //} + #[doc(alias = "gst_rtsp_session_media_get_base_time")] + #[doc(alias = "get_base_time")] fn base_time(&self) -> Option { unsafe { from_glib(ffi::gst_rtsp_session_media_get_base_time( @@ -88,6 +55,8 @@ impl> RTSPSessionMediaExt for O { } } + #[doc(alias = "gst_rtsp_session_media_get_media")] + #[doc(alias = "get_media")] fn media(&self) -> Option { unsafe { from_glib_none(ffi::gst_rtsp_session_media_get_media( @@ -96,6 +65,8 @@ impl> RTSPSessionMediaExt for O { } } + #[doc(alias = "gst_rtsp_session_media_get_rtpinfo")] + #[doc(alias = "get_rtpinfo")] fn rtpinfo(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_session_media_get_rtpinfo( @@ -104,10 +75,14 @@ impl> RTSPSessionMediaExt for O { } } + //#[doc(alias = "gst_rtsp_session_media_get_rtsp_state")] + //#[doc(alias = "get_rtsp_state")] //fn rtsp_state(&self) -> /*Ignored*/gst_rtsp::RTSPState { // unsafe { TODO: call ffi:gst_rtsp_session_media_get_rtsp_state() } //} + #[doc(alias = "gst_rtsp_session_media_get_transport")] + #[doc(alias = "get_transport")] fn transport(&self, idx: u32) -> Option { unsafe { from_glib_none(ffi::gst_rtsp_session_media_get_transport( @@ -117,6 +92,8 @@ impl> RTSPSessionMediaExt for O { } } + #[doc(alias = "gst_rtsp_session_media_get_transports")] + #[doc(alias = "get_transports")] fn transports(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_session_media_get_transports( @@ -125,6 +102,7 @@ impl> RTSPSessionMediaExt for O { } } + #[doc(alias = "gst_rtsp_session_media_matches")] fn matches(&self, path: &str) -> Option { unsafe { let mut matched = mem::MaybeUninit::uninit(); @@ -141,10 +119,12 @@ impl> RTSPSessionMediaExt for O { } } + //#[doc(alias = "gst_rtsp_session_media_set_rtsp_state")] //fn set_rtsp_state(&self, state: /*Ignored*/gst_rtsp::RTSPState) { // unsafe { TODO: call ffi:gst_rtsp_session_media_set_rtsp_state() } //} + #[doc(alias = "gst_rtsp_session_media_set_state")] fn set_state(&self, state: gst::State) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -157,7 +137,10 @@ impl> RTSPSessionMediaExt for O { } } + //#[doc(alias = "gst_rtsp_session_media_set_transport")] //fn set_transport(&self, stream: &impl IsA, tr: /*Ignored*/gst_rtsp::RTSPTransport) -> RTSPStreamTransport { // unsafe { TODO: call ffi:gst_rtsp_session_media_set_transport() } //} } + +impl> RTSPSessionMediaExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs index 9d0909e72..1cc979c02 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs @@ -39,54 +39,18 @@ impl Default for RTSPSessionPool { unsafe impl Send for RTSPSessionPool {} unsafe impl Sync for RTSPSessionPool {} -pub trait RTSPSessionPoolExt: 'static { - #[doc(alias = "gst_rtsp_session_pool_cleanup")] - fn cleanup(&self) -> u32; - - #[doc(alias = "gst_rtsp_session_pool_create")] - fn create(&self) -> Result; - - #[doc(alias = "gst_rtsp_session_pool_filter")] - fn filter( - &self, - func: Option<&mut dyn (FnMut(&RTSPSessionPool, &RTSPSession) -> RTSPFilterResult)>, - ) -> Vec; - - #[doc(alias = "gst_rtsp_session_pool_find")] - fn find(&self, sessionid: &str) -> Option; - - #[doc(alias = "gst_rtsp_session_pool_get_max_sessions")] - #[doc(alias = "get_max_sessions")] - fn max_sessions(&self) -> u32; - - #[doc(alias = "gst_rtsp_session_pool_get_n_sessions")] - #[doc(alias = "get_n_sessions")] - fn n_sessions(&self) -> u32; - - #[doc(alias = "gst_rtsp_session_pool_remove")] - fn remove(&self, sess: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_rtsp_session_pool_set_max_sessions")] - fn set_max_sessions(&self, max: u32); - - #[doc(alias = "session-removed")] - fn connect_session_removed( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "max-sessions")] - fn connect_max_sessions_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTSPSessionPoolExt for O { +pub trait RTSPSessionPoolExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_rtsp_session_pool_cleanup")] fn cleanup(&self) -> u32 { unsafe { ffi::gst_rtsp_session_pool_cleanup(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_session_pool_create")] fn create(&self) -> Result { unsafe { Option::<_>::from_glib_full(ffi::gst_rtsp_session_pool_create( @@ -96,6 +60,7 @@ impl> RTSPSessionPoolExt for O { } } + #[doc(alias = "gst_rtsp_session_pool_filter")] fn filter( &self, func: Option<&mut dyn (FnMut(&RTSPSessionPool, &RTSPSession) -> RTSPFilterResult)>, @@ -140,6 +105,7 @@ impl> RTSPSessionPoolExt for O { } } + #[doc(alias = "gst_rtsp_session_pool_find")] fn find(&self, sessionid: &str) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_session_pool_find( @@ -149,14 +115,19 @@ impl> RTSPSessionPoolExt for O { } } + #[doc(alias = "gst_rtsp_session_pool_get_max_sessions")] + #[doc(alias = "get_max_sessions")] fn max_sessions(&self) -> u32 { unsafe { ffi::gst_rtsp_session_pool_get_max_sessions(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_session_pool_get_n_sessions")] + #[doc(alias = "get_n_sessions")] fn n_sessions(&self) -> u32 { unsafe { ffi::gst_rtsp_session_pool_get_n_sessions(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_session_pool_remove")] fn remove(&self, sess: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -169,12 +140,14 @@ impl> RTSPSessionPoolExt for O { } } + #[doc(alias = "gst_rtsp_session_pool_set_max_sessions")] fn set_max_sessions(&self, max: u32) { unsafe { ffi::gst_rtsp_session_pool_set_max_sessions(self.as_ref().to_glib_none().0, max); } } + #[doc(alias = "session-removed")] fn connect_session_removed( &self, f: F, @@ -206,6 +179,7 @@ impl> RTSPSessionPoolExt for O { } } + #[doc(alias = "max-sessions")] fn connect_max_sessions_notify( &self, f: F, @@ -234,3 +208,5 @@ impl> RTSPSessionPoolExt for O { } } } + +impl> RTSPSessionPoolExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs index 0d1260580..bf2ac7059 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs @@ -45,408 +45,15 @@ impl RTSPStream { unsafe impl Send for RTSPStream {} unsafe impl Sync for RTSPStream {} -pub trait RTSPStreamExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait RTSPStreamExt: IsA + sealed::Sealed + 'static { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] #[doc(alias = "gst_rtsp_stream_add_multicast_client_address")] - fn add_multicast_client_address( - &self, - destination: &str, - rtp_port: u32, - rtcp_port: u32, - family: gio::SocketFamily, - ) -> bool; - - #[doc(alias = "gst_rtsp_stream_add_transport")] - fn add_transport( - &self, - trans: &impl IsA, - ) -> Result<(), glib::error::BoolError>; - - //#[doc(alias = "gst_rtsp_stream_allocate_udp_sockets")] - //fn allocate_udp_sockets(&self, family: gio::SocketFamily, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport, use_client_settings: bool) -> bool; - - //#[doc(alias = "gst_rtsp_stream_complete_stream")] - //fn complete_stream(&self, transport: /*Ignored*/&gst_rtsp::RTSPTransport) -> bool; - - #[doc(alias = "gst_rtsp_stream_get_address_pool")] - #[doc(alias = "get_address_pool")] - fn address_pool(&self) -> Option; - - #[doc(alias = "gst_rtsp_stream_get_buffer_size")] - #[doc(alias = "get_buffer_size")] - fn buffer_size(&self) -> u32; - - #[doc(alias = "gst_rtsp_stream_get_caps")] - #[doc(alias = "get_caps")] - fn caps(&self) -> Option; - - #[doc(alias = "gst_rtsp_stream_get_control")] - #[doc(alias = "get_control")] - fn control(&self) -> Option; - - #[doc(alias = "gst_rtsp_stream_get_current_seqnum")] - #[doc(alias = "get_current_seqnum")] - fn current_seqnum(&self) -> u16; - - #[doc(alias = "gst_rtsp_stream_get_dscp_qos")] - #[doc(alias = "get_dscp_qos")] - fn dscp_qos(&self) -> i32; - - #[doc(alias = "gst_rtsp_stream_get_index")] - #[doc(alias = "get_index")] - fn index(&self) -> u32; - - #[doc(alias = "gst_rtsp_stream_get_joined_bin")] - #[doc(alias = "get_joined_bin")] - fn joined_bin(&self) -> Option; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_get_max_mcast_ttl")] - #[doc(alias = "get_max_mcast_ttl")] - fn max_mcast_ttl(&self) -> u32; - - #[doc(alias = "gst_rtsp_stream_get_mtu")] - #[doc(alias = "get_mtu")] - fn mtu(&self) -> u32; - - #[doc(alias = "gst_rtsp_stream_get_multicast_address")] - #[doc(alias = "get_multicast_address")] - fn multicast_address(&self, family: gio::SocketFamily) -> Option; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_get_multicast_client_addresses")] - #[doc(alias = "get_multicast_client_addresses")] - fn multicast_client_addresses(&self) -> glib::GString; - - #[doc(alias = "gst_rtsp_stream_get_multicast_iface")] - #[doc(alias = "get_multicast_iface")] - fn multicast_iface(&self) -> Option; - - #[doc(alias = "gst_rtsp_stream_get_profiles")] - #[doc(alias = "get_profiles")] - fn profiles(&self) -> gst_rtsp::RTSPProfile; - - #[doc(alias = "gst_rtsp_stream_get_protocols")] - #[doc(alias = "get_protocols")] - fn protocols(&self) -> gst_rtsp::RTSPLowerTrans; - - #[doc(alias = "gst_rtsp_stream_get_pt")] - #[doc(alias = "get_pt")] - fn pt(&self) -> u32; - - #[doc(alias = "gst_rtsp_stream_get_publish_clock_mode")] - #[doc(alias = "get_publish_clock_mode")] - fn publish_clock_mode(&self) -> RTSPPublishClockMode; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_stream_get_rate_control")] - #[doc(alias = "get_rate_control")] - fn is_rate_control(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_stream_get_rates")] - #[doc(alias = "get_rates")] - fn rates(&self) -> Option<(f64, f64)>; - - #[doc(alias = "gst_rtsp_stream_get_retransmission_pt")] - #[doc(alias = "get_retransmission_pt")] - fn retransmission_pt(&self) -> u32; - - #[doc(alias = "gst_rtsp_stream_get_retransmission_time")] - #[doc(alias = "get_retransmission_time")] - fn retransmission_time(&self) -> Option; - - #[doc(alias = "gst_rtsp_stream_get_rtcp_multicast_socket")] - #[doc(alias = "get_rtcp_multicast_socket")] - fn rtcp_multicast_socket(&self, family: gio::SocketFamily) -> Option; - - #[doc(alias = "gst_rtsp_stream_get_rtcp_socket")] - #[doc(alias = "get_rtcp_socket")] - fn rtcp_socket(&self, family: gio::SocketFamily) -> Option; - - #[doc(alias = "gst_rtsp_stream_get_rtp_multicast_socket")] - #[doc(alias = "get_rtp_multicast_socket")] - fn rtp_multicast_socket(&self, family: gio::SocketFamily) -> Option; - - #[doc(alias = "gst_rtsp_stream_get_rtp_socket")] - #[doc(alias = "get_rtp_socket")] - fn rtp_socket(&self, family: gio::SocketFamily) -> Option; - - #[doc(alias = "gst_rtsp_stream_get_rtpinfo")] - #[doc(alias = "get_rtpinfo")] - fn rtpinfo(&self) -> Option<(u32, u32, u32, Option)>; - - #[doc(alias = "gst_rtsp_stream_get_rtpsession")] - #[doc(alias = "get_rtpsession")] - fn rtpsession(&self) -> Option; - - //#[doc(alias = "gst_rtsp_stream_get_server_port")] - //#[doc(alias = "get_server_port")] - //fn server_port(&self, server_port: /*Ignored*/gst_rtsp::RTSPRange, family: gio::SocketFamily); - - #[doc(alias = "gst_rtsp_stream_get_sinkpad")] - #[doc(alias = "get_sinkpad")] - fn sinkpad(&self) -> Option; - - #[doc(alias = "gst_rtsp_stream_get_srcpad")] - #[doc(alias = "get_srcpad")] - fn srcpad(&self) -> Option; - - #[doc(alias = "gst_rtsp_stream_get_srtp_encoder")] - #[doc(alias = "get_srtp_encoder")] - fn srtp_encoder(&self) -> Option; - - #[doc(alias = "gst_rtsp_stream_get_ssrc")] - #[doc(alias = "get_ssrc")] - fn ssrc(&self) -> u32; - - #[doc(alias = "gst_rtsp_stream_get_ulpfec_enabled")] - #[doc(alias = "get_ulpfec_enabled")] - fn is_ulpfec_enabled(&self) -> bool; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_get_ulpfec_percentage")] - #[doc(alias = "get_ulpfec_percentage")] - fn ulpfec_percentage(&self) -> u32; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_get_ulpfec_pt")] - #[doc(alias = "get_ulpfec_pt")] - fn ulpfec_pt(&self) -> u32; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_handle_keymgmt")] - fn handle_keymgmt(&self, keymgmt: &str) -> bool; - - #[doc(alias = "gst_rtsp_stream_has_control")] - fn has_control(&self, control: Option<&str>) -> bool; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_is_bind_mcast_address")] - fn is_bind_mcast_address(&self) -> bool; - - #[doc(alias = "gst_rtsp_stream_is_blocking")] - fn is_blocking(&self) -> bool; - - #[doc(alias = "gst_rtsp_stream_is_client_side")] - fn is_client_side(&self) -> bool; - - #[doc(alias = "gst_rtsp_stream_is_complete")] - fn is_complete(&self) -> bool; - - #[doc(alias = "gst_rtsp_stream_is_receiver")] - fn is_receiver(&self) -> bool; - - #[doc(alias = "gst_rtsp_stream_is_sender")] - fn is_sender(&self) -> bool; - - //#[doc(alias = "gst_rtsp_stream_is_transport_supported")] - //fn is_transport_supported(&self, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> bool; - - #[doc(alias = "gst_rtsp_stream_join_bin")] - fn join_bin( - &self, - bin: &impl IsA, - rtpbin: &impl IsA, - state: gst::State, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_rtsp_stream_leave_bin")] - fn leave_bin( - &self, - bin: &impl IsA, - rtpbin: &impl IsA, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_rtsp_stream_recv_rtcp")] - fn recv_rtcp(&self, buffer: gst::Buffer) -> Result; - - #[doc(alias = "gst_rtsp_stream_recv_rtp")] - fn recv_rtp(&self, buffer: gst::Buffer) -> Result; - - #[doc(alias = "gst_rtsp_stream_remove_transport")] - fn remove_transport( - &self, - trans: &impl IsA, - ) -> Result<(), glib::error::BoolError>; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_request_aux_receiver")] - fn request_aux_receiver(&self, sessid: u32) -> Option; - - #[doc(alias = "gst_rtsp_stream_request_aux_sender")] - fn request_aux_sender(&self, sessid: u32) -> Option; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_request_ulpfec_decoder")] - fn request_ulpfec_decoder( - &self, - rtpbin: &impl IsA, - sessid: u32, - ) -> Option; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_request_ulpfec_encoder")] - fn request_ulpfec_encoder(&self, sessid: u32) -> Option; - - #[doc(alias = "gst_rtsp_stream_reserve_address")] - fn reserve_address( - &self, - address: &str, - port: u32, - n_ports: u32, - ttl: u32, - ) -> Option; - - #[doc(alias = "gst_rtsp_stream_seekable")] - fn seekable(&self) -> bool; - - #[doc(alias = "gst_rtsp_stream_set_address_pool")] - fn set_address_pool(&self, pool: Option<&impl IsA>); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_set_bind_mcast_address")] - fn set_bind_mcast_address(&self, bind_mcast_addr: bool); - - #[doc(alias = "gst_rtsp_stream_set_blocked")] - fn set_blocked(&self, blocked: bool) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_rtsp_stream_set_buffer_size")] - fn set_buffer_size(&self, size: u32); - - #[doc(alias = "gst_rtsp_stream_set_client_side")] - fn set_client_side(&self, client_side: bool); - - #[doc(alias = "gst_rtsp_stream_set_control")] - fn set_control(&self, control: Option<&str>); - - #[doc(alias = "gst_rtsp_stream_set_dscp_qos")] - fn set_dscp_qos(&self, dscp_qos: i32); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_set_max_mcast_ttl")] - fn set_max_mcast_ttl(&self, ttl: u32) -> bool; - - #[doc(alias = "gst_rtsp_stream_set_mtu")] - fn set_mtu(&self, mtu: u32); - - #[doc(alias = "gst_rtsp_stream_set_multicast_iface")] - fn set_multicast_iface(&self, multicast_iface: Option<&str>); - - #[doc(alias = "gst_rtsp_stream_set_profiles")] - fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile); - - #[doc(alias = "gst_rtsp_stream_set_protocols")] - fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans); - - #[doc(alias = "gst_rtsp_stream_set_pt_map")] - fn set_pt_map(&self, pt: u32, caps: &gst::Caps); - - #[doc(alias = "gst_rtsp_stream_set_publish_clock_mode")] - fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_stream_set_rate_control")] - fn set_rate_control(&self, enabled: bool); - - #[doc(alias = "gst_rtsp_stream_set_retransmission_pt")] - fn set_retransmission_pt(&self, rtx_pt: u32); - - #[doc(alias = "gst_rtsp_stream_set_retransmission_time")] - fn set_retransmission_time(&self, time: impl Into>); - - #[doc(alias = "gst_rtsp_stream_set_seqnum_offset")] - fn set_seqnum_offset(&self, seqnum: u16); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_set_ulpfec_percentage")] - fn set_ulpfec_percentage(&self, percentage: u32); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_set_ulpfec_pt")] - fn set_ulpfec_pt(&self, pt: u32); - - #[doc(alias = "gst_rtsp_stream_transport_filter")] - fn transport_filter( - &self, - func: Option<&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult)>, - ) -> Vec; - - #[doc(alias = "gst_rtsp_stream_unblock_linked")] - fn unblock_linked(&self) -> Result<(), glib::error::BoolError>; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_rtsp_stream_unblock_rtcp")] - fn unblock_rtcp(&self); - - #[doc(alias = "gst_rtsp_stream_update_crypto")] - fn update_crypto( - &self, - ssrc: u32, - crypto: Option<&gst::Caps>, - ) -> Result<(), glib::error::BoolError>; - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_verify_mcast_ttl")] - fn verify_mcast_ttl(&self, ttl: u32) -> bool; - - #[doc(alias = "new-rtcp-encoder")] - fn connect_new_rtcp_encoder( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "new-rtp-encoder")] - fn connect_new_rtp_encoder( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "new-rtp-rtcp-decoder")] - fn connect_new_rtp_rtcp_decoder( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "control")] - fn connect_control_notify(&self, f: F) - -> SignalHandlerId; - - #[doc(alias = "profiles")] - fn connect_profiles_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "protocols")] - fn connect_protocols_notify( - &self, - f: F, - ) -> SignalHandlerId; -} - -impl> RTSPStreamExt for O { - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] fn add_multicast_client_address( &self, destination: &str, @@ -465,6 +72,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_add_transport")] fn add_transport( &self, trans: &impl IsA, @@ -480,14 +88,18 @@ impl> RTSPStreamExt for O { } } + //#[doc(alias = "gst_rtsp_stream_allocate_udp_sockets")] //fn allocate_udp_sockets(&self, family: gio::SocketFamily, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport, use_client_settings: bool) -> bool { // unsafe { TODO: call ffi:gst_rtsp_stream_allocate_udp_sockets() } //} + //#[doc(alias = "gst_rtsp_stream_complete_stream")] //fn complete_stream(&self, transport: /*Ignored*/&gst_rtsp::RTSPTransport) -> bool { // unsafe { TODO: call ffi:gst_rtsp_stream_complete_stream() } //} + #[doc(alias = "gst_rtsp_stream_get_address_pool")] + #[doc(alias = "get_address_pool")] fn address_pool(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_address_pool( @@ -496,10 +108,14 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_buffer_size")] + #[doc(alias = "get_buffer_size")] fn buffer_size(&self) -> u32 { unsafe { ffi::gst_rtsp_stream_get_buffer_size(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_stream_get_caps")] + #[doc(alias = "get_caps")] fn caps(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_caps( @@ -508,6 +124,8 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_control")] + #[doc(alias = "get_control")] fn control(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_control( @@ -516,18 +134,26 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_current_seqnum")] + #[doc(alias = "get_current_seqnum")] fn current_seqnum(&self) -> u16 { unsafe { ffi::gst_rtsp_stream_get_current_seqnum(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_stream_get_dscp_qos")] + #[doc(alias = "get_dscp_qos")] fn dscp_qos(&self) -> i32 { unsafe { ffi::gst_rtsp_stream_get_dscp_qos(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_stream_get_index")] + #[doc(alias = "get_index")] fn index(&self) -> u32 { unsafe { ffi::gst_rtsp_stream_get_index(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_stream_get_joined_bin")] + #[doc(alias = "get_joined_bin")] fn joined_bin(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_joined_bin( @@ -538,14 +164,20 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_get_max_mcast_ttl")] + #[doc(alias = "get_max_mcast_ttl")] fn max_mcast_ttl(&self) -> u32 { unsafe { ffi::gst_rtsp_stream_get_max_mcast_ttl(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_stream_get_mtu")] + #[doc(alias = "get_mtu")] fn mtu(&self) -> u32 { unsafe { ffi::gst_rtsp_stream_get_mtu(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_stream_get_multicast_address")] + #[doc(alias = "get_multicast_address")] fn multicast_address(&self, family: gio::SocketFamily) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_multicast_address( @@ -557,6 +189,8 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_get_multicast_client_addresses")] + #[doc(alias = "get_multicast_client_addresses")] fn multicast_client_addresses(&self) -> glib::GString { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_multicast_client_addresses( @@ -565,6 +199,8 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_multicast_iface")] + #[doc(alias = "get_multicast_iface")] fn multicast_iface(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_multicast_iface( @@ -573,6 +209,8 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_profiles")] + #[doc(alias = "get_profiles")] fn profiles(&self) -> gst_rtsp::RTSPProfile { unsafe { from_glib(ffi::gst_rtsp_stream_get_profiles( @@ -581,6 +219,8 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_protocols")] + #[doc(alias = "get_protocols")] fn protocols(&self) -> gst_rtsp::RTSPLowerTrans { unsafe { from_glib(ffi::gst_rtsp_stream_get_protocols( @@ -589,10 +229,14 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_pt")] + #[doc(alias = "get_pt")] fn pt(&self) -> u32 { unsafe { ffi::gst_rtsp_stream_get_pt(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_stream_get_publish_clock_mode")] + #[doc(alias = "get_publish_clock_mode")] fn publish_clock_mode(&self) -> RTSPPublishClockMode { unsafe { from_glib(ffi::gst_rtsp_stream_get_publish_clock_mode( @@ -603,6 +247,8 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_stream_get_rate_control")] + #[doc(alias = "get_rate_control")] fn is_rate_control(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_get_rate_control( @@ -613,6 +259,8 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_stream_get_rates")] + #[doc(alias = "get_rates")] fn rates(&self) -> Option<(f64, f64)> { unsafe { let mut rate = mem::MaybeUninit::uninit(); @@ -630,10 +278,14 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_retransmission_pt")] + #[doc(alias = "get_retransmission_pt")] fn retransmission_pt(&self) -> u32 { unsafe { ffi::gst_rtsp_stream_get_retransmission_pt(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_stream_get_retransmission_time")] + #[doc(alias = "get_retransmission_time")] fn retransmission_time(&self) -> Option { unsafe { from_glib(ffi::gst_rtsp_stream_get_retransmission_time( @@ -642,6 +294,8 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_rtcp_multicast_socket")] + #[doc(alias = "get_rtcp_multicast_socket")] fn rtcp_multicast_socket(&self, family: gio::SocketFamily) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_rtcp_multicast_socket( @@ -651,6 +305,8 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_rtcp_socket")] + #[doc(alias = "get_rtcp_socket")] fn rtcp_socket(&self, family: gio::SocketFamily) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_rtcp_socket( @@ -660,6 +316,8 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_rtp_multicast_socket")] + #[doc(alias = "get_rtp_multicast_socket")] fn rtp_multicast_socket(&self, family: gio::SocketFamily) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_rtp_multicast_socket( @@ -669,6 +327,8 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_rtp_socket")] + #[doc(alias = "get_rtp_socket")] fn rtp_socket(&self, family: gio::SocketFamily) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_rtp_socket( @@ -678,6 +338,8 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_rtpinfo")] + #[doc(alias = "get_rtpinfo")] fn rtpinfo(&self) -> Option<(u32, u32, u32, Option)> { unsafe { let mut rtptime = mem::MaybeUninit::uninit(); @@ -704,6 +366,8 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_rtpsession")] + #[doc(alias = "get_rtpsession")] fn rtpsession(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_rtpsession( @@ -712,10 +376,14 @@ impl> RTSPStreamExt for O { } } + //#[doc(alias = "gst_rtsp_stream_get_server_port")] + //#[doc(alias = "get_server_port")] //fn server_port(&self, server_port: /*Ignored*/gst_rtsp::RTSPRange, family: gio::SocketFamily) { // unsafe { TODO: call ffi:gst_rtsp_stream_get_server_port() } //} + #[doc(alias = "gst_rtsp_stream_get_sinkpad")] + #[doc(alias = "get_sinkpad")] fn sinkpad(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_sinkpad( @@ -724,6 +392,8 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_srcpad")] + #[doc(alias = "get_srcpad")] fn srcpad(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_srcpad( @@ -732,6 +402,8 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_srtp_encoder")] + #[doc(alias = "get_srtp_encoder")] fn srtp_encoder(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_get_srtp_encoder( @@ -740,6 +412,8 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_ssrc")] + #[doc(alias = "get_ssrc")] fn ssrc(&self) -> u32 { unsafe { let mut ssrc = mem::MaybeUninit::uninit(); @@ -748,6 +422,8 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_get_ulpfec_enabled")] + #[doc(alias = "get_ulpfec_enabled")] fn is_ulpfec_enabled(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_get_ulpfec_enabled( @@ -758,18 +434,23 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_get_ulpfec_percentage")] + #[doc(alias = "get_ulpfec_percentage")] fn ulpfec_percentage(&self) -> u32 { unsafe { ffi::gst_rtsp_stream_get_ulpfec_percentage(self.as_ref().to_glib_none().0) } } #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_get_ulpfec_pt")] + #[doc(alias = "get_ulpfec_pt")] fn ulpfec_pt(&self) -> u32 { unsafe { ffi::gst_rtsp_stream_get_ulpfec_pt(self.as_ref().to_glib_none().0) } } #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_handle_keymgmt")] fn handle_keymgmt(&self, keymgmt: &str) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_handle_keymgmt( @@ -779,6 +460,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_has_control")] fn has_control(&self, control: Option<&str>) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_has_control( @@ -790,6 +472,7 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_is_bind_mcast_address")] fn is_bind_mcast_address(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_is_bind_mcast_address( @@ -798,6 +481,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_is_blocking")] fn is_blocking(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_is_blocking( @@ -806,6 +490,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_is_client_side")] fn is_client_side(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_is_client_side( @@ -814,6 +499,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_is_complete")] fn is_complete(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_is_complete( @@ -822,6 +508,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_is_receiver")] fn is_receiver(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_is_receiver( @@ -830,6 +517,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_is_sender")] fn is_sender(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_is_sender( @@ -838,10 +526,12 @@ impl> RTSPStreamExt for O { } } + //#[doc(alias = "gst_rtsp_stream_is_transport_supported")] //fn is_transport_supported(&self, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> bool { // unsafe { TODO: call ffi:gst_rtsp_stream_is_transport_supported() } //} + #[doc(alias = "gst_rtsp_stream_join_bin")] fn join_bin( &self, bin: &impl IsA, @@ -861,6 +551,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_leave_bin")] fn leave_bin( &self, bin: &impl IsA, @@ -878,6 +569,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_recv_rtcp")] fn recv_rtcp(&self, buffer: gst::Buffer) -> Result { unsafe { try_from_glib(ffi::gst_rtsp_stream_recv_rtcp( @@ -887,6 +579,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_recv_rtp")] fn recv_rtp(&self, buffer: gst::Buffer) -> Result { unsafe { try_from_glib(ffi::gst_rtsp_stream_recv_rtp( @@ -896,6 +589,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_remove_transport")] fn remove_transport( &self, trans: &impl IsA, @@ -913,6 +607,7 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_request_aux_receiver")] fn request_aux_receiver(&self, sessid: u32) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_request_aux_receiver( @@ -922,6 +617,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_request_aux_sender")] fn request_aux_sender(&self, sessid: u32) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_request_aux_sender( @@ -933,6 +629,7 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_request_ulpfec_decoder")] fn request_ulpfec_decoder( &self, rtpbin: &impl IsA, @@ -949,6 +646,7 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_request_ulpfec_encoder")] fn request_ulpfec_encoder(&self, sessid: u32) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_request_ulpfec_encoder( @@ -958,6 +656,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_reserve_address")] fn reserve_address( &self, address: &str, @@ -976,6 +675,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_seekable")] fn seekable(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_seekable( @@ -984,6 +684,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_set_address_pool")] fn set_address_pool(&self, pool: Option<&impl IsA>) { unsafe { ffi::gst_rtsp_stream_set_address_pool( @@ -995,6 +696,7 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_set_bind_mcast_address")] fn set_bind_mcast_address(&self, bind_mcast_addr: bool) { unsafe { ffi::gst_rtsp_stream_set_bind_mcast_address( @@ -1004,6 +706,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_set_blocked")] fn set_blocked(&self, blocked: bool) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -1016,12 +719,14 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_set_buffer_size")] fn set_buffer_size(&self, size: u32) { unsafe { ffi::gst_rtsp_stream_set_buffer_size(self.as_ref().to_glib_none().0, size); } } + #[doc(alias = "gst_rtsp_stream_set_client_side")] fn set_client_side(&self, client_side: bool) { unsafe { ffi::gst_rtsp_stream_set_client_side( @@ -1031,6 +736,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_set_control")] fn set_control(&self, control: Option<&str>) { unsafe { ffi::gst_rtsp_stream_set_control( @@ -1040,6 +746,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_set_dscp_qos")] fn set_dscp_qos(&self, dscp_qos: i32) { unsafe { ffi::gst_rtsp_stream_set_dscp_qos(self.as_ref().to_glib_none().0, dscp_qos); @@ -1048,6 +755,7 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_set_max_mcast_ttl")] fn set_max_mcast_ttl(&self, ttl: u32) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_set_max_mcast_ttl( @@ -1057,12 +765,14 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_set_mtu")] fn set_mtu(&self, mtu: u32) { unsafe { ffi::gst_rtsp_stream_set_mtu(self.as_ref().to_glib_none().0, mtu); } } + #[doc(alias = "gst_rtsp_stream_set_multicast_iface")] fn set_multicast_iface(&self, multicast_iface: Option<&str>) { unsafe { ffi::gst_rtsp_stream_set_multicast_iface( @@ -1072,12 +782,14 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_set_profiles")] fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile) { unsafe { ffi::gst_rtsp_stream_set_profiles(self.as_ref().to_glib_none().0, profiles.into_glib()); } } + #[doc(alias = "gst_rtsp_stream_set_protocols")] fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans) { unsafe { ffi::gst_rtsp_stream_set_protocols( @@ -1087,6 +799,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_set_pt_map")] fn set_pt_map(&self, pt: u32, caps: &gst::Caps) { unsafe { ffi::gst_rtsp_stream_set_pt_map( @@ -1097,6 +810,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_set_publish_clock_mode")] fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) { unsafe { ffi::gst_rtsp_stream_set_publish_clock_mode( @@ -1108,6 +822,7 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_stream_set_rate_control")] fn set_rate_control(&self, enabled: bool) { unsafe { ffi::gst_rtsp_stream_set_rate_control( @@ -1117,12 +832,14 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_set_retransmission_pt")] fn set_retransmission_pt(&self, rtx_pt: u32) { unsafe { ffi::gst_rtsp_stream_set_retransmission_pt(self.as_ref().to_glib_none().0, rtx_pt); } } + #[doc(alias = "gst_rtsp_stream_set_retransmission_time")] fn set_retransmission_time(&self, time: impl Into>) { unsafe { ffi::gst_rtsp_stream_set_retransmission_time( @@ -1132,6 +849,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_set_seqnum_offset")] fn set_seqnum_offset(&self, seqnum: u16) { unsafe { ffi::gst_rtsp_stream_set_seqnum_offset(self.as_ref().to_glib_none().0, seqnum); @@ -1140,6 +858,7 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_set_ulpfec_percentage")] fn set_ulpfec_percentage(&self, percentage: u32) { unsafe { ffi::gst_rtsp_stream_set_ulpfec_percentage(self.as_ref().to_glib_none().0, percentage); @@ -1148,12 +867,14 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_set_ulpfec_pt")] fn set_ulpfec_pt(&self, pt: u32) { unsafe { ffi::gst_rtsp_stream_set_ulpfec_pt(self.as_ref().to_glib_none().0, pt); } } + #[doc(alias = "gst_rtsp_stream_transport_filter")] fn transport_filter( &self, func: Option<&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult)>, @@ -1198,6 +919,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "gst_rtsp_stream_unblock_linked")] fn unblock_linked(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -1209,12 +931,14 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_rtsp_stream_unblock_rtcp")] fn unblock_rtcp(&self) { unsafe { ffi::gst_rtsp_stream_unblock_rtcp(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_rtsp_stream_update_crypto")] fn update_crypto( &self, ssrc: u32, @@ -1234,6 +958,7 @@ impl> RTSPStreamExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_verify_mcast_ttl")] fn verify_mcast_ttl(&self, ttl: u32) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_verify_mcast_ttl( @@ -1243,6 +968,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "new-rtcp-encoder")] fn connect_new_rtcp_encoder( &self, f: F, @@ -1274,6 +1000,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "new-rtp-encoder")] fn connect_new_rtp_encoder( &self, f: F, @@ -1305,6 +1032,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "new-rtp-rtcp-decoder")] fn connect_new_rtp_rtcp_decoder( &self, f: F, @@ -1336,6 +1064,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "control")] fn connect_control_notify( &self, f: F, @@ -1364,6 +1093,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "profiles")] fn connect_profiles_notify( &self, f: F, @@ -1392,6 +1122,7 @@ impl> RTSPStreamExt for O { } } + #[doc(alias = "protocols")] fn connect_protocols_notify( &self, f: F, @@ -1420,3 +1151,5 @@ impl> RTSPStreamExt for O { } } } + +impl> RTSPStreamExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs index f020ddadb..033cce783 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs @@ -25,90 +25,14 @@ impl RTSPStreamTransport { //} } -pub trait RTSPStreamTransportExt: 'static { - #[doc(alias = "gst_rtsp_stream_transport_get_rtpinfo")] - #[doc(alias = "get_rtpinfo")] - fn rtpinfo(&self, start_time: impl Into>) -> Option; - - #[doc(alias = "gst_rtsp_stream_transport_get_stream")] - #[doc(alias = "get_stream")] - fn stream(&self) -> Option; - - //#[doc(alias = "gst_rtsp_stream_transport_get_transport")] - //#[doc(alias = "get_transport")] - //fn transport(&self) -> /*Ignored*/Option; - - #[doc(alias = "gst_rtsp_stream_transport_get_url")] - #[doc(alias = "get_url")] - fn url(&self) -> Option; - - #[doc(alias = "gst_rtsp_stream_transport_is_timed_out")] - fn is_timed_out(&self) -> bool; - - #[doc(alias = "gst_rtsp_stream_transport_keep_alive")] - fn keep_alive(&self); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_rtsp_stream_transport_message_sent")] - fn message_sent(&self); - - #[doc(alias = "gst_rtsp_stream_transport_recv_data")] - fn recv_data( - &self, - channel: u32, - buffer: gst::Buffer, - ) -> Result; - - #[doc(alias = "gst_rtsp_stream_transport_send_rtcp")] - fn send_rtcp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError>; - - //#[cfg(feature = "v1_16")] - //#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - //#[doc(alias = "gst_rtsp_stream_transport_send_rtcp_list")] - //fn send_rtcp_list(&self, buffer_list: /*Ignored*/&gst::BufferList) -> bool; - - #[doc(alias = "gst_rtsp_stream_transport_send_rtp")] - fn send_rtp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError>; - - //#[cfg(feature = "v1_16")] - //#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - //#[doc(alias = "gst_rtsp_stream_transport_send_rtp_list")] - //fn send_rtp_list(&self, buffer_list: /*Ignored*/&gst::BufferList) -> bool; - - #[doc(alias = "gst_rtsp_stream_transport_set_active")] - fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError>; - - //#[doc(alias = "gst_rtsp_stream_transport_set_callbacks")] - //fn set_callbacks bool + 'static, Q: Fn(&gst::Buffer, u8) -> bool + 'static>(&self, send_rtp: P, send_rtcp: Q); - - #[doc(alias = "gst_rtsp_stream_transport_set_keepalive")] - fn set_keepalive(&self, keep_alive: P); - - //#[cfg(feature = "v1_16")] - //#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - //#[doc(alias = "gst_rtsp_stream_transport_set_list_callbacks")] - //fn set_list_callbacks(&self, send_rtp_list: /*Unimplemented*/Fn(/*Ignored*/gst::BufferList, u8) -> bool, send_rtcp_list: /*Unimplemented*/Fn(/*Ignored*/gst::BufferList, u8) -> bool, user_data: /*Unimplemented*/Option); - - #[doc(alias = "gst_rtsp_stream_transport_set_message_sent")] - fn set_message_sent(&self, message_sent: P); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_rtsp_stream_transport_set_message_sent_full")] - fn set_message_sent_full(&self, message_sent: P); - - #[doc(alias = "gst_rtsp_stream_transport_set_timed_out")] - fn set_timed_out(&self, timedout: bool); - - //#[doc(alias = "gst_rtsp_stream_transport_set_transport")] - //fn set_transport(&self, tr: /*Ignored*/gst_rtsp::RTSPTransport); - - #[doc(alias = "gst_rtsp_stream_transport_set_url")] - fn set_url(&self, url: Option<&gst_rtsp::RTSPUrl>); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTSPStreamTransportExt for O { +pub trait RTSPStreamTransportExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_rtsp_stream_transport_get_rtpinfo")] + #[doc(alias = "get_rtpinfo")] fn rtpinfo(&self, start_time: impl Into>) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_stream_transport_get_rtpinfo( @@ -118,6 +42,8 @@ impl> RTSPStreamTransportExt for O { } } + #[doc(alias = "gst_rtsp_stream_transport_get_stream")] + #[doc(alias = "get_stream")] fn stream(&self) -> Option { unsafe { from_glib_none(ffi::gst_rtsp_stream_transport_get_stream( @@ -126,10 +52,14 @@ impl> RTSPStreamTransportExt for O { } } + //#[doc(alias = "gst_rtsp_stream_transport_get_transport")] + //#[doc(alias = "get_transport")] //fn transport(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi:gst_rtsp_stream_transport_get_transport() } //} + #[doc(alias = "gst_rtsp_stream_transport_get_url")] + #[doc(alias = "get_url")] fn url(&self) -> Option { unsafe { from_glib_none(ffi::gst_rtsp_stream_transport_get_url( @@ -138,6 +68,7 @@ impl> RTSPStreamTransportExt for O { } } + #[doc(alias = "gst_rtsp_stream_transport_is_timed_out")] fn is_timed_out(&self) -> bool { unsafe { from_glib(ffi::gst_rtsp_stream_transport_is_timed_out( @@ -146,6 +77,7 @@ impl> RTSPStreamTransportExt for O { } } + #[doc(alias = "gst_rtsp_stream_transport_keep_alive")] fn keep_alive(&self) { unsafe { ffi::gst_rtsp_stream_transport_keep_alive(self.as_ref().to_glib_none().0); @@ -154,12 +86,14 @@ impl> RTSPStreamTransportExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_rtsp_stream_transport_message_sent")] fn message_sent(&self) { unsafe { ffi::gst_rtsp_stream_transport_message_sent(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_rtsp_stream_transport_recv_data")] fn recv_data( &self, channel: u32, @@ -174,6 +108,7 @@ impl> RTSPStreamTransportExt for O { } } + #[doc(alias = "gst_rtsp_stream_transport_send_rtcp")] fn send_rtcp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -188,10 +123,12 @@ impl> RTSPStreamTransportExt for O { //#[cfg(feature = "v1_16")] //#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + //#[doc(alias = "gst_rtsp_stream_transport_send_rtcp_list")] //fn send_rtcp_list(&self, buffer_list: /*Ignored*/&gst::BufferList) -> bool { // unsafe { TODO: call ffi:gst_rtsp_stream_transport_send_rtcp_list() } //} + #[doc(alias = "gst_rtsp_stream_transport_send_rtp")] fn send_rtp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -206,10 +143,12 @@ impl> RTSPStreamTransportExt for O { //#[cfg(feature = "v1_16")] //#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + //#[doc(alias = "gst_rtsp_stream_transport_send_rtp_list")] //fn send_rtp_list(&self, buffer_list: /*Ignored*/&gst::BufferList) -> bool { // unsafe { TODO: call ffi:gst_rtsp_stream_transport_send_rtp_list() } //} + #[doc(alias = "gst_rtsp_stream_transport_set_active")] fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -222,10 +161,12 @@ impl> RTSPStreamTransportExt for O { } } + //#[doc(alias = "gst_rtsp_stream_transport_set_callbacks")] //fn set_callbacks bool + 'static, Q: Fn(&gst::Buffer, u8) -> bool + 'static>(&self, send_rtp: P, send_rtcp: Q) { // unsafe { TODO: call ffi:gst_rtsp_stream_transport_set_callbacks() } //} + #[doc(alias = "gst_rtsp_stream_transport_set_keepalive")] fn set_keepalive(&self, keep_alive: P) { let keep_alive_data: Box_

= Box_::new(keep_alive); unsafe extern "C" fn keep_alive_func(user_data: glib::ffi::gpointer) { @@ -250,10 +191,12 @@ impl> RTSPStreamTransportExt for O { //#[cfg(feature = "v1_16")] //#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + //#[doc(alias = "gst_rtsp_stream_transport_set_list_callbacks")] //fn set_list_callbacks(&self, send_rtp_list: /*Unimplemented*/Fn(/*Ignored*/gst::BufferList, u8) -> bool, send_rtcp_list: /*Unimplemented*/Fn(/*Ignored*/gst::BufferList, u8) -> bool, user_data: /*Unimplemented*/Option) { // unsafe { TODO: call ffi:gst_rtsp_stream_transport_set_list_callbacks() } //} + #[doc(alias = "gst_rtsp_stream_transport_set_message_sent")] fn set_message_sent(&self, message_sent: P) { let message_sent_data: Box_

= Box_::new(message_sent); unsafe extern "C" fn message_sent_func(user_data: glib::ffi::gpointer) { @@ -278,6 +221,7 @@ impl> RTSPStreamTransportExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_rtsp_stream_transport_set_message_sent_full")] fn set_message_sent_full(&self, message_sent: P) { let message_sent_data: Box_

= Box_::new(message_sent); unsafe extern "C" fn message_sent_func( @@ -306,6 +250,7 @@ impl> RTSPStreamTransportExt for O { } } + #[doc(alias = "gst_rtsp_stream_transport_set_timed_out")] fn set_timed_out(&self, timedout: bool) { unsafe { ffi::gst_rtsp_stream_transport_set_timed_out( @@ -315,10 +260,12 @@ impl> RTSPStreamTransportExt for O { } } + //#[doc(alias = "gst_rtsp_stream_transport_set_transport")] //fn set_transport(&self, tr: /*Ignored*/gst_rtsp::RTSPTransport) { // unsafe { TODO: call ffi:gst_rtsp_stream_transport_set_transport() } //} + #[doc(alias = "gst_rtsp_stream_transport_set_url")] fn set_url(&self, url: Option<&gst_rtsp::RTSPUrl>) { unsafe { ffi::gst_rtsp_stream_transport_set_url( @@ -328,3 +275,5 @@ impl> RTSPStreamTransportExt for O { } } } + +impl> RTSPStreamTransportExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs index ca5e84568..25927be92 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs @@ -47,30 +47,20 @@ impl Default for RTSPThreadPool { unsafe impl Send for RTSPThreadPool {} unsafe impl Sync for RTSPThreadPool {} -pub trait RTSPThreadPoolExt: 'static { - #[doc(alias = "gst_rtsp_thread_pool_get_max_threads")] - #[doc(alias = "get_max_threads")] - fn max_threads(&self) -> i32; - - #[doc(alias = "gst_rtsp_thread_pool_get_thread")] - #[doc(alias = "get_thread")] - fn thread(&self, type_: RTSPThreadType, ctx: &RTSPContext) -> Option; - - #[doc(alias = "gst_rtsp_thread_pool_set_max_threads")] - fn set_max_threads(&self, max_threads: i32); - - #[doc(alias = "max-threads")] - fn connect_max_threads_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RTSPThreadPoolExt for O { +pub trait RTSPThreadPoolExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_rtsp_thread_pool_get_max_threads")] + #[doc(alias = "get_max_threads")] fn max_threads(&self) -> i32 { unsafe { ffi::gst_rtsp_thread_pool_get_max_threads(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_rtsp_thread_pool_get_thread")] + #[doc(alias = "get_thread")] fn thread(&self, type_: RTSPThreadType, ctx: &RTSPContext) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_thread_pool_get_thread( @@ -81,12 +71,14 @@ impl> RTSPThreadPoolExt for O { } } + #[doc(alias = "gst_rtsp_thread_pool_set_max_threads")] fn set_max_threads(&self, max_threads: i32) { unsafe { ffi::gst_rtsp_thread_pool_set_max_threads(self.as_ref().to_glib_none().0, max_threads); } } + #[doc(alias = "max-threads")] fn connect_max_threads_notify( &self, f: F, @@ -115,3 +107,5 @@ impl> RTSPThreadPoolExt for O { } } } + +impl> RTSPThreadPoolExt for O {} diff --git a/gstreamer-rtsp-server/src/auto/versions.txt b/gstreamer-rtsp-server/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-rtsp-server/src/auto/versions.txt +++ b/gstreamer-rtsp-server/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-rtsp-server/sys/src/auto/versions.txt b/gstreamer-rtsp-server/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-rtsp-server/sys/src/auto/versions.txt +++ b/gstreamer-rtsp-server/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-rtsp-server/sys/tests/abi.rs b/gstreamer-rtsp-server/sys/tests/abi.rs index f32c1e352..438767a9b 100644 --- a/gstreamer-rtsp-server/sys/tests/abi.rs +++ b/gstreamer-rtsp-server/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_rtsp_server_sys::*; use std::env; diff --git a/gstreamer-rtsp/src/auto/versions.txt b/gstreamer-rtsp/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-rtsp/src/auto/versions.txt +++ b/gstreamer-rtsp/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-rtsp/sys/src/auto/versions.txt b/gstreamer-rtsp/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-rtsp/sys/src/auto/versions.txt +++ b/gstreamer-rtsp/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-rtsp/sys/tests/abi.rs b/gstreamer-rtsp/sys/tests/abi.rs index e255c6a7b..c2f34fcc4 100644 --- a/gstreamer-rtsp/sys/tests/abi.rs +++ b/gstreamer-rtsp/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_rtsp_sys::*; use std::env; diff --git a/gstreamer-sdp/src/auto/versions.txt b/gstreamer-sdp/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-sdp/src/auto/versions.txt +++ b/gstreamer-sdp/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-sdp/sys/src/auto/versions.txt b/gstreamer-sdp/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-sdp/sys/src/auto/versions.txt +++ b/gstreamer-sdp/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-sdp/sys/tests/abi.rs b/gstreamer-sdp/sys/tests/abi.rs index f68ea12a0..47743aec0 100644 --- a/gstreamer-sdp/sys/tests/abi.rs +++ b/gstreamer-sdp/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_sdp_sys::*; use std::env; diff --git a/gstreamer-tag/sys/src/auto/versions.txt b/gstreamer-tag/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-tag/sys/src/auto/versions.txt +++ b/gstreamer-tag/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-tag/sys/tests/abi.rs b/gstreamer-tag/sys/tests/abi.rs index 11d11e9f7..22cff4f50 100644 --- a/gstreamer-tag/sys/tests/abi.rs +++ b/gstreamer-tag/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_tag_sys::*; use std::env; diff --git a/gstreamer-validate/src/auto/bin_monitor.rs b/gstreamer-validate/src/auto/bin_monitor.rs index 1866c522a..45b4ba2e5 100644 --- a/gstreamer-validate/src/auto/bin_monitor.rs +++ b/gstreamer-validate/src/auto/bin_monitor.rs @@ -43,22 +43,14 @@ impl BinMonitor { unsafe impl Send for BinMonitor {} unsafe impl Sync for BinMonitor {} -pub trait BinMonitorExt: 'static { - #[doc(alias = "gst_validate_bin_monitor_get_scenario")] - #[doc(alias = "get_scenario")] - fn scenario(&self) -> Option; - - #[doc(alias = "handles-states")] - fn is_handles_states(&self) -> bool; - - #[doc(alias = "handles-states")] - fn connect_handles_states_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> BinMonitorExt for O { +pub trait BinMonitorExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_validate_bin_monitor_get_scenario")] + #[doc(alias = "get_scenario")] fn scenario(&self) -> Option { unsafe { from_glib_full(ffi::gst_validate_bin_monitor_get_scenario( @@ -67,10 +59,12 @@ impl> BinMonitorExt for O { } } + #[doc(alias = "handles-states")] fn is_handles_states(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "handles-states") } + #[doc(alias = "handles-states")] fn connect_handles_states_notify( &self, f: F, @@ -99,3 +93,5 @@ impl> BinMonitorExt for O { } } } + +impl> BinMonitorExt for O {} diff --git a/gstreamer-validate/src/auto/monitor.rs b/gstreamer-validate/src/auto/monitor.rs index 491e25f52..70e81a40f 100644 --- a/gstreamer-validate/src/auto/monitor.rs +++ b/gstreamer-validate/src/auto/monitor.rs @@ -43,58 +43,19 @@ impl Monitor { unsafe impl Send for Monitor {} unsafe impl Sync for Monitor {} -pub trait MonitorExt: 'static { - //#[doc(alias = "gst_validate_monitor_attach_override")] - //fn attach_override(&self, override_: /*Ignored*/&Override); - - #[doc(alias = "gst_validate_monitor_get_element")] - #[doc(alias = "get_element")] - fn element(&self) -> Option; - - #[doc(alias = "gst_validate_monitor_get_element_name")] - #[doc(alias = "get_element_name")] - fn element_name(&self) -> Option; - - #[doc(alias = "gst_validate_monitor_get_pipeline")] - #[doc(alias = "get_pipeline")] - fn pipeline(&self) -> Option; - - #[doc(alias = "gst_validate_monitor_get_target")] - #[doc(alias = "get_target")] - fn target(&self) -> Option; - - //#[doc(alias = "gst_validate_monitor_set_media_descriptor")] - //fn set_media_descriptor(&self, media_descriptor: /*Ignored*/&MediaDescriptor); - - fn object(&self) -> Option; - - fn set_pipeline>(&self, pipeline: Option<&P>); - - #[doc(alias = "validate-parent")] - fn validate_parent(&self) -> Option; - - //fn verbosity(&self) -> /*Ignored*/VerbosityFlags; - - //fn set_verbosity(&self, verbosity: /*Ignored*/VerbosityFlags); - - #[doc(alias = "pipeline")] - fn connect_pipeline_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "verbosity")] - fn connect_verbosity_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> MonitorExt for O { +pub trait MonitorExt: IsA + sealed::Sealed + 'static { + //#[doc(alias = "gst_validate_monitor_attach_override")] //fn attach_override(&self, override_: /*Ignored*/&Override) { // unsafe { TODO: call ffi:gst_validate_monitor_attach_override() } //} + #[doc(alias = "gst_validate_monitor_get_element")] + #[doc(alias = "get_element")] fn element(&self) -> Option { unsafe { from_glib_none(ffi::gst_validate_monitor_get_element( @@ -103,6 +64,8 @@ impl> MonitorExt for O { } } + #[doc(alias = "gst_validate_monitor_get_element_name")] + #[doc(alias = "get_element_name")] fn element_name(&self) -> Option { unsafe { from_glib_full(ffi::gst_validate_monitor_get_element_name( @@ -111,6 +74,8 @@ impl> MonitorExt for O { } } + #[doc(alias = "gst_validate_monitor_get_pipeline")] + #[doc(alias = "get_pipeline")] fn pipeline(&self) -> Option { unsafe { from_glib_full(ffi::gst_validate_monitor_get_pipeline( @@ -119,6 +84,8 @@ impl> MonitorExt for O { } } + #[doc(alias = "gst_validate_monitor_get_target")] + #[doc(alias = "get_target")] fn target(&self) -> Option { unsafe { from_glib_full(ffi::gst_validate_monitor_get_target( @@ -127,6 +94,7 @@ impl> MonitorExt for O { } } + //#[doc(alias = "gst_validate_monitor_set_media_descriptor")] //fn set_media_descriptor(&self, media_descriptor: /*Ignored*/&MediaDescriptor) { // unsafe { TODO: call ffi:gst_validate_monitor_set_media_descriptor() } //} @@ -139,6 +107,7 @@ impl> MonitorExt for O { glib::ObjectExt::set_property(self.as_ref(), "pipeline", pipeline) } + #[doc(alias = "validate-parent")] fn validate_parent(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "validate-parent") } @@ -151,6 +120,7 @@ impl> MonitorExt for O { // glib::ObjectExt::set_property(self.as_ref(),"verbosity", verbosity) //} + #[doc(alias = "pipeline")] fn connect_pipeline_notify( &self, f: F, @@ -179,6 +149,7 @@ impl> MonitorExt for O { } } + #[doc(alias = "verbosity")] fn connect_verbosity_notify( &self, f: F, @@ -207,3 +178,5 @@ impl> MonitorExt for O { } } } + +impl> MonitorExt for O {} diff --git a/gstreamer-validate/src/auto/reporter.rs b/gstreamer-validate/src/auto/reporter.rs index 0bd8e55f1..44c61b55c 100644 --- a/gstreamer-validate/src/auto/reporter.rs +++ b/gstreamer-validate/src/auto/reporter.rs @@ -22,58 +22,14 @@ impl Reporter { unsafe impl Send for Reporter {} unsafe impl Sync for Reporter {} -pub trait ReporterExt: 'static { - #[doc(alias = "gst_validate_reporter_get_name")] - #[doc(alias = "get_name")] - fn name(&self) -> Option; - - #[doc(alias = "gst_validate_reporter_get_pipeline")] - #[doc(alias = "get_pipeline")] - fn pipeline(&self) -> Option; - - //#[doc(alias = "gst_validate_reporter_get_report")] - //#[doc(alias = "get_report")] - //fn report(&self, issue_id: /*Ignored*/IssueId) -> Option; - - #[doc(alias = "gst_validate_reporter_get_reporting_level")] - #[doc(alias = "get_reporting_level")] - fn reporting_level(&self) -> ReportingDetails; - - #[doc(alias = "gst_validate_reporter_get_reports")] - #[doc(alias = "get_reports")] - fn reports(&self) -> Vec; - - #[doc(alias = "gst_validate_reporter_get_reports_count")] - #[doc(alias = "get_reports_count")] - fn reports_count(&self) -> i32; - - #[doc(alias = "gst_validate_reporter_get_runner")] - #[doc(alias = "get_runner")] - fn runner(&self) -> Option; - - #[doc(alias = "gst_validate_reporter_init")] - fn init(&self, name: &str); - - #[doc(alias = "gst_validate_reporter_purge_reports")] - fn purge_reports(&self); - - //#[doc(alias = "gst_validate_reporter_report_simple")] - //fn report_simple(&self, issue_id: /*Ignored*/IssueId, message: &str); - - #[doc(alias = "gst_validate_reporter_set_handle_g_logs")] - fn set_handle_g_logs(&self); - - #[doc(alias = "gst_validate_reporter_set_name")] - fn set_name(&self, name: Option); - - #[doc(alias = "gst_validate_reporter_set_runner")] - fn set_runner(&self, runner: &impl IsA); - - #[doc(alias = "validate-runner")] - fn validate_runner(&self) -> Option; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> ReporterExt for O { +pub trait ReporterExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_validate_reporter_get_name")] + #[doc(alias = "get_name")] fn name(&self) -> Option { unsafe { from_glib_none(ffi::gst_validate_reporter_get_name( @@ -82,6 +38,8 @@ impl> ReporterExt for O { } } + #[doc(alias = "gst_validate_reporter_get_pipeline")] + #[doc(alias = "get_pipeline")] fn pipeline(&self) -> Option { unsafe { from_glib_full(ffi::gst_validate_reporter_get_pipeline( @@ -90,10 +48,14 @@ impl> ReporterExt for O { } } + //#[doc(alias = "gst_validate_reporter_get_report")] + //#[doc(alias = "get_report")] //fn report(&self, issue_id: /*Ignored*/IssueId) -> Option { // unsafe { TODO: call ffi:gst_validate_reporter_get_report() } //} + #[doc(alias = "gst_validate_reporter_get_reporting_level")] + #[doc(alias = "get_reporting_level")] fn reporting_level(&self) -> ReportingDetails { unsafe { from_glib(ffi::gst_validate_reporter_get_reporting_level( @@ -102,6 +64,8 @@ impl> ReporterExt for O { } } + #[doc(alias = "gst_validate_reporter_get_reports")] + #[doc(alias = "get_reports")] fn reports(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_validate_reporter_get_reports( @@ -110,10 +74,14 @@ impl> ReporterExt for O { } } + #[doc(alias = "gst_validate_reporter_get_reports_count")] + #[doc(alias = "get_reports_count")] fn reports_count(&self) -> i32 { unsafe { ffi::gst_validate_reporter_get_reports_count(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_validate_reporter_get_runner")] + #[doc(alias = "get_runner")] fn runner(&self) -> Option { unsafe { from_glib_full(ffi::gst_validate_reporter_get_runner( @@ -122,28 +90,33 @@ impl> ReporterExt for O { } } + #[doc(alias = "gst_validate_reporter_init")] fn init(&self, name: &str) { unsafe { ffi::gst_validate_reporter_init(self.as_ref().to_glib_none().0, name.to_glib_none().0); } } + #[doc(alias = "gst_validate_reporter_purge_reports")] fn purge_reports(&self) { unsafe { ffi::gst_validate_reporter_purge_reports(self.as_ref().to_glib_none().0); } } + //#[doc(alias = "gst_validate_reporter_report_simple")] //fn report_simple(&self, issue_id: /*Ignored*/IssueId, message: &str) { // unsafe { TODO: call ffi:gst_validate_reporter_report_simple() } //} + #[doc(alias = "gst_validate_reporter_set_handle_g_logs")] fn set_handle_g_logs(&self) { unsafe { ffi::gst_validate_reporter_set_handle_g_logs(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_validate_reporter_set_name")] fn set_name(&self, name: Option) { unsafe { ffi::gst_validate_reporter_set_name( @@ -153,6 +126,7 @@ impl> ReporterExt for O { } } + #[doc(alias = "gst_validate_reporter_set_runner")] fn set_runner(&self, runner: &impl IsA) { unsafe { ffi::gst_validate_reporter_set_runner( @@ -162,7 +136,10 @@ impl> ReporterExt for O { } } + #[doc(alias = "validate-runner")] fn validate_runner(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "validate-runner") } } + +impl> ReporterExt for O {} diff --git a/gstreamer-validate/src/auto/runner.rs b/gstreamer-validate/src/auto/runner.rs index a7b777a50..caa41d22f 100644 --- a/gstreamer-validate/src/auto/runner.rs +++ b/gstreamer-validate/src/auto/runner.rs @@ -39,43 +39,13 @@ impl Default for Runner { unsafe impl Send for Runner {} unsafe impl Sync for Runner {} -pub trait RunnerExt: 'static { - #[doc(alias = "gst_validate_runner_add_report")] - fn add_report(&self, report: &Report); - - #[doc(alias = "gst_validate_runner_exit")] - fn exit(&self, print_result: bool) -> i32; - - #[doc(alias = "gst_validate_runner_get_default_reporting_level")] - #[doc(alias = "get_default_reporting_level")] - fn default_reporting_level(&self) -> ReportingDetails; - - #[doc(alias = "gst_validate_runner_get_reporting_level_for_name")] - #[doc(alias = "get_reporting_level_for_name")] - fn reporting_level_for_name(&self, name: &str) -> ReportingDetails; - - #[doc(alias = "gst_validate_runner_get_reports")] - #[doc(alias = "get_reports")] - fn reports(&self) -> Vec; - - #[doc(alias = "gst_validate_runner_get_reports_count")] - #[doc(alias = "get_reports_count")] - fn reports_count(&self) -> u32; - - #[doc(alias = "gst_validate_runner_printf")] - fn printf(&self) -> i32; - - #[doc(alias = "report-added")] - fn connect_report_added( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "stopping")] - fn connect_stopping(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> RunnerExt for O { +pub trait RunnerExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_validate_runner_add_report")] fn add_report(&self, report: &Report) { unsafe { ffi::gst_validate_runner_add_report( @@ -85,12 +55,15 @@ impl> RunnerExt for O { } } + #[doc(alias = "gst_validate_runner_exit")] fn exit(&self, print_result: bool) -> i32 { unsafe { ffi::gst_validate_runner_exit(self.as_ref().to_glib_none().0, print_result.into_glib()) } } + #[doc(alias = "gst_validate_runner_get_default_reporting_level")] + #[doc(alias = "get_default_reporting_level")] fn default_reporting_level(&self) -> ReportingDetails { unsafe { from_glib(ffi::gst_validate_runner_get_default_reporting_level( @@ -99,6 +72,8 @@ impl> RunnerExt for O { } } + #[doc(alias = "gst_validate_runner_get_reporting_level_for_name")] + #[doc(alias = "get_reporting_level_for_name")] fn reporting_level_for_name(&self, name: &str) -> ReportingDetails { unsafe { from_glib(ffi::gst_validate_runner_get_reporting_level_for_name( @@ -108,6 +83,8 @@ impl> RunnerExt for O { } } + #[doc(alias = "gst_validate_runner_get_reports")] + #[doc(alias = "get_reports")] fn reports(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_validate_runner_get_reports( @@ -116,14 +93,18 @@ impl> RunnerExt for O { } } + #[doc(alias = "gst_validate_runner_get_reports_count")] + #[doc(alias = "get_reports_count")] fn reports_count(&self) -> u32 { unsafe { ffi::gst_validate_runner_get_reports_count(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_validate_runner_printf")] fn printf(&self) -> i32 { unsafe { ffi::gst_validate_runner_printf(self.as_ref().to_glib_none().0) } } + #[doc(alias = "report-added")] fn connect_report_added( &self, f: F, @@ -155,6 +136,7 @@ impl> RunnerExt for O { } } + #[doc(alias = "stopping")] fn connect_stopping(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn stopping_trampoline< P: IsA, @@ -179,3 +161,5 @@ impl> RunnerExt for O { } } } + +impl> RunnerExt for O {} diff --git a/gstreamer-validate/src/auto/scenario.rs b/gstreamer-validate/src/auto/scenario.rs index 66cf8ecfe..1a49a3352 100644 --- a/gstreamer-validate/src/auto/scenario.rs +++ b/gstreamer-validate/src/auto/scenario.rs @@ -48,49 +48,19 @@ impl Scenario { } } -pub trait ScenarioExt: 'static { - //#[doc(alias = "gst_validate_scenario_execute_seek")] - //fn execute_seek(&self, action: &Action, rate: f64, format: gst::Format, flags: gst::SeekFlags, start_type: gst::SeekType, start: /*Ignored*/gst::ClockTime, stop_type: gst::SeekType, stop: /*Ignored*/gst::ClockTime) -> i32; - - #[doc(alias = "gst_validate_scenario_get_actions")] - #[doc(alias = "get_actions")] - fn actions(&self) -> Vec; - - #[doc(alias = "gst_validate_scenario_get_pipeline")] - #[doc(alias = "get_pipeline")] - fn pipeline(&self) -> Option; - - #[doc(alias = "gst_validate_scenario_get_target_state")] - #[doc(alias = "get_target_state")] - fn target_state(&self) -> gst::State; - - #[doc(alias = "execute-on-idle")] - fn is_execute_on_idle(&self) -> bool; - - #[doc(alias = "execute-on-idle")] - fn set_execute_on_idle(&self, execute_on_idle: bool); - - #[doc(alias = "handles-states")] - fn is_handles_states(&self) -> bool; - - #[doc(alias = "action-done")] - fn connect_action_done(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "done")] - fn connect_done(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "execute-on-idle")] - fn connect_execute_on_idle_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "handles-states")] - fn connect_handles_states_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> ScenarioExt for O { +pub trait ScenarioExt: IsA + sealed::Sealed + 'static { + //#[doc(alias = "gst_validate_scenario_execute_seek")] //fn execute_seek(&self, action: &Action, rate: f64, format: gst::Format, flags: gst::SeekFlags, start_type: gst::SeekType, start: /*Ignored*/gst::ClockTime, stop_type: gst::SeekType, stop: /*Ignored*/gst::ClockTime) -> i32 { // unsafe { TODO: call ffi:gst_validate_scenario_execute_seek() } //} + #[doc(alias = "gst_validate_scenario_get_actions")] + #[doc(alias = "get_actions")] fn actions(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_validate_scenario_get_actions( @@ -99,6 +69,8 @@ impl> ScenarioExt for O { } } + #[doc(alias = "gst_validate_scenario_get_pipeline")] + #[doc(alias = "get_pipeline")] fn pipeline(&self) -> Option { unsafe { from_glib_full(ffi::gst_validate_scenario_get_pipeline( @@ -107,6 +79,8 @@ impl> ScenarioExt for O { } } + #[doc(alias = "gst_validate_scenario_get_target_state")] + #[doc(alias = "get_target_state")] fn target_state(&self) -> gst::State { unsafe { from_glib(ffi::gst_validate_scenario_get_target_state( @@ -115,18 +89,22 @@ impl> ScenarioExt for O { } } + #[doc(alias = "execute-on-idle")] fn is_execute_on_idle(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "execute-on-idle") } + #[doc(alias = "execute-on-idle")] fn set_execute_on_idle(&self, execute_on_idle: bool) { glib::ObjectExt::set_property(self.as_ref(), "execute-on-idle", execute_on_idle) } + #[doc(alias = "handles-states")] fn is_handles_states(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "handles-states") } + #[doc(alias = "action-done")] fn connect_action_done(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn action_done_trampoline< P: IsA, @@ -155,6 +133,7 @@ impl> ScenarioExt for O { } } + #[doc(alias = "done")] fn connect_done(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn done_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GstValidateScenario, @@ -176,6 +155,7 @@ impl> ScenarioExt for O { } } + #[doc(alias = "execute-on-idle")] fn connect_execute_on_idle_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_execute_on_idle_trampoline< P: IsA, @@ -201,6 +181,7 @@ impl> ScenarioExt for O { } } + #[doc(alias = "handles-states")] fn connect_handles_states_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_handles_states_trampoline< P: IsA, @@ -226,3 +207,5 @@ impl> ScenarioExt for O { } } } + +impl> ScenarioExt for O {} diff --git a/gstreamer-validate/src/auto/versions.txt b/gstreamer-validate/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-validate/src/auto/versions.txt +++ b/gstreamer-validate/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-validate/sys/src/auto/versions.txt b/gstreamer-validate/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-validate/sys/src/auto/versions.txt +++ b/gstreamer-validate/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-validate/sys/tests/abi.rs b/gstreamer-validate/sys/tests/abi.rs index 1ecac6111..28d23b517 100644 --- a/gstreamer-validate/sys/tests/abi.rs +++ b/gstreamer-validate/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_validate_sys::*; use std::env; diff --git a/gstreamer-video/src/auto/color_balance.rs b/gstreamer-video/src/auto/color_balance.rs index 2139496b4..fdbeb86be 100644 --- a/gstreamer-video/src/auto/color_balance.rs +++ b/gstreamer-video/src/auto/color_balance.rs @@ -27,32 +27,14 @@ impl ColorBalance { unsafe impl Send for ColorBalance {} unsafe impl Sync for ColorBalance {} -pub trait ColorBalanceExt: 'static { - #[doc(alias = "gst_color_balance_get_balance_type")] - #[doc(alias = "get_balance_type")] - fn balance_type(&self) -> ColorBalanceType; - - #[doc(alias = "gst_color_balance_get_value")] - #[doc(alias = "get_value")] - fn value(&self, channel: &impl IsA) -> i32; - - #[doc(alias = "gst_color_balance_list_channels")] - fn list_channels(&self) -> Vec; - - #[doc(alias = "gst_color_balance_set_value")] - fn set_value(&self, channel: &impl IsA, value: i32); - - #[doc(alias = "gst_color_balance_value_changed")] - fn value_changed(&self, channel: &impl IsA, value: i32); - - #[doc(alias = "value-changed")] - fn connect_value_changed( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> ColorBalanceExt for O { +pub trait ColorBalanceExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_color_balance_get_balance_type")] + #[doc(alias = "get_balance_type")] fn balance_type(&self) -> ColorBalanceType { unsafe { from_glib(ffi::gst_color_balance_get_balance_type( @@ -61,6 +43,8 @@ impl> ColorBalanceExt for O { } } + #[doc(alias = "gst_color_balance_get_value")] + #[doc(alias = "get_value")] fn value(&self, channel: &impl IsA) -> i32 { unsafe { ffi::gst_color_balance_get_value( @@ -70,6 +54,7 @@ impl> ColorBalanceExt for O { } } + #[doc(alias = "gst_color_balance_list_channels")] fn list_channels(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::gst_color_balance_list_channels( @@ -78,6 +63,7 @@ impl> ColorBalanceExt for O { } } + #[doc(alias = "gst_color_balance_set_value")] fn set_value(&self, channel: &impl IsA, value: i32) { unsafe { ffi::gst_color_balance_set_value( @@ -88,6 +74,7 @@ impl> ColorBalanceExt for O { } } + #[doc(alias = "gst_color_balance_value_changed")] fn value_changed(&self, channel: &impl IsA, value: i32) { unsafe { ffi::gst_color_balance_value_changed( @@ -98,6 +85,7 @@ impl> ColorBalanceExt for O { } } + #[doc(alias = "value-changed")] fn connect_value_changed( &self, f: F, @@ -131,3 +119,5 @@ impl> ColorBalanceExt for O { } } } + +impl> ColorBalanceExt for O {} diff --git a/gstreamer-video/src/auto/color_balance_channel.rs b/gstreamer-video/src/auto/color_balance_channel.rs index c21086857..f6430af3a 100644 --- a/gstreamer-video/src/auto/color_balance_channel.rs +++ b/gstreamer-video/src/auto/color_balance_channel.rs @@ -26,15 +26,13 @@ impl ColorBalanceChannel { unsafe impl Send for ColorBalanceChannel {} unsafe impl Sync for ColorBalanceChannel {} -pub trait ColorBalanceChannelExt: 'static { - #[doc(alias = "value-changed")] - fn connect_value_changed( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> ColorBalanceChannelExt for O { +pub trait ColorBalanceChannelExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "value-changed")] fn connect_value_changed( &self, f: F, @@ -66,3 +64,5 @@ impl> ColorBalanceChannelExt for O { } } } + +impl> ColorBalanceChannelExt for O {} diff --git a/gstreamer-video/src/auto/navigation.rs b/gstreamer-video/src/auto/navigation.rs index 6d604ae18..c5d61d0b4 100644 --- a/gstreamer-video/src/auto/navigation.rs +++ b/gstreamer-video/src/auto/navigation.rs @@ -32,37 +32,20 @@ impl Navigation { unsafe impl Send for Navigation {} unsafe impl Sync for Navigation {} -pub trait NavigationExt: 'static { - #[doc(alias = "gst_navigation_send_command")] - fn send_command(&self, command: NavigationCommand); - - #[doc(alias = "gst_navigation_send_event")] - fn send_event(&self, structure: gst::Structure); - - #[cfg(feature = "v1_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] - #[doc(alias = "gst_navigation_send_event_simple")] - fn send_event_simple(&self, event: gst::Event); - - #[doc(alias = "gst_navigation_send_key_event")] - fn send_key_event(&self, event: &str, key: &str); - - #[doc(alias = "gst_navigation_send_mouse_event")] - fn send_mouse_event(&self, event: &str, button: i32, x: f64, y: f64); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_navigation_send_mouse_scroll_event")] - fn send_mouse_scroll_event(&self, x: f64, y: f64, delta_x: f64, delta_y: f64); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> NavigationExt for O { +pub trait NavigationExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_navigation_send_command")] fn send_command(&self, command: NavigationCommand) { unsafe { ffi::gst_navigation_send_command(self.as_ref().to_glib_none().0, command.into_glib()); } } + #[doc(alias = "gst_navigation_send_event")] fn send_event(&self, structure: gst::Structure) { unsafe { ffi::gst_navigation_send_event( @@ -74,6 +57,7 @@ impl> NavigationExt for O { #[cfg(feature = "v1_22")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] + #[doc(alias = "gst_navigation_send_event_simple")] fn send_event_simple(&self, event: gst::Event) { unsafe { ffi::gst_navigation_send_event_simple( @@ -83,6 +67,7 @@ impl> NavigationExt for O { } } + #[doc(alias = "gst_navigation_send_key_event")] fn send_key_event(&self, event: &str, key: &str) { unsafe { ffi::gst_navigation_send_key_event( @@ -93,6 +78,7 @@ impl> NavigationExt for O { } } + #[doc(alias = "gst_navigation_send_mouse_event")] fn send_mouse_event(&self, event: &str, button: i32, x: f64, y: f64) { unsafe { ffi::gst_navigation_send_mouse_event( @@ -107,6 +93,7 @@ impl> NavigationExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_navigation_send_mouse_scroll_event")] fn send_mouse_scroll_event(&self, x: f64, y: f64, delta_x: f64, delta_y: f64) { unsafe { ffi::gst_navigation_send_mouse_scroll_event( @@ -119,3 +106,5 @@ impl> NavigationExt for O { } } } + +impl> NavigationExt for O {} diff --git a/gstreamer-video/src/auto/versions.txt b/gstreamer-video/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-video/src/auto/versions.txt +++ b/gstreamer-video/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-video/src/auto/video_aggregator.rs b/gstreamer-video/src/auto/video_aggregator.rs index 91cae9c4e..9a9c2c9c7 100644 --- a/gstreamer-video/src/auto/video_aggregator.rs +++ b/gstreamer-video/src/auto/video_aggregator.rs @@ -21,18 +21,19 @@ impl VideoAggregator { unsafe impl Send for VideoAggregator {} unsafe impl Sync for VideoAggregator {} -pub trait VideoAggregatorExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait VideoAggregatorExt: IsA + sealed::Sealed + 'static { //#[cfg(feature = "v1_20")] //#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] //#[doc(alias = "gst_video_aggregator_get_execution_task_pool")] //#[doc(alias = "get_execution_task_pool")] - //fn execution_task_pool(&self) -> /*Ignored*/gst::TaskPool; -} - -impl> VideoAggregatorExt for O { - //#[cfg(feature = "v1_20")] - //#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] //fn execution_task_pool(&self) -> /*Ignored*/gst::TaskPool { // unsafe { TODO: call ffi:gst_video_aggregator_get_execution_task_pool() } //} } + +impl> VideoAggregatorExt for O {} diff --git a/gstreamer-video/src/auto/video_aggregator_convert_pad.rs b/gstreamer-video/src/auto/video_aggregator_convert_pad.rs index 8e327953e..078d8ab90 100644 --- a/gstreamer-video/src/auto/video_aggregator_convert_pad.rs +++ b/gstreamer-video/src/auto/video_aggregator_convert_pad.rs @@ -22,12 +22,15 @@ impl VideoAggregatorConvertPad { unsafe impl Send for VideoAggregatorConvertPad {} unsafe impl Sync for VideoAggregatorConvertPad {} -pub trait VideoAggregatorConvertPadExt: 'static { - #[doc(alias = "gst_video_aggregator_convert_pad_update_conversion_info")] - fn update_conversion_info(&self); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> VideoAggregatorConvertPadExt for O { +pub trait VideoAggregatorConvertPadExt: + IsA + sealed::Sealed + 'static +{ + #[doc(alias = "gst_video_aggregator_convert_pad_update_conversion_info")] fn update_conversion_info(&self) { unsafe { ffi::gst_video_aggregator_convert_pad_update_conversion_info( @@ -36,3 +39,5 @@ impl> VideoAggregatorConvertPadExt for O { } } } + +impl> VideoAggregatorConvertPadExt for O {} diff --git a/gstreamer-video/src/auto/video_aggregator_pad.rs b/gstreamer-video/src/auto/video_aggregator_pad.rs index 7ce0de706..bf8c08db2 100644 --- a/gstreamer-video/src/auto/video_aggregator_pad.rs +++ b/gstreamer-video/src/auto/video_aggregator_pad.rs @@ -26,43 +26,13 @@ impl VideoAggregatorPad { unsafe impl Send for VideoAggregatorPad {} unsafe impl Sync for VideoAggregatorPad {} -pub trait VideoAggregatorPadExt: 'static { - #[doc(alias = "gst_video_aggregator_pad_set_needs_alpha")] - fn set_needs_alpha(&self, needs_alpha: bool); - - #[doc(alias = "max-last-buffer-repeat")] - fn max_last_buffer_repeat(&self) -> u64; - - #[doc(alias = "max-last-buffer-repeat")] - fn set_max_last_buffer_repeat(&self, max_last_buffer_repeat: u64); - - #[doc(alias = "repeat-after-eos")] - fn is_repeat_after_eos(&self) -> bool; - - #[doc(alias = "repeat-after-eos")] - fn set_repeat_after_eos(&self, repeat_after_eos: bool); - - fn zorder(&self) -> u32; - - fn set_zorder(&self, zorder: u32); - - #[doc(alias = "max-last-buffer-repeat")] - fn connect_max_last_buffer_repeat_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "repeat-after-eos")] - fn connect_repeat_after_eos_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "zorder")] - fn connect_zorder_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> VideoAggregatorPadExt for O { +pub trait VideoAggregatorPadExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_video_aggregator_pad_set_needs_alpha")] fn set_needs_alpha(&self, needs_alpha: bool) { unsafe { ffi::gst_video_aggregator_pad_set_needs_alpha( @@ -72,10 +42,12 @@ impl> VideoAggregatorPadExt for O { } } + #[doc(alias = "max-last-buffer-repeat")] fn max_last_buffer_repeat(&self) -> u64 { glib::ObjectExt::property(self.as_ref(), "max-last-buffer-repeat") } + #[doc(alias = "max-last-buffer-repeat")] fn set_max_last_buffer_repeat(&self, max_last_buffer_repeat: u64) { glib::ObjectExt::set_property( self.as_ref(), @@ -84,10 +56,12 @@ impl> VideoAggregatorPadExt for O { ) } + #[doc(alias = "repeat-after-eos")] fn is_repeat_after_eos(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "repeat-after-eos") } + #[doc(alias = "repeat-after-eos")] fn set_repeat_after_eos(&self, repeat_after_eos: bool) { glib::ObjectExt::set_property(self.as_ref(), "repeat-after-eos", repeat_after_eos) } @@ -100,6 +74,7 @@ impl> VideoAggregatorPadExt for O { glib::ObjectExt::set_property(self.as_ref(), "zorder", zorder) } + #[doc(alias = "max-last-buffer-repeat")] fn connect_max_last_buffer_repeat_notify( &self, f: F, @@ -128,6 +103,7 @@ impl> VideoAggregatorPadExt for O { } } + #[doc(alias = "repeat-after-eos")] fn connect_repeat_after_eos_notify( &self, f: F, @@ -156,6 +132,7 @@ impl> VideoAggregatorPadExt for O { } } + #[doc(alias = "zorder")] fn connect_zorder_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_zorder_trampoline< P: IsA, @@ -181,3 +158,5 @@ impl> VideoAggregatorPadExt for O { } } } + +impl> VideoAggregatorPadExt for O {} diff --git a/gstreamer-video/src/auto/video_decoder.rs b/gstreamer-video/src/auto/video_decoder.rs index 69f0c2ff5..2291be608 100644 --- a/gstreamer-video/src/auto/video_decoder.rs +++ b/gstreamer-video/src/auto/video_decoder.rs @@ -31,227 +31,20 @@ impl VideoDecoder { unsafe impl Send for VideoDecoder {} unsafe impl Sync for VideoDecoder {} -pub trait VideoDecoderExt: 'static { - #[doc(alias = "gst_video_decoder_add_to_frame")] - fn add_to_frame(&self, n_bytes: i32); - - #[doc(alias = "gst_video_decoder_allocate_output_buffer")] - fn allocate_output_buffer(&self) -> Result; - - #[doc(alias = "gst_video_decoder_drop_frame")] - fn drop_frame(&self, frame: VideoCodecFrame) -> Result; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_video_decoder_drop_subframe")] - fn drop_subframe(&self, frame: VideoCodecFrame) -> Result; - - #[doc(alias = "gst_video_decoder_finish_frame")] - fn finish_frame(&self, frame: VideoCodecFrame) -> Result; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_video_decoder_finish_subframe")] - fn finish_subframe(&self, frame: VideoCodecFrame) -> Result; - - #[doc(alias = "gst_video_decoder_get_buffer_pool")] - #[doc(alias = "get_buffer_pool")] - fn buffer_pool(&self) -> Option; - - #[doc(alias = "gst_video_decoder_get_estimate_rate")] - #[doc(alias = "get_estimate_rate")] - fn estimate_rate(&self) -> i32; - - #[doc(alias = "gst_video_decoder_get_max_decode_time")] - #[doc(alias = "get_max_decode_time")] - fn max_decode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff; - - #[doc(alias = "gst_video_decoder_get_max_errors")] - #[doc(alias = "get_max_errors")] - fn max_errors(&self) -> i32; - - #[doc(alias = "gst_video_decoder_get_needs_format")] - #[doc(alias = "get_needs_format")] - fn needs_format(&self) -> bool; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_video_decoder_get_needs_sync_point")] - #[doc(alias = "get_needs_sync_point")] - fn needs_sync_point(&self) -> bool; - - #[doc(alias = "gst_video_decoder_get_packetized")] - #[doc(alias = "get_packetized")] - fn is_packetized(&self) -> bool; - - #[doc(alias = "gst_video_decoder_get_pending_frame_size")] - #[doc(alias = "get_pending_frame_size")] - fn pending_frame_size(&self) -> usize; - - #[doc(alias = "gst_video_decoder_get_qos_proportion")] - #[doc(alias = "get_qos_proportion")] - fn qos_proportion(&self) -> f64; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_video_decoder_get_subframe_mode")] - #[doc(alias = "get_subframe_mode")] - fn is_subframe_mode(&self) -> bool; - - #[doc(alias = "gst_video_decoder_have_frame")] - fn have_frame(&self) -> Result; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_video_decoder_have_last_subframe")] - fn have_last_subframe( - &self, - frame: &VideoCodecFrame, - ) -> Result; - - #[doc(alias = "gst_video_decoder_merge_tags")] - fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode); - - #[doc(alias = "gst_video_decoder_proxy_getcaps")] - fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps; - - #[doc(alias = "gst_video_decoder_release_frame")] - fn release_frame(&self, frame: VideoCodecFrame); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_video_decoder_request_sync_point")] - fn request_sync_point(&self, frame: &VideoCodecFrame, flags: VideoDecoderRequestSyncPointFlags); - - #[doc(alias = "gst_video_decoder_set_estimate_rate")] - fn set_estimate_rate(&self, enabled: bool); - - #[doc(alias = "gst_video_decoder_set_max_errors")] - fn set_max_errors(&self, num: i32); - - #[doc(alias = "gst_video_decoder_set_needs_format")] - fn set_needs_format(&self, enabled: bool); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_video_decoder_set_needs_sync_point")] - fn set_needs_sync_point(&self, enabled: bool); - - #[doc(alias = "gst_video_decoder_set_packetized")] - fn set_packetized(&self, packetized: bool); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_video_decoder_set_subframe_mode")] - fn set_subframe_mode(&self, subframe_mode: bool); - - #[doc(alias = "gst_video_decoder_set_use_default_pad_acceptcaps")] - fn set_use_default_pad_acceptcaps(&self, use_: bool); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "automatic-request-sync-point-flags")] - fn automatic_request_sync_point_flags(&self) -> VideoDecoderRequestSyncPointFlags; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "automatic-request-sync-point-flags")] - fn set_automatic_request_sync_point_flags( - &self, - automatic_request_sync_point_flags: VideoDecoderRequestSyncPointFlags, - ); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "automatic-request-sync-points")] - fn is_automatic_request_sync_points(&self) -> bool; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "automatic-request-sync-points")] - fn set_automatic_request_sync_points(&self, automatic_request_sync_points: bool); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "discard-corrupted-frames")] - fn is_discard_corrupted_frames(&self) -> bool; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "discard-corrupted-frames")] - fn set_discard_corrupted_frames(&self, discard_corrupted_frames: bool); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "min-force-key-unit-interval")] - fn min_force_key_unit_interval(&self) -> u64; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "min-force-key-unit-interval")] - fn set_min_force_key_unit_interval(&self, min_force_key_unit_interval: u64); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - fn is_qos(&self) -> bool; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - fn set_qos(&self, qos: bool); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "automatic-request-sync-point-flags")] - fn connect_automatic_request_sync_point_flags_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "automatic-request-sync-points")] - fn connect_automatic_request_sync_points_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "discard-corrupted-frames")] - fn connect_discard_corrupted_frames_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "max-errors")] - fn connect_max_errors_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "min-force-key-unit-interval")] - fn connect_min_force_key_unit_interval_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "qos")] - fn connect_qos_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> VideoDecoderExt for O { +pub trait VideoDecoderExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_video_decoder_add_to_frame")] fn add_to_frame(&self, n_bytes: i32) { unsafe { ffi::gst_video_decoder_add_to_frame(self.as_ref().to_glib_none().0, n_bytes); } } + #[doc(alias = "gst_video_decoder_allocate_output_buffer")] fn allocate_output_buffer(&self) -> Result { unsafe { Option::<_>::from_glib_full(ffi::gst_video_decoder_allocate_output_buffer( @@ -261,6 +54,7 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_drop_frame")] fn drop_frame(&self, frame: VideoCodecFrame) -> Result { unsafe { try_from_glib(ffi::gst_video_decoder_drop_frame( @@ -272,6 +66,7 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_video_decoder_drop_subframe")] fn drop_subframe(&self, frame: VideoCodecFrame) -> Result { unsafe { try_from_glib(ffi::gst_video_decoder_drop_subframe( @@ -281,6 +76,7 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_finish_frame")] fn finish_frame(&self, frame: VideoCodecFrame) -> Result { unsafe { try_from_glib(ffi::gst_video_decoder_finish_frame( @@ -292,6 +88,7 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_video_decoder_finish_subframe")] fn finish_subframe(&self, frame: VideoCodecFrame) -> Result { unsafe { try_from_glib(ffi::gst_video_decoder_finish_subframe( @@ -301,6 +98,8 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_get_buffer_pool")] + #[doc(alias = "get_buffer_pool")] fn buffer_pool(&self) -> Option { unsafe { from_glib_full(ffi::gst_video_decoder_get_buffer_pool( @@ -309,10 +108,14 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_get_estimate_rate")] + #[doc(alias = "get_estimate_rate")] fn estimate_rate(&self) -> i32 { unsafe { ffi::gst_video_decoder_get_estimate_rate(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_video_decoder_get_max_decode_time")] + #[doc(alias = "get_max_decode_time")] fn max_decode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff { unsafe { ffi::gst_video_decoder_get_max_decode_time( @@ -322,10 +125,14 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_get_max_errors")] + #[doc(alias = "get_max_errors")] fn max_errors(&self) -> i32 { unsafe { ffi::gst_video_decoder_get_max_errors(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_video_decoder_get_needs_format")] + #[doc(alias = "get_needs_format")] fn needs_format(&self) -> bool { unsafe { from_glib(ffi::gst_video_decoder_get_needs_format( @@ -336,6 +143,8 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_video_decoder_get_needs_sync_point")] + #[doc(alias = "get_needs_sync_point")] fn needs_sync_point(&self) -> bool { unsafe { from_glib(ffi::gst_video_decoder_get_needs_sync_point( @@ -344,6 +153,8 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_get_packetized")] + #[doc(alias = "get_packetized")] fn is_packetized(&self) -> bool { unsafe { from_glib(ffi::gst_video_decoder_get_packetized( @@ -352,16 +163,22 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_get_pending_frame_size")] + #[doc(alias = "get_pending_frame_size")] fn pending_frame_size(&self) -> usize { unsafe { ffi::gst_video_decoder_get_pending_frame_size(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_video_decoder_get_qos_proportion")] + #[doc(alias = "get_qos_proportion")] fn qos_proportion(&self) -> f64 { unsafe { ffi::gst_video_decoder_get_qos_proportion(self.as_ref().to_glib_none().0) } } #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_video_decoder_get_subframe_mode")] + #[doc(alias = "get_subframe_mode")] fn is_subframe_mode(&self) -> bool { unsafe { from_glib(ffi::gst_video_decoder_get_subframe_mode( @@ -370,6 +187,7 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_have_frame")] fn have_frame(&self) -> Result { unsafe { try_from_glib(ffi::gst_video_decoder_have_frame( @@ -380,6 +198,7 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_video_decoder_have_last_subframe")] fn have_last_subframe( &self, frame: &VideoCodecFrame, @@ -392,6 +211,7 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_merge_tags")] fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode) { unsafe { ffi::gst_video_decoder_merge_tags( @@ -402,6 +222,7 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_proxy_getcaps")] fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps { unsafe { from_glib_full(ffi::gst_video_decoder_proxy_getcaps( @@ -412,6 +233,7 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_release_frame")] fn release_frame(&self, frame: VideoCodecFrame) { unsafe { ffi::gst_video_decoder_release_frame( @@ -423,6 +245,7 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_video_decoder_request_sync_point")] fn request_sync_point( &self, frame: &VideoCodecFrame, @@ -437,6 +260,7 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_set_estimate_rate")] fn set_estimate_rate(&self, enabled: bool) { unsafe { ffi::gst_video_decoder_set_estimate_rate( @@ -446,12 +270,14 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_set_max_errors")] fn set_max_errors(&self, num: i32) { unsafe { ffi::gst_video_decoder_set_max_errors(self.as_ref().to_glib_none().0, num); } } + #[doc(alias = "gst_video_decoder_set_needs_format")] fn set_needs_format(&self, enabled: bool) { unsafe { ffi::gst_video_decoder_set_needs_format( @@ -463,6 +289,7 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_video_decoder_set_needs_sync_point")] fn set_needs_sync_point(&self, enabled: bool) { unsafe { ffi::gst_video_decoder_set_needs_sync_point( @@ -472,6 +299,7 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_set_packetized")] fn set_packetized(&self, packetized: bool) { unsafe { ffi::gst_video_decoder_set_packetized( @@ -483,6 +311,7 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_video_decoder_set_subframe_mode")] fn set_subframe_mode(&self, subframe_mode: bool) { unsafe { ffi::gst_video_decoder_set_subframe_mode( @@ -492,6 +321,7 @@ impl> VideoDecoderExt for O { } } + #[doc(alias = "gst_video_decoder_set_use_default_pad_acceptcaps")] fn set_use_default_pad_acceptcaps(&self, use_: bool) { unsafe { ffi::gst_video_decoder_set_use_default_pad_acceptcaps( @@ -503,12 +333,14 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "automatic-request-sync-point-flags")] fn automatic_request_sync_point_flags(&self) -> VideoDecoderRequestSyncPointFlags { glib::ObjectExt::property(self.as_ref(), "automatic-request-sync-point-flags") } #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "automatic-request-sync-point-flags")] fn set_automatic_request_sync_point_flags( &self, automatic_request_sync_point_flags: VideoDecoderRequestSyncPointFlags, @@ -522,12 +354,14 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "automatic-request-sync-points")] fn is_automatic_request_sync_points(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "automatic-request-sync-points") } #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "automatic-request-sync-points")] fn set_automatic_request_sync_points(&self, automatic_request_sync_points: bool) { glib::ObjectExt::set_property( self.as_ref(), @@ -538,12 +372,14 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "discard-corrupted-frames")] fn is_discard_corrupted_frames(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "discard-corrupted-frames") } #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "discard-corrupted-frames")] fn set_discard_corrupted_frames(&self, discard_corrupted_frames: bool) { glib::ObjectExt::set_property( self.as_ref(), @@ -554,12 +390,14 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "min-force-key-unit-interval")] fn min_force_key_unit_interval(&self) -> u64 { glib::ObjectExt::property(self.as_ref(), "min-force-key-unit-interval") } #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "min-force-key-unit-interval")] fn set_min_force_key_unit_interval(&self, min_force_key_unit_interval: u64) { glib::ObjectExt::set_property( self.as_ref(), @@ -582,6 +420,7 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "automatic-request-sync-point-flags")] fn connect_automatic_request_sync_point_flags_notify( &self, f: F, @@ -612,6 +451,7 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "automatic-request-sync-points")] fn connect_automatic_request_sync_points_notify( &self, f: F, @@ -642,6 +482,7 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "discard-corrupted-frames")] fn connect_discard_corrupted_frames_notify( &self, f: F, @@ -672,6 +513,7 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "max-errors")] fn connect_max_errors_notify( &self, f: F, @@ -702,6 +544,7 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "min-force-key-unit-interval")] fn connect_min_force_key_unit_interval_notify( &self, f: F, @@ -732,6 +575,7 @@ impl> VideoDecoderExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "qos")] fn connect_qos_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_qos_trampoline< P: IsA, @@ -757,3 +601,5 @@ impl> VideoDecoderExt for O { } } } + +impl> VideoDecoderExt for O {} diff --git a/gstreamer-video/src/auto/video_encoder.rs b/gstreamer-video/src/auto/video_encoder.rs index ee5283e37..efa32e5d1 100644 --- a/gstreamer-video/src/auto/video_encoder.rs +++ b/gstreamer-video/src/auto/video_encoder.rs @@ -27,60 +27,13 @@ impl VideoEncoder { unsafe impl Send for VideoEncoder {} unsafe impl Sync for VideoEncoder {} -pub trait VideoEncoderExt: 'static { - #[doc(alias = "gst_video_encoder_allocate_output_buffer")] - fn allocate_output_buffer(&self, size: usize) -> gst::Buffer; - - #[doc(alias = "gst_video_encoder_finish_frame")] - fn finish_frame(&self, frame: VideoCodecFrame) -> Result; - - #[doc(alias = "gst_video_encoder_get_max_encode_time")] - #[doc(alias = "get_max_encode_time")] - fn max_encode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_video_encoder_get_min_force_key_unit_interval")] - #[doc(alias = "get_min_force_key_unit_interval")] - fn min_force_key_unit_interval(&self) -> Option; - - #[doc(alias = "gst_video_encoder_is_qos_enabled")] - fn is_qos_enabled(&self) -> bool; - - #[doc(alias = "gst_video_encoder_merge_tags")] - fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode); - - #[doc(alias = "gst_video_encoder_proxy_getcaps")] - fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_video_encoder_set_min_force_key_unit_interval")] - fn set_min_force_key_unit_interval(&self, interval: impl Into>); - - #[doc(alias = "gst_video_encoder_set_min_pts")] - fn set_min_pts(&self, min_pts: impl Into>); - - #[doc(alias = "gst_video_encoder_set_qos_enabled")] - fn set_qos_enabled(&self, enabled: bool); - - fn is_qos(&self) -> bool; - - fn set_qos(&self, qos: bool); - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "min-force-key-unit-interval")] - fn connect_min_force_key_unit_interval_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "qos")] - fn connect_qos_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> VideoEncoderExt for O { +pub trait VideoEncoderExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_video_encoder_allocate_output_buffer")] fn allocate_output_buffer(&self, size: usize) -> gst::Buffer { unsafe { from_glib_full(ffi::gst_video_encoder_allocate_output_buffer( @@ -90,6 +43,7 @@ impl> VideoEncoderExt for O { } } + #[doc(alias = "gst_video_encoder_finish_frame")] fn finish_frame(&self, frame: VideoCodecFrame) -> Result { unsafe { try_from_glib(ffi::gst_video_encoder_finish_frame( @@ -99,6 +53,8 @@ impl> VideoEncoderExt for O { } } + #[doc(alias = "gst_video_encoder_get_max_encode_time")] + #[doc(alias = "get_max_encode_time")] fn max_encode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff { unsafe { ffi::gst_video_encoder_get_max_encode_time( @@ -110,6 +66,8 @@ impl> VideoEncoderExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_video_encoder_get_min_force_key_unit_interval")] + #[doc(alias = "get_min_force_key_unit_interval")] fn min_force_key_unit_interval(&self) -> Option { unsafe { from_glib(ffi::gst_video_encoder_get_min_force_key_unit_interval( @@ -118,6 +76,7 @@ impl> VideoEncoderExt for O { } } + #[doc(alias = "gst_video_encoder_is_qos_enabled")] fn is_qos_enabled(&self) -> bool { unsafe { from_glib(ffi::gst_video_encoder_is_qos_enabled( @@ -126,6 +85,7 @@ impl> VideoEncoderExt for O { } } + #[doc(alias = "gst_video_encoder_merge_tags")] fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode) { unsafe { ffi::gst_video_encoder_merge_tags( @@ -136,6 +96,7 @@ impl> VideoEncoderExt for O { } } + #[doc(alias = "gst_video_encoder_proxy_getcaps")] fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps { unsafe { from_glib_full(ffi::gst_video_encoder_proxy_getcaps( @@ -148,6 +109,7 @@ impl> VideoEncoderExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_video_encoder_set_min_force_key_unit_interval")] fn set_min_force_key_unit_interval(&self, interval: impl Into>) { unsafe { ffi::gst_video_encoder_set_min_force_key_unit_interval( @@ -157,6 +119,7 @@ impl> VideoEncoderExt for O { } } + #[doc(alias = "gst_video_encoder_set_min_pts")] fn set_min_pts(&self, min_pts: impl Into>) { unsafe { ffi::gst_video_encoder_set_min_pts( @@ -166,6 +129,7 @@ impl> VideoEncoderExt for O { } } + #[doc(alias = "gst_video_encoder_set_qos_enabled")] fn set_qos_enabled(&self, enabled: bool) { unsafe { ffi::gst_video_encoder_set_qos_enabled( @@ -185,6 +149,7 @@ impl> VideoEncoderExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "min-force-key-unit-interval")] fn connect_min_force_key_unit_interval_notify( &self, f: F, @@ -213,6 +178,7 @@ impl> VideoEncoderExt for O { } } + #[doc(alias = "qos")] fn connect_qos_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_qos_trampoline< P: IsA, @@ -238,3 +204,5 @@ impl> VideoEncoderExt for O { } } } + +impl> VideoEncoderExt for O {} diff --git a/gstreamer-video/src/auto/video_orientation.rs b/gstreamer-video/src/auto/video_orientation.rs index ec5a63dcb..57ffefc68 100644 --- a/gstreamer-video/src/auto/video_orientation.rs +++ b/gstreamer-video/src/auto/video_orientation.rs @@ -22,37 +22,14 @@ impl VideoOrientation { unsafe impl Send for VideoOrientation {} unsafe impl Sync for VideoOrientation {} -pub trait VideoOrientationExt: 'static { - #[doc(alias = "gst_video_orientation_get_hcenter")] - #[doc(alias = "get_hcenter")] - fn hcenter(&self) -> Option; - - #[doc(alias = "gst_video_orientation_get_hflip")] - #[doc(alias = "get_hflip")] - fn hflip(&self) -> Option; - - #[doc(alias = "gst_video_orientation_get_vcenter")] - #[doc(alias = "get_vcenter")] - fn vcenter(&self) -> Option; - - #[doc(alias = "gst_video_orientation_get_vflip")] - #[doc(alias = "get_vflip")] - fn vflip(&self) -> Option; - - #[doc(alias = "gst_video_orientation_set_hcenter")] - fn set_hcenter(&self, center: i32) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_video_orientation_set_hflip")] - fn set_hflip(&self, flip: bool) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_video_orientation_set_vcenter")] - fn set_vcenter(&self, center: i32) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_video_orientation_set_vflip")] - fn set_vflip(&self, flip: bool) -> Result<(), glib::error::BoolError>; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> VideoOrientationExt for O { +pub trait VideoOrientationExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_video_orientation_get_hcenter")] + #[doc(alias = "get_hcenter")] fn hcenter(&self) -> Option { unsafe { let mut center = mem::MaybeUninit::uninit(); @@ -68,6 +45,8 @@ impl> VideoOrientationExt for O { } } + #[doc(alias = "gst_video_orientation_get_hflip")] + #[doc(alias = "get_hflip")] fn hflip(&self) -> Option { unsafe { let mut flip = mem::MaybeUninit::uninit(); @@ -83,6 +62,8 @@ impl> VideoOrientationExt for O { } } + #[doc(alias = "gst_video_orientation_get_vcenter")] + #[doc(alias = "get_vcenter")] fn vcenter(&self) -> Option { unsafe { let mut center = mem::MaybeUninit::uninit(); @@ -98,6 +79,8 @@ impl> VideoOrientationExt for O { } } + #[doc(alias = "gst_video_orientation_get_vflip")] + #[doc(alias = "get_vflip")] fn vflip(&self) -> Option { unsafe { let mut flip = mem::MaybeUninit::uninit(); @@ -113,6 +96,7 @@ impl> VideoOrientationExt for O { } } + #[doc(alias = "gst_video_orientation_set_hcenter")] fn set_hcenter(&self, center: i32) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -122,6 +106,7 @@ impl> VideoOrientationExt for O { } } + #[doc(alias = "gst_video_orientation_set_hflip")] fn set_hflip(&self, flip: bool) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -134,6 +119,7 @@ impl> VideoOrientationExt for O { } } + #[doc(alias = "gst_video_orientation_set_vcenter")] fn set_vcenter(&self, center: i32) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -143,6 +129,7 @@ impl> VideoOrientationExt for O { } } + #[doc(alias = "gst_video_orientation_set_vflip")] fn set_vflip(&self, flip: bool) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -155,3 +142,5 @@ impl> VideoOrientationExt for O { } } } + +impl> VideoOrientationExt for O {} diff --git a/gstreamer-video/src/auto/video_overlay.rs b/gstreamer-video/src/auto/video_overlay.rs index 94fc4987b..dcc5758cb 100644 --- a/gstreamer-video/src/auto/video_overlay.rs +++ b/gstreamer-video/src/auto/video_overlay.rs @@ -26,40 +26,25 @@ impl VideoOverlay { unsafe impl Send for VideoOverlay {} unsafe impl Sync for VideoOverlay {} -pub trait VideoOverlayExt: 'static { - #[doc(alias = "gst_video_overlay_expose")] - fn expose(&self); - - //#[doc(alias = "gst_video_overlay_got_window_handle")] - //fn got_window_handle(&self, handle: /*Unimplemented*/Basic: UIntPtr); - - #[doc(alias = "gst_video_overlay_handle_events")] - fn handle_events(&self, handle_events: bool); - - #[doc(alias = "gst_video_overlay_prepare_window_handle")] - fn prepare_window_handle(&self); - - #[doc(alias = "gst_video_overlay_set_render_rectangle")] - fn set_render_rectangle( - &self, - x: i32, - y: i32, - width: i32, - height: i32, - ) -> Result<(), glib::error::BoolError>; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> VideoOverlayExt for O { +pub trait VideoOverlayExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_video_overlay_expose")] fn expose(&self) { unsafe { ffi::gst_video_overlay_expose(self.as_ref().to_glib_none().0); } } + //#[doc(alias = "gst_video_overlay_got_window_handle")] //fn got_window_handle(&self, handle: /*Unimplemented*/Basic: UIntPtr) { // unsafe { TODO: call ffi:gst_video_overlay_got_window_handle() } //} + #[doc(alias = "gst_video_overlay_handle_events")] fn handle_events(&self, handle_events: bool) { unsafe { ffi::gst_video_overlay_handle_events( @@ -69,12 +54,14 @@ impl> VideoOverlayExt for O { } } + #[doc(alias = "gst_video_overlay_prepare_window_handle")] fn prepare_window_handle(&self) { unsafe { ffi::gst_video_overlay_prepare_window_handle(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_video_overlay_set_render_rectangle")] fn set_render_rectangle( &self, x: i32, @@ -96,3 +83,5 @@ impl> VideoOverlayExt for O { } } } + +impl> VideoOverlayExt for O {} diff --git a/gstreamer-video/src/auto/video_sink.rs b/gstreamer-video/src/auto/video_sink.rs index 347b4b8ac..0346be790 100644 --- a/gstreamer-video/src/auto/video_sink.rs +++ b/gstreamer-video/src/auto/video_sink.rs @@ -27,29 +27,23 @@ impl VideoSink { unsafe impl Send for VideoSink {} unsafe impl Sync for VideoSink {} -pub trait VideoSinkExt: 'static { - #[doc(alias = "show-preroll-frame")] - fn shows_preroll_frame(&self) -> bool; - - #[doc(alias = "show-preroll-frame")] - fn set_show_preroll_frame(&self, show_preroll_frame: bool); - - #[doc(alias = "show-preroll-frame")] - fn connect_show_preroll_frame_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> VideoSinkExt for O { +pub trait VideoSinkExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "show-preroll-frame")] fn shows_preroll_frame(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "show-preroll-frame") } + #[doc(alias = "show-preroll-frame")] fn set_show_preroll_frame(&self, show_preroll_frame: bool) { glib::ObjectExt::set_property(self.as_ref(), "show-preroll-frame", show_preroll_frame) } + #[doc(alias = "show-preroll-frame")] fn connect_show_preroll_frame_notify( &self, f: F, @@ -78,3 +72,5 @@ impl> VideoSinkExt for O { } } } + +impl> VideoSinkExt for O {} diff --git a/gstreamer-video/sys/src/auto/versions.txt b/gstreamer-video/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-video/sys/src/auto/versions.txt +++ b/gstreamer-video/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-video/sys/tests/abi.rs b/gstreamer-video/sys/tests/abi.rs index 610af8bb7..407cde0e0 100644 --- a/gstreamer-video/sys/tests/abi.rs +++ b/gstreamer-video/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_video_sys::*; use std::env; diff --git a/gstreamer-webrtc/src/auto/versions.txt b/gstreamer-webrtc/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-webrtc/src/auto/versions.txt +++ b/gstreamer-webrtc/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-webrtc/src/auto/web_rtcice.rs b/gstreamer-webrtc/src/auto/web_rtcice.rs index d46042d79..7feb49193 100644 --- a/gstreamer-webrtc/src/auto/web_rtcice.rs +++ b/gstreamer-webrtc/src/auto/web_rtcice.rs @@ -27,138 +27,13 @@ impl WebRTCICE { unsafe impl Send for WebRTCICE {} unsafe impl Sync for WebRTCICE {} -pub trait WebRTCICEExt: 'static { - #[doc(alias = "gst_webrtc_ice_add_stream")] - fn add_stream(&self, session_id: u32) -> Option; - - #[doc(alias = "gst_webrtc_ice_add_turn_server")] - fn add_turn_server(&self, uri: &str) -> bool; - - #[doc(alias = "gst_webrtc_ice_find_transport")] - fn find_transport( - &self, - stream: &impl IsA, - component: WebRTCICEComponent, - ) -> Option; - - #[doc(alias = "gst_webrtc_ice_gather_candidates")] - fn gather_candidates(&self, stream: &impl IsA) -> bool; - - #[doc(alias = "gst_webrtc_ice_get_http_proxy")] - #[doc(alias = "get_http_proxy")] - fn http_proxy(&self) -> glib::GString; - - #[doc(alias = "gst_webrtc_ice_get_is_controller")] - #[doc(alias = "get_is_controller")] - fn is_controller(&self) -> bool; - - #[doc(alias = "gst_webrtc_ice_get_local_candidates")] - #[doc(alias = "get_local_candidates")] - fn local_candidates(&self, stream: &impl IsA) -> Vec; - - #[doc(alias = "gst_webrtc_ice_get_remote_candidates")] - #[doc(alias = "get_remote_candidates")] - fn remote_candidates(&self, stream: &impl IsA) - -> Vec; - - #[doc(alias = "gst_webrtc_ice_get_selected_pair")] - #[doc(alias = "get_selected_pair")] - fn selected_pair( - &self, - stream: &impl IsA, - ) -> Option<(WebRTCICECandidateStats, WebRTCICECandidateStats)>; - - #[doc(alias = "gst_webrtc_ice_get_stun_server")] - #[doc(alias = "get_stun_server")] - fn stun_server(&self) -> Option; - - #[doc(alias = "gst_webrtc_ice_get_turn_server")] - #[doc(alias = "get_turn_server")] - fn turn_server(&self) -> Option; - - #[doc(alias = "gst_webrtc_ice_set_force_relay")] - fn set_force_relay(&self, force_relay: bool); - - #[doc(alias = "gst_webrtc_ice_set_http_proxy")] - fn set_http_proxy(&self, uri: &str); - - #[doc(alias = "gst_webrtc_ice_set_is_controller")] - fn set_is_controller(&self, controller: bool); - - #[doc(alias = "gst_webrtc_ice_set_local_credentials")] - fn set_local_credentials( - &self, - stream: &impl IsA, - ufrag: &str, - pwd: &str, - ) -> bool; - - #[doc(alias = "gst_webrtc_ice_set_on_ice_candidate")] - fn set_on_ice_candidate(&self, func: P); - - #[doc(alias = "gst_webrtc_ice_set_remote_credentials")] - fn set_remote_credentials( - &self, - stream: &impl IsA, - ufrag: &str, - pwd: &str, - ) -> bool; - - #[doc(alias = "gst_webrtc_ice_set_stun_server")] - fn set_stun_server(&self, uri: Option<&str>); - - #[doc(alias = "gst_webrtc_ice_set_tos")] - fn set_tos(&self, stream: &impl IsA, tos: u32); - - #[doc(alias = "gst_webrtc_ice_set_turn_server")] - fn set_turn_server(&self, uri: Option<&str>); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "max-rtp-port")] - fn max_rtp_port(&self) -> u32; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "max-rtp-port")] - fn set_max_rtp_port(&self, max_rtp_port: u32); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "min-rtp-port")] - fn min_rtp_port(&self) -> u32; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "min-rtp-port")] - fn set_min_rtp_port(&self, min_rtp_port: u32); - - #[doc(alias = "add-local-ip-address")] - fn connect_add_local_ip_address bool + Send + Sync + 'static>( - &self, - f: F, - ) -> SignalHandlerId; - - fn emit_add_local_ip_address(&self, address: &str) -> bool; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "max-rtp-port")] - fn connect_max_rtp_port_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "min-rtp-port")] - fn connect_min_rtp_port_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> WebRTCICEExt for O { +pub trait WebRTCICEExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_webrtc_ice_add_stream")] fn add_stream(&self, session_id: u32) -> Option { unsafe { from_glib_full(ffi::gst_webrtc_ice_add_stream( @@ -168,6 +43,7 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_add_turn_server")] fn add_turn_server(&self, uri: &str) -> bool { unsafe { from_glib(ffi::gst_webrtc_ice_add_turn_server( @@ -177,6 +53,7 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_find_transport")] fn find_transport( &self, stream: &impl IsA, @@ -191,6 +68,7 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_gather_candidates")] fn gather_candidates(&self, stream: &impl IsA) -> bool { unsafe { from_glib(ffi::gst_webrtc_ice_gather_candidates( @@ -200,6 +78,8 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_get_http_proxy")] + #[doc(alias = "get_http_proxy")] fn http_proxy(&self) -> glib::GString { unsafe { from_glib_full(ffi::gst_webrtc_ice_get_http_proxy( @@ -208,6 +88,8 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_get_is_controller")] + #[doc(alias = "get_is_controller")] fn is_controller(&self) -> bool { unsafe { from_glib(ffi::gst_webrtc_ice_get_is_controller( @@ -216,6 +98,8 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_get_local_candidates")] + #[doc(alias = "get_local_candidates")] fn local_candidates(&self, stream: &impl IsA) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_webrtc_ice_get_local_candidates( @@ -225,6 +109,8 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_get_remote_candidates")] + #[doc(alias = "get_remote_candidates")] fn remote_candidates( &self, stream: &impl IsA, @@ -237,6 +123,8 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_get_selected_pair")] + #[doc(alias = "get_selected_pair")] fn selected_pair( &self, stream: &impl IsA, @@ -258,6 +146,8 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_get_stun_server")] + #[doc(alias = "get_stun_server")] fn stun_server(&self) -> Option { unsafe { from_glib_full(ffi::gst_webrtc_ice_get_stun_server( @@ -266,6 +156,8 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_get_turn_server")] + #[doc(alias = "get_turn_server")] fn turn_server(&self) -> Option { unsafe { from_glib_full(ffi::gst_webrtc_ice_get_turn_server( @@ -274,6 +166,7 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_set_force_relay")] fn set_force_relay(&self, force_relay: bool) { unsafe { ffi::gst_webrtc_ice_set_force_relay( @@ -283,6 +176,7 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_set_http_proxy")] fn set_http_proxy(&self, uri: &str) { unsafe { ffi::gst_webrtc_ice_set_http_proxy( @@ -292,6 +186,7 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_set_is_controller")] fn set_is_controller(&self, controller: bool) { unsafe { ffi::gst_webrtc_ice_set_is_controller( @@ -301,6 +196,7 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_set_local_credentials")] fn set_local_credentials( &self, stream: &impl IsA, @@ -317,6 +213,7 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_set_on_ice_candidate")] fn set_on_ice_candidate(&self, func: P) { let func_data: Box_

= Box_::new(func); unsafe extern "C" fn func_func( @@ -348,6 +245,7 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_set_remote_credentials")] fn set_remote_credentials( &self, stream: &impl IsA, @@ -364,6 +262,7 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_set_stun_server")] fn set_stun_server(&self, uri: Option<&str>) { unsafe { ffi::gst_webrtc_ice_set_stun_server( @@ -373,6 +272,7 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_set_tos")] fn set_tos(&self, stream: &impl IsA, tos: u32) { unsafe { ffi::gst_webrtc_ice_set_tos( @@ -383,6 +283,7 @@ impl> WebRTCICEExt for O { } } + #[doc(alias = "gst_webrtc_ice_set_turn_server")] fn set_turn_server(&self, uri: Option<&str>) { unsafe { ffi::gst_webrtc_ice_set_turn_server( @@ -394,28 +295,33 @@ impl> WebRTCICEExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "max-rtp-port")] fn max_rtp_port(&self) -> u32 { glib::ObjectExt::property(self.as_ref(), "max-rtp-port") } #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "max-rtp-port")] fn set_max_rtp_port(&self, max_rtp_port: u32) { glib::ObjectExt::set_property(self.as_ref(), "max-rtp-port", max_rtp_port) } #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "min-rtp-port")] fn min_rtp_port(&self) -> u32 { glib::ObjectExt::property(self.as_ref(), "min-rtp-port") } #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "min-rtp-port")] fn set_min_rtp_port(&self, min_rtp_port: u32) { glib::ObjectExt::set_property(self.as_ref(), "min-rtp-port", min_rtp_port) } + #[doc(alias = "add-local-ip-address")] fn connect_add_local_ip_address bool + Send + Sync + 'static>( &self, f: F, @@ -454,6 +360,7 @@ impl> WebRTCICEExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "max-rtp-port")] fn connect_max_rtp_port_notify( &self, f: F, @@ -484,6 +391,7 @@ impl> WebRTCICEExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "min-rtp-port")] fn connect_min_rtp_port_notify( &self, f: F, @@ -512,3 +420,5 @@ impl> WebRTCICEExt for O { } } } + +impl> WebRTCICEExt for O {} diff --git a/gstreamer-webrtc/src/auto/web_rtcice_stream.rs b/gstreamer-webrtc/src/auto/web_rtcice_stream.rs index 3edf5baa2..fd47a051a 100644 --- a/gstreamer-webrtc/src/auto/web_rtcice_stream.rs +++ b/gstreamer-webrtc/src/auto/web_rtcice_stream.rs @@ -22,18 +22,13 @@ impl WebRTCICEStream { unsafe impl Send for WebRTCICEStream {} unsafe impl Sync for WebRTCICEStream {} -pub trait WebRTCICEStreamExt: 'static { - #[doc(alias = "gst_webrtc_ice_stream_find_transport")] - fn find_transport(&self, component: WebRTCICEComponent) -> Option; - - #[doc(alias = "gst_webrtc_ice_stream_gather_candidates")] - fn gather_candidates(&self) -> bool; - - #[doc(alias = "stream-id")] - fn stream_id(&self) -> u32; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> WebRTCICEStreamExt for O { +pub trait WebRTCICEStreamExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_webrtc_ice_stream_find_transport")] fn find_transport(&self, component: WebRTCICEComponent) -> Option { unsafe { from_glib_full(ffi::gst_webrtc_ice_stream_find_transport( @@ -43,6 +38,7 @@ impl> WebRTCICEStreamExt for O { } } + #[doc(alias = "gst_webrtc_ice_stream_gather_candidates")] fn gather_candidates(&self) -> bool { unsafe { from_glib(ffi::gst_webrtc_ice_stream_gather_candidates( @@ -51,7 +47,10 @@ impl> WebRTCICEStreamExt for O { } } + #[doc(alias = "stream-id")] fn stream_id(&self) -> u32 { glib::ObjectExt::property(self.as_ref(), "stream-id") } } + +impl> WebRTCICEStreamExt for O {} diff --git a/gstreamer-webrtc/sys/src/auto/versions.txt b/gstreamer-webrtc/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer-webrtc/sys/src/auto/versions.txt +++ b/gstreamer-webrtc/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer-webrtc/sys/tests/abi.rs b/gstreamer-webrtc/sys/tests/abi.rs index f3fe7aebb..fdfff636b 100644 --- a/gstreamer-webrtc/sys/tests/abi.rs +++ b/gstreamer-webrtc/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_webrtc_sys::*; use std::env; diff --git a/gstreamer/src/auto/allocator.rs b/gstreamer/src/auto/allocator.rs index ce78006da..9705869e8 100644 --- a/gstreamer/src/auto/allocator.rs +++ b/gstreamer/src/auto/allocator.rs @@ -28,19 +28,13 @@ impl Allocator { unsafe impl Send for Allocator {} unsafe impl Sync for Allocator {} -pub trait AllocatorExt: 'static { - #[doc(alias = "gst_allocator_alloc")] - fn alloc( - &self, - size: usize, - params: Option<&AllocationParams>, - ) -> Result; - - #[doc(alias = "gst_allocator_set_default")] - fn set_default(self); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> AllocatorExt for O { +pub trait AllocatorExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_allocator_alloc")] fn alloc( &self, size: usize, @@ -56,9 +50,12 @@ impl> AllocatorExt for O { } } + #[doc(alias = "gst_allocator_set_default")] fn set_default(self) { unsafe { ffi::gst_allocator_set_default(self.upcast().into_glib_ptr()); } } } + +impl> AllocatorExt for O {} diff --git a/gstreamer/src/auto/bin.rs b/gstreamer/src/auto/bin.rs index f0e346ef1..7bf682355 100644 --- a/gstreamer/src/auto/bin.rs +++ b/gstreamer/src/auto/bin.rs @@ -27,91 +27,13 @@ impl Bin { unsafe impl Send for Bin {} unsafe impl Sync for Bin {} -pub trait GstBinExt: 'static { - #[doc(alias = "gst_bin_add")] - fn add(&self, element: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_bin_find_unlinked_pad")] - fn find_unlinked_pad(&self, direction: PadDirection) -> Option; - - #[doc(alias = "gst_bin_get_by_interface")] - #[doc(alias = "get_by_interface")] - fn by_interface(&self, iface: glib::types::Type) -> Option; - - #[doc(alias = "gst_bin_get_by_name")] - #[doc(alias = "get_by_name")] - fn by_name(&self, name: &str) -> Option; - - #[doc(alias = "gst_bin_get_by_name_recurse_up")] - #[doc(alias = "get_by_name_recurse_up")] - fn by_name_recurse_up(&self, name: &str) -> Option; - - #[doc(alias = "gst_bin_get_suppressed_flags")] - #[doc(alias = "get_suppressed_flags")] - fn suppressed_flags(&self) -> ElementFlags; - - #[doc(alias = "gst_bin_recalculate_latency")] - fn recalculate_latency(&self) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_bin_remove")] - fn remove(&self, element: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_bin_set_suppressed_flags")] - fn set_suppressed_flags(&self, flags: ElementFlags); - - #[doc(alias = "gst_bin_sync_children_states")] - fn sync_children_states(&self) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "async-handling")] - fn is_async_handling(&self) -> bool; - - #[doc(alias = "async-handling")] - fn set_async_handling(&self, async_handling: bool); - - #[doc(alias = "message-forward")] - fn is_message_forward(&self) -> bool; - - #[doc(alias = "message-forward")] - fn set_message_forward(&self, message_forward: bool); - - #[doc(alias = "deep-element-added")] - fn connect_deep_element_added( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "deep-element-removed")] - fn connect_deep_element_removed( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "element-added")] - fn connect_element_added( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "element-removed")] - fn connect_element_removed( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "async-handling")] - fn connect_async_handling_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "message-forward")] - fn connect_message_forward_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> GstBinExt for O { +pub trait GstBinExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_bin_add")] fn add(&self, element: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -124,6 +46,7 @@ impl> GstBinExt for O { } } + #[doc(alias = "gst_bin_find_unlinked_pad")] fn find_unlinked_pad(&self, direction: PadDirection) -> Option { unsafe { from_glib_full(ffi::gst_bin_find_unlinked_pad( @@ -133,6 +56,8 @@ impl> GstBinExt for O { } } + #[doc(alias = "gst_bin_get_by_interface")] + #[doc(alias = "get_by_interface")] fn by_interface(&self, iface: glib::types::Type) -> Option { unsafe { from_glib_full(ffi::gst_bin_get_by_interface( @@ -142,6 +67,8 @@ impl> GstBinExt for O { } } + #[doc(alias = "gst_bin_get_by_name")] + #[doc(alias = "get_by_name")] fn by_name(&self, name: &str) -> Option { unsafe { from_glib_full(ffi::gst_bin_get_by_name( @@ -151,6 +78,8 @@ impl> GstBinExt for O { } } + #[doc(alias = "gst_bin_get_by_name_recurse_up")] + #[doc(alias = "get_by_name_recurse_up")] fn by_name_recurse_up(&self, name: &str) -> Option { unsafe { from_glib_full(ffi::gst_bin_get_by_name_recurse_up( @@ -160,6 +89,8 @@ impl> GstBinExt for O { } } + #[doc(alias = "gst_bin_get_suppressed_flags")] + #[doc(alias = "get_suppressed_flags")] fn suppressed_flags(&self) -> ElementFlags { unsafe { from_glib(ffi::gst_bin_get_suppressed_flags( @@ -168,6 +99,7 @@ impl> GstBinExt for O { } } + #[doc(alias = "gst_bin_recalculate_latency")] fn recalculate_latency(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -177,6 +109,7 @@ impl> GstBinExt for O { } } + #[doc(alias = "gst_bin_remove")] fn remove(&self, element: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -189,12 +122,14 @@ impl> GstBinExt for O { } } + #[doc(alias = "gst_bin_set_suppressed_flags")] fn set_suppressed_flags(&self, flags: ElementFlags) { unsafe { ffi::gst_bin_set_suppressed_flags(self.as_ref().to_glib_none().0, flags.into_glib()); } } + #[doc(alias = "gst_bin_sync_children_states")] fn sync_children_states(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -204,22 +139,27 @@ impl> GstBinExt for O { } } + #[doc(alias = "async-handling")] fn is_async_handling(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "async-handling") } + #[doc(alias = "async-handling")] fn set_async_handling(&self, async_handling: bool) { glib::ObjectExt::set_property(self.as_ref(), "async-handling", async_handling) } + #[doc(alias = "message-forward")] fn is_message_forward(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "message-forward") } + #[doc(alias = "message-forward")] fn set_message_forward(&self, message_forward: bool) { glib::ObjectExt::set_property(self.as_ref(), "message-forward", message_forward) } + #[doc(alias = "deep-element-added")] fn connect_deep_element_added( &self, f: F, @@ -253,6 +193,7 @@ impl> GstBinExt for O { } } + #[doc(alias = "deep-element-removed")] fn connect_deep_element_removed( &self, f: F, @@ -286,6 +227,7 @@ impl> GstBinExt for O { } } + #[doc(alias = "element-added")] fn connect_element_added( &self, f: F, @@ -317,6 +259,7 @@ impl> GstBinExt for O { } } + #[doc(alias = "element-removed")] fn connect_element_removed( &self, f: F, @@ -348,6 +291,7 @@ impl> GstBinExt for O { } } + #[doc(alias = "async-handling")] fn connect_async_handling_notify( &self, f: F, @@ -376,6 +320,7 @@ impl> GstBinExt for O { } } + #[doc(alias = "message-forward")] fn connect_message_forward_notify( &self, f: F, @@ -404,3 +349,5 @@ impl> GstBinExt for O { } } } + +impl> GstBinExt for O {} diff --git a/gstreamer/src/auto/buffer_pool.rs b/gstreamer/src/auto/buffer_pool.rs index 623d1ac4f..43d16b30e 100644 --- a/gstreamer/src/auto/buffer_pool.rs +++ b/gstreamer/src/auto/buffer_pool.rs @@ -34,28 +34,14 @@ impl Default for BufferPool { unsafe impl Send for BufferPool {} unsafe impl Sync for BufferPool {} -pub trait BufferPoolExt: 'static { - #[doc(alias = "gst_buffer_pool_get_options")] - #[doc(alias = "get_options")] - fn options(&self) -> Vec; - - #[doc(alias = "gst_buffer_pool_has_option")] - fn has_option(&self, option: &str) -> bool; - - #[doc(alias = "gst_buffer_pool_is_active")] - fn is_active(&self) -> bool; - - #[doc(alias = "gst_buffer_pool_release_buffer")] - fn release_buffer(&self, buffer: Buffer); - - #[doc(alias = "gst_buffer_pool_set_active")] - fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_buffer_pool_set_flushing")] - fn set_flushing(&self, flushing: bool); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> BufferPoolExt for O { +pub trait BufferPoolExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_buffer_pool_get_options")] + #[doc(alias = "get_options")] fn options(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::gst_buffer_pool_get_options( @@ -64,6 +50,7 @@ impl> BufferPoolExt for O { } } + #[doc(alias = "gst_buffer_pool_has_option")] fn has_option(&self, option: &str) -> bool { unsafe { from_glib(ffi::gst_buffer_pool_has_option( @@ -73,6 +60,7 @@ impl> BufferPoolExt for O { } } + #[doc(alias = "gst_buffer_pool_is_active")] fn is_active(&self) -> bool { unsafe { from_glib(ffi::gst_buffer_pool_is_active( @@ -81,6 +69,7 @@ impl> BufferPoolExt for O { } } + #[doc(alias = "gst_buffer_pool_release_buffer")] fn release_buffer(&self, buffer: Buffer) { unsafe { ffi::gst_buffer_pool_release_buffer( @@ -90,6 +79,7 @@ impl> BufferPoolExt for O { } } + #[doc(alias = "gst_buffer_pool_set_active")] fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -99,9 +89,12 @@ impl> BufferPoolExt for O { } } + #[doc(alias = "gst_buffer_pool_set_flushing")] fn set_flushing(&self, flushing: bool) { unsafe { ffi::gst_buffer_pool_set_flushing(self.as_ref().to_glib_none().0, flushing.into_glib()); } } } + +impl> BufferPoolExt for O {} diff --git a/gstreamer/src/auto/child_proxy.rs b/gstreamer/src/auto/child_proxy.rs index 015f957a9..492a68e91 100644 --- a/gstreamer/src/auto/child_proxy.rs +++ b/gstreamer/src/auto/child_proxy.rs @@ -26,58 +26,13 @@ impl ChildProxy { unsafe impl Send for ChildProxy {} unsafe impl Sync for ChildProxy {} -pub trait ChildProxyExt: 'static { - #[doc(alias = "gst_child_proxy_child_added")] - fn child_added(&self, child: &impl IsA, name: &str); - - #[doc(alias = "gst_child_proxy_child_removed")] - fn child_removed(&self, child: &impl IsA, name: &str); - - //#[doc(alias = "gst_child_proxy_get")] - //fn get(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs); - - #[doc(alias = "gst_child_proxy_get_child_by_index")] - #[doc(alias = "get_child_by_index")] - fn child_by_index(&self, index: u32) -> Option; - - #[doc(alias = "gst_child_proxy_get_child_by_name")] - #[doc(alias = "get_child_by_name")] - fn child_by_name(&self, name: &str) -> Option; - - #[cfg(feature = "v1_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] - #[doc(alias = "gst_child_proxy_get_child_by_name_recurse")] - #[doc(alias = "get_child_by_name_recurse")] - fn child_by_name_recurse(&self, name: &str) -> Option; - - #[doc(alias = "gst_child_proxy_get_children_count")] - #[doc(alias = "get_children_count")] - fn children_count(&self) -> u32; - - //#[doc(alias = "gst_child_proxy_get_valist")] - //#[doc(alias = "get_valist")] - //fn valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); - - //#[doc(alias = "gst_child_proxy_set")] - //fn set(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs); - - //#[doc(alias = "gst_child_proxy_set_valist")] - //fn set_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); - - #[doc(alias = "child-added")] - fn connect_child_added( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "child-removed")] - fn connect_child_removed( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> ChildProxyExt for O { +pub trait ChildProxyExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_child_proxy_child_added")] fn child_added(&self, child: &impl IsA, name: &str) { unsafe { ffi::gst_child_proxy_child_added( @@ -88,6 +43,7 @@ impl> ChildProxyExt for O { } } + #[doc(alias = "gst_child_proxy_child_removed")] fn child_removed(&self, child: &impl IsA, name: &str) { unsafe { ffi::gst_child_proxy_child_removed( @@ -98,10 +54,13 @@ impl> ChildProxyExt for O { } } + //#[doc(alias = "gst_child_proxy_get")] //fn get(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) { // unsafe { TODO: call ffi:gst_child_proxy_get() } //} + #[doc(alias = "gst_child_proxy_get_child_by_index")] + #[doc(alias = "get_child_by_index")] fn child_by_index(&self, index: u32) -> Option { unsafe { from_glib_full(ffi::gst_child_proxy_get_child_by_index( @@ -111,6 +70,8 @@ impl> ChildProxyExt for O { } } + #[doc(alias = "gst_child_proxy_get_child_by_name")] + #[doc(alias = "get_child_by_name")] fn child_by_name(&self, name: &str) -> Option { unsafe { from_glib_full(ffi::gst_child_proxy_get_child_by_name( @@ -122,6 +83,8 @@ impl> ChildProxyExt for O { #[cfg(feature = "v1_22")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] + #[doc(alias = "gst_child_proxy_get_child_by_name_recurse")] + #[doc(alias = "get_child_by_name_recurse")] fn child_by_name_recurse(&self, name: &str) -> Option { unsafe { from_glib_full(ffi::gst_child_proxy_get_child_by_name_recurse( @@ -131,22 +94,29 @@ impl> ChildProxyExt for O { } } + #[doc(alias = "gst_child_proxy_get_children_count")] + #[doc(alias = "get_children_count")] fn children_count(&self) -> u32 { unsafe { ffi::gst_child_proxy_get_children_count(self.as_ref().to_glib_none().0) } } + //#[doc(alias = "gst_child_proxy_get_valist")] + //#[doc(alias = "get_valist")] //fn valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { // unsafe { TODO: call ffi:gst_child_proxy_get_valist() } //} + //#[doc(alias = "gst_child_proxy_set")] //fn set(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) { // unsafe { TODO: call ffi:gst_child_proxy_set() } //} + //#[doc(alias = "gst_child_proxy_set_valist")] //fn set_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { // unsafe { TODO: call ffi:gst_child_proxy_set_valist() } //} + #[doc(alias = "child-added")] fn connect_child_added( &self, f: F, @@ -180,6 +150,7 @@ impl> ChildProxyExt for O { } } + #[doc(alias = "child-removed")] fn connect_child_removed( &self, f: F, @@ -213,3 +184,5 @@ impl> ChildProxyExt for O { } } } + +impl> ChildProxyExt for O {} diff --git a/gstreamer/src/auto/clock.rs b/gstreamer/src/auto/clock.rs index 997f7f22e..da06d3774 100644 --- a/gstreamer/src/auto/clock.rs +++ b/gstreamer/src/auto/clock.rs @@ -76,111 +76,13 @@ impl Clock { unsafe impl Send for Clock {} unsafe impl Sync for Clock {} -pub trait ClockExt: 'static { - #[doc(alias = "gst_clock_add_observation")] - fn add_observation(&self, slave: ClockTime, master: ClockTime) -> Option; - - #[doc(alias = "gst_clock_add_observation_unapplied")] - fn add_observation_unapplied( - &self, - slave: ClockTime, - master: ClockTime, - ) -> Option<(f64, ClockTime, ClockTime, ClockTime, ClockTime)>; - - #[doc(alias = "gst_clock_adjust_unlocked")] - fn adjust_unlocked(&self, internal: ClockTime) -> Option; - - #[doc(alias = "gst_clock_get_calibration")] - #[doc(alias = "get_calibration")] - fn calibration(&self) -> (ClockTime, ClockTime, ClockTime, ClockTime); - - #[doc(alias = "gst_clock_get_internal_time")] - #[doc(alias = "get_internal_time")] - fn internal_time(&self) -> ClockTime; - - #[doc(alias = "gst_clock_get_master")] - #[doc(alias = "get_master")] - #[must_use] - fn master(&self) -> Option; - - #[doc(alias = "gst_clock_get_resolution")] - #[doc(alias = "get_resolution")] - fn resolution(&self) -> ClockTime; - - #[doc(alias = "gst_clock_get_time")] - #[doc(alias = "get_time")] - fn time(&self) -> Option; - - #[doc(alias = "gst_clock_get_timeout")] - #[doc(alias = "get_timeout")] - fn timeout(&self) -> Option; - - #[doc(alias = "gst_clock_is_synced")] - fn is_synced(&self) -> bool; - - #[doc(alias = "gst_clock_set_calibration")] - fn set_calibration( - &self, - internal: ClockTime, - external: ClockTime, - rate_num: ClockTime, - rate_denom: ClockTime, - ); - - #[doc(alias = "gst_clock_set_master")] - fn set_master(&self, master: Option<&impl IsA>) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_clock_set_resolution")] - fn set_resolution(&self, resolution: ClockTime) -> ClockTime; - - #[doc(alias = "gst_clock_set_synced")] - fn set_synced(&self, synced: bool); - - #[doc(alias = "gst_clock_set_timeout")] - fn set_timeout(&self, timeout: impl Into>); - - #[doc(alias = "gst_clock_unadjust_unlocked")] - fn unadjust_unlocked(&self, external: ClockTime) -> Option; - - #[doc(alias = "gst_clock_wait_for_sync")] - fn wait_for_sync( - &self, - timeout: impl Into>, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "window-size")] - fn window_size(&self) -> i32; - - #[doc(alias = "window-size")] - fn set_window_size(&self, window_size: i32); - - #[doc(alias = "window-threshold")] - fn window_threshold(&self) -> i32; - - #[doc(alias = "window-threshold")] - fn set_window_threshold(&self, window_threshold: i32); - - #[doc(alias = "synced")] - fn connect_synced(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "timeout")] - fn connect_timeout_notify(&self, f: F) - -> SignalHandlerId; - - #[doc(alias = "window-size")] - fn connect_window_size_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "window-threshold")] - fn connect_window_threshold_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> ClockExt for O { +pub trait ClockExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_clock_add_observation")] fn add_observation(&self, slave: ClockTime, master: ClockTime) -> Option { unsafe { let mut r_squared = mem::MaybeUninit::uninit(); @@ -198,6 +100,7 @@ impl> ClockExt for O { } } + #[doc(alias = "gst_clock_add_observation_unapplied")] fn add_observation_unapplied( &self, slave: ClockTime, @@ -233,6 +136,7 @@ impl> ClockExt for O { } } + #[doc(alias = "gst_clock_adjust_unlocked")] fn adjust_unlocked(&self, internal: ClockTime) -> Option { unsafe { from_glib(ffi::gst_clock_adjust_unlocked( @@ -242,6 +146,8 @@ impl> ClockExt for O { } } + #[doc(alias = "gst_clock_get_calibration")] + #[doc(alias = "get_calibration")] fn calibration(&self) -> (ClockTime, ClockTime, ClockTime, ClockTime) { unsafe { let mut internal = mem::MaybeUninit::uninit(); @@ -264,6 +170,8 @@ impl> ClockExt for O { } } + #[doc(alias = "gst_clock_get_internal_time")] + #[doc(alias = "get_internal_time")] fn internal_time(&self) -> ClockTime { unsafe { try_from_glib(ffi::gst_clock_get_internal_time( @@ -273,10 +181,15 @@ impl> ClockExt for O { } } + #[doc(alias = "gst_clock_get_master")] + #[doc(alias = "get_master")] + #[must_use] fn master(&self) -> Option { unsafe { from_glib_full(ffi::gst_clock_get_master(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_clock_get_resolution")] + #[doc(alias = "get_resolution")] fn resolution(&self) -> ClockTime { unsafe { try_from_glib(ffi::gst_clock_get_resolution( @@ -286,18 +199,24 @@ impl> ClockExt for O { } } + #[doc(alias = "gst_clock_get_time")] + #[doc(alias = "get_time")] fn time(&self) -> Option { unsafe { from_glib(ffi::gst_clock_get_time(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_clock_get_timeout")] + #[doc(alias = "get_timeout")] fn timeout(&self) -> Option { unsafe { from_glib(ffi::gst_clock_get_timeout(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_clock_is_synced")] fn is_synced(&self) -> bool { unsafe { from_glib(ffi::gst_clock_is_synced(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_clock_set_calibration")] fn set_calibration( &self, internal: ClockTime, @@ -316,6 +235,7 @@ impl> ClockExt for O { } } + #[doc(alias = "gst_clock_set_master")] fn set_master(&self, master: Option<&impl IsA>) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -328,6 +248,7 @@ impl> ClockExt for O { } } + #[doc(alias = "gst_clock_set_resolution")] fn set_resolution(&self, resolution: ClockTime) -> ClockTime { unsafe { try_from_glib(ffi::gst_clock_set_resolution( @@ -338,18 +259,21 @@ impl> ClockExt for O { } } + #[doc(alias = "gst_clock_set_synced")] fn set_synced(&self, synced: bool) { unsafe { ffi::gst_clock_set_synced(self.as_ref().to_glib_none().0, synced.into_glib()); } } + #[doc(alias = "gst_clock_set_timeout")] fn set_timeout(&self, timeout: impl Into>) { unsafe { ffi::gst_clock_set_timeout(self.as_ref().to_glib_none().0, timeout.into().into_glib()); } } + #[doc(alias = "gst_clock_unadjust_unlocked")] fn unadjust_unlocked(&self, external: ClockTime) -> Option { unsafe { from_glib(ffi::gst_clock_unadjust_unlocked( @@ -359,6 +283,7 @@ impl> ClockExt for O { } } + #[doc(alias = "gst_clock_wait_for_sync")] fn wait_for_sync( &self, timeout: impl Into>, @@ -374,22 +299,27 @@ impl> ClockExt for O { } } + #[doc(alias = "window-size")] fn window_size(&self) -> i32 { glib::ObjectExt::property(self.as_ref(), "window-size") } + #[doc(alias = "window-size")] fn set_window_size(&self, window_size: i32) { glib::ObjectExt::set_property(self.as_ref(), "window-size", window_size) } + #[doc(alias = "window-threshold")] fn window_threshold(&self) -> i32 { glib::ObjectExt::property(self.as_ref(), "window-threshold") } + #[doc(alias = "window-threshold")] fn set_window_threshold(&self, window_threshold: i32) { glib::ObjectExt::set_property(self.as_ref(), "window-threshold", window_threshold) } + #[doc(alias = "synced")] fn connect_synced(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn synced_trampoline< P: IsA, @@ -418,6 +348,7 @@ impl> ClockExt for O { } } + #[doc(alias = "timeout")] fn connect_timeout_notify( &self, f: F, @@ -446,6 +377,7 @@ impl> ClockExt for O { } } + #[doc(alias = "window-size")] fn connect_window_size_notify( &self, f: F, @@ -474,6 +406,7 @@ impl> ClockExt for O { } } + #[doc(alias = "window-threshold")] fn connect_window_threshold_notify( &self, f: F, @@ -502,3 +435,5 @@ impl> ClockExt for O { } } } + +impl> ClockExt for O {} diff --git a/gstreamer/src/auto/control_binding.rs b/gstreamer/src/auto/control_binding.rs index aa29f3e1a..9220d7438 100644 --- a/gstreamer/src/auto/control_binding.rs +++ b/gstreamer/src/auto/control_binding.rs @@ -22,33 +22,14 @@ impl ControlBinding { unsafe impl Send for ControlBinding {} unsafe impl Sync for ControlBinding {} -pub trait ControlBindingExt: 'static { - #[doc(alias = "gst_control_binding_get_value")] - #[doc(alias = "get_value")] - fn value(&self, timestamp: ClockTime) -> Option; - - //#[doc(alias = "gst_control_binding_get_value_array")] - //#[doc(alias = "get_value_array")] - //fn is_value_array(&self, timestamp: impl Into>, interval: impl Into>, values: /*Unimplemented*/&[&Basic: Pointer]) -> bool; - - #[doc(alias = "gst_control_binding_is_disabled")] - fn is_disabled(&self) -> bool; - - #[doc(alias = "gst_control_binding_set_disabled")] - fn set_disabled(&self, disabled: bool); - - #[doc(alias = "gst_control_binding_sync_values")] - fn sync_values( - &self, - object: &impl IsA, - timestamp: ClockTime, - last_sync: impl Into>, - ) -> bool; - - fn object(&self) -> Option; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> ControlBindingExt for O { +pub trait ControlBindingExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_control_binding_get_value")] + #[doc(alias = "get_value")] fn value(&self, timestamp: ClockTime) -> Option { unsafe { from_glib_full(ffi::gst_control_binding_get_value( @@ -58,10 +39,13 @@ impl> ControlBindingExt for O { } } + //#[doc(alias = "gst_control_binding_get_value_array")] + //#[doc(alias = "get_value_array")] //fn is_value_array(&self, timestamp: impl Into>, interval: impl Into>, values: /*Unimplemented*/&[&Basic: Pointer]) -> bool { // unsafe { TODO: call ffi:gst_control_binding_get_value_array() } //} + #[doc(alias = "gst_control_binding_is_disabled")] fn is_disabled(&self) -> bool { unsafe { from_glib(ffi::gst_control_binding_is_disabled( @@ -70,6 +54,7 @@ impl> ControlBindingExt for O { } } + #[doc(alias = "gst_control_binding_set_disabled")] fn set_disabled(&self, disabled: bool) { unsafe { ffi::gst_control_binding_set_disabled( @@ -79,6 +64,7 @@ impl> ControlBindingExt for O { } } + #[doc(alias = "gst_control_binding_sync_values")] fn sync_values( &self, object: &impl IsA, @@ -99,3 +85,5 @@ impl> ControlBindingExt for O { glib::ObjectExt::property(self.as_ref(), "object") } } + +impl> ControlBindingExt for O {} diff --git a/gstreamer/src/auto/control_source.rs b/gstreamer/src/auto/control_source.rs index 361b3b2a1..c392c770e 100644 --- a/gstreamer/src/auto/control_source.rs +++ b/gstreamer/src/auto/control_source.rs @@ -23,13 +23,14 @@ impl ControlSource { unsafe impl Send for ControlSource {} unsafe impl Sync for ControlSource {} -pub trait ControlSourceExt: 'static { - #[doc(alias = "gst_control_source_get_value")] - #[doc(alias = "control_source_get_value")] - fn value(&self, timestamp: ClockTime) -> Option; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> ControlSourceExt for O { +pub trait ControlSourceExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_control_source_get_value")] + #[doc(alias = "control_source_get_value")] fn value(&self, timestamp: ClockTime) -> Option { unsafe { let mut value = mem::MaybeUninit::uninit(); @@ -46,3 +47,5 @@ impl> ControlSourceExt for O { } } } + +impl> ControlSourceExt for O {} diff --git a/gstreamer/src/auto/device.rs b/gstreamer/src/auto/device.rs index 5a5122601..18a6d74e1 100644 --- a/gstreamer/src/auto/device.rs +++ b/gstreamer/src/auto/device.rs @@ -27,43 +27,13 @@ impl Device { unsafe impl Send for Device {} unsafe impl Sync for Device {} -pub trait DeviceExt: 'static { - #[doc(alias = "gst_device_create_element")] - fn create_element(&self, name: Option<&str>) -> Result; - - #[doc(alias = "gst_device_get_caps")] - #[doc(alias = "get_caps")] - fn caps(&self) -> Option; - - #[doc(alias = "gst_device_get_device_class")] - #[doc(alias = "get_device_class")] - fn device_class(&self) -> glib::GString; - - #[doc(alias = "gst_device_get_display_name")] - #[doc(alias = "get_display_name")] - fn display_name(&self) -> glib::GString; - - #[doc(alias = "gst_device_get_properties")] - #[doc(alias = "get_properties")] - fn properties(&self) -> Option; - - #[doc(alias = "gst_device_has_classes")] - fn has_classes(&self, classes: &str) -> bool; - - #[doc(alias = "gst_device_has_classesv")] - fn has_classesv(&self, classes: &[&str]) -> bool; - - #[doc(alias = "gst_device_reconfigure_element")] - fn reconfigure_element( - &self, - element: &impl IsA, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "removed")] - fn connect_removed(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> DeviceExt for O { +pub trait DeviceExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_device_create_element")] fn create_element(&self, name: Option<&str>) -> Result { unsafe { Option::<_>::from_glib_none(ffi::gst_device_create_element( @@ -74,10 +44,14 @@ impl> DeviceExt for O { } } + #[doc(alias = "gst_device_get_caps")] + #[doc(alias = "get_caps")] fn caps(&self) -> Option { unsafe { from_glib_full(ffi::gst_device_get_caps(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_device_get_device_class")] + #[doc(alias = "get_device_class")] fn device_class(&self) -> glib::GString { unsafe { from_glib_full(ffi::gst_device_get_device_class( @@ -86,6 +60,8 @@ impl> DeviceExt for O { } } + #[doc(alias = "gst_device_get_display_name")] + #[doc(alias = "get_display_name")] fn display_name(&self) -> glib::GString { unsafe { from_glib_full(ffi::gst_device_get_display_name( @@ -94,6 +70,8 @@ impl> DeviceExt for O { } } + #[doc(alias = "gst_device_get_properties")] + #[doc(alias = "get_properties")] fn properties(&self) -> Option { unsafe { from_glib_full(ffi::gst_device_get_properties( @@ -102,6 +80,7 @@ impl> DeviceExt for O { } } + #[doc(alias = "gst_device_has_classes")] fn has_classes(&self, classes: &str) -> bool { unsafe { from_glib(ffi::gst_device_has_classes( @@ -111,6 +90,7 @@ impl> DeviceExt for O { } } + #[doc(alias = "gst_device_has_classesv")] fn has_classesv(&self, classes: &[&str]) -> bool { unsafe { from_glib(ffi::gst_device_has_classesv( @@ -120,6 +100,7 @@ impl> DeviceExt for O { } } + #[doc(alias = "gst_device_reconfigure_element")] fn reconfigure_element( &self, element: &impl IsA, @@ -135,6 +116,7 @@ impl> DeviceExt for O { } } + #[doc(alias = "removed")] fn connect_removed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn removed_trampoline< P: IsA, @@ -159,3 +141,5 @@ impl> DeviceExt for O { } } } + +impl> DeviceExt for O {} diff --git a/gstreamer/src/auto/device_monitor.rs b/gstreamer/src/auto/device_monitor.rs index 2d0f25fd6..c2ae9609f 100644 --- a/gstreamer/src/auto/device_monitor.rs +++ b/gstreamer/src/auto/device_monitor.rs @@ -39,42 +39,14 @@ impl Default for DeviceMonitor { unsafe impl Send for DeviceMonitor {} unsafe impl Sync for DeviceMonitor {} -pub trait DeviceMonitorExt: 'static { - #[doc(alias = "gst_device_monitor_get_bus")] - #[doc(alias = "get_bus")] - fn bus(&self) -> Bus; - - #[doc(alias = "gst_device_monitor_get_providers")] - #[doc(alias = "get_providers")] - fn providers(&self) -> Vec; - - #[doc(alias = "gst_device_monitor_get_show_all_devices")] - #[doc(alias = "get_show_all_devices")] - fn shows_all_devices(&self) -> bool; - - #[doc(alias = "gst_device_monitor_set_show_all_devices")] - fn set_show_all_devices(&self, show_all: bool); - - #[doc(alias = "gst_device_monitor_start")] - fn start(&self) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_device_monitor_stop")] - fn stop(&self); - - #[doc(alias = "show-all")] - fn shows_all(&self) -> bool; - - #[doc(alias = "show-all")] - fn set_show_all(&self, show_all: bool); - - #[doc(alias = "show-all")] - fn connect_show_all_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> DeviceMonitorExt for O { +pub trait DeviceMonitorExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_device_monitor_get_bus")] + #[doc(alias = "get_bus")] fn bus(&self) -> Bus { unsafe { from_glib_full(ffi::gst_device_monitor_get_bus( @@ -83,6 +55,8 @@ impl> DeviceMonitorExt for O { } } + #[doc(alias = "gst_device_monitor_get_providers")] + #[doc(alias = "get_providers")] fn providers(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_device_monitor_get_providers( @@ -91,6 +65,8 @@ impl> DeviceMonitorExt for O { } } + #[doc(alias = "gst_device_monitor_get_show_all_devices")] + #[doc(alias = "get_show_all_devices")] fn shows_all_devices(&self) -> bool { unsafe { from_glib(ffi::gst_device_monitor_get_show_all_devices( @@ -99,6 +75,7 @@ impl> DeviceMonitorExt for O { } } + #[doc(alias = "gst_device_monitor_set_show_all_devices")] fn set_show_all_devices(&self, show_all: bool) { unsafe { ffi::gst_device_monitor_set_show_all_devices( @@ -108,6 +85,7 @@ impl> DeviceMonitorExt for O { } } + #[doc(alias = "gst_device_monitor_start")] fn start(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -117,20 +95,24 @@ impl> DeviceMonitorExt for O { } } + #[doc(alias = "gst_device_monitor_stop")] fn stop(&self) { unsafe { ffi::gst_device_monitor_stop(self.as_ref().to_glib_none().0); } } + #[doc(alias = "show-all")] fn shows_all(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "show-all") } + #[doc(alias = "show-all")] fn set_show_all(&self, show_all: bool) { glib::ObjectExt::set_property(self.as_ref(), "show-all", show_all) } + #[doc(alias = "show-all")] fn connect_show_all_notify( &self, f: F, @@ -159,3 +141,5 @@ impl> DeviceMonitorExt for O { } } } + +impl> DeviceMonitorExt for O {} diff --git a/gstreamer/src/auto/device_provider.rs b/gstreamer/src/auto/device_provider.rs index b885317b3..193a67375 100644 --- a/gstreamer/src/auto/device_provider.rs +++ b/gstreamer/src/auto/device_provider.rs @@ -27,64 +27,13 @@ impl DeviceProvider { unsafe impl Send for DeviceProvider {} unsafe impl Sync for DeviceProvider {} -pub trait DeviceProviderExt: 'static { - #[doc(alias = "gst_device_provider_can_monitor")] - fn can_monitor(&self) -> bool; - - #[doc(alias = "gst_device_provider_device_add")] - fn device_add(&self, device: &impl IsA); - - #[cfg(feature = "v1_16")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] - #[doc(alias = "gst_device_provider_device_changed")] - fn device_changed(&self, device: &impl IsA, changed_device: &impl IsA); - - #[doc(alias = "gst_device_provider_device_remove")] - fn device_remove(&self, device: &impl IsA); - - #[doc(alias = "gst_device_provider_get_bus")] - #[doc(alias = "get_bus")] - fn bus(&self) -> Bus; - - #[doc(alias = "gst_device_provider_get_factory")] - #[doc(alias = "get_factory")] - fn factory(&self) -> Option; - - #[doc(alias = "gst_device_provider_get_hidden_providers")] - #[doc(alias = "get_hidden_providers")] - fn hidden_providers(&self) -> Vec; - - #[doc(alias = "gst_device_provider_hide_provider")] - fn hide_provider(&self, name: &str); - - #[cfg(feature = "v1_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] - #[doc(alias = "gst_device_provider_is_started")] - fn is_started(&self) -> bool; - - #[doc(alias = "gst_device_provider_start")] - fn start(&self) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_device_provider_stop")] - fn stop(&self); - - #[doc(alias = "gst_device_provider_unhide_provider")] - fn unhide_provider(&self, name: &str); - - #[doc(alias = "provider-hidden")] - fn connect_provider_hidden( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "provider-unhidden")] - fn connect_provider_unhidden( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> DeviceProviderExt for O { +pub trait DeviceProviderExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_device_provider_can_monitor")] fn can_monitor(&self) -> bool { unsafe { from_glib(ffi::gst_device_provider_can_monitor( @@ -93,6 +42,7 @@ impl> DeviceProviderExt for O { } } + #[doc(alias = "gst_device_provider_device_add")] fn device_add(&self, device: &impl IsA) { unsafe { ffi::gst_device_provider_device_add( @@ -104,6 +54,7 @@ impl> DeviceProviderExt for O { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] + #[doc(alias = "gst_device_provider_device_changed")] fn device_changed(&self, device: &impl IsA, changed_device: &impl IsA) { unsafe { ffi::gst_device_provider_device_changed( @@ -114,6 +65,7 @@ impl> DeviceProviderExt for O { } } + #[doc(alias = "gst_device_provider_device_remove")] fn device_remove(&self, device: &impl IsA) { unsafe { ffi::gst_device_provider_device_remove( @@ -123,6 +75,8 @@ impl> DeviceProviderExt for O { } } + #[doc(alias = "gst_device_provider_get_bus")] + #[doc(alias = "get_bus")] fn bus(&self) -> Bus { unsafe { from_glib_full(ffi::gst_device_provider_get_bus( @@ -131,6 +85,8 @@ impl> DeviceProviderExt for O { } } + #[doc(alias = "gst_device_provider_get_factory")] + #[doc(alias = "get_factory")] fn factory(&self) -> Option { unsafe { from_glib_none(ffi::gst_device_provider_get_factory( @@ -139,6 +95,8 @@ impl> DeviceProviderExt for O { } } + #[doc(alias = "gst_device_provider_get_hidden_providers")] + #[doc(alias = "get_hidden_providers")] fn hidden_providers(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_device_provider_get_hidden_providers( @@ -147,6 +105,7 @@ impl> DeviceProviderExt for O { } } + #[doc(alias = "gst_device_provider_hide_provider")] fn hide_provider(&self, name: &str) { unsafe { ffi::gst_device_provider_hide_provider( @@ -158,6 +117,7 @@ impl> DeviceProviderExt for O { #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] + #[doc(alias = "gst_device_provider_is_started")] fn is_started(&self) -> bool { unsafe { from_glib(ffi::gst_device_provider_is_started( @@ -166,6 +126,7 @@ impl> DeviceProviderExt for O { } } + #[doc(alias = "gst_device_provider_start")] fn start(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -175,12 +136,14 @@ impl> DeviceProviderExt for O { } } + #[doc(alias = "gst_device_provider_stop")] fn stop(&self) { unsafe { ffi::gst_device_provider_stop(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_device_provider_unhide_provider")] fn unhide_provider(&self, name: &str) { unsafe { ffi::gst_device_provider_unhide_provider( @@ -190,6 +153,7 @@ impl> DeviceProviderExt for O { } } + #[doc(alias = "provider-hidden")] fn connect_provider_hidden( &self, f: F, @@ -221,6 +185,7 @@ impl> DeviceProviderExt for O { } } + #[doc(alias = "provider-unhidden")] fn connect_provider_unhidden( &self, f: F, @@ -252,3 +217,5 @@ impl> DeviceProviderExt for O { } } } + +impl> DeviceProviderExt for O {} diff --git a/gstreamer/src/auto/element.rs b/gstreamer/src/auto/element.rs index 8ba0aa9e6..18f9c89cd 100644 --- a/gstreamer/src/auto/element.rs +++ b/gstreamer/src/auto/element.rs @@ -54,169 +54,20 @@ impl Element { unsafe impl Send for Element {} unsafe impl Sync for Element {} -pub trait ElementExt: 'static { - #[doc(alias = "gst_element_abort_state")] - fn abort_state(&self); - - #[doc(alias = "gst_element_add_pad")] - fn add_pad(&self, pad: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_element_change_state")] - fn change_state(&self, transition: StateChange) - -> Result; - - #[doc(alias = "gst_element_continue_state")] - fn continue_state( - &self, - ret: impl Into, - ) -> Result; - - #[doc(alias = "gst_element_create_all_pads")] - fn create_all_pads(&self); - - #[cfg(feature = "v1_24")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] - #[doc(alias = "gst_element_decorate_stream_id")] - fn decorate_stream_id(&self, stream_id: &str) -> glib::GString; - - #[doc(alias = "gst_element_foreach_pad")] - fn foreach_pad bool>(&self, func: P) -> bool; - - #[doc(alias = "gst_element_foreach_sink_pad")] - fn foreach_sink_pad bool>(&self, func: P) -> bool; - - #[doc(alias = "gst_element_foreach_src_pad")] - fn foreach_src_pad bool>(&self, func: P) -> bool; - - #[doc(alias = "gst_element_get_base_time")] - #[doc(alias = "get_base_time")] - fn base_time(&self) -> Option; - - #[doc(alias = "gst_element_get_bus")] - #[doc(alias = "get_bus")] - fn bus(&self) -> Option; - - #[doc(alias = "gst_element_get_clock")] - #[doc(alias = "get_clock")] - fn clock(&self) -> Option; - - #[doc(alias = "gst_element_get_compatible_pad")] - #[doc(alias = "get_compatible_pad")] - fn compatible_pad(&self, pad: &impl IsA, caps: Option<&Caps>) -> Option; - - #[doc(alias = "gst_element_get_compatible_pad_template")] - #[doc(alias = "get_compatible_pad_template")] - fn compatible_pad_template(&self, compattempl: &PadTemplate) -> Option; - - #[doc(alias = "gst_element_get_context")] - #[doc(alias = "get_context")] - fn context(&self, context_type: &str) -> Option; - - #[doc(alias = "gst_element_get_contexts")] - #[doc(alias = "get_contexts")] - fn contexts(&self) -> Vec; - - #[doc(alias = "gst_element_get_factory")] - #[doc(alias = "get_factory")] - fn factory(&self) -> Option; - - #[doc(alias = "gst_element_get_start_time")] - #[doc(alias = "get_start_time")] - fn start_time(&self) -> Option; - - #[doc(alias = "gst_element_get_state")] - #[doc(alias = "get_state")] - fn state( - &self, - timeout: impl Into>, - ) -> (Result, State, State); - - #[doc(alias = "gst_element_get_static_pad")] - #[doc(alias = "get_static_pad")] - fn static_pad(&self, name: &str) -> Option; - - #[doc(alias = "gst_element_is_locked_state")] - fn is_locked_state(&self) -> bool; - - #[doc(alias = "gst_element_lost_state")] - fn lost_state(&self); - - #[doc(alias = "gst_element_no_more_pads")] - fn no_more_pads(&self); - - #[doc(alias = "gst_element_post_message")] - fn post_message(&self, message: Message) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_element_provide_clock")] - fn provide_clock(&self) -> Option; - - #[doc(alias = "gst_element_release_request_pad")] - fn release_request_pad(&self, pad: &impl IsA); - - #[doc(alias = "gst_element_remove_pad")] - fn remove_pad(&self, pad: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_element_request_pad")] - fn request_pad( - &self, - templ: &PadTemplate, - name: Option<&str>, - caps: Option<&Caps>, - ) -> Option; - - #[doc(alias = "gst_element_set_base_time")] - fn set_base_time(&self, time: ClockTime); - - #[doc(alias = "gst_element_set_bus")] - fn set_bus(&self, bus: Option<&Bus>); - - #[doc(alias = "gst_element_set_clock")] - fn set_clock(&self, clock: Option<&impl IsA>) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_element_set_context")] - fn set_context(&self, context: &Context); - - #[doc(alias = "gst_element_set_locked_state")] - fn set_locked_state(&self, locked_state: bool) -> bool; - - #[doc(alias = "gst_element_set_start_time")] - fn set_start_time(&self, time: impl Into>); - - #[doc(alias = "gst_element_set_state")] - fn set_state(&self, state: State) -> Result; - - #[doc(alias = "gst_element_sync_state_with_parent")] - fn sync_state_with_parent(&self) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_element_unlink")] - fn unlink(&self, dest: &impl IsA); - - #[doc(alias = "gst_element_unlink_pads")] - fn unlink_pads(&self, srcpadname: &str, dest: &impl IsA, destpadname: &str); - - #[doc(alias = "no-more-pads")] - fn connect_no_more_pads(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "pad-added")] - fn connect_pad_added( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "pad-removed")] - fn connect_pad_removed( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> ElementExt for O { +pub trait ElementExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_element_abort_state")] fn abort_state(&self) { unsafe { ffi::gst_element_abort_state(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_element_add_pad")] fn add_pad(&self, pad: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -229,6 +80,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_change_state")] fn change_state( &self, transition: StateChange, @@ -241,6 +93,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_continue_state")] fn continue_state( &self, ret: impl Into, @@ -253,6 +106,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_create_all_pads")] fn create_all_pads(&self) { unsafe { ffi::gst_element_create_all_pads(self.as_ref().to_glib_none().0); @@ -261,6 +115,7 @@ impl> ElementExt for O { #[cfg(feature = "v1_24")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))] + #[doc(alias = "gst_element_decorate_stream_id")] fn decorate_stream_id(&self, stream_id: &str) -> glib::GString { unsafe { from_glib_full(ffi::gst_element_decorate_stream_id( @@ -270,6 +125,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_foreach_pad")] fn foreach_pad bool>(&self, func: P) -> bool { let func_data: P = func; unsafe extern "C" fn func_func bool>( @@ -293,6 +149,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_foreach_sink_pad")] fn foreach_sink_pad bool>(&self, func: P) -> bool { let func_data: P = func; unsafe extern "C" fn func_func bool>( @@ -316,6 +173,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_foreach_src_pad")] fn foreach_src_pad bool>(&self, func: P) -> bool { let func_data: P = func; unsafe extern "C" fn func_func bool>( @@ -339,6 +197,8 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_get_base_time")] + #[doc(alias = "get_base_time")] fn base_time(&self) -> Option { unsafe { from_glib(ffi::gst_element_get_base_time( @@ -347,14 +207,20 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_get_bus")] + #[doc(alias = "get_bus")] fn bus(&self) -> Option { unsafe { from_glib_full(ffi::gst_element_get_bus(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_element_get_clock")] + #[doc(alias = "get_clock")] fn clock(&self) -> Option { unsafe { from_glib_full(ffi::gst_element_get_clock(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_element_get_compatible_pad")] + #[doc(alias = "get_compatible_pad")] fn compatible_pad(&self, pad: &impl IsA, caps: Option<&Caps>) -> Option { unsafe { from_glib_full(ffi::gst_element_get_compatible_pad( @@ -365,6 +231,8 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_get_compatible_pad_template")] + #[doc(alias = "get_compatible_pad_template")] fn compatible_pad_template(&self, compattempl: &PadTemplate) -> Option { unsafe { from_glib_none(ffi::gst_element_get_compatible_pad_template( @@ -374,6 +242,8 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_get_context")] + #[doc(alias = "get_context")] fn context(&self, context_type: &str) -> Option { unsafe { from_glib_full(ffi::gst_element_get_context( @@ -383,6 +253,8 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_get_contexts")] + #[doc(alias = "get_contexts")] fn contexts(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_element_get_contexts( @@ -391,10 +263,14 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_get_factory")] + #[doc(alias = "get_factory")] fn factory(&self) -> Option { unsafe { from_glib_none(ffi::gst_element_get_factory(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_element_get_start_time")] + #[doc(alias = "get_start_time")] fn start_time(&self) -> Option { unsafe { from_glib(ffi::gst_element_get_start_time( @@ -403,6 +279,8 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_get_state")] + #[doc(alias = "get_state")] fn state( &self, timeout: impl Into>, @@ -424,6 +302,8 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_get_static_pad")] + #[doc(alias = "get_static_pad")] fn static_pad(&self, name: &str) -> Option { unsafe { from_glib_full(ffi::gst_element_get_static_pad( @@ -433,6 +313,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_is_locked_state")] fn is_locked_state(&self) -> bool { unsafe { from_glib(ffi::gst_element_is_locked_state( @@ -441,18 +322,21 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_lost_state")] fn lost_state(&self) { unsafe { ffi::gst_element_lost_state(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_element_no_more_pads")] fn no_more_pads(&self) { unsafe { ffi::gst_element_no_more_pads(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_element_post_message")] fn post_message(&self, message: Message) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -465,6 +349,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_provide_clock")] fn provide_clock(&self) -> Option { unsafe { from_glib_full(ffi::gst_element_provide_clock( @@ -473,6 +358,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_release_request_pad")] fn release_request_pad(&self, pad: &impl IsA) { unsafe { ffi::gst_element_release_request_pad( @@ -482,6 +368,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_remove_pad")] fn remove_pad(&self, pad: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -494,6 +381,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_request_pad")] fn request_pad( &self, templ: &PadTemplate, @@ -510,18 +398,21 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_set_base_time")] fn set_base_time(&self, time: ClockTime) { unsafe { ffi::gst_element_set_base_time(self.as_ref().to_glib_none().0, time.into_glib()); } } + #[doc(alias = "gst_element_set_bus")] fn set_bus(&self, bus: Option<&Bus>) { unsafe { ffi::gst_element_set_bus(self.as_ref().to_glib_none().0, bus.to_glib_none().0); } } + #[doc(alias = "gst_element_set_clock")] fn set_clock(&self, clock: Option<&impl IsA>) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -534,12 +425,14 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_set_context")] fn set_context(&self, context: &Context) { unsafe { ffi::gst_element_set_context(self.as_ref().to_glib_none().0, context.to_glib_none().0); } } + #[doc(alias = "gst_element_set_locked_state")] fn set_locked_state(&self, locked_state: bool) -> bool { unsafe { from_glib(ffi::gst_element_set_locked_state( @@ -549,6 +442,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_set_start_time")] fn set_start_time(&self, time: impl Into>) { unsafe { ffi::gst_element_set_start_time( @@ -558,6 +452,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_set_state")] fn set_state(&self, state: State) -> Result { unsafe { try_from_glib(ffi::gst_element_set_state( @@ -567,6 +462,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_sync_state_with_parent")] fn sync_state_with_parent(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -576,6 +472,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_unlink")] fn unlink(&self, dest: &impl IsA) { unsafe { ffi::gst_element_unlink( @@ -585,6 +482,7 @@ impl> ElementExt for O { } } + #[doc(alias = "gst_element_unlink_pads")] fn unlink_pads(&self, srcpadname: &str, dest: &impl IsA, destpadname: &str) { unsafe { ffi::gst_element_unlink_pads( @@ -596,6 +494,7 @@ impl> ElementExt for O { } } + #[doc(alias = "no-more-pads")] fn connect_no_more_pads(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn no_more_pads_trampoline< P: IsA, @@ -620,6 +519,7 @@ impl> ElementExt for O { } } + #[doc(alias = "pad-added")] fn connect_pad_added( &self, f: F, @@ -651,6 +551,7 @@ impl> ElementExt for O { } } + #[doc(alias = "pad-removed")] fn connect_pad_removed( &self, f: F, @@ -682,3 +583,5 @@ impl> ElementExt for O { } } } + +impl> ElementExt for O {} diff --git a/gstreamer/src/auto/ghost_pad.rs b/gstreamer/src/auto/ghost_pad.rs index 266ad4e97..1d3f178de 100644 --- a/gstreamer/src/auto/ghost_pad.rs +++ b/gstreamer/src/auto/ghost_pad.rs @@ -22,16 +22,14 @@ impl GhostPad { unsafe impl Send for GhostPad {} unsafe impl Sync for GhostPad {} -pub trait GhostPadExt: 'static { - #[doc(alias = "gst_ghost_pad_get_target")] - #[doc(alias = "get_target")] - fn target(&self) -> Option; - - #[doc(alias = "gst_ghost_pad_set_target")] - fn set_target(&self, newtarget: Option<&impl IsA>) -> Result<(), glib::error::BoolError>; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> GhostPadExt for O { +pub trait GhostPadExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_ghost_pad_get_target")] + #[doc(alias = "get_target")] fn target(&self) -> Option { unsafe { from_glib_full(ffi::gst_ghost_pad_get_target( @@ -40,6 +38,7 @@ impl> GhostPadExt for O { } } + #[doc(alias = "gst_ghost_pad_set_target")] fn set_target(&self, newtarget: Option<&impl IsA>) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -52,3 +51,5 @@ impl> GhostPadExt for O { } } } + +impl> GhostPadExt for O {} diff --git a/gstreamer/src/auto/object.rs b/gstreamer/src/auto/object.rs index 382091123..b30ff9ebe 100644 --- a/gstreamer/src/auto/object.rs +++ b/gstreamer/src/auto/object.rs @@ -55,93 +55,13 @@ impl fmt::Display for Object { unsafe impl Send for Object {} unsafe impl Sync for Object {} -pub trait GstObjectExt: 'static { - #[doc(alias = "gst_object_add_control_binding")] - fn add_control_binding( - &self, - binding: &impl IsA, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_object_default_error")] - fn default_error(&self, error: &glib::Error, debug: Option<&str>); - - #[doc(alias = "gst_object_get_control_binding")] - #[doc(alias = "get_control_binding")] - fn control_binding(&self, property_name: &str) -> Option; - - #[doc(alias = "gst_object_get_control_rate")] - #[doc(alias = "get_control_rate")] - fn control_rate(&self) -> Option; - - #[doc(alias = "gst_object_get_name")] - #[doc(alias = "get_name")] - fn name(&self) -> glib::GString; - - #[doc(alias = "gst_object_get_parent")] - #[doc(alias = "get_parent")] - #[must_use] - fn parent(&self) -> Option; - - #[doc(alias = "gst_object_get_path_string")] - #[doc(alias = "get_path_string")] - fn path_string(&self) -> glib::GString; - - #[doc(alias = "gst_object_get_value")] - #[doc(alias = "get_value")] - fn value( - &self, - property_name: &str, - timestamp: impl Into>, - ) -> Option; - - //#[doc(alias = "gst_object_get_value_array")] - //#[doc(alias = "get_value_array")] - //fn is_value_array(&self, property_name: &str, timestamp: impl Into>, interval: impl Into>, values: /*Unimplemented*/&[&Basic: Pointer]) -> bool; - - #[doc(alias = "gst_object_has_active_control_bindings")] - fn has_active_control_bindings(&self) -> bool; - - #[doc(alias = "gst_object_has_ancestor")] - fn has_ancestor(&self, ancestor: &impl IsA) -> bool; - - #[doc(alias = "gst_object_has_as_ancestor")] - fn has_as_ancestor(&self, ancestor: &impl IsA) -> bool; - - #[doc(alias = "gst_object_has_as_parent")] - fn has_as_parent(&self, parent: &impl IsA) -> bool; - - #[doc(alias = "gst_object_remove_control_binding")] - fn remove_control_binding(&self, binding: &impl IsA) -> bool; - - #[doc(alias = "gst_object_set_control_binding_disabled")] - fn set_control_binding_disabled(&self, property_name: &str, disabled: bool); - - #[doc(alias = "gst_object_set_control_bindings_disabled")] - fn set_control_bindings_disabled(&self, disabled: bool); - - #[doc(alias = "gst_object_set_control_rate")] - fn set_control_rate(&self, control_rate: impl Into>); - - #[doc(alias = "gst_object_set_parent")] - fn set_parent(&self, parent: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_object_suggest_next_sync")] - fn suggest_next_sync(&self) -> Option; - - #[doc(alias = "gst_object_sync_values")] - fn sync_values(&self, timestamp: ClockTime) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_object_unparent")] - fn unparent(&self); - - //#[doc(alias = "deep-notify")] - //fn connect_deep_notify(&self, detail: Option<&str>, f: F) -> SignalHandlerId; - - #[doc(alias = "parent")] - fn connect_parent_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> GstObjectExt for O { +pub trait GstObjectExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_object_add_control_binding")] fn add_control_binding( &self, binding: &impl IsA, @@ -157,6 +77,7 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_default_error")] fn default_error(&self, error: &glib::Error, debug: Option<&str>) { unsafe { ffi::gst_object_default_error( @@ -167,6 +88,8 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_get_control_binding")] + #[doc(alias = "get_control_binding")] fn control_binding(&self, property_name: &str) -> Option { unsafe { from_glib_full(ffi::gst_object_get_control_binding( @@ -176,6 +99,8 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_get_control_rate")] + #[doc(alias = "get_control_rate")] fn control_rate(&self) -> Option { unsafe { from_glib(ffi::gst_object_get_control_rate( @@ -184,14 +109,21 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_get_name")] + #[doc(alias = "get_name")] fn name(&self) -> glib::GString { unsafe { from_glib_full(ffi::gst_object_get_name(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_object_get_parent")] + #[doc(alias = "get_parent")] + #[must_use] fn parent(&self) -> Option { unsafe { from_glib_full(ffi::gst_object_get_parent(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_object_get_path_string")] + #[doc(alias = "get_path_string")] fn path_string(&self) -> glib::GString { unsafe { from_glib_full(ffi::gst_object_get_path_string( @@ -200,6 +132,8 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_get_value")] + #[doc(alias = "get_value")] fn value( &self, property_name: &str, @@ -214,10 +148,13 @@ impl> GstObjectExt for O { } } + //#[doc(alias = "gst_object_get_value_array")] + //#[doc(alias = "get_value_array")] //fn is_value_array(&self, property_name: &str, timestamp: impl Into>, interval: impl Into>, values: /*Unimplemented*/&[&Basic: Pointer]) -> bool { // unsafe { TODO: call ffi:gst_object_get_value_array() } //} + #[doc(alias = "gst_object_has_active_control_bindings")] fn has_active_control_bindings(&self) -> bool { unsafe { from_glib(ffi::gst_object_has_active_control_bindings( @@ -226,6 +163,7 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_has_ancestor")] fn has_ancestor(&self, ancestor: &impl IsA) -> bool { unsafe { from_glib(ffi::gst_object_has_ancestor( @@ -235,6 +173,7 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_has_as_ancestor")] fn has_as_ancestor(&self, ancestor: &impl IsA) -> bool { unsafe { from_glib(ffi::gst_object_has_as_ancestor( @@ -244,6 +183,7 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_has_as_parent")] fn has_as_parent(&self, parent: &impl IsA) -> bool { unsafe { from_glib(ffi::gst_object_has_as_parent( @@ -253,6 +193,7 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_remove_control_binding")] fn remove_control_binding(&self, binding: &impl IsA) -> bool { unsafe { from_glib(ffi::gst_object_remove_control_binding( @@ -262,6 +203,7 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_set_control_binding_disabled")] fn set_control_binding_disabled(&self, property_name: &str, disabled: bool) { unsafe { ffi::gst_object_set_control_binding_disabled( @@ -272,6 +214,7 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_set_control_bindings_disabled")] fn set_control_bindings_disabled(&self, disabled: bool) { unsafe { ffi::gst_object_set_control_bindings_disabled( @@ -281,6 +224,7 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_set_control_rate")] fn set_control_rate(&self, control_rate: impl Into>) { unsafe { ffi::gst_object_set_control_rate( @@ -290,6 +234,7 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_set_parent")] fn set_parent(&self, parent: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -302,6 +247,7 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_suggest_next_sync")] fn suggest_next_sync(&self) -> Option { unsafe { from_glib(ffi::gst_object_suggest_next_sync( @@ -310,6 +256,7 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_sync_values")] fn sync_values(&self, timestamp: ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -319,16 +266,19 @@ impl> GstObjectExt for O { } } + #[doc(alias = "gst_object_unparent")] fn unparent(&self) { unsafe { ffi::gst_object_unparent(self.as_ref().to_glib_none().0); } } + //#[doc(alias = "deep-notify")] //fn connect_deep_notify(&self, detail: Option<&str>, f: F) -> SignalHandlerId { // Ignored prop: GObject.ParamSpec //} + #[doc(alias = "parent")] fn connect_parent_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_parent_trampoline< P: IsA, @@ -354,3 +304,5 @@ impl> GstObjectExt for O { } } } + +impl> GstObjectExt for O {} diff --git a/gstreamer/src/auto/pad.rs b/gstreamer/src/auto/pad.rs index f060c6ae2..70636217a 100644 --- a/gstreamer/src/auto/pad.rs +++ b/gstreamer/src/auto/pad.rs @@ -30,204 +30,13 @@ impl Pad { unsafe impl Send for Pad {} unsafe impl Sync for Pad {} -pub trait PadExt: 'static { - #[doc(alias = "gst_pad_activate_mode")] - fn activate_mode(&self, mode: PadMode, active: bool) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_pad_can_link")] - fn can_link(&self, sinkpad: &impl IsA) -> bool; - - #[doc(alias = "gst_pad_chain")] - fn chain(&self, buffer: Buffer) -> Result; - - #[doc(alias = "gst_pad_chain_list")] - fn chain_list(&self, list: BufferList) -> Result; - - #[doc(alias = "gst_pad_check_reconfigure")] - fn check_reconfigure(&self) -> bool; - - #[doc(alias = "gst_pad_create_stream_id")] - fn create_stream_id( - &self, - parent: &impl IsA, - stream_id: Option<&str>, - ) -> glib::GString; - - //#[doc(alias = "gst_pad_create_stream_id_printf")] - //fn create_stream_id_printf(&self, parent: &impl IsA, stream_id: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> glib::GString; - - //#[doc(alias = "gst_pad_create_stream_id_printf_valist")] - //fn create_stream_id_printf_valist(&self, parent: &impl IsA, stream_id: Option<&str>, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> glib::GString; - - #[doc(alias = "gst_pad_forward")] - fn forward bool>(&self, forward: P) -> bool; - - #[doc(alias = "gst_pad_get_allowed_caps")] - #[doc(alias = "get_allowed_caps")] - fn allowed_caps(&self) -> Option; - - #[doc(alias = "gst_pad_get_current_caps")] - #[doc(alias = "get_current_caps")] - fn current_caps(&self) -> Option; - - #[doc(alias = "gst_pad_get_direction")] - #[doc(alias = "get_direction")] - fn direction(&self) -> PadDirection; - - //#[doc(alias = "gst_pad_get_element_private")] - //#[doc(alias = "get_element_private")] - //fn element_private(&self) -> /*Unimplemented*/Option; - - #[doc(alias = "gst_pad_get_last_flow_return")] - #[doc(alias = "get_last_flow_return")] - fn last_flow_result(&self) -> Result; - - #[doc(alias = "gst_pad_get_offset")] - #[doc(alias = "get_offset")] - fn offset(&self) -> i64; - - #[doc(alias = "gst_pad_get_pad_template")] - #[doc(alias = "get_pad_template")] - fn pad_template(&self) -> Option; - - #[doc(alias = "gst_pad_get_pad_template_caps")] - #[doc(alias = "get_pad_template_caps")] - fn pad_template_caps(&self) -> Caps; - - #[doc(alias = "gst_pad_get_parent_element")] - #[doc(alias = "get_parent_element")] - fn parent_element(&self) -> Option; - - #[doc(alias = "gst_pad_get_peer")] - #[doc(alias = "get_peer")] - #[must_use] - fn peer(&self) -> Option; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_pad_get_single_internal_link")] - #[doc(alias = "get_single_internal_link")] - #[must_use] - fn single_internal_link(&self) -> Option; - - #[doc(alias = "gst_pad_get_stream")] - #[doc(alias = "get_stream")] - fn stream(&self) -> Option; - - #[doc(alias = "gst_pad_get_stream_id")] - #[doc(alias = "get_stream_id")] - fn stream_id(&self) -> Option; - - #[doc(alias = "gst_pad_get_task_state")] - #[doc(alias = "get_task_state")] - fn task_state(&self) -> TaskState; - - #[doc(alias = "gst_pad_has_current_caps")] - fn has_current_caps(&self) -> bool; - - #[doc(alias = "gst_pad_is_active")] - fn is_active(&self) -> bool; - - #[doc(alias = "gst_pad_is_blocked")] - fn is_blocked(&self) -> bool; - - #[doc(alias = "gst_pad_is_blocking")] - fn is_blocking(&self) -> bool; - - #[doc(alias = "gst_pad_is_linked")] - fn is_linked(&self) -> bool; - - //#[doc(alias = "gst_pad_iterate_internal_links")] - //fn iterate_internal_links(&self) -> /*Ignored*/Option; - - //#[doc(alias = "gst_pad_iterate_internal_links_default")] - //fn iterate_internal_links_default(&self, parent: Option<&impl IsA>) -> /*Ignored*/Option; - - #[doc(alias = "gst_pad_link")] - fn link(&self, sinkpad: &impl IsA) -> Result; - - #[doc(alias = "gst_pad_link_full")] - fn link_full( - &self, - sinkpad: &impl IsA, - flags: PadLinkCheck, - ) -> Result; - - #[doc(alias = "gst_pad_link_maybe_ghosting")] - fn link_maybe_ghosting(&self, sink: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_pad_link_maybe_ghosting_full")] - fn link_maybe_ghosting_full( - &self, - sink: &impl IsA, - flags: PadLinkCheck, - ) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_pad_mark_reconfigure")] - fn mark_reconfigure(&self); - - #[doc(alias = "gst_pad_needs_reconfigure")] - fn needs_reconfigure(&self) -> bool; - - #[doc(alias = "gst_pad_pause_task")] - fn pause_task(&self) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_pad_peer_query_accept_caps")] - fn peer_query_accept_caps(&self, caps: &Caps) -> bool; - - #[doc(alias = "gst_pad_peer_query_caps")] - fn peer_query_caps(&self, filter: Option<&Caps>) -> Caps; - - #[doc(alias = "gst_pad_push")] - fn push(&self, buffer: Buffer) -> Result; - - #[doc(alias = "gst_pad_push_list")] - fn push_list(&self, list: BufferList) -> Result; - - #[doc(alias = "gst_pad_query_accept_caps")] - fn query_accept_caps(&self, caps: &Caps) -> bool; - - #[doc(alias = "gst_pad_query_caps")] - fn query_caps(&self, filter: Option<&Caps>) -> Caps; - - #[doc(alias = "gst_pad_set_active")] - fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError>; - - //#[doc(alias = "gst_pad_set_element_private")] - //fn set_element_private(&self, priv_: /*Unimplemented*/Option); - - #[doc(alias = "gst_pad_set_offset")] - fn set_offset(&self, offset: i64); - - #[doc(alias = "gst_pad_stop_task")] - fn stop_task(&self) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_pad_store_sticky_event")] - fn store_sticky_event(&self, event: &Event) -> Result; - - #[doc(alias = "gst_pad_unlink")] - fn unlink(&self, sinkpad: &impl IsA) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_pad_use_fixed_caps")] - fn use_fixed_caps(&self); - - fn caps(&self) -> Option; - - #[doc(alias = "linked")] - fn connect_linked(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "unlinked")] - fn connect_unlinked(&self, f: F) - -> SignalHandlerId; - - #[doc(alias = "caps")] - fn connect_caps_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "offset")] - fn connect_offset_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> PadExt for O { +pub trait PadExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_pad_activate_mode")] fn activate_mode(&self, mode: PadMode, active: bool) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -241,6 +50,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_can_link")] fn can_link(&self, sinkpad: &impl IsA) -> bool { unsafe { from_glib(ffi::gst_pad_can_link( @@ -250,6 +60,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_chain")] fn chain(&self, buffer: Buffer) -> Result { unsafe { try_from_glib(ffi::gst_pad_chain( @@ -259,6 +70,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_chain_list")] fn chain_list(&self, list: BufferList) -> Result { unsafe { try_from_glib(ffi::gst_pad_chain_list( @@ -268,6 +80,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_check_reconfigure")] fn check_reconfigure(&self) -> bool { unsafe { from_glib(ffi::gst_pad_check_reconfigure( @@ -276,6 +89,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_create_stream_id")] fn create_stream_id( &self, parent: &impl IsA, @@ -290,14 +104,17 @@ impl> PadExt for O { } } + //#[doc(alias = "gst_pad_create_stream_id_printf")] //fn create_stream_id_printf(&self, parent: &impl IsA, stream_id: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> glib::GString { // unsafe { TODO: call ffi:gst_pad_create_stream_id_printf() } //} + //#[doc(alias = "gst_pad_create_stream_id_printf_valist")] //fn create_stream_id_printf_valist(&self, parent: &impl IsA, stream_id: Option<&str>, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> glib::GString { // unsafe { TODO: call ffi:gst_pad_create_stream_id_printf_valist() } //} + #[doc(alias = "gst_pad_forward")] fn forward bool>(&self, forward: P) -> bool { let forward_data: P = forward; unsafe extern "C" fn forward_func bool>( @@ -319,6 +136,8 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_get_allowed_caps")] + #[doc(alias = "get_allowed_caps")] fn allowed_caps(&self) -> Option { unsafe { from_glib_full(ffi::gst_pad_get_allowed_caps( @@ -327,6 +146,8 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_get_current_caps")] + #[doc(alias = "get_current_caps")] fn current_caps(&self) -> Option { unsafe { from_glib_full(ffi::gst_pad_get_current_caps( @@ -335,14 +156,20 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_get_direction")] + #[doc(alias = "get_direction")] fn direction(&self) -> PadDirection { unsafe { from_glib(ffi::gst_pad_get_direction(self.as_ref().to_glib_none().0)) } } + //#[doc(alias = "gst_pad_get_element_private")] + //#[doc(alias = "get_element_private")] //fn element_private(&self) -> /*Unimplemented*/Option { // unsafe { TODO: call ffi:gst_pad_get_element_private() } //} + #[doc(alias = "gst_pad_get_last_flow_return")] + #[doc(alias = "get_last_flow_return")] fn last_flow_result(&self) -> Result { unsafe { try_from_glib(ffi::gst_pad_get_last_flow_return( @@ -351,10 +178,14 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_get_offset")] + #[doc(alias = "get_offset")] fn offset(&self) -> i64 { unsafe { ffi::gst_pad_get_offset(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gst_pad_get_pad_template")] + #[doc(alias = "get_pad_template")] fn pad_template(&self) -> Option { unsafe { from_glib_full(ffi::gst_pad_get_pad_template( @@ -363,6 +194,8 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_get_pad_template_caps")] + #[doc(alias = "get_pad_template_caps")] fn pad_template_caps(&self) -> Caps { unsafe { from_glib_full(ffi::gst_pad_get_pad_template_caps( @@ -371,6 +204,8 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_get_parent_element")] + #[doc(alias = "get_parent_element")] fn parent_element(&self) -> Option { unsafe { from_glib_full(ffi::gst_pad_get_parent_element( @@ -379,12 +214,18 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_get_peer")] + #[doc(alias = "get_peer")] + #[must_use] fn peer(&self) -> Option { unsafe { from_glib_full(ffi::gst_pad_get_peer(self.as_ref().to_glib_none().0)) } } #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_pad_get_single_internal_link")] + #[doc(alias = "get_single_internal_link")] + #[must_use] fn single_internal_link(&self) -> Option { unsafe { from_glib_full(ffi::gst_pad_get_single_internal_link( @@ -393,18 +234,25 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_get_stream")] + #[doc(alias = "get_stream")] fn stream(&self) -> Option { unsafe { from_glib_full(ffi::gst_pad_get_stream(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_pad_get_stream_id")] + #[doc(alias = "get_stream_id")] fn stream_id(&self) -> Option { unsafe { from_glib_full(ffi::gst_pad_get_stream_id(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_pad_get_task_state")] + #[doc(alias = "get_task_state")] fn task_state(&self) -> TaskState { unsafe { from_glib(ffi::gst_pad_get_task_state(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_pad_has_current_caps")] fn has_current_caps(&self) -> bool { unsafe { from_glib(ffi::gst_pad_has_current_caps( @@ -413,30 +261,37 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_is_active")] fn is_active(&self) -> bool { unsafe { from_glib(ffi::gst_pad_is_active(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_pad_is_blocked")] fn is_blocked(&self) -> bool { unsafe { from_glib(ffi::gst_pad_is_blocked(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_pad_is_blocking")] fn is_blocking(&self) -> bool { unsafe { from_glib(ffi::gst_pad_is_blocking(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_pad_is_linked")] fn is_linked(&self) -> bool { unsafe { from_glib(ffi::gst_pad_is_linked(self.as_ref().to_glib_none().0)) } } + //#[doc(alias = "gst_pad_iterate_internal_links")] //fn iterate_internal_links(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi:gst_pad_iterate_internal_links() } //} + //#[doc(alias = "gst_pad_iterate_internal_links_default")] //fn iterate_internal_links_default(&self, parent: Option<&impl IsA>) -> /*Ignored*/Option { // unsafe { TODO: call ffi:gst_pad_iterate_internal_links_default() } //} + #[doc(alias = "gst_pad_link")] fn link(&self, sinkpad: &impl IsA) -> Result { unsafe { try_from_glib(ffi::gst_pad_link( @@ -446,6 +301,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_link_full")] fn link_full( &self, sinkpad: &impl IsA, @@ -460,6 +316,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_link_maybe_ghosting")] fn link_maybe_ghosting(&self, sink: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -472,6 +329,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_link_maybe_ghosting_full")] fn link_maybe_ghosting_full( &self, sink: &impl IsA, @@ -489,12 +347,14 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_mark_reconfigure")] fn mark_reconfigure(&self) { unsafe { ffi::gst_pad_mark_reconfigure(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_pad_needs_reconfigure")] fn needs_reconfigure(&self) -> bool { unsafe { from_glib(ffi::gst_pad_needs_reconfigure( @@ -503,6 +363,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_pause_task")] fn pause_task(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -512,6 +373,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_peer_query_accept_caps")] fn peer_query_accept_caps(&self, caps: &Caps) -> bool { unsafe { from_glib(ffi::gst_pad_peer_query_accept_caps( @@ -521,6 +383,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_peer_query_caps")] fn peer_query_caps(&self, filter: Option<&Caps>) -> Caps { unsafe { from_glib_full(ffi::gst_pad_peer_query_caps( @@ -530,6 +393,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_push")] fn push(&self, buffer: Buffer) -> Result { unsafe { try_from_glib(ffi::gst_pad_push( @@ -539,6 +403,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_push_list")] fn push_list(&self, list: BufferList) -> Result { unsafe { try_from_glib(ffi::gst_pad_push_list( @@ -548,6 +413,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_query_accept_caps")] fn query_accept_caps(&self, caps: &Caps) -> bool { unsafe { from_glib(ffi::gst_pad_query_accept_caps( @@ -557,6 +423,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_query_caps")] fn query_caps(&self, filter: Option<&Caps>) -> Caps { unsafe { from_glib_full(ffi::gst_pad_query_caps( @@ -566,6 +433,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_set_active")] fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -575,16 +443,19 @@ impl> PadExt for O { } } + //#[doc(alias = "gst_pad_set_element_private")] //fn set_element_private(&self, priv_: /*Unimplemented*/Option) { // unsafe { TODO: call ffi:gst_pad_set_element_private() } //} + #[doc(alias = "gst_pad_set_offset")] fn set_offset(&self, offset: i64) { unsafe { ffi::gst_pad_set_offset(self.as_ref().to_glib_none().0, offset); } } + #[doc(alias = "gst_pad_stop_task")] fn stop_task(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -594,6 +465,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_store_sticky_event")] fn store_sticky_event(&self, event: &Event) -> Result { unsafe { try_from_glib(ffi::gst_pad_store_sticky_event( @@ -603,6 +475,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_unlink")] fn unlink(&self, sinkpad: &impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -615,6 +488,7 @@ impl> PadExt for O { } } + #[doc(alias = "gst_pad_use_fixed_caps")] fn use_fixed_caps(&self) { unsafe { ffi::gst_pad_use_fixed_caps(self.as_ref().to_glib_none().0); @@ -625,6 +499,7 @@ impl> PadExt for O { glib::ObjectExt::property(self.as_ref(), "caps") } + #[doc(alias = "linked")] fn connect_linked(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn linked_trampoline< P: IsA, @@ -653,6 +528,7 @@ impl> PadExt for O { } } + #[doc(alias = "unlinked")] fn connect_unlinked( &self, f: F, @@ -684,6 +560,7 @@ impl> PadExt for O { } } + #[doc(alias = "caps")] fn connect_caps_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_caps_trampoline< P: IsA, @@ -709,6 +586,7 @@ impl> PadExt for O { } } + #[doc(alias = "offset")] fn connect_offset_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_offset_trampoline< P: IsA, @@ -734,3 +612,5 @@ impl> PadExt for O { } } } + +impl> PadExt for O {} diff --git a/gstreamer/src/auto/pipeline.rs b/gstreamer/src/auto/pipeline.rs index 32b6e5ec0..014d90abb 100644 --- a/gstreamer/src/auto/pipeline.rs +++ b/gstreamer/src/auto/pipeline.rs @@ -27,59 +27,21 @@ impl Pipeline { unsafe impl Send for Pipeline {} unsafe impl Sync for Pipeline {} -pub trait PipelineExt: 'static { - #[doc(alias = "gst_pipeline_auto_clock")] - fn auto_clock(&self); - - #[doc(alias = "gst_pipeline_get_auto_flush_bus")] - #[doc(alias = "get_auto_flush_bus")] - fn is_auto_flush_bus(&self) -> bool; - - #[doc(alias = "gst_pipeline_get_delay")] - #[doc(alias = "get_delay")] - fn delay(&self) -> ClockTime; - - #[doc(alias = "gst_pipeline_get_latency")] - #[doc(alias = "get_latency")] - fn latency(&self) -> Option; - - #[doc(alias = "gst_pipeline_get_pipeline_clock")] - #[doc(alias = "get_pipeline_clock")] - fn pipeline_clock(&self) -> Clock; - - #[doc(alias = "gst_pipeline_set_auto_flush_bus")] - fn set_auto_flush_bus(&self, auto_flush: bool); - - #[doc(alias = "gst_pipeline_set_delay")] - fn set_delay(&self, delay: ClockTime); - - #[doc(alias = "gst_pipeline_set_latency")] - fn set_latency(&self, latency: impl Into>); - - #[doc(alias = "gst_pipeline_use_clock")] - fn use_clock(&self, clock: Option<&impl IsA>); - - #[doc(alias = "auto-flush-bus")] - fn connect_auto_flush_bus_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "delay")] - fn connect_delay_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "latency")] - fn connect_latency_notify(&self, f: F) - -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> PipelineExt for O { +pub trait PipelineExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_pipeline_auto_clock")] fn auto_clock(&self) { unsafe { ffi::gst_pipeline_auto_clock(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_pipeline_get_auto_flush_bus")] + #[doc(alias = "get_auto_flush_bus")] fn is_auto_flush_bus(&self) -> bool { unsafe { from_glib(ffi::gst_pipeline_get_auto_flush_bus( @@ -88,6 +50,8 @@ impl> PipelineExt for O { } } + #[doc(alias = "gst_pipeline_get_delay")] + #[doc(alias = "get_delay")] fn delay(&self) -> ClockTime { unsafe { try_from_glib(ffi::gst_pipeline_get_delay(self.as_ref().to_glib_none().0)) @@ -95,6 +59,8 @@ impl> PipelineExt for O { } } + #[doc(alias = "gst_pipeline_get_latency")] + #[doc(alias = "get_latency")] fn latency(&self) -> Option { unsafe { from_glib(ffi::gst_pipeline_get_latency( @@ -103,6 +69,8 @@ impl> PipelineExt for O { } } + #[doc(alias = "gst_pipeline_get_pipeline_clock")] + #[doc(alias = "get_pipeline_clock")] fn pipeline_clock(&self) -> Clock { unsafe { from_glib_full(ffi::gst_pipeline_get_pipeline_clock( @@ -111,6 +79,7 @@ impl> PipelineExt for O { } } + #[doc(alias = "gst_pipeline_set_auto_flush_bus")] fn set_auto_flush_bus(&self, auto_flush: bool) { unsafe { ffi::gst_pipeline_set_auto_flush_bus( @@ -120,12 +89,14 @@ impl> PipelineExt for O { } } + #[doc(alias = "gst_pipeline_set_delay")] fn set_delay(&self, delay: ClockTime) { unsafe { ffi::gst_pipeline_set_delay(self.as_ref().to_glib_none().0, delay.into_glib()); } } + #[doc(alias = "gst_pipeline_set_latency")] fn set_latency(&self, latency: impl Into>) { unsafe { ffi::gst_pipeline_set_latency( @@ -135,6 +106,7 @@ impl> PipelineExt for O { } } + #[doc(alias = "gst_pipeline_use_clock")] fn use_clock(&self, clock: Option<&impl IsA>) { unsafe { ffi::gst_pipeline_use_clock( @@ -144,6 +116,7 @@ impl> PipelineExt for O { } } + #[doc(alias = "auto-flush-bus")] fn connect_auto_flush_bus_notify( &self, f: F, @@ -172,6 +145,7 @@ impl> PipelineExt for O { } } + #[doc(alias = "delay")] fn connect_delay_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_delay_trampoline< P: IsA, @@ -197,6 +171,7 @@ impl> PipelineExt for O { } } + #[doc(alias = "latency")] fn connect_latency_notify( &self, f: F, @@ -225,3 +200,5 @@ impl> PipelineExt for O { } } } + +impl> PipelineExt for O {} diff --git a/gstreamer/src/auto/plugin_feature.rs b/gstreamer/src/auto/plugin_feature.rs index 817700ce7..9a9cda9f8 100644 --- a/gstreamer/src/auto/plugin_feature.rs +++ b/gstreamer/src/auto/plugin_feature.rs @@ -22,20 +22,13 @@ impl PluginFeature { unsafe impl Send for PluginFeature {} unsafe impl Sync for PluginFeature {} -pub trait PluginFeatureExt: 'static { - #[doc(alias = "gst_plugin_feature_check_version")] - fn check_version(&self, min_major: u32, min_minor: u32, min_micro: u32) -> bool; - - #[doc(alias = "gst_plugin_feature_get_plugin")] - #[doc(alias = "get_plugin")] - fn plugin(&self) -> Option; - - #[doc(alias = "gst_plugin_feature_get_plugin_name")] - #[doc(alias = "get_plugin_name")] - fn plugin_name(&self) -> Option; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> PluginFeatureExt for O { +pub trait PluginFeatureExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_plugin_feature_check_version")] fn check_version(&self, min_major: u32, min_minor: u32, min_micro: u32) -> bool { unsafe { from_glib(ffi::gst_plugin_feature_check_version( @@ -47,6 +40,8 @@ impl> PluginFeatureExt for O { } } + #[doc(alias = "gst_plugin_feature_get_plugin")] + #[doc(alias = "get_plugin")] fn plugin(&self) -> Option { unsafe { from_glib_full(ffi::gst_plugin_feature_get_plugin( @@ -55,6 +50,8 @@ impl> PluginFeatureExt for O { } } + #[doc(alias = "gst_plugin_feature_get_plugin_name")] + #[doc(alias = "get_plugin_name")] fn plugin_name(&self) -> Option { unsafe { from_glib_none(ffi::gst_plugin_feature_get_plugin_name( @@ -63,3 +60,5 @@ impl> PluginFeatureExt for O { } } } + +impl> PluginFeatureExt for O {} diff --git a/gstreamer/src/auto/preset.rs b/gstreamer/src/auto/preset.rs index 02305d06d..2f619180c 100644 --- a/gstreamer/src/auto/preset.rs +++ b/gstreamer/src/auto/preset.rs @@ -40,44 +40,13 @@ impl Preset { unsafe impl Send for Preset {} unsafe impl Sync for Preset {} -pub trait PresetExt: 'static { - #[doc(alias = "gst_preset_delete_preset")] - fn delete_preset(&self, name: &str) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_preset_get_meta")] - #[doc(alias = "get_meta")] - fn meta(&self, name: &str, tag: &str) -> Option; - - #[doc(alias = "gst_preset_get_preset_names")] - #[doc(alias = "get_preset_names")] - fn preset_names(&self) -> Vec; - - #[doc(alias = "gst_preset_get_property_names")] - #[doc(alias = "get_property_names")] - fn property_names(&self) -> Vec; - - #[doc(alias = "gst_preset_is_editable")] - fn is_editable(&self) -> bool; - - #[doc(alias = "gst_preset_load_preset")] - fn load_preset(&self, name: &str) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_preset_rename_preset")] - fn rename_preset(&self, old_name: &str, new_name: &str) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_preset_save_preset")] - fn save_preset(&self, name: &str) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_preset_set_meta")] - fn set_meta( - &self, - name: &str, - tag: &str, - value: Option<&str>, - ) -> Result<(), glib::error::BoolError>; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> PresetExt for O { +pub trait PresetExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_preset_delete_preset")] fn delete_preset(&self, name: &str) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -90,6 +59,8 @@ impl> PresetExt for O { } } + #[doc(alias = "gst_preset_get_meta")] + #[doc(alias = "get_meta")] fn meta(&self, name: &str, tag: &str) -> Option { unsafe { let mut value = ptr::null_mut(); @@ -107,6 +78,8 @@ impl> PresetExt for O { } } + #[doc(alias = "gst_preset_get_preset_names")] + #[doc(alias = "get_preset_names")] fn preset_names(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_preset_get_preset_names( @@ -115,6 +88,8 @@ impl> PresetExt for O { } } + #[doc(alias = "gst_preset_get_property_names")] + #[doc(alias = "get_property_names")] fn property_names(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_preset_get_property_names( @@ -123,10 +98,12 @@ impl> PresetExt for O { } } + #[doc(alias = "gst_preset_is_editable")] fn is_editable(&self) -> bool { unsafe { from_glib(ffi::gst_preset_is_editable(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_preset_load_preset")] fn load_preset(&self, name: &str) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -136,6 +113,7 @@ impl> PresetExt for O { } } + #[doc(alias = "gst_preset_rename_preset")] fn rename_preset(&self, old_name: &str, new_name: &str) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -149,6 +127,7 @@ impl> PresetExt for O { } } + #[doc(alias = "gst_preset_save_preset")] fn save_preset(&self, name: &str) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -158,6 +137,7 @@ impl> PresetExt for O { } } + #[doc(alias = "gst_preset_set_meta")] fn set_meta( &self, name: &str, @@ -177,3 +157,5 @@ impl> PresetExt for O { } } } + +impl> PresetExt for O {} diff --git a/gstreamer/src/auto/proxy_pad.rs b/gstreamer/src/auto/proxy_pad.rs index fbab3c057..72f39f5b3 100644 --- a/gstreamer/src/auto/proxy_pad.rs +++ b/gstreamer/src/auto/proxy_pad.rs @@ -27,14 +27,15 @@ impl ProxyPad { unsafe impl Send for ProxyPad {} unsafe impl Sync for ProxyPad {} -pub trait ProxyPadExt: 'static { +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} +} + +pub trait ProxyPadExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gst_proxy_pad_get_internal")] #[doc(alias = "get_internal")] #[must_use] - fn internal(&self) -> Option; -} - -impl> ProxyPadExt for O { fn internal(&self) -> Option { unsafe { from_glib_full(ffi::gst_proxy_pad_get_internal( @@ -43,3 +44,5 @@ impl> ProxyPadExt for O { } } } + +impl> ProxyPadExt for O {} diff --git a/gstreamer/src/auto/system_clock.rs b/gstreamer/src/auto/system_clock.rs index 1330b80db..aefa85f4a 100644 --- a/gstreamer/src/auto/system_clock.rs +++ b/gstreamer/src/auto/system_clock.rs @@ -41,29 +41,23 @@ impl SystemClock { unsafe impl Send for SystemClock {} unsafe impl Sync for SystemClock {} -pub trait SystemClockExt: 'static { - #[doc(alias = "clock-type")] - fn clock_type(&self) -> ClockType; - - #[doc(alias = "clock-type")] - fn set_clock_type(&self, clock_type: ClockType); - - #[doc(alias = "clock-type")] - fn connect_clock_type_notify( - &self, - f: F, - ) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> SystemClockExt for O { +pub trait SystemClockExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "clock-type")] fn clock_type(&self) -> ClockType { glib::ObjectExt::property(self.as_ref(), "clock-type") } + #[doc(alias = "clock-type")] fn set_clock_type(&self, clock_type: ClockType) { glib::ObjectExt::set_property(self.as_ref(), "clock-type", clock_type) } + #[doc(alias = "clock-type")] fn connect_clock_type_notify( &self, f: F, @@ -92,3 +86,5 @@ impl> SystemClockExt for O { } } } + +impl> SystemClockExt for O {} diff --git a/gstreamer/src/auto/tag_setter.rs b/gstreamer/src/auto/tag_setter.rs index 932b3be05..9d12375a3 100644 --- a/gstreamer/src/auto/tag_setter.rs +++ b/gstreamer/src/auto/tag_setter.rs @@ -22,47 +22,29 @@ impl TagSetter { unsafe impl Send for TagSetter {} unsafe impl Sync for TagSetter {} -pub trait TagSetterExt: 'static { - //#[doc(alias = "gst_tag_setter_add_tag_valist")] - //fn add_tag_valist(&self, mode: TagMergeMode, tag: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); - - //#[doc(alias = "gst_tag_setter_add_tag_valist_values")] - //fn add_tag_valist_values(&self, mode: TagMergeMode, tag: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); - - //#[doc(alias = "gst_tag_setter_add_tag_values")] - //fn add_tag_values(&self, mode: TagMergeMode, tag: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs); - - #[doc(alias = "gst_tag_setter_get_tag_list")] - #[doc(alias = "get_tag_list")] - fn tag_list(&self) -> Option; - - #[doc(alias = "gst_tag_setter_get_tag_merge_mode")] - #[doc(alias = "get_tag_merge_mode")] - fn tag_merge_mode(&self) -> TagMergeMode; - - #[doc(alias = "gst_tag_setter_merge_tags")] - fn merge_tags(&self, list: &TagList, mode: TagMergeMode); - - #[doc(alias = "gst_tag_setter_reset_tags")] - fn reset_tags(&self); - - #[doc(alias = "gst_tag_setter_set_tag_merge_mode")] - fn set_tag_merge_mode(&self, mode: TagMergeMode); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> TagSetterExt for O { +pub trait TagSetterExt: IsA + sealed::Sealed + 'static { + //#[doc(alias = "gst_tag_setter_add_tag_valist")] //fn add_tag_valist(&self, mode: TagMergeMode, tag: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { // unsafe { TODO: call ffi:gst_tag_setter_add_tag_valist() } //} + //#[doc(alias = "gst_tag_setter_add_tag_valist_values")] //fn add_tag_valist_values(&self, mode: TagMergeMode, tag: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { // unsafe { TODO: call ffi:gst_tag_setter_add_tag_valist_values() } //} + //#[doc(alias = "gst_tag_setter_add_tag_values")] //fn add_tag_values(&self, mode: TagMergeMode, tag: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) { // unsafe { TODO: call ffi:gst_tag_setter_add_tag_values() } //} + #[doc(alias = "gst_tag_setter_get_tag_list")] + #[doc(alias = "get_tag_list")] fn tag_list(&self) -> Option { unsafe { from_glib_none(ffi::gst_tag_setter_get_tag_list( @@ -71,6 +53,8 @@ impl> TagSetterExt for O { } } + #[doc(alias = "gst_tag_setter_get_tag_merge_mode")] + #[doc(alias = "get_tag_merge_mode")] fn tag_merge_mode(&self) -> TagMergeMode { unsafe { from_glib(ffi::gst_tag_setter_get_tag_merge_mode( @@ -79,6 +63,7 @@ impl> TagSetterExt for O { } } + #[doc(alias = "gst_tag_setter_merge_tags")] fn merge_tags(&self, list: &TagList, mode: TagMergeMode) { unsafe { ffi::gst_tag_setter_merge_tags( @@ -89,12 +74,14 @@ impl> TagSetterExt for O { } } + #[doc(alias = "gst_tag_setter_reset_tags")] fn reset_tags(&self) { unsafe { ffi::gst_tag_setter_reset_tags(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_tag_setter_set_tag_merge_mode")] fn set_tag_merge_mode(&self, mode: TagMergeMode) { unsafe { ffi::gst_tag_setter_set_tag_merge_mode( @@ -104,3 +91,5 @@ impl> TagSetterExt for O { } } } + +impl> TagSetterExt for O {} diff --git a/gstreamer/src/auto/task.rs b/gstreamer/src/auto/task.rs index 36803f8bf..68b08df88 100644 --- a/gstreamer/src/auto/task.rs +++ b/gstreamer/src/auto/task.rs @@ -30,48 +30,25 @@ impl Task { unsafe impl Send for Task {} unsafe impl Sync for Task {} -pub trait TaskExt: 'static { - #[doc(alias = "gst_task_get_pool")] - #[doc(alias = "get_pool")] - fn pool(&self) -> TaskPool; - - #[doc(alias = "gst_task_get_state")] - #[doc(alias = "get_state")] - fn state(&self) -> TaskState; - - #[doc(alias = "gst_task_join")] - fn join(&self) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_task_pause")] - fn pause(&self) -> Result<(), glib::error::BoolError>; - - #[cfg(feature = "v1_18")] - #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] - #[doc(alias = "gst_task_resume")] - fn resume(&self) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_task_set_pool")] - fn set_pool(&self, pool: &impl IsA); - - #[doc(alias = "gst_task_set_state")] - fn set_state(&self, state: TaskState) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_task_start")] - fn start(&self) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "gst_task_stop")] - fn stop(&self) -> Result<(), glib::error::BoolError>; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> TaskExt for O { +pub trait TaskExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_task_get_pool")] + #[doc(alias = "get_pool")] fn pool(&self) -> TaskPool { unsafe { from_glib_full(ffi::gst_task_get_pool(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_task_get_state")] + #[doc(alias = "get_state")] fn state(&self) -> TaskState { unsafe { from_glib(ffi::gst_task_get_state(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_task_join")] fn join(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -81,6 +58,7 @@ impl> TaskExt for O { } } + #[doc(alias = "gst_task_pause")] fn pause(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -92,6 +70,7 @@ impl> TaskExt for O { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_task_resume")] fn resume(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -101,6 +80,7 @@ impl> TaskExt for O { } } + #[doc(alias = "gst_task_set_pool")] fn set_pool(&self, pool: &impl IsA) { unsafe { ffi::gst_task_set_pool( @@ -110,6 +90,7 @@ impl> TaskExt for O { } } + #[doc(alias = "gst_task_set_state")] fn set_state(&self, state: TaskState) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -119,6 +100,7 @@ impl> TaskExt for O { } } + #[doc(alias = "gst_task_start")] fn start(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -128,6 +110,7 @@ impl> TaskExt for O { } } + #[doc(alias = "gst_task_stop")] fn stop(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -137,3 +120,5 @@ impl> TaskExt for O { } } } + +impl> TaskExt for O {} diff --git a/gstreamer/src/auto/task_pool.rs b/gstreamer/src/auto/task_pool.rs index 4b3976e81..a00f7ce52 100644 --- a/gstreamer/src/auto/task_pool.rs +++ b/gstreamer/src/auto/task_pool.rs @@ -35,21 +35,20 @@ impl Default for TaskPool { unsafe impl Send for TaskPool {} unsafe impl Sync for TaskPool {} -pub trait TaskPoolExt: 'static { - #[doc(alias = "gst_task_pool_cleanup")] - fn cleanup(&self); - - #[doc(alias = "gst_task_pool_prepare")] - fn prepare(&self) -> Result<(), glib::Error>; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> TaskPoolExt for O { +pub trait TaskPoolExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_task_pool_cleanup")] fn cleanup(&self) { unsafe { ffi::gst_task_pool_cleanup(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_task_pool_prepare")] fn prepare(&self) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -62,3 +61,5 @@ impl> TaskPoolExt for O { } } } + +impl> TaskPoolExt for O {} diff --git a/gstreamer/src/auto/toc_setter.rs b/gstreamer/src/auto/toc_setter.rs index 0a2d96c15..e0a65a6bf 100644 --- a/gstreamer/src/auto/toc_setter.rs +++ b/gstreamer/src/auto/toc_setter.rs @@ -22,32 +22,31 @@ impl TocSetter { unsafe impl Send for TocSetter {} unsafe impl Sync for TocSetter {} -pub trait TocSetterExt: 'static { - #[doc(alias = "gst_toc_setter_get_toc")] - #[doc(alias = "get_toc")] - fn toc(&self) -> Option; - - #[doc(alias = "gst_toc_setter_reset")] - fn reset(&self); - - #[doc(alias = "gst_toc_setter_set_toc")] - fn set_toc(&self, toc: Option<&Toc>); +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> TocSetterExt for O { +pub trait TocSetterExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_toc_setter_get_toc")] + #[doc(alias = "get_toc")] fn toc(&self) -> Option { unsafe { from_glib_full(ffi::gst_toc_setter_get_toc(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_toc_setter_reset")] fn reset(&self) { unsafe { ffi::gst_toc_setter_reset(self.as_ref().to_glib_none().0); } } + #[doc(alias = "gst_toc_setter_set_toc")] fn set_toc(&self, toc: Option<&Toc>) { unsafe { ffi::gst_toc_setter_set_toc(self.as_ref().to_glib_none().0, toc.to_glib_none().0); } } } + +impl> TocSetterExt for O {} diff --git a/gstreamer/src/auto/tracer.rs b/gstreamer/src/auto/tracer.rs index f93868e82..299aabdf9 100644 --- a/gstreamer/src/auto/tracer.rs +++ b/gstreamer/src/auto/tracer.rs @@ -27,16 +27,12 @@ impl Tracer { unsafe impl Send for Tracer {} unsafe impl Sync for Tracer {} -pub trait TracerExt: 'static { - fn params(&self) -> Option; - - fn set_params(&self, params: Option<&str>); - - #[doc(alias = "params")] - fn connect_params_notify(&self, f: F) -> SignalHandlerId; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> TracerExt for O { +pub trait TracerExt: IsA + sealed::Sealed + 'static { fn params(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "params") } @@ -45,6 +41,7 @@ impl> TracerExt for O { glib::ObjectExt::set_property(self.as_ref(), "params", params) } + #[doc(alias = "params")] fn connect_params_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_params_trampoline< P: IsA, @@ -70,3 +67,5 @@ impl> TracerExt for O { } } } + +impl> TracerExt for O {} diff --git a/gstreamer/src/auto/uri_handler.rs b/gstreamer/src/auto/uri_handler.rs index f56eef674..a05438c3f 100644 --- a/gstreamer/src/auto/uri_handler.rs +++ b/gstreamer/src/auto/uri_handler.rs @@ -23,24 +23,14 @@ impl URIHandler { unsafe impl Send for URIHandler {} unsafe impl Sync for URIHandler {} -pub trait URIHandlerExt: 'static { - #[doc(alias = "gst_uri_handler_get_protocols")] - #[doc(alias = "get_protocols")] - fn protocols(&self) -> Vec; - - #[doc(alias = "gst_uri_handler_get_uri")] - #[doc(alias = "get_uri")] - fn uri(&self) -> Option; - - #[doc(alias = "gst_uri_handler_get_uri_type")] - #[doc(alias = "get_uri_type")] - fn uri_type(&self) -> URIType; - - #[doc(alias = "gst_uri_handler_set_uri")] - fn set_uri(&self, uri: &str) -> Result<(), glib::Error>; +mod sealed { + pub trait Sealed {} + impl> Sealed for T {} } -impl> URIHandlerExt for O { +pub trait URIHandlerExt: IsA + sealed::Sealed + 'static { + #[doc(alias = "gst_uri_handler_get_protocols")] + #[doc(alias = "get_protocols")] fn protocols(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::gst_uri_handler_get_protocols( @@ -49,10 +39,14 @@ impl> URIHandlerExt for O { } } + #[doc(alias = "gst_uri_handler_get_uri")] + #[doc(alias = "get_uri")] fn uri(&self) -> Option { unsafe { from_glib_full(ffi::gst_uri_handler_get_uri(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "gst_uri_handler_get_uri_type")] + #[doc(alias = "get_uri_type")] fn uri_type(&self) -> URIType { unsafe { from_glib(ffi::gst_uri_handler_get_uri_type( @@ -61,6 +55,7 @@ impl> URIHandlerExt for O { } } + #[doc(alias = "gst_uri_handler_set_uri")] fn set_uri(&self, uri: &str) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -78,3 +73,5 @@ impl> URIHandlerExt for O { } } } + +impl> URIHandlerExt for O {} diff --git a/gstreamer/src/auto/versions.txt b/gstreamer/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer/src/auto/versions.txt +++ b/gstreamer/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer/sys/src/auto/versions.txt b/gstreamer/sys/src/auto/versions.txt index 825c1568c..dc67fab13 100644 --- a/gstreamer/sys/src/auto/versions.txt +++ b/gstreamer/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 213af37c22d5) +Generated by gir (https://github.com/gtk-rs/gir @ 47312a7cf33a) from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 438cdf944979) diff --git a/gstreamer/sys/tests/abi.rs b/gstreamer/sys/tests/abi.rs index 3c0a33171..d0a7f2aeb 100644 --- a/gstreamer/sys/tests/abi.rs +++ b/gstreamer/sys/tests/abi.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -#![cfg(target_os = "linux")] +#![cfg(unix)] use gstreamer_sys::*; use std::env;