From 49583597ed33b83be13770db388475b850b9d608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laignel?= Date: Sun, 2 May 2021 11:41:18 +0200 Subject: [PATCH] manual code: fix-getters-def doc aliases --- examples/src/bin/custom_meta.rs | 1 + examples/src/bin/rtpfecclient.rs | 2 + examples/src/bin/rtpfecserver.rs | 2 + examples/src/examples-common.rs | 1 + gstreamer-app/src/app_src.rs | 1 + gstreamer-audio/src/audio_channel_position.rs | 2 + gstreamer-audio/src/audio_converter.rs | 5 +++ gstreamer-audio/src/audio_decoder.rs | 1 + gstreamer-audio/src/audio_encoder.rs | 2 + gstreamer-audio/src/audio_meta.rs | 5 +++ gstreamer-audio/src/audio_ring_buffer_spec.rs | 8 ++++ gstreamer-base/src/adapter.rs | 8 ++++ gstreamer-base/src/aggregator.rs | 2 + gstreamer-base/src/aggregator_pad.rs | 1 + gstreamer-base/src/base_parse.rs | 2 + gstreamer-base/src/base_parse_frame.rs | 7 ++++ gstreamer-base/src/base_sink.rs | 1 + gstreamer-base/src/base_src.rs | 2 + gstreamer-base/src/base_transform.rs | 2 + gstreamer-base/src/subclass/base_src.rs | 1 + gstreamer-base/src/subclass/base_transform.rs | 1 + gstreamer-check/src/harness.rs | 9 +++++ .../src/timeline_element.rs | 1 + gstreamer-gl/egl/src/gl_display_egl.rs | 1 + gstreamer-gl/src/context.rs | 1 + gstreamer-gl/src/gl_context.rs | 4 ++ gstreamer-gl/src/gl_sync_meta.rs | 1 + gstreamer-gl/src/gl_video_frame.rs | 1 + gstreamer-net/src/net_address_meta.rs | 1 + gstreamer-pbutils/src/discoverer.rs | 1 + .../src/discoverer_video_info.rs | 2 + gstreamer-pbutils/src/encoding_profile.rs | 1 + gstreamer-player/src/config.rs | 3 ++ gstreamer-player/src/player.rs | 1 + gstreamer-player/src/player_video_info.rs | 2 + .../player_video_overlay_video_renderer.rs | 1 + gstreamer-rtp/src/rtp_buffer.rs | 13 ++++++ gstreamer-rtsp-server/src/rtsp_token.rs | 3 ++ gstreamer-sdp/src/sdp_media.rs | 13 ++++++ gstreamer-sdp/src/sdp_message.rs | 17 ++++++++ gstreamer-video/src/utils.rs | 2 + gstreamer-video/src/video_buffer_pool.rs | 6 +++ gstreamer-video/src/video_codec_frame.rs | 12 ++++++ gstreamer-video/src/video_codec_state.rs | 6 +++ gstreamer-video/src/video_color_matrix.rs | 1 + gstreamer-video/src/video_converter.rs | 23 +++++++++++ gstreamer-video/src/video_decoder.rs | 6 +++ gstreamer-video/src/video_encoder.rs | 6 +++ gstreamer-video/src/video_frame.rs | 1 + gstreamer-video/src/video_meta.rs | 29 ++++++++++++++ .../src/video_overlay_composition.rs | 12 ++++++ gstreamer-video/src/video_time_code.rs | 1 + .../src/video_time_code_interval.rs | 4 ++ .../src/web_rtc_session_description.rs | 2 + gstreamer/src/allocation_params.rs | 4 ++ gstreamer/src/bin.rs | 2 + gstreamer/src/buffer.rs | 19 +++++++++ gstreamer/src/buffer_cursor.rs | 3 ++ gstreamer/src/buffer_pool.rs | 4 ++ gstreamer/src/bufferlist.rs | 1 + gstreamer/src/bus_unix.rs | 1 + gstreamer/src/bus_windows.rs | 1 + gstreamer/src/caps.rs | 5 +++ gstreamer/src/caps_features.rs | 2 + gstreamer/src/child_proxy.rs | 1 + gstreamer/src/clock.rs | 6 +++ gstreamer/src/context.rs | 3 ++ gstreamer/src/control_binding.rs | 1 + gstreamer/src/control_source.rs | 1 + gstreamer/src/date_time.rs | 8 ++++ gstreamer/src/device_provider.rs | 1 + gstreamer/src/element.rs | 16 ++++++++ gstreamer/src/enums.rs | 1 + gstreamer/src/event.rs | 23 +++++++++++ gstreamer/src/format.rs | 4 ++ gstreamer/src/log.rs | 5 +++ gstreamer/src/memory.rs | 11 +++++ gstreamer/src/message.rs | 40 +++++++++++++++++++ gstreamer/src/meta.rs | 14 +++++++ gstreamer/src/object.rs | 2 + gstreamer/src/pad.rs | 5 +++ gstreamer/src/parse_context.rs | 1 + gstreamer/src/pipeline.rs | 1 + gstreamer/src/plugin.rs | 3 ++ gstreamer/src/plugin_feature.rs | 1 + gstreamer/src/query.rs | 35 ++++++++++++++++ gstreamer/src/sample.rs | 8 ++++ gstreamer/src/segment.rs | 11 +++++ gstreamer/src/static_pad_template.rs | 1 + gstreamer/src/structure.rs | 3 ++ gstreamer/src/tags.rs | 6 +++ gstreamer/src/toc.rs | 10 +++++ gstreamer/src/typefind.rs | 2 + tutorials/src/tutorials-common.rs | 1 + 94 files changed, 511 insertions(+) diff --git a/examples/src/bin/custom_meta.rs b/examples/src/bin/custom_meta.rs index 04471c286..46e4e5a58 100644 --- a/examples/src/bin/custom_meta.rs +++ b/examples/src/bin/custom_meta.rs @@ -45,6 +45,7 @@ mod custom_meta { } // Retrieve the stored label. + #[doc(alias = "get_label")] pub fn label(&self) -> &str { self.0.label.as_str() } diff --git a/examples/src/bin/rtpfecclient.rs b/examples/src/bin/rtpfecclient.rs index 37017753f..e6c6bf5be 100644 --- a/examples/src/bin/rtpfecclient.rs +++ b/examples/src/bin/rtpfecclient.rs @@ -44,6 +44,7 @@ fn make_element( } } +#[doc(alias = "get_static_pad")] fn static_pad(element: &gst::Element, pad_name: &'static str) -> Result { match element.static_pad(pad_name) { Some(pad) => Ok(pad), @@ -54,6 +55,7 @@ fn static_pad(element: &gst::Element, pad_name: &'static str) -> Result Result { match element.request_pad_simple(pad_name) { Some(pad) => Ok(pad), diff --git a/examples/src/bin/rtpfecserver.rs b/examples/src/bin/rtpfecserver.rs index 28bb3af9f..6441728c3 100644 --- a/examples/src/bin/rtpfecserver.rs +++ b/examples/src/bin/rtpfecserver.rs @@ -40,6 +40,7 @@ fn make_element( } } +#[doc(alias = "get_static_pad")] fn static_pad(element: &gst::Element, pad_name: &'static str) -> Result { match element.static_pad(pad_name) { Some(pad) => Ok(pad), @@ -50,6 +51,7 @@ fn static_pad(element: &gst::Element, pad_name: &'static str) -> Result Result { match element.request_pad_simple(pad_name) { Some(pad) => Ok(pad), diff --git a/examples/src/examples-common.rs b/examples/src/examples-common.rs index 6ca4a6b63..06aee38aa 100644 --- a/examples/src/examples-common.rs +++ b/examples/src/examples-common.rs @@ -20,6 +20,7 @@ mod runloop { } } + #[doc(alias = "get_main")] pub fn main() -> CFRunLoop { unsafe { let r = CFRunLoopGetMain(); diff --git a/gstreamer-app/src/app_src.rs b/gstreamer-app/src/app_src.rs index 414ecd4d9..cf680f552 100644 --- a/gstreamer-app/src/app_src.rs +++ b/gstreamer-app/src/app_src.rs @@ -286,6 +286,7 @@ impl AppSrc { } } + #[doc(alias = "get_latency")] pub fn latency(&self) -> (gst::ClockTime, gst::ClockTime) { unsafe { let mut min = mem::MaybeUninit::uninit(); diff --git a/gstreamer-audio/src/audio_channel_position.rs b/gstreamer-audio/src/audio_channel_position.rs index 93c8003a1..6394779d5 100644 --- a/gstreamer-audio/src/audio_channel_position.rs +++ b/gstreamer-audio/src/audio_channel_position.rs @@ -118,6 +118,7 @@ impl AudioChannelPosition { } } + #[doc(alias = "get_fallback_mask")] pub fn fallback_mask(channels: u32) -> u64 { assert_initialized_main_thread!(); @@ -249,6 +250,7 @@ pub fn reorder_channels( } } +#[doc(alias = "get_channel_reorder_map")] pub fn channel_reorder_map( from: &[AudioChannelPosition], to: &[AudioChannelPosition], diff --git a/gstreamer-audio/src/audio_converter.rs b/gstreamer-audio/src/audio_converter.rs index 1e1a245ca..05b00a13e 100644 --- a/gstreamer-audio/src/audio_converter.rs +++ b/gstreamer-audio/src/audio_converter.rs @@ -78,6 +78,7 @@ impl AudioConverterConfig { self.0.set("GstAudioConverter.dither-method", &v); } + #[doc(alias = "get_dither_method")] pub fn dither_method(&self) -> crate::AudioDitherMethod { self.0 .get_optional("GstAudioConverter.dither-method") @@ -89,6 +90,7 @@ impl AudioConverterConfig { self.0.set("GstAudioConverter.noise-shaping-method", &v); } + #[doc(alias = "get_noise_shaping_method")] pub fn noise_shaping_method(&self) -> crate::AudioNoiseShapingMethod { self.0 .get_optional("GstAudioConverter.noise-shaping-method") @@ -100,6 +102,7 @@ impl AudioConverterConfig { self.0.set("GstAudioConverter.quantization", &v); } + #[doc(alias = "get_quantization")] pub fn quantization(&self) -> u32 { self.0 .get_optional("GstAudioConverter.quantization") @@ -115,6 +118,7 @@ impl AudioConverterConfig { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] + #[doc(alias = "get_resampler_method")] pub fn resampler_method(&self) -> crate::AudioResamplerMethod { self.0 .get_optional("GstAudioConverter.resampler-method") @@ -141,6 +145,7 @@ impl AudioConverterConfig { self.0.set("GstAudioConverter.mix-matrix", &array); } + #[doc(alias = "get_mix_matrix")] pub fn mix_matrix(&self) -> Vec> { self.0 .get_optional::("GstAudioConverter.mix-matrix") diff --git a/gstreamer-audio/src/audio_decoder.rs b/gstreamer-audio/src/audio_decoder.rs index 728b82a68..2e0520f37 100644 --- a/gstreamer-audio/src/audio_decoder.rs +++ b/gstreamer-audio/src/audio_decoder.rs @@ -43,6 +43,7 @@ pub trait AudioDecoderExtManual: 'static { fn set_output_format(&self, info: &AudioInfo) -> Result<(), gst::FlowError>; + #[doc(alias = "get_allocator")] fn allocator(&self) -> (Option, gst::AllocationParams); #[allow(clippy::too_many_arguments)] diff --git a/gstreamer-audio/src/audio_encoder.rs b/gstreamer-audio/src/audio_encoder.rs index 9aedc3cbc..41375dd8b 100644 --- a/gstreamer-audio/src/audio_encoder.rs +++ b/gstreamer-audio/src/audio_encoder.rs @@ -17,8 +17,10 @@ pub trait AudioEncoderExtManual: 'static { fn set_output_format(&self, caps: &gst::Caps) -> Result<(), gst::FlowError>; + #[doc(alias = "get_allocator")] fn allocator(&self) -> (Option, gst::AllocationParams); + #[doc(alias = "get_latency")] fn latency(&self) -> (gst::ClockTime, gst::ClockTime); } diff --git a/gstreamer-audio/src/audio_meta.rs b/gstreamer-audio/src/audio_meta.rs index cc5f0a21a..b40f5ab4d 100644 --- a/gstreamer-audio/src/audio_meta.rs +++ b/gstreamer-audio/src/audio_meta.rs @@ -42,10 +42,12 @@ impl AudioClippingMeta { } } + #[doc(alias = "get_start")] pub fn start(&self) -> gst::GenericFormattedValue { unsafe { gst::GenericFormattedValue::new(from_glib(self.0.format), self.0.start as i64) } } + #[doc(alias = "get_end")] pub fn end(&self) -> gst::GenericFormattedValue { unsafe { gst::GenericFormattedValue::new(from_glib(self.0.format), self.0.end as i64) } } @@ -169,14 +171,17 @@ impl AudioMeta { } } + #[doc(alias = "get_info")] pub fn info(&self) -> crate::AudioInfo { unsafe { from_glib_none(&self.0.info as *const _ as *mut ffi::GstAudioInfo) } } + #[doc(alias = "get_samples")] pub fn samples(&self) -> usize { self.0.samples } + #[doc(alias = "get_offsets")] pub fn offsets(&self) -> &[usize] { if self.0.offsets.is_null() || self.0.info.channels < 1 { return &[]; diff --git a/gstreamer-audio/src/audio_ring_buffer_spec.rs b/gstreamer-audio/src/audio_ring_buffer_spec.rs index f241a9e89..5beca1e2a 100644 --- a/gstreamer-audio/src/audio_ring_buffer_spec.rs +++ b/gstreamer-audio/src/audio_ring_buffer_spec.rs @@ -13,6 +13,7 @@ use std::fmt; pub struct AudioRingBufferSpec(pub(crate) GstAudioRingBufferSpec); impl AudioRingBufferSpec { + #[doc(alias = "get_type")] pub fn type_(&self) -> AudioRingBufferFormatType { unsafe { AudioRingBufferFormatType::from_glib(self.0.type_) } } @@ -21,14 +22,17 @@ impl AudioRingBufferSpec { self.0.type_ = value.into_glib(); } + #[doc(alias = "get_caps")] pub fn caps(&self) -> Caps { unsafe { Caps::from_glib_none(self.0.caps) } } + #[doc(alias = "get_audio_info")] pub fn audio_info(&self) -> AudioInfo { unsafe { AudioInfo::from_glib_none(mut_override(&self.0.info)) } } + #[doc(alias = "get_latency_time")] pub fn latency_time(&self) -> u64 { self.0.latency_time } @@ -37,6 +41,7 @@ impl AudioRingBufferSpec { self.0.latency_time = value; } + #[doc(alias = "get_buffer_time")] pub fn buffer_time(&self) -> u64 { self.0.buffer_time } @@ -45,6 +50,7 @@ impl AudioRingBufferSpec { self.0.buffer_time = value; } + #[doc(alias = "get_segsize")] pub fn segsize(&self) -> i32 { self.0.segsize } @@ -53,6 +59,7 @@ impl AudioRingBufferSpec { self.0.segsize = value; } + #[doc(alias = "get_segtotal")] pub fn segtotal(&self) -> i32 { self.0.segtotal } @@ -61,6 +68,7 @@ impl AudioRingBufferSpec { self.0.segtotal = value; } + #[doc(alias = "get_seglatency")] pub fn seglatency(&self) -> i32 { self.0.seglatency } diff --git a/gstreamer-base/src/adapter.rs b/gstreamer-base/src/adapter.rs index 15a04ac1e..31bc27376 100644 --- a/gstreamer-base/src/adapter.rs +++ b/gstreamer-base/src/adapter.rs @@ -60,6 +60,7 @@ impl Adapter { } } + #[doc(alias = "get_buffer")] pub fn buffer(&self, nbytes: usize) -> Result { assert!(nbytes <= self.available()); assert!(nbytes != 0); @@ -70,6 +71,7 @@ impl Adapter { } } + #[doc(alias = "get_buffer_fast")] pub fn buffer_fast(&self, nbytes: usize) -> Result { assert!(nbytes <= self.available()); assert!(nbytes != 0); @@ -83,6 +85,7 @@ impl Adapter { } } + #[doc(alias = "get_buffer_list")] pub fn buffer_list(&self, nbytes: usize) -> Result { assert!(nbytes <= self.available()); assert!(nbytes != 0); @@ -96,6 +99,7 @@ impl Adapter { } } + #[doc(alias = "get_list")] pub fn list(&self, nbytes: usize) -> Result, glib::BoolError> { assert!(nbytes <= self.available()); assert!(nbytes != 0); @@ -292,18 +296,22 @@ impl UniqueAdapter { self.0.flush(flush); } + #[doc(alias = "get_buffer")] pub fn buffer(&self, nbytes: usize) -> Result { self.0.buffer(nbytes) } + #[doc(alias = "get_buffer_fast")] pub fn buffer_fast(&self, nbytes: usize) -> Result { self.0.buffer_fast(nbytes) } + #[doc(alias = "get_buffer_list")] pub fn buffer_list(&self, nbytes: usize) -> Result { self.0.buffer_list(nbytes) } + #[doc(alias = "get_list")] pub fn list(&self, nbytes: usize) -> Result, glib::BoolError> { self.0.list(nbytes) } diff --git a/gstreamer-base/src/aggregator.rs b/gstreamer-base/src/aggregator.rs index b30a32941..f4cf2c23d 100644 --- a/gstreamer-base/src/aggregator.rs +++ b/gstreamer-base/src/aggregator.rs @@ -19,6 +19,7 @@ use std::mem::transmute; use std::ptr; pub trait AggregatorExtManual: 'static { + #[doc(alias = "get_allocator")] fn allocator(&self) -> (Option, gst::AllocationParams); fn finish_buffer(&self, buffer: gst::Buffer) -> Result; @@ -32,6 +33,7 @@ pub trait AggregatorExtManual: 'static { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[doc(alias = "get_property_min_upstream_latency")] fn min_upstream_latency(&self) -> gst::ClockTime; #[cfg(any(feature = "v1_16", feature = "dox"))] diff --git a/gstreamer-base/src/aggregator_pad.rs b/gstreamer-base/src/aggregator_pad.rs index 17ed81789..6f2d8af89 100644 --- a/gstreamer-base/src/aggregator_pad.rs +++ b/gstreamer-base/src/aggregator_pad.rs @@ -5,6 +5,7 @@ use glib::prelude::*; use glib::translate::*; pub trait AggregatorPadExtManual: 'static { + #[doc(alias = "get_segment")] fn segment(&self) -> gst::Segment; } diff --git a/gstreamer-base/src/base_parse.rs b/gstreamer-base/src/base_parse.rs index ad00173ff..b28f0f4ed 100644 --- a/gstreamer-base/src/base_parse.rs +++ b/gstreamer-base/src/base_parse.rs @@ -9,7 +9,9 @@ use std::convert::TryFrom; use std::mem; pub trait BaseParseExtManual: 'static { + #[doc(alias = "get_sink_pad")] fn sink_pad(&self) -> gst::Pad; + #[doc(alias = "get_src_pad")] fn src_pad(&self) -> gst::Pad; fn set_duration>(&self, duration: V, interval: u32); diff --git a/gstreamer-base/src/base_parse_frame.rs b/gstreamer-base/src/base_parse_frame.rs index 36f926c66..70eb124e0 100644 --- a/gstreamer-base/src/base_parse_frame.rs +++ b/gstreamer-base/src/base_parse_frame.rs @@ -84,6 +84,7 @@ impl<'a> BaseParseFrame<'a> { Self(ptr::NonNull::new_unchecked(frame), PhantomData) } + #[doc(alias = "get_buffer")] pub fn buffer(&self) -> Option<&gst::BufferRef> { unsafe { let ptr = (*self.to_glib_none().0).buffer; @@ -95,6 +96,7 @@ impl<'a> BaseParseFrame<'a> { } } + #[doc(alias = "get_buffer_mut")] pub fn buffer_mut(&mut self) -> Option<&mut gst::BufferRef> { unsafe { let ptr = (*self.to_glib_none().0).buffer; @@ -111,6 +113,7 @@ impl<'a> BaseParseFrame<'a> { } } + #[doc(alias = "get_output_buffer")] pub fn output_buffer(&self) -> Option<&gst::BufferRef> { unsafe { let ptr = (*self.to_glib_none().0).out_buffer; @@ -122,6 +125,7 @@ impl<'a> BaseParseFrame<'a> { } } + #[doc(alias = "get_output_buffer_mut")] pub fn output_buffer_mut(&mut self) -> Option<&mut gst::BufferRef> { unsafe { let ptr = (*self.to_glib_none().0).out_buffer; @@ -156,6 +160,7 @@ impl<'a> BaseParseFrame<'a> { } } + #[doc(alias = "get_flags")] pub fn flags(&self) -> BaseParseFrameFlags { let flags = unsafe { (*self.to_glib_none().0).flags }; BaseParseFrameFlags::from_bits_truncate(flags) @@ -169,10 +174,12 @@ impl<'a> BaseParseFrame<'a> { unsafe { (*self.to_glib_none().0).flags &= !flags.bits() } } + #[doc(alias = "get_offset")] pub fn offset(&self) -> u64 { unsafe { (*self.to_glib_none().0).offset } } + #[doc(alias = "get_overhead")] pub fn overhead(&self) -> Overhead { unsafe { from_glib((*self.to_glib_none().0).overhead) } } diff --git a/gstreamer-base/src/base_sink.rs b/gstreamer-base/src/base_sink.rs index aa80c8f0e..a2239ec01 100644 --- a/gstreamer-base/src/base_sink.rs +++ b/gstreamer-base/src/base_sink.rs @@ -6,6 +6,7 @@ use glib::translate::*; use std::mem; pub trait BaseSinkExtManual: 'static { + #[doc(alias = "get_segment")] fn segment(&self) -> gst::Segment; fn wait( diff --git a/gstreamer-base/src/base_src.rs b/gstreamer-base/src/base_src.rs index ccd678960..55788a0a6 100644 --- a/gstreamer-base/src/base_src.rs +++ b/gstreamer-base/src/base_src.rs @@ -8,8 +8,10 @@ use std::ptr; use crate::BaseSrc; pub trait BaseSrcExtManual: 'static { + #[doc(alias = "get_allocator")] fn allocator(&self) -> (Option, gst::AllocationParams); + #[doc(alias = "get_segment")] fn segment(&self) -> gst::Segment; fn start_complete(&self, ret: Result); diff --git a/gstreamer-base/src/base_transform.rs b/gstreamer-base/src/base_transform.rs index a698dbb87..187b0b0a0 100644 --- a/gstreamer-base/src/base_transform.rs +++ b/gstreamer-base/src/base_transform.rs @@ -7,8 +7,10 @@ use std::mem; use std::ptr; pub trait BaseTransformExtManual: 'static { + #[doc(alias = "get_allocator")] fn allocator(&self) -> (Option, gst::AllocationParams); + #[doc(alias = "get_segment")] fn segment(&self) -> gst::Segment; } diff --git a/gstreamer-base/src/subclass/base_src.rs b/gstreamer-base/src/subclass/base_src.rs index 6a65606f0..5d72c6a7c 100644 --- a/gstreamer-base/src/subclass/base_src.rs +++ b/gstreamer-base/src/subclass/base_src.rs @@ -34,6 +34,7 @@ pub trait BaseSrcImpl: BaseSrcImplExt + ElementImpl { self.parent_size(element) } + #[doc(alias = "get_times")] fn times( &self, element: &Self::Type, diff --git a/gstreamer-base/src/subclass/base_transform.rs b/gstreamer-base/src/subclass/base_transform.rs index 9cbbbb2ed..0afc9f8b5 100644 --- a/gstreamer-base/src/subclass/base_transform.rs +++ b/gstreamer-base/src/subclass/base_transform.rs @@ -291,6 +291,7 @@ pub trait BaseTransformImplExt: ObjectSubclass { Self: ObjectSubclass, ::ParentType: IsA; + #[doc(alias = "get_queued_buffer")] fn queued_buffer(&self) -> Option where Self: ObjectSubclass, diff --git a/gstreamer-check/src/harness.rs b/gstreamer-check/src/harness.rs index 39eee6581..76b7485e1 100644 --- a/gstreamer-check/src/harness.rs +++ b/gstreamer-check/src/harness.rs @@ -220,10 +220,12 @@ impl Harness { // unsafe { TODO: call ffi::gst_harness_get_allocator() } //} + #[doc(alias = "get_last_pushed_timestamp")] pub fn last_pushed_timestamp(&self) -> gst::ClockTime { unsafe { from_glib(ffi::gst_harness_get_last_pushed_timestamp(self.0.as_ptr())) } } + #[doc(alias = "get_testclock")] pub fn testclock(&self) -> Option { unsafe { from_glib_full(ffi::gst_harness_get_testclock(self.0.as_ptr())) } } @@ -627,6 +629,7 @@ impl Harness { // unsafe { TODO: call ffi::gst_harness_stress_thread_stop() } //} + #[doc(alias = "get_element")] pub fn element(&self) -> Option { unsafe { // Work around https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/31 @@ -645,6 +648,7 @@ impl Harness { } } + #[doc(alias = "get_sinkpad")] pub fn sinkpad(&self) -> Option { unsafe { // Work around https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/31 @@ -663,6 +667,7 @@ impl Harness { } } + #[doc(alias = "get_srcpad")] pub fn srcpad(&self) -> Option { unsafe { // Work around https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/31 @@ -681,6 +686,7 @@ impl Harness { } } + #[doc(alias = "get_sink_harness")] pub fn sink_harness(&self) -> Option { unsafe { let sink_harness = (*self.0.as_ptr()).sink_harness; @@ -695,6 +701,7 @@ impl Harness { } } + #[doc(alias = "get_src_harness")] pub fn src_harness(&self) -> Option { unsafe { let src_harness = (*self.0.as_ptr()).src_harness; @@ -709,6 +716,7 @@ impl Harness { } } + #[doc(alias = "get_mut_sink_harness")] pub fn sink_harness_mut(&mut self) -> Option { unsafe { let sink_harness = (*self.0.as_ptr()).sink_harness; @@ -723,6 +731,7 @@ impl Harness { } } + #[doc(alias = "get_mut_src_harness")] pub fn src_harness_mut(&mut self) -> Option { unsafe { let src_harness = (*self.0.as_ptr()).src_harness; diff --git a/gstreamer-editing-services/src/timeline_element.rs b/gstreamer-editing-services/src/timeline_element.rs index 6bf3624d8..b80a6a584 100644 --- a/gstreamer-editing-services/src/timeline_element.rs +++ b/gstreamer-editing-services/src/timeline_element.rs @@ -6,6 +6,7 @@ use glib::translate::*; use std::ptr; pub trait TimelineElementExtManual: 'static { + #[doc(alias = "get_child_property")] fn child_property(&self, name: &str) -> Option; fn set_child_property( &self, diff --git a/gstreamer-gl/egl/src/gl_display_egl.rs b/gstreamer-gl/egl/src/gl_display_egl.rs index 6e7f273b4..cbd53ecce 100644 --- a/gstreamer-gl/egl/src/gl_display_egl.rs +++ b/gstreamer-gl/egl/src/gl_display_egl.rs @@ -22,6 +22,7 @@ impl GLDisplayEGL { .ok_or_else(|| glib::bool_error!("Failed to create new EGL GL display")) } + #[doc(alias = "get_from_native")] pub unsafe fn from_native(display_type: GLDisplayType, display: uintptr_t) -> gpointer { ffi::gst_gl_display_egl_get_from_native(display_type.into_glib(), display) } diff --git a/gstreamer-gl/src/context.rs b/gstreamer-gl/src/context.rs index a25e43b34..3981d17fa 100644 --- a/gstreamer-gl/src/context.rs +++ b/gstreamer-gl/src/context.rs @@ -7,6 +7,7 @@ use gst::ContextRef; use std::ptr; pub trait ContextGLExt { + #[doc(alias = "get_gl_display")] fn gl_display(&self) -> Option; fn set_gl_display>(&self, display: &T); } diff --git a/gstreamer-gl/src/gl_context.rs b/gstreamer-gl/src/gl_context.rs index 4b77cea7b..73b972c1d 100644 --- a/gstreamer-gl/src/gl_context.rs +++ b/gstreamer-gl/src/gl_context.rs @@ -23,11 +23,13 @@ impl GLContext { )) } + #[doc(alias = "get_current_gl_context")] pub fn current_gl_context(context_type: GLPlatform) -> uintptr_t { skip_assert_initialized!(); unsafe { ffi::gst_gl_context_get_current_gl_context(context_type.into_glib()) as uintptr_t } } + #[doc(alias = "get_proc_address_with_platform")] pub fn proc_address_with_platform( context_type: GLPlatform, gl_api: GLAPI, @@ -45,8 +47,10 @@ impl GLContext { } pub trait GLContextExtManual: 'static { + #[doc(alias = "get_gl_context")] fn gl_context(&self) -> uintptr_t; + #[doc(alias = "get_proc_address")] fn proc_address(&self, name: &str) -> uintptr_t; } diff --git a/gstreamer-gl/src/gl_sync_meta.rs b/gstreamer-gl/src/gl_sync_meta.rs index 15f87c53b..4c546e547 100644 --- a/gstreamer-gl/src/gl_sync_meta.rs +++ b/gstreamer-gl/src/gl_sync_meta.rs @@ -28,6 +28,7 @@ impl GLSyncMeta { } } + #[doc(alias = "get_context")] pub fn context(&self) -> GLContext { unsafe { from_glib_none(self.0.context) } } diff --git a/gstreamer-gl/src/gl_video_frame.rs b/gstreamer-gl/src/gl_video_frame.rs index b23f92ad8..fb9c9a6dc 100644 --- a/gstreamer-gl/src/gl_video_frame.rs +++ b/gstreamer-gl/src/gl_video_frame.rs @@ -17,6 +17,7 @@ pub trait VideoFrameGLExt { info: &'b gst_video::VideoInfo, ) -> Result, glib::error::BoolError>; + #[doc(alias = "get_texture_id")] fn texture_id(&self, idx: u32) -> Option; } diff --git a/gstreamer-net/src/net_address_meta.rs b/gstreamer-net/src/net_address_meta.rs index c44bf3e29..d262b6901 100644 --- a/gstreamer-net/src/net_address_meta.rs +++ b/gstreamer-net/src/net_address_meta.rs @@ -26,6 +26,7 @@ impl NetAddressMeta { } } + #[doc(alias = "get_addr")] pub fn addr(&self) -> gio::SocketAddress { unsafe { from_glib_none(self.0.addr) } } diff --git a/gstreamer-pbutils/src/discoverer.rs b/gstreamer-pbutils/src/discoverer.rs index 3071428ea..ebd3bbdc6 100644 --- a/gstreamer-pbutils/src/discoverer.rs +++ b/gstreamer-pbutils/src/discoverer.rs @@ -22,6 +22,7 @@ impl Discoverer { } } + #[doc(alias = "get_property_timeout")] pub fn property_timeout(&self) -> gst::ClockTime { let mut value = Value::from(&0u64); unsafe { diff --git a/gstreamer-pbutils/src/discoverer_video_info.rs b/gstreamer-pbutils/src/discoverer_video_info.rs index a9d2ad096..efee414b4 100644 --- a/gstreamer-pbutils/src/discoverer_video_info.rs +++ b/gstreamer-pbutils/src/discoverer_video_info.rs @@ -5,6 +5,7 @@ use crate::DiscovererVideoInfo; use glib::translate::*; impl DiscovererVideoInfo { + #[doc(alias = "get_framerate")] pub fn framerate(&self) -> gst::Fraction { unsafe { gst::Fraction::new( @@ -14,6 +15,7 @@ impl DiscovererVideoInfo { } } + #[doc(alias = "get_par")] pub fn par(&self) -> gst::Fraction { unsafe { gst::Fraction::new( diff --git a/gstreamer-pbutils/src/encoding_profile.rs b/gstreamer-pbutils/src/encoding_profile.rs index d657df1bb..6f7596ee0 100644 --- a/gstreamer-pbutils/src/encoding_profile.rs +++ b/gstreamer-pbutils/src/encoding_profile.rs @@ -103,6 +103,7 @@ trait EncodingProfileHasRestrictionSetter { } pub trait EncodingProfileHasRestrictionGetter { + #[doc(alias = "get_restriction")] fn restriction(&self) -> Option; } diff --git a/gstreamer-player/src/config.rs b/gstreamer-player/src/config.rs index cd16f622f..f2327cb9b 100644 --- a/gstreamer-player/src/config.rs +++ b/gstreamer-player/src/config.rs @@ -35,11 +35,13 @@ impl AsMut for PlayerConfig { } impl PlayerConfig { + #[doc(alias = "get_position_update_interval")] pub fn position_update_interval(&self) -> u32 { assert_initialized_main_thread!(); unsafe { ffi::gst_player_config_get_position_update_interval(self.0.to_glib_none().0) } } + #[doc(alias = "get_seek_accurate")] pub fn is_seek_accurate(&self) -> bool { assert_initialized_main_thread!(); unsafe { @@ -49,6 +51,7 @@ impl PlayerConfig { } } + #[doc(alias = "get_user_agent")] pub fn user_agent(&self) -> Option { assert_initialized_main_thread!(); unsafe { diff --git a/gstreamer-player/src/player.rs b/gstreamer-player/src/player.rs index d25101dab..557a99beb 100644 --- a/gstreamer-player/src/player.rs +++ b/gstreamer-player/src/player.rs @@ -29,6 +29,7 @@ impl Player { } } + #[doc(alias = "get_config")] pub fn config(&self) -> crate::PlayerConfig { unsafe { from_glib_full(ffi::gst_player_get_config(self.to_glib_none().0)) } } diff --git a/gstreamer-player/src/player_video_info.rs b/gstreamer-player/src/player_video_info.rs index 693580b27..64a3e6caf 100644 --- a/gstreamer-player/src/player_video_info.rs +++ b/gstreamer-player/src/player_video_info.rs @@ -5,6 +5,7 @@ use glib::translate::*; use std::mem; impl PlayerVideoInfo { + #[doc(alias = "get_framerate")] pub fn framerate(&self) -> gst::Fraction { unsafe { let mut fps_n = mem::MaybeUninit::uninit(); @@ -18,6 +19,7 @@ impl PlayerVideoInfo { } } + #[doc(alias = "get_pixel_aspect_ratio")] pub fn pixel_aspect_ratio(&self) -> gst::Fraction { unsafe { let mut par_n = mem::MaybeUninit::uninit(); diff --git a/gstreamer-player/src/player_video_overlay_video_renderer.rs b/gstreamer-player/src/player_video_overlay_video_renderer.rs index d84096087..68159d571 100644 --- a/gstreamer-player/src/player_video_overlay_video_renderer.rs +++ b/gstreamer-player/src/player_video_overlay_video_renderer.rs @@ -40,6 +40,7 @@ impl PlayerVideoOverlayVideoRenderer { } } + #[doc(alias = "get_window_handle")] pub unsafe fn window_handle(&self) -> uintptr_t { ffi::gst_player_video_overlay_video_renderer_get_window_handle(self.to_glib_none().0) as uintptr_t diff --git a/gstreamer-rtp/src/rtp_buffer.rs b/gstreamer-rtp/src/rtp_buffer.rs index 7a8d976aa..563ffd63e 100644 --- a/gstreamer-rtp/src/rtp_buffer.rs +++ b/gstreamer-rtp/src/rtp_buffer.rs @@ -174,26 +174,31 @@ impl<'a> RTPBuffer<'a, Writable> { } impl<'a, T> RTPBuffer<'a, T> { + #[doc(alias = "get_seq")] pub fn seq(&self) -> u16 { unsafe { ffi::gst_rtp_buffer_get_seq(glib::translate::mut_override(&self.rtp_buffer)) } } + #[doc(alias = "get_payload_type")] pub fn payload_type(&self) -> u8 { unsafe { ffi::gst_rtp_buffer_get_payload_type(glib::translate::mut_override(&self.rtp_buffer)) } } + #[doc(alias = "get_ssrc")] pub fn ssrc(&self) -> u32 { unsafe { ffi::gst_rtp_buffer_get_ssrc(glib::translate::mut_override(&self.rtp_buffer)) } } + #[doc(alias = "get_timestamp")] pub fn timestamp(&self) -> u32 { unsafe { ffi::gst_rtp_buffer_get_timestamp(glib::translate::mut_override(&self.rtp_buffer)) } } + #[doc(alias = "get_csrc")] pub fn csrc(&self, idx: u8) -> Option { if idx < self.csrc_count() { unsafe { @@ -207,12 +212,14 @@ impl<'a, T> RTPBuffer<'a, T> { } } + #[doc(alias = "get_csrc_count")] pub fn csrc_count(&self) -> u8 { unsafe { ffi::gst_rtp_buffer_get_csrc_count(glib::translate::mut_override(&self.rtp_buffer)) } } + #[doc(alias = "get_marker")] pub fn is_marker(&self) -> bool { unsafe { from_glib(ffi::gst_rtp_buffer_get_marker( @@ -221,6 +228,7 @@ impl<'a, T> RTPBuffer<'a, T> { } } + #[doc(alias = "get_payload_size")] pub fn payload_size(&self) -> u32 { unsafe { ffi::gst_rtp_buffer_get_payload_len(glib::translate::mut_override(&self.rtp_buffer)) @@ -228,6 +236,7 @@ impl<'a, T> RTPBuffer<'a, T> { } } + #[doc(alias = "get_payload")] pub fn payload(&self) -> Result<&[u8], glib::error::BoolError> { let size = self.payload_size(); if size == 0 { @@ -244,6 +253,7 @@ impl<'a, T> RTPBuffer<'a, T> { } } + #[doc(alias = "get_extension")] pub fn is_extension(&self) -> bool { unsafe { from_glib(ffi::gst_rtp_buffer_get_extension( @@ -252,6 +262,7 @@ impl<'a, T> RTPBuffer<'a, T> { } } + #[doc(alias = "get_extension_bytes")] pub fn extension_bytes(&self) -> Option<(u16, glib::Bytes)> { unsafe { let mut bits: u16 = 0; @@ -265,6 +276,7 @@ impl<'a, T> RTPBuffer<'a, T> { } } + #[doc(alias = "get_extension_onebyte_header")] pub fn extension_onebyte_header(&self, id: u8, nth: u32) -> Option<&[u8]> { unsafe { let mut data = ptr::null_mut(); @@ -286,6 +298,7 @@ impl<'a, T> RTPBuffer<'a, T> { } } + #[doc(alias = "get_extension_twobytes_header")] pub fn extension_twobytes_header(&self, id: u8, nth: u32) -> Option<(u8, &[u8])> { unsafe { let mut data = ptr::null_mut(); diff --git a/gstreamer-rtsp-server/src/rtsp_token.rs b/gstreamer-rtsp-server/src/rtsp_token.rs index c52955371..4ec5ebb7f 100644 --- a/gstreamer-rtsp-server/src/rtsp_token.rs +++ b/gstreamer-rtsp-server/src/rtsp_token.rs @@ -33,6 +33,7 @@ impl RTSPToken { } impl RTSPTokenRef { + #[doc(alias = "get_string")] pub fn string(&self, field: &str) -> Option { unsafe { from_glib_none(ffi::gst_rtsp_token_get_string( @@ -42,6 +43,7 @@ impl RTSPTokenRef { } } + #[doc(alias = "get_structure")] pub fn structure(&self) -> Option { unsafe { from_glib_none(ffi::gst_rtsp_token_get_structure(self.as_mut_ptr())) } } @@ -55,6 +57,7 @@ impl RTSPTokenRef { } } + #[doc(alias = "get_mut_structure")] pub fn structure_mut(&mut self) -> Option<&mut gst::StructureRef> { unsafe { let structure = ffi::gst_rtsp_token_writable_structure(self.as_mut_ptr()); diff --git a/gstreamer-sdp/src/sdp_media.rs b/gstreamer-sdp/src/sdp_media.rs index 4c42a6014..2b35a83ab 100644 --- a/gstreamer-sdp/src/sdp_media.rs +++ b/gstreamer-sdp/src/sdp_media.rs @@ -207,6 +207,7 @@ impl SDPMediaRef { unsafe { ffi::gst_sdp_media_formats_len(&self.0) } } + #[doc(alias = "get_attribute")] pub fn attribute(&self, idx: u32) -> Option<&SDPAttribute> { if idx >= self.attributes_len() { return None; @@ -222,6 +223,7 @@ impl SDPMediaRef { } } + #[doc(alias = "get_attribute_val")] pub fn attribute_val(&self, key: &str) -> Option<&str> { unsafe { let ptr = ffi::gst_sdp_media_get_attribute_val(&self.0, key.to_glib_none().0); @@ -233,6 +235,7 @@ impl SDPMediaRef { } } + #[doc(alias = "get_attribute_val_n")] pub fn attribute_val_n(&self, key: &str, nth: u32) -> Option<&str> { unsafe { let ptr = ffi::gst_sdp_media_get_attribute_val_n(&self.0, key.to_glib_none().0, nth); @@ -244,6 +247,7 @@ impl SDPMediaRef { } } + #[doc(alias = "get_bandwidth")] pub fn bandwidth(&self, idx: u32) -> Option<&SDPBandwidth> { if idx >= self.bandwidths_len() { return None; @@ -259,10 +263,12 @@ impl SDPMediaRef { } } + #[doc(alias = "get_caps_from_media")] pub fn caps_from_media(&self, pt: i32) -> Option { unsafe { from_glib_full(ffi::gst_sdp_media_get_caps_from_media(&self.0, pt)) } } + #[doc(alias = "get_connection")] pub fn connection(&self, idx: u32) -> Option<&SDPConnection> { if idx >= self.connections_len() { return None; @@ -278,6 +284,7 @@ impl SDPMediaRef { } } + #[doc(alias = "get_format")] pub fn format(&self, idx: u32) -> Option<&str> { if idx >= self.formats_len() { return None; @@ -293,6 +300,7 @@ impl SDPMediaRef { } } + #[doc(alias = "get_information")] pub fn information(&self) -> Option<&str> { unsafe { let ptr = ffi::gst_sdp_media_get_information(&self.0); @@ -304,6 +312,7 @@ impl SDPMediaRef { } } + #[doc(alias = "get_key")] pub fn key(&self) -> Option<&SDPKey> { unsafe { let ptr = ffi::gst_sdp_media_get_key(&self.0); @@ -315,6 +324,7 @@ impl SDPMediaRef { } } + #[doc(alias = "get_media")] pub fn media(&self) -> Option<&str> { unsafe { let ptr = ffi::gst_sdp_media_get_media(&self.0); @@ -326,14 +336,17 @@ impl SDPMediaRef { } } + #[doc(alias = "get_num_ports")] pub fn num_ports(&self) -> u32 { unsafe { ffi::gst_sdp_media_get_num_ports(&self.0) } } + #[doc(alias = "get_port")] pub fn port(&self) -> u32 { unsafe { ffi::gst_sdp_media_get_port(&self.0) } } + #[doc(alias = "get_proto")] pub fn proto(&self) -> Option<&str> { unsafe { let ptr = ffi::gst_sdp_media_get_proto(&self.0); diff --git a/gstreamer-sdp/src/sdp_message.rs b/gstreamer-sdp/src/sdp_message.rs index ff079cef8..026c9999c 100644 --- a/gstreamer-sdp/src/sdp_message.rs +++ b/gstreamer-sdp/src/sdp_message.rs @@ -246,6 +246,7 @@ impl SDPMessageRef { unsafe { ffi::gst_sdp_message_emails_len(&self.0) } } + #[doc(alias = "get_attribute")] pub fn attribute(&self, idx: u32) -> Option<&SDPAttribute> { if idx >= self.attributes_len() { return None; @@ -261,6 +262,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_attribute_val")] pub fn attribute_val(&self, key: &str) -> Option<&str> { unsafe { let ptr = ffi::gst_sdp_message_get_attribute_val(&self.0, key.to_glib_none().0); @@ -272,6 +274,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_attribute_val_n")] pub fn attribute_val_n(&self, key: &str, nth: u32) -> Option<&str> { unsafe { let ptr = ffi::gst_sdp_message_get_attribute_val_n(&self.0, key.to_glib_none().0, nth); @@ -283,6 +286,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_bandwidth")] pub fn bandwidth(&self, idx: u32) -> Option<&SDPBandwidth> { if idx >= self.bandwidths_len() { return None; @@ -298,6 +302,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_connection")] pub fn connection(&self) -> Option<&SDPConnection> { unsafe { let ptr = ffi::gst_sdp_message_get_connection(&self.0); @@ -309,6 +314,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_email")] pub fn email(&self, idx: u32) -> Option<&str> { if idx >= self.emails_len() { return None; @@ -324,6 +330,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_information")] pub fn information(&self) -> Option<&str> { unsafe { let ptr = ffi::gst_sdp_message_get_information(&self.0); @@ -335,6 +342,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_key")] pub fn key(&self) -> Option<&SDPKey> { unsafe { let ptr = ffi::gst_sdp_message_get_key(&self.0); @@ -346,6 +354,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_media")] pub fn media(&self, idx: u32) -> Option<&SDPMediaRef> { if idx >= self.medias_len() { return None; @@ -361,6 +370,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_media_mut")] pub fn media_mut(&mut self, idx: u32) -> Option<&mut SDPMediaRef> { if idx >= self.medias_len() { return None; @@ -376,6 +386,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_origin")] pub fn origin(&self) -> Option<&SDPOrigin> { unsafe { let ptr = ffi::gst_sdp_message_get_origin(&self.0); @@ -387,6 +398,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_phone")] pub fn phone(&self, idx: u32) -> Option<&str> { if idx >= self.phones_len() { return None; @@ -402,6 +414,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_session_name")] pub fn session_name(&self) -> Option<&str> { unsafe { let ptr = ffi::gst_sdp_message_get_session_name(&self.0); @@ -413,6 +426,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_time")] pub fn time(&self, idx: u32) -> Option<&SDPTime> { if idx >= self.times_len() { return None; @@ -428,6 +442,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_uri")] pub fn uri(&self) -> Option<&str> { unsafe { let ptr = ffi::gst_sdp_message_get_uri(&self.0); @@ -439,6 +454,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_version")] pub fn version(&self) -> Option<&str> { unsafe { let ptr = ffi::gst_sdp_message_get_version(&self.0); @@ -450,6 +466,7 @@ impl SDPMessageRef { } } + #[doc(alias = "get_zone")] pub fn zone(&self, idx: u32) -> Option<&SDPZone> { if idx >= self.zones_len() { return None; diff --git a/gstreamer-video/src/utils.rs b/gstreamer-video/src/utils.rs index ffc783efe..6a62e289d 100644 --- a/gstreamer-video/src/utils.rs +++ b/gstreamer-video/src/utils.rs @@ -1,6 +1,8 @@ // Take a look at the license at the top of the repository in the LICENSE file. pub trait HasStreamLock { + #[doc(alias = "get_stream_lock")] fn stream_lock(&self) -> *mut glib::ffi::GRecMutex; + #[doc(alias = "get_element_as_ptr")] fn element_as_ptr(&self) -> *const gst::ffi::GstElement; } diff --git a/gstreamer-video/src/video_buffer_pool.rs b/gstreamer-video/src/video_buffer_pool.rs index b03f35d6f..2274288cc 100644 --- a/gstreamer-video/src/video_buffer_pool.rs +++ b/gstreamer-video/src/video_buffer_pool.rs @@ -34,18 +34,23 @@ pub static BUFFER_POOL_OPTION_VIDEO_META: Lazy<&'static str> = Lazy::new(|| unsa pub struct VideoAlignment(pub(crate) ffi::GstVideoAlignment); impl VideoAlignment { + #[doc(alias = "get_padding_top")] pub fn padding_top(&self) -> u32 { self.0.padding_top } + #[doc(alias = "get_padding_bottom")] pub fn padding_bottom(&self) -> u32 { self.0.padding_bottom } + #[doc(alias = "get_padding_left")] pub fn padding_left(&self) -> u32 { self.0.padding_left } + #[doc(alias = "get_padding_right")] pub fn padding_right(&self) -> u32 { self.0.padding_right } + #[doc(alias = "get_stride_align")] pub fn stride_align(&self) -> &[u32; ffi::GST_VIDEO_MAX_PLANES as usize] { &self.0.stride_align } @@ -93,6 +98,7 @@ impl<'a> ToGlibPtr<'a, *const ffi::GstVideoAlignment> for VideoAlignment { } pub trait VideoBufferPoolConfig { + #[doc(alias = "get_video_alignment")] fn video_alignment(&self) -> Option; fn set_video_alignment(&mut self, align: &VideoAlignment); diff --git a/gstreamer-video/src/video_codec_frame.rs b/gstreamer-video/src/video_codec_frame.rs index fb2e50357..e38653497 100644 --- a/gstreamer-video/src/video_codec_frame.rs +++ b/gstreamer-video/src/video_codec_frame.rs @@ -61,6 +61,7 @@ impl<'a> VideoCodecFrame<'a> { Self { frame, element } } + #[doc(alias = "get_flags")] pub fn flags(&self) -> VideoCodecFrameFlags { let flags = unsafe { (*self.to_glib_none().0).flags }; VideoCodecFrameFlags::from_bits_truncate(flags) @@ -74,18 +75,22 @@ impl<'a> VideoCodecFrame<'a> { unsafe { (*self.to_glib_none().0).flags &= !flags.bits() } } + #[doc(alias = "get_system_frame_number")] pub fn system_frame_number(&self) -> u32 { unsafe { (*self.to_glib_none().0).system_frame_number } } + #[doc(alias = "get_decode_frame_number")] pub fn decode_frame_number(&self) -> u32 { unsafe { (*self.to_glib_none().0).decode_frame_number } } + #[doc(alias = "get_presentation_frame_number")] pub fn presentation_frame_number(&self) -> u32 { unsafe { (*self.to_glib_none().0).presentation_frame_number } } + #[doc(alias = "get_dts")] pub fn dts(&self) -> gst::ClockTime { unsafe { from_glib((*self.to_glib_none().0).dts) } } @@ -96,6 +101,7 @@ impl<'a> VideoCodecFrame<'a> { } } + #[doc(alias = "get_pts")] pub fn pts(&self) -> gst::ClockTime { unsafe { from_glib((*self.to_glib_none().0).pts) } } @@ -106,6 +112,7 @@ impl<'a> VideoCodecFrame<'a> { } } + #[doc(alias = "get_duration")] pub fn duration(&self) -> gst::ClockTime { unsafe { from_glib((*self.to_glib_none().0).duration) } } @@ -116,10 +123,12 @@ impl<'a> VideoCodecFrame<'a> { } } + #[doc(alias = "get_distance_from_sync")] pub fn distance_from_sync(&self) -> i32 { unsafe { (*self.to_glib_none().0).distance_from_sync } } + #[doc(alias = "get_input_buffer")] pub fn input_buffer(&self) -> Option<&gst::BufferRef> { unsafe { let ptr = (*self.to_glib_none().0).input_buffer; @@ -131,6 +140,7 @@ impl<'a> VideoCodecFrame<'a> { } } + #[doc(alias = "get_output_buffer")] pub fn output_buffer(&self) -> Option<&gst::BufferRef> { unsafe { let ptr = (*self.to_glib_none().0).output_buffer; @@ -142,6 +152,7 @@ impl<'a> VideoCodecFrame<'a> { } } + #[doc(alias = "get_output_buffer_mut")] pub fn output_buffer_mut(&mut self) -> Option<&mut gst::BufferRef> { unsafe { let ptr = (*self.to_glib_none().0).output_buffer; @@ -176,6 +187,7 @@ impl<'a> VideoCodecFrame<'a> { } } + #[doc(alias = "get_deadline")] pub fn deadline(&self) -> gst::ClockTime { unsafe { from_glib((*self.to_glib_none().0).deadline) } } diff --git a/gstreamer-video/src/video_codec_state.rs b/gstreamer-video/src/video_codec_state.rs index 65e9027ab..32513fc45 100644 --- a/gstreamer-video/src/video_codec_state.rs +++ b/gstreamer-video/src/video_codec_state.rs @@ -9,7 +9,9 @@ use std::ptr; use crate::video_info::VideoInfo; pub trait VideoCodecStateContext<'a> { + #[doc(alias = "get_element")] fn element(&self) -> Option<&'a dyn HasStreamLock>; + #[doc(alias = "get_element_as_ptr")] fn element_as_ptr(&self) -> *const gst::ffi::GstElement; } @@ -87,6 +89,7 @@ impl<'a> VideoCodecState<'a, InNegotiation<'a>> { } impl<'a, T: VideoCodecStateContext<'a>> VideoCodecState<'a, T> { + #[doc(alias = "get_info")] pub fn info(&self) -> VideoInfo { unsafe { let ptr = &((*self.as_mut_ptr()).info) as *const _ as usize as *mut _; @@ -94,6 +97,7 @@ impl<'a, T: VideoCodecStateContext<'a>> VideoCodecState<'a, T> { } } + #[doc(alias = "get_caps")] pub fn caps(&self) -> Option<&gst::CapsRef> { unsafe { let ptr = (*self.as_mut_ptr()).caps; @@ -106,6 +110,7 @@ impl<'a, T: VideoCodecStateContext<'a>> VideoCodecState<'a, T> { } } + #[doc(alias = "get_codec_data")] pub fn codec_data(&self) -> Option<&gst::BufferRef> { unsafe { let ptr = (*self.as_mut_ptr()).codec_data; @@ -118,6 +123,7 @@ impl<'a, T: VideoCodecStateContext<'a>> VideoCodecState<'a, T> { } } + #[doc(alias = "get_allocation_caps")] pub fn allocation_caps(&self) -> Option<&gst::CapsRef> { unsafe { let ptr = (*self.as_mut_ptr()).allocation_caps; diff --git a/gstreamer-video/src/video_color_matrix.rs b/gstreamer-video/src/video_color_matrix.rs index bbd8bba77..c438df9f5 100644 --- a/gstreamer-video/src/video_color_matrix.rs +++ b/gstreamer-video/src/video_color_matrix.rs @@ -5,6 +5,7 @@ use std::mem; use glib::translate::IntoGlib; impl crate::VideoColorMatrix { + #[doc(alias = "get_kr_kb")] pub fn kr_kb(&self) -> Result<(f64, f64), glib::BoolError> { assert_initialized_main_thread!(); unsafe { diff --git a/gstreamer-video/src/video_converter.rs b/gstreamer-video/src/video_converter.rs index 1b95d231e..e3488dd98 100644 --- a/gstreamer-video/src/video_converter.rs +++ b/gstreamer-video/src/video_converter.rs @@ -49,6 +49,7 @@ impl VideoConverter { } } + #[doc(alias = "get_config")] pub fn config(&self) -> VideoConverterConfig { unsafe { VideoConverterConfig( @@ -160,6 +161,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.resampler-method", &v); } + #[doc(alias = "get_resampler_method")] pub fn resampler_method(&self) -> crate::VideoResamplerMethod { self.0 .get_optional("GstVideoConverter.resampler-method") @@ -171,6 +173,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.chroma-resampler-method", &v); } + #[doc(alias = "get_chroma_resampler_method")] pub fn chroma_resampler_method(&self) -> crate::VideoResamplerMethod { self.0 .get_optional("GstVideoConverter.chroma-resampler-method") @@ -182,6 +185,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.resampler-taps", &v); } + #[doc(alias = "get_resampler_taps")] pub fn resampler_taps(&self) -> u32 { self.0 .get_optional("GstVideoConverter.resampler-taps") @@ -193,6 +197,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.dither-method", &v); } + #[doc(alias = "get_dither_method")] pub fn dither_method(&self) -> crate::VideoDitherMethod { self.0 .get_optional("GstVideoConverter.dither-method") @@ -204,6 +209,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.dither-quantization", &v); } + #[doc(alias = "get_dither_quantization")] pub fn dither_quantization(&self) -> u32 { self.0 .get_optional("GstVideoConverter.dither-quantization") @@ -215,6 +221,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.src-x", &v); } + #[doc(alias = "get_src_x")] pub fn src_x(&self) -> i32 { self.0 .get_optional("GstVideoConverter.src-x") @@ -226,6 +233,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.src-y", &v); } + #[doc(alias = "get_src_y")] pub fn src_y(&self) -> i32 { self.0 .get_optional("GstVideoConverter.src-y") @@ -241,6 +249,7 @@ impl VideoConverterConfig { } } + #[doc(alias = "get_src_width")] pub fn src_width(&self) -> Option { self.0 .get_optional("GstVideoConverter.src-width") @@ -255,6 +264,7 @@ impl VideoConverterConfig { } } + #[doc(alias = "get_src_height")] pub fn src_height(&self) -> Option { self.0 .get_optional("GstVideoConverter.src-height") @@ -265,6 +275,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.dest-x", &v); } + #[doc(alias = "get_dest_x")] pub fn dest_x(&self) -> i32 { self.0 .get_optional("GstVideoConverter.dest-x") @@ -276,6 +287,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.dest-y", &v); } + #[doc(alias = "get_dest_y")] pub fn dest_y(&self) -> i32 { self.0 .get_optional("GstVideoConverter.dest-y") @@ -291,6 +303,7 @@ impl VideoConverterConfig { } } + #[doc(alias = "get_dest_width")] pub fn dest_width(&self) -> Option { self.0 .get_optional("GstVideoConverter.dest-width") @@ -305,6 +318,7 @@ impl VideoConverterConfig { } } + #[doc(alias = "get_dest_height")] pub fn dest_height(&self) -> Option { self.0 .get_optional("GstVideoConverter.dest-height") @@ -315,6 +329,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.fill-border", &v); } + #[doc(alias = "get_fill_border")] pub fn fills_border(&self) -> bool { self.0 .get_optional("GstVideoConverter.fill-border") @@ -326,6 +341,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.alpha-value", &v); } + #[doc(alias = "get_alpha_value")] pub fn alpha_value(&self) -> f64 { self.0 .get_optional("GstVideoConverter.alpha-value") @@ -337,6 +353,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.alpha-mode", &v); } + #[doc(alias = "get_alpha_mode")] pub fn alpha_mode(&self) -> crate::VideoAlphaMode { self.0 .get_optional("GstVideoConverter.alpha-mode") @@ -348,6 +365,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.border-argb", &v); } + #[doc(alias = "get_border_argb")] pub fn border_argb(&self) -> u32 { self.0 .get_optional("GstVideoConverter.border-argb") @@ -359,6 +377,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.chroma-mode", &v); } + #[doc(alias = "get_chroma_mode")] pub fn chroma_mode(&self) -> crate::VideoChromaMode { self.0 .get_optional("GstVideoConverter.chroma-mode") @@ -370,6 +389,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.matrix-mode", &v); } + #[doc(alias = "get_matrix_mode")] pub fn matrix_mode(&self) -> crate::VideoMatrixMode { self.0 .get_optional("GstVideoConverter.matrix-mode") @@ -381,6 +401,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.gamma-mode", &v); } + #[doc(alias = "get_gamma_mode")] pub fn gamma_mode(&self) -> crate::VideoGammaMode { self.0 .get_optional("GstVideoConverter.gamma-mode") @@ -392,6 +413,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.primaries-mode", &v); } + #[doc(alias = "get_primaries_mode")] pub fn primaries_mode(&self) -> crate::VideoPrimariesMode { self.0 .get_optional("GstVideoConverter.primaries-mode") @@ -403,6 +425,7 @@ impl VideoConverterConfig { self.0.set("GstVideoConverter.threads", &v); } + #[doc(alias = "get_threads")] pub fn threads(&self) -> u32 { self.0 .get_optional("GstVideoConverter.threads") diff --git a/gstreamer-video/src/video_decoder.rs b/gstreamer-video/src/video_decoder.rs index 4367b23f2..cde19f4c7 100644 --- a/gstreamer-video/src/video_decoder.rs +++ b/gstreamer-video/src/video_decoder.rs @@ -36,10 +36,14 @@ pub trait VideoDecoderExtManual: 'static { params: Option<&gst::BufferPoolAcquireParams>, ) -> Result; + #[doc(alias = "get_frame")] fn frame(&self, frame_number: i32) -> Option; + #[doc(alias = "get_frames")] fn frames(&self) -> Vec; + #[doc(alias = "get_oldest_frame")] fn oldest_frame(&self) -> Option; + #[doc(alias = "get_allocator")] fn allocator(&self) -> (Option, gst::AllocationParams); fn have_frame(&self) -> Result; @@ -47,9 +51,11 @@ pub trait VideoDecoderExtManual: 'static { fn release_frame(&self, frame: VideoCodecFrame); fn drop_frame(&self, frame: VideoCodecFrame) -> Result; + #[doc(alias = "get_latency")] fn latency(&self) -> (gst::ClockTime, gst::ClockTime); fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime); + #[doc(alias = "get_output_state")] fn output_state(&self) -> Option>; fn set_output_state( &self, diff --git a/gstreamer-video/src/video_encoder.rs b/gstreamer-video/src/video_encoder.rs index 9e80209d3..65cd1d244 100644 --- a/gstreamer-video/src/video_encoder.rs +++ b/gstreamer-video/src/video_encoder.rs @@ -18,10 +18,14 @@ pub trait VideoEncoderExtManual: 'static { size: usize, ) -> Result; + #[doc(alias = "get_frame")] fn frame(&self, frame_number: i32) -> Option; + #[doc(alias = "get_frames")] fn frames(&self) -> Vec; + #[doc(alias = "get_oldest_frame")] fn oldest_frame(&self) -> Option; + #[doc(alias = "get_allocator")] fn allocator(&self) -> (Option, gst::AllocationParams); fn finish_frame( @@ -33,9 +37,11 @@ pub trait VideoEncoderExtManual: 'static { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result; + #[doc(alias = "get_latency")] fn latency(&self) -> (gst::ClockTime, gst::ClockTime); fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime); + #[doc(alias = "get_output_state")] fn output_state(&self) -> Option>; fn set_output_state( &self, diff --git a/gstreamer-video/src/video_frame.rs b/gstreamer-video/src/video_frame.rs index 26f66e618..eb8dd7847 100644 --- a/gstreamer-video/src/video_frame.rs +++ b/gstreamer-video/src/video_frame.rs @@ -801,6 +801,7 @@ impl Drop for VideoFrameRef { } pub trait VideoBufferExt { + #[doc(alias = "get_video_flags")] fn video_flags(&self) -> crate::VideoBufferFlags; fn set_video_flags(&mut self, flags: crate::VideoBufferFlags); fn unset_video_flags(&mut self, flags: crate::VideoBufferFlags); diff --git a/gstreamer-video/src/video_meta.rs b/gstreamer-video/src/video_meta.rs index dd03fa85e..a6103626d 100644 --- a/gstreamer-video/src/video_meta.rs +++ b/gstreamer-video/src/video_meta.rs @@ -110,40 +110,49 @@ impl VideoMeta { } } + #[doc(alias = "get_flags")] pub fn flags(&self) -> crate::VideoFrameFlags { unsafe { from_glib(self.0.flags) } } + #[doc(alias = "get_format")] pub fn format(&self) -> crate::VideoFormat { unsafe { from_glib(self.0.format) } } + #[doc(alias = "get_id")] pub fn id(&self) -> i32 { self.0.id } + #[doc(alias = "get_width")] pub fn width(&self) -> u32 { self.0.width } + #[doc(alias = "get_height")] pub fn height(&self) -> u32 { self.0.height } + #[doc(alias = "get_n_planes")] pub fn n_planes(&self) -> u32 { self.0.n_planes } + #[doc(alias = "get_offset")] pub fn offset(&self) -> &[usize] { &self.0.offset[0..(self.0.n_planes as usize)] } + #[doc(alias = "get_stride")] pub fn stride(&self) -> &[i32] { &self.0.stride[0..(self.0.n_planes as usize)] } #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[doc(alias = "get_alignment")] pub fn alignment(&self) -> crate::VideoAlignment { crate::VideoAlignment::new( self.0.alignment.padding_top, @@ -156,6 +165,7 @@ impl VideoMeta { #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[doc(alias = "get_plane_size")] pub fn plane_size(&self) -> Result<[usize; crate::VIDEO_MAX_PLANES], glib::BoolError> { let mut plane_size = [0; crate::VIDEO_MAX_PLANES]; @@ -174,6 +184,7 @@ impl VideoMeta { #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[doc(alias = "get_plane_height")] pub fn plane_height(&self) -> Result<[u32; crate::VIDEO_MAX_PLANES], glib::BoolError> { let mut plane_height = [0; crate::VIDEO_MAX_PLANES]; @@ -259,6 +270,7 @@ impl VideoCropMeta { } } + #[doc(alias = "get_rect")] pub fn rect(&self) -> (u32, u32, u32, u32) { (self.0.x, self.0.y, self.0.width, self.0.height) } @@ -314,23 +326,28 @@ impl VideoRegionOfInterestMeta { } } + #[doc(alias = "get_rect")] pub fn rect(&self) -> (u32, u32, u32, u32) { (self.0.x, self.0.y, self.0.w, self.0.h) } + #[doc(alias = "get_id")] pub fn id(&self) -> i32 { self.0.id } + #[doc(alias = "get_parent_id")] pub fn parent_id(&self) -> i32 { self.0.parent_id } + #[doc(alias = "get_roi_type")] pub fn roi_type<'a>(&self) -> &'a str { unsafe { glib::Quark::from_glib(self.0.roi_type).to_string() } } #[cfg(feature = "v1_14")] + #[doc(alias = "get_params")] pub fn params(&self) -> ParamsIter { ParamsIter { _meta: self, @@ -339,6 +356,7 @@ impl VideoRegionOfInterestMeta { } #[cfg(feature = "v1_14")] + #[doc(alias = "get_param")] pub fn param<'b>(&self, name: &'b str) -> Option<&gst::StructureRef> { self.params().find(|s| s.name() == name) } @@ -447,6 +465,7 @@ impl VideoAffineTransformationMeta { } } + #[doc(alias = "get_matrix")] pub fn matrix(&self) -> &[f32; 16] { &self.0.matrix } @@ -500,10 +519,12 @@ impl VideoOverlayCompositionMeta { } } + #[doc(alias = "get_overlay")] pub fn overlay(&self) -> &crate::VideoOverlayCompositionRef { unsafe { crate::VideoOverlayCompositionRef::from_ptr(self.0.overlay) } } + #[doc(alias = "get_overlay_owned")] pub fn overlay_owned(&self) -> crate::VideoOverlayComposition { unsafe { from_glib_none(self.overlay().as_ptr()) } } @@ -568,10 +589,12 @@ impl VideoCaptionMeta { } } + #[doc(alias = "get_caption_type")] pub fn caption_type(&self) -> crate::VideoCaptionType { unsafe { from_glib(self.0.caption_type) } } + #[doc(alias = "get_data")] pub fn data(&self) -> &[u8] { unsafe { use std::slice; @@ -637,14 +660,17 @@ impl VideoAFDMeta { } } + #[doc(alias = "get_field")] pub fn field(&self) -> u8 { self.0.field } + #[doc(alias = "get_spec")] pub fn spec(&self) -> crate::VideoAFDSpec { unsafe { from_glib(self.0.spec) } } + #[doc(alias = "get_afd")] pub fn afd(&self) -> crate::VideoAFDValue { unsafe { from_glib(self.0.afd) } } @@ -709,6 +735,7 @@ impl VideoBarMeta { } } + #[doc(alias = "get_field")] pub fn field(&self) -> u8 { self.0.field } @@ -717,10 +744,12 @@ impl VideoBarMeta { unsafe { from_glib(self.0.is_letterbox) } } + #[doc(alias = "get_bar_data1")] pub fn bar_data1(&self) -> u32 { self.0.bar_data1 } + #[doc(alias = "get_bar_data2")] pub fn bar_data2(&self) -> u32 { self.0.bar_data2 } diff --git a/gstreamer-video/src/video_overlay_composition.rs b/gstreamer-video/src/video_overlay_composition.rs index 506a1db3d..1e748e9e5 100644 --- a/gstreamer-video/src/video_overlay_composition.rs +++ b/gstreamer-video/src/video_overlay_composition.rs @@ -53,6 +53,7 @@ impl VideoOverlayRectangle { } impl VideoOverlayRectangleRef { + #[doc(alias = "get_flags")] pub fn flags(&self) -> crate::VideoOverlayFormatFlags { unsafe { from_glib(ffi::gst_video_overlay_rectangle_get_flags( @@ -61,6 +62,7 @@ impl VideoOverlayRectangleRef { } } + #[doc(alias = "get_global_alpha")] pub fn global_alpha(&self) -> f32 { unsafe { ffi::gst_video_overlay_rectangle_get_global_alpha(self.as_mut_ptr()) } } @@ -69,10 +71,12 @@ impl VideoOverlayRectangleRef { unsafe { ffi::gst_video_overlay_rectangle_set_global_alpha(self.as_mut_ptr(), alpha) } } + #[doc(alias = "get_seqnum")] pub fn seqnum(&self) -> u32 { unsafe { ffi::gst_video_overlay_rectangle_get_seqnum(self.as_mut_ptr()) } } + #[doc(alias = "get_render_rectangle")] pub fn render_rectangle(&self) -> (i32, i32, u32, u32) { unsafe { let mut render_x = mem::MaybeUninit::uninit(); @@ -115,6 +119,7 @@ impl VideoOverlayRectangleRef { } } + #[doc(alias = "get_pixels_unscaled_raw")] pub fn pixels_unscaled_raw(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer { unsafe { from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_unscaled_raw( @@ -124,6 +129,7 @@ impl VideoOverlayRectangleRef { } } + #[doc(alias = "get_pixels_unscaled_ayuv")] pub fn pixels_unscaled_ayuv(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer { unsafe { from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_unscaled_ayuv( @@ -133,6 +139,7 @@ impl VideoOverlayRectangleRef { } } + #[doc(alias = "get_pixels_unscaled_argb")] pub fn pixels_unscaled_argb(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer { unsafe { from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_unscaled_argb( @@ -142,6 +149,7 @@ impl VideoOverlayRectangleRef { } } + #[doc(alias = "get_pixels_raw")] pub fn pixels_raw(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer { unsafe { from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_raw( @@ -151,6 +159,7 @@ impl VideoOverlayRectangleRef { } } + #[doc(alias = "get_pixels_ayuv")] pub fn pixels_ayuv(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer { unsafe { from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_ayuv( @@ -160,6 +169,7 @@ impl VideoOverlayRectangleRef { } } + #[doc(alias = "get_pixels_argb")] pub fn pixels_argb(&self, flags: crate::VideoOverlayFormatFlags) -> gst::Buffer { unsafe { from_glib_none(ffi::gst_video_overlay_rectangle_get_pixels_argb( @@ -226,6 +236,7 @@ impl VideoOverlayCompositionRef { unsafe { ffi::gst_video_overlay_composition_n_rectangles(self.as_mut_ptr()) } } + #[doc(alias = "get_rectangle")] pub fn rectangle(&self, idx: u32) -> Result { if idx >= self.n_rectangles() { return Err(glib::bool_error!("Invalid index")); @@ -242,6 +253,7 @@ impl VideoOverlayCompositionRef { } } + #[doc(alias = "get_seqnum")] pub fn seqnum(&self) -> u32 { unsafe { ffi::gst_video_overlay_composition_get_seqnum(self.as_mut_ptr()) } } diff --git a/gstreamer-video/src/video_time_code.rs b/gstreamer-video/src/video_time_code.rs index 5ebed82c3..6f82c8eb8 100644 --- a/gstreamer-video/src/video_time_code.rs +++ b/gstreamer-video/src/video_time_code.rs @@ -552,6 +552,7 @@ impl VideoTimeCodeMeta { } } + #[doc(alias = "get_tc")] pub fn tc(&self) -> ValidVideoTimeCode { unsafe { ValidVideoTimeCode::from_glib_none(&self.0.tc as *const _) } } diff --git a/gstreamer-video/src/video_time_code_interval.rs b/gstreamer-video/src/video_time_code_interval.rs index 7b5046221..f86f12c43 100644 --- a/gstreamer-video/src/video_time_code_interval.rs +++ b/gstreamer-video/src/video_time_code_interval.rs @@ -21,6 +21,7 @@ impl VideoTimeCodeInterval { } } + #[doc(alias = "get_hours")] pub fn hours(&self) -> u32 { self.0.hours } @@ -29,6 +30,7 @@ impl VideoTimeCodeInterval { self.0.hours = hours } + #[doc(alias = "get_minutes")] pub fn minutes(&self) -> u32 { self.0.minutes } @@ -38,6 +40,7 @@ impl VideoTimeCodeInterval { self.0.minutes = minutes } + #[doc(alias = "get_seconds")] pub fn seconds(&self) -> u32 { self.0.seconds } @@ -47,6 +50,7 @@ impl VideoTimeCodeInterval { self.0.seconds = seconds } + #[doc(alias = "get_frames")] pub fn frames(&self) -> u32 { self.0.frames } diff --git a/gstreamer-webrtc/src/web_rtc_session_description.rs b/gstreamer-webrtc/src/web_rtc_session_description.rs index 0152d26f9..a5dec0a21 100644 --- a/gstreamer-webrtc/src/web_rtc_session_description.rs +++ b/gstreamer-webrtc/src/web_rtc_session_description.rs @@ -17,10 +17,12 @@ impl WebRTCSessionDescription { } } + #[doc(alias = "get_type")] pub fn type_(&self) -> crate::WebRTCSDPType { unsafe { from_glib((*self.to_glib_none().0).type_) } } + #[doc(alias = "get_sdp")] pub fn sdp(&self) -> gst_sdp::SDPMessage { unsafe { from_glib_none((*self.to_glib_none().0).sdp) } } diff --git a/gstreamer/src/allocation_params.rs b/gstreamer/src/allocation_params.rs index 236361900..1de35f98f 100644 --- a/gstreamer/src/allocation_params.rs +++ b/gstreamer/src/allocation_params.rs @@ -13,18 +13,22 @@ unsafe impl Send for AllocationParams {} unsafe impl Sync for AllocationParams {} impl AllocationParams { + #[doc(alias = "get_flags")] pub fn flags(&self) -> MemoryFlags { unsafe { from_glib(self.0.flags) } } + #[doc(alias = "get_align")] pub fn align(&self) -> usize { self.0.align } + #[doc(alias = "get_prefix")] pub fn prefix(&self) -> usize { self.0.prefix } + #[doc(alias = "get_padding")] pub fn padding(&self) -> usize { self.0.padding } diff --git a/gstreamer/src/bin.rs b/gstreamer/src/bin.rs index 5e2192c6d..327f271c3 100644 --- a/gstreamer/src/bin.rs +++ b/gstreamer/src/bin.rs @@ -33,6 +33,7 @@ pub trait GstBinExtManual: 'static { fn iterate_sinks(&self) -> crate::Iterator; fn iterate_sorted(&self) -> crate::Iterator; fn iterate_sources(&self) -> crate::Iterator; + #[doc(alias = "get_children")] fn children(&self) -> Vec; fn debug_to_dot_data(&self, details: crate::DebugGraphDetails) -> GString; @@ -51,6 +52,7 @@ pub trait GstBinExtManual: 'static { fn unset_bin_flags(&self, flags: BinFlags); + #[doc(alias = "get_bin_flags")] fn bin_flags(&self) -> BinFlags; } diff --git a/gstreamer/src/buffer.rs b/gstreamer/src/buffer.rs index 8296bda0a..72b93d349 100644 --- a/gstreamer/src/buffer.rs +++ b/gstreamer/src/buffer.rs @@ -296,10 +296,12 @@ impl BufferRef { } } + #[doc(alias = "get_size")] pub fn size(&self) -> usize { unsafe { ffi::gst_buffer_get_size(self.as_mut_ptr()) } } + #[doc(alias = "get_maxsize")] pub fn maxsize(&self) -> usize { unsafe { let mut maxsize = mem::MaybeUninit::uninit(); @@ -323,6 +325,7 @@ impl BufferRef { } } + #[doc(alias = "get_offset")] pub fn offset(&self) -> u64 { self.0.offset } @@ -331,6 +334,7 @@ impl BufferRef { self.0.offset = offset; } + #[doc(alias = "get_offset_end")] pub fn offset_end(&self) -> u64 { self.0.offset_end } @@ -339,6 +343,7 @@ impl BufferRef { self.0.offset_end = offset_end; } + #[doc(alias = "get_pts")] pub fn pts(&self) -> ClockTime { unsafe { from_glib(self.0.pts) } } @@ -347,6 +352,7 @@ impl BufferRef { self.0.pts = pts.into_glib(); } + #[doc(alias = "get_dts")] pub fn dts(&self) -> ClockTime { unsafe { from_glib(self.0.dts) } } @@ -355,6 +361,7 @@ impl BufferRef { self.0.dts = dts.into_glib(); } + #[doc(alias = "get_dts_or_pts")] pub fn dts_or_pts(&self) -> ClockTime { let val = self.dts(); if val.is_none() { @@ -364,6 +371,7 @@ impl BufferRef { } } + #[doc(alias = "get_duration")] pub fn duration(&self) -> ClockTime { unsafe { from_glib(self.0.duration) } } @@ -372,6 +380,7 @@ impl BufferRef { self.0.duration = duration.into_glib(); } + #[doc(alias = "get_flags")] pub fn flags(&self) -> BufferFlags { BufferFlags::from_bits_truncate(self.0.mini_object.flags) } @@ -384,6 +393,7 @@ impl BufferRef { self.0.mini_object.flags &= !flags.bits(); } + #[doc(alias = "get_meta")] pub fn meta(&self) -> Option> { unsafe { let meta = ffi::gst_buffer_get_meta(self.as_mut_ptr(), T::meta_api().into_glib()); @@ -395,6 +405,7 @@ impl BufferRef { } } + #[doc(alias = "get_meta_mut")] pub fn meta_mut(&mut self) -> Option> { unsafe { let meta = ffi::gst_buffer_get_meta(self.as_mut_ptr(), T::meta_api().into_glib()); @@ -500,6 +511,7 @@ impl BufferRef { } } + #[doc(alias = "get_all_memory")] pub fn all_memory(&self) -> Option { unsafe { let res = ffi::gst_buffer_get_all_memory(self.as_mut_ptr()); @@ -511,10 +523,12 @@ impl BufferRef { } } + #[doc(alias = "get_max_memory")] pub fn max_memory() -> u32 { unsafe { ffi::gst_buffer_get_max_memory() } } + #[doc(alias = "get_memory")] pub fn memory(&self, idx: u32) -> Option { if idx >= self.n_memory() { None @@ -530,6 +544,7 @@ impl BufferRef { } } + #[doc(alias = "get_memory_range")] pub fn memory_range(&self, idx: u32, length: Option) -> Option { assert!(idx + length.unwrap_or(0) < self.n_memory()); unsafe { @@ -934,10 +949,12 @@ impl PartialEq for BufferRef { impl Eq for BufferRef {} impl<'a, T> BufferMap<'a, T> { + #[doc(alias = "get_size")] pub fn size(&self) -> usize { self.map_info.size } + #[doc(alias = "get_buffer")] pub fn buffer(&self) -> &BufferRef { self.buffer } @@ -1009,10 +1026,12 @@ impl MappedBuffer { unsafe { slice::from_raw_parts(self.map_info.data as *const u8, self.map_info.size) } } + #[doc(alias = "get_size")] pub fn size(&self) -> usize { self.map_info.size } + #[doc(alias = "get_buffer")] pub fn buffer(&self) -> &BufferRef { self.buffer.as_ref().unwrap().as_ref() } diff --git a/gstreamer/src/buffer_cursor.rs b/gstreamer/src/buffer_cursor.rs index 7320ed730..89265a4f3 100644 --- a/gstreamer/src/buffer_cursor.rs +++ b/gstreamer/src/buffer_cursor.rs @@ -264,6 +264,7 @@ impl BufferCursor { Ok(self.cur_offset) } + #[doc(alias = "get_buffer")] pub fn buffer(&self) -> &BufferRef { self.buffer.as_ref().unwrap().as_ref() } @@ -369,6 +370,7 @@ impl BufferRefCursor { } impl<'a> BufferRefCursor<&'a BufferRef> { + #[doc(alias = "get_buffer")] pub fn buffer(&self) -> &BufferRef { self.buffer } @@ -391,6 +393,7 @@ impl<'a> BufferRefCursor<&'a BufferRef> { } impl<'a> BufferRefCursor<&'a mut BufferRef> { + #[doc(alias = "get_buffer")] pub fn buffer(&self) -> &BufferRef { self.buffer } diff --git a/gstreamer/src/buffer_pool.rs b/gstreamer/src/buffer_pool.rs index f4a8627eb..c56a67da5 100644 --- a/gstreamer/src/buffer_pool.rs +++ b/gstreamer/src/buffer_pool.rs @@ -62,6 +62,7 @@ impl BufferPoolConfig { } } + #[doc(alias = "get_options")] pub fn options(&self) -> Vec { unsafe { let n = ffi::gst_buffer_pool_config_n_options(self.0.to_glib_none().0) as usize; @@ -96,6 +97,7 @@ impl BufferPoolConfig { } } + #[doc(alias = "get_params")] pub fn params(&self) -> Option<(Option, u32, u32, u32)> { unsafe { let mut caps = ptr::null_mut(); @@ -144,6 +146,7 @@ impl BufferPoolConfig { } } + #[doc(alias = "get_allocator")] pub fn allocator(&self) -> Option<(Option, AllocationParams)> { unsafe { let mut allocator = ptr::null_mut(); @@ -281,6 +284,7 @@ impl Default for BufferPool { } pub trait BufferPoolExtManual: 'static { + #[doc(alias = "get_config")] fn config(&self) -> BufferPoolConfig; fn set_config(&self, config: BufferPoolConfig) -> Result<(), glib::error::BoolError>; diff --git a/gstreamer/src/bufferlist.rs b/gstreamer/src/bufferlist.rs index 04ddd2054..e16018b42 100644 --- a/gstreamer/src/bufferlist.rs +++ b/gstreamer/src/bufferlist.rs @@ -63,6 +63,7 @@ impl BufferListRef { #[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[doc(alias = "gst_buffer_list_get_writable")] + #[doc(alias = "get_writable")] pub fn get_mut(&mut self, idx: u32) -> Option<&mut BufferRef> { unsafe { let ptr = ffi::gst_buffer_list_get_writable(self.as_mut_ptr(), idx); diff --git a/gstreamer/src/bus_unix.rs b/gstreamer/src/bus_unix.rs index e03e43eee..dfb449830 100644 --- a/gstreamer/src/bus_unix.rs +++ b/gstreamer/src/bus_unix.rs @@ -19,6 +19,7 @@ cfg_if::cfg_if! { use super::Bus; pub trait UnixBusExtManual: 'static { + #[doc(alias = "get_pollfd")] fn pollfd(&self) -> unix::io::RawFd; } diff --git a/gstreamer/src/bus_windows.rs b/gstreamer/src/bus_windows.rs index f30b50fbd..0a94d415e 100644 --- a/gstreamer/src/bus_windows.rs +++ b/gstreamer/src/bus_windows.rs @@ -19,6 +19,7 @@ cfg_if::cfg_if! { use super::Bus; pub trait WindowsBusExtManual: 'static { + #[doc(alias = "get_pollfd")] fn pollfd(&self) -> windows::io::RawHandle; } diff --git a/gstreamer/src/caps.rs b/gstreamer/src/caps.rs index 75f4c2c42..6e3ff22b8 100644 --- a/gstreamer/src/caps.rs +++ b/gstreamer/src/caps.rs @@ -179,6 +179,7 @@ impl CapsRef { } } + #[doc(alias = "get_structure")] pub fn structure(&self, idx: u32) -> Option<&StructureRef> { if idx >= self.size() { return None; @@ -194,6 +195,7 @@ impl CapsRef { } } + #[doc(alias = "get_mut_structure")] pub fn structure_mut(&mut self, idx: u32) -> Option<&mut StructureRef> { if idx >= self.size() { return None; @@ -209,6 +211,7 @@ impl CapsRef { } } + #[doc(alias = "get_features")] pub fn features(&self, idx: u32) -> Option<&CapsFeaturesRef> { if idx >= self.size() { return None; @@ -220,6 +223,7 @@ impl CapsRef { } } + #[doc(alias = "get_mut_features")] pub fn features_mut(&mut self, idx: u32) -> Option<&mut CapsFeaturesRef> { if idx >= self.size() { return None; @@ -254,6 +258,7 @@ impl CapsRef { } } + #[doc(alias = "get_size")] pub fn size(&self) -> u32 { unsafe { ffi::gst_caps_get_size(self.as_ptr()) } } diff --git a/gstreamer/src/caps_features.rs b/gstreamer/src/caps_features.rs index 0571005a0..10f75c84a 100644 --- a/gstreamer/src/caps_features.rs +++ b/gstreamer/src/caps_features.rs @@ -326,10 +326,12 @@ impl CapsFeaturesRef { } } + #[doc(alias = "get_size")] pub fn size(&self) -> u32 { unsafe { ffi::gst_caps_features_get_size(self.as_ptr()) } } + #[doc(alias = "get_nth")] pub fn nth(&self, idx: u32) -> Option<&str> { if idx >= self.size() { return None; diff --git a/gstreamer/src/child_proxy.rs b/gstreamer/src/child_proxy.rs index 03af452de..d48d561f4 100644 --- a/gstreamer/src/child_proxy.rs +++ b/gstreamer/src/child_proxy.rs @@ -6,6 +6,7 @@ use glib::translate::*; use std::ptr; pub trait ChildProxyExtManual: 'static { + #[doc(alias = "get_child_property")] fn child_property(&self, name: &str) -> Option; fn set_child_property( &self, diff --git a/gstreamer/src/clock.rs b/gstreamer/src/clock.rs index 59a4c9c33..3cb65af80 100644 --- a/gstreamer/src/clock.rs +++ b/gstreamer/src/clock.rs @@ -33,6 +33,7 @@ glib::wrapper! { } impl ClockId { + #[doc(alias = "get_time")] pub fn time(&self) -> ClockTime { unsafe { from_glib(ffi::gst_clock_id_get_time(self.to_glib_none().0)) } } @@ -59,6 +60,7 @@ impl ClockId { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[doc(alias = "get_clock")] pub fn clock(&self) -> Option { unsafe { from_glib_full(ffi::gst_clock_id_get_clock(self.to_glib_none().0)) } } @@ -74,6 +76,7 @@ impl ClockId { } } + #[doc(alias = "get_type")] pub fn type_(&self) -> ClockEntryType { unsafe { let ptr: *mut ffi::GstClockEntry = self.to_glib_none().0 as *mut _; @@ -81,6 +84,7 @@ impl ClockId { } } + #[doc(alias = "get_status")] pub fn status(&self) -> &AtomicClockReturn { unsafe { let ptr: *mut ffi::GstClockEntry = self.to_glib_none().0 as *mut _; @@ -222,6 +226,7 @@ impl convert::TryFrom for PeriodicClockId { } impl PeriodicClockId { + #[doc(alias = "get_interval")] pub fn interval(&self) -> ClockTime { unsafe { let ptr: *mut ffi::GstClockEntry = self.to_glib_none().0 as *mut _; @@ -395,6 +400,7 @@ pub trait ClockExtManual: 'static { fn unset_clock_flags(&self, flags: ClockFlags); + #[doc(alias = "get_clock_flags")] fn clock_flags(&self) -> ClockFlags; } diff --git a/gstreamer/src/context.rs b/gstreamer/src/context.rs index 7dc9b61c4..158691b54 100644 --- a/gstreamer/src/context.rs +++ b/gstreamer/src/context.rs @@ -24,6 +24,7 @@ impl Context { } impl ContextRef { + #[doc(alias = "get_context_type")] pub fn context_type(&self) -> &str { unsafe { let raw = ffi::gst_context_get_context_type(self.as_mut_ptr()); @@ -44,10 +45,12 @@ impl ContextRef { unsafe { from_glib(ffi::gst_context_is_persistent(self.as_mut_ptr())) } } + #[doc(alias = "get_structure")] pub fn structure(&self) -> &StructureRef { unsafe { StructureRef::from_glib_borrow(ffi::gst_context_get_structure(self.as_mut_ptr())) } } + #[doc(alias = "get_mut_structure")] pub fn structure_mut(&mut self) -> &mut StructureRef { unsafe { StructureRef::from_glib_borrow_mut(ffi::gst_context_writable_structure( diff --git a/gstreamer/src/control_binding.rs b/gstreamer/src/control_binding.rs index 4804dc443..b83c678d5 100644 --- a/gstreamer/src/control_binding.rs +++ b/gstreamer/src/control_binding.rs @@ -6,6 +6,7 @@ use glib::prelude::*; use glib::translate::*; pub trait ControlBindingExtManual: 'static { + #[doc(alias = "get_g_value_array")] fn g_value_array( &self, timestamp: ClockTime, diff --git a/gstreamer/src/control_source.rs b/gstreamer/src/control_source.rs index 46e0354e1..5416a1837 100644 --- a/gstreamer/src/control_source.rs +++ b/gstreamer/src/control_source.rs @@ -6,6 +6,7 @@ use glib::prelude::*; use glib::translate::*; pub trait ControlSourceExtManual: 'static { + #[doc(alias = "get_value_array")] fn value_array( &self, timestamp: ClockTime, diff --git a/gstreamer/src/date_time.rs b/gstreamer/src/date_time.rs index cdc6a9f59..46b425b8e 100644 --- a/gstreamer/src/date_time.rs +++ b/gstreamer/src/date_time.rs @@ -223,6 +223,7 @@ impl DateTime { } } + #[doc(alias = "get_day")] pub fn day(&self) -> Option { if !self.has_day() { return None; @@ -231,6 +232,7 @@ impl DateTime { unsafe { Some(ffi::gst_date_time_get_day(self.to_glib_none().0)) } } + #[doc(alias = "get_hour")] pub fn hour(&self) -> Option { if !self.has_time() { return None; @@ -239,6 +241,7 @@ impl DateTime { unsafe { Some(ffi::gst_date_time_get_hour(self.to_glib_none().0)) } } + #[doc(alias = "get_microsecond")] pub fn microsecond(&self) -> Option { if !self.has_second() { return None; @@ -247,6 +250,7 @@ impl DateTime { unsafe { Some(ffi::gst_date_time_get_microsecond(self.to_glib_none().0)) } } + #[doc(alias = "get_minute")] pub fn minute(&self) -> Option { if !self.has_time() { return None; @@ -255,6 +259,7 @@ impl DateTime { unsafe { Some(ffi::gst_date_time_get_minute(self.to_glib_none().0)) } } + #[doc(alias = "get_month")] pub fn month(&self) -> Option { if !self.has_month() { return None; @@ -263,6 +268,7 @@ impl DateTime { unsafe { Some(ffi::gst_date_time_get_month(self.to_glib_none().0)) } } + #[doc(alias = "get_second")] pub fn second(&self) -> Option { if !self.has_second() { return None; @@ -271,6 +277,7 @@ impl DateTime { unsafe { Some(ffi::gst_date_time_get_second(self.to_glib_none().0)) } } + #[doc(alias = "get_time_zone_offset")] pub fn time_zone_offset(&self) -> Option { if !self.has_time() { return None; @@ -352,6 +359,7 @@ impl cmp::PartialOrd for DateTime { fn partial_cmp(&self, other: &Self) -> Option { #[inline] #[allow(clippy::unnecessary_wraps)] + #[doc(alias = "get_cmp")] fn cmp(delta: i32) -> Option { skip_assert_initialized!(); Some(delta.cmp(&0)) diff --git a/gstreamer/src/device_provider.rs b/gstreamer/src/device_provider.rs index 30665e1e9..e64220009 100644 --- a/gstreamer/src/device_provider.rs +++ b/gstreamer/src/device_provider.rs @@ -32,6 +32,7 @@ impl DeviceProvider { } pub trait DeviceProviderExtManual: 'static { + #[doc(alias = "get_metadata")] fn metadata<'a>(&self, key: &str) -> Option<&'a str>; } diff --git a/gstreamer/src/element.rs b/gstreamer/src/element.rs index a345cdb90..16b058640 100644 --- a/gstreamer/src/element.rs +++ b/gstreamer/src/element.rs @@ -113,6 +113,7 @@ impl FromGlib for NotifyWatchId { } pub trait ElementExtManual: 'static { + #[doc(alias = "get_element_class")] fn element_class(&self) -> &glib::Class; fn change_state(&self, transition: StateChange) @@ -122,16 +123,19 @@ pub trait ElementExtManual: 'static { ret: StateChangeReturn, ) -> Result; + #[doc(alias = "get_state")] fn state( &self, timeout: ClockTime, ) -> (Result, State, State); fn set_state(&self, state: State) -> Result; + #[doc(alias = "get_current_state")] fn current_state(&self) -> State { self.state(ClockTime::from(0)).1 } + #[doc(alias = "get_pending_state")] fn pending_state(&self) -> State { self.state(ClockTime::from(0)).2 } @@ -140,9 +144,12 @@ pub trait ElementExtManual: 'static { fn send_event(&self, event: Event) -> bool; + #[doc(alias = "get_metadata")] fn metadata<'a>(&self, key: &str) -> Option<&'a str>; + #[doc(alias = "get_pad_template")] fn pad_template(&self, name: &str) -> Option; + #[doc(alias = "get_pad_template_list")] fn pad_template_list(&self) -> Vec; #[allow(clippy::too_many_arguments)] @@ -161,6 +168,7 @@ pub trait ElementExtManual: 'static { fn unset_element_flags(&self, flags: ElementFlags); + #[doc(alias = "get_element_flags")] fn element_flags(&self) -> ElementFlags; #[cfg(any(feature = "v1_10", feature = "dox"))] @@ -185,8 +193,11 @@ pub trait ElementExtManual: 'static { fn iterate_sink_pads(&self) -> crate::Iterator; fn iterate_src_pads(&self) -> crate::Iterator; + #[doc(alias = "get_pads")] fn pads(&self) -> Vec; + #[doc(alias = "get_sink_pads")] fn sink_pads(&self) -> Vec; + #[doc(alias = "get_src_pads")] fn src_pads(&self) -> Vec; fn num_pads(&self) -> u16; @@ -257,7 +268,9 @@ pub trait ElementExtManual: 'static { F: FnOnce(&Self) -> T + Send + 'static, T: Send + 'static; + #[doc(alias = "get_current_running_time")] fn current_running_time(&self) -> crate::ClockTime; + #[doc(alias = "get_current_clock_time")] fn current_clock_time(&self) -> crate::ClockTime; } @@ -830,6 +843,7 @@ impl> ElementExtManual for O { } pub unsafe trait ElementClassExt { + #[doc(alias = "get_metadata")] fn metadata<'a>(&self, key: &str) -> Option<&'a str> { unsafe { let klass = self as *const _ as *const ffi::GstElementClass; @@ -844,6 +858,7 @@ pub unsafe trait ElementClassExt { } } + #[doc(alias = "get_pad_template")] fn pad_template(&self, name: &str) -> Option { unsafe { let klass = self as *const _ as *const ffi::GstElementClass; @@ -855,6 +870,7 @@ pub unsafe trait ElementClassExt { } } + #[doc(alias = "get_pad_template_list")] fn pad_template_list(&self) -> Vec { unsafe { let klass = self as *const _ as *const ffi::GstElementClass; diff --git a/gstreamer/src/enums.rs b/gstreamer/src/enums.rs index 982b765b6..745f70c1c 100644 --- a/gstreamer/src/enums.rs +++ b/gstreamer/src/enums.rs @@ -687,6 +687,7 @@ impl StateChange { } } + #[doc(alias = "get_name")] pub fn name<'a>(self) -> &'a str { cfg_if::cfg_if! { if #[cfg(feature = "v1_14")] { diff --git a/gstreamer/src/event.rs b/gstreamer/src/event.rs index a249ea07d..25bea4c91 100644 --- a/gstreamer/src/event.rs +++ b/gstreamer/src/event.rs @@ -134,6 +134,7 @@ mini_object_wrapper!(Event, EventRef, ffi::GstEvent, || { }); impl EventRef { + #[doc(alias = "get_seqnum")] pub fn seqnum(&self) -> Seqnum { unsafe { let seqnum = ffi::gst_event_get_seqnum(self.as_mut_ptr()); @@ -142,6 +143,7 @@ impl EventRef { } } + #[doc(alias = "get_running_time_offset")] pub fn running_time_offset(&self) -> i64 { unsafe { ffi::gst_event_get_running_time_offset(self.as_mut_ptr()) } } @@ -150,6 +152,7 @@ impl EventRef { unsafe { ffi::gst_event_set_running_time_offset(self.as_mut_ptr(), offset) } } + #[doc(alias = "get_structure")] pub fn structure(&self) -> Option<&StructureRef> { unsafe { let structure = ffi::gst_event_get_structure(self.as_mut_ptr()); @@ -187,6 +190,7 @@ impl EventRef { self.type_().is_sticky_multi() } + #[doc(alias = "get_type")] pub fn type_(&self) -> EventType { unsafe { from_glib((*self.as_ptr()).type_) } } @@ -327,6 +331,7 @@ impl<'a> FlushStop<'a> { FlushStopBuilder::new(reset_time) } + #[doc(alias = "get_reset_time")] pub fn resets_time(&self) -> bool { unsafe { let mut reset_time = mem::MaybeUninit::uninit(); @@ -351,6 +356,7 @@ impl<'a> StreamStart<'a> { StreamStartBuilder::new(stream_id) } + #[doc(alias = "get_stream_id")] pub fn stream_id(&self) -> &'a str { unsafe { let mut stream_id = ptr::null(); @@ -360,6 +366,7 @@ impl<'a> StreamStart<'a> { } } + #[doc(alias = "get_stream_flags")] pub fn stream_flags(&self) -> crate::StreamFlags { unsafe { let mut stream_flags = mem::MaybeUninit::uninit(); @@ -370,6 +377,7 @@ impl<'a> StreamStart<'a> { } } + #[doc(alias = "get_group_id")] pub fn group_id(&self) -> Option { unsafe { let mut group_id = mem::MaybeUninit::uninit(); @@ -387,6 +395,7 @@ impl<'a> StreamStart<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] + #[doc(alias = "get_stream")] pub fn stream(&self) -> Option { unsafe { let mut stream = ptr::null_mut(); @@ -409,6 +418,7 @@ impl<'a> Caps<'a> { CapsBuilder::new(caps) } + #[doc(alias = "get_caps")] pub fn caps(&self) -> &'a crate::CapsRef { unsafe { let mut caps = ptr::null_mut(); @@ -418,6 +428,7 @@ impl<'a> Caps<'a> { } } + #[doc(alias = "get_caps_owned")] pub fn caps_owned(&self) -> crate::Caps { unsafe { from_glib_none(self.caps().as_ptr()) } } @@ -438,6 +449,7 @@ impl<'a> Segment<'a> { SegmentBuilder::new(segment.as_ref()) } + #[doc(alias = "get_segment")] pub fn segment(&self) -> &'a crate::Segment { unsafe { let mut segment = ptr::null(); @@ -467,6 +479,7 @@ impl<'a> StreamCollection<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] + #[doc(alias = "get_stream_collection")] pub fn stream_collection(&self) -> crate::StreamCollection { unsafe { let mut stream_collection = ptr::null_mut(); @@ -490,6 +503,7 @@ impl<'a> Tag<'a> { TagBuilder::new(tags) } + #[doc(alias = "get_tag")] pub fn tag(&self) -> &'a crate::TagListRef { unsafe { let mut tags = ptr::null_mut(); @@ -499,6 +513,7 @@ impl<'a> Tag<'a> { } } + #[doc(alias = "get_tag_owned")] pub fn tag_owned(&self) -> crate::TagList { unsafe { from_glib_none(self.tag().as_ptr()) } } @@ -561,6 +576,7 @@ impl<'a> SinkMessage<'a> { SinkMessageBuilder::new(name, msg) } + #[doc(alias = "get_message")] pub fn message(&self) -> crate::Message { unsafe { let mut msg = ptr::null_mut(); @@ -590,6 +606,7 @@ impl<'a> StreamGroupDone<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] + #[doc(alias = "get_group_id")] pub fn group_id(&self) -> GroupId { unsafe { let mut group_id = mem::MaybeUninit::uninit(); @@ -632,6 +649,7 @@ impl<'a> Toc<'a> { TocBuilder::new(toc, updated) } + #[doc(alias = "get_toc")] pub fn toc(&self) -> (&'a crate::TocRef, bool) { unsafe { let mut toc = ptr::null_mut(); @@ -645,6 +663,7 @@ impl<'a> Toc<'a> { } } + #[doc(alias = "get_toc_owned")] pub fn toc_owned(&self) -> (crate::Toc, bool) { unsafe { let (toc, updated) = self.toc(); @@ -883,6 +902,7 @@ impl<'a> Seek<'a> { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[doc(alias = "get_trickmode_interval")] pub fn trickmode_interval(&self) -> crate::ClockTime { unsafe { let mut trickmode_interval = mem::MaybeUninit::uninit(); @@ -924,6 +944,7 @@ impl<'a> Latency<'a> { LatencyBuilder::new(latency) } + #[doc(alias = "get_latency")] pub fn latency(&self) -> crate::ClockTime { unsafe { let mut latency = mem::MaybeUninit::uninit(); @@ -1015,6 +1036,7 @@ impl<'a> TocSelect<'a> { TocSelectBuilder::new(uid) } + #[doc(alias = "get_uid")] pub fn uid(&self) -> &'a str { unsafe { let mut uid = ptr::null_mut(); @@ -1045,6 +1067,7 @@ impl<'a> SelectStreams<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] + #[doc(alias = "get_streams")] pub fn streams(&self) -> Vec { unsafe { let mut streams = ptr::null_mut(); diff --git a/gstreamer/src/format.rs b/gstreamer/src/format.rs index b122bc73c..5e6b1d10b 100644 --- a/gstreamer/src/format.rs +++ b/gstreamer/src/format.rs @@ -47,7 +47,9 @@ impl_common_ops_for_opt_int!(Percent); pub struct TryFromGenericFormattedValueError(()); pub trait FormattedValue: Copy + Clone + Sized + Into + 'static { + #[doc(alias = "get_default_format")] fn default_format() -> Format; + #[doc(alias = "get_format")] fn format(&self) -> Format; unsafe fn from_raw(format: Format, value: i64) -> Self; @@ -104,6 +106,7 @@ impl GenericFormattedValue { } } + #[doc(alias = "get_format")] pub fn format(&self) -> Format { match *self { Self::Undefined(_) => Format::Undefined, @@ -116,6 +119,7 @@ impl GenericFormattedValue { } } + #[doc(alias = "get_value")] pub fn value(&self) -> i64 { match *self { Self::Undefined(v) => v.0, diff --git a/gstreamer/src/log.rs b/gstreamer/src/log.rs index 7d32fdba7..eb04a9b0c 100644 --- a/gstreamer/src/log.rs +++ b/gstreamer/src/log.rs @@ -84,6 +84,7 @@ impl DebugCategory { } } + #[doc(alias = "get_threshold")] pub fn threshold(self) -> crate::DebugLevel { match self.0 { Some(cat) => unsafe { from_glib(ffi::gst_debug_category_get_threshold(cat.as_ptr())) }, @@ -103,6 +104,7 @@ impl DebugCategory { } } + #[doc(alias = "get_color")] pub fn color(self) -> crate::DebugColorFlags { match self.0 { Some(cat) => unsafe { from_glib(ffi::gst_debug_category_get_color(cat.as_ptr())) }, @@ -110,6 +112,7 @@ impl DebugCategory { } } + #[doc(alias = "get_name")] pub fn name<'a>(self) -> &'a str { match self.0 { Some(cat) => unsafe { @@ -121,6 +124,7 @@ impl DebugCategory { } } + #[doc(alias = "get_description")] pub fn description<'a>(self) -> Option<&'a str> { match self.0 { Some(cat) => unsafe { @@ -493,6 +497,7 @@ mod tests { use std::sync::{Arc, Mutex}; #[test] + #[doc(alias = "get_existing")] fn existing() { crate::init().unwrap(); diff --git a/gstreamer/src/memory.rs b/gstreamer/src/memory.rs index c81db4cff..d61ca6fbb 100644 --- a/gstreamer/src/memory.rs +++ b/gstreamer/src/memory.rs @@ -166,10 +166,12 @@ impl Memory { } impl MemoryRef { + #[doc(alias = "get_allocator")] pub fn allocator(&self) -> Option { unsafe { from_glib_none(self.0.allocator) } } + #[doc(alias = "get_parent")] pub fn parent(&self) -> Option<&MemoryRef> { unsafe { if self.0.parent.is_null() { @@ -180,22 +182,27 @@ impl MemoryRef { } } + #[doc(alias = "get_maxsize")] pub fn maxsize(&self) -> usize { self.0.maxsize } + #[doc(alias = "get_align")] pub fn align(&self) -> usize { self.0.align } + #[doc(alias = "get_offset")] pub fn offset(&self) -> usize { self.0.offset } + #[doc(alias = "get_size")] pub fn size(&self) -> usize { self.0.size } + #[doc(alias = "get_flags")] pub fn flags(&self) -> MemoryFlags { unsafe { from_glib(self.0.mini_object.flags) } } @@ -309,10 +316,12 @@ impl MemoryRef { } impl<'a, T> MemoryMap<'a, T> { + #[doc(alias = "get_size")] pub fn size(&self) -> usize { self.map_info.size } + #[doc(alias = "get_memory")] pub fn memory(&self) -> &MemoryRef { self.memory } @@ -384,10 +393,12 @@ impl MappedMemory { unsafe { slice::from_raw_parts(self.map_info.data as *const u8, self.map_info.size) } } + #[doc(alias = "get_size")] pub fn size(&self) -> usize { self.map_info.size } + #[doc(alias = "get_memory")] pub fn memory(&self) -> &MemoryRef { self.memory.as_ref().unwrap().as_ref() } diff --git a/gstreamer/src/message.rs b/gstreamer/src/message.rs index b709bd565..b4e0e9b3f 100644 --- a/gstreamer/src/message.rs +++ b/gstreamer/src/message.rs @@ -25,10 +25,12 @@ mini_object_wrapper!(Message, MessageRef, ffi::GstMessage, || { }); impl MessageRef { + #[doc(alias = "get_src")] pub fn src(&self) -> Option { unsafe { from_glib_none((*self.as_ptr()).src) } } + #[doc(alias = "get_seqnum")] pub fn seqnum(&self) -> Seqnum { unsafe { let seqnum = ffi::gst_message_get_seqnum(self.as_mut_ptr()); @@ -52,6 +54,7 @@ impl MessageRef { } } + #[doc(alias = "get_structure")] pub fn structure(&self) -> Option<&StructureRef> { unsafe { let structure = ffi::gst_message_get_structure(self.as_mut_ptr()); @@ -116,6 +119,7 @@ impl MessageRef { } } + #[doc(alias = "get_type")] pub fn type_(&self) -> MessageType { unsafe { from_glib((*self.as_ptr()).type_) } } @@ -247,6 +251,7 @@ impl<'a> Error<'a> { ErrorBuilder::new(error, message) } + #[doc(alias = "get_error")] pub fn error(&self) -> glib::Error { unsafe { let mut error = ptr::null_mut(); @@ -257,6 +262,7 @@ impl<'a> Error<'a> { } } + #[doc(alias = "get_debug")] pub fn debug(&self) -> Option { unsafe { let mut debug = ptr::null_mut(); @@ -269,6 +275,7 @@ impl<'a> Error<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] + #[doc(alias = "get_details")] pub fn details(&self) -> Option<&StructureRef> { unsafe { let mut details = ptr::null(); @@ -297,6 +304,7 @@ impl<'a> Warning<'a> { WarningBuilder::new(error, message) } + #[doc(alias = "get_error")] pub fn error(&self) -> glib::Error { unsafe { let mut error = ptr::null_mut(); @@ -307,6 +315,7 @@ impl<'a> Warning<'a> { } } + #[doc(alias = "get_debug")] pub fn debug(&self) -> Option { unsafe { let mut debug = ptr::null_mut(); @@ -319,6 +328,7 @@ impl<'a> Warning<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] + #[doc(alias = "get_details")] pub fn details(&self) -> Option<&StructureRef> { unsafe { let mut details = ptr::null(); @@ -347,6 +357,7 @@ impl<'a> Info<'a> { InfoBuilder::new(error, message) } + #[doc(alias = "get_error")] pub fn error(&self) -> glib::Error { unsafe { let mut error = ptr::null_mut(); @@ -357,6 +368,7 @@ impl<'a> Info<'a> { } } + #[doc(alias = "get_debug")] pub fn debug(&self) -> Option { unsafe { let mut debug = ptr::null_mut(); @@ -369,6 +381,7 @@ impl<'a> Info<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] + #[doc(alias = "get_details")] pub fn details(&self) -> Option<&StructureRef> { unsafe { let mut details = ptr::null(); @@ -397,6 +410,7 @@ impl<'a> Tag<'a> { TagBuilder::new(tags) } + #[doc(alias = "get_tags")] pub fn tags(&self) -> TagList { unsafe { let mut tags = ptr::null_mut(); @@ -419,6 +433,7 @@ impl<'a> Buffering<'a> { BufferingBuilder::new(percent) } + #[doc(alias = "get_percent")] pub fn percent(&self) -> i32 { unsafe { let mut p = mem::MaybeUninit::uninit(); @@ -427,6 +442,7 @@ impl<'a> Buffering<'a> { } } + #[doc(alias = "get_buffering_stats")] pub fn buffering_stats(&self) -> (crate::BufferingMode, i32, i32, i64) { unsafe { let mut mode = mem::MaybeUninit::uninit(); @@ -469,6 +485,7 @@ impl<'a> StateChanged<'a> { StateChangedBuilder::new(old, new, pending) } + #[doc(alias = "get_old")] pub fn old(&self) -> crate::State { unsafe { let mut state = mem::MaybeUninit::uninit(); @@ -484,6 +501,7 @@ impl<'a> StateChanged<'a> { } } + #[doc(alias = "get_current")] pub fn current(&self) -> crate::State { unsafe { let mut state = mem::MaybeUninit::uninit(); @@ -499,6 +517,7 @@ impl<'a> StateChanged<'a> { } } + #[doc(alias = "get_pending")] pub fn pending(&self) -> crate::State { unsafe { let mut state = mem::MaybeUninit::uninit(); @@ -632,6 +651,7 @@ impl<'a> ClockProvide<'a> { ClockProvideBuilder::new(clock, ready) } + #[doc(alias = "get_clock")] pub fn clock(&self) -> Option { let mut clock = ptr::null_mut(); @@ -642,6 +662,7 @@ impl<'a> ClockProvide<'a> { } } + #[doc(alias = "get_ready")] pub fn is_ready(&self) -> bool { unsafe { let mut ready = mem::MaybeUninit::uninit(); @@ -670,6 +691,7 @@ impl<'a> ClockLost<'a> { ClockLostBuilder::new(clock) } + #[doc(alias = "get_clock")] pub fn clock(&self) -> Option { let mut clock = ptr::null_mut(); @@ -694,6 +716,7 @@ impl<'a> NewClock<'a> { NewClockBuilder::new(clock) } + #[doc(alias = "get_clock")] pub fn clock(&self) -> Option { let mut clock = ptr::null_mut(); @@ -768,6 +791,7 @@ impl<'a> StreamStatus<'a> { } } + #[doc(alias = "get_stream_status_object")] pub fn stream_status_object(&self) -> Option { unsafe { let value = ffi::gst_message_get_stream_status_object(self.as_mut_ptr()); @@ -920,6 +944,7 @@ impl<'a> AsyncDone<'a> { AsyncDoneBuilder::new(running_time) } + #[doc(alias = "get_running_time")] pub fn running_time(&self) -> crate::ClockTime { unsafe { let mut running_time = mem::MaybeUninit::uninit(); @@ -944,6 +969,7 @@ impl<'a> RequestState<'a> { RequestStateBuilder::new(state) } + #[doc(alias = "get_requested_state")] pub fn requested_state(&self) -> crate::State { unsafe { let mut state = mem::MaybeUninit::uninit(); @@ -1073,6 +1099,7 @@ impl<'a> Qos<'a> { } } + #[doc(alias = "get_values")] pub fn values(&self) -> (i64, f64, i32) { unsafe { let mut jitter = mem::MaybeUninit::uninit(); @@ -1094,6 +1121,7 @@ impl<'a> Qos<'a> { } } + #[doc(alias = "get_stats")] pub fn stats(&self) -> (GenericFormattedValue, GenericFormattedValue) { unsafe { let mut format = mem::MaybeUninit::uninit(); @@ -1174,6 +1202,7 @@ impl<'a> Toc<'a> { TocBuilder::new(toc, updated) } + #[doc(alias = "get_toc")] pub fn toc(&self) -> (crate::Toc, bool) { unsafe { let mut toc = ptr::null_mut(); @@ -1197,6 +1226,7 @@ impl<'a> ResetTime<'a> { ResetTimeBuilder::new(running_time) } + #[doc(alias = "get_running_time")] pub fn running_time(&self) -> crate::ClockTime { unsafe { let mut running_time = mem::MaybeUninit::uninit(); @@ -1221,6 +1251,7 @@ impl<'a> StreamStart<'a> { StreamStartBuilder::new() } + #[doc(alias = "get_group_id")] pub fn group_id(&self) -> Option { unsafe { let mut group_id = mem::MaybeUninit::uninit(); @@ -1255,6 +1286,7 @@ impl<'a> NeedContext<'a> { NeedContextBuilder::new(context_type) } + #[doc(alias = "get_context_type")] pub fn context_type(&self) -> &str { unsafe { let mut context_type = ptr::null(); @@ -1279,6 +1311,7 @@ impl<'a> HaveContext<'a> { HaveContextBuilder::new(context) } + #[doc(alias = "get_context")] pub fn context(&self) -> crate::Context { unsafe { let mut context = ptr::null_mut(); @@ -1301,6 +1334,7 @@ impl<'a> DeviceAdded<'a> { DeviceAddedBuilder::new(device) } + #[doc(alias = "get_device")] pub fn device(&self) -> crate::Device { unsafe { let mut device = ptr::null_mut(); @@ -1325,6 +1359,7 @@ impl<'a> DeviceRemoved<'a> { DeviceRemovedBuilder::new(device) } + #[doc(alias = "get_device")] pub fn device(&self) -> crate::Device { unsafe { let mut device = ptr::null_mut(); @@ -1400,6 +1435,7 @@ impl<'a> StreamCollection<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] + #[doc(alias = "get_stream_collection")] pub fn stream_collection(&self) -> crate::StreamCollection { unsafe { let mut collection = ptr::null_mut(); @@ -1430,6 +1466,7 @@ impl<'a> StreamsSelected<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] + #[doc(alias = "get_stream_collection")] pub fn stream_collection(&self) -> crate::StreamCollection { unsafe { let mut collection = ptr::null_mut(); @@ -1442,6 +1479,7 @@ impl<'a> StreamsSelected<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] + #[doc(alias = "get_streams")] pub fn streams(&self) -> Vec { unsafe { let n = ffi::gst_message_streams_selected_get_size(self.as_mut_ptr()); @@ -1477,6 +1515,7 @@ impl<'a> Redirect<'a> { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] + #[doc(alias = "get_entries")] pub fn entries(&self) -> Vec<(&str, Option, Option<&StructureRef>)> { unsafe { let n = ffi::gst_message_get_num_redirect_entries(self.as_mut_ptr()); @@ -1534,6 +1573,7 @@ impl<'a> DeviceChanged<'a> { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[doc(alias = "get_device_changed")] pub fn device_changed(&self) -> (crate::Device, crate::Device) { unsafe { let mut device = ptr::null_mut(); diff --git a/gstreamer/src/meta.rs b/gstreamer/src/meta.rs index 5558ea63d..e39e72a0a 100644 --- a/gstreamer/src/meta.rs +++ b/gstreamer/src/meta.rs @@ -24,6 +24,7 @@ use glib::translate::{from_glib, from_glib_none, FromGlib, ToGlibPtr}; pub unsafe trait MetaAPI: Sync + Send + Sized { type GstType; + #[doc(alias = "get_meta_api")] fn meta_api() -> glib::Type; unsafe fn from_ptr(buffer: &BufferRef, ptr: *const Self::GstType) -> MetaRef { @@ -138,6 +139,7 @@ impl<'a, T: MetaAPI, U> AsRef> for MetaRefMut<'a, T, U> { } impl<'a, T: MetaAPI> MetaRef<'a, T> { + #[doc(alias = "get_api")] pub fn api(&self) -> glib::Type { unsafe { let meta = self.meta as *const _ as *const ffi::GstMeta; @@ -148,6 +150,7 @@ impl<'a, T: MetaAPI> MetaRef<'a, T> { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[doc(alias = "get_seqnum")] pub fn seqnum(&self) -> MetaSeqnum { unsafe { let meta = self.meta as *const _ as *const ffi::GstMeta; @@ -174,6 +177,7 @@ impl<'a> MetaRef<'a, Meta> { } impl<'a, T: MetaAPI, U> MetaRefMut<'a, T, U> { + #[doc(alias = "get_api")] pub fn api(&self) -> glib::Type { unsafe { let meta = self.meta as *const _ as *const ffi::GstMeta; @@ -184,6 +188,7 @@ impl<'a, T: MetaAPI, U> MetaRefMut<'a, T, U> { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[doc(alias = "get_seqnum")] pub fn seqnum(&self) -> u64 { unsafe { let meta = self.meta as *const _ as *const ffi::GstMeta; @@ -232,6 +237,7 @@ unsafe impl Send for Meta {} unsafe impl Sync for Meta {} impl Meta { + #[doc(alias = "get_api")] fn api(&self) -> glib::Type { unsafe { glib::Type::from_glib((*self.0.info).api) } } @@ -270,10 +276,12 @@ impl ParentBufferMeta { } } + #[doc(alias = "get_parent")] pub fn parent(&self) -> &BufferRef { unsafe { BufferRef::from_ptr(self.0.buffer) } } + #[doc(alias = "get_parent_owned")] pub fn parent_owned(&self) -> Buffer { unsafe { from_glib_none(self.0.buffer) } } @@ -311,10 +319,12 @@ impl ProtectionMeta { } } + #[doc(alias = "get_info")] pub fn info(&self) -> &crate::StructureRef { unsafe { crate::StructureRef::from_glib_borrow(self.0.info) } } + #[doc(alias = "get_info_mut")] pub fn info_mut(&mut self) -> &mut crate::StructureRef { unsafe { crate::StructureRef::from_glib_borrow_mut(self.0.info) } } @@ -370,18 +380,22 @@ impl ReferenceTimestampMeta { } } + #[doc(alias = "get_reference")] pub fn reference(&self) -> &CapsRef { unsafe { CapsRef::from_ptr(self.0.reference) } } + #[doc(alias = "get_parent_owned")] pub fn parent_owned(&self) -> Caps { unsafe { from_glib_none(self.0.reference) } } + #[doc(alias = "get_timestamp")] pub fn timestamp(&self) -> ClockTime { unsafe { from_glib(self.0.timestamp) } } + #[doc(alias = "get_duration")] pub fn duration(&self) -> ClockTime { unsafe { from_glib(self.0.duration) } } diff --git a/gstreamer/src/object.rs b/gstreamer/src/object.rs index 8310f1c95..bca269b44 100644 --- a/gstreamer/src/object.rs +++ b/gstreamer/src/object.rs @@ -18,8 +18,10 @@ pub trait GstObjectExtManual: 'static { fn unset_object_flags(&self, flags: ObjectFlags); + #[doc(alias = "get_object_flags")] fn object_flags(&self) -> ObjectFlags; + #[doc(alias = "get_g_value_array")] fn g_value_array( &self, property_name: &str, diff --git a/gstreamer/src/pad.rs b/gstreamer/src/pad.rs index c7e8914f0..5de30e438 100644 --- a/gstreamer/src/pad.rs +++ b/gstreamer/src/pad.rs @@ -113,7 +113,9 @@ pub trait PadExtManual: 'static { buffer: &mut crate::BufferRef, size: u32, ) -> Result<(), FlowError>; + #[doc(alias = "get_range")] fn range(&self, offset: u64, size: u32) -> Result; + #[doc(alias = "get_range_fill")] fn range_fill( &self, offset: u64, @@ -135,6 +137,7 @@ pub trait PadExtManual: 'static { fn push_event(&self, event: Event) -> bool; fn send_event(&self, event: Event) -> bool; + #[doc(alias = "get_last_flow_result")] fn last_flow_result(&self) -> Result; fn iterate_internal_links(&self) -> crate::Iterator; @@ -258,6 +261,7 @@ pub trait PadExtManual: 'static { fn query_position(&self) -> Option; fn query_position_generic(&self, format: Format) -> Option; + #[doc(alias = "get_mode")] fn mode(&self) -> crate::PadMode; fn sticky_events_foreach Result, Option>>( @@ -271,6 +275,7 @@ pub trait PadExtManual: 'static { fn unset_pad_flags(&self, flags: PadFlags); + #[doc(alias = "get_pad_flags")] fn pad_flags(&self) -> PadFlags; } diff --git a/gstreamer/src/parse_context.rs b/gstreamer/src/parse_context.rs index 2902e605f..575256652 100644 --- a/gstreamer/src/parse_context.rs +++ b/gstreamer/src/parse_context.rs @@ -29,6 +29,7 @@ impl ParseContext { unsafe { from_glib_full(ffi::gst_parse_context_new()) } } + #[doc(alias = "get_missing_elements")] pub fn missing_elements(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_parse_context_get_missing_elements( diff --git a/gstreamer/src/pipeline.rs b/gstreamer/src/pipeline.rs index fe15ae3ec..1de699fda 100644 --- a/gstreamer/src/pipeline.rs +++ b/gstreamer/src/pipeline.rs @@ -10,6 +10,7 @@ pub trait GstPipelineExtManual: 'static { fn unset_pipeline_flags(&self, flags: PipelineFlags); + #[doc(alias = "get_pipeline_flags")] fn pipeline_flags(&self) -> PipelineFlags; } diff --git a/gstreamer/src/plugin.rs b/gstreamer/src/plugin.rs index 4b19b2c07..8f30afaad 100644 --- a/gstreamer/src/plugin.rs +++ b/gstreamer/src/plugin.rs @@ -9,6 +9,7 @@ use glib::prelude::*; use glib::translate::*; impl Plugin { + #[doc(alias = "get_cache_data")] pub fn cache_data(&self) -> Option<&StructureRef> { unsafe { let cache_data = ffi::gst_plugin_get_cache_data(self.to_glib_none().0); @@ -28,8 +29,10 @@ impl Plugin { } pub trait GstPluginExtManual: 'static { + #[doc(alias = "get_plugin_flags")] fn plugin_flags(&self) -> PluginFlags; + #[doc(alias = "get_plugin_name")] fn plugin_name(&self) -> glib::GString; } diff --git a/gstreamer/src/plugin_feature.rs b/gstreamer/src/plugin_feature.rs index 4f2b93d22..afb7f408c 100644 --- a/gstreamer/src/plugin_feature.rs +++ b/gstreamer/src/plugin_feature.rs @@ -7,6 +7,7 @@ use glib::prelude::*; use glib::translate::{from_glib, FromGlibPtrFull, IntoGlib, ToGlibPtr}; pub trait PluginFeatureExtManual: Sized + 'static { + #[doc(alias = "get_rank")] fn rank(&self) -> Rank; fn set_rank(&self, rank: Rank); fn load(&self) -> Result; diff --git a/gstreamer/src/query.rs b/gstreamer/src/query.rs index 588f5b293..5373d4899 100644 --- a/gstreamer/src/query.rs +++ b/gstreamer/src/query.rs @@ -16,6 +16,7 @@ mini_object_wrapper!(Query, QueryRef, ffi::GstQuery, || { }); impl QueryRef { + #[doc(alias = "get_structure")] pub fn structure(&self) -> Option<&StructureRef> { unsafe { let structure = ffi::gst_query_get_structure(self.as_mut_ptr()); @@ -27,6 +28,7 @@ impl QueryRef { } } + #[doc(alias = "get_mut_structure")] pub fn structure_mut(&mut self) -> &mut StructureRef { unsafe { let structure = ffi::gst_query_writable_structure(self.as_mut_ptr()); @@ -223,6 +225,7 @@ impl Position { } impl Position { + #[doc(alias = "get_result")] pub fn result(&self) -> GenericFormattedValue { unsafe { let mut fmt = mem::MaybeUninit::uninit(); @@ -234,6 +237,7 @@ impl Position { } } + #[doc(alias = "get_format")] pub fn format(&self) -> crate::Format { unsafe { let mut fmt = mem::MaybeUninit::uninit(); @@ -264,6 +268,7 @@ impl Duration { } impl Duration { + #[doc(alias = "get_result")] pub fn result(&self) -> GenericFormattedValue { unsafe { let mut fmt = mem::MaybeUninit::uninit(); @@ -275,6 +280,7 @@ impl Duration { } } + #[doc(alias = "get_format")] pub fn format(&self) -> crate::Format { unsafe { let mut fmt = mem::MaybeUninit::uninit(); @@ -311,6 +317,7 @@ impl Default for Latency { } impl Latency { + #[doc(alias = "get_result")] pub fn result(&self) -> (bool, crate::ClockTime, crate::ClockTime) { unsafe { let mut live = mem::MaybeUninit::uninit(); @@ -355,6 +362,7 @@ impl Seeking { } impl Seeking { + #[doc(alias = "get_result")] pub fn result(&self) -> (bool, GenericFormattedValue, GenericFormattedValue) { unsafe { let mut fmt = mem::MaybeUninit::uninit(); @@ -377,6 +385,7 @@ impl Seeking { } } + #[doc(alias = "get_format")] pub fn format(&self) -> crate::Format { unsafe { let mut fmt = mem::MaybeUninit::uninit(); @@ -422,6 +431,7 @@ impl Segment { } impl Segment { + #[doc(alias = "get_result")] pub fn result(&self) -> (f64, GenericFormattedValue, GenericFormattedValue) { unsafe { let mut rate = mem::MaybeUninit::uninit(); @@ -444,6 +454,7 @@ impl Segment { } } + #[doc(alias = "get_format")] pub fn format(&self) -> crate::Format { unsafe { let mut fmt = mem::MaybeUninit::uninit(); @@ -495,6 +506,7 @@ impl Convert { } impl Convert { + #[doc(alias = "get_result")] pub fn result(&self) -> (GenericFormattedValue, GenericFormattedValue) { unsafe { let mut src_fmt = mem::MaybeUninit::uninit(); @@ -569,6 +581,7 @@ impl Default for Formats { } impl Formats { + #[doc(alias = "get_result")] pub fn result(&self) -> Vec { unsafe { let mut n = mem::MaybeUninit::uninit(); @@ -609,6 +622,7 @@ impl Buffering { } impl Buffering { + #[doc(alias = "get_format")] pub fn format(&self) -> crate::Format { unsafe { let mut fmt = mem::MaybeUninit::uninit(); @@ -625,6 +639,7 @@ impl Buffering { } } + #[doc(alias = "get_percent")] pub fn percent(&self) -> (bool, i32) { unsafe { let mut busy = mem::MaybeUninit::uninit(); @@ -640,6 +655,7 @@ impl Buffering { } } + #[doc(alias = "get_range")] pub fn range(&self) -> (GenericFormattedValue, GenericFormattedValue, i64) { unsafe { let mut fmt = mem::MaybeUninit::uninit(); @@ -662,6 +678,7 @@ impl Buffering { } } + #[doc(alias = "get_stats")] pub fn stats(&self) -> (crate::BufferingMode, i32, i32, i64) { unsafe { let mut mode = mem::MaybeUninit::uninit(); @@ -686,6 +703,7 @@ impl Buffering { } } + #[doc(alias = "get_ranges")] pub fn ranges(&self) -> Vec<(GenericFormattedValue, GenericFormattedValue)> { unsafe { let mut fmt = mem::MaybeUninit::uninit(); @@ -821,6 +839,7 @@ impl Default for Uri { } impl Uri { + #[doc(alias = "get_uri")] pub fn uri(&self) -> Option { unsafe { let mut uri = ptr::null_mut(); @@ -829,6 +848,7 @@ impl Uri { } } + #[doc(alias = "get_redirection")] pub fn redirection(&self) -> (Option, bool) { unsafe { let mut uri = ptr::null_mut(); @@ -895,6 +915,7 @@ impl Allocation { } } + #[doc(alias = "get_allocation_pools")] pub fn allocation_pools(&self) -> Vec<(Option, u32, u32, u32)> { unsafe { let n = ffi::gst_query_get_n_allocation_pools(self.0.as_ptr()); @@ -925,6 +946,7 @@ impl Allocation { } } + #[doc(alias = "get_allocation_metas")] pub fn allocation_metas(&self) -> Vec<(glib::Type, Option<&crate::StructureRef>)> { unsafe { let n = ffi::gst_query_get_n_allocation_metas(self.0.as_ptr()); @@ -1073,6 +1095,7 @@ impl Scheduling { } } + #[doc(alias = "get_scheduling_modes")] pub fn scheduling_modes(&self) -> Vec { unsafe { let n = ffi::gst_query_get_n_scheduling_modes(self.0.as_ptr()); @@ -1088,6 +1111,7 @@ impl Scheduling { } } + #[doc(alias = "get_result")] pub fn result(&self) -> (crate::SchedulingFlags, i32, i32, i32) { unsafe { let mut flags = mem::MaybeUninit::uninit(); @@ -1148,6 +1172,7 @@ impl AcceptCaps { } impl AcceptCaps { + #[doc(alias = "get_caps")] pub fn caps(&self) -> &crate::CapsRef { unsafe { let mut caps = ptr::null_mut(); @@ -1156,10 +1181,12 @@ impl AcceptCaps { } } + #[doc(alias = "get_caps_owned")] pub fn caps_owned(&self) -> crate::Caps { unsafe { from_glib_none(self.caps().as_ptr()) } } + #[doc(alias = "get_result")] pub fn result(&self) -> bool { unsafe { let mut accepted = mem::MaybeUninit::uninit(); @@ -1190,6 +1217,7 @@ impl Caps { } impl Caps { + #[doc(alias = "get_filter")] pub fn filter(&self) -> Option<&crate::CapsRef> { unsafe { let mut caps = ptr::null_mut(); @@ -1202,10 +1230,12 @@ impl Caps { } } + #[doc(alias = "get_filter_owned")] pub fn filter_owned(&self) -> Option { unsafe { self.filter().map(|caps| from_glib_none(caps.as_ptr())) } } + #[doc(alias = "get_result")] pub fn result(&self) -> Option<&crate::CapsRef> { unsafe { let mut caps = ptr::null_mut(); @@ -1218,6 +1248,7 @@ impl Caps { } } + #[doc(alias = "get_result_owned")] pub fn result_owned(&self) -> Option { unsafe { self.result().map(|caps| from_glib_none(caps.as_ptr())) } } @@ -1258,6 +1289,7 @@ impl Context { } impl Context { + #[doc(alias = "get_context")] pub fn context(&self) -> Option<&crate::ContextRef> { unsafe { let mut context = ptr::null_mut(); @@ -1270,6 +1302,7 @@ impl Context { } } + #[doc(alias = "get_context_owned")] pub fn context_owned(&self) -> Option { unsafe { self.context() @@ -1277,6 +1310,7 @@ impl Context { } } + #[doc(alias = "get_context_type")] pub fn context_type(&self) -> &str { unsafe { let mut context_type = ptr::null(); @@ -1316,6 +1350,7 @@ impl Default for Bitrate { impl Bitrate { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + #[doc(alias = "get_bitrate")] pub fn bitrate(&self) -> u32 { unsafe { let mut bitrate = mem::MaybeUninit::uninit(); diff --git a/gstreamer/src/sample.rs b/gstreamer/src/sample.rs index 7de1f848c..202c15387 100644 --- a/gstreamer/src/sample.rs +++ b/gstreamer/src/sample.rs @@ -106,6 +106,7 @@ impl Sample { } impl SampleRef { + #[doc(alias = "get_buffer")] pub fn buffer(&self) -> Option<&BufferRef> { unsafe { let ptr = ffi::gst_sample_get_buffer(self.as_mut_ptr()); @@ -117,10 +118,12 @@ impl SampleRef { } } + #[doc(alias = "get_buffer_owned")] pub fn buffer_owned(&self) -> Option { unsafe { self.buffer().map(|buffer| from_glib_none(buffer.as_ptr())) } } + #[doc(alias = "get_buffer_list")] pub fn buffer_list(&self) -> Option<&BufferListRef> { unsafe { let ptr = ffi::gst_sample_get_buffer_list(self.as_mut_ptr()); @@ -132,10 +135,12 @@ impl SampleRef { } } + #[doc(alias = "get_buffer_list_owned")] pub fn buffer_list_owned(&self) -> Option { unsafe { self.buffer_list().map(|list| from_glib_none(list.as_ptr())) } } + #[doc(alias = "get_caps")] pub fn caps(&self) -> Option<&CapsRef> { unsafe { let ptr = ffi::gst_sample_get_caps(self.as_mut_ptr()); @@ -147,14 +152,17 @@ impl SampleRef { } } + #[doc(alias = "get_caps_owned")] pub fn caps_owned(&self) -> Option { unsafe { self.caps().map(|caps| from_glib_none(caps.as_ptr())) } } + #[doc(alias = "get_segment")] pub fn segment(&self) -> Option { unsafe { from_glib_none(ffi::gst_sample_get_segment(self.as_mut_ptr())) } } + #[doc(alias = "get_info")] pub fn info(&self) -> Option<&StructureRef> { unsafe { let ptr = ffi::gst_sample_get_info(self.as_mut_ptr()); diff --git a/gstreamer/src/segment.rs b/gstreamer/src/segment.rs index 97b9af7fe..7edd6229c 100644 --- a/gstreamer/src/segment.rs +++ b/gstreamer/src/segment.rs @@ -352,6 +352,7 @@ impl FormattedSegment { } } + #[doc(alias = "get_flags")] pub fn flags(&self) -> crate::SegmentFlags { unsafe { from_glib(self.0.flags) } } @@ -360,6 +361,7 @@ impl FormattedSegment { self.0.flags = flags.into_glib(); } + #[doc(alias = "get_rate")] pub fn rate(&self) -> f64 { self.0.rate } @@ -370,6 +372,7 @@ impl FormattedSegment { self.0.rate = rate; } + #[doc(alias = "get_applied_rate")] pub fn applied_rate(&self) -> f64 { self.0.applied_rate } @@ -380,10 +383,12 @@ impl FormattedSegment { self.0.applied_rate = applied_rate; } + #[doc(alias = "get_format")] pub fn format(&self) -> Format { unsafe { from_glib(self.0.format) } } + #[doc(alias = "get_base")] pub fn base(&self) -> T { unsafe { T::from_raw(self.format(), self.0.base as i64) } } @@ -398,6 +403,7 @@ impl FormattedSegment { self.0.base = unsafe { base.to_raw_value() } as u64; } + #[doc(alias = "get_offset")] pub fn offset(&self) -> T { unsafe { T::from_raw(self.format(), self.0.offset as i64) } } @@ -412,6 +418,7 @@ impl FormattedSegment { self.0.offset = unsafe { offset.to_raw_value() } as u64; } + #[doc(alias = "get_start")] pub fn start(&self) -> T { unsafe { T::from_raw(self.format(), self.0.start as i64) } } @@ -426,6 +433,7 @@ impl FormattedSegment { self.0.start = unsafe { start.to_raw_value() } as u64; } + #[doc(alias = "get_stop")] pub fn stop(&self) -> T { unsafe { T::from_raw(self.format(), self.0.stop as i64) } } @@ -440,6 +448,7 @@ impl FormattedSegment { self.0.stop = unsafe { stop.to_raw_value() } as u64; } + #[doc(alias = "get_time")] pub fn time(&self) -> T { unsafe { T::from_raw(self.format(), self.0.time as i64) } } @@ -454,6 +463,7 @@ impl FormattedSegment { self.0.time = unsafe { time.to_raw_value() } as u64; } + #[doc(alias = "get_position")] pub fn position(&self) -> T { unsafe { T::from_raw(self.format(), self.0.position as i64) } } @@ -468,6 +478,7 @@ impl FormattedSegment { self.0.position = unsafe { position.to_raw_value() } as u64; } + #[doc(alias = "get_duration")] pub fn duration(&self) -> T { unsafe { T::from_raw(self.format(), self.0.duration as i64) } } diff --git a/gstreamer/src/static_pad_template.rs b/gstreamer/src/static_pad_template.rs index 316d27487..1ec8249c0 100644 --- a/gstreamer/src/static_pad_template.rs +++ b/gstreamer/src/static_pad_template.rs @@ -17,6 +17,7 @@ impl StaticPadTemplate { unsafe { from_glib_full(ffi::gst_static_pad_template_get(self.0.as_ptr())) } } + #[doc(alias = "get_caps")] pub fn caps(&self) -> Caps { unsafe { from_glib_full(ffi::gst_static_pad_template_get_caps(self.0.as_ptr())) } } diff --git a/gstreamer/src/structure.rs b/gstreamer/src/structure.rs index 51f1462b5..47b4c4cdf 100644 --- a/gstreamer/src/structure.rs +++ b/gstreamer/src/structure.rs @@ -394,6 +394,7 @@ impl StructureRef { self.get_optional_by_quark(name) } + #[doc(alias = "get_value")] pub fn value(&self, name: &str) -> Result<&SendValue, GetError> { let name = glib::Quark::from_string(name); self.value_by_quark(name) @@ -458,6 +459,7 @@ impl StructureRef { } } + #[doc(alias = "get_name")] pub fn name<'a>(&self) -> &'a str { unsafe { CStr::from_ptr(ffi::gst_structure_get_name(&self.0)) @@ -533,6 +535,7 @@ impl StructureRef { Iter::new(self) } + #[doc(alias = "get_nth_field_name")] pub fn nth_field_name<'a>(&self, idx: u32) -> Option<&'a str> { unsafe { let field_name = ffi::gst_structure_nth_field_name(&self.0, idx); diff --git a/gstreamer/src/tags.rs b/gstreamer/src/tags.rs index 2800a7b07..1a1403724 100644 --- a/gstreamer/src/tags.rs +++ b/gstreamer/src/tags.rs @@ -433,6 +433,7 @@ impl TagListRef { }) } + #[doc(alias = "get_generic")] pub fn generic(&self, tag_name: &str) -> Option { unsafe { let mut value: mem::MaybeUninit = mem::MaybeUninit::zeroed(); @@ -463,6 +464,7 @@ impl TagListRef { } } + #[doc(alias = "get_index")] pub fn index<'a, T: Tag<'a>>(&self, idx: u32) -> Option<&'a TagValue> { self.index_generic(T::tag_name(), idx).map(|value| { if !value.is::() { @@ -476,6 +478,7 @@ impl TagListRef { }) } + #[doc(alias = "get_index_generic")] pub fn index_generic<'a>(&'a self, tag_name: &str, idx: u32) -> Option<&'a SendValue> { unsafe { let value = @@ -489,10 +492,12 @@ impl TagListRef { } } + #[doc(alias = "get_size")] pub fn size<'a, T: Tag<'a>>(&self) -> u32 { self.size_by_name(T::tag_name()) } + #[doc(alias = "get_size_by_name")] pub fn size_by_name(&self, tag_name: &str) -> u32 { unsafe { ffi::gst_tag_list_get_tag_size(self.as_ptr(), tag_name.to_glib_none().0) } } @@ -527,6 +532,7 @@ impl TagListRef { } } + #[doc(alias = "get_scope")] pub fn scope(&self) -> TagScope { unsafe { from_glib(ffi::gst_tag_list_get_scope(self.as_ptr())) } } diff --git a/gstreamer/src/toc.rs b/gstreamer/src/toc.rs index 3f1f982ab..574f6db80 100644 --- a/gstreamer/src/toc.rs +++ b/gstreamer/src/toc.rs @@ -24,6 +24,7 @@ impl Toc { } impl TocRef { + #[doc(alias = "get_scope")] pub fn scope(&self) -> TocScope { unsafe { from_glib(ffi::gst_toc_get_scope(self.as_ptr())) } } @@ -32,6 +33,7 @@ impl TocRef { unsafe { from_glib_none(ffi::gst_toc_find_entry(self.as_ptr(), uid.to_glib_none().0)) } } + #[doc(alias = "get_entries")] pub fn entries(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::gst_toc_get_entries(self.as_ptr())) } } @@ -42,6 +44,7 @@ impl TocRef { } } + #[doc(alias = "get_tags")] pub fn tags(&self) -> Option { unsafe { from_glib_none(ffi::gst_toc_get_tags(self.as_ptr())) } } @@ -98,10 +101,12 @@ impl TocEntry { } impl TocEntryRef { + #[doc(alias = "get_entry_type")] pub fn entry_type(&self) -> TocEntryType { unsafe { from_glib(ffi::gst_toc_entry_get_entry_type(self.as_ptr())) } } + #[doc(alias = "get_uid")] pub fn uid(&self) -> &str { unsafe { CStr::from_ptr(ffi::gst_toc_entry_get_uid(self.as_ptr())) @@ -116,16 +121,19 @@ impl TocEntryRef { } } + #[doc(alias = "get_sub_entries")] pub fn sub_entries(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::gst_toc_entry_get_sub_entries(self.as_ptr())) } } + #[doc(alias = "get_parent")] pub fn parent(&self) -> Option { unsafe { from_glib_none(ffi::gst_toc_entry_get_parent(self.as_mut_ptr())) } } + #[doc(alias = "get_start_stop_times")] pub fn start_stop_times(&self) -> Option<(i64, i64)> { unsafe { let mut start = mem::MaybeUninit::uninit(); @@ -149,6 +157,7 @@ impl TocEntryRef { } } + #[doc(alias = "get_tags")] pub fn tags(&self) -> Option { unsafe { from_glib_none(ffi::gst_toc_entry_get_tags(self.as_ptr())) } } @@ -177,6 +186,7 @@ impl TocEntryRef { unsafe { from_glib(ffi::gst_toc_entry_is_sequence(self.as_ptr())) } } + #[doc(alias = "get_loop")] pub fn loop_(&self) -> Option<(TocLoopType, i32)> { unsafe { let mut loop_type = mem::MaybeUninit::uninit(); diff --git a/gstreamer/src/typefind.rs b/gstreamer/src/typefind.rs index b37053d95..950da2124 100644 --- a/gstreamer/src/typefind.rs +++ b/gstreamer/src/typefind.rs @@ -17,6 +17,7 @@ pub struct TypeFind(ffi::GstTypeFind); pub trait TypeFindImpl { fn peek(&mut self, offset: i64, size: u32) -> Option<&[u8]>; fn suggest(&mut self, probability: TypeFindProbability, caps: &Caps); + #[doc(alias = "get_length")] fn length(&self) -> Option { None } @@ -75,6 +76,7 @@ impl TypeFind { } } + #[doc(alias = "get_length")] pub fn length(&mut self) -> Option { unsafe { let len = ffi::gst_type_find_get_length(&mut self.0); diff --git a/tutorials/src/tutorials-common.rs b/tutorials/src/tutorials-common.rs index 6ca4a6b63..06aee38aa 100644 --- a/tutorials/src/tutorials-common.rs +++ b/tutorials/src/tutorials-common.rs @@ -20,6 +20,7 @@ mod runloop { } } + #[doc(alias = "get_main")] pub fn main() -> CFRunLoop { unsafe { let r = CFRunLoopGetMain();