From 54979d859df2ef705188e7638639b761340358b9 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Mon, 28 Aug 2023 18:52:26 +0200 Subject: [PATCH] Regenerate with latest gir Part-of: --- gstreamer-allocators/src/auto/mod.rs | 5 +- gstreamer-allocators/src/auto/versions.txt | 2 +- .../sys/src/auto/versions.txt | 2 +- gstreamer-allocators/sys/tests/abi.rs | 18 ++- gstreamer-app/src/auto/app_sink.rs | 14 +- gstreamer-app/src/auto/app_src.rs | 38 ++--- gstreamer-app/src/auto/enums.rs | 6 +- gstreamer-app/src/auto/versions.txt | 2 +- gstreamer-app/sys/src/auto/versions.txt | 2 +- gstreamer-app/sys/tests/abi.rs | 18 ++- gstreamer-audio/src/auto/audio_aggregator.rs | 8 +- .../src/auto/audio_aggregator_convert_pad.rs | 4 +- .../src/auto/audio_aggregator_pad.rs | 4 +- gstreamer-audio/src/auto/audio_base_sink.rs | 18 +-- gstreamer-audio/src/auto/audio_base_src.rs | 14 +- gstreamer-audio/src/auto/audio_decoder.rs | 18 +-- gstreamer-audio/src/auto/audio_encoder.rs | 14 +- gstreamer-audio/src/auto/enums.rs | 23 +-- gstreamer-audio/src/auto/flags.rs | 9 +- gstreamer-audio/src/auto/mod.rs | 3 +- gstreamer-audio/src/auto/stream_volume.rs | 6 +- gstreamer-audio/src/auto/versions.txt | 2 +- gstreamer-audio/sys/src/auto/versions.txt | 2 +- gstreamer-audio/sys/tests/abi.rs | 18 ++- gstreamer-base/src/auto/adapter.rs | 11 +- gstreamer-base/src/auto/aggregator.rs | 10 +- gstreamer-base/src/auto/aggregator_pad.rs | 6 +- gstreamer-base/src/auto/base_parse.rs | 4 +- gstreamer-base/src/auto/base_sink.rs | 32 ++--- gstreamer-base/src/auto/base_src.rs | 10 +- gstreamer-base/src/auto/base_transform.rs | 4 +- gstreamer-base/src/auto/enums.rs | 3 +- gstreamer-base/src/auto/mod.rs | 5 +- gstreamer-base/src/auto/versions.txt | 2 +- gstreamer-base/sys/src/auto/versions.txt | 2 +- gstreamer-base/sys/tests/abi.rs | 18 ++- gstreamer-check/src/auto/test_clock.rs | 4 +- gstreamer-check/src/auto/versions.txt | 2 +- gstreamer-check/sys/src/auto/versions.txt | 2 +- gstreamer-check/sys/tests/abi.rs | 18 ++- .../src/auto/argb_control_binding.rs | 10 +- .../src/auto/direct_control_binding.rs | 4 +- gstreamer-controller/src/auto/enums.rs | 6 +- .../src/auto/interpolation_control_source.rs | 4 +- .../src/auto/lfo_control_source.rs | 12 +- gstreamer-controller/src/auto/mod.rs | 3 +- .../src/auto/timed_value_control_source.rs | 8 +- .../src/auto/trigger_control_source.rs | 4 +- gstreamer-controller/src/auto/versions.txt | 2 +- .../sys/src/auto/versions.txt | 2 +- gstreamer-controller/sys/tests/abi.rs | 18 ++- gstreamer-editing-services/src/auto/asset.rs | 12 +- gstreamer-editing-services/src/auto/clip.rs | 29 ++-- .../src/auto/clip_asset.rs | 11 +- .../src/auto/container.rs | 8 +- .../src/auto/discoverer_manager.rs | 10 +- gstreamer-editing-services/src/auto/enums.rs | 29 ++-- gstreamer-editing-services/src/auto/flags.rs | 17 ++- .../src/auto/formatter.rs | 9 +- gstreamer-editing-services/src/auto/layer.rs | 17 +-- gstreamer-editing-services/src/auto/marker.rs | 4 +- .../src/auto/marker_list.rs | 10 +- .../src/auto/meta_container.rs | 26 ++-- gstreamer-editing-services/src/auto/mod.rs | 3 +- .../src/auto/pipeline.rs | 16 +-- .../src/auto/project.rs | 24 ++-- .../src/auto/test_clip.rs | 10 +- .../src/auto/text_overlay_clip.rs | 16 +-- .../src/auto/timeline.rs | 32 ++--- .../src/auto/timeline_element.rs | 40 +++--- .../src/auto/title_clip.rs | 18 +-- gstreamer-editing-services/src/auto/track.rs | 23 ++- .../src/auto/track_element.rs | 22 +-- .../src/auto/track_element_asset.rs | 11 +- .../src/auto/transition_clip.rs | 4 +- .../src/auto/uri_clip.rs | 6 +- .../src/auto/uri_clip_asset.rs | 8 +- .../src/auto/versions.txt | 2 +- .../src/auto/video_source.rs | 7 +- .../src/auto/video_transition.rs | 8 +- .../sys/src/auto/versions.txt | 2 +- gstreamer-editing-services/sys/tests/abi.rs | 18 ++- gstreamer-gl/egl/src/auto/versions.txt | 2 +- gstreamer-gl/egl/sys/src/auto/versions.txt | 2 +- gstreamer-gl/egl/sys/tests/abi.rs | 18 ++- gstreamer-gl/src/auto/enums.rs | 39 +++-- gstreamer-gl/src/auto/flags.rs | 24 ++-- gstreamer-gl/src/auto/functions.rs | 5 +- gstreamer-gl/src/auto/gl_base_filter.rs | 4 +- gstreamer-gl/src/auto/gl_base_src.rs | 4 +- gstreamer-gl/src/auto/gl_context.rs | 17 ++- gstreamer-gl/src/auto/gl_display.rs | 4 +- gstreamer-gl/src/auto/gl_framebuffer.rs | 5 +- .../src/auto/gl_overlay_compositor.rs | 4 +- gstreamer-gl/src/auto/gl_shader.rs | 10 +- gstreamer-gl/src/auto/gl_upload.rs | 5 +- gstreamer-gl/src/auto/gl_view_convert.rs | 12 +- gstreamer-gl/src/auto/gl_window.rs | 14 +- gstreamer-gl/src/auto/glsl_stage.rs | 3 +- gstreamer-gl/src/auto/mod.rs | 5 +- gstreamer-gl/src/auto/versions.txt | 2 +- gstreamer-gl/sys/src/auto/versions.txt | 2 +- gstreamer-gl/sys/tests/abi.rs | 18 ++- gstreamer-gl/wayland/src/auto/versions.txt | 2 +- .../wayland/sys/src/auto/versions.txt | 2 +- gstreamer-gl/wayland/sys/tests/abi.rs | 18 ++- gstreamer-gl/x11/src/auto/versions.txt | 2 +- gstreamer-gl/x11/sys/src/auto/versions.txt | 2 +- gstreamer-gl/x11/sys/tests/abi.rs | 18 ++- gstreamer-mpegts/src/auto/versions.txt | 2 +- gstreamer-mpegts/sys/src/auto/versions.txt | 2 +- gstreamer-mpegts/sys/tests/abi.rs | 18 ++- gstreamer-net/src/auto/net_client_clock.rs | 16 +-- gstreamer-net/src/auto/net_time_provider.rs | 6 +- gstreamer-net/src/auto/ptp_clock.rs | 8 +- gstreamer-net/src/auto/versions.txt | 2 +- gstreamer-net/sys/src/auto/versions.txt | 2 +- gstreamer-net/sys/tests/abi.rs | 18 ++- .../src/auto/audio_visualizer.rs | 6 +- gstreamer-pbutils/src/auto/discoverer.rs | 18 +-- .../src/auto/encoding_profile.rs | 4 +- gstreamer-pbutils/src/auto/encoding_target.rs | 13 +- gstreamer-pbutils/src/auto/enums.rs | 6 +- gstreamer-pbutils/src/auto/flags.rs | 6 +- gstreamer-pbutils/src/auto/functions.rs | 9 +- gstreamer-pbutils/src/auto/mod.rs | 5 +- gstreamer-pbutils/src/auto/versions.txt | 2 +- gstreamer-pbutils/sys/src/auto/versions.txt | 2 +- gstreamer-pbutils/sys/tests/abi.rs | 18 ++- gstreamer-play/src/auto/enums.rs | 57 ++++---- gstreamer-play/src/auto/mod.rs | 3 +- gstreamer-play/src/auto/play.rs | 36 ++--- .../src/auto/play_signal_adapter.rs | 24 ++-- .../auto/play_video_overlay_video_renderer.rs | 14 +- gstreamer-play/src/auto/versions.txt | 2 +- gstreamer-play/sys/src/auto/versions.txt | 2 +- gstreamer-play/sys/tests/abi.rs | 18 ++- gstreamer-player/src/auto/enums.rs | 22 +-- gstreamer-player/src/auto/mod.rs | 3 +- gstreamer-player/src/auto/player.rs | 54 +++---- .../player_video_overlay_video_renderer.rs | 14 +- gstreamer-player/src/auto/versions.txt | 2 +- gstreamer-player/sys/src/auto/versions.txt | 2 +- gstreamer-player/sys/tests/abi.rs | 18 ++- gstreamer-rtp/src/auto/enums.rs | 18 ++- gstreamer-rtp/src/auto/flags.rs | 12 +- gstreamer-rtp/src/auto/mod.rs | 5 +- gstreamer-rtp/src/auto/rtp_base_depayload.rs | 16 +-- gstreamer-rtp/src/auto/rtp_base_payload.rs | 40 +++--- gstreamer-rtp/src/auto/versions.txt | 2 +- gstreamer-rtp/sys/src/auto/versions.txt | 2 +- gstreamer-rtp/sys/tests/abi.rs | 18 ++- gstreamer-rtsp-server/src/auto/enums.rs | 6 +- gstreamer-rtsp-server/src/auto/flags.rs | 3 +- gstreamer-rtsp-server/src/auto/mod.rs | 3 +- gstreamer-rtsp-server/src/auto/rtsp_auth.rs | 4 +- gstreamer-rtsp-server/src/auto/rtsp_client.rs | 56 ++++---- gstreamer-rtsp-server/src/auto/rtsp_media.rs | 53 ++++--- .../src/auto/rtsp_media_factory.rs | 36 ++--- .../src/auto/rtsp_media_factory_uri.rs | 6 +- .../src/auto/rtsp_mount_points.rs | 3 +- gstreamer-rtsp-server/src/auto/rtsp_server.rs | 22 +-- .../src/auto/rtsp_session.rs | 8 +- .../src/auto/rtsp_session_media.rs | 3 +- .../src/auto/rtsp_session_pool.rs | 6 +- gstreamer-rtsp-server/src/auto/rtsp_stream.rs | 28 ++-- .../src/auto/rtsp_thread_pool.rs | 4 +- gstreamer-rtsp-server/src/auto/versions.txt | 2 +- .../sys/src/auto/versions.txt | 2 +- gstreamer-rtsp-server/sys/tests/abi.rs | 18 ++- gstreamer-rtsp/src/auto/enums.rs | 27 ++-- gstreamer-rtsp/src/auto/flags.rs | 15 +- gstreamer-rtsp/src/auto/rtsp_url.rs | 3 +- gstreamer-rtsp/src/auto/versions.txt | 2 +- gstreamer-rtsp/sys/src/auto/versions.txt | 2 +- gstreamer-rtsp/sys/tests/abi.rs | 18 ++- gstreamer-sdp/src/auto/versions.txt | 2 +- gstreamer-sdp/sys/src/auto/versions.txt | 2 +- gstreamer-sdp/sys/tests/abi.rs | 18 ++- gstreamer-tag/sys/src/auto/versions.txt | 2 +- gstreamer-tag/sys/tests/abi.rs | 18 ++- gstreamer-validate/src/auto/bin_monitor.rs | 4 +- gstreamer-validate/src/auto/enums.rs | 11 +- gstreamer-validate/src/auto/flags.rs | 6 +- gstreamer-validate/src/auto/mod.rs | 3 +- gstreamer-validate/src/auto/monitor.rs | 6 +- gstreamer-validate/src/auto/runner.rs | 6 +- gstreamer-validate/src/auto/scenario.rs | 10 +- gstreamer-validate/src/auto/versions.txt | 2 +- gstreamer-validate/sys/src/auto/versions.txt | 2 +- gstreamer-validate/sys/tests/abi.rs | 18 ++- gstreamer-video/src/auto/color_balance.rs | 4 +- .../src/auto/color_balance_channel.rs | 4 +- gstreamer-video/src/auto/enums.rs | 88 +++++++----- gstreamer-video/src/auto/flags.rs | 41 ++++-- gstreamer-video/src/auto/mod.rs | 3 +- gstreamer-video/src/auto/versions.txt | 2 +- .../src/auto/video_aggregator_pad.rs | 8 +- gstreamer-video/src/auto/video_decoder.rs | 14 +- gstreamer-video/src/auto/video_encoder.rs | 6 +- gstreamer-video/src/auto/video_orientation.rs | 9 +- gstreamer-video/src/auto/video_sink.rs | 4 +- gstreamer-video/sys/src/auto/versions.txt | 2 +- gstreamer-video/sys/tests/abi.rs | 18 ++- gstreamer-webrtc/src/auto/enums.rs | 62 +++++--- gstreamer-webrtc/src/auto/mod.rs | 3 +- gstreamer-webrtc/src/auto/versions.txt | 2 +- .../src/auto/web_rtc_data_channel.rs | 33 ++--- .../src/auto/web_rtcdtls_transport.rs | 12 +- gstreamer-webrtc/src/auto/web_rtcice.rs | 12 +- .../src/auto/web_rtcice_transport.rs | 10 +- .../src/auto/web_rtcrtp_receiver.rs | 4 +- .../src/auto/web_rtcrtp_sender.rs | 6 +- .../src/auto/web_rtcrtp_transceiver.rs | 12 +- .../src/auto/web_rtcsctp_transport.rs | 10 +- gstreamer-webrtc/sys/src/auto/versions.txt | 2 +- gstreamer-webrtc/sys/tests/abi.rs | 18 ++- gstreamer/src/auto/bin.rs | 14 +- gstreamer/src/auto/bus.rs | 6 +- gstreamer/src/auto/child_proxy.rs | 6 +- gstreamer/src/auto/clock.rs | 30 ++-- gstreamer/src/auto/control_source.rs | 3 +- gstreamer/src/auto/device.rs | 4 +- gstreamer/src/auto/device_monitor.rs | 4 +- gstreamer/src/auto/device_provider.rs | 6 +- gstreamer/src/auto/element.rs | 14 +- gstreamer/src/auto/enums.rs | 134 +++++++++++------- gstreamer/src/auto/flags.rs | 89 ++++++++---- gstreamer/src/auto/functions.rs | 15 +- gstreamer/src/auto/mod.rs | 5 +- gstreamer/src/auto/object.rs | 8 +- gstreamer/src/auto/pad.rs | 10 +- gstreamer/src/auto/pad_template.rs | 4 +- gstreamer/src/auto/pipeline.rs | 8 +- gstreamer/src/auto/plugin.rs | 7 +- gstreamer/src/auto/preset.rs | 3 +- gstreamer/src/auto/registry.rs | 6 +- gstreamer/src/auto/stream.rs | 10 +- gstreamer/src/auto/system_clock.rs | 4 +- gstreamer/src/auto/task_pool.rs | 3 +- gstreamer/src/auto/tracer.rs | 4 +- gstreamer/src/auto/uri_handler.rs | 3 +- gstreamer/src/auto/versions.txt | 2 +- gstreamer/sys/src/auto/versions.txt | 2 +- gstreamer/sys/tests/abi.rs | 18 ++- 245 files changed, 1590 insertions(+), 1359 deletions(-) diff --git a/gstreamer-allocators/src/auto/mod.rs b/gstreamer-allocators/src/auto/mod.rs index 2c4ef17b4..66f067688 100644 --- a/gstreamer-allocators/src/auto/mod.rs +++ b/gstreamer-allocators/src/auto/mod.rs @@ -30,14 +30,13 @@ pub use self::phys_memory_allocator::PhysMemoryAllocator; mod flags; pub use self::flags::FdMemoryFlags; -pub mod functions; +pub(crate) mod functions; mod constants; pub use self::constants::ALLOCATOR_DMABUF; pub use self::constants::ALLOCATOR_FD; pub use self::constants::CAPS_FEATURE_MEMORY_DMABUF; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::phys_memory_allocator::PhysMemoryAllocatorExt; } diff --git a/gstreamer-allocators/src/auto/versions.txt b/gstreamer-allocators/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-allocators/src/auto/versions.txt +++ b/gstreamer-allocators/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-allocators/sys/src/auto/versions.txt b/gstreamer-allocators/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-allocators/sys/src/auto/versions.txt +++ b/gstreamer-allocators/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-allocators/sys/tests/abi.rs b/gstreamer-allocators/sys/tests/abi.rs index 2c1e8193d..f96c08919 100644 --- a/gstreamer-allocators/sys/tests/abi.rs +++ b/gstreamer-allocators/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-app/src/auto/app_sink.rs b/gstreamer-app/src/auto/app_sink.rs index cf1eb4c2f..52ad7c443 100644 --- a/gstreamer-app/src/auto/app_sink.rs +++ b/gstreamer-app/src/auto/app_sink.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstAppSink")] @@ -199,7 +199,7 @@ impl AppSink { connect_raw( self.as_ptr() as *mut _, b"notify::buffer-list\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_buffer_list_trampoline:: as *const (), )), Box_::into_raw(f), @@ -225,7 +225,7 @@ impl AppSink { connect_raw( self.as_ptr() as *mut _, b"notify::caps\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_caps_trampoline:: as *const (), )), Box_::into_raw(f), @@ -251,7 +251,7 @@ impl AppSink { connect_raw( self.as_ptr() as *mut _, b"notify::drop\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_drop_trampoline:: as *const (), )), Box_::into_raw(f), @@ -277,7 +277,7 @@ impl AppSink { connect_raw( self.as_ptr() as *mut _, b"notify::eos\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_eos_trampoline:: as *const (), )), Box_::into_raw(f), @@ -305,7 +305,7 @@ impl AppSink { connect_raw( self.as_ptr() as *mut _, b"notify::max-buffers\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_buffers_trampoline:: as *const (), )), Box_::into_raw(f), @@ -333,7 +333,7 @@ impl AppSink { connect_raw( self.as_ptr() as *mut _, b"notify::wait-on-eos\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_wait_on_eos_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-app/src/auto/app_src.rs b/gstreamer-app/src/auto/app_src.rs index c3f30264c..2c28a8873 100644 --- a/gstreamer-app/src/auto/app_src.rs +++ b/gstreamer-app/src/auto/app_src.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstAppSrc")] @@ -297,7 +297,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::block\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_block_trampoline:: as *const (), )), Box_::into_raw(f), @@ -323,7 +323,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::caps\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_caps_trampoline:: as *const (), )), Box_::into_raw(f), @@ -353,7 +353,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::current-level-buffers\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_current_level_buffers_trampoline:: as *const (), )), Box_::into_raw(f), @@ -381,7 +381,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::current-level-bytes\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_current_level_bytes_trampoline:: as *const (), )), Box_::into_raw(f), @@ -411,7 +411,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::current-level-time\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_current_level_time_trampoline:: as *const (), )), Box_::into_raw(f), @@ -437,7 +437,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_duration_trampoline:: as *const (), )), Box_::into_raw(f), @@ -463,7 +463,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::format\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_format_trampoline:: as *const (), )), Box_::into_raw(f), @@ -493,7 +493,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::handle-segment-change\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_handle_segment_change_trampoline:: as *const (), )), Box_::into_raw(f), @@ -519,7 +519,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::is-live\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_live_trampoline:: as *const (), )), Box_::into_raw(f), @@ -549,7 +549,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::leaky-type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_leaky_type_trampoline:: as *const (), )), Box_::into_raw(f), @@ -579,7 +579,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::max-buffers\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_buffers_trampoline:: as *const (), )), Box_::into_raw(f), @@ -605,7 +605,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::max-bytes\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_bytes_trampoline:: as *const (), )), Box_::into_raw(f), @@ -633,7 +633,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::max-latency\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_latency_trampoline:: as *const (), )), Box_::into_raw(f), @@ -661,7 +661,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::max-time\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_time_trampoline:: as *const (), )), Box_::into_raw(f), @@ -689,7 +689,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::min-latency\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_min_latency_trampoline:: as *const (), )), Box_::into_raw(f), @@ -717,7 +717,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::min-percent\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_min_percent_trampoline:: as *const (), )), Box_::into_raw(f), @@ -743,7 +743,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::size\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_size_trampoline:: as *const (), )), Box_::into_raw(f), @@ -771,7 +771,7 @@ impl AppSrc { connect_raw( self.as_ptr() as *mut _, b"notify::stream-type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_stream_type_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-app/src/auto/enums.rs b/gstreamer-app/src/auto/enums.rs index ff60c9de4..8299852ba 100644 --- a/gstreamer-app/src/auto/enums.rs +++ b/gstreamer-app/src/auto/enums.rs @@ -59,6 +59,7 @@ impl FromGlib for AppLeakyType { #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl StaticType for AppLeakyType { #[inline] + #[doc(alias = "gst_app_leaky_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_app_leaky_type_get_type()) } } @@ -72,7 +73,7 @@ impl glib::HasParamSpec for AppLeakyType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -168,6 +169,7 @@ impl FromGlib for AppStreamType { impl StaticType for AppStreamType { #[inline] + #[doc(alias = "gst_app_stream_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_app_stream_type_get_type()) } } @@ -179,7 +181,7 @@ impl glib::HasParamSpec for AppStreamType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-app/src/auto/versions.txt b/gstreamer-app/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-app/src/auto/versions.txt +++ b/gstreamer-app/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-app/sys/src/auto/versions.txt b/gstreamer-app/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-app/sys/src/auto/versions.txt +++ b/gstreamer-app/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-app/sys/tests/abi.rs b/gstreamer-app/sys/tests/abi.rs index 677f95918..17145ee46 100644 --- a/gstreamer-app/sys/tests/abi.rs +++ b/gstreamer-app/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-audio/src/auto/audio_aggregator.rs b/gstreamer-audio/src/auto/audio_aggregator.rs index 0fb163dcd..e9421abf2 100644 --- a/gstreamer-audio/src/auto/audio_aggregator.rs +++ b/gstreamer-audio/src/auto/audio_aggregator.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstAudioAggregator")] @@ -87,7 +87,7 @@ pub trait AudioAggregatorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::alignment-threshold\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_alignment_threshold_trampoline:: as *const (), )), Box_::into_raw(f), @@ -116,7 +116,7 @@ pub trait AudioAggregatorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::discont-wait\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_discont_wait_trampoline:: as *const (), )), Box_::into_raw(f), @@ -145,7 +145,7 @@ pub trait AudioAggregatorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::output-buffer-duration\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_output_buffer_duration_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-audio/src/auto/audio_aggregator_convert_pad.rs b/gstreamer-audio/src/auto/audio_aggregator_convert_pad.rs index 6a3423db3..aaebed6e5 100644 --- a/gstreamer-audio/src/auto/audio_aggregator_convert_pad.rs +++ b/gstreamer-audio/src/auto/audio_aggregator_convert_pad.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstAudioAggregatorConvertPad")] @@ -66,7 +66,7 @@ pub trait AudioAggregatorConvertPadExt: connect_raw( self.as_ptr() as *mut _, b"notify::converter-config\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_converter_config_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-audio/src/auto/audio_aggregator_pad.rs b/gstreamer-audio/src/auto/audio_aggregator_pad.rs index e98f1339e..3e941a393 100644 --- a/gstreamer-audio/src/auto/audio_aggregator_pad.rs +++ b/gstreamer-audio/src/auto/audio_aggregator_pad.rs @@ -12,7 +12,7 @@ use glib::{ }; #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstAudioAggregatorPad")] @@ -73,7 +73,7 @@ pub trait AudioAggregatorPadExt: IsA + sealed::Sealed + 'sta connect_raw( self.as_ptr() as *mut _, b"notify::qos-messages\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_qos_messages_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-audio/src/auto/audio_base_sink.rs b/gstreamer-audio/src/auto/audio_base_sink.rs index 9927622c6..329080063 100644 --- a/gstreamer-audio/src/auto/audio_base_sink.rs +++ b/gstreamer-audio/src/auto/audio_base_sink.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstAudioBaseSink")] @@ -189,7 +189,7 @@ pub trait AudioBaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::alignment-threshold\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_alignment_threshold_trampoline:: as *const (), )), Box_::into_raw(f), @@ -218,7 +218,7 @@ pub trait AudioBaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::buffer-time\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_buffer_time_trampoline:: as *const (), )), Box_::into_raw(f), @@ -247,7 +247,7 @@ pub trait AudioBaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::can-activate-pull\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_can_activate_pull_trampoline:: as *const (), )), Box_::into_raw(f), @@ -276,7 +276,7 @@ pub trait AudioBaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::discont-wait\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_discont_wait_trampoline:: as *const (), )), Box_::into_raw(f), @@ -305,7 +305,7 @@ pub trait AudioBaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::drift-tolerance\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_drift_tolerance_trampoline:: as *const (), )), Box_::into_raw(f), @@ -334,7 +334,7 @@ pub trait AudioBaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::latency-time\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_latency_time_trampoline:: as *const (), )), Box_::into_raw(f), @@ -363,7 +363,7 @@ pub trait AudioBaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::provide-clock\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_provide_clock_trampoline:: as *const (), )), Box_::into_raw(f), @@ -392,7 +392,7 @@ pub trait AudioBaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::slave-method\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_slave_method_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-audio/src/auto/audio_base_src.rs b/gstreamer-audio/src/auto/audio_base_src.rs index a25a0c787..fe1c2ae7d 100644 --- a/gstreamer-audio/src/auto/audio_base_src.rs +++ b/gstreamer-audio/src/auto/audio_base_src.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstAudioBaseSrc")] @@ -119,7 +119,7 @@ pub trait AudioBaseSrcExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::actual-buffer-time\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_actual_buffer_time_trampoline:: as *const (), )), Box_::into_raw(f), @@ -148,7 +148,7 @@ pub trait AudioBaseSrcExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::actual-latency-time\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_actual_latency_time_trampoline:: as *const (), )), Box_::into_raw(f), @@ -177,7 +177,7 @@ pub trait AudioBaseSrcExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::buffer-time\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_buffer_time_trampoline:: as *const (), )), Box_::into_raw(f), @@ -206,7 +206,7 @@ pub trait AudioBaseSrcExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::latency-time\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_latency_time_trampoline:: as *const (), )), Box_::into_raw(f), @@ -235,7 +235,7 @@ pub trait AudioBaseSrcExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::provide-clock\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_provide_clock_trampoline:: as *const (), )), Box_::into_raw(f), @@ -264,7 +264,7 @@ pub trait AudioBaseSrcExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::slave-method\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_slave_method_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-audio/src/auto/audio_decoder.rs b/gstreamer-audio/src/auto/audio_decoder.rs index ba223391d..b1136e0c2 100644 --- a/gstreamer-audio/src/auto/audio_decoder.rs +++ b/gstreamer-audio/src/auto/audio_decoder.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstAudioDecoder")] @@ -109,8 +109,8 @@ pub trait AudioDecoderExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_latency")] fn latency(&self) -> (gst::ClockTime, Option) { unsafe { - let mut min = mem::MaybeUninit::uninit(); - let mut max = mem::MaybeUninit::uninit(); + let mut min = std::mem::MaybeUninit::uninit(); + let mut max = std::mem::MaybeUninit::uninit(); ffi::gst_audio_decoder_get_latency( self.as_ref().to_glib_none().0, min.as_mut_ptr(), @@ -154,8 +154,8 @@ pub trait AudioDecoderExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_parse_state")] fn parse_state(&self) -> (bool, bool) { unsafe { - let mut sync = mem::MaybeUninit::uninit(); - let mut eos = mem::MaybeUninit::uninit(); + let mut sync = std::mem::MaybeUninit::uninit(); + let mut eos = std::mem::MaybeUninit::uninit(); ffi::gst_audio_decoder_get_parse_state( self.as_ref().to_glib_none().0, sync.as_mut_ptr(), @@ -336,7 +336,7 @@ pub trait AudioDecoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::max-errors\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_errors_trampoline:: as *const (), )), Box_::into_raw(f), @@ -365,7 +365,7 @@ pub trait AudioDecoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::min-latency\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_min_latency_trampoline:: as *const (), )), Box_::into_raw(f), @@ -391,7 +391,7 @@ pub trait AudioDecoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::plc\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_plc_trampoline:: as *const (), )), Box_::into_raw(f), @@ -420,7 +420,7 @@ pub trait AudioDecoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::tolerance\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_tolerance_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-audio/src/auto/audio_encoder.rs b/gstreamer-audio/src/auto/audio_encoder.rs index 49071a326..358f62f8f 100644 --- a/gstreamer-audio/src/auto/audio_encoder.rs +++ b/gstreamer-audio/src/auto/audio_encoder.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstAudioEncoder")] @@ -120,8 +120,8 @@ pub trait AudioEncoderExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_latency")] fn latency(&self) -> (gst::ClockTime, Option) { unsafe { - let mut min = mem::MaybeUninit::uninit(); - let mut max = mem::MaybeUninit::uninit(); + let mut min = std::mem::MaybeUninit::uninit(); + let mut max = std::mem::MaybeUninit::uninit(); ffi::gst_audio_encoder_get_latency( self.as_ref().to_glib_none().0, min.as_mut_ptr(), @@ -323,7 +323,7 @@ pub trait AudioEncoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::hard-resync\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_hard_resync_trampoline:: as *const (), )), Box_::into_raw(f), @@ -352,7 +352,7 @@ pub trait AudioEncoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::mark-granule\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_mark_granule_trampoline:: as *const (), )), Box_::into_raw(f), @@ -381,7 +381,7 @@ pub trait AudioEncoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::perfect-timestamp\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_perfect_timestamp_trampoline:: as *const (), )), Box_::into_raw(f), @@ -410,7 +410,7 @@ pub trait AudioEncoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::tolerance\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_tolerance_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-audio/src/auto/enums.rs b/gstreamer-audio/src/auto/enums.rs index 0029ea4f8..19549dd94 100644 --- a/gstreamer-audio/src/auto/enums.rs +++ b/gstreamer-audio/src/auto/enums.rs @@ -4,7 +4,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -56,6 +55,7 @@ impl FromGlib for AudioDitherMethod { impl StaticType for AudioDitherMethod { #[inline] + #[doc(alias = "gst_audio_dither_method_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_audio_dither_method_get_type()) } } @@ -67,7 +67,7 @@ impl glib::HasParamSpec for AudioDitherMethod { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -189,9 +189,9 @@ impl AudioFormat { } } -impl fmt::Display for AudioFormat { +impl std::fmt::Display for AudioFormat { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } @@ -284,6 +284,7 @@ impl FromGlib for AudioFormat { impl StaticType for AudioFormat { #[inline] + #[doc(alias = "gst_audio_format_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_audio_format_get_type()) } } @@ -295,7 +296,7 @@ impl glib::HasParamSpec for AudioFormat { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -379,6 +380,7 @@ impl FromGlib for AudioLayout { impl StaticType for AudioLayout { #[inline] + #[doc(alias = "gst_audio_layout_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_audio_layout_get_type()) } } @@ -390,7 +392,7 @@ impl glib::HasParamSpec for AudioLayout { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -486,6 +488,7 @@ impl FromGlib for AudioNoiseShapingMethod { impl StaticType for AudioNoiseShapingMethod { #[inline] + #[doc(alias = "gst_audio_noise_shaping_method_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_audio_noise_shaping_method_get_type()) } } @@ -497,7 +500,7 @@ impl glib::HasParamSpec for AudioNoiseShapingMethod { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -593,6 +596,7 @@ impl FromGlib for AudioResamplerMethod { impl StaticType for AudioResamplerMethod { #[inline] + #[doc(alias = "gst_audio_resampler_method_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_audio_resampler_method_get_type()) } } @@ -604,7 +608,7 @@ impl glib::HasParamSpec for AudioResamplerMethod { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -746,6 +750,7 @@ impl FromGlib for AudioRingBufferFormatType { impl StaticType for AudioRingBufferFormatType { #[inline] + #[doc(alias = "gst_audio_ring_buffer_format_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_audio_ring_buffer_format_type_get_type()) } } @@ -757,7 +762,7 @@ impl glib::HasParamSpec for AudioRingBufferFormatType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-audio/src/auto/flags.rs b/gstreamer-audio/src/auto/flags.rs index f56d79994..91d0dbb43 100644 --- a/gstreamer-audio/src/auto/flags.rs +++ b/gstreamer-audio/src/auto/flags.rs @@ -35,6 +35,7 @@ impl FromGlib for AudioFlags { impl StaticType for AudioFlags { #[inline] + #[doc(alias = "gst_audio_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_audio_flags_get_type()) } } @@ -46,7 +47,7 @@ impl glib::HasParamSpec for AudioFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -126,6 +127,7 @@ impl FromGlib for AudioFormatFlags { impl StaticType for AudioFormatFlags { #[inline] + #[doc(alias = "gst_audio_format_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_audio_format_flags_get_type()) } } @@ -137,7 +139,7 @@ impl glib::HasParamSpec for AudioFormatFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -209,6 +211,7 @@ impl FromGlib for AudioPackFlags { impl StaticType for AudioPackFlags { #[inline] + #[doc(alias = "gst_audio_pack_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_audio_pack_flags_get_type()) } } @@ -220,7 +223,7 @@ impl glib::HasParamSpec for AudioPackFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/gstreamer-audio/src/auto/mod.rs b/gstreamer-audio/src/auto/mod.rs index 3bc064267..370b2143e 100644 --- a/gstreamer-audio/src/auto/mod.rs +++ b/gstreamer-audio/src/auto/mod.rs @@ -53,8 +53,7 @@ pub use self::flags::AudioFlags; pub use self::flags::AudioFormatFlags; pub use self::flags::AudioPackFlags; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::audio_aggregator::AudioAggregatorExt; pub use super::audio_aggregator_convert_pad::AudioAggregatorConvertPadExt; pub use super::audio_aggregator_pad::AudioAggregatorPadExt; diff --git a/gstreamer-audio/src/auto/stream_volume.rs b/gstreamer-audio/src/auto/stream_volume.rs index ae90abbc4..5286d9877 100644 --- a/gstreamer-audio/src/auto/stream_volume.rs +++ b/gstreamer-audio/src/auto/stream_volume.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstStreamVolume")] @@ -93,7 +93,7 @@ pub trait StreamVolumeExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::mute\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_mute_trampoline:: as *const (), )), Box_::into_raw(f), @@ -119,7 +119,7 @@ pub trait StreamVolumeExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::volume\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_volume_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-audio/src/auto/versions.txt b/gstreamer-audio/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-audio/src/auto/versions.txt +++ b/gstreamer-audio/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-audio/sys/src/auto/versions.txt b/gstreamer-audio/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-audio/sys/src/auto/versions.txt +++ b/gstreamer-audio/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-audio/sys/tests/abi.rs b/gstreamer-audio/sys/tests/abi.rs index c38232a75..332fed990 100644 --- a/gstreamer-audio/sys/tests/abi.rs +++ b/gstreamer-audio/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-base/src/auto/adapter.rs b/gstreamer-base/src/auto/adapter.rs index 5816f2a50..21d54958c 100644 --- a/gstreamer-base/src/auto/adapter.rs +++ b/gstreamer-base/src/auto/adapter.rs @@ -4,7 +4,6 @@ // DO NOT EDIT use glib::translate::*; -use std::mem; glib::wrapper! { #[doc(alias = "GstAdapter")] @@ -57,7 +56,7 @@ impl Adapter { #[doc(alias = "gst_adapter_prev_dts")] pub fn prev_dts(&self) -> (Option, u64) { unsafe { - let mut distance = mem::MaybeUninit::uninit(); + let mut distance = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_adapter_prev_dts( self.to_glib_none().0, distance.as_mut_ptr(), @@ -69,7 +68,7 @@ impl Adapter { #[doc(alias = "gst_adapter_prev_dts_at_offset")] pub fn prev_dts_at_offset(&self, offset: usize) -> (Option, u64) { unsafe { - let mut distance = mem::MaybeUninit::uninit(); + let mut distance = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_adapter_prev_dts_at_offset( self.to_glib_none().0, offset, @@ -82,7 +81,7 @@ impl Adapter { #[doc(alias = "gst_adapter_prev_offset")] pub fn prev_offset(&self) -> (u64, u64) { unsafe { - let mut distance = mem::MaybeUninit::uninit(); + let mut distance = std::mem::MaybeUninit::uninit(); let ret = ffi::gst_adapter_prev_offset(self.to_glib_none().0, distance.as_mut_ptr()); (ret, distance.assume_init()) } @@ -91,7 +90,7 @@ impl Adapter { #[doc(alias = "gst_adapter_prev_pts")] pub fn prev_pts(&self) -> (Option, u64) { unsafe { - let mut distance = mem::MaybeUninit::uninit(); + let mut distance = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_adapter_prev_pts( self.to_glib_none().0, distance.as_mut_ptr(), @@ -103,7 +102,7 @@ impl Adapter { #[doc(alias = "gst_adapter_prev_pts_at_offset")] pub fn prev_pts_at_offset(&self, offset: usize) -> (Option, u64) { unsafe { - let mut distance = mem::MaybeUninit::uninit(); + let mut distance = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_adapter_prev_pts_at_offset( self.to_glib_none().0, offset, diff --git a/gstreamer-base/src/auto/aggregator.rs b/gstreamer-base/src/auto/aggregator.rs index 4f917e251..3a6b70dd0 100644 --- a/gstreamer-base/src/auto/aggregator.rs +++ b/gstreamer-base/src/auto/aggregator.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstAggregator")] @@ -245,7 +245,7 @@ pub trait AggregatorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::emit-signals\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_emit_signals_trampoline:: as *const (), )), Box_::into_raw(f), @@ -274,7 +274,7 @@ pub trait AggregatorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::latency\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_latency_trampoline:: as *const (), )), Box_::into_raw(f), @@ -303,7 +303,7 @@ pub trait AggregatorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::start-time\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_start_time_trampoline:: as *const (), )), Box_::into_raw(f), @@ -334,7 +334,7 @@ pub trait AggregatorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::start-time-selection\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_start_time_selection_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-base/src/auto/aggregator_pad.rs b/gstreamer-base/src/auto/aggregator_pad.rs index 43ae7ebae..18821bcc3 100644 --- a/gstreamer-base/src/auto/aggregator_pad.rs +++ b/gstreamer-base/src/auto/aggregator_pad.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstAggregatorPad")] @@ -128,7 +128,7 @@ pub trait AggregatorPadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"buffer-consumed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( buffer_consumed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -159,7 +159,7 @@ pub trait AggregatorPadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::emit-signals\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_emit_signals_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-base/src/auto/base_parse.rs b/gstreamer-base/src/auto/base_parse.rs index 61c53dca2..639d47777 100644 --- a/gstreamer-base/src/auto/base_parse.rs +++ b/gstreamer-base/src/auto/base_parse.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstBaseParse")] @@ -174,7 +174,7 @@ pub trait BaseParseExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::disable-passthrough\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_disable_passthrough_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-base/src/auto/base_sink.rs b/gstreamer-base/src/auto/base_sink.rs index a21a64832..21013b128 100644 --- a/gstreamer-base/src/auto/base_sink.rs +++ b/gstreamer-base/src/auto/base_sink.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstBaseSink")] @@ -213,7 +213,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { time: impl Into>, ) -> (Result, gst::ClockTimeDiff) { unsafe { - let mut jitter = mem::MaybeUninit::uninit(); + let mut jitter = std::mem::MaybeUninit::uninit(); let ret = try_from_glib(ffi::gst_base_sink_wait( self.as_ref().to_glib_none().0, time.into().into_glib(), @@ -232,7 +232,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { gst::ClockTimeDiff, ) { unsafe { - let mut jitter = mem::MaybeUninit::uninit(); + let mut jitter = std::mem::MaybeUninit::uninit(); let ret = try_from_glib(ffi::gst_base_sink_wait_clock( self.as_ref().to_glib_none().0, time.into_glib(), @@ -297,7 +297,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::async\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_async_trampoline:: as *const (), )), Box_::into_raw(f), @@ -326,7 +326,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::blocksize\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_blocksize_trampoline:: as *const (), )), Box_::into_raw(f), @@ -355,7 +355,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::enable-last-sample\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_enable_last_sample_trampoline:: as *const (), )), Box_::into_raw(f), @@ -384,7 +384,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::last-sample\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_last_sample_trampoline:: as *const (), )), Box_::into_raw(f), @@ -413,7 +413,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::max-bitrate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_bitrate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -442,7 +442,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::max-lateness\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_lateness_trampoline:: as *const (), )), Box_::into_raw(f), @@ -473,7 +473,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::processing-deadline\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_processing_deadline_trampoline:: as *const (), )), Box_::into_raw(f), @@ -499,7 +499,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::qos\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_qos_trampoline:: as *const (), )), Box_::into_raw(f), @@ -528,7 +528,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::render-delay\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_render_delay_trampoline:: as *const (), )), Box_::into_raw(f), @@ -556,7 +556,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::stats\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_stats_trampoline:: as *const (), )), Box_::into_raw(f), @@ -582,7 +582,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::sync\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_sync_trampoline:: as *const (), )), Box_::into_raw(f), @@ -611,7 +611,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::throttle-time\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_throttle_time_trampoline:: as *const (), )), Box_::into_raw(f), @@ -640,7 +640,7 @@ pub trait BaseSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::ts-offset\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_ts_offset_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-base/src/auto/base_src.rs b/gstreamer-base/src/auto/base_src.rs index 54e399943..cc37e9df1 100644 --- a/gstreamer-base/src/auto/base_src.rs +++ b/gstreamer-base/src/auto/base_src.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstBaseSrc")] @@ -245,7 +245,7 @@ pub trait BaseSrcExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::blocksize\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_blocksize_trampoline:: as *const (), )), Box_::into_raw(f), @@ -274,7 +274,7 @@ pub trait BaseSrcExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::do-timestamp\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_do_timestamp_trampoline:: as *const (), )), Box_::into_raw(f), @@ -303,7 +303,7 @@ pub trait BaseSrcExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::num-buffers\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_num_buffers_trampoline:: as *const (), )), Box_::into_raw(f), @@ -332,7 +332,7 @@ pub trait BaseSrcExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::typefind\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_typefind_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-base/src/auto/base_transform.rs b/gstreamer-base/src/auto/base_transform.rs index 0d6860cc2..e42f26d63 100644 --- a/gstreamer-base/src/auto/base_transform.rs +++ b/gstreamer-base/src/auto/base_transform.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstBaseTransform")] @@ -176,7 +176,7 @@ pub trait BaseTransformExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::qos\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_qos_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-base/src/auto/enums.rs b/gstreamer-base/src/auto/enums.rs index b4d323af8..17994327e 100644 --- a/gstreamer-base/src/auto/enums.rs +++ b/gstreamer-base/src/auto/enums.rs @@ -61,6 +61,7 @@ impl FromGlib for AggregatorStartTimeSelec #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl StaticType for AggregatorStartTimeSelection { #[inline] + #[doc(alias = "gst_aggregator_start_time_selection_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_aggregator_start_time_selection_get_type()) } } @@ -74,7 +75,7 @@ impl glib::HasParamSpec for AggregatorStartTimeSelection { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-base/src/auto/mod.rs b/gstreamer-base/src/auto/mod.rs index 4cac01c3b..f89d84e3c 100644 --- a/gstreamer-base/src/auto/mod.rs +++ b/gstreamer-base/src/auto/mod.rs @@ -35,10 +35,9 @@ pub use self::enums::AggregatorStartTimeSelection; mod flags; pub use self::flags::BaseParseFrameFlags; -pub mod functions; +pub(crate) mod functions; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::aggregator::AggregatorExt; pub use super::aggregator_pad::AggregatorPadExt; pub use super::base_parse::BaseParseExt; diff --git a/gstreamer-base/src/auto/versions.txt b/gstreamer-base/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-base/src/auto/versions.txt +++ b/gstreamer-base/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-base/sys/src/auto/versions.txt b/gstreamer-base/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-base/sys/src/auto/versions.txt +++ b/gstreamer-base/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-base/sys/tests/abi.rs b/gstreamer-base/sys/tests/abi.rs index 1a539d207..077108265 100644 --- a/gstreamer-base/sys/tests/abi.rs +++ b/gstreamer-base/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-check/src/auto/test_clock.rs b/gstreamer-check/src/auto/test_clock.rs index f70b420b3..4988d03e1 100644 --- a/gstreamer-check/src/auto/test_clock.rs +++ b/gstreamer-check/src/auto/test_clock.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstTestClock")] @@ -119,7 +119,7 @@ impl TestClock { connect_raw( self.as_ptr() as *mut _, b"notify::clock-type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_clock_type_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-check/src/auto/versions.txt b/gstreamer-check/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-check/src/auto/versions.txt +++ b/gstreamer-check/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-check/sys/src/auto/versions.txt b/gstreamer-check/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-check/sys/src/auto/versions.txt +++ b/gstreamer-check/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-check/sys/tests/abi.rs b/gstreamer-check/sys/tests/abi.rs index 7e16f273b..379f187d3 100644 --- a/gstreamer-check/sys/tests/abi.rs +++ b/gstreamer-check/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-controller/src/auto/argb_control_binding.rs b/gstreamer-controller/src/auto/argb_control_binding.rs index 17cd24a75..e4465926d 100644 --- a/gstreamer-controller/src/auto/argb_control_binding.rs +++ b/gstreamer-controller/src/auto/argb_control_binding.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstARGBControlBinding")] @@ -116,7 +116,7 @@ pub trait ARGBControlBindingExt: IsA + sealed::Sealed + 'sta connect_raw( self.as_ptr() as *mut _, b"notify::control-source-a\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_control_source_a_trampoline:: as *const (), )), Box_::into_raw(f), @@ -145,7 +145,7 @@ pub trait ARGBControlBindingExt: IsA + sealed::Sealed + 'sta connect_raw( self.as_ptr() as *mut _, b"notify::control-source-b\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_control_source_b_trampoline:: as *const (), )), Box_::into_raw(f), @@ -174,7 +174,7 @@ pub trait ARGBControlBindingExt: IsA + sealed::Sealed + 'sta connect_raw( self.as_ptr() as *mut _, b"notify::control-source-g\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_control_source_g_trampoline:: as *const (), )), Box_::into_raw(f), @@ -203,7 +203,7 @@ pub trait ARGBControlBindingExt: IsA + sealed::Sealed + 'sta connect_raw( self.as_ptr() as *mut _, b"notify::control-source-r\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_control_source_r_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-controller/src/auto/direct_control_binding.rs b/gstreamer-controller/src/auto/direct_control_binding.rs index e92afcf04..8a1be2292 100644 --- a/gstreamer-controller/src/auto/direct_control_binding.rs +++ b/gstreamer-controller/src/auto/direct_control_binding.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstDirectControlBinding")] @@ -101,7 +101,7 @@ pub trait DirectControlBindingExt: IsA + sealed::Sealed + connect_raw( self.as_ptr() as *mut _, b"notify::control-source\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_control_source_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-controller/src/auto/enums.rs b/gstreamer-controller/src/auto/enums.rs index 2e710837e..e68b0ccb7 100644 --- a/gstreamer-controller/src/auto/enums.rs +++ b/gstreamer-controller/src/auto/enums.rs @@ -55,6 +55,7 @@ impl FromGlib for InterpolationMode { impl StaticType for InterpolationMode { #[inline] + #[doc(alias = "gst_interpolation_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_interpolation_mode_get_type()) } } @@ -66,7 +67,7 @@ impl glib::HasParamSpec for InterpolationMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -162,6 +163,7 @@ impl FromGlib for LFOWaveform { impl StaticType for LFOWaveform { #[inline] + #[doc(alias = "gst_lfo_waveform_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_lfo_waveform_get_type()) } } @@ -173,7 +175,7 @@ impl glib::HasParamSpec for LFOWaveform { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-controller/src/auto/interpolation_control_source.rs b/gstreamer-controller/src/auto/interpolation_control_source.rs index 22ea4f3cf..86ce323eb 100644 --- a/gstreamer-controller/src/auto/interpolation_control_source.rs +++ b/gstreamer-controller/src/auto/interpolation_control_source.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstInterpolationControlSource")] @@ -76,7 +76,7 @@ pub trait InterpolationControlSourceExt: connect_raw( self.as_ptr() as *mut _, b"notify::mode\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_mode_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-controller/src/auto/lfo_control_source.rs b/gstreamer-controller/src/auto/lfo_control_source.rs index 620727741..647051337 100644 --- a/gstreamer-controller/src/auto/lfo_control_source.rs +++ b/gstreamer-controller/src/auto/lfo_control_source.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstLFOControlSource")] @@ -108,7 +108,7 @@ pub trait LFOControlSourceExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::amplitude\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_amplitude_trampoline:: as *const (), )), Box_::into_raw(f), @@ -137,7 +137,7 @@ pub trait LFOControlSourceExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::frequency\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_frequency_trampoline:: as *const (), )), Box_::into_raw(f), @@ -163,7 +163,7 @@ pub trait LFOControlSourceExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::offset\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_offset_trampoline:: as *const (), )), Box_::into_raw(f), @@ -192,7 +192,7 @@ pub trait LFOControlSourceExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::timeshift\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_timeshift_trampoline:: as *const (), )), Box_::into_raw(f), @@ -221,7 +221,7 @@ pub trait LFOControlSourceExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::waveform\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_waveform_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-controller/src/auto/mod.rs b/gstreamer-controller/src/auto/mod.rs index 0fe3ad58b..ad828b1e0 100644 --- a/gstreamer-controller/src/auto/mod.rs +++ b/gstreamer-controller/src/auto/mod.rs @@ -28,8 +28,7 @@ mod enums; pub use self::enums::InterpolationMode; pub use self::enums::LFOWaveform; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::argb_control_binding::ARGBControlBindingExt; pub use super::direct_control_binding::DirectControlBindingExt; pub use super::interpolation_control_source::InterpolationControlSourceExt; diff --git a/gstreamer-controller/src/auto/timed_value_control_source.rs b/gstreamer-controller/src/auto/timed_value_control_source.rs index fca826178..65c3f40ba 100644 --- a/gstreamer-controller/src/auto/timed_value_control_source.rs +++ b/gstreamer-controller/src/auto/timed_value_control_source.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstTimedValueControlSource")] @@ -109,7 +109,7 @@ pub trait TimedValueControlSourceExt: connect_raw( self.as_ptr() as *mut _, b"value-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( value_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -141,7 +141,7 @@ pub trait TimedValueControlSourceExt: connect_raw( self.as_ptr() as *mut _, b"value-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( value_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -173,7 +173,7 @@ pub trait TimedValueControlSourceExt: connect_raw( self.as_ptr() as *mut _, b"value-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( value_removed_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-controller/src/auto/trigger_control_source.rs b/gstreamer-controller/src/auto/trigger_control_source.rs index 7255c087b..2d3fce45f 100644 --- a/gstreamer-controller/src/auto/trigger_control_source.rs +++ b/gstreamer-controller/src/auto/trigger_control_source.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstTriggerControlSource")] @@ -76,7 +76,7 @@ pub trait TriggerControlSourceExt: IsA + sealed::Sealed + connect_raw( self.as_ptr() as *mut _, b"notify::tolerance\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_tolerance_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-controller/src/auto/versions.txt b/gstreamer-controller/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-controller/src/auto/versions.txt +++ b/gstreamer-controller/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-controller/sys/src/auto/versions.txt b/gstreamer-controller/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-controller/sys/src/auto/versions.txt +++ b/gstreamer-controller/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-controller/sys/tests/abi.rs b/gstreamer-controller/sys/tests/abi.rs index cb9c6fefc..f922cb307 100644 --- a/gstreamer-controller/sys/tests/abi.rs +++ b/gstreamer-controller/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-editing-services/src/auto/asset.rs b/gstreamer-editing-services/src/auto/asset.rs index 09e16a989..957279d1f 100644 --- a/gstreamer-editing-services/src/auto/asset.rs +++ b/gstreamer-editing-services/src/auto/asset.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GESAsset")] @@ -41,7 +41,7 @@ impl Asset { ) -> Result, glib::Error> { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::ges_asset_request( extractable_type.into_glib(), id.to_glib_none().0, @@ -83,7 +83,7 @@ impl Asset { res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::ges_asset_request_finish(res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) @@ -138,7 +138,7 @@ pub trait AssetExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_asset_extract")] fn extract(&self) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::ges_asset_extract(self.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_none(ret)) @@ -241,7 +241,7 @@ pub trait AssetExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::proxy\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_proxy_trampoline:: as *const (), )), Box_::into_raw(f), @@ -270,7 +270,7 @@ pub trait AssetExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::proxy-target\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_proxy_target_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/clip.rs b/gstreamer-editing-services/src/auto/clip.rs index 3328b2f54..4af1d185f 100644 --- a/gstreamer-editing-services/src/auto/clip.rs +++ b/gstreamer-editing-services/src/auto/clip.rs @@ -15,10 +15,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -#[cfg(feature = "v1_18")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] -use std::ptr; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESClip")] @@ -59,7 +56,7 @@ pub trait ClipExt: IsA + sealed::Sealed + 'static { track: &impl IsA, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::ges_clip_add_child_to_track( self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0, @@ -79,7 +76,7 @@ pub trait ClipExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_clip_add_top_effect")] fn add_top_effect(&self, effect: &impl IsA, index: i32) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_clip_add_top_effect( self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0, @@ -150,7 +147,7 @@ pub trait ClipExt: IsA + sealed::Sealed + 'static { timeline_time: impl Into>, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::ges_clip_get_internal_time_from_timeline_time( self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0, @@ -191,7 +188,7 @@ pub trait ClipExt: IsA + sealed::Sealed + 'static { internal_time: impl Into>, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::ges_clip_get_timeline_time_from_internal_time( self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0, @@ -215,7 +212,7 @@ pub trait ClipExt: IsA + sealed::Sealed + 'static { frame_number: FrameNumber, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::ges_clip_get_timeline_time_from_source_frame( self.as_ref().to_glib_none().0, frame_number, @@ -279,7 +276,7 @@ pub trait ClipExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_clip_move_to_layer_full")] fn move_to_layer_full(&self, layer: &impl IsA) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_clip_move_to_layer_full( self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0, @@ -299,7 +296,7 @@ pub trait ClipExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_clip_remove_top_effect")] fn remove_top_effect(&self, effect: &impl IsA) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_clip_remove_top_effect( self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0, @@ -351,7 +348,7 @@ pub trait ClipExt: IsA + sealed::Sealed + 'static { newindex: u32, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_clip_set_top_effect_index_full( self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0, @@ -401,7 +398,7 @@ pub trait ClipExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_clip_split_full")] fn split_full(&self, position: u64) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::ges_clip_split_full(self.as_ref().to_glib_none().0, position, &mut error); if error.is_null() { @@ -429,7 +426,7 @@ pub trait ClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::duration-limit\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_duration_limit_trampoline:: as *const (), )), Box_::into_raw(f), @@ -452,7 +449,7 @@ pub trait ClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::layer\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_layer_trampoline:: as *const (), )), Box_::into_raw(f), @@ -478,7 +475,7 @@ pub trait ClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::supported-formats\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_supported_formats_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/clip_asset.rs b/gstreamer-editing-services/src/auto/clip_asset.rs index 0ae4a9cd5..6c1f5b0b0 100644 --- a/gstreamer-editing-services/src/auto/clip_asset.rs +++ b/gstreamer-editing-services/src/auto/clip_asset.rs @@ -12,10 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -#[cfg(feature = "v1_18")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] -use std::mem; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESClipAsset")] @@ -58,8 +55,8 @@ pub trait ClipAssetExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_natural_framerate")] fn natural_framerate(&self) -> Option<(i32, i32)> { unsafe { - let mut framerate_n = mem::MaybeUninit::uninit(); - let mut framerate_d = mem::MaybeUninit::uninit(); + let mut framerate_n = std::mem::MaybeUninit::uninit(); + let mut framerate_d = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::ges_clip_asset_get_natural_framerate( self.as_ref().to_glib_none().0, framerate_n.as_mut_ptr(), @@ -114,7 +111,7 @@ pub trait ClipAssetExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::supported-formats\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_supported_formats_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/container.rs b/gstreamer-editing-services/src/auto/container.rs index 9b04bc8eb..8e163ad81 100644 --- a/gstreamer-editing-services/src/auto/container.rs +++ b/gstreamer-editing-services/src/auto/container.rs @@ -10,7 +10,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESContainer")] @@ -138,7 +138,7 @@ pub trait GESContainerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"child-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( child_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -170,7 +170,7 @@ pub trait GESContainerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"child-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( child_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -193,7 +193,7 @@ pub trait GESContainerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::height\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_height_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/discoverer_manager.rs b/gstreamer-editing-services/src/auto/discoverer_manager.rs index 95abb14bb..d3fbb4c56 100644 --- a/gstreamer-editing-services/src/auto/discoverer_manager.rs +++ b/gstreamer-editing-services/src/auto/discoverer_manager.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESDiscovererManager")] @@ -106,7 +106,7 @@ impl DiscovererManager { connect_raw( self.as_ptr() as *mut _, b"discovered\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( discovered_trampoline:: as *const (), )), Box_::into_raw(f), @@ -142,7 +142,7 @@ impl DiscovererManager { connect_raw( self.as_ptr() as *mut _, b"load-serialized-info\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( load_serialized_info_trampoline:: as *const (), )), Box_::into_raw(f), @@ -167,7 +167,7 @@ impl DiscovererManager { connect_raw( self.as_ptr() as *mut _, b"notify::timeout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_timeout_trampoline:: as *const (), )), Box_::into_raw(f), @@ -190,7 +190,7 @@ impl DiscovererManager { connect_raw( self.as_ptr() as *mut _, b"notify::use-cache\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_use_cache_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/enums.rs b/gstreamer-editing-services/src/auto/enums.rs index 0d888d39e..6d474d9d1 100644 --- a/gstreamer-editing-services/src/auto/enums.rs +++ b/gstreamer-editing-services/src/auto/enums.rs @@ -7,9 +7,6 @@ #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] use glib::GStr; use glib::{prelude::*, translate::*}; -#[cfg(feature = "v1_16")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -137,9 +134,9 @@ impl Edge { #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] -impl fmt::Display for Edge { +impl std::fmt::Display for Edge { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -176,6 +173,7 @@ impl FromGlib for Edge { impl StaticType for Edge { #[inline] + #[doc(alias = "ges_edge_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::ges_edge_get_type()) } } @@ -187,7 +185,7 @@ impl glib::HasParamSpec for Edge { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -263,9 +261,9 @@ impl EditMode { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] -impl fmt::Display for EditMode { +impl std::fmt::Display for EditMode { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -306,6 +304,7 @@ impl FromGlib for EditMode { impl StaticType for EditMode { #[inline] + #[doc(alias = "ges_edit_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::ges_edit_mode_get_type()) } } @@ -317,7 +316,7 @@ impl glib::HasParamSpec for EditMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -481,6 +480,7 @@ impl FromGlib for TextHAlign { impl StaticType for TextHAlign { #[inline] + #[doc(alias = "ges_text_halign_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::ges_text_halign_get_type()) } } @@ -492,7 +492,7 @@ impl glib::HasParamSpec for TextHAlign { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -592,6 +592,7 @@ impl FromGlib for TextVAlign { impl StaticType for TextVAlign { #[inline] + #[doc(alias = "ges_text_valign_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::ges_text_valign_get_type()) } } @@ -603,7 +604,7 @@ impl glib::HasParamSpec for TextVAlign { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -973,6 +974,7 @@ impl FromGlib for VideoStandardTransitionTy impl StaticType for VideoStandardTransitionType { #[inline] + #[doc(alias = "ges_video_standard_transition_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::ges_video_standard_transition_type_get_type()) } } @@ -984,7 +986,7 @@ impl glib::HasParamSpec for VideoStandardTransitionType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1130,6 +1132,7 @@ impl FromGlib for VideoTestPattern { impl StaticType for VideoTestPattern { #[inline] + #[doc(alias = "ges_video_test_pattern_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::ges_video_test_pattern_get_type()) } } @@ -1141,7 +1144,7 @@ impl glib::HasParamSpec for VideoTestPattern { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-editing-services/src/auto/flags.rs b/gstreamer-editing-services/src/auto/flags.rs index 260e09cdd..736dc30e3 100644 --- a/gstreamer-editing-services/src/auto/flags.rs +++ b/gstreamer-editing-services/src/auto/flags.rs @@ -4,7 +4,6 @@ // DO NOT EDIT use glib::{bitflags::bitflags, prelude::*, translate::*, GStr}; -use std::fmt; #[cfg(feature = "v1_20")] bitflags! { @@ -46,6 +45,7 @@ impl FromGlib for MarkerFlags { #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl StaticType for MarkerFlags { #[inline] + #[doc(alias = "ges_marker_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::ges_marker_flags_get_type()) } } @@ -59,7 +59,7 @@ impl glib::HasParamSpec for MarkerFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -143,6 +143,7 @@ impl FromGlib for MetaFlag { impl StaticType for MetaFlag { #[inline] + #[doc(alias = "ges_meta_flag_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::ges_meta_flag_get_type()) } } @@ -154,7 +155,7 @@ impl glib::HasParamSpec for MetaFlag { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -234,6 +235,7 @@ impl FromGlib for PipelineFlags { impl StaticType for PipelineFlags { #[inline] + #[doc(alias = "ges_pipeline_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::ges_pipeline_flags_get_type()) } } @@ -245,7 +247,7 @@ impl glib::HasParamSpec for PipelineFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -316,9 +318,9 @@ impl TrackType { } } -impl fmt::Display for TrackType { +impl std::fmt::Display for TrackType { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -344,6 +346,7 @@ impl FromGlib for TrackType { impl StaticType for TrackType { #[inline] + #[doc(alias = "ges_track_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::ges_track_type_get_type()) } } @@ -355,7 +358,7 @@ impl glib::HasParamSpec for TrackType { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/gstreamer-editing-services/src/auto/formatter.rs b/gstreamer-editing-services/src/auto/formatter.rs index 400e4999c..65176e65e 100644 --- a/gstreamer-editing-services/src/auto/formatter.rs +++ b/gstreamer-editing-services/src/auto/formatter.rs @@ -6,7 +6,6 @@ use crate::{Asset, Extractable, Timeline}; use glib::{prelude::*, translate::*}; -use std::ptr; glib::wrapper! { #[doc(alias = "GESFormatter")] @@ -24,7 +23,7 @@ impl Formatter { pub fn can_load_uri(uri: &str) -> Result<(), glib::Error> { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_formatter_can_load_uri(uri.to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -39,7 +38,7 @@ impl Formatter { pub fn can_save_uri(uri: &str) -> Result<(), glib::Error> { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_formatter_can_save_uri(uri.to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -70,7 +69,7 @@ pub trait FormatterExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_formatter_load_from_uri")] fn load_from_uri(&self, timeline: &impl IsA, uri: &str) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_formatter_load_from_uri( self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0, @@ -96,7 +95,7 @@ pub trait FormatterExt: IsA + sealed::Sealed + 'static { overwrite: bool, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_formatter_save_to_uri( self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0, diff --git a/gstreamer-editing-services/src/auto/layer.rs b/gstreamer-editing-services/src/auto/layer.rs index ee92401ca..c16e4551f 100644 --- a/gstreamer-editing-services/src/auto/layer.rs +++ b/gstreamer-editing-services/src/auto/layer.rs @@ -13,10 +13,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -#[cfg(feature = "v1_18")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] -use std::ptr; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESLayer")] @@ -83,7 +80,7 @@ pub trait LayerExt: IsA + sealed::Sealed + 'static { track_types: TrackType, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::ges_layer_add_asset_full( self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0, @@ -119,7 +116,7 @@ pub trait LayerExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_layer_add_clip_full")] fn add_clip_full(&self, clip: &impl IsA) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_layer_add_clip_full( self.as_ref().to_glib_none().0, clip.as_ref().to_glib_none().0, @@ -289,7 +286,7 @@ pub trait LayerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"clip-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( clip_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -315,7 +312,7 @@ pub trait LayerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"clip-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( clip_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -341,7 +338,7 @@ pub trait LayerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::auto-transition\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_auto_transition_trampoline:: as *const (), )), Box_::into_raw(f), @@ -365,7 +362,7 @@ pub trait LayerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::priority\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_priority_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/marker.rs b/gstreamer-editing-services/src/auto/marker.rs index 52f47a439..33a1a04b1 100644 --- a/gstreamer-editing-services/src/auto/marker.rs +++ b/gstreamer-editing-services/src/auto/marker.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESMarker")] @@ -44,7 +44,7 @@ impl Marker { connect_raw( self.as_ptr() as *mut _, b"notify::position\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_position_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/marker_list.rs b/gstreamer-editing-services/src/auto/marker_list.rs index 43728232d..65ea25b95 100644 --- a/gstreamer-editing-services/src/auto/marker_list.rs +++ b/gstreamer-editing-services/src/auto/marker_list.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESMarkerList")] @@ -110,7 +110,7 @@ impl MarkerList { connect_raw( self.as_ptr() as *mut _, b"marker-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( marker_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -147,7 +147,7 @@ impl MarkerList { connect_raw( self.as_ptr() as *mut _, b"marker-moved\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( marker_moved_trampoline:: as *const (), )), Box_::into_raw(f), @@ -172,7 +172,7 @@ impl MarkerList { connect_raw( self.as_ptr() as *mut _, b"marker-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( marker_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -197,7 +197,7 @@ impl MarkerList { connect_raw( self.as_ptr() as *mut _, b"notify::flags\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_flags_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/meta_container.rs b/gstreamer-editing-services/src/auto/meta_container.rs index f247282ba..b16063a10 100644 --- a/gstreamer-editing-services/src/auto/meta_container.rs +++ b/gstreamer-editing-services/src/auto/meta_container.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESMetaContainer")] @@ -46,8 +46,8 @@ pub trait MetaContainerExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_meta_container_check_meta_registered")] fn check_meta_registered(&self, meta_item: &str) -> Option<(MetaFlag, glib::types::Type)> { unsafe { - let mut flags = mem::MaybeUninit::uninit(); - let mut type_ = mem::MaybeUninit::uninit(); + let mut flags = std::mem::MaybeUninit::uninit(); + let mut type_ = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::ges_meta_container_check_meta_registered( self.as_ref().to_glib_none().0, meta_item.to_glib_none().0, @@ -95,7 +95,7 @@ pub trait MetaContainerExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_boolean")] fn boolean(&self, meta_item: &str) -> Option { unsafe { - let mut dest = mem::MaybeUninit::uninit(); + let mut dest = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::ges_meta_container_get_boolean( self.as_ref().to_glib_none().0, meta_item.to_glib_none().0, @@ -113,7 +113,7 @@ pub trait MetaContainerExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_date")] fn date(&self, meta_item: &str) -> Option { unsafe { - let mut dest = ptr::null_mut(); + let mut dest = std::ptr::null_mut(); let ret = from_glib(ffi::ges_meta_container_get_date( self.as_ref().to_glib_none().0, meta_item.to_glib_none().0, @@ -131,7 +131,7 @@ pub trait MetaContainerExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_date_time")] fn date_time(&self, meta_item: &str) -> Option { unsafe { - let mut dest = ptr::null_mut(); + let mut dest = std::ptr::null_mut(); let ret = from_glib(ffi::ges_meta_container_get_date_time( self.as_ref().to_glib_none().0, meta_item.to_glib_none().0, @@ -149,7 +149,7 @@ pub trait MetaContainerExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_double")] fn double(&self, meta_item: &str) -> Option { unsafe { - let mut dest = mem::MaybeUninit::uninit(); + let mut dest = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::ges_meta_container_get_double( self.as_ref().to_glib_none().0, meta_item.to_glib_none().0, @@ -167,7 +167,7 @@ pub trait MetaContainerExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_float")] fn float(&self, meta_item: &str) -> Option { unsafe { - let mut dest = mem::MaybeUninit::uninit(); + let mut dest = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::ges_meta_container_get_float( self.as_ref().to_glib_none().0, meta_item.to_glib_none().0, @@ -185,7 +185,7 @@ pub trait MetaContainerExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_int")] fn int(&self, meta_item: &str) -> Option { unsafe { - let mut dest = mem::MaybeUninit::uninit(); + let mut dest = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::ges_meta_container_get_int( self.as_ref().to_glib_none().0, meta_item.to_glib_none().0, @@ -203,7 +203,7 @@ pub trait MetaContainerExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_int64")] fn int64(&self, meta_item: &str) -> Option { unsafe { - let mut dest = mem::MaybeUninit::uninit(); + let mut dest = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::ges_meta_container_get_int64( self.as_ref().to_glib_none().0, meta_item.to_glib_none().0, @@ -256,7 +256,7 @@ pub trait MetaContainerExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_uint")] fn uint(&self, meta_item: &str) -> Option { unsafe { - let mut dest = mem::MaybeUninit::uninit(); + let mut dest = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::ges_meta_container_get_uint( self.as_ref().to_glib_none().0, meta_item.to_glib_none().0, @@ -274,7 +274,7 @@ pub trait MetaContainerExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_uint64")] fn uint64(&self, meta_item: &str) -> Option { unsafe { - let mut dest = mem::MaybeUninit::uninit(); + let mut dest = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::ges_meta_container_get_uint64( self.as_ref().to_glib_none().0, meta_item.to_glib_none().0, @@ -620,7 +620,7 @@ pub trait MetaContainerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, signal_name.as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_meta_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/mod.rs b/gstreamer-editing-services/src/auto/mod.rs index b980a28fe..6043f23f7 100644 --- a/gstreamer-editing-services/src/auto/mod.rs +++ b/gstreamer-editing-services/src/auto/mod.rs @@ -213,8 +213,7 @@ pub use self::flags::TrackType; mod alias; pub use self::alias::FrameNumber; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::asset::AssetExt; pub use super::audio_test_source::AudioTestSourceExt; pub use super::audio_uri_source::AudioUriSourceExt; diff --git a/gstreamer-editing-services/src/auto/pipeline.rs b/gstreamer-editing-services/src/auto/pipeline.rs index 65d162a94..343073bcc 100644 --- a/gstreamer-editing-services/src/auto/pipeline.rs +++ b/gstreamer-editing-services/src/auto/pipeline.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESPipeline")] @@ -118,7 +118,7 @@ pub trait GESPipelineExt: IsA + sealed::Sealed + 'static { location: &str, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_pipeline_save_thumbnail( self.as_ref().to_glib_none().0, width, @@ -239,7 +239,7 @@ pub trait GESPipelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::audio-filter\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_audio_filter_trampoline:: as *const (), )), Box_::into_raw(f), @@ -262,7 +262,7 @@ pub trait GESPipelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::audio-sink\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_audio_sink_trampoline:: as *const (), )), Box_::into_raw(f), @@ -285,7 +285,7 @@ pub trait GESPipelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::mode\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_mode_trampoline:: as *const (), )), Box_::into_raw(f), @@ -308,7 +308,7 @@ pub trait GESPipelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::timeline\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_timeline_trampoline:: as *const (), )), Box_::into_raw(f), @@ -334,7 +334,7 @@ pub trait GESPipelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::video-filter\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_video_filter_trampoline:: as *const (), )), Box_::into_raw(f), @@ -357,7 +357,7 @@ pub trait GESPipelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::video-sink\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_video_sink_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/project.rs b/gstreamer-editing-services/src/auto/project.rs index d80781f73..a6fc7d599 100644 --- a/gstreamer-editing-services/src/auto/project.rs +++ b/gstreamer-editing-services/src/auto/project.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESProject")] @@ -95,7 +95,7 @@ pub trait ProjectExt: IsA + sealed::Sealed + 'static { extractable_type: glib::types::Type, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::ges_project_create_asset_sync( self.as_ref().to_glib_none().0, id.to_glib_none().0, @@ -160,7 +160,7 @@ pub trait ProjectExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_project_load")] fn load(&self, timeline: &impl IsA) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_project_load( self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0, @@ -197,7 +197,7 @@ pub trait ProjectExt: IsA + sealed::Sealed + 'static { overwrite: bool, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_project_save( self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0, @@ -236,7 +236,7 @@ pub trait ProjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"asset-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( asset_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -265,7 +265,7 @@ pub trait ProjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"asset-loading\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( asset_loading_trampoline:: as *const (), )), Box_::into_raw(f), @@ -294,7 +294,7 @@ pub trait ProjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"asset-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( asset_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -330,7 +330,7 @@ pub trait ProjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"error-loading\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( error_loading_trampoline:: as *const (), )), Box_::into_raw(f), @@ -368,7 +368,7 @@ pub trait ProjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"error-loading-asset\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( error_loading_asset_trampoline:: as *const (), )), Box_::into_raw(f), @@ -394,7 +394,7 @@ pub trait ProjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"loaded\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( loaded_trampoline:: as *const (), )), Box_::into_raw(f), @@ -422,7 +422,7 @@ pub trait ProjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"loading\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( loading_trampoline:: as *const (), )), Box_::into_raw(f), @@ -459,7 +459,7 @@ pub trait ProjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"missing-uri\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( missing_uri_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/test_clip.rs b/gstreamer-editing-services/src/auto/test_clip.rs index 6ad7bb0ae..adafeacfa 100644 --- a/gstreamer-editing-services/src/auto/test_clip.rs +++ b/gstreamer-editing-services/src/auto/test_clip.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESTestClip")] @@ -123,7 +123,7 @@ pub trait TestClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::freq\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_freq_trampoline:: as *const (), )), Box_::into_raw(f), @@ -146,7 +146,7 @@ pub trait TestClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::mute\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_mute_trampoline:: as *const (), )), Box_::into_raw(f), @@ -169,7 +169,7 @@ pub trait TestClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::volume\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_volume_trampoline:: as *const (), )), Box_::into_raw(f), @@ -192,7 +192,7 @@ pub trait TestClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::vpattern\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_vpattern_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/text_overlay_clip.rs b/gstreamer-editing-services/src/auto/text_overlay_clip.rs index 33722db14..fbce59cf4 100644 --- a/gstreamer-editing-services/src/auto/text_overlay_clip.rs +++ b/gstreamer-editing-services/src/auto/text_overlay_clip.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESTextOverlayClip")] @@ -184,7 +184,7 @@ pub trait TextOverlayClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::color\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_color_trampoline:: as *const (), )), Box_::into_raw(f), @@ -210,7 +210,7 @@ pub trait TextOverlayClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::font-desc\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_font_desc_trampoline:: as *const (), )), Box_::into_raw(f), @@ -236,7 +236,7 @@ pub trait TextOverlayClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::halignment\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_halignment_trampoline:: as *const (), )), Box_::into_raw(f), @@ -262,7 +262,7 @@ pub trait TextOverlayClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::text\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_text_trampoline:: as *const (), )), Box_::into_raw(f), @@ -288,7 +288,7 @@ pub trait TextOverlayClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::valignment\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_valignment_trampoline:: as *const (), )), Box_::into_raw(f), @@ -314,7 +314,7 @@ pub trait TextOverlayClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::xpos\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_xpos_trampoline:: as *const (), )), Box_::into_raw(f), @@ -340,7 +340,7 @@ pub trait TextOverlayClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::ypos\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_ypos_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/timeline.rs b/gstreamer-editing-services/src/auto/timeline.rs index 00de8f713..0819ce370 100644 --- a/gstreamer-editing-services/src/auto/timeline.rs +++ b/gstreamer-editing-services/src/auto/timeline.rs @@ -15,7 +15,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESTimeline")] @@ -46,7 +46,7 @@ impl Timeline { pub fn from_uri(uri: &str) -> Result { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::ges_timeline_new_from_uri(uri.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_none(ret)) @@ -289,7 +289,7 @@ pub trait TimelineExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_timeline_load_from_uri")] fn load_from_uri(&self, uri: &str) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_timeline_load_from_uri( self.as_ref().to_glib_none().0, uri.to_glib_none().0, @@ -375,7 +375,7 @@ pub trait TimelineExt: IsA + sealed::Sealed + 'static { overwrite: bool, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_timeline_save_to_uri( self.as_ref().to_glib_none().0, uri.to_glib_none().0, @@ -435,7 +435,7 @@ pub trait TimelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"commited\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( commited_trampoline:: as *const (), )), Box_::into_raw(f), @@ -464,7 +464,7 @@ pub trait TimelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"group-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( group_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -498,7 +498,7 @@ pub trait TimelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"layer-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( layer_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -527,7 +527,7 @@ pub trait TimelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"layer-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( layer_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -566,7 +566,7 @@ pub trait TimelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"select-element-track\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( select_element_track_trampoline:: as *const (), )), Box_::into_raw(f), @@ -607,7 +607,7 @@ pub trait TimelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"snapping-ended\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( snapping_ended_trampoline:: as *const (), )), Box_::into_raw(f), @@ -643,7 +643,7 @@ pub trait TimelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"snapping-started\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( snapping_started_trampoline:: as *const (), )), Box_::into_raw(f), @@ -672,7 +672,7 @@ pub trait TimelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"track-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( track_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -701,7 +701,7 @@ pub trait TimelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"track-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( track_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -727,7 +727,7 @@ pub trait TimelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::auto-transition\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_auto_transition_trampoline:: as *const (), )), Box_::into_raw(f), @@ -750,7 +750,7 @@ pub trait TimelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_duration_trampoline:: as *const (), )), Box_::into_raw(f), @@ -776,7 +776,7 @@ pub trait TimelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::snapping-distance\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_snapping_distance_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/timeline_element.rs b/gstreamer-editing-services/src/auto/timeline_element.rs index fd8e5a0eb..ee9603141 100644 --- a/gstreamer-editing-services/src/auto/timeline_element.rs +++ b/gstreamer-editing-services/src/auto/timeline_element.rs @@ -13,7 +13,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESTimelineElement")] @@ -97,7 +97,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { position: u64, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_timeline_element_edit_full( self.as_ref().to_glib_none().0, new_layer_priority, @@ -215,8 +215,8 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_natural_framerate")] fn natural_framerate(&self) -> Option<(i32, i32)> { unsafe { - let mut framerate_n = mem::MaybeUninit::uninit(); - let mut framerate_d = mem::MaybeUninit::uninit(); + let mut framerate_n = std::mem::MaybeUninit::uninit(); + let mut framerate_d = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::ges_timeline_element_get_natural_framerate( self.as_ref().to_glib_none().0, framerate_n.as_mut_ptr(), @@ -292,7 +292,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_timeline_element_list_children_properties")] fn list_children_properties(&self) -> Vec { unsafe { - let mut n_properties = mem::MaybeUninit::uninit(); + let mut n_properties = std::mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_full_num( ffi::ges_timeline_element_list_children_properties( self.as_ref().to_glib_none().0, @@ -307,8 +307,8 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_timeline_element_lookup_child")] fn lookup_child(&self, prop_name: &str) -> Option<(glib::Object, glib::ParamSpec)> { unsafe { - let mut child = ptr::null_mut(); - let mut pspec = ptr::null_mut(); + let mut child = std::ptr::null_mut(); + let mut pspec = std::ptr::null_mut(); let ret = from_glib(ffi::ges_timeline_element_lookup_child( self.as_ref().to_glib_none().0, prop_name.to_glib_none().0, @@ -439,7 +439,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { value: &glib::Value, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_timeline_element_set_child_property_full( self.as_ref().to_glib_none().0, property_name.to_glib_none().0, @@ -607,7 +607,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"child-property-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( child_property_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -643,7 +643,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"child-property-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( child_property_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -682,7 +682,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, signal_name.as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( deep_notify_trampoline:: as *const (), )), Box_::into_raw(f), @@ -708,7 +708,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_duration_trampoline:: as *const (), )), Box_::into_raw(f), @@ -734,7 +734,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::in-point\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_in_point_trampoline:: as *const (), )), Box_::into_raw(f), @@ -760,7 +760,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::max-duration\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_duration_trampoline:: as *const (), )), Box_::into_raw(f), @@ -786,7 +786,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::name\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_name_trampoline:: as *const (), )), Box_::into_raw(f), @@ -812,7 +812,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::parent\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_parent_trampoline:: as *const (), )), Box_::into_raw(f), @@ -839,7 +839,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::priority\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_priority_trampoline:: as *const (), )), Box_::into_raw(f), @@ -865,7 +865,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::serialize\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_serialize_trampoline:: as *const (), )), Box_::into_raw(f), @@ -891,7 +891,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::start\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_start_trampoline:: as *const (), )), Box_::into_raw(f), @@ -917,7 +917,7 @@ pub trait TimelineElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::timeline\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_timeline_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/title_clip.rs b/gstreamer-editing-services/src/auto/title_clip.rs index d3cba438b..cf482e034 100644 --- a/gstreamer-editing-services/src/auto/title_clip.rs +++ b/gstreamer-editing-services/src/auto/title_clip.rs @@ -13,7 +13,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESTitleClip")] @@ -220,7 +220,7 @@ pub trait TitleClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::background\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_background_trampoline:: as *const (), )), Box_::into_raw(f), @@ -244,7 +244,7 @@ pub trait TitleClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::color\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_color_trampoline:: as *const (), )), Box_::into_raw(f), @@ -268,7 +268,7 @@ pub trait TitleClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::font-desc\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_font_desc_trampoline:: as *const (), )), Box_::into_raw(f), @@ -295,7 +295,7 @@ pub trait TitleClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::halignment\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_halignment_trampoline:: as *const (), )), Box_::into_raw(f), @@ -319,7 +319,7 @@ pub trait TitleClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::text\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_text_trampoline:: as *const (), )), Box_::into_raw(f), @@ -346,7 +346,7 @@ pub trait TitleClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::valignment\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_valignment_trampoline:: as *const (), )), Box_::into_raw(f), @@ -370,7 +370,7 @@ pub trait TitleClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::xpos\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_xpos_trampoline:: as *const (), )), Box_::into_raw(f), @@ -394,7 +394,7 @@ pub trait TitleClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::ypos\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_ypos_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/track.rs b/gstreamer-editing-services/src/auto/track.rs index 0250cf6f5..da06f7aa5 100644 --- a/gstreamer-editing-services/src/auto/track.rs +++ b/gstreamer-editing-services/src/auto/track.rs @@ -9,10 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -#[cfg(feature = "v1_18")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] -use std::ptr; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESTrack")] @@ -57,7 +54,7 @@ pub trait GESTrackExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_track_add_element_full")] fn add_element_full(&self, object: &impl IsA) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_track_add_element_full( self.as_ref().to_glib_none().0, object.as_ref().to_glib_none().0, @@ -138,7 +135,7 @@ pub trait GESTrackExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_track_remove_element_full")] fn remove_element_full(&self, object: &impl IsA) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::ges_track_remove_element_full( self.as_ref().to_glib_none().0, object.as_ref().to_glib_none().0, @@ -235,7 +232,7 @@ pub trait GESTrackExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"commited\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( commited_trampoline:: as *const (), )), Box_::into_raw(f), @@ -267,7 +264,7 @@ pub trait GESTrackExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"track-element-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( track_element_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -299,7 +296,7 @@ pub trait GESTrackExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"track-element-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( track_element_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -322,7 +319,7 @@ pub trait GESTrackExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_duration_trampoline:: as *const (), )), Box_::into_raw(f), @@ -347,7 +344,7 @@ pub trait GESTrackExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::id\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_id_trampoline:: as *const (), )), Box_::into_raw(f), @@ -370,7 +367,7 @@ pub trait GESTrackExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::mixing\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_mixing_trampoline:: as *const (), )), Box_::into_raw(f), @@ -396,7 +393,7 @@ pub trait GESTrackExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::restriction-caps\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_restriction_caps_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/track_element.rs b/gstreamer-editing-services/src/auto/track_element.rs index f390cf392..b5158c85e 100644 --- a/gstreamer-editing-services/src/auto/track_element.rs +++ b/gstreamer-editing-services/src/auto/track_element.rs @@ -10,7 +10,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESTrackElement")] @@ -243,7 +243,7 @@ pub trait TrackElementExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_track_element_list_children_properties")] fn list_children_properties(&self) -> Vec { unsafe { - let mut n_properties = mem::MaybeUninit::uninit(); + let mut n_properties = std::mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_full_num( ffi::ges_track_element_list_children_properties( self.as_ref().to_glib_none().0, @@ -258,8 +258,8 @@ pub trait TrackElementExt: IsA + sealed::Sealed + 'static { #[doc(alias = "ges_track_element_lookup_child")] fn lookup_child(&self, prop_name: &str) -> Option<(gst::Element, glib::ParamSpec)> { unsafe { - let mut element = ptr::null_mut(); - let mut pspec = ptr::null_mut(); + let mut element = std::ptr::null_mut(); + let mut pspec = std::ptr::null_mut(); let ret = from_glib(ffi::ges_track_element_lookup_child( self.as_ref().to_glib_none().0, prop_name.to_glib_none().0, @@ -411,7 +411,7 @@ pub trait TrackElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"control-binding-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( control_binding_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -443,7 +443,7 @@ pub trait TrackElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"control-binding-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( control_binding_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -466,7 +466,7 @@ pub trait TrackElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::active\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_active_trampoline:: as *const (), )), Box_::into_raw(f), @@ -497,7 +497,7 @@ pub trait TrackElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::auto-clamp-control-sources\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_auto_clamp_control_sources_trampoline:: as *const (), )), Box_::into_raw(f), @@ -525,7 +525,7 @@ pub trait TrackElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::has-internal-source\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_has_internal_source_trampoline:: as *const (), )), Box_::into_raw(f), @@ -548,7 +548,7 @@ pub trait TrackElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::track\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_track_trampoline:: as *const (), )), Box_::into_raw(f), @@ -574,7 +574,7 @@ pub trait TrackElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::track-type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_track_type_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/track_element_asset.rs b/gstreamer-editing-services/src/auto/track_element_asset.rs index 41220e94b..5df9b8361 100644 --- a/gstreamer-editing-services/src/auto/track_element_asset.rs +++ b/gstreamer-editing-services/src/auto/track_element_asset.rs @@ -9,10 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -#[cfg(feature = "v1_18")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] -use std::mem; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESTrackElementAsset")] @@ -42,8 +39,8 @@ pub trait TrackElementAssetExt: IsA + sealed::Sealed + 'stati #[doc(alias = "get_natural_framerate")] fn natural_framerate(&self) -> Option<(i32, i32)> { unsafe { - let mut framerate_n = mem::MaybeUninit::uninit(); - let mut framerate_d = mem::MaybeUninit::uninit(); + let mut framerate_n = std::mem::MaybeUninit::uninit(); + let mut framerate_d = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::ges_track_element_asset_get_natural_framerate( self.as_ref().to_glib_none().0, framerate_n.as_mut_ptr(), @@ -98,7 +95,7 @@ pub trait TrackElementAssetExt: IsA + sealed::Sealed + 'stati connect_raw( self.as_ptr() as *mut _, b"notify::track-type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_track_type_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/transition_clip.rs b/gstreamer-editing-services/src/auto/transition_clip.rs index 8c02f123a..1948bb5fe 100644 --- a/gstreamer-editing-services/src/auto/transition_clip.rs +++ b/gstreamer-editing-services/src/auto/transition_clip.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESTransitionClip")] @@ -72,7 +72,7 @@ pub trait TransitionClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::vtype\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_vtype_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/uri_clip.rs b/gstreamer-editing-services/src/auto/uri_clip.rs index 1d9014d6c..39f20025d 100644 --- a/gstreamer-editing-services/src/auto/uri_clip.rs +++ b/gstreamer-editing-services/src/auto/uri_clip.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESUriClip")] @@ -84,7 +84,7 @@ pub trait UriClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-image\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_image_trampoline:: as *const (), )), Box_::into_raw(f), @@ -107,7 +107,7 @@ pub trait UriClipExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::mute\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_mute_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/uri_clip_asset.rs b/gstreamer-editing-services/src/auto/uri_clip_asset.rs index a5e46ef77..b192dfbb7 100644 --- a/gstreamer-editing-services/src/auto/uri_clip_asset.rs +++ b/gstreamer-editing-services/src/auto/uri_clip_asset.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute, ptr}; +use std::boxed::Box as Box_; #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] @@ -54,7 +54,7 @@ impl UriClipAsset { pub fn request_sync(uri: &str) -> Result { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::ges_uri_clip_asset_request_sync(uri.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -159,7 +159,7 @@ pub trait UriClipAssetExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_duration_trampoline:: as *const (), )), Box_::into_raw(f), @@ -190,7 +190,7 @@ pub trait UriClipAssetExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-nested-timeline\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_nested_timeline_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/src/auto/versions.txt b/gstreamer-editing-services/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-editing-services/src/auto/versions.txt +++ b/gstreamer-editing-services/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-editing-services/src/auto/video_source.rs b/gstreamer-editing-services/src/auto/video_source.rs index c2ae33912..5783274b3 100644 --- a/gstreamer-editing-services/src/auto/video_source.rs +++ b/gstreamer-editing-services/src/auto/video_source.rs @@ -8,9 +8,6 @@ use glib::prelude::*; #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] use glib::translate::*; -#[cfg(feature = "v1_18")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] -use std::mem; glib::wrapper! { #[doc(alias = "GESVideoSource")] @@ -37,8 +34,8 @@ pub trait VideoSourceExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_natural_size")] fn natural_size(&self) -> Option<(i32, i32)> { unsafe { - let mut width = mem::MaybeUninit::uninit(); - let mut height = mem::MaybeUninit::uninit(); + let mut width = std::mem::MaybeUninit::uninit(); + let mut height = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::ges_video_source_get_natural_size( self.as_ref().to_glib_none().0, width.as_mut_ptr(), diff --git a/gstreamer-editing-services/src/auto/video_transition.rs b/gstreamer-editing-services/src/auto/video_transition.rs index 810464a88..9f63f676a 100644 --- a/gstreamer-editing-services/src/auto/video_transition.rs +++ b/gstreamer-editing-services/src/auto/video_transition.rs @@ -13,7 +13,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GESVideoTransition")] @@ -134,7 +134,7 @@ pub trait VideoTransitionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::border\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_border_trampoline:: as *const (), )), Box_::into_raw(f), @@ -161,7 +161,7 @@ pub trait VideoTransitionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::invert\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_invert_trampoline:: as *const (), )), Box_::into_raw(f), @@ -187,7 +187,7 @@ pub trait VideoTransitionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::transition-type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_transition_type_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-editing-services/sys/src/auto/versions.txt b/gstreamer-editing-services/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-editing-services/sys/src/auto/versions.txt +++ b/gstreamer-editing-services/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-editing-services/sys/tests/abi.rs b/gstreamer-editing-services/sys/tests/abi.rs index 964aa1c3e..86d19d82c 100644 --- a/gstreamer-editing-services/sys/tests/abi.rs +++ b/gstreamer-editing-services/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-gl/egl/src/auto/versions.txt b/gstreamer-gl/egl/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-gl/egl/src/auto/versions.txt +++ b/gstreamer-gl/egl/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-gl/egl/sys/src/auto/versions.txt b/gstreamer-gl/egl/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-gl/egl/sys/src/auto/versions.txt +++ b/gstreamer-gl/egl/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-gl/egl/sys/tests/abi.rs b/gstreamer-gl/egl/sys/tests/abi.rs index 3782d3e74..bdfd19752 100644 --- a/gstreamer-gl/egl/sys/tests/abi.rs +++ b/gstreamer-gl/egl/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-gl/src/auto/enums.rs b/gstreamer-gl/src/auto/enums.rs index aa5df456d..b6760895d 100644 --- a/gstreamer-gl/src/auto/enums.rs +++ b/gstreamer-gl/src/auto/enums.rs @@ -5,7 +5,6 @@ use crate::{GLContext, GLSLProfile}; use glib::{prelude::*, translate::*}; -use std::mem; #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] @@ -72,6 +71,7 @@ impl FromGlib for GLConfigCaveat { #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl StaticType for GLConfigCaveat { #[inline] + #[doc(alias = "gst_gl_config_caveat_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_gl_config_caveat_get_type()) } } @@ -85,7 +85,7 @@ impl glib::HasParamSpec for GLConfigCaveat { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -217,6 +217,7 @@ impl glib::error::ErrorDomain for GLContextError { impl StaticType for GLContextError { #[inline] + #[doc(alias = "gst_gl_context_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_gl_context_error_get_type()) } } @@ -228,7 +229,7 @@ impl glib::HasParamSpec for GLContextError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -360,8 +361,8 @@ impl GLFormat { pub fn type_from_sized_gl_format(self) -> (GLFormat, u32) { assert_initialized_main_thread!(); unsafe { - let mut unsized_format = mem::MaybeUninit::uninit(); - let mut gl_type = mem::MaybeUninit::uninit(); + let mut unsized_format = std::mem::MaybeUninit::uninit(); + let mut gl_type = std::mem::MaybeUninit::uninit(); ffi::gst_gl_format_type_from_sized_gl_format( self.into_glib(), unsized_format.as_mut_ptr(), @@ -443,6 +444,7 @@ impl FromGlib for GLFormat { impl StaticType for GLFormat { #[inline] + #[doc(alias = "gst_gl_format_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_gl_format_get_type()) } } @@ -454,7 +456,7 @@ impl glib::HasParamSpec for GLFormat { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -542,6 +544,7 @@ impl FromGlib for GLQueryType { impl StaticType for GLQueryType { #[inline] + #[doc(alias = "gst_gl_query_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_gl_query_type_get_type()) } } @@ -553,7 +556,7 @@ impl glib::HasParamSpec for GLQueryType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -664,6 +667,7 @@ impl glib::error::ErrorDomain for GLSLError { impl StaticType for GLSLError { #[inline] + #[doc(alias = "gst_glsl_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_glsl_error_get_type()) } } @@ -675,7 +679,7 @@ impl glib::HasParamSpec for GLSLError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -770,8 +774,8 @@ impl GLSLVersion { pub fn profile_from_string(string: &str) -> Option<(GLSLVersion, GLSLProfile)> { assert_initialized_main_thread!(); unsafe { - let mut version_ret = mem::MaybeUninit::uninit(); - let mut profile_ret = mem::MaybeUninit::uninit(); + let mut version_ret = std::mem::MaybeUninit::uninit(); + let mut profile_ret = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_glsl_version_profile_from_string( string.to_glib_none().0, version_ret.as_mut_ptr(), @@ -865,6 +869,7 @@ impl FromGlib for GLSLVersion { impl StaticType for GLSLVersion { #[inline] + #[doc(alias = "gst_glsl_version_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_glsl_version_get_type()) } } @@ -876,7 +881,7 @@ impl glib::HasParamSpec for GLSLVersion { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -964,6 +969,7 @@ impl FromGlib for GLStereoDownmix { impl StaticType for GLStereoDownmix { #[inline] + #[doc(alias = "gst_gl_stereo_downmix_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_gl_stereo_downmix_get_type()) } } @@ -975,7 +981,7 @@ impl glib::HasParamSpec for GLStereoDownmix { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1104,6 +1110,7 @@ impl FromGlib for GLTextureTarget { impl StaticType for GLTextureTarget { #[inline] + #[doc(alias = "gst_gl_texture_target_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_gl_texture_target_get_type()) } } @@ -1115,7 +1122,7 @@ impl glib::HasParamSpec for GLTextureTarget { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1211,6 +1218,7 @@ impl FromGlib for GLUploadReturn { impl StaticType for GLUploadReturn { #[inline] + #[doc(alias = "gst_gl_upload_return_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_gl_upload_return_get_type()) } } @@ -1222,7 +1230,7 @@ impl glib::HasParamSpec for GLUploadReturn { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1334,6 +1342,7 @@ impl glib::error::ErrorDomain for GLWindowError { impl StaticType for GLWindowError { #[inline] + #[doc(alias = "gst_gl_window_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_gl_window_error_get_type()) } } @@ -1345,7 +1354,7 @@ impl glib::HasParamSpec for GLWindowError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-gl/src/auto/flags.rs b/gstreamer-gl/src/auto/flags.rs index 8260bcd76..eb78ae72d 100644 --- a/gstreamer-gl/src/auto/flags.rs +++ b/gstreamer-gl/src/auto/flags.rs @@ -4,7 +4,6 @@ // DO NOT EDIT use glib::{bitflags::bitflags, prelude::*, translate::*}; -use std::fmt; bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] @@ -36,9 +35,9 @@ impl GLAPI { } } -impl fmt::Display for GLAPI { +impl std::fmt::Display for GLAPI { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } @@ -64,6 +63,7 @@ impl FromGlib for GLAPI { impl StaticType for GLAPI { #[inline] + #[doc(alias = "gst_gl_api_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_gl_api_get_type()) } } @@ -75,7 +75,7 @@ impl glib::HasParamSpec for GLAPI { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -172,6 +172,7 @@ impl FromGlib for GLConfigSurfaceType { #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl StaticType for GLConfigSurfaceType { #[inline] + #[doc(alias = "gst_gl_config_surface_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_gl_config_surface_type_get_type()) } } @@ -185,7 +186,7 @@ impl glib::HasParamSpec for GLConfigSurfaceType { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -295,6 +296,7 @@ impl FromGlib for GLDisplayType { impl StaticType for GLDisplayType { #[inline] + #[doc(alias = "gst_gl_display_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_gl_display_type_get_type()) } } @@ -306,7 +308,7 @@ impl glib::HasParamSpec for GLDisplayType { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -384,9 +386,9 @@ impl GLPlatform { } } -impl fmt::Display for GLPlatform { +impl std::fmt::Display for GLPlatform { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } @@ -412,6 +414,7 @@ impl FromGlib for GLPlatform { impl StaticType for GLPlatform { #[inline] + #[doc(alias = "gst_gl_platform_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_gl_platform_get_type()) } } @@ -423,7 +426,7 @@ impl glib::HasParamSpec for GLPlatform { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -514,6 +517,7 @@ impl FromGlib for GLSLProfile { impl StaticType for GLSLProfile { #[inline] + #[doc(alias = "gst_glsl_profile_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_glsl_profile_get_type()) } } @@ -525,7 +529,7 @@ impl glib::HasParamSpec for GLSLProfile { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/gstreamer-gl/src/auto/functions.rs b/gstreamer-gl/src/auto/functions.rs index be4b0dcde..f87bf6753 100644 --- a/gstreamer-gl/src/auto/functions.rs +++ b/gstreamer-gl/src/auto/functions.rs @@ -5,7 +5,6 @@ use crate::{GLDisplay, GLSLProfile, GLSLVersion}; use glib::{prelude::*, translate::*}; -use std::mem; #[doc(alias = "gst_gl_check_extension")] pub fn gl_check_extension(name: &str, ext: &str) -> bool { @@ -50,8 +49,8 @@ pub fn gl_element_propagate_display_context( pub fn glsl_string_get_version_profile(s: &str) -> Option<(GLSLVersion, GLSLProfile)> { assert_initialized_main_thread!(); unsafe { - let mut version = mem::MaybeUninit::uninit(); - let mut profile = mem::MaybeUninit::uninit(); + let mut version = std::mem::MaybeUninit::uninit(); + let mut profile = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_glsl_string_get_version_profile( s.to_glib_none().0, version.as_mut_ptr(), diff --git a/gstreamer-gl/src/auto/gl_base_filter.rs b/gstreamer-gl/src/auto/gl_base_filter.rs index b3522d61a..ecf993b88 100644 --- a/gstreamer-gl/src/auto/gl_base_filter.rs +++ b/gstreamer-gl/src/auto/gl_base_filter.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstGLBaseFilter")] @@ -81,7 +81,7 @@ pub trait GLBaseFilterExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::context\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_context_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-gl/src/auto/gl_base_src.rs b/gstreamer-gl/src/auto/gl_base_src.rs index c412e8d31..09242bd86 100644 --- a/gstreamer-gl/src/auto/gl_base_src.rs +++ b/gstreamer-gl/src/auto/gl_base_src.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstGLBaseSrc")] @@ -63,7 +63,7 @@ pub trait GLBaseSrcExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::timestamp-offset\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_timestamp_offset_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-gl/src/auto/gl_context.rs b/gstreamer-gl/src/auto/gl_context.rs index 6268bfd23..d74f4823b 100644 --- a/gstreamer-gl/src/auto/gl_context.rs +++ b/gstreamer-gl/src/auto/gl_context.rs @@ -5,7 +5,6 @@ use crate::{GLDisplay, GLPlatform, GLSLProfile, GLSLVersion, GLWindow, GLAPI}; use glib::{prelude::*, translate::*}; -use std::{mem, ptr}; glib::wrapper! { #[doc(alias = "GstGLContext")] @@ -37,8 +36,8 @@ impl GLContext { pub fn current_gl_api(platform: GLPlatform) -> (GLAPI, u32, u32) { assert_initialized_main_thread!(); unsafe { - let mut major = mem::MaybeUninit::uninit(); - let mut minor = mem::MaybeUninit::uninit(); + let mut major = std::mem::MaybeUninit::uninit(); + let mut minor = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_gl_context_get_current_gl_api( platform.into_glib(), major.as_mut_ptr(), @@ -127,7 +126,7 @@ pub trait GLContextExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gst_gl_context_create")] fn create(&self, other_context: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gst_gl_context_create( self.as_ref().to_glib_none().0, other_context.map(|p| p.as_ref()).to_glib_none().0, @@ -152,7 +151,7 @@ pub trait GLContextExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gst_gl_context_fill_info")] fn fill_info(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gst_gl_context_fill_info(self.as_ref().to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -209,8 +208,8 @@ pub trait GLContextExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_gl_platform_version")] fn gl_platform_version(&self) -> (i32, i32) { unsafe { - let mut major = mem::MaybeUninit::uninit(); - let mut minor = mem::MaybeUninit::uninit(); + let mut major = std::mem::MaybeUninit::uninit(); + let mut minor = std::mem::MaybeUninit::uninit(); ffi::gst_gl_context_get_gl_platform_version( self.as_ref().to_glib_none().0, major.as_mut_ptr(), @@ -224,8 +223,8 @@ pub trait GLContextExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_gl_version")] fn gl_version(&self) -> (i32, i32) { unsafe { - let mut maj = mem::MaybeUninit::uninit(); - let mut min = mem::MaybeUninit::uninit(); + let mut maj = std::mem::MaybeUninit::uninit(); + let mut min = std::mem::MaybeUninit::uninit(); ffi::gst_gl_context_get_gl_version( self.as_ref().to_glib_none().0, maj.as_mut_ptr(), diff --git a/gstreamer-gl/src/auto/gl_display.rs b/gstreamer-gl/src/auto/gl_display.rs index 19f651c72..2083f91ed 100644 --- a/gstreamer-gl/src/auto/gl_display.rs +++ b/gstreamer-gl/src/auto/gl_display.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstGLDisplay")] @@ -148,7 +148,7 @@ pub trait GLDisplayExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"create-context\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( create_context_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-gl/src/auto/gl_framebuffer.rs b/gstreamer-gl/src/auto/gl_framebuffer.rs index 104b9389c..309669db3 100644 --- a/gstreamer-gl/src/auto/gl_framebuffer.rs +++ b/gstreamer-gl/src/auto/gl_framebuffer.rs @@ -5,7 +5,6 @@ use crate::{GLBaseMemory, GLContext}; use glib::{prelude::*, translate::*}; -use std::mem; glib::wrapper! { #[doc(alias = "GstGLFramebuffer")] @@ -76,8 +75,8 @@ pub trait GLFramebufferExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_effective_dimensions")] fn effective_dimensions(&self) -> (u32, u32) { unsafe { - let mut width = mem::MaybeUninit::uninit(); - let mut height = mem::MaybeUninit::uninit(); + let mut width = std::mem::MaybeUninit::uninit(); + let mut height = std::mem::MaybeUninit::uninit(); ffi::gst_gl_framebuffer_get_effective_dimensions( self.as_ref().to_glib_none().0, width.as_mut_ptr(), diff --git a/gstreamer-gl/src/auto/gl_overlay_compositor.rs b/gstreamer-gl/src/auto/gl_overlay_compositor.rs index cb7e77eb2..02bc3e389 100644 --- a/gstreamer-gl/src/auto/gl_overlay_compositor.rs +++ b/gstreamer-gl/src/auto/gl_overlay_compositor.rs @@ -10,7 +10,7 @@ use glib::signal::{connect_raw, SignalHandlerId}; use glib::{prelude::*, translate::*}; #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstGLOverlayCompositor")] @@ -90,7 +90,7 @@ impl GLOverlayCompositor { connect_raw( self.as_ptr() as *mut _, b"notify::yinvert\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_yinvert_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-gl/src/auto/gl_shader.rs b/gstreamer-gl/src/auto/gl_shader.rs index 300e95662..0f439f86c 100644 --- a/gstreamer-gl/src/auto/gl_shader.rs +++ b/gstreamer-gl/src/auto/gl_shader.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstGLShader")] @@ -34,7 +34,7 @@ impl GLShader { pub fn new_default(context: &impl IsA) -> Result { skip_assert_initialized!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gst_gl_shader_new_default(context.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -100,7 +100,7 @@ impl GLShader { #[doc(alias = "gst_gl_shader_compile_attach_stage")] pub fn compile_attach_stage(&self, stage: &GLSLStage) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gst_gl_shader_compile_attach_stage( self.to_glib_none().0, stage.to_glib_none().0, @@ -151,7 +151,7 @@ impl GLShader { #[doc(alias = "gst_gl_shader_link")] pub fn link(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gst_gl_shader_link(self.to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -442,7 +442,7 @@ impl GLShader { connect_raw( self.as_ptr() as *mut _, b"notify::linked\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_linked_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-gl/src/auto/gl_upload.rs b/gstreamer-gl/src/auto/gl_upload.rs index 5ecf36692..93c783194 100644 --- a/gstreamer-gl/src/auto/gl_upload.rs +++ b/gstreamer-gl/src/auto/gl_upload.rs @@ -5,7 +5,6 @@ use crate::GLContext; use glib::{prelude::*, translate::*}; -use std::ptr; glib::wrapper! { #[doc(alias = "GstGLUpload")] @@ -27,8 +26,8 @@ impl GLUpload { #[doc(alias = "get_caps")] pub fn caps(&self) -> (gst::Caps, gst::Caps) { unsafe { - let mut in_caps = ptr::null_mut(); - let mut out_caps = ptr::null_mut(); + let mut in_caps = std::ptr::null_mut(); + let mut out_caps = std::ptr::null_mut(); ffi::gst_gl_upload_get_caps(self.to_glib_none().0, &mut in_caps, &mut out_caps); (from_glib_full(in_caps), from_glib_full(out_caps)) } diff --git a/gstreamer-gl/src/auto/gl_view_convert.rs b/gstreamer-gl/src/auto/gl_view_convert.rs index e0a99c7a6..2bf207c2b 100644 --- a/gstreamer-gl/src/auto/gl_view_convert.rs +++ b/gstreamer-gl/src/auto/gl_view_convert.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstGLViewConvert")] @@ -159,7 +159,7 @@ impl GLViewConvert { connect_raw( self.as_ptr() as *mut _, b"notify::downmix-mode\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_downmix_mode_trampoline:: as *const (), )), Box_::into_raw(f), @@ -187,7 +187,7 @@ impl GLViewConvert { connect_raw( self.as_ptr() as *mut _, b"notify::input-flags-override\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_input_flags_override_trampoline:: as *const (), )), Box_::into_raw(f), @@ -215,7 +215,7 @@ impl GLViewConvert { connect_raw( self.as_ptr() as *mut _, b"notify::input-mode-override\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_input_mode_override_trampoline:: as *const (), )), Box_::into_raw(f), @@ -243,7 +243,7 @@ impl GLViewConvert { connect_raw( self.as_ptr() as *mut _, b"notify::output-flags-override\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_output_flags_override_trampoline:: as *const (), )), Box_::into_raw(f), @@ -271,7 +271,7 @@ impl GLViewConvert { connect_raw( self.as_ptr() as *mut _, b"notify::output-mode-override\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_output_mode_override_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-gl/src/auto/gl_window.rs b/gstreamer-gl/src/auto/gl_window.rs index cdad87778..d118aa62e 100644 --- a/gstreamer-gl/src/auto/gl_window.rs +++ b/gstreamer-gl/src/auto/gl_window.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstGLWindow")] @@ -71,8 +71,8 @@ pub trait GLWindowExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_surface_dimensions")] fn surface_dimensions(&self) -> (u32, u32) { unsafe { - let mut width = mem::MaybeUninit::uninit(); - let mut height = mem::MaybeUninit::uninit(); + let mut width = std::mem::MaybeUninit::uninit(); + let mut height = std::mem::MaybeUninit::uninit(); ffi::gst_gl_window_get_surface_dimensions( self.as_ref().to_glib_none().0, width.as_mut_ptr(), @@ -232,7 +232,7 @@ pub trait GLWindowExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"key-event\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( key_event_trampoline:: as *const (), )), Box_::into_raw(f), @@ -270,7 +270,7 @@ pub trait GLWindowExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"mouse-event\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( mouse_event_trampoline:: as *const (), )), Box_::into_raw(f), @@ -310,7 +310,7 @@ pub trait GLWindowExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"scroll-event\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( scroll_event_trampoline:: as *const (), )), Box_::into_raw(f), @@ -340,7 +340,7 @@ pub trait GLWindowExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"window-handle-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( window_handle_changed_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-gl/src/auto/glsl_stage.rs b/gstreamer-gl/src/auto/glsl_stage.rs index 23aaac4d7..e8fe00637 100644 --- a/gstreamer-gl/src/auto/glsl_stage.rs +++ b/gstreamer-gl/src/auto/glsl_stage.rs @@ -5,7 +5,6 @@ use crate::{GLContext, GLSLProfile, GLSLVersion}; use glib::{prelude::*, translate::*}; -use std::ptr; glib::wrapper! { #[doc(alias = "GstGLSLStage")] @@ -95,7 +94,7 @@ impl GLSLStage { #[doc(alias = "gst_glsl_stage_compile")] pub fn compile(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gst_glsl_stage_compile(self.to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { diff --git a/gstreamer-gl/src/auto/mod.rs b/gstreamer-gl/src/auto/mod.rs index 853a414dc..b98b30b07 100644 --- a/gstreamer-gl/src/auto/mod.rs +++ b/gstreamer-gl/src/auto/mod.rs @@ -84,7 +84,7 @@ pub use self::flags::GLPlatform; pub use self::flags::GLSLProfile; pub use self::flags::GLAPI; -pub mod functions; +pub(crate) mod functions; mod constants; pub use self::constants::BUFFER_POOL_OPTION_GL_SYNC_META; @@ -116,8 +116,7 @@ pub use self::constants::GL_TEXTURE_TARGET_2D_STR; pub use self::constants::GL_TEXTURE_TARGET_EXTERNAL_OES_STR; pub use self::constants::GL_TEXTURE_TARGET_RECTANGLE_STR; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::gl_base_filter::GLBaseFilterExt; #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] diff --git a/gstreamer-gl/src/auto/versions.txt b/gstreamer-gl/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-gl/src/auto/versions.txt +++ b/gstreamer-gl/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-gl/sys/src/auto/versions.txt b/gstreamer-gl/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-gl/sys/src/auto/versions.txt +++ b/gstreamer-gl/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-gl/sys/tests/abi.rs b/gstreamer-gl/sys/tests/abi.rs index 9af4c33d9..fd218c6a6 100644 --- a/gstreamer-gl/sys/tests/abi.rs +++ b/gstreamer-gl/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-gl/wayland/src/auto/versions.txt b/gstreamer-gl/wayland/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-gl/wayland/src/auto/versions.txt +++ b/gstreamer-gl/wayland/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-gl/wayland/sys/src/auto/versions.txt b/gstreamer-gl/wayland/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-gl/wayland/sys/src/auto/versions.txt +++ b/gstreamer-gl/wayland/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-gl/wayland/sys/tests/abi.rs b/gstreamer-gl/wayland/sys/tests/abi.rs index 8daac0b67..9911c1a55 100644 --- a/gstreamer-gl/wayland/sys/tests/abi.rs +++ b/gstreamer-gl/wayland/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-gl/x11/src/auto/versions.txt b/gstreamer-gl/x11/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-gl/x11/src/auto/versions.txt +++ b/gstreamer-gl/x11/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-gl/x11/sys/src/auto/versions.txt b/gstreamer-gl/x11/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-gl/x11/sys/src/auto/versions.txt +++ b/gstreamer-gl/x11/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-gl/x11/sys/tests/abi.rs b/gstreamer-gl/x11/sys/tests/abi.rs index 3c50e2e87..b374a6d32 100644 --- a/gstreamer-gl/x11/sys/tests/abi.rs +++ b/gstreamer-gl/x11/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-mpegts/src/auto/versions.txt b/gstreamer-mpegts/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-mpegts/src/auto/versions.txt +++ b/gstreamer-mpegts/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-mpegts/sys/src/auto/versions.txt b/gstreamer-mpegts/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-mpegts/sys/src/auto/versions.txt +++ b/gstreamer-mpegts/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-mpegts/sys/tests/abi.rs b/gstreamer-mpegts/sys/tests/abi.rs index a0846cf8d..337ee8e2c 100644 --- a/gstreamer-mpegts/sys/tests/abi.rs +++ b/gstreamer-mpegts/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-net/src/auto/net_client_clock.rs b/gstreamer-net/src/auto/net_client_clock.rs index 1150229cb..0f11efcdd 100644 --- a/gstreamer-net/src/auto/net_client_clock.rs +++ b/gstreamer-net/src/auto/net_client_clock.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstNetClientClock")] @@ -123,7 +123,7 @@ impl NetClientClock { connect_raw( self.as_ptr() as *mut _, b"notify::address\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_address_trampoline:: as *const (), )), Box_::into_raw(f), @@ -151,7 +151,7 @@ impl NetClientClock { connect_raw( self.as_ptr() as *mut _, b"notify::bus\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_bus_trampoline:: as *const (), )), Box_::into_raw(f), @@ -179,7 +179,7 @@ impl NetClientClock { connect_raw( self.as_ptr() as *mut _, b"notify::internal-clock\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_internal_clock_trampoline:: as *const (), )), Box_::into_raw(f), @@ -207,7 +207,7 @@ impl NetClientClock { connect_raw( self.as_ptr() as *mut _, b"notify::minimum-update-interval\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_minimum_update_interval_trampoline:: as *const (), )), Box_::into_raw(f), @@ -235,7 +235,7 @@ impl NetClientClock { connect_raw( self.as_ptr() as *mut _, b"notify::port\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_port_trampoline:: as *const (), )), Box_::into_raw(f), @@ -263,7 +263,7 @@ impl NetClientClock { connect_raw( self.as_ptr() as *mut _, b"notify::qos-dscp\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_qos_dscp_trampoline:: as *const (), )), Box_::into_raw(f), @@ -291,7 +291,7 @@ impl NetClientClock { connect_raw( self.as_ptr() as *mut _, b"notify::round-trip-limit\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_round_trip_limit_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-net/src/auto/net_time_provider.rs b/gstreamer-net/src/auto/net_time_provider.rs index 9d3fc0d74..911ebca6c 100644 --- a/gstreamer-net/src/auto/net_time_provider.rs +++ b/gstreamer-net/src/auto/net_time_provider.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstNetTimeProvider")] @@ -87,7 +87,7 @@ impl NetTimeProvider { connect_raw( self.as_ptr() as *mut _, b"notify::active\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_active_trampoline:: as *const (), )), Box_::into_raw(f), @@ -115,7 +115,7 @@ impl NetTimeProvider { connect_raw( self.as_ptr() as *mut _, b"notify::qos-dscp\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_qos_dscp_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-net/src/auto/ptp_clock.rs b/gstreamer-net/src/auto/ptp_clock.rs index 32588d798..d9ea14bc7 100644 --- a/gstreamer-net/src/auto/ptp_clock.rs +++ b/gstreamer-net/src/auto/ptp_clock.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstPtpClock")] @@ -68,7 +68,7 @@ impl PtpClock { connect_raw( self.as_ptr() as *mut _, b"notify::grandmaster-clock-id\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_grandmaster_clock_id_trampoline:: as *const (), )), Box_::into_raw(f), @@ -96,7 +96,7 @@ impl PtpClock { connect_raw( self.as_ptr() as *mut _, b"notify::internal-clock\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_internal_clock_trampoline:: as *const (), )), Box_::into_raw(f), @@ -124,7 +124,7 @@ impl PtpClock { connect_raw( self.as_ptr() as *mut _, b"notify::master-clock-id\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_master_clock_id_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-net/src/auto/versions.txt b/gstreamer-net/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-net/src/auto/versions.txt +++ b/gstreamer-net/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-net/sys/src/auto/versions.txt b/gstreamer-net/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-net/sys/src/auto/versions.txt +++ b/gstreamer-net/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-net/sys/tests/abi.rs b/gstreamer-net/sys/tests/abi.rs index 0362e319d..d9851556e 100644 --- a/gstreamer-net/sys/tests/abi.rs +++ b/gstreamer-net/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-pbutils/src/auto/audio_visualizer.rs b/gstreamer-pbutils/src/auto/audio_visualizer.rs index 937ffa877..f712ce031 100644 --- a/gstreamer-pbutils/src/auto/audio_visualizer.rs +++ b/gstreamer-pbutils/src/auto/audio_visualizer.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstAudioVisualizer")] @@ -72,7 +72,7 @@ pub trait AudioVisualizerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::shade-amount\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_shade_amount_trampoline:: as *const (), )), Box_::into_raw(f), @@ -98,7 +98,7 @@ pub trait AudioVisualizerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::shader\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_shader_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-pbutils/src/auto/discoverer.rs b/gstreamer-pbutils/src/auto/discoverer.rs index 99af2bb25..10af88b06 100644 --- a/gstreamer-pbutils/src/auto/discoverer.rs +++ b/gstreamer-pbutils/src/auto/discoverer.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstDiscoverer")] @@ -25,7 +25,7 @@ impl Discoverer { pub fn new(timeout: gst::ClockTime) -> Result { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gst_discoverer_new(timeout.into_glib(), &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -38,7 +38,7 @@ impl Discoverer { #[doc(alias = "gst_discoverer_discover_uri")] pub fn discover_uri(&self, uri: &str) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gst_discoverer_discover_uri( self.to_glib_none().0, uri.to_glib_none().0, @@ -119,7 +119,7 @@ impl Discoverer { connect_raw( self.as_ptr() as *mut _, b"discovered\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( discovered_trampoline:: as *const (), )), Box_::into_raw(f), @@ -141,7 +141,7 @@ impl Discoverer { connect_raw( self.as_ptr() as *mut _, b"finished\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( finished_trampoline:: as *const (), )), Box_::into_raw(f), @@ -177,7 +177,7 @@ impl Discoverer { connect_raw( self.as_ptr() as *mut _, b"load-serialized-info\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( load_serialized_info_trampoline:: as *const (), )), Box_::into_raw(f), @@ -205,7 +205,7 @@ impl Discoverer { connect_raw( self.as_ptr() as *mut _, b"source-setup\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( source_setup_trampoline:: as *const (), )), Box_::into_raw(f), @@ -227,7 +227,7 @@ impl Discoverer { connect_raw( self.as_ptr() as *mut _, b"starting\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( starting_trampoline:: as *const (), )), Box_::into_raw(f), @@ -257,7 +257,7 @@ impl Discoverer { connect_raw( self.as_ptr() as *mut _, b"notify::use-cache\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_use_cache_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-pbutils/src/auto/encoding_profile.rs b/gstreamer-pbutils/src/auto/encoding_profile.rs index c9a9405d2..5122117ba 100644 --- a/gstreamer-pbutils/src/auto/encoding_profile.rs +++ b/gstreamer-pbutils/src/auto/encoding_profile.rs @@ -10,7 +10,7 @@ use glib::signal::{connect_raw, SignalHandlerId}; use glib::{prelude::*, translate::*}; #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstEncodingProfile")] @@ -223,7 +223,7 @@ pub trait EncodingProfileExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::element-properties\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_element_properties_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-pbutils/src/auto/encoding_target.rs b/gstreamer-pbutils/src/auto/encoding_target.rs index 7c20cd667..c6f2cabb5 100644 --- a/gstreamer-pbutils/src/auto/encoding_target.rs +++ b/gstreamer-pbutils/src/auto/encoding_target.rs @@ -5,7 +5,6 @@ use crate::EncodingProfile; use glib::translate::*; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GstEncodingTarget")] @@ -90,7 +89,7 @@ impl EncodingTarget { #[doc(alias = "gst_encoding_target_save")] pub fn save(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gst_encoding_target_save(self.to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -104,7 +103,7 @@ impl EncodingTarget { #[doc(alias = "gst_encoding_target_save_to_file")] pub fn save_to_file(&self, filepath: impl AsRef) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gst_encoding_target_save_to_file( self.to_glib_none().0, filepath.as_ref().to_glib_none().0, @@ -123,7 +122,7 @@ impl EncodingTarget { pub fn load(name: &str, category: Option<&str>) -> Result { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gst_encoding_target_load( name.to_glib_none().0, category.to_glib_none().0, @@ -143,7 +142,7 @@ impl EncodingTarget { ) -> Result { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gst_encoding_target_load_from_file( filepath.as_ref().to_glib_none().0, &mut error, @@ -157,9 +156,9 @@ impl EncodingTarget { } } -impl fmt::Display for EncodingTarget { +impl std::fmt::Display for EncodingTarget { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } diff --git a/gstreamer-pbutils/src/auto/enums.rs b/gstreamer-pbutils/src/auto/enums.rs index 79396c2a4..ac5c1f02d 100644 --- a/gstreamer-pbutils/src/auto/enums.rs +++ b/gstreamer-pbutils/src/auto/enums.rs @@ -79,6 +79,7 @@ impl FromGlib for AudioVisualizerShader { impl StaticType for AudioVisualizerShader { #[inline] + #[doc(alias = "gst_audio_visualizer_shader_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_audio_visualizer_shader_get_type()) } } @@ -90,7 +91,7 @@ impl glib::HasParamSpec for AudioVisualizerShader { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -190,6 +191,7 @@ impl FromGlib for DiscovererResult { impl StaticType for DiscovererResult { #[inline] + #[doc(alias = "gst_discoverer_result_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_discoverer_result_get_type()) } } @@ -201,7 +203,7 @@ impl glib::HasParamSpec for DiscovererResult { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-pbutils/src/auto/flags.rs b/gstreamer-pbutils/src/auto/flags.rs index 6bfd2b94d..26c6f21a0 100644 --- a/gstreamer-pbutils/src/auto/flags.rs +++ b/gstreamer-pbutils/src/auto/flags.rs @@ -39,6 +39,7 @@ impl FromGlib for DiscovererSerializeFlags { impl StaticType for DiscovererSerializeFlags { #[inline] + #[doc(alias = "gst_discoverer_serialize_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_discoverer_serialize_flags_get_type()) } } @@ -50,7 +51,7 @@ impl glib::HasParamSpec for DiscovererSerializeFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -146,6 +147,7 @@ impl FromGlib for PbUtilsCapsDescriptionFla #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl StaticType for PbUtilsCapsDescriptionFlags { #[inline] + #[doc(alias = "gst_pb_utils_caps_description_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_pb_utils_caps_description_flags_get_type()) } } @@ -159,7 +161,7 @@ impl glib::HasParamSpec for PbUtilsCapsDescriptionFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/gstreamer-pbutils/src/auto/functions.rs b/gstreamer-pbutils/src/auto/functions.rs index 4653b94c8..d03f54f74 100644 --- a/gstreamer-pbutils/src/auto/functions.rs +++ b/gstreamer-pbutils/src/auto/functions.rs @@ -5,7 +5,6 @@ use crate::EncodingTarget; use glib::translate::*; -use std::mem; #[doc(alias = "gst_codec_utils_aac_get_channels")] pub fn codec_utils_aac_get_channels(audio_config: &[u8]) -> u32 { @@ -234,10 +233,10 @@ pub fn pb_utils_get_source_description(protocol: &str) -> glib::GString { pub fn plugins_base_version() -> (u32, u32, u32, u32) { skip_assert_initialized!(); unsafe { - let mut major = mem::MaybeUninit::uninit(); - let mut minor = mem::MaybeUninit::uninit(); - let mut micro = mem::MaybeUninit::uninit(); - let mut nano = mem::MaybeUninit::uninit(); + let mut major = std::mem::MaybeUninit::uninit(); + let mut minor = std::mem::MaybeUninit::uninit(); + let mut micro = std::mem::MaybeUninit::uninit(); + let mut nano = std::mem::MaybeUninit::uninit(); ffi::gst_plugins_base_version( major.as_mut_ptr(), minor.as_mut_ptr(), diff --git a/gstreamer-pbutils/src/auto/mod.rs b/gstreamer-pbutils/src/auto/mod.rs index 84cb35459..b4143e68b 100644 --- a/gstreamer-pbutils/src/auto/mod.rs +++ b/gstreamer-pbutils/src/auto/mod.rs @@ -52,10 +52,9 @@ pub use self::flags::DiscovererSerializeFlags; #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] pub use self::flags::PbUtilsCapsDescriptionFlags; -pub mod functions; +pub(crate) mod functions; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::audio_visualizer::AudioVisualizerExt; pub use super::discoverer_stream_info::DiscovererStreamInfoExt; pub use super::encoding_profile::EncodingProfileExt; diff --git a/gstreamer-pbutils/src/auto/versions.txt b/gstreamer-pbutils/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-pbutils/src/auto/versions.txt +++ b/gstreamer-pbutils/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-pbutils/sys/src/auto/versions.txt b/gstreamer-pbutils/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-pbutils/sys/src/auto/versions.txt +++ b/gstreamer-pbutils/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-pbutils/sys/tests/abi.rs b/gstreamer-pbutils/sys/tests/abi.rs index 6635dfd97..13e570a30 100644 --- a/gstreamer-pbutils/sys/tests/abi.rs +++ b/gstreamer-pbutils/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-play/src/auto/enums.rs b/gstreamer-play/src/auto/enums.rs index 27a00b087..b8b9462c3 100644 --- a/gstreamer-play/src/auto/enums.rs +++ b/gstreamer-play/src/auto/enums.rs @@ -5,7 +5,6 @@ use crate::PlayMediaInfo; use glib::{prelude::*, translate::*, GStr}; -use std::{fmt, mem, ptr}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -35,9 +34,9 @@ impl PlayColorBalanceType { } } -impl fmt::Display for PlayColorBalanceType { +impl std::fmt::Display for PlayColorBalanceType { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -76,6 +75,7 @@ impl FromGlib for PlayColorBalanceType { impl StaticType for PlayColorBalanceType { #[inline] + #[doc(alias = "gst_play_color_balance_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_play_color_balance_type_get_type()) } } @@ -87,7 +87,7 @@ impl glib::HasParamSpec for PlayColorBalanceType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -151,9 +151,9 @@ impl PlayError { } } -impl fmt::Display for PlayError { +impl std::fmt::Display for PlayError { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -210,6 +210,7 @@ impl glib::error::ErrorDomain for PlayError { impl StaticType for PlayError { #[inline] + #[doc(alias = "gst_play_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_play_error_get_type()) } } @@ -221,7 +222,7 @@ impl glib::HasParamSpec for PlayError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -312,7 +313,7 @@ impl PlayMessage { pub fn parse_buffering_percent(msg: &gst::Message) -> u32 { assert_initialized_main_thread!(); unsafe { - let mut percent = mem::MaybeUninit::uninit(); + let mut percent = std::mem::MaybeUninit::uninit(); ffi::gst_play_message_parse_buffering_percent( msg.to_glib_none().0, percent.as_mut_ptr(), @@ -325,7 +326,7 @@ impl PlayMessage { pub fn parse_duration_updated(msg: &gst::Message) -> Option { assert_initialized_main_thread!(); unsafe { - let mut duration = mem::MaybeUninit::uninit(); + let mut duration = std::mem::MaybeUninit::uninit(); ffi::gst_play_message_parse_duration_updated( msg.to_glib_none().0, duration.as_mut_ptr(), @@ -338,8 +339,8 @@ impl PlayMessage { pub fn parse_error(msg: &gst::Message) -> (glib::Error, Option) { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); - let mut details = ptr::null_mut(); + let mut error = std::ptr::null_mut(); + let mut details = std::ptr::null_mut(); ffi::gst_play_message_parse_error(msg.to_glib_none().0, &mut error, &mut details); (from_glib_full(error), from_glib_full(details)) } @@ -349,7 +350,7 @@ impl PlayMessage { pub fn parse_media_info_updated(msg: &gst::Message) -> PlayMediaInfo { assert_initialized_main_thread!(); unsafe { - let mut info = ptr::null_mut(); + let mut info = std::ptr::null_mut(); ffi::gst_play_message_parse_media_info_updated(msg.to_glib_none().0, &mut info); from_glib_full(info) } @@ -359,7 +360,7 @@ impl PlayMessage { pub fn parse_muted_changed(msg: &gst::Message) -> bool { assert_initialized_main_thread!(); unsafe { - let mut muted = mem::MaybeUninit::uninit(); + let mut muted = std::mem::MaybeUninit::uninit(); ffi::gst_play_message_parse_muted_changed(msg.to_glib_none().0, muted.as_mut_ptr()); from_glib(muted.assume_init()) } @@ -369,7 +370,7 @@ impl PlayMessage { pub fn parse_position_updated(msg: &gst::Message) -> Option { assert_initialized_main_thread!(); unsafe { - let mut position = mem::MaybeUninit::uninit(); + let mut position = std::mem::MaybeUninit::uninit(); ffi::gst_play_message_parse_position_updated( msg.to_glib_none().0, position.as_mut_ptr(), @@ -382,7 +383,7 @@ impl PlayMessage { pub fn parse_state_changed(msg: &gst::Message) -> PlayState { assert_initialized_main_thread!(); unsafe { - let mut state = mem::MaybeUninit::uninit(); + let mut state = std::mem::MaybeUninit::uninit(); ffi::gst_play_message_parse_state_changed(msg.to_glib_none().0, state.as_mut_ptr()); from_glib(state.assume_init()) } @@ -392,7 +393,7 @@ impl PlayMessage { pub fn parse_type(msg: &gst::Message) -> PlayMessage { assert_initialized_main_thread!(); unsafe { - let mut type_ = mem::MaybeUninit::uninit(); + let mut type_ = std::mem::MaybeUninit::uninit(); ffi::gst_play_message_parse_type(msg.to_glib_none().0, type_.as_mut_ptr()); from_glib(type_.assume_init()) } @@ -402,8 +403,8 @@ impl PlayMessage { pub fn parse_video_dimensions_changed(msg: &gst::Message) -> (u32, u32) { assert_initialized_main_thread!(); unsafe { - let mut width = mem::MaybeUninit::uninit(); - let mut height = mem::MaybeUninit::uninit(); + let mut width = std::mem::MaybeUninit::uninit(); + let mut height = std::mem::MaybeUninit::uninit(); ffi::gst_play_message_parse_video_dimensions_changed( msg.to_glib_none().0, width.as_mut_ptr(), @@ -417,7 +418,7 @@ impl PlayMessage { pub fn parse_volume_changed(msg: &gst::Message) -> f64 { assert_initialized_main_thread!(); unsafe { - let mut volume = mem::MaybeUninit::uninit(); + let mut volume = std::mem::MaybeUninit::uninit(); ffi::gst_play_message_parse_volume_changed(msg.to_glib_none().0, volume.as_mut_ptr()); volume.assume_init() } @@ -427,17 +428,17 @@ impl PlayMessage { pub fn parse_warning(msg: &gst::Message) -> (glib::Error, Option) { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); - let mut details = ptr::null_mut(); + let mut error = std::ptr::null_mut(); + let mut details = std::ptr::null_mut(); ffi::gst_play_message_parse_warning(msg.to_glib_none().0, &mut error, &mut details); (from_glib_full(error), from_glib_full(details)) } } } -impl fmt::Display for PlayMessage { +impl std::fmt::Display for PlayMessage { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -492,6 +493,7 @@ impl FromGlib for PlayMessage { impl StaticType for PlayMessage { #[inline] + #[doc(alias = "gst_play_message_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_play_message_get_type()) } } @@ -503,7 +505,7 @@ impl glib::HasParamSpec for PlayMessage { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -625,9 +627,9 @@ impl PlayState { } } -impl fmt::Display for PlayState { +impl std::fmt::Display for PlayState { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -666,6 +668,7 @@ impl FromGlib for PlayState { impl StaticType for PlayState { #[inline] + #[doc(alias = "gst_play_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_play_state_get_type()) } } @@ -677,7 +680,7 @@ impl glib::HasParamSpec for PlayState { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-play/src/auto/mod.rs b/gstreamer-play/src/auto/mod.rs index a35a85ae9..1de336f78 100644 --- a/gstreamer-play/src/auto/mod.rs +++ b/gstreamer-play/src/auto/mod.rs @@ -40,8 +40,7 @@ pub(crate) use self::enums::PlayMessage; pub use self::enums::PlaySnapshotFormat; pub use self::enums::PlayState; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::play_stream_info::PlayStreamInfoExt; pub use super::play_video_renderer::PlayVideoRendererExt; } diff --git a/gstreamer-play/src/auto/play.rs b/gstreamer-play/src/auto/play.rs index 6280d3292..88bd61c69 100644 --- a/gstreamer-play/src/auto/play.rs +++ b/gstreamer-play/src/auto/play.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstPlay")] @@ -433,7 +433,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::audio-video-offset\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_audio_video_offset_trampoline:: as *const (), )), Box_::into_raw(f), @@ -461,7 +461,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::current-audio-track\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_current_audio_track_trampoline:: as *const (), )), Box_::into_raw(f), @@ -489,7 +489,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::current-subtitle-track\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_current_subtitle_track_trampoline:: as *const (), )), Box_::into_raw(f), @@ -517,7 +517,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::current-video-track\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_current_video_track_trampoline:: as *const (), )), Box_::into_raw(f), @@ -543,7 +543,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_duration_trampoline:: as *const (), )), Box_::into_raw(f), @@ -569,7 +569,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::media-info\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_media_info_trampoline:: as *const (), )), Box_::into_raw(f), @@ -595,7 +595,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::mute\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_mute_trampoline:: as *const (), )), Box_::into_raw(f), @@ -621,7 +621,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::pipeline\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_pipeline_trampoline:: as *const (), )), Box_::into_raw(f), @@ -647,7 +647,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::position\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_position_trampoline:: as *const (), )), Box_::into_raw(f), @@ -673,7 +673,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::rate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_rate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -701,7 +701,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::subtitle-video-offset\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_subtitle_video_offset_trampoline:: as *const (), )), Box_::into_raw(f), @@ -727,7 +727,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::suburi\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_suburi_trampoline:: as *const (), )), Box_::into_raw(f), @@ -753,7 +753,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::uri\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_uri_trampoline:: as *const (), )), Box_::into_raw(f), @@ -781,7 +781,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::video-multiview-flags\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_video_multiview_flags_trampoline:: as *const (), )), Box_::into_raw(f), @@ -809,7 +809,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::video-multiview-mode\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_video_multiview_mode_trampoline:: as *const (), )), Box_::into_raw(f), @@ -837,7 +837,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::video-renderer\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_video_renderer_trampoline:: as *const (), )), Box_::into_raw(f), @@ -863,7 +863,7 @@ impl Play { connect_raw( self.as_ptr() as *mut _, b"notify::volume\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_volume_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-play/src/auto/play_signal_adapter.rs b/gstreamer-play/src/auto/play_signal_adapter.rs index 64a473ba4..f25abed1a 100644 --- a/gstreamer-play/src/auto/play_signal_adapter.rs +++ b/gstreamer-play/src/auto/play_signal_adapter.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstPlaySignalAdapter")] @@ -72,7 +72,7 @@ impl PlaySignalAdapter { connect_raw( self.as_ptr() as *mut _, b"buffering\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( buffering_trampoline:: as *const (), )), Box_::into_raw(f), @@ -96,7 +96,7 @@ impl PlaySignalAdapter { connect_raw( self.as_ptr() as *mut _, b"end-of-stream\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( end_of_stream_trampoline:: as *const (), )), Box_::into_raw(f), @@ -131,7 +131,7 @@ impl PlaySignalAdapter { connect_raw( self.as_ptr() as *mut _, b"error\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( error_trampoline:: as *const (), )), Box_::into_raw(f), @@ -159,7 +159,7 @@ impl PlaySignalAdapter { connect_raw( self.as_ptr() as *mut _, b"media-info-updated\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( media_info_updated_trampoline:: as *const (), )), Box_::into_raw(f), @@ -187,7 +187,7 @@ impl PlaySignalAdapter { connect_raw( self.as_ptr() as *mut _, b"mute-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( mute_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -215,7 +215,7 @@ impl PlaySignalAdapter { connect_raw( self.as_ptr() as *mut _, b"state-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( state_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -243,7 +243,7 @@ impl PlaySignalAdapter { connect_raw( self.as_ptr() as *mut _, b"uri-loaded\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( uri_loaded_trampoline:: as *const (), )), Box_::into_raw(f), @@ -272,7 +272,7 @@ impl PlaySignalAdapter { connect_raw( self.as_ptr() as *mut _, b"video-dimensions-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( video_dimensions_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -300,7 +300,7 @@ impl PlaySignalAdapter { connect_raw( self.as_ptr() as *mut _, b"volume-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( volume_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -335,7 +335,7 @@ impl PlaySignalAdapter { connect_raw( self.as_ptr() as *mut _, b"warning\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( warning_trampoline:: as *const (), )), Box_::into_raw(f), @@ -363,7 +363,7 @@ impl PlaySignalAdapter { connect_raw( self.as_ptr() as *mut _, b"notify::play\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_play_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-play/src/auto/play_video_overlay_video_renderer.rs b/gstreamer-play/src/auto/play_video_overlay_video_renderer.rs index 816a24362..5c3baf2bd 100644 --- a/gstreamer-play/src/auto/play_video_overlay_video_renderer.rs +++ b/gstreamer-play/src/auto/play_video_overlay_video_renderer.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstPlayVideoOverlayVideoRenderer")] @@ -32,10 +32,10 @@ impl PlayVideoOverlayVideoRenderer { #[doc(alias = "get_render_rectangle")] pub fn render_rectangle(&self) -> (i32, i32, i32, i32) { unsafe { - let mut x = mem::MaybeUninit::uninit(); - let mut y = mem::MaybeUninit::uninit(); - let mut width = mem::MaybeUninit::uninit(); - let mut height = mem::MaybeUninit::uninit(); + let mut x = std::mem::MaybeUninit::uninit(); + let mut y = std::mem::MaybeUninit::uninit(); + let mut width = std::mem::MaybeUninit::uninit(); + let mut height = std::mem::MaybeUninit::uninit(); ffi::gst_play_video_overlay_video_renderer_get_render_rectangle( self.to_glib_none().0, x.as_mut_ptr(), @@ -95,7 +95,7 @@ impl PlayVideoOverlayVideoRenderer { connect_raw( self.as_ptr() as *mut _, b"notify::video-sink\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_video_sink_trampoline:: as *const (), )), Box_::into_raw(f), @@ -123,7 +123,7 @@ impl PlayVideoOverlayVideoRenderer { connect_raw( self.as_ptr() as *mut _, b"notify::window-handle\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_window_handle_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-play/src/auto/versions.txt b/gstreamer-play/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-play/src/auto/versions.txt +++ b/gstreamer-play/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-play/sys/src/auto/versions.txt b/gstreamer-play/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-play/sys/src/auto/versions.txt +++ b/gstreamer-play/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-play/sys/tests/abi.rs b/gstreamer-play/sys/tests/abi.rs index 18f3c5359..49db96da1 100644 --- a/gstreamer-play/sys/tests/abi.rs +++ b/gstreamer-play/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-player/src/auto/enums.rs b/gstreamer-player/src/auto/enums.rs index 6db25385d..0f2310c4d 100644 --- a/gstreamer-player/src/auto/enums.rs +++ b/gstreamer-player/src/auto/enums.rs @@ -4,7 +4,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*, GStr}; -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -34,9 +33,9 @@ impl PlayerColorBalanceType { } } -impl fmt::Display for PlayerColorBalanceType { +impl std::fmt::Display for PlayerColorBalanceType { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -75,6 +74,7 @@ impl FromGlib for PlayerColorBalanceType { impl StaticType for PlayerColorBalanceType { #[inline] + #[doc(alias = "gst_player_color_balance_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_player_color_balance_type_get_type()) } } @@ -86,7 +86,7 @@ impl glib::HasParamSpec for PlayerColorBalanceType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -150,9 +150,9 @@ impl PlayerError { } } -impl fmt::Display for PlayerError { +impl std::fmt::Display for PlayerError { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -209,6 +209,7 @@ impl glib::error::ErrorDomain for PlayerError { impl StaticType for PlayerError { #[inline] + #[doc(alias = "gst_player_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_player_error_get_type()) } } @@ -220,7 +221,7 @@ impl glib::HasParamSpec for PlayerError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -342,9 +343,9 @@ impl PlayerState { } } -impl fmt::Display for PlayerState { +impl std::fmt::Display for PlayerState { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -383,6 +384,7 @@ impl FromGlib for PlayerState { impl StaticType for PlayerState { #[inline] + #[doc(alias = "gst_player_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_player_state_get_type()) } } @@ -394,7 +396,7 @@ impl glib::HasParamSpec for PlayerState { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-player/src/auto/mod.rs b/gstreamer-player/src/auto/mod.rs index 3045a99a2..9549963e2 100644 --- a/gstreamer-player/src/auto/mod.rs +++ b/gstreamer-player/src/auto/mod.rs @@ -42,8 +42,7 @@ pub use self::enums::PlayerError; pub use self::enums::PlayerSnapshotFormat; pub use self::enums::PlayerState; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::player_signal_dispatcher::PlayerSignalDispatcherExt; pub use super::player_stream_info::PlayerStreamInfoExt; pub use super::player_video_renderer::PlayerVideoRendererExt; diff --git a/gstreamer-player/src/auto/player.rs b/gstreamer-player/src/auto/player.rs index 61ed98b2c..61b73615e 100644 --- a/gstreamer-player/src/auto/player.rs +++ b/gstreamer-player/src/auto/player.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstPlayer")] @@ -427,7 +427,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"buffering\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( buffering_trampoline:: as *const (), )), Box_::into_raw(f), @@ -449,7 +449,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"end-of-stream\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( end_of_stream_trampoline:: as *const (), )), Box_::into_raw(f), @@ -475,7 +475,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"error\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( error_trampoline:: as *const (), )), Box_::into_raw(f), @@ -503,7 +503,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"media-info-updated\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( media_info_updated_trampoline:: as *const (), )), Box_::into_raw(f), @@ -525,7 +525,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"mute-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( mute_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -553,7 +553,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"state-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( state_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -579,7 +579,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"uri-loaded\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( uri_loaded_trampoline:: as *const (), )), Box_::into_raw(f), @@ -608,7 +608,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"video-dimensions-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( video_dimensions_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -630,7 +630,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"volume-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( volume_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -656,7 +656,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"warning\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( warning_trampoline:: as *const (), )), Box_::into_raw(f), @@ -684,7 +684,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::audio-video-offset\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_audio_video_offset_trampoline:: as *const (), )), Box_::into_raw(f), @@ -712,7 +712,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::current-audio-track\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_current_audio_track_trampoline:: as *const (), )), Box_::into_raw(f), @@ -740,7 +740,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::current-subtitle-track\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_current_subtitle_track_trampoline:: as *const (), )), Box_::into_raw(f), @@ -768,7 +768,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::current-video-track\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_current_video_track_trampoline:: as *const (), )), Box_::into_raw(f), @@ -794,7 +794,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_duration_trampoline:: as *const (), )), Box_::into_raw(f), @@ -822,7 +822,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::media-info\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_media_info_trampoline:: as *const (), )), Box_::into_raw(f), @@ -848,7 +848,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::mute\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_mute_trampoline:: as *const (), )), Box_::into_raw(f), @@ -874,7 +874,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::pipeline\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_pipeline_trampoline:: as *const (), )), Box_::into_raw(f), @@ -900,7 +900,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::position\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_position_trampoline:: as *const (), )), Box_::into_raw(f), @@ -926,7 +926,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::rate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_rate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -956,7 +956,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::subtitle-video-offset\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_subtitle_video_offset_trampoline:: as *const (), )), Box_::into_raw(f), @@ -982,7 +982,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::suburi\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_suburi_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1008,7 +1008,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::uri\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_uri_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1036,7 +1036,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::video-multiview-flags\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_video_multiview_flags_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1064,7 +1064,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::video-multiview-mode\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_video_multiview_mode_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1090,7 +1090,7 @@ impl Player { connect_raw( self.as_ptr() as *mut _, b"notify::volume\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_volume_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs b/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs index 39430c5b8..f2a233f75 100644 --- a/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs +++ b/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstPlayerVideoOverlayVideoRenderer")] @@ -32,10 +32,10 @@ impl PlayerVideoOverlayVideoRenderer { #[doc(alias = "get_render_rectangle")] pub fn render_rectangle(&self) -> (i32, i32, i32, i32) { unsafe { - let mut x = mem::MaybeUninit::uninit(); - let mut y = mem::MaybeUninit::uninit(); - let mut width = mem::MaybeUninit::uninit(); - let mut height = mem::MaybeUninit::uninit(); + let mut x = std::mem::MaybeUninit::uninit(); + let mut y = std::mem::MaybeUninit::uninit(); + let mut width = std::mem::MaybeUninit::uninit(); + let mut height = std::mem::MaybeUninit::uninit(); ffi::gst_player_video_overlay_video_renderer_get_render_rectangle( self.to_glib_none().0, x.as_mut_ptr(), @@ -95,7 +95,7 @@ impl PlayerVideoOverlayVideoRenderer { connect_raw( self.as_ptr() as *mut _, b"notify::video-sink\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_video_sink_trampoline:: as *const (), )), Box_::into_raw(f), @@ -123,7 +123,7 @@ impl PlayerVideoOverlayVideoRenderer { connect_raw( self.as_ptr() as *mut _, b"notify::window-handle\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_window_handle_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-player/src/auto/versions.txt b/gstreamer-player/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-player/src/auto/versions.txt +++ b/gstreamer-player/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-player/sys/src/auto/versions.txt b/gstreamer-player/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-player/sys/src/auto/versions.txt +++ b/gstreamer-player/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-player/sys/tests/abi.rs b/gstreamer-player/sys/tests/abi.rs index a395a390c..68836aa0b 100644 --- a/gstreamer-player/sys/tests/abi.rs +++ b/gstreamer-player/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-rtp/src/auto/enums.rs b/gstreamer-rtp/src/auto/enums.rs index eccdd4fa0..7685c1888 100644 --- a/gstreamer-rtp/src/auto/enums.rs +++ b/gstreamer-rtp/src/auto/enums.rs @@ -75,6 +75,7 @@ impl FromGlib for RTCPFBType { impl StaticType for RTCPFBType { #[inline] + #[doc(alias = "gst_rtcpfb_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtcpfb_type_get_type()) } } @@ -86,7 +87,7 @@ impl glib::HasParamSpec for RTCPFBType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -256,6 +257,7 @@ impl FromGlib for RTCPSDESType { impl StaticType for RTCPSDESType { #[inline] + #[doc(alias = "gst_rtcpsdes_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtcpsdes_type_get_type()) } } @@ -267,7 +269,7 @@ impl glib::HasParamSpec for RTCPSDESType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -379,6 +381,7 @@ impl FromGlib for RTCPType { impl StaticType for RTCPType { #[inline] + #[doc(alias = "gst_rtcp_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtcp_type_get_type()) } } @@ -390,7 +393,7 @@ impl glib::HasParamSpec for RTCPType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -506,6 +509,7 @@ impl FromGlib for RTCPXRType { #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl StaticType for RTCPXRType { #[inline] + #[doc(alias = "gst_rtcpxr_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtcpxr_type_get_type()) } } @@ -519,7 +523,7 @@ impl glib::HasParamSpec for RTCPXRType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -705,6 +709,7 @@ impl FromGlib for RTPPayload { impl StaticType for RTPPayload { #[inline] + #[doc(alias = "gst_rtp_payload_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtp_payload_get_type()) } } @@ -716,7 +721,7 @@ impl glib::HasParamSpec for RTPPayload { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -812,6 +817,7 @@ impl FromGlib for RTPProfile { impl StaticType for RTPProfile { #[inline] + #[doc(alias = "gst_rtp_profile_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtp_profile_get_type()) } } @@ -823,7 +829,7 @@ impl glib::HasParamSpec for RTPProfile { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-rtp/src/auto/flags.rs b/gstreamer-rtp/src/auto/flags.rs index f386de539..608d3f547 100644 --- a/gstreamer-rtp/src/auto/flags.rs +++ b/gstreamer-rtp/src/auto/flags.rs @@ -37,6 +37,7 @@ impl FromGlib for RTPBufferFlags { impl StaticType for RTPBufferFlags { #[inline] + #[doc(alias = "gst_rtp_buffer_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtp_buffer_flags_get_type()) } } @@ -48,7 +49,7 @@ impl glib::HasParamSpec for RTPBufferFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -120,6 +121,7 @@ impl FromGlib for RTPBufferMapFlags { impl StaticType for RTPBufferMapFlags { #[inline] + #[doc(alias = "gst_rtp_buffer_map_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtp_buffer_map_flags_get_type()) } } @@ -131,7 +133,7 @@ impl glib::HasParamSpec for RTPBufferMapFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -219,6 +221,7 @@ impl FromGlib for RTPHeaderExtensionDirecti #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl StaticType for RTPHeaderExtensionDirection { #[inline] + #[doc(alias = "gst_rtp_header_extension_direction_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtp_header_extension_direction_get_type()) } } @@ -232,7 +235,7 @@ impl glib::HasParamSpec for RTPHeaderExtensionDirection { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -322,6 +325,7 @@ impl FromGlib for RTPHeaderExtensionFlags { #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl StaticType for RTPHeaderExtensionFlags { #[inline] + #[doc(alias = "gst_rtp_header_extension_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtp_header_extension_flags_get_type()) } } @@ -335,7 +339,7 @@ impl glib::HasParamSpec for RTPHeaderExtensionFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/gstreamer-rtp/src/auto/mod.rs b/gstreamer-rtp/src/auto/mod.rs index 98871590b..643697f5c 100644 --- a/gstreamer-rtp/src/auto/mod.rs +++ b/gstreamer-rtp/src/auto/mod.rs @@ -36,7 +36,7 @@ pub use self::flags::RTPHeaderExtensionDirection; #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] pub use self::flags::RTPHeaderExtensionFlags; -pub mod functions; +pub(crate) mod functions; mod constants; pub use self::constants::RTP_HDREXT_BASE; @@ -80,8 +80,7 @@ pub use self::constants::RTP_PAYLOAD_QCELP_STRING; pub use self::constants::RTP_PAYLOAD_TS41_STRING; pub use self::constants::RTP_PAYLOAD_TS48_STRING; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::rtp_base_depayload::RTPBaseDepayloadExt; pub use super::rtp_base_payload::RTPBasePayloadExt; #[cfg(feature = "v1_20")] diff --git a/gstreamer-rtp/src/auto/rtp_base_depayload.rs b/gstreamer-rtp/src/auto/rtp_base_depayload.rs index b8631cd23..a8658ef9c 100644 --- a/gstreamer-rtp/src/auto/rtp_base_depayload.rs +++ b/gstreamer-rtp/src/auto/rtp_base_depayload.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstRTPBaseDepayload")] @@ -207,7 +207,7 @@ pub trait RTPBaseDepayloadExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"add-extension\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( add_extension_trampoline:: as *const (), )), Box_::into_raw(f), @@ -243,7 +243,7 @@ pub trait RTPBaseDepayloadExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"clear-extensions\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( clear_extensions_trampoline:: as *const (), )), Box_::into_raw(f), @@ -291,7 +291,7 @@ pub trait RTPBaseDepayloadExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"request-extension\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( request_extension_trampoline:: as *const (), )), Box_::into_raw(f), @@ -322,7 +322,7 @@ pub trait RTPBaseDepayloadExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::auto-header-extension\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_auto_header_extension_trampoline:: as *const (), )), Box_::into_raw(f), @@ -353,7 +353,7 @@ pub trait RTPBaseDepayloadExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::max-reorder\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_reorder_trampoline:: as *const (), )), Box_::into_raw(f), @@ -384,7 +384,7 @@ pub trait RTPBaseDepayloadExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::source-info\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_source_info_trampoline:: as *const (), )), Box_::into_raw(f), @@ -410,7 +410,7 @@ pub trait RTPBaseDepayloadExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::stats\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_stats_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-rtp/src/auto/rtp_base_payload.rs b/gstreamer-rtp/src/auto/rtp_base_payload.rs index c857a131d..b5edbf85d 100644 --- a/gstreamer-rtp/src/auto/rtp_base_payload.rs +++ b/gstreamer-rtp/src/auto/rtp_base_payload.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstRTPBasePayload")] @@ -315,7 +315,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"add-extension\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( add_extension_trampoline:: as *const (), )), Box_::into_raw(f), @@ -351,7 +351,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"clear-extensions\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( clear_extensions_trampoline:: as *const (), )), Box_::into_raw(f), @@ -396,7 +396,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"request-extension\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( request_extension_trampoline:: as *const (), )), Box_::into_raw(f), @@ -427,7 +427,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::auto-header-extension\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_auto_header_extension_trampoline:: as *const (), )), Box_::into_raw(f), @@ -456,7 +456,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::max-ptime\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_ptime_trampoline:: as *const (), )), Box_::into_raw(f), @@ -485,7 +485,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::min-ptime\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_min_ptime_trampoline:: as *const (), )), Box_::into_raw(f), @@ -511,7 +511,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::mtu\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_mtu_trampoline:: as *const (), )), Box_::into_raw(f), @@ -542,7 +542,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::onvif-no-rate-control\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_onvif_no_rate_control_trampoline:: as *const (), )), Box_::into_raw(f), @@ -571,7 +571,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::perfect-rtptime\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_perfect_rtptime_trampoline:: as *const (), )), Box_::into_raw(f), @@ -597,7 +597,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::pt\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_pt_trampoline:: as *const (), )), Box_::into_raw(f), @@ -626,7 +626,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::ptime-multiple\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_ptime_multiple_trampoline:: as *const (), )), Box_::into_raw(f), @@ -657,7 +657,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::scale-rtptime\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_scale_rtptime_trampoline:: as *const (), )), Box_::into_raw(f), @@ -683,7 +683,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::seqnum\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_seqnum_trampoline:: as *const (), )), Box_::into_raw(f), @@ -712,7 +712,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::seqnum-offset\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_seqnum_offset_trampoline:: as *const (), )), Box_::into_raw(f), @@ -743,7 +743,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::source-info\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_source_info_trampoline:: as *const (), )), Box_::into_raw(f), @@ -769,7 +769,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::ssrc\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_ssrc_trampoline:: as *const (), )), Box_::into_raw(f), @@ -795,7 +795,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::stats\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_stats_trampoline:: as *const (), )), Box_::into_raw(f), @@ -824,7 +824,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::timestamp\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_timestamp_trampoline:: as *const (), )), Box_::into_raw(f), @@ -853,7 +853,7 @@ pub trait RTPBasePayloadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::timestamp-offset\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_timestamp_offset_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-rtp/src/auto/versions.txt b/gstreamer-rtp/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-rtp/src/auto/versions.txt +++ b/gstreamer-rtp/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-rtp/sys/src/auto/versions.txt b/gstreamer-rtp/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-rtp/sys/src/auto/versions.txt +++ b/gstreamer-rtp/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-rtp/sys/tests/abi.rs b/gstreamer-rtp/sys/tests/abi.rs index 244ec3b03..1929d98a8 100644 --- a/gstreamer-rtp/sys/tests/abi.rs +++ b/gstreamer-rtp/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-rtsp-server/src/auto/enums.rs b/gstreamer-rtsp-server/src/auto/enums.rs index ca3b68d59..253be8541 100644 --- a/gstreamer-rtsp-server/src/auto/enums.rs +++ b/gstreamer-rtsp-server/src/auto/enums.rs @@ -203,6 +203,7 @@ impl FromGlib for RTSPPublishClockMode { impl StaticType for RTSPPublishClockMode { #[inline] + #[doc(alias = "gst_rtsp_publish_clock_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_publish_clock_mode_get_type()) } } @@ -214,7 +215,7 @@ impl glib::HasParamSpec for RTSPPublishClockMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -302,6 +303,7 @@ impl FromGlib for RTSPSuspendMode { impl StaticType for RTSPSuspendMode { #[inline] + #[doc(alias = "gst_rtsp_suspend_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_suspend_mode_get_type()) } } @@ -313,7 +315,7 @@ impl glib::HasParamSpec for RTSPSuspendMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-rtsp-server/src/auto/flags.rs b/gstreamer-rtsp-server/src/auto/flags.rs index 1f9f62cf0..733af4971 100644 --- a/gstreamer-rtsp-server/src/auto/flags.rs +++ b/gstreamer-rtsp-server/src/auto/flags.rs @@ -73,6 +73,7 @@ impl FromGlib for RTSPTransportMode { impl StaticType for RTSPTransportMode { #[inline] + #[doc(alias = "gst_rtsp_transport_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_transport_mode_get_type()) } } @@ -84,7 +85,7 @@ impl glib::HasParamSpec for RTSPTransportMode { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/gstreamer-rtsp-server/src/auto/mod.rs b/gstreamer-rtsp-server/src/auto/mod.rs index ba412286a..10e369d5f 100644 --- a/gstreamer-rtsp-server/src/auto/mod.rs +++ b/gstreamer-rtsp-server/src/auto/mod.rs @@ -72,8 +72,7 @@ mod flags; pub use self::flags::RTSPAddressFlags; pub use self::flags::RTSPTransportMode; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::rtsp_address_pool::RTSPAddressPoolExt; pub use super::rtsp_auth::RTSPAuthExt; pub use super::rtsp_client::RTSPClientExt; diff --git a/gstreamer-rtsp-server/src/auto/rtsp_auth.rs b/gstreamer-rtsp-server/src/auto/rtsp_auth.rs index 45d7870af..067afe70f 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_auth.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_auth.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstRTSPAuth")] @@ -261,7 +261,7 @@ pub trait RTSPAuthExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"accept-certificate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( accept_certificate_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-rtsp-server/src/auto/rtsp_client.rs b/gstreamer-rtsp-server/src/auto/rtsp_client.rs index 9c8bec5c3..3f580bd6c 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_client.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_client.rs @@ -15,7 +15,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstRTSPClient")] @@ -282,7 +282,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"announce-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( announce_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -312,7 +312,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"closed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( closed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -344,7 +344,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"describe-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( describe_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -376,7 +376,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"get-parameter-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( get_parameter_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -408,7 +408,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"handle-response\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( handle_response_trampoline:: as *const (), )), Box_::into_raw(f), @@ -440,7 +440,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"new-session\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( new_session_trampoline:: as *const (), )), Box_::into_raw(f), @@ -472,7 +472,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"options-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( options_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -504,7 +504,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"pause-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pause_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -536,7 +536,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"play-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( play_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -571,7 +571,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"pre-announce-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pre_announce_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -606,7 +606,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"pre-describe-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pre_describe_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -641,7 +641,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"pre-get-parameter-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pre_get_parameter_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -676,7 +676,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"pre-options-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pre_options_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -711,7 +711,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"pre-pause-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pre_pause_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -746,7 +746,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"pre-play-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pre_play_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -781,7 +781,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"pre-record-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pre_record_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -816,7 +816,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"pre-set-parameter-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pre_set_parameter_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -851,7 +851,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"pre-setup-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pre_setup_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -886,7 +886,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"pre-teardown-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pre_teardown_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -918,7 +918,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"record-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( record_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -955,7 +955,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"set-parameter-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( set_parameter_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -987,7 +987,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"setup-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( setup_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1019,7 +1019,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"teardown-request\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( teardown_request_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1048,7 +1048,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::drop-backlog\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_drop_backlog_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1077,7 +1077,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::mount-points\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_mount_points_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1106,7 +1106,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::post-session-timeout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_post_session_timeout_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1135,7 +1135,7 @@ pub trait RTSPClientExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::session-pool\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_session_pool_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_media.rs index 333744d28..41ac85b89 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media.rs @@ -12,10 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -#[cfg(feature = "v1_18")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] -use std::mem; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstRTSPMedia")] @@ -249,8 +246,8 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_rates")] fn rates(&self) -> Option<(f64, f64)> { unsafe { - let mut rate = mem::MaybeUninit::uninit(); - let mut applied_rate = mem::MaybeUninit::uninit(); + let mut rate = std::mem::MaybeUninit::uninit(); + let mut applied_rate = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_rtsp_media_get_rates( self.as_ref().to_glib_none().0, rate.as_mut_ptr(), @@ -794,7 +791,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, signal_name.as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( handle_message_trampoline:: as *const (), )), Box_::into_raw(f), @@ -823,7 +820,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"new-state\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( new_state_trampoline:: as *const (), )), Box_::into_raw(f), @@ -855,7 +852,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"new-stream\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( new_stream_trampoline:: as *const (), )), Box_::into_raw(f), @@ -880,7 +877,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"prepared\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( prepared_trampoline:: as *const (), )), Box_::into_raw(f), @@ -912,7 +909,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"removed-stream\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( removed_stream_trampoline:: as *const (), )), Box_::into_raw(f), @@ -941,7 +938,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"target-state\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( target_state_trampoline:: as *const (), )), Box_::into_raw(f), @@ -966,7 +963,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"unprepared\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( unprepared_trampoline:: as *const (), )), Box_::into_raw(f), @@ -995,7 +992,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::bind-mcast-address\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_bind_mcast_address_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1024,7 +1021,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::buffer-size\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_buffer_size_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1050,7 +1047,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::clock\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_clock_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1079,7 +1076,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::dscp-qos\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_dscp_qos_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1108,7 +1105,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::eos-shutdown\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_eos_shutdown_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1137,7 +1134,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::latency\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_latency_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1166,7 +1163,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::max-mcast-ttl\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_mcast_ttl_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1195,7 +1192,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::profiles\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_profiles_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1224,7 +1221,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::protocols\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_protocols_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1253,7 +1250,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::reusable\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_reusable_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1279,7 +1276,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::shared\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_shared_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1308,7 +1305,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::stop-on-disconnect\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_stop_on_disconnect_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1337,7 +1334,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::suspend-mode\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_suspend_mode_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1366,7 +1363,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::time-provider\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_time_provider_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1395,7 +1392,7 @@ pub trait RTSPMediaExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::transport-mode\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_transport_mode_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs b/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs index f02f07bc6..bdb7da50e 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstRTSPMediaFactory")] @@ -552,7 +552,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"media-configure\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( media_configure_trampoline:: as *const (), )), Box_::into_raw(f), @@ -584,7 +584,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"media-constructed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( media_constructed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -613,7 +613,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::bind-mcast-address\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_bind_mcast_address_trampoline:: as *const (), )), Box_::into_raw(f), @@ -642,7 +642,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::buffer-size\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_buffer_size_trampoline:: as *const (), )), Box_::into_raw(f), @@ -668,7 +668,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::clock\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_clock_trampoline:: as *const (), )), Box_::into_raw(f), @@ -697,7 +697,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::dscp-qos\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_dscp_qos_trampoline:: as *const (), )), Box_::into_raw(f), @@ -728,7 +728,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::enable-rtcp\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_enable_rtcp_trampoline:: as *const (), )), Box_::into_raw(f), @@ -757,7 +757,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::eos-shutdown\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_eos_shutdown_trampoline:: as *const (), )), Box_::into_raw(f), @@ -786,7 +786,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::latency\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_latency_trampoline:: as *const (), )), Box_::into_raw(f), @@ -812,7 +812,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::launch\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_launch_trampoline:: as *const (), )), Box_::into_raw(f), @@ -841,7 +841,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::max-mcast-ttl\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_mcast_ttl_trampoline:: as *const (), )), Box_::into_raw(f), @@ -870,7 +870,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::profiles\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_profiles_trampoline:: as *const (), )), Box_::into_raw(f), @@ -899,7 +899,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::protocols\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_protocols_trampoline:: as *const (), )), Box_::into_raw(f), @@ -925,7 +925,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::shared\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_shared_trampoline:: as *const (), )), Box_::into_raw(f), @@ -954,7 +954,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::stop-on-disconnect\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_stop_on_disconnect_trampoline:: as *const (), )), Box_::into_raw(f), @@ -983,7 +983,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::suspend-mode\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_suspend_mode_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1012,7 +1012,7 @@ pub trait RTSPMediaFactoryExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"notify::transport-mode\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_transport_mode_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs b/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs index 29f710dfc..c4f223aca 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstRTSPMediaFactoryURI")] @@ -93,7 +93,7 @@ pub trait RTSPMediaFactoryURIExt: IsA + sealed::Sealed + 's connect_raw( self.as_ptr() as *mut _, b"notify::uri\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_uri_trampoline:: as *const (), )), Box_::into_raw(f), @@ -122,7 +122,7 @@ pub trait RTSPMediaFactoryURIExt: IsA + sealed::Sealed + 's connect_raw( self.as_ptr() as *mut _, b"notify::use-gstpay\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_use_gstpay_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs b/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs index 90dd783e4..f3d170d8b 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs @@ -5,7 +5,6 @@ use crate::RTSPMediaFactory; use glib::{prelude::*, translate::*}; -use std::mem; glib::wrapper! { #[doc(alias = "GstRTSPMountPoints")] @@ -67,7 +66,7 @@ pub trait RTSPMountPointsExt: IsA + sealed::Sealed + 'static { #[doc(alias = "match")] fn match_(&self, path: &str) -> (RTSPMediaFactory, i32) { unsafe { - let mut matched = mem::MaybeUninit::uninit(); + let mut matched = std::mem::MaybeUninit::uninit(); let ret = from_glib_full(ffi::gst_rtsp_mount_points_match( self.as_ref().to_glib_none().0, path.to_glib_none().0, diff --git a/gstreamer-rtsp-server/src/auto/rtsp_server.rs b/gstreamer-rtsp-server/src/auto/rtsp_server.rs index 45257d283..6ad5ad595 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_server.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_server.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstRTSPServer")] @@ -114,7 +114,7 @@ pub trait RTSPServerExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gst_rtsp_server_create_socket( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -134,7 +134,7 @@ pub trait RTSPServerExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, ) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gst_rtsp_server_create_source( self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, @@ -360,7 +360,7 @@ pub trait RTSPServerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"client-connected\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( client_connected_trampoline:: as *const (), )), Box_::into_raw(f), @@ -389,7 +389,7 @@ pub trait RTSPServerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::address\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_address_trampoline:: as *const (), )), Box_::into_raw(f), @@ -418,7 +418,7 @@ pub trait RTSPServerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::backlog\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_backlog_trampoline:: as *const (), )), Box_::into_raw(f), @@ -447,7 +447,7 @@ pub trait RTSPServerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::bound-port\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_bound_port_trampoline:: as *const (), )), Box_::into_raw(f), @@ -476,7 +476,7 @@ pub trait RTSPServerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::content-length-limit\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_content_length_limit_trampoline:: as *const (), )), Box_::into_raw(f), @@ -505,7 +505,7 @@ pub trait RTSPServerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::mount-points\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_mount_points_trampoline:: as *const (), )), Box_::into_raw(f), @@ -534,7 +534,7 @@ pub trait RTSPServerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::service\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_service_trampoline:: as *const (), )), Box_::into_raw(f), @@ -563,7 +563,7 @@ pub trait RTSPServerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::session-pool\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_session_pool_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session.rs b/gstreamer-rtsp-server/src/auto/rtsp_session.rs index 63878b513..3db7f07da 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstRTSPSession")] @@ -229,7 +229,7 @@ pub trait RTSPSessionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::extra-timeout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_extra_timeout_trampoline:: as *const (), )), Box_::into_raw(f), @@ -258,7 +258,7 @@ pub trait RTSPSessionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::timeout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_timeout_trampoline:: as *const (), )), Box_::into_raw(f), @@ -287,7 +287,7 @@ pub trait RTSPSessionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::timeout-always-visible\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_timeout_always_visible_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs index 7b24ab727..eda9c4f96 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs @@ -5,7 +5,6 @@ use crate::{RTSPMedia, RTSPStreamTransport}; use glib::{prelude::*, translate::*}; -use std::mem; glib::wrapper! { #[doc(alias = "GstRTSPSessionMedia")] @@ -105,7 +104,7 @@ pub trait RTSPSessionMediaExt: IsA + sealed::Sealed + 'static #[doc(alias = "gst_rtsp_session_media_matches")] fn matches(&self, path: &str) -> Option { unsafe { - let mut matched = mem::MaybeUninit::uninit(); + let mut matched = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_rtsp_session_media_matches( self.as_ref().to_glib_none().0, path.to_glib_none().0, diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs index 1cc979c02..a737d33ed 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstRTSPSessionPool")] @@ -171,7 +171,7 @@ pub trait RTSPSessionPoolExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"session-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( session_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -200,7 +200,7 @@ pub trait RTSPSessionPoolExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::max-sessions\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_sessions_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs index bf2ac7059..7b36d848a 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstRTSPStream")] @@ -263,8 +263,8 @@ pub trait RTSPStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_rates")] fn rates(&self) -> Option<(f64, f64)> { unsafe { - let mut rate = mem::MaybeUninit::uninit(); - let mut applied_rate = mem::MaybeUninit::uninit(); + let mut rate = std::mem::MaybeUninit::uninit(); + let mut applied_rate = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_rtsp_stream_get_rates( self.as_ref().to_glib_none().0, rate.as_mut_ptr(), @@ -342,10 +342,10 @@ pub trait RTSPStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_rtpinfo")] fn rtpinfo(&self) -> Option<(u32, u32, u32, Option)> { unsafe { - let mut rtptime = mem::MaybeUninit::uninit(); - let mut seq = mem::MaybeUninit::uninit(); - let mut clock_rate = mem::MaybeUninit::uninit(); - let mut running_time = mem::MaybeUninit::uninit(); + let mut rtptime = std::mem::MaybeUninit::uninit(); + let mut seq = std::mem::MaybeUninit::uninit(); + let mut clock_rate = std::mem::MaybeUninit::uninit(); + let mut running_time = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_rtsp_stream_get_rtpinfo( self.as_ref().to_glib_none().0, rtptime.as_mut_ptr(), @@ -416,7 +416,7 @@ pub trait RTSPStreamExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_ssrc")] fn ssrc(&self) -> u32 { unsafe { - let mut ssrc = mem::MaybeUninit::uninit(); + let mut ssrc = std::mem::MaybeUninit::uninit(); ffi::gst_rtsp_stream_get_ssrc(self.as_ref().to_glib_none().0, ssrc.as_mut_ptr()); ssrc.assume_init() } @@ -992,7 +992,7 @@ pub trait RTSPStreamExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"new-rtcp-encoder\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( new_rtcp_encoder_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1024,7 +1024,7 @@ pub trait RTSPStreamExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"new-rtp-encoder\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( new_rtp_encoder_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1056,7 +1056,7 @@ pub trait RTSPStreamExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"new-rtp-rtcp-decoder\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( new_rtp_rtcp_decoder_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1085,7 +1085,7 @@ pub trait RTSPStreamExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::control\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_control_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1114,7 +1114,7 @@ pub trait RTSPStreamExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::profiles\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_profiles_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1143,7 +1143,7 @@ pub trait RTSPStreamExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::protocols\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_protocols_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs index 25927be92..d59706d60 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstRTSPThreadPool")] @@ -99,7 +99,7 @@ pub trait RTSPThreadPoolExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::max-threads\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_threads_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-rtsp-server/src/auto/versions.txt b/gstreamer-rtsp-server/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-rtsp-server/src/auto/versions.txt +++ b/gstreamer-rtsp-server/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-rtsp-server/sys/src/auto/versions.txt b/gstreamer-rtsp-server/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-rtsp-server/sys/src/auto/versions.txt +++ b/gstreamer-rtsp-server/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-rtsp-server/sys/tests/abi.rs b/gstreamer-rtsp-server/sys/tests/abi.rs index 438767a9b..d8d0268eb 100644 --- a/gstreamer-rtsp-server/sys/tests/abi.rs +++ b/gstreamer-rtsp-server/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-rtsp/src/auto/enums.rs b/gstreamer-rtsp/src/auto/enums.rs index 4c67c9320..acaaf6a3b 100644 --- a/gstreamer-rtsp/src/auto/enums.rs +++ b/gstreamer-rtsp/src/auto/enums.rs @@ -51,6 +51,7 @@ impl FromGlib for RTSPAuthMethod { impl StaticType for RTSPAuthMethod { #[inline] + #[doc(alias = "gst_rtsp_auth_method_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_auth_method_get_type()) } } @@ -62,7 +63,7 @@ impl glib::HasParamSpec for RTSPAuthMethod { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -150,6 +151,7 @@ impl FromGlib for RTSPFamily { impl StaticType for RTSPFamily { #[inline] + #[doc(alias = "gst_rtsp_family_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_family_get_type()) } } @@ -161,7 +163,7 @@ impl glib::HasParamSpec for RTSPFamily { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -595,6 +597,7 @@ impl FromGlib for RTSPHeaderField { impl StaticType for RTSPHeaderField { #[inline] + #[doc(alias = "gst_rtsp_header_field_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_header_field_get_type()) } } @@ -606,7 +609,7 @@ impl glib::HasParamSpec for RTSPHeaderField { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -706,6 +709,7 @@ impl FromGlib for RTSPMsgType { impl StaticType for RTSPMsgType { #[inline] + #[doc(alias = "gst_rtsp_msg_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_msg_type_get_type()) } } @@ -717,7 +721,7 @@ impl glib::HasParamSpec for RTSPMsgType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -813,6 +817,7 @@ impl FromGlib for RTSPRangeUnit { impl StaticType for RTSPRangeUnit { #[inline] + #[doc(alias = "gst_rtsp_range_unit_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_range_unit_get_type()) } } @@ -824,7 +829,7 @@ impl glib::HasParamSpec for RTSPRangeUnit { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -970,6 +975,7 @@ impl FromGlib for RTSPResult { impl StaticType for RTSPResult { #[inline] + #[doc(alias = "gst_rtsp_result_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_result_get_type()) } } @@ -981,7 +987,7 @@ impl glib::HasParamSpec for RTSPResult { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1081,6 +1087,7 @@ impl FromGlib for RTSPState { impl StaticType for RTSPState { #[inline] + #[doc(alias = "gst_rtsp_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_state_get_type()) } } @@ -1092,7 +1099,7 @@ impl glib::HasParamSpec for RTSPState { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1358,6 +1365,7 @@ impl FromGlib for RTSPStatusCode { impl StaticType for RTSPStatusCode { #[inline] + #[doc(alias = "gst_rtsp_status_code_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_status_code_get_type()) } } @@ -1369,7 +1377,7 @@ impl glib::HasParamSpec for RTSPStatusCode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1465,6 +1473,7 @@ impl FromGlib for RTSPTimeType { impl StaticType for RTSPTimeType { #[inline] + #[doc(alias = "gst_rtsp_time_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_time_type_get_type()) } } @@ -1476,7 +1485,7 @@ impl glib::HasParamSpec for RTSPTimeType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-rtsp/src/auto/flags.rs b/gstreamer-rtsp/src/auto/flags.rs index e466e0eb4..a3312b0f9 100644 --- a/gstreamer-rtsp/src/auto/flags.rs +++ b/gstreamer-rtsp/src/auto/flags.rs @@ -37,6 +37,7 @@ impl FromGlib for RTSPEvent { impl StaticType for RTSPEvent { #[inline] + #[doc(alias = "gst_rtsp_event_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_event_get_type()) } } @@ -48,7 +49,7 @@ impl glib::HasParamSpec for RTSPEvent { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -128,6 +129,7 @@ impl FromGlib for RTSPLowerTrans { impl StaticType for RTSPLowerTrans { #[inline] + #[doc(alias = "gst_rtsp_lower_trans_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_lower_trans_get_type()) } } @@ -139,7 +141,7 @@ impl glib::HasParamSpec for RTSPLowerTrans { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -243,6 +245,7 @@ impl FromGlib for RTSPMethod { impl StaticType for RTSPMethod { #[inline] + #[doc(alias = "gst_rtsp_method_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_method_get_type()) } } @@ -254,7 +257,7 @@ impl glib::HasParamSpec for RTSPMethod { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -332,6 +335,7 @@ impl FromGlib for RTSPProfile { impl StaticType for RTSPProfile { #[inline] + #[doc(alias = "gst_rtsp_profile_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_profile_get_type()) } } @@ -343,7 +347,7 @@ impl glib::HasParamSpec for RTSPProfile { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -417,6 +421,7 @@ impl FromGlib for RTSPTransMode { impl StaticType for RTSPTransMode { #[inline] + #[doc(alias = "gst_rtsp_trans_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rtsp_trans_mode_get_type()) } } @@ -428,7 +433,7 @@ impl glib::HasParamSpec for RTSPTransMode { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/gstreamer-rtsp/src/auto/rtsp_url.rs b/gstreamer-rtsp/src/auto/rtsp_url.rs index 466bc0e75..477df2a2b 100644 --- a/gstreamer-rtsp/src/auto/rtsp_url.rs +++ b/gstreamer-rtsp/src/auto/rtsp_url.rs @@ -5,7 +5,6 @@ use crate::RTSPResult; use glib::translate::*; -use std::ptr; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -56,7 +55,7 @@ impl RTSPUrl { pub fn parse(urlstr: &str) -> (RTSPResult, Option) { assert_initialized_main_thread!(); unsafe { - let mut url = ptr::null_mut(); + let mut url = std::ptr::null_mut(); let ret = from_glib(ffi::gst_rtsp_url_parse(urlstr.to_glib_none().0, &mut url)); (ret, from_glib_full(url)) } diff --git a/gstreamer-rtsp/src/auto/versions.txt b/gstreamer-rtsp/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-rtsp/src/auto/versions.txt +++ b/gstreamer-rtsp/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-rtsp/sys/src/auto/versions.txt b/gstreamer-rtsp/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-rtsp/sys/src/auto/versions.txt +++ b/gstreamer-rtsp/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-rtsp/sys/tests/abi.rs b/gstreamer-rtsp/sys/tests/abi.rs index c2f34fcc4..abc8317fb 100644 --- a/gstreamer-rtsp/sys/tests/abi.rs +++ b/gstreamer-rtsp/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-sdp/src/auto/versions.txt b/gstreamer-sdp/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-sdp/src/auto/versions.txt +++ b/gstreamer-sdp/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-sdp/sys/src/auto/versions.txt b/gstreamer-sdp/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-sdp/sys/src/auto/versions.txt +++ b/gstreamer-sdp/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-sdp/sys/tests/abi.rs b/gstreamer-sdp/sys/tests/abi.rs index 47743aec0..3fd269a88 100644 --- a/gstreamer-sdp/sys/tests/abi.rs +++ b/gstreamer-sdp/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-tag/sys/src/auto/versions.txt b/gstreamer-tag/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-tag/sys/src/auto/versions.txt +++ b/gstreamer-tag/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-tag/sys/tests/abi.rs b/gstreamer-tag/sys/tests/abi.rs index 22cff4f50..191954ca4 100644 --- a/gstreamer-tag/sys/tests/abi.rs +++ b/gstreamer-tag/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-validate/src/auto/bin_monitor.rs b/gstreamer-validate/src/auto/bin_monitor.rs index e81a540a1..a81902d2b 100644 --- a/gstreamer-validate/src/auto/bin_monitor.rs +++ b/gstreamer-validate/src/auto/bin_monitor.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstValidateBinMonitor")] @@ -85,7 +85,7 @@ pub trait BinMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::handles-states\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_handles_states_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-validate/src/auto/enums.rs b/gstreamer-validate/src/auto/enums.rs index ab7938db5..e5519a72a 100644 --- a/gstreamer-validate/src/auto/enums.rs +++ b/gstreamer-validate/src/auto/enums.rs @@ -4,7 +4,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*, GStr}; -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -50,9 +49,9 @@ impl ReportLevel { } } -impl fmt::Display for ReportLevel { +impl std::fmt::Display for ReportLevel { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -97,6 +96,7 @@ impl FromGlib for ReportLevel { impl StaticType for ReportLevel { #[inline] + #[doc(alias = "gst_validate_report_level_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_validate_report_level_get_type()) } } @@ -108,7 +108,7 @@ impl glib::HasParamSpec for ReportLevel { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -216,6 +216,7 @@ impl FromGlib for ReportingDetails { impl StaticType for ReportingDetails { #[inline] + #[doc(alias = "gst_validate_reporting_details_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_validate_reporting_details_get_type()) } } @@ -227,7 +228,7 @@ impl glib::HasParamSpec for ReportingDetails { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-validate/src/auto/flags.rs b/gstreamer-validate/src/auto/flags.rs index 06cf9d5db..85e856466 100644 --- a/gstreamer-validate/src/auto/flags.rs +++ b/gstreamer-validate/src/auto/flags.rs @@ -57,6 +57,7 @@ impl FromGlib for ActionTypeFlags { impl StaticType for ActionTypeFlags { #[inline] + #[doc(alias = "gst_validate_action_type_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_validate_action_type_flags_get_type()) } } @@ -68,7 +69,7 @@ impl glib::HasParamSpec for ActionTypeFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -146,6 +147,7 @@ impl FromGlib for IssueFlags { impl StaticType for IssueFlags { #[inline] + #[doc(alias = "gst_validate_issue_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_validate_issue_flags_get_type()) } } @@ -157,7 +159,7 @@ impl glib::HasParamSpec for IssueFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/gstreamer-validate/src/auto/mod.rs b/gstreamer-validate/src/auto/mod.rs index a7c43d788..1818aeb4f 100644 --- a/gstreamer-validate/src/auto/mod.rs +++ b/gstreamer-validate/src/auto/mod.rs @@ -47,8 +47,7 @@ pub use self::flags::IssueFlags; mod alias; pub use self::alias::IssueId; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::bin_monitor::BinMonitorExt; pub use super::monitor::MonitorExt; pub use super::reporter::ReporterExt; diff --git a/gstreamer-validate/src/auto/monitor.rs b/gstreamer-validate/src/auto/monitor.rs index 246d787a3..da8a64e8b 100644 --- a/gstreamer-validate/src/auto/monitor.rs +++ b/gstreamer-validate/src/auto/monitor.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstValidateMonitor")] @@ -141,7 +141,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::pipeline\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_pipeline_trampoline:: as *const (), )), Box_::into_raw(f), @@ -170,7 +170,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::verbosity\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_verbosity_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-validate/src/auto/runner.rs b/gstreamer-validate/src/auto/runner.rs index caa41d22f..6a4462445 100644 --- a/gstreamer-validate/src/auto/runner.rs +++ b/gstreamer-validate/src/auto/runner.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstValidateRunner")] @@ -128,7 +128,7 @@ pub trait RunnerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"report-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( report_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -153,7 +153,7 @@ pub trait RunnerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"stopping\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( stopping_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-validate/src/auto/scenario.rs b/gstreamer-validate/src/auto/scenario.rs index 262bc0b01..d7c6a9c76 100644 --- a/gstreamer-validate/src/auto/scenario.rs +++ b/gstreamer-validate/src/auto/scenario.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstValidateScenario")] @@ -125,7 +125,7 @@ pub trait ScenarioExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"action-done\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( action_done_trampoline:: as *const (), )), Box_::into_raw(f), @@ -147,7 +147,7 @@ pub trait ScenarioExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"done\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( done_trampoline:: as *const (), )), Box_::into_raw(f), @@ -173,7 +173,7 @@ pub trait ScenarioExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::execute-on-idle\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_execute_on_idle_trampoline:: as *const (), )), Box_::into_raw(f), @@ -199,7 +199,7 @@ pub trait ScenarioExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::handles-states\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_handles_states_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-validate/src/auto/versions.txt b/gstreamer-validate/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-validate/src/auto/versions.txt +++ b/gstreamer-validate/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-validate/sys/src/auto/versions.txt b/gstreamer-validate/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-validate/sys/src/auto/versions.txt +++ b/gstreamer-validate/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-validate/sys/tests/abi.rs b/gstreamer-validate/sys/tests/abi.rs index 28d23b517..34de8995f 100644 --- a/gstreamer-validate/sys/tests/abi.rs +++ b/gstreamer-validate/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-video/src/auto/color_balance.rs b/gstreamer-video/src/auto/color_balance.rs index fdbeb86be..d6579cd62 100644 --- a/gstreamer-video/src/auto/color_balance.rs +++ b/gstreamer-video/src/auto/color_balance.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstColorBalance")] @@ -111,7 +111,7 @@ pub trait ColorBalanceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"value-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( value_changed_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-video/src/auto/color_balance_channel.rs b/gstreamer-video/src/auto/color_balance_channel.rs index f6430af3a..92495d67a 100644 --- a/gstreamer-video/src/auto/color_balance_channel.rs +++ b/gstreamer-video/src/auto/color_balance_channel.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstColorBalanceChannel")] @@ -56,7 +56,7 @@ pub trait ColorBalanceChannelExt: IsA + sealed::Sealed + 's connect_raw( self.as_ptr() as *mut _, b"value-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( value_changed_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-video/src/auto/enums.rs b/gstreamer-video/src/auto/enums.rs index b659ed73a..d3afed78a 100644 --- a/gstreamer-video/src/auto/enums.rs +++ b/gstreamer-video/src/auto/enums.rs @@ -4,7 +4,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*, GStr}; -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -48,6 +47,7 @@ impl FromGlib for ColorBalanceType { impl StaticType for ColorBalanceType { #[inline] + #[doc(alias = "gst_color_balance_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_color_balance_type_get_type()) } } @@ -59,7 +59,7 @@ impl glib::HasParamSpec for ColorBalanceType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -194,6 +194,7 @@ impl FromGlib for NavigationCommand { impl StaticType for NavigationCommand { #[inline] + #[doc(alias = "gst_navigation_command_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_navigation_command_get_type()) } } @@ -205,7 +206,7 @@ impl glib::HasParamSpec for NavigationCommand { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -355,6 +356,7 @@ impl FromGlib for NavigationEventType { impl StaticType for NavigationEventType { #[inline] + #[doc(alias = "gst_navigation_event_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_navigation_event_type_get_type()) } } @@ -366,7 +368,7 @@ impl glib::HasParamSpec for NavigationEventType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -462,6 +464,7 @@ impl FromGlib for NavigationMessageType { impl StaticType for NavigationMessageType { #[inline] + #[doc(alias = "gst_navigation_message_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_navigation_message_type_get_type()) } } @@ -473,7 +476,7 @@ impl glib::HasParamSpec for NavigationMessageType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -561,6 +564,7 @@ impl FromGlib for NavigationQueryType { impl StaticType for NavigationQueryType { #[inline] + #[doc(alias = "gst_navigation_query_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_navigation_query_type_get_type()) } } @@ -572,7 +576,7 @@ impl glib::HasParamSpec for NavigationQueryType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -668,6 +672,7 @@ impl FromGlib for VideoAFDSpec { #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl StaticType for VideoAFDSpec { #[inline] + #[doc(alias = "gst_video_afd_spec_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_afd_spec_get_type()) } } @@ -681,7 +686,7 @@ impl glib::HasParamSpec for VideoAFDSpec { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -817,6 +822,7 @@ impl FromGlib for VideoAFDValue { #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl StaticType for VideoAFDValue { #[inline] + #[doc(alias = "gst_video_afd_value_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_afd_value_get_type()) } } @@ -830,7 +836,7 @@ impl glib::HasParamSpec for VideoAFDValue { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -926,6 +932,7 @@ impl FromGlib for VideoAlphaMode { impl StaticType for VideoAlphaMode { #[inline] + #[doc(alias = "gst_video_alpha_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_alpha_mode_get_type()) } } @@ -937,7 +944,7 @@ impl glib::HasParamSpec for VideoAlphaMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1051,6 +1058,7 @@ impl FromGlib for VideoCaptionType { #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl StaticType for VideoCaptionType { #[inline] + #[doc(alias = "gst_video_caption_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_caption_type_get_type()) } } @@ -1064,7 +1072,7 @@ impl glib::HasParamSpec for VideoCaptionType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1164,6 +1172,7 @@ impl FromGlib for VideoChromaMode { impl StaticType for VideoChromaMode { #[inline] + #[doc(alias = "gst_video_chroma_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_chroma_mode_get_type()) } } @@ -1175,7 +1184,7 @@ impl glib::HasParamSpec for VideoChromaMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1297,6 +1306,7 @@ impl FromGlib for VideoColorMatrix { impl StaticType for VideoColorMatrix { #[inline] + #[doc(alias = "gst_video_color_matrix_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_color_matrix_get_type()) } } @@ -1308,7 +1318,7 @@ impl glib::HasParamSpec for VideoColorMatrix { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1487,6 +1497,7 @@ impl FromGlib for VideoColorPrimaries { impl StaticType for VideoColorPrimaries { #[inline] + #[doc(alias = "gst_video_color_primaries_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_color_primaries_get_type()) } } @@ -1498,7 +1509,7 @@ impl glib::HasParamSpec for VideoColorPrimaries { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1594,6 +1605,7 @@ impl FromGlib for VideoDitherMethod { impl StaticType for VideoDitherMethod { #[inline] + #[doc(alias = "gst_video_dither_method_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_dither_method_get_type()) } } @@ -1605,7 +1617,7 @@ impl glib::HasParamSpec for VideoDitherMethod { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1673,9 +1685,9 @@ impl VideoFieldOrder { } } -impl fmt::Display for VideoFieldOrder { +impl std::fmt::Display for VideoFieldOrder { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } @@ -1712,6 +1724,7 @@ impl FromGlib for VideoFieldOrder { impl StaticType for VideoFieldOrder { #[inline] + #[doc(alias = "gst_video_field_order_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_field_order_get_type()) } } @@ -1723,7 +1736,7 @@ impl glib::HasParamSpec for VideoFieldOrder { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2161,9 +2174,9 @@ impl VideoFormat { } } -impl fmt::Display for VideoFormat { +impl std::fmt::Display for VideoFormat { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } @@ -2554,6 +2567,7 @@ impl FromGlib for VideoFormat { impl StaticType for VideoFormat { #[inline] + #[doc(alias = "gst_video_format_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_format_get_type()) } } @@ -2565,7 +2579,7 @@ impl glib::HasParamSpec for VideoFormat { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2649,6 +2663,7 @@ impl FromGlib for VideoGammaMode { impl StaticType for VideoGammaMode { #[inline] + #[doc(alias = "gst_video_gamma_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_gamma_mode_get_type()) } } @@ -2660,7 +2675,7 @@ impl glib::HasParamSpec for VideoGammaMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2744,9 +2759,9 @@ impl VideoInterlaceMode { } } -impl fmt::Display for VideoInterlaceMode { +impl std::fmt::Display for VideoInterlaceMode { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } @@ -2789,6 +2804,7 @@ impl FromGlib for VideoInterlaceMode { impl StaticType for VideoInterlaceMode { #[inline] + #[doc(alias = "gst_video_interlace_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_interlace_mode_get_type()) } } @@ -2800,7 +2816,7 @@ impl glib::HasParamSpec for VideoInterlaceMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2892,6 +2908,7 @@ impl FromGlib for VideoMatrixMode { impl StaticType for VideoMatrixMode { #[inline] + #[doc(alias = "gst_video_matrix_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_matrix_mode_get_type()) } } @@ -2903,7 +2920,7 @@ impl glib::HasParamSpec for VideoMatrixMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3023,6 +3040,7 @@ impl FromGlib for VideoMultiviewFramePacking impl StaticType for VideoMultiviewFramePacking { #[inline] + #[doc(alias = "gst_video_multiview_frame_packing_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_multiview_frame_packing_get_type()) } } @@ -3034,7 +3052,7 @@ impl glib::HasParamSpec for VideoMultiviewFramePacking { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3182,6 +3200,7 @@ impl FromGlib for VideoMultiviewMode { impl StaticType for VideoMultiviewMode { #[inline] + #[doc(alias = "gst_video_multiview_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_multiview_mode_get_type()) } } @@ -3193,7 +3212,7 @@ impl glib::HasParamSpec for VideoMultiviewMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3309,6 +3328,7 @@ impl FromGlib for VideoOrientationMethod { impl StaticType for VideoOrientationMethod { #[inline] + #[doc(alias = "gst_video_orientation_method_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_orientation_method_get_type()) } } @@ -3320,7 +3340,7 @@ impl glib::HasParamSpec for VideoOrientationMethod { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3408,6 +3428,7 @@ impl FromGlib for VideoPrimariesMode { impl StaticType for VideoPrimariesMode { #[inline] + #[doc(alias = "gst_video_primaries_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_primaries_mode_get_type()) } } @@ -3419,7 +3440,7 @@ impl glib::HasParamSpec for VideoPrimariesMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3515,6 +3536,7 @@ impl FromGlib for VideoResamplerMethod { impl StaticType for VideoResamplerMethod { #[inline] + #[doc(alias = "gst_video_resampler_method_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_resampler_method_get_type()) } } @@ -3526,7 +3548,7 @@ impl glib::HasParamSpec for VideoResamplerMethod { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3618,6 +3640,7 @@ impl FromGlib for VideoTileMode { impl StaticType for VideoTileMode { #[inline] + #[doc(alias = "gst_video_tile_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_tile_mode_get_type()) } } @@ -3629,7 +3652,7 @@ impl glib::HasParamSpec for VideoTileMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3836,6 +3859,7 @@ impl FromGlib for VideoTransferFunction { impl StaticType for VideoTransferFunction { #[inline] + #[doc(alias = "gst_video_transfer_function_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_transfer_function_get_type()) } } @@ -3847,7 +3871,7 @@ impl glib::HasParamSpec for VideoTransferFunction { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-video/src/auto/flags.rs b/gstreamer-video/src/auto/flags.rs index f5b942393..db8aaec6e 100644 --- a/gstreamer-video/src/auto/flags.rs +++ b/gstreamer-video/src/auto/flags.rs @@ -4,7 +4,6 @@ // DO NOT EDIT use glib::{bitflags::bitflags, prelude::*, translate::*}; -use std::fmt; #[cfg(feature = "v1_22")] bitflags! { @@ -74,6 +73,7 @@ impl FromGlib for NavigationModifierType { #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] impl StaticType for NavigationModifierType { #[inline] + #[doc(alias = "gst_navigation_modifier_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_navigation_modifier_type_get_type()) } } @@ -87,7 +87,7 @@ impl glib::HasParamSpec for NavigationModifierType { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -189,6 +189,7 @@ impl FromGlib for VideoBufferFlags { impl StaticType for VideoBufferFlags { #[inline] + #[doc(alias = "gst_video_buffer_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_buffer_flags_get_type()) } } @@ -200,7 +201,7 @@ impl glib::HasParamSpec for VideoBufferFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -275,9 +276,9 @@ impl VideoChromaSite { } } -impl fmt::Display for VideoChromaSite { +impl std::fmt::Display for VideoChromaSite { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } @@ -303,6 +304,7 @@ impl FromGlib for VideoChromaSite { impl StaticType for VideoChromaSite { #[inline] + #[doc(alias = "gst_video_chroma_site_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_chroma_site_get_type()) } } @@ -314,7 +316,7 @@ impl glib::HasParamSpec for VideoChromaSite { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -398,6 +400,7 @@ impl FromGlib for VideoCodecFrameFlags { #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl StaticType for VideoCodecFrameFlags { #[inline] + #[doc(alias = "gst_video_codec_frame_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_codec_frame_flags_get_type()) } } @@ -411,7 +414,7 @@ impl glib::HasParamSpec for VideoCodecFrameFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -501,6 +504,7 @@ impl FromGlib for VideoDecoderRequest #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl StaticType for VideoDecoderRequestSyncPointFlags { #[inline] + #[doc(alias = "gst_video_decoder_request_sync_point_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_decoder_request_sync_point_flags_get_type()) } } @@ -514,7 +518,7 @@ impl glib::HasParamSpec for VideoDecoderRequestSyncPointFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -596,6 +600,7 @@ impl FromGlib for VideoFlags { impl StaticType for VideoFlags { #[inline] + #[doc(alias = "gst_video_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_flags_get_type()) } } @@ -607,7 +612,7 @@ impl glib::HasParamSpec for VideoFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -699,6 +704,7 @@ impl FromGlib for VideoFormatFlags { impl StaticType for VideoFormatFlags { #[inline] + #[doc(alias = "gst_video_format_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_format_flags_get_type()) } } @@ -710,7 +716,7 @@ impl glib::HasParamSpec for VideoFormatFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -800,6 +806,7 @@ impl FromGlib for VideoFrameFlags { impl StaticType for VideoFrameFlags { #[inline] + #[doc(alias = "gst_video_frame_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_frame_flags_get_type()) } } @@ -811,7 +818,7 @@ impl glib::HasParamSpec for VideoFrameFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -895,6 +902,7 @@ impl FromGlib for VideoMultiviewFlags { impl StaticType for VideoMultiviewFlags { #[inline] + #[doc(alias = "gst_video_multiview_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_multiview_flags_get_type()) } } @@ -906,7 +914,7 @@ impl glib::HasParamSpec for VideoMultiviewFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -982,6 +990,7 @@ impl FromGlib for VideoOverlayFormatFlags { #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl StaticType for VideoOverlayFormatFlags { #[inline] + #[doc(alias = "gst_video_overlay_format_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_overlay_format_flags_get_type()) } } @@ -995,7 +1004,7 @@ impl glib::HasParamSpec for VideoOverlayFormatFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1077,6 +1086,7 @@ impl FromGlib for VideoPackFlags { impl StaticType for VideoPackFlags { #[inline] + #[doc(alias = "gst_video_pack_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_pack_flags_get_type()) } } @@ -1088,7 +1098,7 @@ impl glib::HasParamSpec for VideoPackFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1164,6 +1174,7 @@ impl FromGlib for VideoTimeCodeFlags { #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl StaticType for VideoTimeCodeFlags { #[inline] + #[doc(alias = "gst_video_time_code_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_video_time_code_flags_get_type()) } } @@ -1177,7 +1188,7 @@ impl glib::HasParamSpec for VideoTimeCodeFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/gstreamer-video/src/auto/mod.rs b/gstreamer-video/src/auto/mod.rs index 47dc10e93..1a506bec9 100644 --- a/gstreamer-video/src/auto/mod.rs +++ b/gstreamer-video/src/auto/mod.rs @@ -112,8 +112,7 @@ pub use self::flags::VideoOverlayFormatFlags; pub use self::flags::VideoPackFlags; pub use self::flags::VideoTimeCodeFlags; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::color_balance::ColorBalanceExt; pub use super::color_balance_channel::ColorBalanceChannelExt; pub use super::navigation::NavigationExt; diff --git a/gstreamer-video/src/auto/versions.txt b/gstreamer-video/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-video/src/auto/versions.txt +++ b/gstreamer-video/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-video/src/auto/video_aggregator_pad.rs b/gstreamer-video/src/auto/video_aggregator_pad.rs index 63fe76796..085b667ee 100644 --- a/gstreamer-video/src/auto/video_aggregator_pad.rs +++ b/gstreamer-video/src/auto/video_aggregator_pad.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstVideoAggregatorPad")] @@ -95,7 +95,7 @@ pub trait VideoAggregatorPadExt: IsA + sealed::Sealed + 'sta connect_raw( self.as_ptr() as *mut _, b"notify::max-last-buffer-repeat\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_last_buffer_repeat_trampoline:: as *const (), )), Box_::into_raw(f), @@ -124,7 +124,7 @@ pub trait VideoAggregatorPadExt: IsA + sealed::Sealed + 'sta connect_raw( self.as_ptr() as *mut _, b"notify::repeat-after-eos\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_repeat_after_eos_trampoline:: as *const (), )), Box_::into_raw(f), @@ -150,7 +150,7 @@ pub trait VideoAggregatorPadExt: IsA + sealed::Sealed + 'sta connect_raw( self.as_ptr() as *mut _, b"notify::zorder\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_zorder_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-video/src/auto/video_decoder.rs b/gstreamer-video/src/auto/video_decoder.rs index 7deb7f0f4..e63af43aa 100644 --- a/gstreamer-video/src/auto/video_decoder.rs +++ b/gstreamer-video/src/auto/video_decoder.rs @@ -13,7 +13,7 @@ use glib::signal::{connect_raw, SignalHandlerId}; use glib::{prelude::*, translate::*}; #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstVideoDecoder")] @@ -441,7 +441,7 @@ pub trait VideoDecoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::automatic-request-sync-point-flags\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_automatic_request_sync_point_flags_trampoline:: as *const (), )), Box_::into_raw(f), @@ -472,7 +472,7 @@ pub trait VideoDecoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::automatic-request-sync-points\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_automatic_request_sync_points_trampoline:: as *const (), )), Box_::into_raw(f), @@ -503,7 +503,7 @@ pub trait VideoDecoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::discard-corrupted-frames\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_discard_corrupted_frames_trampoline:: as *const (), )), Box_::into_raw(f), @@ -534,7 +534,7 @@ pub trait VideoDecoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::max-errors\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_errors_trampoline:: as *const (), )), Box_::into_raw(f), @@ -565,7 +565,7 @@ pub trait VideoDecoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::min-force-key-unit-interval\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_min_force_key_unit_interval_trampoline:: as *const (), )), Box_::into_raw(f), @@ -593,7 +593,7 @@ pub trait VideoDecoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::qos\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_qos_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-video/src/auto/video_encoder.rs b/gstreamer-video/src/auto/video_encoder.rs index 9eb0a8b70..ea43b97f8 100644 --- a/gstreamer-video/src/auto/video_encoder.rs +++ b/gstreamer-video/src/auto/video_encoder.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstVideoEncoder")] @@ -170,7 +170,7 @@ pub trait VideoEncoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::min-force-key-unit-interval\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_min_force_key_unit_interval_trampoline:: as *const (), )), Box_::into_raw(f), @@ -196,7 +196,7 @@ pub trait VideoEncoderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::qos\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_qos_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-video/src/auto/video_orientation.rs b/gstreamer-video/src/auto/video_orientation.rs index 57ffefc68..5bacfa658 100644 --- a/gstreamer-video/src/auto/video_orientation.rs +++ b/gstreamer-video/src/auto/video_orientation.rs @@ -4,7 +4,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::mem; glib::wrapper! { #[doc(alias = "GstVideoOrientation")] @@ -32,7 +31,7 @@ pub trait VideoOrientationExt: IsA + sealed::Sealed + 'static #[doc(alias = "get_hcenter")] fn hcenter(&self) -> Option { unsafe { - let mut center = mem::MaybeUninit::uninit(); + let mut center = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_video_orientation_get_hcenter( self.as_ref().to_glib_none().0, center.as_mut_ptr(), @@ -49,7 +48,7 @@ pub trait VideoOrientationExt: IsA + sealed::Sealed + 'static #[doc(alias = "get_hflip")] fn hflip(&self) -> Option { unsafe { - let mut flip = mem::MaybeUninit::uninit(); + let mut flip = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_video_orientation_get_hflip( self.as_ref().to_glib_none().0, flip.as_mut_ptr(), @@ -66,7 +65,7 @@ pub trait VideoOrientationExt: IsA + sealed::Sealed + 'static #[doc(alias = "get_vcenter")] fn vcenter(&self) -> Option { unsafe { - let mut center = mem::MaybeUninit::uninit(); + let mut center = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_video_orientation_get_vcenter( self.as_ref().to_glib_none().0, center.as_mut_ptr(), @@ -83,7 +82,7 @@ pub trait VideoOrientationExt: IsA + sealed::Sealed + 'static #[doc(alias = "get_vflip")] fn vflip(&self) -> Option { unsafe { - let mut flip = mem::MaybeUninit::uninit(); + let mut flip = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_video_orientation_get_vflip( self.as_ref().to_glib_none().0, flip.as_mut_ptr(), diff --git a/gstreamer-video/src/auto/video_sink.rs b/gstreamer-video/src/auto/video_sink.rs index 816b4ece2..22f4aaafe 100644 --- a/gstreamer-video/src/auto/video_sink.rs +++ b/gstreamer-video/src/auto/video_sink.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstVideoSink")] @@ -64,7 +64,7 @@ pub trait VideoSinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::show-preroll-frame\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_show_preroll_frame_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-video/sys/src/auto/versions.txt b/gstreamer-video/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-video/sys/src/auto/versions.txt +++ b/gstreamer-video/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-video/sys/tests/abi.rs b/gstreamer-video/sys/tests/abi.rs index bb9b806af..c47527aad 100644 --- a/gstreamer-video/sys/tests/abi.rs +++ b/gstreamer-video/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer-webrtc/src/auto/enums.rs b/gstreamer-webrtc/src/auto/enums.rs index 10ffdce6c..66219ea5f 100644 --- a/gstreamer-webrtc/src/auto/enums.rs +++ b/gstreamer-webrtc/src/auto/enums.rs @@ -4,7 +4,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*, GStr}; -use std::fmt; #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] @@ -64,6 +63,7 @@ impl FromGlib for WebRTCBundlePolicy { #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl StaticType for WebRTCBundlePolicy { #[inline] + #[doc(alias = "gst_webrtc_bundle_policy_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_bundle_policy_get_type()) } } @@ -77,7 +77,7 @@ impl glib::HasParamSpec for WebRTCBundlePolicy { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -177,6 +177,7 @@ impl FromGlib for WebRTCDTLSSetup { impl StaticType for WebRTCDTLSSetup { #[inline] + #[doc(alias = "gst_webrtc_dtls_setup_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_dtls_setup_get_type()) } } @@ -188,7 +189,7 @@ impl glib::HasParamSpec for WebRTCDTLSSetup { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -284,6 +285,7 @@ impl FromGlib for WebRTCDTLSTransportState { impl StaticType for WebRTCDTLSTransportState { #[inline] + #[doc(alias = "gst_webrtc_dtls_transport_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_dtls_transport_state_get_type()) } } @@ -295,7 +297,7 @@ impl glib::HasParamSpec for WebRTCDTLSTransportState { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -395,6 +397,7 @@ impl FromGlib for WebRTCDataChannelState { #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl StaticType for WebRTCDataChannelState { #[inline] + #[doc(alias = "gst_webrtc_data_channel_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_data_channel_state_get_type()) } } @@ -408,7 +411,7 @@ impl glib::HasParamSpec for WebRTCDataChannelState { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -581,6 +584,7 @@ impl glib::error::ErrorDomain for WebRTCError { #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl StaticType for WebRTCError { #[inline] + #[doc(alias = "gst_webrtc_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_error_get_type()) } } @@ -594,7 +598,7 @@ impl glib::HasParamSpec for WebRTCError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -694,6 +698,7 @@ impl FromGlib for WebRTCFECType { #[cfg_attr(docsrs, doc(cfg(feature = "v1_14_1")))] impl StaticType for WebRTCFECType { #[inline] + #[doc(alias = "gst_webrtc_fec_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_fec_type_get_type()) } } @@ -707,7 +712,7 @@ impl glib::HasParamSpec for WebRTCFECType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -799,6 +804,7 @@ impl FromGlib for WebRTCICEComponent { impl StaticType for WebRTCICEComponent { #[inline] + #[doc(alias = "gst_webrtc_ice_component_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_ice_component_get_type()) } } @@ -810,7 +816,7 @@ impl glib::HasParamSpec for WebRTCICEComponent { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -914,6 +920,7 @@ impl FromGlib for WebRTCICEConnectionState { impl StaticType for WebRTCICEConnectionState { #[inline] + #[doc(alias = "gst_webrtc_ice_connection_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_ice_connection_state_get_type()) } } @@ -925,7 +932,7 @@ impl glib::HasParamSpec for WebRTCICEConnectionState { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1013,6 +1020,7 @@ impl FromGlib for WebRTCICEGatheringState { impl StaticType for WebRTCICEGatheringState { #[inline] + #[doc(alias = "gst_webrtc_ice_gathering_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_ice_gathering_state_get_type()) } } @@ -1024,7 +1032,7 @@ impl glib::HasParamSpec for WebRTCICEGatheringState { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1108,6 +1116,7 @@ impl FromGlib for WebRTCICERole { impl StaticType for WebRTCICERole { #[inline] + #[doc(alias = "gst_webrtc_ice_role_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_ice_role_get_type()) } } @@ -1119,7 +1128,7 @@ impl glib::HasParamSpec for WebRTCICERole { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1211,6 +1220,7 @@ impl FromGlib for WebRTCICETransportPolicy { #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl StaticType for WebRTCICETransportPolicy { #[inline] + #[doc(alias = "gst_webrtc_ice_transport_policy_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_ice_transport_policy_get_type()) } } @@ -1224,7 +1234,7 @@ impl glib::HasParamSpec for WebRTCICETransportPolicy { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1328,6 +1338,7 @@ impl FromGlib for WebRTCKind { #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl StaticType for WebRTCKind { #[inline] + #[doc(alias = "gst_webrtc_kind_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_kind_get_type()) } } @@ -1341,7 +1352,7 @@ impl glib::HasParamSpec for WebRTCKind { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1449,6 +1460,7 @@ impl FromGlib for WebRTCPeerConnectionState { impl StaticType for WebRTCPeerConnectionState { #[inline] + #[doc(alias = "gst_webrtc_peer_connection_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_peer_connection_state_get_type()) } } @@ -1460,7 +1472,7 @@ impl glib::HasParamSpec for WebRTCPeerConnectionState { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1560,6 +1572,7 @@ impl FromGlib for WebRTCPriorityType { #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl StaticType for WebRTCPriorityType { #[inline] + #[doc(alias = "gst_webrtc_priority_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_priority_type_get_type()) } } @@ -1573,7 +1586,7 @@ impl glib::HasParamSpec for WebRTCPriorityType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1677,6 +1690,7 @@ impl FromGlib for WebRTCRTPTransceiverDir impl StaticType for WebRTCRTPTransceiverDirection { #[inline] + #[doc(alias = "gst_webrtc_rtp_transceiver_direction_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_rtp_transceiver_direction_get_type()) } } @@ -1688,7 +1702,7 @@ impl glib::HasParamSpec for WebRTCRTPTransceiverDirection { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1788,6 +1802,7 @@ impl FromGlib for WebRTCSCTPTransportState { #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] impl StaticType for WebRTCSCTPTransportState { #[inline] + #[doc(alias = "gst_webrtc_sctp_transport_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_sctp_transport_state_get_type()) } } @@ -1801,7 +1816,7 @@ impl glib::HasParamSpec for WebRTCSCTPTransportState { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1879,9 +1894,9 @@ impl WebRTCSDPType { } } -impl fmt::Display for WebRTCSDPType { +impl std::fmt::Display for WebRTCSDPType { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } @@ -1920,6 +1935,7 @@ impl FromGlib for WebRTCSDPType { impl StaticType for WebRTCSDPType { #[inline] + #[doc(alias = "gst_webrtc_sdp_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_sdp_type_get_type()) } } @@ -1931,7 +1947,7 @@ impl glib::HasParamSpec for WebRTCSDPType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2031,6 +2047,7 @@ impl FromGlib for WebRTCSignalingState { impl StaticType for WebRTCSignalingState { #[inline] + #[doc(alias = "gst_webrtc_signaling_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_signaling_state_get_type()) } } @@ -2042,7 +2059,7 @@ impl glib::HasParamSpec for WebRTCSignalingState { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2172,6 +2189,7 @@ impl FromGlib for WebRTCStatsType { impl StaticType for WebRTCStatsType { #[inline] + #[doc(alias = "gst_webrtc_stats_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_webrtc_stats_type_get_type()) } } @@ -2183,7 +2201,7 @@ impl glib::HasParamSpec for WebRTCStatsType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer-webrtc/src/auto/mod.rs b/gstreamer-webrtc/src/auto/mod.rs index c014b25c6..9b7383984 100644 --- a/gstreamer-webrtc/src/auto/mod.rs +++ b/gstreamer-webrtc/src/auto/mod.rs @@ -93,8 +93,7 @@ pub use self::enums::WebRTCSDPType; pub use self::enums::WebRTCSignalingState; pub use self::enums::WebRTCStatsType; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { #[cfg(feature = "v1_22")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] pub use super::web_rtcice::WebRTCICEExt; diff --git a/gstreamer-webrtc/src/auto/versions.txt b/gstreamer-webrtc/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-webrtc/src/auto/versions.txt +++ b/gstreamer-webrtc/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-webrtc/src/auto/web_rtc_data_channel.rs b/gstreamer-webrtc/src/auto/web_rtc_data_channel.rs index 461766ab6..8ade0c925 100644 --- a/gstreamer-webrtc/src/auto/web_rtc_data_channel.rs +++ b/gstreamer-webrtc/src/auto/web_rtc_data_channel.rs @@ -9,10 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -#[cfg(feature = "v1_22")] -#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] -use std::ptr; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstWebRTCDataChannel")] @@ -43,7 +40,7 @@ impl WebRTCDataChannel { #[doc(alias = "gst_webrtc_data_channel_send_data_full")] pub fn send_data_full(&self, data: Option<&glib::Bytes>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gst_webrtc_data_channel_send_data_full( self.to_glib_none().0, data.to_glib_none().0, @@ -70,7 +67,7 @@ impl WebRTCDataChannel { #[doc(alias = "gst_webrtc_data_channel_send_string_full")] pub fn send_string_full(&self, str: Option<&str>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gst_webrtc_data_channel_send_string_full( self.to_glib_none().0, str.to_glib_none().0, @@ -157,7 +154,7 @@ impl WebRTCDataChannel { connect_raw( self.as_ptr() as *mut _, b"close\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( close_trampoline:: as *const (), )), Box_::into_raw(f), @@ -188,7 +185,7 @@ impl WebRTCDataChannel { connect_raw( self.as_ptr() as *mut _, b"on-buffered-amount-low\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( on_buffered_amount_low_trampoline:: as *const (), )), Box_::into_raw(f), @@ -212,7 +209,7 @@ impl WebRTCDataChannel { connect_raw( self.as_ptr() as *mut _, b"on-close\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( on_close_trampoline:: as *const (), )), Box_::into_raw(f), @@ -240,7 +237,7 @@ impl WebRTCDataChannel { connect_raw( self.as_ptr() as *mut _, b"on-error\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( on_error_trampoline:: as *const (), )), Box_::into_raw(f), @@ -273,7 +270,7 @@ impl WebRTCDataChannel { connect_raw( self.as_ptr() as *mut _, b"on-message-data\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( on_message_data_trampoline:: as *const (), )), Box_::into_raw(f), @@ -307,7 +304,7 @@ impl WebRTCDataChannel { connect_raw( self.as_ptr() as *mut _, b"on-message-string\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( on_message_string_trampoline:: as *const (), )), Box_::into_raw(f), @@ -331,7 +328,7 @@ impl WebRTCDataChannel { connect_raw( self.as_ptr() as *mut _, b"on-open\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( on_open_trampoline:: as *const (), )), Box_::into_raw(f), @@ -364,7 +361,7 @@ impl WebRTCDataChannel { connect_raw( self.as_ptr() as *mut _, b"send-data\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( send_data_trampoline:: as *const (), )), Box_::into_raw(f), @@ -402,7 +399,7 @@ impl WebRTCDataChannel { connect_raw( self.as_ptr() as *mut _, b"send-string\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( send_string_trampoline:: as *const (), )), Box_::into_raw(f), @@ -434,7 +431,7 @@ impl WebRTCDataChannel { connect_raw( self.as_ptr() as *mut _, b"notify::buffered-amount\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_buffered_amount_trampoline:: as *const (), )), Box_::into_raw(f), @@ -462,7 +459,7 @@ impl WebRTCDataChannel { connect_raw( self.as_ptr() as *mut _, b"notify::buffered-amount-low-threshold\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_buffered_amount_low_threshold_trampoline:: as *const (), )), Box_::into_raw(f), @@ -490,7 +487,7 @@ impl WebRTCDataChannel { connect_raw( self.as_ptr() as *mut _, b"notify::ready-state\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_ready_state_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs b/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs index 77ccc1d3e..42e40254d 100644 --- a/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs +++ b/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstWebRTCDTLSTransport")] @@ -75,7 +75,7 @@ impl WebRTCDTLSTransport { connect_raw( self.as_ptr() as *mut _, b"notify::certificate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_certificate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -103,7 +103,7 @@ impl WebRTCDTLSTransport { connect_raw( self.as_ptr() as *mut _, b"notify::client\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_client_trampoline:: as *const (), )), Box_::into_raw(f), @@ -131,7 +131,7 @@ impl WebRTCDTLSTransport { connect_raw( self.as_ptr() as *mut _, b"notify::remote-certificate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_remote_certificate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -159,7 +159,7 @@ impl WebRTCDTLSTransport { connect_raw( self.as_ptr() as *mut _, b"notify::state\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_state_trampoline:: as *const (), )), Box_::into_raw(f), @@ -187,7 +187,7 @@ impl WebRTCDTLSTransport { connect_raw( self.as_ptr() as *mut _, b"notify::transport\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_transport_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-webrtc/src/auto/web_rtcice.rs b/gstreamer-webrtc/src/auto/web_rtcice.rs index bd399c549..ef80dda81 100644 --- a/gstreamer-webrtc/src/auto/web_rtcice.rs +++ b/gstreamer-webrtc/src/auto/web_rtcice.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstWebRTCICE")] @@ -130,8 +130,8 @@ pub trait WebRTCICEExt: IsA + sealed::Sealed + 'static { stream: &impl IsA, ) -> Option<(WebRTCICECandidateStats, WebRTCICECandidateStats)> { unsafe { - let mut local_stats = ptr::null_mut(); - let mut remote_stats = ptr::null_mut(); + let mut local_stats = std::ptr::null_mut(); + let mut remote_stats = std::ptr::null_mut(); let ret = from_glib(ffi::gst_webrtc_ice_get_selected_pair( self.as_ref().to_glib_none().0, stream.as_ref().to_glib_none().0, @@ -346,7 +346,7 @@ pub trait WebRTCICEExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"add-local-ip-address\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( add_local_ip_address_trampoline:: as *const (), )), Box_::into_raw(f), @@ -381,7 +381,7 @@ pub trait WebRTCICEExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::max-rtp-port\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_rtp_port_trampoline:: as *const (), )), Box_::into_raw(f), @@ -412,7 +412,7 @@ pub trait WebRTCICEExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::min-rtp-port\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_min_rtp_port_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-webrtc/src/auto/web_rtcice_transport.rs b/gstreamer-webrtc/src/auto/web_rtcice_transport.rs index 316ce72b0..8ca935a9c 100644 --- a/gstreamer-webrtc/src/auto/web_rtcice_transport.rs +++ b/gstreamer-webrtc/src/auto/web_rtcice_transport.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstWebRTCICETransport")] @@ -96,7 +96,7 @@ impl WebRTCICETransport { connect_raw( self.as_ptr() as *mut _, b"on-new-candidate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( on_new_candidate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -123,7 +123,7 @@ impl WebRTCICETransport { connect_raw( self.as_ptr() as *mut _, b"on-selected-candidate-pair-change\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( on_selected_candidate_pair_change_trampoline:: as *const (), )), Box_::into_raw(f), @@ -151,7 +151,7 @@ impl WebRTCICETransport { connect_raw( self.as_ptr() as *mut _, b"notify::gathering-state\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_gathering_state_trampoline:: as *const (), )), Box_::into_raw(f), @@ -179,7 +179,7 @@ impl WebRTCICETransport { connect_raw( self.as_ptr() as *mut _, b"notify::state\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_state_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs b/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs index 8ecd749a3..edd9c7d10 100644 --- a/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs +++ b/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs @@ -15,7 +15,7 @@ use glib::{ }; #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstWebRTCRTPReceiver")] @@ -55,7 +55,7 @@ impl WebRTCRTPReceiver { connect_raw( self.as_ptr() as *mut _, b"notify::transport\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_transport_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs b/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs index 89a25157c..85090b940 100644 --- a/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs +++ b/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs @@ -15,7 +15,7 @@ use glib::{ }; #[cfg(feature = "v1_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstWebRTCRTPSender")] @@ -70,7 +70,7 @@ impl WebRTCRTPSender { connect_raw( self.as_ptr() as *mut _, b"notify::priority\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_priority_trampoline:: as *const (), )), Box_::into_raw(f), @@ -100,7 +100,7 @@ impl WebRTCRTPSender { connect_raw( self.as_ptr() as *mut _, b"notify::transport\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_transport_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs b/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs index c8d58c8ec..d7a371c40 100644 --- a/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs +++ b/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs @@ -16,7 +16,7 @@ use glib::signal::{connect_raw, SignalHandlerId}; use glib::{prelude::*, translate::*}; #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstWebRTCRTPTransceiver")] @@ -107,7 +107,7 @@ impl WebRTCRTPTransceiver { connect_raw( self.as_ptr() as *mut _, b"notify::codec-preferences\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_codec_preferences_trampoline:: as *const (), )), Box_::into_raw(f), @@ -137,7 +137,7 @@ impl WebRTCRTPTransceiver { connect_raw( self.as_ptr() as *mut _, b"notify::current-direction\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_current_direction_trampoline:: as *const (), )), Box_::into_raw(f), @@ -167,7 +167,7 @@ impl WebRTCRTPTransceiver { connect_raw( self.as_ptr() as *mut _, b"notify::direction\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_direction_trampoline:: as *const (), )), Box_::into_raw(f), @@ -197,7 +197,7 @@ impl WebRTCRTPTransceiver { connect_raw( self.as_ptr() as *mut _, b"notify::kind\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_kind_trampoline:: as *const (), )), Box_::into_raw(f), @@ -227,7 +227,7 @@ impl WebRTCRTPTransceiver { connect_raw( self.as_ptr() as *mut _, b"notify::mid\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_mid_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-webrtc/src/auto/web_rtcsctp_transport.rs b/gstreamer-webrtc/src/auto/web_rtcsctp_transport.rs index 97c38378e..854bbbd91 100644 --- a/gstreamer-webrtc/src/auto/web_rtcsctp_transport.rs +++ b/gstreamer-webrtc/src/auto/web_rtcsctp_transport.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstWebRTCSCTPTransport")] @@ -59,7 +59,7 @@ impl WebRTCSCTPTransport { connect_raw( self.as_ptr() as *mut _, b"notify::max-channels\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_channels_trampoline:: as *const (), )), Box_::into_raw(f), @@ -87,7 +87,7 @@ impl WebRTCSCTPTransport { connect_raw( self.as_ptr() as *mut _, b"notify::max-message-size\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_max_message_size_trampoline:: as *const (), )), Box_::into_raw(f), @@ -115,7 +115,7 @@ impl WebRTCSCTPTransport { connect_raw( self.as_ptr() as *mut _, b"notify::state\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_state_trampoline:: as *const (), )), Box_::into_raw(f), @@ -143,7 +143,7 @@ impl WebRTCSCTPTransport { connect_raw( self.as_ptr() as *mut _, b"notify::transport\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_transport_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer-webrtc/sys/src/auto/versions.txt b/gstreamer-webrtc/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer-webrtc/sys/src/auto/versions.txt +++ b/gstreamer-webrtc/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer-webrtc/sys/tests/abi.rs b/gstreamer-webrtc/sys/tests/abi.rs index fdfff636b..f59de8edf 100644 --- a/gstreamer-webrtc/sys/tests/abi.rs +++ b/gstreamer-webrtc/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gstreamer/src/auto/bin.rs b/gstreamer/src/auto/bin.rs index 120bc904e..59e6e069c 100644 --- a/gstreamer/src/auto/bin.rs +++ b/gstreamer/src/auto/bin.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstBin")] @@ -185,7 +185,7 @@ pub trait GstBinExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"deep-element-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( deep_element_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -219,7 +219,7 @@ pub trait GstBinExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"deep-element-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( deep_element_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -251,7 +251,7 @@ pub trait GstBinExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"element-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( element_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -283,7 +283,7 @@ pub trait GstBinExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"element-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( element_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -312,7 +312,7 @@ pub trait GstBinExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::async-handling\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_async_handling_trampoline:: as *const (), )), Box_::into_raw(f), @@ -341,7 +341,7 @@ pub trait GstBinExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::message-forward\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_message_forward_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/bus.rs b/gstreamer/src/auto/bus.rs index 09d8e20fe..fbabd9b2d 100644 --- a/gstreamer/src/auto/bus.rs +++ b/gstreamer/src/auto/bus.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstBus")] @@ -147,7 +147,7 @@ impl Bus { connect_raw( self.as_ptr() as *mut _, signal_name.as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( message_trampoline:: as *const (), )), Box_::into_raw(f), @@ -180,7 +180,7 @@ impl Bus { connect_raw( self.as_ptr() as *mut _, signal_name.as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( sync_message_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/child_proxy.rs b/gstreamer/src/auto/child_proxy.rs index 492a68e91..548204124 100644 --- a/gstreamer/src/auto/child_proxy.rs +++ b/gstreamer/src/auto/child_proxy.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstChildProxy")] @@ -142,7 +142,7 @@ pub trait ChildProxyExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"child-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( child_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -176,7 +176,7 @@ pub trait ChildProxyExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"child-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( child_removed_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/clock.rs b/gstreamer/src/auto/clock.rs index d8a2c2b9f..5ba09fb15 100644 --- a/gstreamer/src/auto/clock.rs +++ b/gstreamer/src/auto/clock.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstClock")] @@ -85,7 +85,7 @@ pub trait ClockExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gst_clock_add_observation")] fn add_observation(&self, slave: ClockTime, master: ClockTime) -> Option { unsafe { - let mut r_squared = mem::MaybeUninit::uninit(); + let mut r_squared = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_clock_add_observation( self.as_ref().to_glib_none().0, slave.into_glib(), @@ -107,11 +107,11 @@ pub trait ClockExt: IsA + sealed::Sealed + 'static { master: ClockTime, ) -> Option<(f64, ClockTime, ClockTime, ClockTime, ClockTime)> { unsafe { - let mut r_squared = mem::MaybeUninit::uninit(); - let mut internal = mem::MaybeUninit::uninit(); - let mut external = mem::MaybeUninit::uninit(); - let mut rate_num = mem::MaybeUninit::uninit(); - let mut rate_denom = mem::MaybeUninit::uninit(); + let mut r_squared = std::mem::MaybeUninit::uninit(); + let mut internal = std::mem::MaybeUninit::uninit(); + let mut external = std::mem::MaybeUninit::uninit(); + let mut rate_num = std::mem::MaybeUninit::uninit(); + let mut rate_denom = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_clock_add_observation_unapplied( self.as_ref().to_glib_none().0, slave.into_glib(), @@ -150,10 +150,10 @@ pub trait ClockExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_calibration")] fn calibration(&self) -> (ClockTime, ClockTime, ClockTime, ClockTime) { unsafe { - let mut internal = mem::MaybeUninit::uninit(); - let mut external = mem::MaybeUninit::uninit(); - let mut rate_num = mem::MaybeUninit::uninit(); - let mut rate_denom = mem::MaybeUninit::uninit(); + let mut internal = std::mem::MaybeUninit::uninit(); + let mut external = std::mem::MaybeUninit::uninit(); + let mut rate_num = std::mem::MaybeUninit::uninit(); + let mut rate_denom = std::mem::MaybeUninit::uninit(); ffi::gst_clock_get_calibration( self.as_ref().to_glib_none().0, internal.as_mut_ptr(), @@ -340,7 +340,7 @@ pub trait ClockExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"synced\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( synced_trampoline:: as *const (), )), Box_::into_raw(f), @@ -369,7 +369,7 @@ pub trait ClockExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::timeout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_timeout_trampoline:: as *const (), )), Box_::into_raw(f), @@ -398,7 +398,7 @@ pub trait ClockExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::window-size\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_window_size_trampoline:: as *const (), )), Box_::into_raw(f), @@ -427,7 +427,7 @@ pub trait ClockExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::window-threshold\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_window_threshold_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/control_source.rs b/gstreamer/src/auto/control_source.rs index c392c770e..2da8abd49 100644 --- a/gstreamer/src/auto/control_source.rs +++ b/gstreamer/src/auto/control_source.rs @@ -5,7 +5,6 @@ use crate::{ClockTime, Object}; use glib::{prelude::*, translate::*}; -use std::mem; glib::wrapper! { #[doc(alias = "GstControlSource")] @@ -33,7 +32,7 @@ pub trait ControlSourceExt: IsA + sealed::Sealed + 'static { #[doc(alias = "control_source_get_value")] fn value(&self, timestamp: ClockTime) -> Option { unsafe { - let mut value = mem::MaybeUninit::uninit(); + let mut value = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_control_source_get_value( self.as_ref().to_glib_none().0, timestamp.into_glib(), diff --git a/gstreamer/src/auto/device.rs b/gstreamer/src/auto/device.rs index 18a6d74e1..794e50aa1 100644 --- a/gstreamer/src/auto/device.rs +++ b/gstreamer/src/auto/device.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstDevice")] @@ -133,7 +133,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( removed_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/device_monitor.rs b/gstreamer/src/auto/device_monitor.rs index c92d91e74..0563e97a6 100644 --- a/gstreamer/src/auto/device_monitor.rs +++ b/gstreamer/src/auto/device_monitor.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstDeviceMonitor")] @@ -133,7 +133,7 @@ pub trait DeviceMonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::show-all\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_show_all_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/device_provider.rs b/gstreamer/src/auto/device_provider.rs index 193a67375..0dd5a0033 100644 --- a/gstreamer/src/auto/device_provider.rs +++ b/gstreamer/src/auto/device_provider.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstDeviceProvider")] @@ -177,7 +177,7 @@ pub trait DeviceProviderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"provider-hidden\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( provider_hidden_trampoline:: as *const (), )), Box_::into_raw(f), @@ -209,7 +209,7 @@ pub trait DeviceProviderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"provider-unhidden\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( provider_unhidden_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/element.rs b/gstreamer/src/auto/element.rs index 18f9c89cd..3047e6ff3 100644 --- a/gstreamer/src/auto/element.rs +++ b/gstreamer/src/auto/element.rs @@ -13,7 +13,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstElement")] @@ -35,7 +35,7 @@ impl Element { ) -> Result { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gst_element_make_from_uri( type_.into_glib(), uri.to_glib_none().0, @@ -286,8 +286,8 @@ pub trait ElementExt: IsA + sealed::Sealed + 'static { timeout: impl Into>, ) -> (Result, State, State) { unsafe { - let mut state = mem::MaybeUninit::uninit(); - let mut pending = mem::MaybeUninit::uninit(); + let mut state = std::mem::MaybeUninit::uninit(); + let mut pending = std::mem::MaybeUninit::uninit(); let ret = try_from_glib(ffi::gst_element_get_state( self.as_ref().to_glib_none().0, state.as_mut_ptr(), @@ -511,7 +511,7 @@ pub trait ElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"no-more-pads\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( no_more_pads_trampoline:: as *const (), )), Box_::into_raw(f), @@ -543,7 +543,7 @@ pub trait ElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"pad-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pad_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -575,7 +575,7 @@ pub trait ElementExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"pad-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pad_removed_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/enums.rs b/gstreamer/src/auto/enums.rs index ecf44a1ea..257db32f8 100644 --- a/gstreamer/src/auto/enums.rs +++ b/gstreamer/src/auto/enums.rs @@ -5,7 +5,6 @@ use crate::EventTypeFlags; use glib::{prelude::*, translate::*, GStr}; -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -57,6 +56,7 @@ impl FromGlib for BufferingMode { impl StaticType for BufferingMode { #[inline] + #[doc(alias = "gst_buffering_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_buffering_mode_get_type()) } } @@ -68,7 +68,7 @@ impl glib::HasParamSpec for BufferingMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -145,6 +145,7 @@ impl FromGlib for BusSyncReply { impl StaticType for BusSyncReply { #[inline] + #[doc(alias = "gst_bus_sync_reply_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_bus_sync_reply_get_type()) } } @@ -156,7 +157,7 @@ impl glib::HasParamSpec for BusSyncReply { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -240,6 +241,7 @@ impl FromGlib for CapsIntersectMode { impl StaticType for CapsIntersectMode { #[inline] + #[doc(alias = "gst_caps_intersect_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_caps_intersect_mode_get_type()) } } @@ -251,7 +253,7 @@ impl glib::HasParamSpec for CapsIntersectMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -335,6 +337,7 @@ impl FromGlib for ClockEntryType { impl StaticType for ClockEntryType { #[inline] + #[doc(alias = "gst_clock_entry_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_clock_entry_type_get_type()) } } @@ -346,7 +349,7 @@ impl glib::HasParamSpec for ClockEntryType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -444,6 +447,7 @@ impl FromGlib for ClockReturn { impl StaticType for ClockReturn { #[inline] + #[doc(alias = "gst_clock_return_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_clock_return_get_type()) } } @@ -455,7 +459,7 @@ impl glib::HasParamSpec for ClockReturn { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -551,6 +555,7 @@ impl FromGlib for ClockType { impl StaticType for ClockType { #[inline] + #[doc(alias = "gst_clock_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_clock_type_get_type()) } } @@ -562,7 +567,7 @@ impl glib::HasParamSpec for ClockType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -716,6 +721,7 @@ impl glib::error::ErrorDomain for CoreError { impl StaticType for CoreError { #[inline] + #[doc(alias = "gst_core_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_core_error_get_type()) } } @@ -727,7 +733,7 @@ impl glib::HasParamSpec for CoreError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -807,9 +813,9 @@ impl DebugLevel { } } -impl fmt::Display for DebugLevel { +impl std::fmt::Display for DebugLevel { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -858,6 +864,7 @@ impl FromGlib for DebugLevel { impl StaticType for DebugLevel { #[inline] + #[doc(alias = "gst_debug_level_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_debug_level_get_type()) } } @@ -869,7 +876,7 @@ impl glib::HasParamSpec for DebugLevel { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1012,9 +1019,9 @@ impl EventType { } } -impl fmt::Display for EventType { +impl std::fmt::Display for EventType { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -1111,6 +1118,7 @@ impl FromGlib for EventType { impl StaticType for EventType { #[inline] + #[doc(alias = "gst_event_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_event_type_get_type()) } } @@ -1122,7 +1130,7 @@ impl glib::HasParamSpec for EventType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1256,6 +1264,7 @@ impl FromGlib for Format { impl StaticType for Format { #[inline] + #[doc(alias = "gst_format_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_format_get_type()) } } @@ -1267,7 +1276,7 @@ impl glib::HasParamSpec for Format { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1391,6 +1400,7 @@ impl glib::error::ErrorDomain for LibraryError { impl StaticType for LibraryError { #[inline] + #[doc(alias = "gst_library_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_library_error_get_type()) } } @@ -1402,7 +1412,7 @@ impl glib::HasParamSpec for LibraryError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1480,6 +1490,7 @@ impl FromGlib for PadDirection { impl StaticType for PadDirection { #[inline] + #[doc(alias = "gst_pad_direction_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_pad_direction_get_type()) } } @@ -1491,7 +1502,7 @@ impl glib::HasParamSpec for PadDirection { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1557,9 +1568,9 @@ impl PadMode { } } -impl fmt::Display for PadMode { +impl std::fmt::Display for PadMode { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -1592,6 +1603,7 @@ impl FromGlib for PadMode { impl StaticType for PadMode { #[inline] + #[doc(alias = "gst_pad_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_pad_mode_get_type()) } } @@ -1603,7 +1615,7 @@ impl glib::HasParamSpec for PadMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1686,6 +1698,7 @@ impl FromGlib for PadPresence { impl StaticType for PadPresence { #[inline] + #[doc(alias = "gst_pad_presence_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_pad_presence_get_type()) } } @@ -1697,7 +1710,7 @@ impl glib::HasParamSpec for PadPresence { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1785,6 +1798,7 @@ impl FromGlib for PadProbeReturn { impl StaticType for PadProbeReturn { #[inline] + #[doc(alias = "gst_pad_probe_return_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_pad_probe_return_get_type()) } } @@ -1796,7 +1810,7 @@ impl glib::HasParamSpec for PadProbeReturn { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1927,6 +1941,7 @@ impl glib::error::ErrorDomain for ParseError { impl StaticType for ParseError { #[inline] + #[doc(alias = "gst_parse_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_parse_error_get_type()) } } @@ -1938,7 +1953,7 @@ impl glib::HasParamSpec for ParseError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2049,6 +2064,7 @@ impl glib::error::ErrorDomain for PluginError { impl StaticType for PluginError { #[inline] + #[doc(alias = "gst_plugin_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_plugin_error_get_type()) } } @@ -2060,7 +2076,7 @@ impl glib::HasParamSpec for PluginError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2156,6 +2172,7 @@ impl FromGlib for ProgressType { impl StaticType for ProgressType { #[inline] + #[doc(alias = "gst_progress_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_progress_type_get_type()) } } @@ -2167,7 +2184,7 @@ impl glib::HasParamSpec for ProgressType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2259,6 +2276,7 @@ impl FromGlib for PromiseResult { impl StaticType for PromiseResult { #[inline] + #[doc(alias = "gst_promise_result_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_promise_result_get_type()) } } @@ -2270,7 +2288,7 @@ impl glib::HasParamSpec for PromiseResult { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2358,6 +2376,7 @@ impl FromGlib for QOSType { impl StaticType for QOSType { #[inline] + #[doc(alias = "gst_qos_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_qos_type_get_type()) } } @@ -2369,7 +2388,7 @@ impl glib::HasParamSpec for QOSType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2462,6 +2481,7 @@ impl FromGlib for Rank { impl StaticType for Rank { #[inline] + #[doc(alias = "gst_rank_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_rank_get_type()) } } @@ -2473,7 +2493,7 @@ impl glib::HasParamSpec for Rank { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2631,6 +2651,7 @@ impl glib::error::ErrorDomain for ResourceError { impl StaticType for ResourceError { #[inline] + #[doc(alias = "gst_resource_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_resource_error_get_type()) } } @@ -2642,7 +2663,7 @@ impl glib::HasParamSpec for ResourceError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2724,6 +2745,7 @@ impl FromGlib for SeekType { impl StaticType for SeekType { #[inline] + #[doc(alias = "gst_seek_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_seek_type_get_type()) } } @@ -2735,7 +2757,7 @@ impl glib::HasParamSpec for SeekType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2824,6 +2846,7 @@ impl FromGlib for State { impl StaticType for State { #[inline] + #[doc(alias = "gst_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_state_get_type()) } } @@ -2835,7 +2858,7 @@ impl glib::HasParamSpec for State { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2915,9 +2938,9 @@ impl StateChange { } } -impl fmt::Display for StateChange { +impl std::fmt::Display for StateChange { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -2957,6 +2980,7 @@ impl FromGlib for StateChange { impl StaticType for StateChange { #[inline] + #[doc(alias = "gst_state_change_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_state_change_get_type()) } } @@ -2968,7 +2992,7 @@ impl glib::HasParamSpec for StateChange { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3054,6 +3078,7 @@ impl FromGlib for StateChangeReturn { impl StaticType for StateChangeReturn { #[inline] + #[doc(alias = "gst_state_change_return_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_state_change_return_get_type()) } } @@ -3065,7 +3090,7 @@ impl glib::HasParamSpec for StateChangeReturn { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3215,6 +3240,7 @@ impl glib::error::ErrorDomain for StreamError { impl StaticType for StreamError { #[inline] + #[doc(alias = "gst_stream_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_stream_error_get_type()) } } @@ -3226,7 +3252,7 @@ impl glib::HasParamSpec for StreamError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3330,6 +3356,7 @@ impl FromGlib for StreamStatusType { impl StaticType for StreamStatusType { #[inline] + #[doc(alias = "gst_stream_status_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_stream_status_type_get_type()) } } @@ -3341,7 +3368,7 @@ impl glib::HasParamSpec for StreamStatusType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3425,6 +3452,7 @@ impl FromGlib for StructureChangeType { impl StaticType for StructureChangeType { #[inline] + #[doc(alias = "gst_structure_change_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_structure_change_type_get_type()) } } @@ -3436,7 +3464,7 @@ impl glib::HasParamSpec for StructureChangeType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3528,6 +3556,7 @@ impl FromGlib for TagFlag { impl StaticType for TagFlag { #[inline] + #[doc(alias = "gst_tag_flag_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_tag_flag_get_type()) } } @@ -3539,7 +3568,7 @@ impl glib::HasParamSpec for TagFlag { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3643,6 +3672,7 @@ impl FromGlib for TagMergeMode { impl StaticType for TagMergeMode { #[inline] + #[doc(alias = "gst_tag_merge_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_tag_merge_mode_get_type()) } } @@ -3654,7 +3684,7 @@ impl glib::HasParamSpec for TagMergeMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3739,6 +3769,7 @@ impl FromGlib for TagScope { impl StaticType for TagScope { #[inline] + #[doc(alias = "gst_tag_scope_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_tag_scope_get_type()) } } @@ -3750,7 +3781,7 @@ impl glib::HasParamSpec for TagScope { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3838,6 +3869,7 @@ impl FromGlib for TaskState { impl StaticType for TaskState { #[inline] + #[doc(alias = "gst_task_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_task_state_get_type()) } } @@ -3849,7 +3881,7 @@ impl glib::HasParamSpec for TaskState { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -3966,6 +3998,7 @@ impl FromGlib for TocEntryType { impl StaticType for TocEntryType { #[inline] + #[doc(alias = "gst_toc_entry_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_toc_entry_type_get_type()) } } @@ -3977,7 +4010,7 @@ impl glib::HasParamSpec for TocEntryType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -4070,6 +4103,7 @@ impl FromGlib for TocLoopType { impl StaticType for TocLoopType { #[inline] + #[doc(alias = "gst_toc_loop_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_toc_loop_type_get_type()) } } @@ -4081,7 +4115,7 @@ impl glib::HasParamSpec for TocLoopType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -4166,6 +4200,7 @@ impl FromGlib for TocScope { impl StaticType for TocScope { #[inline] + #[doc(alias = "gst_toc_scope_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_toc_scope_get_type()) } } @@ -4177,7 +4212,7 @@ impl glib::HasParamSpec for TocScope { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -4277,6 +4312,7 @@ impl FromGlib for TypeFindProbability { impl StaticType for TypeFindProbability { #[inline] + #[doc(alias = "gst_type_find_probability_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_type_find_probability_get_type()) } } @@ -4288,7 +4324,7 @@ impl glib::HasParamSpec for TypeFindProbability { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -4403,6 +4439,7 @@ impl glib::error::ErrorDomain for URIError { impl StaticType for URIError { #[inline] + #[doc(alias = "gst_uri_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_uri_error_get_type()) } } @@ -4414,7 +4451,7 @@ impl glib::HasParamSpec for URIError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -4492,6 +4529,7 @@ impl FromGlib for URIType { impl StaticType for URIType { #[inline] + #[doc(alias = "gst_uri_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_uri_type_get_type()) } } @@ -4503,7 +4541,7 @@ impl glib::HasParamSpec for URIType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gstreamer/src/auto/flags.rs b/gstreamer/src/auto/flags.rs index c7bbbd04c..1ee089e48 100644 --- a/gstreamer/src/auto/flags.rs +++ b/gstreamer/src/auto/flags.rs @@ -4,7 +4,6 @@ // DO NOT EDIT use glib::{bitflags::bitflags, prelude::*, translate::*, GStr}; -use std::fmt; bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] @@ -38,6 +37,7 @@ impl FromGlib for BinFlags { impl StaticType for BinFlags { #[inline] + #[doc(alias = "gst_bin_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_bin_flags_get_type()) } } @@ -49,7 +49,7 @@ impl glib::HasParamSpec for BinFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -131,6 +131,7 @@ impl FromGlib for BufferCopyFlags { impl StaticType for BufferCopyFlags { #[inline] + #[doc(alias = "gst_buffer_copy_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_buffer_copy_flags_get_type()) } } @@ -142,7 +143,7 @@ impl glib::HasParamSpec for BufferCopyFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -238,6 +239,7 @@ impl FromGlib for BufferFlags { impl StaticType for BufferFlags { #[inline] + #[doc(alias = "gst_buffer_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_buffer_flags_get_type()) } } @@ -249,7 +251,7 @@ impl glib::HasParamSpec for BufferFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -325,6 +327,7 @@ impl FromGlib for BufferPoolAcquireFlags { impl StaticType for BufferPoolAcquireFlags { #[inline] + #[doc(alias = "gst_buffer_pool_acquire_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_buffer_pool_acquire_flags_get_type()) } } @@ -336,7 +339,7 @@ impl glib::HasParamSpec for BufferPoolAcquireFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -420,6 +423,7 @@ impl FromGlib for ClockFlags { impl StaticType for ClockFlags { #[inline] + #[doc(alias = "gst_clock_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_clock_flags_get_type()) } } @@ -431,7 +435,7 @@ impl glib::HasParamSpec for ClockFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -537,6 +541,7 @@ impl FromGlib for DebugColorFlags { impl StaticType for DebugColorFlags { #[inline] + #[doc(alias = "gst_debug_color_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_debug_color_flags_get_type()) } } @@ -548,7 +553,7 @@ impl glib::HasParamSpec for DebugColorFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -632,6 +637,7 @@ impl FromGlib for DebugGraphDetails { impl StaticType for DebugGraphDetails { #[inline] + #[doc(alias = "gst_debug_graph_details_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_debug_graph_details_get_type()) } } @@ -643,7 +649,7 @@ impl glib::HasParamSpec for DebugGraphDetails { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -725,6 +731,7 @@ impl FromGlib for ElementFlags { impl StaticType for ElementFlags { #[inline] + #[doc(alias = "gst_element_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_element_flags_get_type()) } } @@ -736,7 +743,7 @@ impl glib::HasParamSpec for ElementFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -816,6 +823,7 @@ impl FromGlib for EventTypeFlags { impl StaticType for EventTypeFlags { #[inline] + #[doc(alias = "gst_event_type_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_event_type_flags_get_type()) } } @@ -827,7 +835,7 @@ impl glib::HasParamSpec for EventTypeFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -907,6 +915,7 @@ impl FromGlib for GapFlags { #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl StaticType for GapFlags { #[inline] + #[doc(alias = "gst_gap_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_gap_flags_get_type()) } } @@ -920,7 +929,7 @@ impl glib::HasParamSpec for GapFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1010,6 +1019,7 @@ impl FromGlib for MemoryFlags { impl StaticType for MemoryFlags { #[inline] + #[doc(alias = "gst_memory_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_memory_flags_get_type()) } } @@ -1021,7 +1031,7 @@ impl glib::HasParamSpec for MemoryFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1097,6 +1107,7 @@ impl FromGlib for MetaFlags { impl StaticType for MetaFlags { #[inline] + #[doc(alias = "gst_meta_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_meta_flags_get_type()) } } @@ -1108,7 +1119,7 @@ impl glib::HasParamSpec for MetaFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1180,6 +1191,7 @@ impl FromGlib for ObjectFlags { impl StaticType for ObjectFlags { #[inline] + #[doc(alias = "gst_object_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_object_flags_get_type()) } } @@ -1191,7 +1203,7 @@ impl glib::HasParamSpec for ObjectFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1287,6 +1299,7 @@ impl FromGlib for PadFlags { impl StaticType for PadFlags { #[inline] + #[doc(alias = "gst_pad_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_pad_flags_get_type()) } } @@ -1298,7 +1311,7 @@ impl glib::HasParamSpec for PadFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1378,6 +1391,7 @@ impl FromGlib for PadLinkCheck { impl StaticType for PadLinkCheck { #[inline] + #[doc(alias = "gst_pad_link_check_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_pad_link_check_get_type()) } } @@ -1389,7 +1403,7 @@ impl glib::HasParamSpec for PadLinkCheck { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1501,6 +1515,7 @@ impl FromGlib for PadProbeType { impl StaticType for PadProbeType { #[inline] + #[doc(alias = "gst_pad_probe_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_pad_probe_type_get_type()) } } @@ -1512,7 +1527,7 @@ impl glib::HasParamSpec for PadProbeType { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1588,6 +1603,7 @@ impl FromGlib for ParseFlags { impl StaticType for ParseFlags { #[inline] + #[doc(alias = "gst_parse_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_parse_flags_get_type()) } } @@ -1599,7 +1615,7 @@ impl glib::HasParamSpec for ParseFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1671,6 +1687,7 @@ impl FromGlib for PipelineFlags { impl StaticType for PipelineFlags { #[inline] + #[doc(alias = "gst_pipeline_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_pipeline_flags_get_type()) } } @@ -1682,7 +1699,7 @@ impl glib::HasParamSpec for PipelineFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1762,6 +1779,7 @@ impl FromGlib for PluginAPIFlags { #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] impl StaticType for PluginAPIFlags { #[inline] + #[doc(alias = "gst_plugin_api_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_plugin_api_flags_get_type()) } } @@ -1775,7 +1793,7 @@ impl glib::HasParamSpec for PluginAPIFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1863,6 +1881,7 @@ impl FromGlib for PluginDependencyFlags { impl StaticType for PluginDependencyFlags { #[inline] + #[doc(alias = "gst_plugin_dependency_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_plugin_dependency_flags_get_type()) } } @@ -1874,7 +1893,7 @@ impl glib::HasParamSpec for PluginDependencyFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1948,6 +1967,7 @@ impl FromGlib for PluginFlags { impl StaticType for PluginFlags { #[inline] + #[doc(alias = "gst_plugin_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_plugin_flags_get_type()) } } @@ -1959,7 +1979,7 @@ impl glib::HasParamSpec for PluginFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2035,6 +2055,7 @@ impl FromGlib for SchedulingFlags { impl StaticType for SchedulingFlags { #[inline] + #[doc(alias = "gst_scheduling_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_scheduling_flags_get_type()) } } @@ -2046,7 +2067,7 @@ impl glib::HasParamSpec for SchedulingFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2146,6 +2167,7 @@ impl FromGlib for SeekFlags { impl StaticType for SeekFlags { #[inline] + #[doc(alias = "gst_seek_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_seek_flags_get_type()) } } @@ -2157,7 +2179,7 @@ impl glib::HasParamSpec for SeekFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2243,6 +2265,7 @@ impl FromGlib for SegmentFlags { impl StaticType for SegmentFlags { #[inline] + #[doc(alias = "gst_segment_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_segment_flags_get_type()) } } @@ -2254,7 +2277,7 @@ impl glib::HasParamSpec for SegmentFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2336,6 +2359,7 @@ impl FromGlib for SerializeFlags { #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))] impl StaticType for SerializeFlags { #[inline] + #[doc(alias = "gst_serialize_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_serialize_flags_get_type()) } } @@ -2349,7 +2373,7 @@ impl glib::HasParamSpec for SerializeFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2429,6 +2453,7 @@ impl FromGlib for StackTraceFlags { impl StaticType for StackTraceFlags { #[inline] + #[doc(alias = "gst_stack_trace_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_stack_trace_flags_get_type()) } } @@ -2440,7 +2465,7 @@ impl glib::HasParamSpec for StackTraceFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2516,6 +2541,7 @@ impl FromGlib for StreamFlags { impl StaticType for StreamFlags { #[inline] + #[doc(alias = "gst_stream_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_stream_flags_get_type()) } } @@ -2527,7 +2553,7 @@ impl glib::HasParamSpec for StreamFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -2598,9 +2624,9 @@ impl StreamType { } } -impl fmt::Display for StreamType { +impl std::fmt::Display for StreamType { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.name()) } } @@ -2626,6 +2652,7 @@ impl FromGlib for StreamType { impl StaticType for StreamType { #[inline] + #[doc(alias = "gst_stream_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gst_stream_type_get_type()) } } @@ -2637,7 +2664,7 @@ impl glib::HasParamSpec for StreamType { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/gstreamer/src/auto/functions.rs b/gstreamer/src/auto/functions.rs index 7bdc2a83f..fc9f6e533 100644 --- a/gstreamer/src/auto/functions.rs +++ b/gstreamer/src/auto/functions.rs @@ -5,7 +5,6 @@ use crate::{Bin, ClockTime, DebugGraphDetails, DebugLevel, Element, StackTraceFlags}; use glib::{prelude::*, translate::*}; -use std::{mem, ptr}; #[doc(alias = "gst_debug_add_ring_buffer_logger")] pub fn debug_add_ring_buffer_logger(max_size_per_thread: u32, thread_timeout: u32) { @@ -172,7 +171,7 @@ pub fn parse_bin_from_description( ) -> Result { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gst_parse_bin_from_description( bin_description.to_glib_none().0, ghost_unlinked_pads.into_glib(), @@ -190,7 +189,7 @@ pub fn parse_bin_from_description( pub fn parse_launch(pipeline_description: &str) -> Result { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gst_parse_launch(pipeline_description.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_none(ret)) @@ -204,7 +203,7 @@ pub fn parse_launch(pipeline_description: &str) -> Result pub fn parse_launchv(argv: &[&str]) -> Result { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gst_parse_launchv(argv.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_none(ret)) @@ -232,10 +231,10 @@ pub fn util_get_timestamp() -> ClockTime { pub fn version() -> (u32, u32, u32, u32) { skip_assert_initialized!(); unsafe { - let mut major = mem::MaybeUninit::uninit(); - let mut minor = mem::MaybeUninit::uninit(); - let mut micro = mem::MaybeUninit::uninit(); - let mut nano = mem::MaybeUninit::uninit(); + let mut major = std::mem::MaybeUninit::uninit(); + let mut minor = std::mem::MaybeUninit::uninit(); + let mut micro = std::mem::MaybeUninit::uninit(); + let mut nano = std::mem::MaybeUninit::uninit(); ffi::gst_version( major.as_mut_ptr(), minor.as_mut_ptr(), diff --git a/gstreamer/src/auto/mod.rs b/gstreamer/src/auto/mod.rs index 4fac647c6..e8eb15c62 100644 --- a/gstreamer/src/auto/mod.rs +++ b/gstreamer/src/auto/mod.rs @@ -191,10 +191,9 @@ pub use self::flags::StreamType; mod alias; pub use self::alias::ClockTimeDiff; -pub mod functions; +pub(crate) mod functions; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::allocator::AllocatorExt; pub use super::bin::GstBinExt; pub use super::buffer_pool::BufferPoolExt; diff --git a/gstreamer/src/auto/object.rs b/gstreamer/src/auto/object.rs index b30ff9ebe..4d4189044 100644 --- a/gstreamer/src/auto/object.rs +++ b/gstreamer/src/auto/object.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstObject")] @@ -45,9 +45,9 @@ impl Object { //} } -impl fmt::Display for Object { +impl std::fmt::Display for Object { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&GstObjectExt::name(self)) } } @@ -296,7 +296,7 @@ pub trait GstObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::parent\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_parent_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/pad.rs b/gstreamer/src/auto/pad.rs index 4daf86e54..2842f330d 100644 --- a/gstreamer/src/auto/pad.rs +++ b/gstreamer/src/auto/pad.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstPad")] @@ -520,7 +520,7 @@ pub trait PadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"linked\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( linked_trampoline:: as *const (), )), Box_::into_raw(f), @@ -552,7 +552,7 @@ pub trait PadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"unlinked\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( unlinked_trampoline:: as *const (), )), Box_::into_raw(f), @@ -578,7 +578,7 @@ pub trait PadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::caps\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_caps_trampoline:: as *const (), )), Box_::into_raw(f), @@ -604,7 +604,7 @@ pub trait PadExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::offset\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_offset_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/pad_template.rs b/gstreamer/src/auto/pad_template.rs index 4a7930216..cff9ceb8c 100644 --- a/gstreamer/src/auto/pad_template.rs +++ b/gstreamer/src/auto/pad_template.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstPadTemplate")] @@ -89,7 +89,7 @@ impl PadTemplate { connect_raw( self.as_ptr() as *mut _, b"pad-created\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pad_created_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/pipeline.rs b/gstreamer/src/auto/pipeline.rs index 014d90abb..c0e00833b 100644 --- a/gstreamer/src/auto/pipeline.rs +++ b/gstreamer/src/auto/pipeline.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstPipeline")] @@ -137,7 +137,7 @@ pub trait PipelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::auto-flush-bus\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_auto_flush_bus_trampoline:: as *const (), )), Box_::into_raw(f), @@ -163,7 +163,7 @@ pub trait PipelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::delay\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_delay_trampoline:: as *const (), )), Box_::into_raw(f), @@ -192,7 +192,7 @@ pub trait PipelineExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::latency\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_latency_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/plugin.rs b/gstreamer/src/auto/plugin.rs index 728974400..3c5058b8f 100644 --- a/gstreamer/src/auto/plugin.rs +++ b/gstreamer/src/auto/plugin.rs @@ -5,7 +5,6 @@ use crate::{Object, PluginDependencyFlags, Structure}; use glib::translate::*; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GstPlugin")] @@ -146,7 +145,7 @@ impl Plugin { pub fn load_file(filename: impl AsRef) -> Result { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gst_plugin_load_file(filename.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -157,9 +156,9 @@ impl Plugin { } } -impl fmt::Display for Plugin { +impl std::fmt::Display for Plugin { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.plugin_name()) } } diff --git a/gstreamer/src/auto/preset.rs b/gstreamer/src/auto/preset.rs index 2f619180c..055195d2d 100644 --- a/gstreamer/src/auto/preset.rs +++ b/gstreamer/src/auto/preset.rs @@ -4,7 +4,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::ptr; glib::wrapper! { #[doc(alias = "GstPreset")] @@ -63,7 +62,7 @@ pub trait PresetExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_meta")] fn meta(&self, name: &str, tag: &str) -> Option { unsafe { - let mut value = ptr::null_mut(); + let mut value = std::ptr::null_mut(); let ret = from_glib(ffi::gst_preset_get_meta( self.as_ref().to_glib_none().0, name.to_glib_none().0, diff --git a/gstreamer/src/auto/registry.rs b/gstreamer/src/auto/registry.rs index 9466bc98c..f6275c871 100644 --- a/gstreamer/src/auto/registry.rs +++ b/gstreamer/src/auto/registry.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstRegistry")] @@ -166,7 +166,7 @@ impl Registry { connect_raw( self.as_ptr() as *mut _, b"feature-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( feature_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -194,7 +194,7 @@ impl Registry { connect_raw( self.as_ptr() as *mut _, b"plugin-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( plugin_added_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/stream.rs b/gstreamer/src/auto/stream.rs index 1b112c0a0..d8e301056 100644 --- a/gstreamer/src/auto/stream.rs +++ b/gstreamer/src/auto/stream.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstStream")] @@ -115,7 +115,7 @@ impl Stream { connect_raw( self.as_ptr() as *mut _, b"notify::caps\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_caps_trampoline:: as *const (), )), Box_::into_raw(f), @@ -143,7 +143,7 @@ impl Stream { connect_raw( self.as_ptr() as *mut _, b"notify::stream-flags\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_stream_flags_trampoline:: as *const (), )), Box_::into_raw(f), @@ -171,7 +171,7 @@ impl Stream { connect_raw( self.as_ptr() as *mut _, b"notify::stream-type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_stream_type_trampoline:: as *const (), )), Box_::into_raw(f), @@ -197,7 +197,7 @@ impl Stream { connect_raw( self.as_ptr() as *mut _, b"notify::tags\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_tags_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/system_clock.rs b/gstreamer/src/auto/system_clock.rs index a2b3944e4..9410a24e9 100644 --- a/gstreamer/src/auto/system_clock.rs +++ b/gstreamer/src/auto/system_clock.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstSystemClock")] @@ -78,7 +78,7 @@ pub trait SystemClockExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::clock-type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_clock_type_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/task_pool.rs b/gstreamer/src/auto/task_pool.rs index a00f7ce52..189c64d1a 100644 --- a/gstreamer/src/auto/task_pool.rs +++ b/gstreamer/src/auto/task_pool.rs @@ -5,7 +5,6 @@ use crate::Object; use glib::{prelude::*, translate::*}; -use std::ptr; glib::wrapper! { #[doc(alias = "GstTaskPool")] @@ -51,7 +50,7 @@ pub trait TaskPoolExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gst_task_pool_prepare")] fn prepare(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::gst_task_pool_prepare(self.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(()) diff --git a/gstreamer/src/auto/tracer.rs b/gstreamer/src/auto/tracer.rs index 4a8b07772..2aabef6ec 100644 --- a/gstreamer/src/auto/tracer.rs +++ b/gstreamer/src/auto/tracer.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GstTracer")] @@ -59,7 +59,7 @@ pub trait TracerExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::params\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_params_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gstreamer/src/auto/uri_handler.rs b/gstreamer/src/auto/uri_handler.rs index a05438c3f..c2b95cead 100644 --- a/gstreamer/src/auto/uri_handler.rs +++ b/gstreamer/src/auto/uri_handler.rs @@ -5,7 +5,6 @@ use crate::URIType; use glib::{prelude::*, translate::*}; -use std::ptr; glib::wrapper! { #[doc(alias = "GstURIHandler")] @@ -58,7 +57,7 @@ pub trait URIHandlerExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gst_uri_handler_set_uri")] fn set_uri(&self, uri: &str) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gst_uri_handler_set_uri( self.as_ref().to_glib_none().0, uri.to_glib_none().0, diff --git a/gstreamer/src/auto/versions.txt b/gstreamer/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer/src/auto/versions.txt +++ b/gstreamer/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer/sys/src/auto/versions.txt b/gstreamer/sys/src/auto/versions.txt index e0bef32aa..60ac89dac 100644 --- a/gstreamer/sys/src/auto/versions.txt +++ b/gstreamer/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb) from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e) diff --git a/gstreamer/sys/tests/abi.rs b/gstreamer/sys/tests/abi.rs index d0a7f2aeb..bbf974fc8 100644 --- a/gstreamer/sys/tests/abi.rs +++ b/gstreamer/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[