From 24305a19e85ac2ebdbb8282d6972708de53b054f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 19 Mar 2019 09:40:05 +0200 Subject: [PATCH] Regenerate everything with latest gir --- gstreamer-app/src/auto/app_sink.rs | 71 +- gstreamer-app/src/auto/app_src.rs | 101 +- gstreamer-app/src/auto/enums.rs | 24 +- gstreamer-app/src/auto/versions.txt | 2 +- .../src/auto/audio_stream_align.rs | 30 +- gstreamer-audio/src/auto/enums.rs | 190 +-- gstreamer-audio/src/auto/flags.rs | 46 +- gstreamer-audio/src/auto/stream_volume.rs | 22 +- gstreamer-audio/src/auto/versions.txt | 2 +- gstreamer-base/src/auto/adapter.rs | 56 +- gstreamer-base/src/auto/aggregator.rs | 28 +- gstreamer-base/src/auto/aggregator_pad.rs | 16 +- gstreamer-base/src/auto/base_sink.rs | 98 +- gstreamer-base/src/auto/base_src.rs | 58 +- gstreamer-base/src/auto/base_transform.rs | 44 +- gstreamer-base/src/auto/functions.rs | 22 +- gstreamer-base/src/auto/push_src.rs | 6 +- gstreamer-base/src/auto/versions.txt | 2 +- gstreamer-check/src/auto/test_clock.rs | 48 +- gstreamer-check/src/auto/versions.txt | 2 +- gstreamer-editing-services/src/auto/asset.rs | 79 +- .../src/auto/base_effect.rs | 6 +- gstreamer-editing-services/src/auto/clip.rs | 48 +- .../src/auto/container.rs | 30 +- gstreamer-editing-services/src/auto/effect.rs | 12 +- gstreamer-editing-services/src/auto/enums.rs | 48 +- .../src/auto/extractable.rs | 12 +- gstreamer-editing-services/src/auto/flags.rs | 32 +- gstreamer-editing-services/src/auto/group.rs | 42 +- gstreamer-editing-services/src/auto/layer.rs | 44 +- .../src/auto/pipeline.rs | 80 +- .../src/auto/project.rs | 64 +- .../src/auto/timeline.rs | 89 +- .../src/auto/timeline_element.rs | 115 +- gstreamer-editing-services/src/auto/track.rs | 54 +- .../src/auto/track_element.rs | 48 +- .../src/auto/uri_clip.rs | 32 +- .../src/auto/uri_clip_asset.rs | 28 +- .../src/auto/uri_source_asset.rs | 12 +- .../src/auto/versions.txt | 2 +- gstreamer-gl/src/auto/enums.rs | 202 +-- gstreamer-gl/src/auto/flags.rs | 34 +- gstreamer-gl/src/auto/gl_base_filter.rs | 14 +- gstreamer-gl/src/auto/gl_color_convert.rs | 12 +- gstreamer-gl/src/auto/gl_context.rs | 59 +- gstreamer-gl/src/auto/gl_display.rs | 28 +- gstreamer-gl/src/auto/gl_display_egl.rs | 12 +- gstreamer-gl/src/auto/gl_display_wayland.rs | 13 +- gstreamer-gl/src/auto/gl_display_x11.rs | 13 +- gstreamer-gl/src/auto/gl_framebuffer.rs | 24 +- .../src/auto/gl_overlay_compositor.rs | 14 +- gstreamer-gl/src/auto/gl_shader.rs | 82 +- gstreamer-gl/src/auto/gl_upload.rs | 18 +- gstreamer-gl/src/auto/gl_view_convert.rs | 52 +- gstreamer-gl/src/auto/gl_window.rs | 40 +- gstreamer-gl/src/auto/glsl_stage.rs | 28 +- gstreamer-gl/src/auto/versions.txt | 2 +- gstreamer-net/src/auto/net_client_clock.rs | 59 +- gstreamer-net/src/auto/net_time_provider.rs | 28 +- gstreamer-net/src/auto/ntp_clock.rs | 6 +- gstreamer-net/src/auto/ptp_clock.rs | 24 +- gstreamer-net/src/auto/versions.txt | 2 +- gstreamer-pbutils/src/auto/discoverer.rs | 28 +- .../src/auto/discoverer_audio_info.rs | 20 +- .../src/auto/discoverer_container_info.rs | 8 +- gstreamer-pbutils/src/auto/discoverer_info.rs | 44 +- .../src/auto/discoverer_stream_info.rs | 22 +- .../src/auto/discoverer_subtitle_info.rs | 8 +- .../src/auto/discoverer_video_info.rs | 20 +- .../src/auto/encoding_audio_profile.rs | 6 +- .../src/auto/encoding_container_profile.rs | 10 +- .../src/auto/encoding_profile.rs | 42 +- gstreamer-pbutils/src/auto/encoding_target.rs | 29 +- .../src/auto/encoding_video_profile.rs | 10 +- gstreamer-pbutils/src/auto/enums.rs | 30 +- gstreamer-pbutils/src/auto/flags.rs | 18 +- gstreamer-pbutils/src/auto/functions.rs | 19 +- gstreamer-pbutils/src/auto/versions.txt | 2 +- gstreamer-player/src/auto/enums.rs | 84 +- gstreamer-player/src/auto/player.rs | 169 ++- .../src/auto/player_audio_info.rs | 16 +- .../player_gmain_context_signal_dispatcher.rs | 10 +- .../src/auto/player_media_info.rs | 38 +- .../src/auto/player_signal_dispatcher.rs | 6 +- .../src/auto/player_stream_info.rs | 16 +- .../src/auto/player_subtitle_info.rs | 8 +- .../src/auto/player_video_info.rs | 14 +- .../player_video_overlay_video_renderer.rs | 36 +- .../src/auto/player_video_renderer.rs | 6 +- .../src/auto/player_visualization.rs | 10 +- gstreamer-player/src/auto/versions.txt | 2 +- gstreamer-rtsp-server/src/auto/enums.rs | 108 +- gstreamer-rtsp-server/src/auto/flags.rs | 26 +- .../src/auto/rtsp_address.rs | 10 +- .../src/auto/rtsp_address_pool.rs | 18 +- gstreamer-rtsp-server/src/auto/rtsp_auth.rs | 54 +- gstreamer-rtsp-server/src/auto/rtsp_client.rs | 128 +- gstreamer-rtsp-server/src/auto/rtsp_media.rs | 191 ++- .../src/auto/rtsp_media_factory.rs | 133 +- .../src/auto/rtsp_media_factory_uri.rs | 24 +- .../src/auto/rtsp_mount_points.rs | 16 +- gstreamer-rtsp-server/src/auto/rtsp_server.rs | 103 +- .../src/auto/rtsp_session.rs | 54 +- .../src/auto/rtsp_session_media.rs | 30 +- .../src/auto/rtsp_session_pool.rs | 34 +- gstreamer-rtsp-server/src/auto/rtsp_stream.rs | 175 ++- .../src/auto/rtsp_stream_transport.rs | 45 +- .../src/auto/rtsp_thread_pool.rs | 20 +- gstreamer-rtsp-server/src/auto/versions.txt | 2 +- gstreamer-rtsp/src/auto/enums.rs | 490 ++++---- gstreamer-rtsp/src/auto/flags.rs | 74 +- gstreamer-rtsp/src/auto/rtsp_auth_param.rs | 10 +- gstreamer-rtsp/src/auto/rtsp_url.rs | 18 +- gstreamer-rtsp/src/auto/versions.txt | 2 +- gstreamer-sdp/src/auto/versions.txt | 2 +- gstreamer-video/src/auto/enums.rs | 414 +++---- gstreamer-video/src/auto/flags.rs | 90 +- gstreamer-video/src/auto/versions.txt | 2 +- gstreamer-video/src/auto/video_filter.rs | 6 +- gstreamer-video/src/auto/video_overlay.rs | 22 +- gstreamer-webrtc/src/auto/enums.rs | 274 ++--- gstreamer-webrtc/src/auto/versions.txt | 2 +- .../src/auto/web_rtc_session_description.rs | 10 +- .../src/auto/web_rtcdtls_transport.rs | 45 +- .../src/auto/web_rtcice_transport.rs | 32 +- .../src/auto/web_rtcrtp_receiver.rs | 12 +- .../src/auto/web_rtcrtp_sender.rs | 12 +- .../src/auto/web_rtcrtp_transceiver.rs | 14 +- gstreamer/src/auto/bin.rs | 71 +- gstreamer/src/auto/buffer_pool.rs | 16 +- gstreamer/src/auto/bus.rs | 42 +- gstreamer/src/auto/child_proxy.rs | 38 +- gstreamer/src/auto/clock.rs | 87 +- gstreamer/src/auto/date_time.rs | 62 +- gstreamer/src/auto/device.rs | 31 +- gstreamer/src/auto/device_monitor.rs | 30 +- gstreamer/src/auto/device_provider.rs | 39 +- gstreamer/src/auto/device_provider_factory.rs | 27 +- gstreamer/src/auto/element.rs | 175 ++- gstreamer/src/auto/element_factory.rs | 48 +- gstreamer/src/auto/enums.rs | 1086 ++++++++--------- gstreamer/src/auto/flags.rs | 228 ++-- gstreamer/src/auto/functions.rs | 52 +- gstreamer/src/auto/ghost_pad.rs | 25 +- gstreamer/src/auto/object.rs | 73 +- gstreamer/src/auto/pad.rs | 149 ++- gstreamer/src/auto/pad_template.rs | 28 +- gstreamer/src/auto/pipeline.rs | 42 +- gstreamer/src/auto/plugin.rs | 39 +- gstreamer/src/auto/plugin_feature.rs | 18 +- gstreamer/src/auto/preset.rs | 33 +- gstreamer/src/auto/proxy_pad.rs | 12 +- gstreamer/src/auto/registry.rs | 50 +- gstreamer/src/auto/stream.rs | 60 +- gstreamer/src/auto/stream_collection.rs | 25 +- gstreamer/src/auto/system_clock.rs | 23 +- gstreamer/src/auto/tag_setter.rs | 26 +- gstreamer/src/auto/toc_setter.rs | 17 +- gstreamer/src/auto/type_find_factory.rs | 16 +- gstreamer/src/auto/uri_handler.rs | 14 +- gstreamer/src/auto/versions.txt | 2 +- 161 files changed, 4265 insertions(+), 4363 deletions(-) diff --git a/gstreamer-app/src/auto/app_sink.rs b/gstreamer-app/src/auto/app_sink.rs index 1509631da..8d30cc93f 100644 --- a/gstreamer-app/src/auto/app_sink.rs +++ b/gstreamer-app/src/auto/app_sink.rs @@ -2,25 +2,25 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Value; use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_app_sys; use gst_base; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct AppSink(Object) @extends gst_base::BaseSink, gst::Element, gst::Object, @implements gst::URIHandler; + pub struct AppSink(Object) @extends gst_base::BaseSink, gst::Element, gst::Object, @implements gst::URIHandler; match fn { - get_type => || ffi::gst_app_sink_get_type(), + get_type => || gst_app_sys::gst_app_sink_get_type(), } } @@ -28,132 +28,131 @@ impl AppSink { #[cfg(any(feature = "v1_12", feature = "dox"))] pub fn get_buffer_list_support(&self) -> bool { unsafe { - from_glib(ffi::gst_app_sink_get_buffer_list_support(self.to_glib_none().0)) + from_glib(gst_app_sys::gst_app_sink_get_buffer_list_support(self.to_glib_none().0)) } } pub fn get_caps(&self) -> Option { unsafe { - from_glib_full(ffi::gst_app_sink_get_caps(self.to_glib_none().0)) + from_glib_full(gst_app_sys::gst_app_sink_get_caps(self.to_glib_none().0)) } } pub fn get_drop(&self) -> bool { unsafe { - from_glib(ffi::gst_app_sink_get_drop(self.to_glib_none().0)) + from_glib(gst_app_sys::gst_app_sink_get_drop(self.to_glib_none().0)) } } pub fn get_emit_signals(&self) -> bool { unsafe { - from_glib(ffi::gst_app_sink_get_emit_signals(self.to_glib_none().0)) + from_glib(gst_app_sys::gst_app_sink_get_emit_signals(self.to_glib_none().0)) } } pub fn get_max_buffers(&self) -> u32 { unsafe { - ffi::gst_app_sink_get_max_buffers(self.to_glib_none().0) + gst_app_sys::gst_app_sink_get_max_buffers(self.to_glib_none().0) } } pub fn get_wait_on_eos(&self) -> bool { unsafe { - from_glib(ffi::gst_app_sink_get_wait_on_eos(self.to_glib_none().0)) + from_glib(gst_app_sys::gst_app_sink_get_wait_on_eos(self.to_glib_none().0)) } } pub fn is_eos(&self) -> bool { unsafe { - from_glib(ffi::gst_app_sink_is_eos(self.to_glib_none().0)) + from_glib(gst_app_sys::gst_app_sink_is_eos(self.to_glib_none().0)) } } pub fn pull_preroll(&self) -> Option { unsafe { - from_glib_full(ffi::gst_app_sink_pull_preroll(self.to_glib_none().0)) + from_glib_full(gst_app_sys::gst_app_sink_pull_preroll(self.to_glib_none().0)) } } pub fn pull_sample(&self) -> Option { unsafe { - from_glib_full(ffi::gst_app_sink_pull_sample(self.to_glib_none().0)) + from_glib_full(gst_app_sys::gst_app_sink_pull_sample(self.to_glib_none().0)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] pub fn set_buffer_list_support(&self, enable_lists: bool) { unsafe { - ffi::gst_app_sink_set_buffer_list_support(self.to_glib_none().0, enable_lists.to_glib()); + gst_app_sys::gst_app_sink_set_buffer_list_support(self.to_glib_none().0, enable_lists.to_glib()); } } //pub fn set_callbacks(&self, callbacks: /*Ignored*/&mut AppSinkCallbacks, user_data: /*Unimplemented*/Option) { - // unsafe { TODO: call ffi::gst_app_sink_set_callbacks() } + // unsafe { TODO: call gst_app_sys:gst_app_sink_set_callbacks() } //} - pub fn set_caps<'a, P: Into>>(&self, caps: P) { - let caps = caps.into(); + pub fn set_caps(&self, caps: Option<&gst::Caps>) { unsafe { - ffi::gst_app_sink_set_caps(self.to_glib_none().0, caps.to_glib_none().0); + gst_app_sys::gst_app_sink_set_caps(self.to_glib_none().0, caps.to_glib_none().0); } } pub fn set_drop(&self, drop: bool) { unsafe { - ffi::gst_app_sink_set_drop(self.to_glib_none().0, drop.to_glib()); + gst_app_sys::gst_app_sink_set_drop(self.to_glib_none().0, drop.to_glib()); } } pub fn set_emit_signals(&self, emit: bool) { unsafe { - ffi::gst_app_sink_set_emit_signals(self.to_glib_none().0, emit.to_glib()); + gst_app_sys::gst_app_sink_set_emit_signals(self.to_glib_none().0, emit.to_glib()); } } pub fn set_max_buffers(&self, max: u32) { unsafe { - ffi::gst_app_sink_set_max_buffers(self.to_glib_none().0, max); + gst_app_sys::gst_app_sink_set_max_buffers(self.to_glib_none().0, max); } } pub fn set_wait_on_eos(&self, wait: bool) { unsafe { - ffi::gst_app_sink_set_wait_on_eos(self.to_glib_none().0, wait.to_glib()); + gst_app_sys::gst_app_sink_set_wait_on_eos(self.to_glib_none().0, wait.to_glib()); } } #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn try_pull_preroll(&self, timeout: gst::ClockTime) -> Option { unsafe { - from_glib_full(ffi::gst_app_sink_try_pull_preroll(self.to_glib_none().0, timeout.to_glib())) + from_glib_full(gst_app_sys::gst_app_sink_try_pull_preroll(self.to_glib_none().0, timeout.to_glib())) } } #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn try_pull_sample(&self, timeout: gst::ClockTime) -> Option { unsafe { - from_glib_full(ffi::gst_app_sink_try_pull_sample(self.to_glib_none().0, timeout.to_glib())) + from_glib_full(gst_app_sys::gst_app_sink_try_pull_sample(self.to_glib_none().0, timeout.to_glib())) } } pub fn get_property_buffer_list(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"buffer-list\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"buffer-list\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_buffer_list(&self, buffer_list: bool) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"buffer-list\0".as_ptr() as *const _, Value::from(&buffer_list).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"buffer-list\0".as_ptr() as *const _, Value::from(&buffer_list).to_glib_none().0); } } pub fn get_property_eos(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"eos\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"eos\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -226,42 +225,42 @@ impl AppSink { unsafe impl Send for AppSink {} unsafe impl Sync for AppSink {} -unsafe extern "C" fn eos_trampoline(this: *mut ffi::GstAppSink, f: glib_ffi::gpointer) { +unsafe extern "C" fn eos_trampoline(this: *mut gst_app_sys::GstAppSink, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_buffer_list_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_buffer_list_trampoline(this: *mut gst_app_sys::GstAppSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_caps_trampoline(this: *mut gst_app_sys::GstAppSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_drop_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_drop_trampoline(this: *mut gst_app_sys::GstAppSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_emit_signals_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_emit_signals_trampoline(this: *mut gst_app_sys::GstAppSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_eos_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_eos_trampoline(this: *mut gst_app_sys::GstAppSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_max_buffers_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_max_buffers_trampoline(this: *mut gst_app_sys::GstAppSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_wait_on_eos_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_wait_on_eos_trampoline(this: *mut gst_app_sys::GstAppSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer-app/src/auto/app_src.rs b/gstreamer-app/src/auto/app_src.rs index 6bdc94bc6..5518d7790 100644 --- a/gstreamer-app/src/auto/app_src.rs +++ b/gstreamer-app/src/auto/app_src.rs @@ -3,210 +3,209 @@ // DO NOT EDIT use AppStreamType; -use ffi; use glib::StaticType; use glib::Value; use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_app_sys; use gst_base; use libc; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct AppSrc(Object) @extends gst_base::BaseSrc, gst::Element, gst::Object, @implements gst::URIHandler; + pub struct AppSrc(Object) @extends gst_base::BaseSrc, gst::Element, gst::Object, @implements gst::URIHandler; match fn { - get_type => || ffi::gst_app_src_get_type(), + get_type => || gst_app_sys::gst_app_src_get_type(), } } impl AppSrc { pub fn get_caps(&self) -> Option { unsafe { - from_glib_full(ffi::gst_app_src_get_caps(self.to_glib_none().0)) + from_glib_full(gst_app_sys::gst_app_src_get_caps(self.to_glib_none().0)) } } pub fn get_current_level_bytes(&self) -> u64 { unsafe { - ffi::gst_app_src_get_current_level_bytes(self.to_glib_none().0) + gst_app_sys::gst_app_src_get_current_level_bytes(self.to_glib_none().0) } } #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn get_duration(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_app_src_get_duration(self.to_glib_none().0)) + from_glib(gst_app_sys::gst_app_src_get_duration(self.to_glib_none().0)) } } pub fn get_emit_signals(&self) -> bool { unsafe { - from_glib(ffi::gst_app_src_get_emit_signals(self.to_glib_none().0)) + from_glib(gst_app_sys::gst_app_src_get_emit_signals(self.to_glib_none().0)) } } pub fn get_max_bytes(&self) -> u64 { unsafe { - ffi::gst_app_src_get_max_bytes(self.to_glib_none().0) + gst_app_sys::gst_app_src_get_max_bytes(self.to_glib_none().0) } } pub fn get_size(&self) -> i64 { unsafe { - ffi::gst_app_src_get_size(self.to_glib_none().0) + gst_app_sys::gst_app_src_get_size(self.to_glib_none().0) } } pub fn get_stream_type(&self) -> AppStreamType { unsafe { - from_glib(ffi::gst_app_src_get_stream_type(self.to_glib_none().0)) + from_glib(gst_app_sys::gst_app_src_get_stream_type(self.to_glib_none().0)) } } //pub fn set_callbacks(&self, callbacks: /*Ignored*/&mut AppSrcCallbacks, user_data: /*Unimplemented*/Option) { - // unsafe { TODO: call ffi::gst_app_src_set_callbacks() } + // unsafe { TODO: call gst_app_sys:gst_app_src_set_callbacks() } //} - pub fn set_caps<'a, P: Into>>(&self, caps: P) { - let caps = caps.into(); + pub fn set_caps(&self, caps: Option<&gst::Caps>) { unsafe { - ffi::gst_app_src_set_caps(self.to_glib_none().0, caps.to_glib_none().0); + gst_app_sys::gst_app_src_set_caps(self.to_glib_none().0, caps.to_glib_none().0); } } #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn set_duration(&self, duration: gst::ClockTime) { unsafe { - ffi::gst_app_src_set_duration(self.to_glib_none().0, duration.to_glib()); + gst_app_sys::gst_app_src_set_duration(self.to_glib_none().0, duration.to_glib()); } } pub fn set_emit_signals(&self, emit: bool) { unsafe { - ffi::gst_app_src_set_emit_signals(self.to_glib_none().0, emit.to_glib()); + gst_app_sys::gst_app_src_set_emit_signals(self.to_glib_none().0, emit.to_glib()); } } pub fn set_max_bytes(&self, max: u64) { unsafe { - ffi::gst_app_src_set_max_bytes(self.to_glib_none().0, max); + gst_app_sys::gst_app_src_set_max_bytes(self.to_glib_none().0, max); } } pub fn set_size(&self, size: i64) { unsafe { - ffi::gst_app_src_set_size(self.to_glib_none().0, size); + gst_app_sys::gst_app_src_set_size(self.to_glib_none().0, size); } } pub fn set_stream_type(&self, type_: AppStreamType) { unsafe { - ffi::gst_app_src_set_stream_type(self.to_glib_none().0, type_.to_glib()); + gst_app_sys::gst_app_src_set_stream_type(self.to_glib_none().0, type_.to_glib()); } } pub fn get_property_block(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"block\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"block\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_block(&self, block: bool) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"block\0".as_ptr() as *const _, Value::from(&block).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"block\0".as_ptr() as *const _, Value::from(&block).to_glib_none().0); } } pub fn get_property_duration(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_duration(&self, duration: u64) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0); } } pub fn get_property_format(&self) -> gst::Format { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"format\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"format\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_format(&self, format: gst::Format) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"format\0".as_ptr() as *const _, Value::from(&format).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"format\0".as_ptr() as *const _, Value::from(&format).to_glib_none().0); } } pub fn get_property_is_live(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"is-live\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"is-live\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_is_live(&self, is_live: bool) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"is-live\0".as_ptr() as *const _, Value::from(&is_live).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"is-live\0".as_ptr() as *const _, Value::from(&is_live).to_glib_none().0); } } pub fn get_property_max_latency(&self) -> i64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"max-latency\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"max-latency\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_max_latency(&self, max_latency: i64) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"max-latency\0".as_ptr() as *const _, Value::from(&max_latency).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"max-latency\0".as_ptr() as *const _, Value::from(&max_latency).to_glib_none().0); } } pub fn get_property_min_latency(&self) -> i64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"min-latency\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"min-latency\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_min_latency(&self, min_latency: i64) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"min-latency\0".as_ptr() as *const _, Value::from(&min_latency).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"min-latency\0".as_ptr() as *const _, Value::from(&min_latency).to_glib_none().0); } } pub fn get_property_min_percent(&self) -> u32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"min-percent\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"min-percent\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_min_percent(&self, min_percent: u32) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"min-percent\0".as_ptr() as *const _, Value::from(&min_percent).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"min-percent\0".as_ptr() as *const _, Value::from(&min_percent).to_glib_none().0); } } @@ -342,82 +341,82 @@ impl AppSrc { unsafe impl Send for AppSrc {} unsafe impl Sync for AppSrc {} -unsafe extern "C" fn enough_data_trampoline(this: *mut ffi::GstAppSrc, f: glib_ffi::gpointer) { +unsafe extern "C" fn enough_data_trampoline(this: *mut gst_app_sys::GstAppSrc, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn need_data_trampoline(this: *mut ffi::GstAppSrc, length: libc::c_uint, f: glib_ffi::gpointer) { +unsafe extern "C" fn need_data_trampoline(this: *mut gst_app_sys::GstAppSrc, length: libc::c_uint, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), length) } -unsafe extern "C" fn seek_data_trampoline bool + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, offset: u64, f: glib_ffi::gpointer) -> glib_ffi::gboolean { +unsafe extern "C" fn seek_data_trampoline bool + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, offset: u64, f: glib_sys::gpointer) -> glib_sys::gboolean { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), offset).to_glib() } -unsafe extern "C" fn notify_block_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_block_trampoline(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_caps_trampoline(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_current_level_bytes_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_current_level_bytes_trampoline(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_duration_trampoline(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_emit_signals_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_emit_signals_trampoline(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_format_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_format_trampoline(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_is_live_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_is_live_trampoline(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_max_bytes_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_max_bytes_trampoline(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_max_latency_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_max_latency_trampoline(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_min_latency_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_min_latency_trampoline(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_min_percent_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_min_percent_trampoline(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_size_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_size_trampoline(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_stream_type_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_stream_type_trampoline(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer-app/src/auto/enums.rs b/gstreamer-app/src/auto/enums.rs index 924df7518..74719b291 100644 --- a/gstreamer-app/src/auto/enums.rs +++ b/gstreamer-app/src/auto/enums.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +9,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_app_sys; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] @@ -24,21 +24,21 @@ pub enum AppStreamType { #[doc(hidden)] impl ToGlib for AppStreamType { - type GlibType = ffi::GstAppStreamType; + type GlibType = gst_app_sys::GstAppStreamType; - fn to_glib(&self) -> ffi::GstAppStreamType { + fn to_glib(&self) -> gst_app_sys::GstAppStreamType { match *self { - AppStreamType::Stream => ffi::GST_APP_STREAM_TYPE_STREAM, - AppStreamType::Seekable => ffi::GST_APP_STREAM_TYPE_SEEKABLE, - AppStreamType::RandomAccess => ffi::GST_APP_STREAM_TYPE_RANDOM_ACCESS, + AppStreamType::Stream => gst_app_sys::GST_APP_STREAM_TYPE_STREAM, + AppStreamType::Seekable => gst_app_sys::GST_APP_STREAM_TYPE_SEEKABLE, + AppStreamType::RandomAccess => gst_app_sys::GST_APP_STREAM_TYPE_RANDOM_ACCESS, AppStreamType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for AppStreamType { - fn from_glib(value: ffi::GstAppStreamType) -> Self { +impl FromGlib for AppStreamType { + fn from_glib(value: gst_app_sys::GstAppStreamType) -> Self { skip_assert_initialized!(); match value { 0 => AppStreamType::Stream, @@ -51,7 +51,7 @@ impl FromGlib for AppStreamType { impl StaticType for AppStreamType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_app_stream_type_get_type()) } + unsafe { from_glib(gst_app_sys::gst_app_stream_type_get_type()) } } } @@ -63,13 +63,13 @@ impl<'a> FromValueOptional<'a> for AppStreamType { impl<'a> FromValue<'a> for AppStreamType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for AppStreamType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-app/src/auto/versions.txt b/gstreamer-app/src/auto/versions.txt index b9131200d..a9e0ccc5d 100644 --- a/gstreamer-app/src/auto/versions.txt +++ b/gstreamer-app/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-audio/src/auto/audio_stream_align.rs b/gstreamer-audio/src/auto/audio_stream_align.rs index 4175aa93c..7c35e56db 100644 --- a/gstreamer-audio/src/auto/audio_stream_align.rs +++ b/gstreamer-audio/src/auto/audio_stream_align.rs @@ -2,20 +2,20 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; #[cfg(any(feature = "v1_14", feature = "dox"))] use glib::translate::*; #[cfg(any(feature = "v1_14", feature = "dox"))] use gst; +use gst_audio_sys; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct AudioStreamAlign(Boxed); + pub struct AudioStreamAlign(Boxed); match fn { - copy => |ptr| ffi::gst_audio_stream_align_copy(mut_override(ptr)), - free => |ptr| ffi::gst_audio_stream_align_free(ptr), - get_type => || ffi::gst_audio_stream_align_get_type(), + copy => |ptr| gst_audio_sys::gst_audio_stream_align_copy(mut_override(ptr)), + free => |ptr| gst_audio_sys::gst_audio_stream_align_free(ptr), + get_type => || gst_audio_sys::gst_audio_stream_align_get_type(), } } @@ -24,70 +24,70 @@ impl AudioStreamAlign { pub fn new(rate: i32, alignment_threshold: gst::ClockTime, discont_wait: gst::ClockTime) -> AudioStreamAlign { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_audio_stream_align_new(rate, alignment_threshold.to_glib(), discont_wait.to_glib())) + from_glib_full(gst_audio_sys::gst_audio_stream_align_new(rate, alignment_threshold.to_glib(), discont_wait.to_glib())) } } #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn get_alignment_threshold(&mut self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_audio_stream_align_get_alignment_threshold(self.to_glib_none_mut().0)) + from_glib(gst_audio_sys::gst_audio_stream_align_get_alignment_threshold(self.to_glib_none_mut().0)) } } #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn get_discont_wait(&mut self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_audio_stream_align_get_discont_wait(self.to_glib_none_mut().0)) + from_glib(gst_audio_sys::gst_audio_stream_align_get_discont_wait(self.to_glib_none_mut().0)) } } #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn get_rate(&mut self) -> i32 { unsafe { - ffi::gst_audio_stream_align_get_rate(self.to_glib_none_mut().0) + gst_audio_sys::gst_audio_stream_align_get_rate(self.to_glib_none_mut().0) } } #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn get_samples_since_discont(&mut self) -> u64 { unsafe { - ffi::gst_audio_stream_align_get_samples_since_discont(self.to_glib_none_mut().0) + gst_audio_sys::gst_audio_stream_align_get_samples_since_discont(self.to_glib_none_mut().0) } } #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn get_timestamp_at_discont(&mut self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_audio_stream_align_get_timestamp_at_discont(self.to_glib_none_mut().0)) + from_glib(gst_audio_sys::gst_audio_stream_align_get_timestamp_at_discont(self.to_glib_none_mut().0)) } } #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn mark_discont(&mut self) { unsafe { - ffi::gst_audio_stream_align_mark_discont(self.to_glib_none_mut().0); + gst_audio_sys::gst_audio_stream_align_mark_discont(self.to_glib_none_mut().0); } } #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn set_alignment_threshold(&mut self, alignment_threshold: gst::ClockTime) { unsafe { - ffi::gst_audio_stream_align_set_alignment_threshold(self.to_glib_none_mut().0, alignment_threshold.to_glib()); + gst_audio_sys::gst_audio_stream_align_set_alignment_threshold(self.to_glib_none_mut().0, alignment_threshold.to_glib()); } } #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn set_discont_wait(&mut self, discont_wait: gst::ClockTime) { unsafe { - ffi::gst_audio_stream_align_set_discont_wait(self.to_glib_none_mut().0, discont_wait.to_glib()); + gst_audio_sys::gst_audio_stream_align_set_discont_wait(self.to_glib_none_mut().0, discont_wait.to_glib()); } } #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn set_rate(&mut self, rate: i32) { unsafe { - ffi::gst_audio_stream_align_set_rate(self.to_glib_none_mut().0, rate); + gst_audio_sys::gst_audio_stream_align_set_rate(self.to_glib_none_mut().0, rate); } } } diff --git a/gstreamer-audio/src/auto/enums.rs b/gstreamer-audio/src/auto/enums.rs index 38915215d..b91cafcda 100644 --- a/gstreamer-audio/src/auto/enums.rs +++ b/gstreamer-audio/src/auto/enums.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +9,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_audio_sys; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] @@ -52,49 +52,49 @@ pub enum AudioChannelPosition { #[doc(hidden)] impl ToGlib for AudioChannelPosition { - type GlibType = ffi::GstAudioChannelPosition; + type GlibType = gst_audio_sys::GstAudioChannelPosition; - fn to_glib(&self) -> ffi::GstAudioChannelPosition { + fn to_glib(&self) -> gst_audio_sys::GstAudioChannelPosition { match *self { - AudioChannelPosition::None => ffi::GST_AUDIO_CHANNEL_POSITION_NONE, - AudioChannelPosition::Mono => ffi::GST_AUDIO_CHANNEL_POSITION_MONO, - AudioChannelPosition::Invalid => ffi::GST_AUDIO_CHANNEL_POSITION_INVALID, - AudioChannelPosition::FrontLeft => ffi::GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, - AudioChannelPosition::FrontRight => ffi::GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, - AudioChannelPosition::FrontCenter => ffi::GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, - AudioChannelPosition::Lfe1 => ffi::GST_AUDIO_CHANNEL_POSITION_LFE1, - AudioChannelPosition::RearLeft => ffi::GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, - AudioChannelPosition::RearRight => ffi::GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, - AudioChannelPosition::FrontLeftOfCenter => ffi::GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER, - AudioChannelPosition::FrontRightOfCenter => ffi::GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER, - AudioChannelPosition::RearCenter => ffi::GST_AUDIO_CHANNEL_POSITION_REAR_CENTER, - AudioChannelPosition::Lfe2 => ffi::GST_AUDIO_CHANNEL_POSITION_LFE2, - AudioChannelPosition::SideLeft => ffi::GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT, - AudioChannelPosition::SideRight => ffi::GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT, - AudioChannelPosition::TopFrontLeft => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_LEFT, - AudioChannelPosition::TopFrontRight => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_RIGHT, - AudioChannelPosition::TopFrontCenter => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_CENTER, - AudioChannelPosition::TopCenter => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_CENTER, - AudioChannelPosition::TopRearLeft => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_REAR_LEFT, - AudioChannelPosition::TopRearRight => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_REAR_RIGHT, - AudioChannelPosition::TopSideLeft => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_LEFT, - AudioChannelPosition::TopSideRight => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_RIGHT, - AudioChannelPosition::TopRearCenter => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_REAR_CENTER, - AudioChannelPosition::BottomFrontCenter => ffi::GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_CENTER, - AudioChannelPosition::BottomFrontLeft => ffi::GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_LEFT, - AudioChannelPosition::BottomFrontRight => ffi::GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_RIGHT, - AudioChannelPosition::WideLeft => ffi::GST_AUDIO_CHANNEL_POSITION_WIDE_LEFT, - AudioChannelPosition::WideRight => ffi::GST_AUDIO_CHANNEL_POSITION_WIDE_RIGHT, - AudioChannelPosition::SurroundLeft => ffi::GST_AUDIO_CHANNEL_POSITION_SURROUND_LEFT, - AudioChannelPosition::SurroundRight => ffi::GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT, + AudioChannelPosition::None => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_NONE, + AudioChannelPosition::Mono => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_MONO, + AudioChannelPosition::Invalid => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID, + AudioChannelPosition::FrontLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, + AudioChannelPosition::FrontRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, + AudioChannelPosition::FrontCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, + AudioChannelPosition::Lfe1 => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_LFE1, + AudioChannelPosition::RearLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, + AudioChannelPosition::RearRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, + AudioChannelPosition::FrontLeftOfCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER, + AudioChannelPosition::FrontRightOfCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER, + AudioChannelPosition::RearCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_REAR_CENTER, + AudioChannelPosition::Lfe2 => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_LFE2, + AudioChannelPosition::SideLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT, + AudioChannelPosition::SideRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT, + AudioChannelPosition::TopFrontLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_LEFT, + AudioChannelPosition::TopFrontRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_RIGHT, + AudioChannelPosition::TopFrontCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_CENTER, + AudioChannelPosition::TopCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_CENTER, + AudioChannelPosition::TopRearLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_REAR_LEFT, + AudioChannelPosition::TopRearRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_REAR_RIGHT, + AudioChannelPosition::TopSideLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_LEFT, + AudioChannelPosition::TopSideRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_RIGHT, + AudioChannelPosition::TopRearCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_REAR_CENTER, + AudioChannelPosition::BottomFrontCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_CENTER, + AudioChannelPosition::BottomFrontLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_LEFT, + AudioChannelPosition::BottomFrontRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_RIGHT, + AudioChannelPosition::WideLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_WIDE_LEFT, + AudioChannelPosition::WideRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_WIDE_RIGHT, + AudioChannelPosition::SurroundLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_SURROUND_LEFT, + AudioChannelPosition::SurroundRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT, AudioChannelPosition::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for AudioChannelPosition { - fn from_glib(value: ffi::GstAudioChannelPosition) -> Self { +impl FromGlib for AudioChannelPosition { + fn from_glib(value: gst_audio_sys::GstAudioChannelPosition) -> Self { skip_assert_initialized!(); match value { -3 => AudioChannelPosition::None, @@ -135,7 +135,7 @@ impl FromGlib for AudioChannelPosition { impl StaticType for AudioChannelPosition { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_audio_channel_position_get_type()) } + unsafe { from_glib(gst_audio_sys::gst_audio_channel_position_get_type()) } } } @@ -147,13 +147,13 @@ impl<'a> FromValueOptional<'a> for AudioChannelPosition { impl<'a> FromValue<'a> for AudioChannelPosition { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for AudioChannelPosition { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -198,50 +198,50 @@ pub enum AudioFormat { #[doc(hidden)] impl ToGlib for AudioFormat { - type GlibType = ffi::GstAudioFormat; + type GlibType = gst_audio_sys::GstAudioFormat; - fn to_glib(&self) -> ffi::GstAudioFormat { + fn to_glib(&self) -> gst_audio_sys::GstAudioFormat { match *self { - AudioFormat::Unknown => ffi::GST_AUDIO_FORMAT_UNKNOWN, - AudioFormat::Encoded => ffi::GST_AUDIO_FORMAT_ENCODED, - AudioFormat::S8 => ffi::GST_AUDIO_FORMAT_S8, - AudioFormat::U8 => ffi::GST_AUDIO_FORMAT_U8, - AudioFormat::S16le => ffi::GST_AUDIO_FORMAT_S16LE, - AudioFormat::S16be => ffi::GST_AUDIO_FORMAT_S16BE, - AudioFormat::U16le => ffi::GST_AUDIO_FORMAT_U16LE, - AudioFormat::U16be => ffi::GST_AUDIO_FORMAT_U16BE, - AudioFormat::S2432le => ffi::GST_AUDIO_FORMAT_S24_32LE, - AudioFormat::S2432be => ffi::GST_AUDIO_FORMAT_S24_32BE, - AudioFormat::U2432le => ffi::GST_AUDIO_FORMAT_U24_32LE, - AudioFormat::U2432be => ffi::GST_AUDIO_FORMAT_U24_32BE, - AudioFormat::S32le => ffi::GST_AUDIO_FORMAT_S32LE, - AudioFormat::S32be => ffi::GST_AUDIO_FORMAT_S32BE, - AudioFormat::U32le => ffi::GST_AUDIO_FORMAT_U32LE, - AudioFormat::U32be => ffi::GST_AUDIO_FORMAT_U32BE, - AudioFormat::S24le => ffi::GST_AUDIO_FORMAT_S24LE, - AudioFormat::S24be => ffi::GST_AUDIO_FORMAT_S24BE, - AudioFormat::U24le => ffi::GST_AUDIO_FORMAT_U24LE, - AudioFormat::U24be => ffi::GST_AUDIO_FORMAT_U24BE, - AudioFormat::S20le => ffi::GST_AUDIO_FORMAT_S20LE, - AudioFormat::S20be => ffi::GST_AUDIO_FORMAT_S20BE, - AudioFormat::U20le => ffi::GST_AUDIO_FORMAT_U20LE, - AudioFormat::U20be => ffi::GST_AUDIO_FORMAT_U20BE, - AudioFormat::S18le => ffi::GST_AUDIO_FORMAT_S18LE, - AudioFormat::S18be => ffi::GST_AUDIO_FORMAT_S18BE, - AudioFormat::U18le => ffi::GST_AUDIO_FORMAT_U18LE, - AudioFormat::U18be => ffi::GST_AUDIO_FORMAT_U18BE, - AudioFormat::F32le => ffi::GST_AUDIO_FORMAT_F32LE, - AudioFormat::F32be => ffi::GST_AUDIO_FORMAT_F32BE, - AudioFormat::F64le => ffi::GST_AUDIO_FORMAT_F64LE, - AudioFormat::F64be => ffi::GST_AUDIO_FORMAT_F64BE, + AudioFormat::Unknown => gst_audio_sys::GST_AUDIO_FORMAT_UNKNOWN, + AudioFormat::Encoded => gst_audio_sys::GST_AUDIO_FORMAT_ENCODED, + AudioFormat::S8 => gst_audio_sys::GST_AUDIO_FORMAT_S8, + AudioFormat::U8 => gst_audio_sys::GST_AUDIO_FORMAT_U8, + AudioFormat::S16le => gst_audio_sys::GST_AUDIO_FORMAT_S16LE, + AudioFormat::S16be => gst_audio_sys::GST_AUDIO_FORMAT_S16BE, + AudioFormat::U16le => gst_audio_sys::GST_AUDIO_FORMAT_U16LE, + AudioFormat::U16be => gst_audio_sys::GST_AUDIO_FORMAT_U16BE, + AudioFormat::S2432le => gst_audio_sys::GST_AUDIO_FORMAT_S24_32LE, + AudioFormat::S2432be => gst_audio_sys::GST_AUDIO_FORMAT_S24_32BE, + AudioFormat::U2432le => gst_audio_sys::GST_AUDIO_FORMAT_U24_32LE, + AudioFormat::U2432be => gst_audio_sys::GST_AUDIO_FORMAT_U24_32BE, + AudioFormat::S32le => gst_audio_sys::GST_AUDIO_FORMAT_S32LE, + AudioFormat::S32be => gst_audio_sys::GST_AUDIO_FORMAT_S32BE, + AudioFormat::U32le => gst_audio_sys::GST_AUDIO_FORMAT_U32LE, + AudioFormat::U32be => gst_audio_sys::GST_AUDIO_FORMAT_U32BE, + AudioFormat::S24le => gst_audio_sys::GST_AUDIO_FORMAT_S24LE, + AudioFormat::S24be => gst_audio_sys::GST_AUDIO_FORMAT_S24BE, + AudioFormat::U24le => gst_audio_sys::GST_AUDIO_FORMAT_U24LE, + AudioFormat::U24be => gst_audio_sys::GST_AUDIO_FORMAT_U24BE, + AudioFormat::S20le => gst_audio_sys::GST_AUDIO_FORMAT_S20LE, + AudioFormat::S20be => gst_audio_sys::GST_AUDIO_FORMAT_S20BE, + AudioFormat::U20le => gst_audio_sys::GST_AUDIO_FORMAT_U20LE, + AudioFormat::U20be => gst_audio_sys::GST_AUDIO_FORMAT_U20BE, + AudioFormat::S18le => gst_audio_sys::GST_AUDIO_FORMAT_S18LE, + AudioFormat::S18be => gst_audio_sys::GST_AUDIO_FORMAT_S18BE, + AudioFormat::U18le => gst_audio_sys::GST_AUDIO_FORMAT_U18LE, + AudioFormat::U18be => gst_audio_sys::GST_AUDIO_FORMAT_U18BE, + AudioFormat::F32le => gst_audio_sys::GST_AUDIO_FORMAT_F32LE, + AudioFormat::F32be => gst_audio_sys::GST_AUDIO_FORMAT_F32BE, + AudioFormat::F64le => gst_audio_sys::GST_AUDIO_FORMAT_F64LE, + AudioFormat::F64be => gst_audio_sys::GST_AUDIO_FORMAT_F64BE, AudioFormat::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for AudioFormat { - fn from_glib(value: ffi::GstAudioFormat) -> Self { +impl FromGlib for AudioFormat { + fn from_glib(value: gst_audio_sys::GstAudioFormat) -> Self { skip_assert_initialized!(); match value { 0 => AudioFormat::Unknown, @@ -283,7 +283,7 @@ impl FromGlib for AudioFormat { impl StaticType for AudioFormat { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_audio_format_get_type()) } + unsafe { from_glib(gst_audio_sys::gst_audio_format_get_type()) } } } @@ -295,13 +295,13 @@ impl<'a> FromValueOptional<'a> for AudioFormat { impl<'a> FromValue<'a> for AudioFormat { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for AudioFormat { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -316,20 +316,20 @@ pub enum AudioLayout { #[doc(hidden)] impl ToGlib for AudioLayout { - type GlibType = ffi::GstAudioLayout; + type GlibType = gst_audio_sys::GstAudioLayout; - fn to_glib(&self) -> ffi::GstAudioLayout { + fn to_glib(&self) -> gst_audio_sys::GstAudioLayout { match *self { - AudioLayout::Interleaved => ffi::GST_AUDIO_LAYOUT_INTERLEAVED, - AudioLayout::NonInterleaved => ffi::GST_AUDIO_LAYOUT_NON_INTERLEAVED, + AudioLayout::Interleaved => gst_audio_sys::GST_AUDIO_LAYOUT_INTERLEAVED, + AudioLayout::NonInterleaved => gst_audio_sys::GST_AUDIO_LAYOUT_NON_INTERLEAVED, AudioLayout::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for AudioLayout { - fn from_glib(value: ffi::GstAudioLayout) -> Self { +impl FromGlib for AudioLayout { + fn from_glib(value: gst_audio_sys::GstAudioLayout) -> Self { skip_assert_initialized!(); match value { 0 => AudioLayout::Interleaved, @@ -341,7 +341,7 @@ impl FromGlib for AudioLayout { impl StaticType for AudioLayout { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_audio_layout_get_type()) } + unsafe { from_glib(gst_audio_sys::gst_audio_layout_get_type()) } } } @@ -353,13 +353,13 @@ impl<'a> FromValueOptional<'a> for AudioLayout { impl<'a> FromValue<'a> for AudioLayout { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for AudioLayout { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -375,21 +375,21 @@ pub enum StreamVolumeFormat { #[doc(hidden)] impl ToGlib for StreamVolumeFormat { - type GlibType = ffi::GstStreamVolumeFormat; + type GlibType = gst_audio_sys::GstStreamVolumeFormat; - fn to_glib(&self) -> ffi::GstStreamVolumeFormat { + fn to_glib(&self) -> gst_audio_sys::GstStreamVolumeFormat { match *self { - StreamVolumeFormat::Linear => ffi::GST_STREAM_VOLUME_FORMAT_LINEAR, - StreamVolumeFormat::Cubic => ffi::GST_STREAM_VOLUME_FORMAT_CUBIC, - StreamVolumeFormat::Db => ffi::GST_STREAM_VOLUME_FORMAT_DB, + StreamVolumeFormat::Linear => gst_audio_sys::GST_STREAM_VOLUME_FORMAT_LINEAR, + StreamVolumeFormat::Cubic => gst_audio_sys::GST_STREAM_VOLUME_FORMAT_CUBIC, + StreamVolumeFormat::Db => gst_audio_sys::GST_STREAM_VOLUME_FORMAT_DB, StreamVolumeFormat::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for StreamVolumeFormat { - fn from_glib(value: ffi::GstStreamVolumeFormat) -> Self { +impl FromGlib for StreamVolumeFormat { + fn from_glib(value: gst_audio_sys::GstStreamVolumeFormat) -> Self { skip_assert_initialized!(); match value { 0 => StreamVolumeFormat::Linear, diff --git a/gstreamer-audio/src/auto/flags.rs b/gstreamer-audio/src/auto/flags.rs index 25ec22c62..df4c5541b 100644 --- a/gstreamer-audio/src/auto/flags.rs +++ b/gstreamer-audio/src/auto/flags.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +9,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_audio_sys; bitflags! { pub struct AudioFlags: u32 { @@ -21,16 +21,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for AudioFlags { - type GlibType = ffi::GstAudioFlags; + type GlibType = gst_audio_sys::GstAudioFlags; - fn to_glib(&self) -> ffi::GstAudioFlags { + fn to_glib(&self) -> gst_audio_sys::GstAudioFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for AudioFlags { - fn from_glib(value: ffi::GstAudioFlags) -> AudioFlags { +impl FromGlib for AudioFlags { + fn from_glib(value: gst_audio_sys::GstAudioFlags) -> AudioFlags { skip_assert_initialized!(); AudioFlags::from_bits_truncate(value) } @@ -38,7 +38,7 @@ impl FromGlib for AudioFlags { impl StaticType for AudioFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_audio_flags_get_type()) } + unsafe { from_glib(gst_audio_sys::gst_audio_flags_get_type()) } } } @@ -50,13 +50,13 @@ impl<'a> FromValueOptional<'a> for AudioFlags { impl<'a> FromValue<'a> for AudioFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for AudioFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -72,16 +72,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for AudioFormatFlags { - type GlibType = ffi::GstAudioFormatFlags; + type GlibType = gst_audio_sys::GstAudioFormatFlags; - fn to_glib(&self) -> ffi::GstAudioFormatFlags { + fn to_glib(&self) -> gst_audio_sys::GstAudioFormatFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for AudioFormatFlags { - fn from_glib(value: ffi::GstAudioFormatFlags) -> AudioFormatFlags { +impl FromGlib for AudioFormatFlags { + fn from_glib(value: gst_audio_sys::GstAudioFormatFlags) -> AudioFormatFlags { skip_assert_initialized!(); AudioFormatFlags::from_bits_truncate(value) } @@ -89,7 +89,7 @@ impl FromGlib for AudioFormatFlags { impl StaticType for AudioFormatFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_audio_format_flags_get_type()) } + unsafe { from_glib(gst_audio_sys::gst_audio_format_flags_get_type()) } } } @@ -101,13 +101,13 @@ impl<'a> FromValueOptional<'a> for AudioFormatFlags { impl<'a> FromValue<'a> for AudioFormatFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for AudioFormatFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -120,16 +120,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for AudioPackFlags { - type GlibType = ffi::GstAudioPackFlags; + type GlibType = gst_audio_sys::GstAudioPackFlags; - fn to_glib(&self) -> ffi::GstAudioPackFlags { + fn to_glib(&self) -> gst_audio_sys::GstAudioPackFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for AudioPackFlags { - fn from_glib(value: ffi::GstAudioPackFlags) -> AudioPackFlags { +impl FromGlib for AudioPackFlags { + fn from_glib(value: gst_audio_sys::GstAudioPackFlags) -> AudioPackFlags { skip_assert_initialized!(); AudioPackFlags::from_bits_truncate(value) } @@ -137,7 +137,7 @@ impl FromGlib for AudioPackFlags { impl StaticType for AudioPackFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_audio_pack_flags_get_type()) } + unsafe { from_glib(gst_audio_sys::gst_audio_pack_flags_get_type()) } } } @@ -149,13 +149,13 @@ impl<'a> FromValueOptional<'a> for AudioPackFlags { impl<'a> FromValue<'a> for AudioPackFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for AudioPackFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-audio/src/auto/stream_volume.rs b/gstreamer-audio/src/auto/stream_volume.rs index 1e55d47ad..b7aa1030b 100644 --- a/gstreamer-audio/src/auto/stream_volume.rs +++ b/gstreamer-audio/src/auto/stream_volume.rs @@ -3,21 +3,21 @@ // DO NOT EDIT use StreamVolumeFormat; -use ffi; use glib::object::Cast; use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; +use gst_audio_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct StreamVolume(Interface); + pub struct StreamVolume(Interface); match fn { - get_type => || ffi::gst_stream_volume_get_type(), + get_type => || gst_audio_sys::gst_stream_volume_get_type(), } } @@ -25,7 +25,7 @@ impl StreamVolume { pub fn convert_volume(from: StreamVolumeFormat, to: StreamVolumeFormat, val: f64) -> f64 { assert_initialized_main_thread!(); unsafe { - ffi::gst_stream_volume_convert_volume(from.to_glib(), to.to_glib(), val) + gst_audio_sys::gst_stream_volume_convert_volume(from.to_glib(), to.to_glib(), val) } } } @@ -52,25 +52,25 @@ pub trait StreamVolumeExt: 'static { impl> StreamVolumeExt for O { fn get_mute(&self) -> bool { unsafe { - from_glib(ffi::gst_stream_volume_get_mute(self.as_ref().to_glib_none().0)) + from_glib(gst_audio_sys::gst_stream_volume_get_mute(self.as_ref().to_glib_none().0)) } } fn get_volume(&self, format: StreamVolumeFormat) -> f64 { unsafe { - ffi::gst_stream_volume_get_volume(self.as_ref().to_glib_none().0, format.to_glib()) + gst_audio_sys::gst_stream_volume_get_volume(self.as_ref().to_glib_none().0, format.to_glib()) } } fn set_mute(&self, mute: bool) { unsafe { - ffi::gst_stream_volume_set_mute(self.as_ref().to_glib_none().0, mute.to_glib()); + gst_audio_sys::gst_stream_volume_set_mute(self.as_ref().to_glib_none().0, mute.to_glib()); } } fn set_volume(&self, format: StreamVolumeFormat, val: f64) { unsafe { - ffi::gst_stream_volume_set_volume(self.as_ref().to_glib_none().0, format.to_glib(), val); + gst_audio_sys::gst_stream_volume_set_volume(self.as_ref().to_glib_none().0, format.to_glib(), val); } } @@ -91,13 +91,13 @@ impl> StreamVolumeExt for O { } } -unsafe extern "C" fn notify_mute_trampoline(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_mute_trampoline(this: *mut gst_audio_sys::GstStreamVolume, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&StreamVolume::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_volume_trampoline(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_volume_trampoline(this: *mut gst_audio_sys::GstStreamVolume, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&StreamVolume::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-audio/src/auto/versions.txt b/gstreamer-audio/src/auto/versions.txt index b9131200d..a9e0ccc5d 100644 --- a/gstreamer-audio/src/auto/versions.txt +++ b/gstreamer-audio/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-base/src/auto/adapter.rs b/gstreamer-base/src/auto/adapter.rs index d513b5061..688a48985 100644 --- a/gstreamer-base/src/auto/adapter.rs +++ b/gstreamer-base/src/auto/adapter.rs @@ -2,18 +2,18 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib; use glib::ObjectExt; use glib::translate::*; use gst; +use gst_base_sys; use std::mem; glib_wrapper! { - pub struct Adapter(Object); + pub struct Adapter(Object); match fn { - get_type => || ffi::gst_adapter_get_type(), + get_type => || gst_base_sys::gst_adapter_get_type(), } } @@ -21,87 +21,87 @@ impl Adapter { pub fn new() -> Adapter { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_adapter_new()) + from_glib_full(gst_base_sys::gst_adapter_new()) } } pub fn available(&self) -> usize { unsafe { - ffi::gst_adapter_available(self.to_glib_none().0) + gst_base_sys::gst_adapter_available(self.to_glib_none().0) } } pub fn available_fast(&self) -> usize { unsafe { - ffi::gst_adapter_available_fast(self.to_glib_none().0) + gst_base_sys::gst_adapter_available_fast(self.to_glib_none().0) } } pub fn clear(&self) { unsafe { - ffi::gst_adapter_clear(self.to_glib_none().0); + gst_base_sys::gst_adapter_clear(self.to_glib_none().0); } } pub fn copy_bytes(&self, offset: usize, size: usize) -> Option { unsafe { - from_glib_full(ffi::gst_adapter_copy_bytes(self.to_glib_none().0, offset, size)) + from_glib_full(gst_base_sys::gst_adapter_copy_bytes(self.to_glib_none().0, offset, size)) } } pub fn distance_from_discont(&self) -> u64 { unsafe { - ffi::gst_adapter_distance_from_discont(self.to_glib_none().0) + gst_base_sys::gst_adapter_distance_from_discont(self.to_glib_none().0) } } #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn dts_at_discont(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_adapter_dts_at_discont(self.to_glib_none().0)) + from_glib(gst_base_sys::gst_adapter_dts_at_discont(self.to_glib_none().0)) } } pub fn flush(&self, flush: usize) { unsafe { - ffi::gst_adapter_flush(self.to_glib_none().0, flush); + gst_base_sys::gst_adapter_flush(self.to_glib_none().0, flush); } } pub fn get_buffer(&self, nbytes: usize) -> Option { unsafe { - from_glib_full(ffi::gst_adapter_get_buffer(self.to_glib_none().0, nbytes)) + from_glib_full(gst_base_sys::gst_adapter_get_buffer(self.to_glib_none().0, nbytes)) } } pub fn get_buffer_fast(&self, nbytes: usize) -> Option { unsafe { - from_glib_full(ffi::gst_adapter_get_buffer_fast(self.to_glib_none().0, nbytes)) + from_glib_full(gst_base_sys::gst_adapter_get_buffer_fast(self.to_glib_none().0, nbytes)) } } pub fn get_buffer_list(&self, nbytes: usize) -> Option { unsafe { - from_glib_full(ffi::gst_adapter_get_buffer_list(self.to_glib_none().0, nbytes)) + from_glib_full(gst_base_sys::gst_adapter_get_buffer_list(self.to_glib_none().0, nbytes)) } } pub fn get_list(&self, nbytes: usize) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_adapter_get_list(self.to_glib_none().0, nbytes)) + FromGlibPtrContainer::from_glib_full(gst_base_sys::gst_adapter_get_list(self.to_glib_none().0, nbytes)) } } pub fn masked_scan_uint32(&self, mask: u32, pattern: u32, offset: usize, size: usize) -> isize { unsafe { - ffi::gst_adapter_masked_scan_uint32(self.to_glib_none().0, mask, pattern, offset, size) + gst_base_sys::gst_adapter_masked_scan_uint32(self.to_glib_none().0, mask, pattern, offset, size) } } pub fn masked_scan_uint32_peek(&self, mask: u32, pattern: u32, offset: usize, size: usize) -> (isize, u32) { unsafe { let mut value = mem::uninitialized(); - let ret = ffi::gst_adapter_masked_scan_uint32_peek(self.to_glib_none().0, mask, pattern, offset, size, &mut value); + let ret = gst_base_sys::gst_adapter_masked_scan_uint32_peek(self.to_glib_none().0, mask, pattern, offset, size, &mut value); (ret, value) } } @@ -109,14 +109,14 @@ impl Adapter { #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn offset_at_discont(&self) -> u64 { unsafe { - ffi::gst_adapter_offset_at_discont(self.to_glib_none().0) + gst_base_sys::gst_adapter_offset_at_discont(self.to_glib_none().0) } } pub fn prev_dts(&self) -> (gst::ClockTime, u64) { unsafe { let mut distance = mem::uninitialized(); - let ret = from_glib(ffi::gst_adapter_prev_dts(self.to_glib_none().0, &mut distance)); + let ret = from_glib(gst_base_sys::gst_adapter_prev_dts(self.to_glib_none().0, &mut distance)); (ret, distance) } } @@ -124,7 +124,7 @@ impl Adapter { pub fn prev_dts_at_offset(&self, offset: usize) -> (gst::ClockTime, u64) { unsafe { let mut distance = mem::uninitialized(); - let ret = from_glib(ffi::gst_adapter_prev_dts_at_offset(self.to_glib_none().0, offset, &mut distance)); + let ret = from_glib(gst_base_sys::gst_adapter_prev_dts_at_offset(self.to_glib_none().0, offset, &mut distance)); (ret, distance) } } @@ -133,7 +133,7 @@ impl Adapter { pub fn prev_offset(&self) -> (u64, u64) { unsafe { let mut distance = mem::uninitialized(); - let ret = ffi::gst_adapter_prev_offset(self.to_glib_none().0, &mut distance); + let ret = gst_base_sys::gst_adapter_prev_offset(self.to_glib_none().0, &mut distance); (ret, distance) } } @@ -141,7 +141,7 @@ impl Adapter { pub fn prev_pts(&self) -> (gst::ClockTime, u64) { unsafe { let mut distance = mem::uninitialized(); - let ret = from_glib(ffi::gst_adapter_prev_pts(self.to_glib_none().0, &mut distance)); + let ret = from_glib(gst_base_sys::gst_adapter_prev_pts(self.to_glib_none().0, &mut distance)); (ret, distance) } } @@ -149,7 +149,7 @@ impl Adapter { pub fn prev_pts_at_offset(&self, offset: usize) -> (gst::ClockTime, u64) { unsafe { let mut distance = mem::uninitialized(); - let ret = from_glib(ffi::gst_adapter_prev_pts_at_offset(self.to_glib_none().0, offset, &mut distance)); + let ret = from_glib(gst_base_sys::gst_adapter_prev_pts_at_offset(self.to_glib_none().0, offset, &mut distance)); (ret, distance) } } @@ -157,31 +157,31 @@ impl Adapter { #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn pts_at_discont(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_adapter_pts_at_discont(self.to_glib_none().0)) + from_glib(gst_base_sys::gst_adapter_pts_at_discont(self.to_glib_none().0)) } } pub fn take_buffer(&self, nbytes: usize) -> Option { unsafe { - from_glib_full(ffi::gst_adapter_take_buffer(self.to_glib_none().0, nbytes)) + from_glib_full(gst_base_sys::gst_adapter_take_buffer(self.to_glib_none().0, nbytes)) } } pub fn take_buffer_fast(&self, nbytes: usize) -> Option { unsafe { - from_glib_full(ffi::gst_adapter_take_buffer_fast(self.to_glib_none().0, nbytes)) + from_glib_full(gst_base_sys::gst_adapter_take_buffer_fast(self.to_glib_none().0, nbytes)) } } pub fn take_buffer_list(&self, nbytes: usize) -> Option { unsafe { - from_glib_full(ffi::gst_adapter_take_buffer_list(self.to_glib_none().0, nbytes)) + from_glib_full(gst_base_sys::gst_adapter_take_buffer_list(self.to_glib_none().0, nbytes)) } } pub fn take_list(&self, nbytes: usize) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_adapter_take_list(self.to_glib_none().0, nbytes)) + FromGlibPtrContainer::from_glib_full(gst_base_sys::gst_adapter_take_list(self.to_glib_none().0, nbytes)) } } } diff --git a/gstreamer-base/src/auto/aggregator.rs b/gstreamer-base/src/auto/aggregator.rs index 3641bc76a..5c447861a 100644 --- a/gstreamer-base/src/auto/aggregator.rs +++ b/gstreamer-base/src/auto/aggregator.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Value; use glib::object::Cast; @@ -10,17 +9,18 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_base_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Aggregator(Object) @extends gst::Element, gst::Object; + pub struct Aggregator(Object) @extends gst::Element, gst::Object; match fn { - get_type => || ffi::gst_aggregator_get_type(), + get_type => || gst_base_sys::gst_aggregator_get_type(), } } @@ -58,48 +58,48 @@ pub trait AggregatorExt: 'static { impl> AggregatorExt for O { //#[cfg(any(feature = "v1_14", feature = "dox"))] //fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) { - // unsafe { TODO: call ffi::gst_aggregator_get_allocator() } + // unsafe { TODO: call gst_base_sys:gst_aggregator_get_allocator() } //} #[cfg(any(feature = "v1_14", feature = "dox"))] fn get_buffer_pool(&self) -> Option { unsafe { - from_glib_full(ffi::gst_aggregator_get_buffer_pool(self.as_ref().to_glib_none().0)) + from_glib_full(gst_base_sys::gst_aggregator_get_buffer_pool(self.as_ref().to_glib_none().0)) } } #[cfg(any(feature = "v1_14", feature = "dox"))] fn get_latency(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_aggregator_get_latency(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_aggregator_get_latency(self.as_ref().to_glib_none().0)) } } #[cfg(any(feature = "v1_14", feature = "dox"))] fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime) { unsafe { - ffi::gst_aggregator_set_latency(self.as_ref().to_glib_none().0, min_latency.to_glib(), max_latency.to_glib()); + gst_base_sys::gst_aggregator_set_latency(self.as_ref().to_glib_none().0, min_latency.to_glib(), max_latency.to_glib()); } } #[cfg(any(feature = "v1_14", feature = "dox"))] fn set_src_caps(&self, caps: &gst::Caps) { unsafe { - ffi::gst_aggregator_set_src_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0); + gst_base_sys::gst_aggregator_set_src_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0); } } fn get_property_start_time(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start-time\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"start-time\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_start_time(&self, start_time: u64) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start-time\0".as_ptr() as *const _, Value::from(&start_time).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"start-time\0".as_ptr() as *const _, Value::from(&start_time).to_glib_none().0); } } @@ -122,13 +122,13 @@ impl> AggregatorExt for O { } #[cfg(any(feature = "v1_14", feature = "dox"))] -unsafe extern "C" fn notify_latency_trampoline(this: *mut ffi::GstAggregator, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_latency_trampoline(this: *mut gst_base_sys::GstAggregator, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Aggregator::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_start_time_trampoline(this: *mut ffi::GstAggregator, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_start_time_trampoline(this: *mut gst_base_sys::GstAggregator, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Aggregator::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-base/src/auto/aggregator_pad.rs b/gstreamer-base/src/auto/aggregator_pad.rs index eec8393f3..dd640a7d3 100644 --- a/gstreamer-base/src/auto/aggregator_pad.rs +++ b/gstreamer-base/src/auto/aggregator_pad.rs @@ -2,16 +2,16 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::object::IsA; use glib::translate::*; use gst; +use gst_base_sys; glib_wrapper! { - pub struct AggregatorPad(Object) @extends gst::Pad, gst::Object; + pub struct AggregatorPad(Object) @extends gst::Pad, gst::Object; match fn { - get_type => || ffi::gst_aggregator_pad_get_type(), + get_type => || gst_base_sys::gst_aggregator_pad_get_type(), } } @@ -41,35 +41,35 @@ impl> AggregatorPadExt for O { #[cfg(any(feature = "v1_14", feature = "dox"))] fn drop_buffer(&self) -> bool { unsafe { - from_glib(ffi::gst_aggregator_pad_drop_buffer(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_aggregator_pad_drop_buffer(self.as_ref().to_glib_none().0)) } } #[cfg(any(feature = "v1_14_1", feature = "dox"))] fn has_buffer(&self) -> bool { unsafe { - from_glib(ffi::gst_aggregator_pad_has_buffer(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_aggregator_pad_has_buffer(self.as_ref().to_glib_none().0)) } } #[cfg(any(feature = "v1_14", feature = "dox"))] fn is_eos(&self) -> bool { unsafe { - from_glib(ffi::gst_aggregator_pad_is_eos(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_aggregator_pad_is_eos(self.as_ref().to_glib_none().0)) } } #[cfg(any(feature = "v1_14", feature = "dox"))] fn peek_buffer(&self) -> Option { unsafe { - from_glib_full(ffi::gst_aggregator_pad_peek_buffer(self.as_ref().to_glib_none().0)) + from_glib_full(gst_base_sys::gst_aggregator_pad_peek_buffer(self.as_ref().to_glib_none().0)) } } #[cfg(any(feature = "v1_14", feature = "dox"))] fn pop_buffer(&self) -> Option { unsafe { - from_glib_full(ffi::gst_aggregator_pad_pop_buffer(self.as_ref().to_glib_none().0)) + from_glib_full(gst_base_sys::gst_aggregator_pad_pop_buffer(self.as_ref().to_glib_none().0)) } } } diff --git a/gstreamer-base/src/auto/base_sink.rs b/gstreamer-base/src/auto/base_sink.rs index 5b9635f9e..865ff976d 100644 --- a/gstreamer-base/src/auto/base_sink.rs +++ b/gstreamer-base/src/auto/base_sink.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Value; use glib::object::Cast; @@ -10,18 +9,19 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_base_sys; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; glib_wrapper! { - pub struct BaseSink(Object) @extends gst::Element, gst::Object; + pub struct BaseSink(Object) @extends gst::Element, gst::Object; match fn { - get_type => || ffi::gst_base_sink_get_type(), + get_type => || gst_base_sys::gst_base_sink_get_type(), } } @@ -124,85 +124,85 @@ pub trait BaseSinkExt: 'static { impl> BaseSinkExt for O { //fn do_preroll(&self, obj: /*Ignored*/&gst::MiniObject) -> gst::FlowReturn { - // unsafe { TODO: call ffi::gst_base_sink_do_preroll() } + // unsafe { TODO: call gst_base_sys:gst_base_sink_do_preroll() } //} fn get_blocksize(&self) -> u32 { unsafe { - ffi::gst_base_sink_get_blocksize(self.as_ref().to_glib_none().0) + gst_base_sys::gst_base_sink_get_blocksize(self.as_ref().to_glib_none().0) } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn get_drop_out_of_segment(&self) -> bool { unsafe { - from_glib(ffi::gst_base_sink_get_drop_out_of_segment(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_base_sink_get_drop_out_of_segment(self.as_ref().to_glib_none().0)) } } fn get_last_sample(&self) -> Option { unsafe { - from_glib_full(ffi::gst_base_sink_get_last_sample(self.as_ref().to_glib_none().0)) + from_glib_full(gst_base_sys::gst_base_sink_get_last_sample(self.as_ref().to_glib_none().0)) } } fn get_latency(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_base_sink_get_latency(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_base_sink_get_latency(self.as_ref().to_glib_none().0)) } } fn get_max_bitrate(&self) -> u64 { unsafe { - ffi::gst_base_sink_get_max_bitrate(self.as_ref().to_glib_none().0) + gst_base_sys::gst_base_sink_get_max_bitrate(self.as_ref().to_glib_none().0) } } fn get_max_lateness(&self) -> i64 { unsafe { - ffi::gst_base_sink_get_max_lateness(self.as_ref().to_glib_none().0) + gst_base_sys::gst_base_sink_get_max_lateness(self.as_ref().to_glib_none().0) } } fn get_render_delay(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_base_sink_get_render_delay(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_base_sink_get_render_delay(self.as_ref().to_glib_none().0)) } } fn get_sync(&self) -> bool { unsafe { - from_glib(ffi::gst_base_sink_get_sync(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_base_sink_get_sync(self.as_ref().to_glib_none().0)) } } fn get_throttle_time(&self) -> u64 { unsafe { - ffi::gst_base_sink_get_throttle_time(self.as_ref().to_glib_none().0) + gst_base_sys::gst_base_sink_get_throttle_time(self.as_ref().to_glib_none().0) } } fn get_ts_offset(&self) -> gst::ClockTimeDiff { unsafe { - ffi::gst_base_sink_get_ts_offset(self.as_ref().to_glib_none().0) + gst_base_sys::gst_base_sink_get_ts_offset(self.as_ref().to_glib_none().0) } } fn is_async_enabled(&self) -> bool { unsafe { - from_glib(ffi::gst_base_sink_is_async_enabled(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_base_sink_is_async_enabled(self.as_ref().to_glib_none().0)) } } fn is_last_sample_enabled(&self) -> bool { unsafe { - from_glib(ffi::gst_base_sink_is_last_sample_enabled(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_base_sink_is_last_sample_enabled(self.as_ref().to_glib_none().0)) } } fn is_qos_enabled(&self) -> bool { unsafe { - from_glib(ffi::gst_base_sink_is_qos_enabled(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_base_sink_is_qos_enabled(self.as_ref().to_glib_none().0)) } } @@ -212,82 +212,82 @@ impl> BaseSinkExt for O { let mut upstream_live = mem::uninitialized(); let mut min_latency = mem::uninitialized(); let mut max_latency = mem::uninitialized(); - let ret = from_glib(ffi::gst_base_sink_query_latency(self.as_ref().to_glib_none().0, &mut live, &mut upstream_live, &mut min_latency, &mut max_latency)); + let ret = from_glib(gst_base_sys::gst_base_sink_query_latency(self.as_ref().to_glib_none().0, &mut live, &mut upstream_live, &mut min_latency, &mut max_latency)); if ret { Some((from_glib(live), from_glib(upstream_live), from_glib(min_latency), from_glib(max_latency))) } else { None } } } fn set_async_enabled(&self, enabled: bool) { unsafe { - ffi::gst_base_sink_set_async_enabled(self.as_ref().to_glib_none().0, enabled.to_glib()); + gst_base_sys::gst_base_sink_set_async_enabled(self.as_ref().to_glib_none().0, enabled.to_glib()); } } fn set_blocksize(&self, blocksize: u32) { unsafe { - ffi::gst_base_sink_set_blocksize(self.as_ref().to_glib_none().0, blocksize); + gst_base_sys::gst_base_sink_set_blocksize(self.as_ref().to_glib_none().0, blocksize); } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn set_drop_out_of_segment(&self, drop_out_of_segment: bool) { unsafe { - ffi::gst_base_sink_set_drop_out_of_segment(self.as_ref().to_glib_none().0, drop_out_of_segment.to_glib()); + gst_base_sys::gst_base_sink_set_drop_out_of_segment(self.as_ref().to_glib_none().0, drop_out_of_segment.to_glib()); } } fn set_last_sample_enabled(&self, enabled: bool) { unsafe { - ffi::gst_base_sink_set_last_sample_enabled(self.as_ref().to_glib_none().0, enabled.to_glib()); + gst_base_sys::gst_base_sink_set_last_sample_enabled(self.as_ref().to_glib_none().0, enabled.to_glib()); } } fn set_max_bitrate(&self, max_bitrate: u64) { unsafe { - ffi::gst_base_sink_set_max_bitrate(self.as_ref().to_glib_none().0, max_bitrate); + gst_base_sys::gst_base_sink_set_max_bitrate(self.as_ref().to_glib_none().0, max_bitrate); } } fn set_max_lateness(&self, max_lateness: i64) { unsafe { - ffi::gst_base_sink_set_max_lateness(self.as_ref().to_glib_none().0, max_lateness); + gst_base_sys::gst_base_sink_set_max_lateness(self.as_ref().to_glib_none().0, max_lateness); } } fn set_qos_enabled(&self, enabled: bool) { unsafe { - ffi::gst_base_sink_set_qos_enabled(self.as_ref().to_glib_none().0, enabled.to_glib()); + gst_base_sys::gst_base_sink_set_qos_enabled(self.as_ref().to_glib_none().0, enabled.to_glib()); } } fn set_render_delay(&self, delay: gst::ClockTime) { unsafe { - ffi::gst_base_sink_set_render_delay(self.as_ref().to_glib_none().0, delay.to_glib()); + gst_base_sys::gst_base_sink_set_render_delay(self.as_ref().to_glib_none().0, delay.to_glib()); } } fn set_sync(&self, sync: bool) { unsafe { - ffi::gst_base_sink_set_sync(self.as_ref().to_glib_none().0, sync.to_glib()); + gst_base_sys::gst_base_sink_set_sync(self.as_ref().to_glib_none().0, sync.to_glib()); } } fn set_throttle_time(&self, throttle: u64) { unsafe { - ffi::gst_base_sink_set_throttle_time(self.as_ref().to_glib_none().0, throttle); + gst_base_sys::gst_base_sink_set_throttle_time(self.as_ref().to_glib_none().0, throttle); } } fn set_ts_offset(&self, offset: gst::ClockTimeDiff) { unsafe { - ffi::gst_base_sink_set_ts_offset(self.as_ref().to_glib_none().0, offset); + gst_base_sys::gst_base_sink_set_ts_offset(self.as_ref().to_glib_none().0, offset); } } fn wait_clock(&self, time: gst::ClockTime) -> (gst::ClockReturn, gst::ClockTimeDiff) { unsafe { let mut jitter = mem::uninitialized(); - let ret = from_glib(ffi::gst_base_sink_wait_clock(self.as_ref().to_glib_none().0, time.to_glib(), &mut jitter)); + let ret = from_glib(gst_base_sys::gst_base_sink_wait_clock(self.as_ref().to_glib_none().0, time.to_glib(), &mut jitter)); (ret, jitter) } } @@ -295,42 +295,42 @@ impl> BaseSinkExt for O { fn get_property_async(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"async\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"async\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_async(&self, async: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"async\0".as_ptr() as *const _, Value::from(&async).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"async\0".as_ptr() as *const _, Value::from(&async).to_glib_none().0); } } fn get_property_enable_last_sample(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"enable-last-sample\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"enable-last-sample\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_enable_last_sample(&self, enable_last_sample: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"enable-last-sample\0".as_ptr() as *const _, Value::from(&enable_last_sample).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"enable-last-sample\0".as_ptr() as *const _, Value::from(&enable_last_sample).to_glib_none().0); } } fn get_property_qos(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"qos\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_qos(&self, qos: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, Value::from(&qos).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"qos\0".as_ptr() as *const _, Value::from(&qos).to_glib_none().0); } } @@ -423,67 +423,67 @@ impl> BaseSinkExt for O { } } -unsafe extern "C" fn notify_async_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_async_trampoline(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_blocksize_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_blocksize_trampoline(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_enable_last_sample_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_enable_last_sample_trampoline(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_last_sample_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_last_sample_trampoline(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_max_bitrate_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_max_bitrate_trampoline(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_max_lateness_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_max_lateness_trampoline(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_qos_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_qos_trampoline(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_render_delay_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_render_delay_trampoline(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_sync_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_sync_trampoline(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_throttle_time_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_throttle_time_trampoline(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_ts_offset_trampoline(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_ts_offset_trampoline(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSink::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-base/src/auto/base_src.rs b/gstreamer-base/src/auto/base_src.rs index a5fb6742c..b89d28b59 100644 --- a/gstreamer-base/src/auto/base_src.rs +++ b/gstreamer-base/src/auto/base_src.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib; use glib::StaticType; use glib::Value; @@ -11,18 +10,19 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_base_sys; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; glib_wrapper! { - pub struct BaseSrc(Object) @extends gst::Element, gst::Object; + pub struct BaseSrc(Object) @extends gst::Element, gst::Object; match fn { - get_type => || ffi::gst_base_src_get_type(), + get_type => || gst_base_sys::gst_base_src_get_type(), } } @@ -83,42 +83,42 @@ pub trait BaseSrcExt: 'static { impl> BaseSrcExt for O { //fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) { - // unsafe { TODO: call ffi::gst_base_src_get_allocator() } + // unsafe { TODO: call gst_base_sys:gst_base_src_get_allocator() } //} fn get_blocksize(&self) -> u32 { unsafe { - ffi::gst_base_src_get_blocksize(self.as_ref().to_glib_none().0) + gst_base_sys::gst_base_src_get_blocksize(self.as_ref().to_glib_none().0) } } fn get_buffer_pool(&self) -> Option { unsafe { - from_glib_full(ffi::gst_base_src_get_buffer_pool(self.as_ref().to_glib_none().0)) + from_glib_full(gst_base_sys::gst_base_src_get_buffer_pool(self.as_ref().to_glib_none().0)) } } fn get_do_timestamp(&self) -> bool { unsafe { - from_glib(ffi::gst_base_src_get_do_timestamp(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_base_src_get_do_timestamp(self.as_ref().to_glib_none().0)) } } fn is_async(&self) -> bool { unsafe { - from_glib(ffi::gst_base_src_is_async(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_base_src_is_async(self.as_ref().to_glib_none().0)) } } fn is_live(&self) -> bool { unsafe { - from_glib(ffi::gst_base_src_is_live(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_base_src_is_live(self.as_ref().to_glib_none().0)) } } fn new_seamless_segment(&self, start: i64, stop: i64, time: i64) -> bool { unsafe { - from_glib(ffi::gst_base_src_new_seamless_segment(self.as_ref().to_glib_none().0, start, stop, time)) + from_glib(gst_base_sys::gst_base_src_new_seamless_segment(self.as_ref().to_glib_none().0, start, stop, time)) } } @@ -127,84 +127,84 @@ impl> BaseSrcExt for O { let mut live = mem::uninitialized(); let mut min_latency = mem::uninitialized(); let mut max_latency = mem::uninitialized(); - let ret = from_glib(ffi::gst_base_src_query_latency(self.as_ref().to_glib_none().0, &mut live, &mut min_latency, &mut max_latency)); + let ret = from_glib(gst_base_sys::gst_base_src_query_latency(self.as_ref().to_glib_none().0, &mut live, &mut min_latency, &mut max_latency)); if ret { Some((from_glib(live), from_glib(min_latency), from_glib(max_latency))) } else { None } } } fn set_async(&self, async: bool) { unsafe { - ffi::gst_base_src_set_async(self.as_ref().to_glib_none().0, async.to_glib()); + gst_base_sys::gst_base_src_set_async(self.as_ref().to_glib_none().0, async.to_glib()); } } fn set_automatic_eos(&self, automatic_eos: bool) { unsafe { - ffi::gst_base_src_set_automatic_eos(self.as_ref().to_glib_none().0, automatic_eos.to_glib()); + gst_base_sys::gst_base_src_set_automatic_eos(self.as_ref().to_glib_none().0, automatic_eos.to_glib()); } } fn set_blocksize(&self, blocksize: u32) { unsafe { - ffi::gst_base_src_set_blocksize(self.as_ref().to_glib_none().0, blocksize); + gst_base_sys::gst_base_src_set_blocksize(self.as_ref().to_glib_none().0, blocksize); } } fn set_caps(&self, caps: &gst::Caps) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_base_src_set_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0), "Failed to set caps") + glib_result_from_gboolean!(gst_base_sys::gst_base_src_set_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0), "Failed to set caps") } } fn set_do_timestamp(&self, timestamp: bool) { unsafe { - ffi::gst_base_src_set_do_timestamp(self.as_ref().to_glib_none().0, timestamp.to_glib()); + gst_base_sys::gst_base_src_set_do_timestamp(self.as_ref().to_glib_none().0, timestamp.to_glib()); } } fn set_dynamic_size(&self, dynamic: bool) { unsafe { - ffi::gst_base_src_set_dynamic_size(self.as_ref().to_glib_none().0, dynamic.to_glib()); + gst_base_sys::gst_base_src_set_dynamic_size(self.as_ref().to_glib_none().0, dynamic.to_glib()); } } fn set_format(&self, format: gst::Format) { unsafe { - ffi::gst_base_src_set_format(self.as_ref().to_glib_none().0, format.to_glib()); + gst_base_sys::gst_base_src_set_format(self.as_ref().to_glib_none().0, format.to_glib()); } } fn set_live(&self, live: bool) { unsafe { - ffi::gst_base_src_set_live(self.as_ref().to_glib_none().0, live.to_glib()); + gst_base_sys::gst_base_src_set_live(self.as_ref().to_glib_none().0, live.to_glib()); } } fn get_property_num_buffers(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"num-buffers\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"num-buffers\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_num_buffers(&self, num_buffers: i32) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"num-buffers\0".as_ptr() as *const _, Value::from(&num_buffers).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"num-buffers\0".as_ptr() as *const _, Value::from(&num_buffers).to_glib_none().0); } } fn get_property_typefind(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"typefind\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"typefind\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_typefind(&self, typefind: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"typefind\0".as_ptr() as *const _, Value::from(&typefind).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"typefind\0".as_ptr() as *const _, Value::from(&typefind).to_glib_none().0); } } @@ -241,25 +241,25 @@ impl> BaseSrcExt for O { } } -unsafe extern "C" fn notify_blocksize_trampoline(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_blocksize_trampoline(this: *mut gst_base_sys::GstBaseSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSrc::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_do_timestamp_trampoline(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_do_timestamp_trampoline(this: *mut gst_base_sys::GstBaseSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSrc::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_num_buffers_trampoline(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_num_buffers_trampoline(this: *mut gst_base_sys::GstBaseSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSrc::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_typefind_trampoline(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_typefind_trampoline(this: *mut gst_base_sys::GstBaseSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseSrc::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-base/src/auto/base_transform.rs b/gstreamer-base/src/auto/base_transform.rs index e39cc5a62..1e98e086b 100644 --- a/gstreamer-base/src/auto/base_transform.rs +++ b/gstreamer-base/src/auto/base_transform.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib; use glib::StaticType; use glib::Value; @@ -11,17 +10,18 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_base_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct BaseTransform(Object) @extends gst::Element, gst::Object; + pub struct BaseTransform(Object) @extends gst::Element, gst::Object; match fn { - get_type => || ffi::gst_base_transform_get_type(), + get_type => || gst_base_sys::gst_base_transform_get_type(), } } @@ -68,98 +68,98 @@ pub trait BaseTransformExt: 'static { impl> BaseTransformExt for O { //fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) { - // unsafe { TODO: call ffi::gst_base_transform_get_allocator() } + // unsafe { TODO: call gst_base_sys:gst_base_transform_get_allocator() } //} fn get_buffer_pool(&self) -> Option { unsafe { - from_glib_full(ffi::gst_base_transform_get_buffer_pool(self.as_ref().to_glib_none().0)) + from_glib_full(gst_base_sys::gst_base_transform_get_buffer_pool(self.as_ref().to_glib_none().0)) } } fn is_in_place(&self) -> bool { unsafe { - from_glib(ffi::gst_base_transform_is_in_place(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_base_transform_is_in_place(self.as_ref().to_glib_none().0)) } } fn is_passthrough(&self) -> bool { unsafe { - from_glib(ffi::gst_base_transform_is_passthrough(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_base_transform_is_passthrough(self.as_ref().to_glib_none().0)) } } fn is_qos_enabled(&self) -> bool { unsafe { - from_glib(ffi::gst_base_transform_is_qos_enabled(self.as_ref().to_glib_none().0)) + from_glib(gst_base_sys::gst_base_transform_is_qos_enabled(self.as_ref().to_glib_none().0)) } } fn reconfigure_sink(&self) { unsafe { - ffi::gst_base_transform_reconfigure_sink(self.as_ref().to_glib_none().0); + gst_base_sys::gst_base_transform_reconfigure_sink(self.as_ref().to_glib_none().0); } } fn reconfigure_src(&self) { unsafe { - ffi::gst_base_transform_reconfigure_src(self.as_ref().to_glib_none().0); + gst_base_sys::gst_base_transform_reconfigure_src(self.as_ref().to_glib_none().0); } } fn set_gap_aware(&self, gap_aware: bool) { unsafe { - ffi::gst_base_transform_set_gap_aware(self.as_ref().to_glib_none().0, gap_aware.to_glib()); + gst_base_sys::gst_base_transform_set_gap_aware(self.as_ref().to_glib_none().0, gap_aware.to_glib()); } } fn set_in_place(&self, in_place: bool) { unsafe { - ffi::gst_base_transform_set_in_place(self.as_ref().to_glib_none().0, in_place.to_glib()); + gst_base_sys::gst_base_transform_set_in_place(self.as_ref().to_glib_none().0, in_place.to_glib()); } } fn set_passthrough(&self, passthrough: bool) { unsafe { - ffi::gst_base_transform_set_passthrough(self.as_ref().to_glib_none().0, passthrough.to_glib()); + gst_base_sys::gst_base_transform_set_passthrough(self.as_ref().to_glib_none().0, passthrough.to_glib()); } } fn set_prefer_passthrough(&self, prefer_passthrough: bool) { unsafe { - ffi::gst_base_transform_set_prefer_passthrough(self.as_ref().to_glib_none().0, prefer_passthrough.to_glib()); + gst_base_sys::gst_base_transform_set_prefer_passthrough(self.as_ref().to_glib_none().0, prefer_passthrough.to_glib()); } } fn set_qos_enabled(&self, enabled: bool) { unsafe { - ffi::gst_base_transform_set_qos_enabled(self.as_ref().to_glib_none().0, enabled.to_glib()); + gst_base_sys::gst_base_transform_set_qos_enabled(self.as_ref().to_glib_none().0, enabled.to_glib()); } } fn update_qos(&self, proportion: f64, diff: gst::ClockTimeDiff, timestamp: gst::ClockTime) { unsafe { - ffi::gst_base_transform_update_qos(self.as_ref().to_glib_none().0, proportion, diff, timestamp.to_glib()); + gst_base_sys::gst_base_transform_update_qos(self.as_ref().to_glib_none().0, proportion, diff, timestamp.to_glib()); } } fn update_src_caps(&self, updated_caps: &gst::Caps) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_base_transform_update_src_caps(self.as_ref().to_glib_none().0, updated_caps.to_glib_none().0), "Failed to update src caps") + glib_result_from_gboolean!(gst_base_sys::gst_base_transform_update_src_caps(self.as_ref().to_glib_none().0, updated_caps.to_glib_none().0), "Failed to update src caps") } } fn get_property_qos(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"qos\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_qos(&self, qos: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, Value::from(&qos).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"qos\0".as_ptr() as *const _, Value::from(&qos).to_glib_none().0); } } @@ -172,7 +172,7 @@ impl> BaseTransformExt for O { } } -unsafe extern "C" fn notify_qos_trampoline(this: *mut ffi::GstBaseTransform, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_qos_trampoline(this: *mut gst_base_sys::GstBaseTransform, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&BaseTransform::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-base/src/auto/functions.rs b/gstreamer-base/src/auto/functions.rs index c4ceb86ad..88b641e71 100644 --- a/gstreamer-base/src/auto/functions.rs +++ b/gstreamer-base/src/auto/functions.rs @@ -2,43 +2,41 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::object::IsA; use glib::translate::*; use gst; +use gst_base_sys; use std::mem; pub fn type_find_helper>(src: &P, size: u64) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_type_find_helper(src.as_ref().to_glib_none().0, size)) + from_glib_full(gst_base_sys::gst_type_find_helper(src.as_ref().to_glib_none().0, size)) } } -pub fn type_find_helper_for_buffer<'a, P: IsA + 'a, Q: Into>>(obj: Q, buf: &gst::Buffer) -> (Option, gst::TypeFindProbability) { +pub fn type_find_helper_for_buffer>(obj: Option<&P>, buf: &gst::Buffer) -> (Option, gst::TypeFindProbability) { assert_initialized_main_thread!(); - let obj = obj.into(); unsafe { let mut prob = mem::uninitialized(); - let ret = from_glib_full(ffi::gst_type_find_helper_for_buffer(obj.map(|p| p.as_ref()).to_glib_none().0, buf.to_glib_none().0, &mut prob)); + let ret = from_glib_full(gst_base_sys::gst_type_find_helper_for_buffer(obj.map(|p| p.as_ref()).to_glib_none().0, buf.to_glib_none().0, &mut prob)); (ret, from_glib(prob)) } } -pub fn type_find_helper_for_extension<'a, P: IsA + 'a, Q: Into>>(obj: Q, extension: &str) -> Option { +pub fn type_find_helper_for_extension>(obj: Option<&P>, extension: &str) -> Option { assert_initialized_main_thread!(); - let obj = obj.into(); unsafe { - from_glib_full(ffi::gst_type_find_helper_for_extension(obj.map(|p| p.as_ref()).to_glib_none().0, extension.to_glib_none().0)) + from_glib_full(gst_base_sys::gst_type_find_helper_for_extension(obj.map(|p| p.as_ref()).to_glib_none().0, extension.to_glib_none().0)) } } -//pub fn type_find_helper_get_range<'a, P: IsA, Q: IsA + 'a, R: Into>, S: FnMut(&gst::Object, &gst::Object, u64, u32, &gst::Buffer) -> gst::FlowReturn>(obj: &P, parent: R, func: S, size: u64, extension: &str) -> (Option, gst::TypeFindProbability) { -// unsafe { TODO: call ffi::gst_type_find_helper_get_range() } +//pub fn type_find_helper_get_range, Q: IsA, R: FnMut(&gst::Object, &Option, u64, u32, &gst::Buffer) -> gst::FlowReturn>(obj: &P, parent: Option<&Q>, func: R, size: u64, extension: &str) -> (Option, gst::TypeFindProbability) { +// unsafe { TODO: call gst_base_sys:gst_type_find_helper_get_range() } //} //#[cfg(any(feature = "v1_14_3", feature = "dox"))] -//pub fn type_find_helper_get_range_full<'a, 'b, P: IsA, Q: IsA + 'a, R: Into>, S: FnMut(&gst::Object, &gst::Object, u64, u32, &gst::Buffer) -> gst::FlowReturn, T: Into>>(obj: &P, parent: R, func: S, size: u64, extension: T) -> (gst::FlowReturn, gst::Caps, gst::TypeFindProbability) { -// unsafe { TODO: call ffi::gst_type_find_helper_get_range_full() } +//pub fn type_find_helper_get_range_full, Q: IsA, R: FnMut(&gst::Object, &Option, u64, u32, &gst::Buffer) -> gst::FlowReturn>(obj: &P, parent: Option<&Q>, func: R, size: u64, extension: Option<&str>) -> (gst::FlowReturn, gst::Caps, gst::TypeFindProbability) { +// unsafe { TODO: call gst_base_sys:gst_type_find_helper_get_range_full() } //} diff --git a/gstreamer-base/src/auto/push_src.rs b/gstreamer-base/src/auto/push_src.rs index 7729a8c90..6d99c9677 100644 --- a/gstreamer-base/src/auto/push_src.rs +++ b/gstreamer-base/src/auto/push_src.rs @@ -3,15 +3,15 @@ // DO NOT EDIT use BaseSrc; -use ffi; use glib::translate::*; use gst; +use gst_base_sys; glib_wrapper! { - pub struct PushSrc(Object) @extends BaseSrc, gst::Element, gst::Object; + pub struct PushSrc(Object) @extends BaseSrc, gst::Element, gst::Object; match fn { - get_type => || ffi::gst_push_src_get_type(), + get_type => || gst_base_sys::gst_push_src_get_type(), } } diff --git a/gstreamer-base/src/auto/versions.txt b/gstreamer-base/src/auto/versions.txt index b9131200d..a9e0ccc5d 100644 --- a/gstreamer-base/src/auto/versions.txt +++ b/gstreamer-base/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-check/src/auto/test_clock.rs b/gstreamer-check/src/auto/test_clock.rs index 9073ee73d..5f6489d09 100644 --- a/gstreamer-check/src/auto/test_clock.rs +++ b/gstreamer-check/src/auto/test_clock.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Value; use glib::object::Cast; @@ -10,17 +9,18 @@ use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_check_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct TestClock(Object) @extends gst::Clock, gst::Object; + pub struct TestClock(Object) @extends gst::Clock, gst::Object; match fn { - get_type => || ffi::gst_test_clock_get_type(), + get_type => || gst_check_sys::gst_test_clock_get_type(), } } @@ -28,101 +28,101 @@ impl TestClock { pub fn new() -> TestClock { assert_initialized_main_thread!(); unsafe { - gst::Clock::from_glib_full(ffi::gst_test_clock_new()).unsafe_cast() + gst::Clock::from_glib_full(gst_check_sys::gst_test_clock_new()).unsafe_cast() } } pub fn new_with_start_time(start_time: gst::ClockTime) -> TestClock { assert_initialized_main_thread!(); unsafe { - gst::Clock::from_glib_full(ffi::gst_test_clock_new_with_start_time(start_time.to_glib())).unsafe_cast() + gst::Clock::from_glib_full(gst_check_sys::gst_test_clock_new_with_start_time(start_time.to_glib())).unsafe_cast() } } pub fn advance_time(&self, delta: gst::ClockTimeDiff) { unsafe { - ffi::gst_test_clock_advance_time(self.to_glib_none().0, delta); + gst_check_sys::gst_test_clock_advance_time(self.to_glib_none().0, delta); } } pub fn crank(&self) -> bool { unsafe { - from_glib(ffi::gst_test_clock_crank(self.to_glib_none().0)) + from_glib(gst_check_sys::gst_test_clock_crank(self.to_glib_none().0)) } } pub fn get_next_entry_time(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_test_clock_get_next_entry_time(self.to_glib_none().0)) + from_glib(gst_check_sys::gst_test_clock_get_next_entry_time(self.to_glib_none().0)) } } //pub fn has_id(&self, id: /*Ignored*/gst::ClockID) -> bool { - // unsafe { TODO: call ffi::gst_test_clock_has_id() } + // unsafe { TODO: call gst_check_sys:gst_test_clock_has_id() } //} pub fn peek_id_count(&self) -> u32 { unsafe { - ffi::gst_test_clock_peek_id_count(self.to_glib_none().0) + gst_check_sys::gst_test_clock_peek_id_count(self.to_glib_none().0) } } //pub fn peek_next_pending_id(&self, pending_id: /*Ignored*/&mut gst::ClockID) -> bool { - // unsafe { TODO: call ffi::gst_test_clock_peek_next_pending_id() } + // unsafe { TODO: call gst_check_sys:gst_test_clock_peek_next_pending_id() } //} //pub fn process_id_list(&self, pending_list: /*Ignored*/&[&gst::ClockID]) -> u32 { - // unsafe { TODO: call ffi::gst_test_clock_process_id_list() } + // unsafe { TODO: call gst_check_sys:gst_test_clock_process_id_list() } //} //pub fn process_next_clock_id(&self) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_test_clock_process_next_clock_id() } + // unsafe { TODO: call gst_check_sys:gst_test_clock_process_next_clock_id() } //} pub fn set_time(&self, new_time: gst::ClockTime) { unsafe { - ffi::gst_test_clock_set_time(self.to_glib_none().0, new_time.to_glib()); + gst_check_sys::gst_test_clock_set_time(self.to_glib_none().0, new_time.to_glib()); } } //pub fn wait_for_multiple_pending_ids(&self, count: u32, pending_list: /*Unimplemented*/Vec) { - // unsafe { TODO: call ffi::gst_test_clock_wait_for_multiple_pending_ids() } + // unsafe { TODO: call gst_check_sys:gst_test_clock_wait_for_multiple_pending_ids() } //} //pub fn wait_for_next_pending_id(&self, pending_id: /*Ignored*/&mut gst::ClockID) { - // unsafe { TODO: call ffi::gst_test_clock_wait_for_next_pending_id() } + // unsafe { TODO: call gst_check_sys:gst_test_clock_wait_for_next_pending_id() } //} pub fn wait_for_pending_id_count(&self, count: u32) { unsafe { - ffi::gst_test_clock_wait_for_pending_id_count(self.to_glib_none().0, count); + gst_check_sys::gst_test_clock_wait_for_pending_id_count(self.to_glib_none().0, count); } } pub fn get_property_clock_type(&self) -> gst::ClockType { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"clock-type\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"clock-type\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_clock_type(&self, clock_type: gst::ClockType) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"clock-type\0".as_ptr() as *const _, Value::from(&clock_type).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"clock-type\0".as_ptr() as *const _, Value::from(&clock_type).to_glib_none().0); } } pub fn get_property_start_time(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"start-time\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"start-time\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } //pub fn id_list_get_latest_time(pending_list: /*Ignored*/&[&gst::ClockID]) -> gst::ClockTime { - // unsafe { TODO: call ffi::gst_test_clock_id_list_get_latest_time() } + // unsafe { TODO: call gst_check_sys:gst_test_clock_id_list_get_latest_time() } //} pub fn connect_property_clock_type_notify(&self, f: F) -> SignalHandlerId { @@ -143,7 +143,7 @@ impl Default for TestClock { unsafe impl Send for TestClock {} unsafe impl Sync for TestClock {} -unsafe extern "C" fn notify_clock_type_trampoline(this: *mut ffi::GstTestClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_clock_type_trampoline(this: *mut gst_check_sys::GstTestClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer-check/src/auto/versions.txt b/gstreamer-check/src/auto/versions.txt index b9131200d..a9e0ccc5d 100644 --- a/gstreamer-check/src/auto/versions.txt +++ b/gstreamer-check/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-editing-services/src/auto/asset.rs b/gstreamer-editing-services/src/auto/asset.rs index 3d34119ea..3c2ab60ae 100644 --- a/gstreamer-editing-services/src/auto/asset.rs +++ b/gstreamer-editing-services/src/auto/asset.rs @@ -4,11 +4,11 @@ use Error; use Extractable; -use ffi; #[cfg(feature = "futures")] use futures_core; +use ges_sys; use gio; -use gio_ffi; +use gio_sys; use glib; use glib::GString; use glib::Value; @@ -17,17 +17,17 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use std::boxed::Box as Box_; use std::mem::transmute; use std::ptr; glib_wrapper! { - pub struct Asset(Object); + pub struct Asset(Object); match fn { - get_type => || ffi::ges_asset_get_type(), + get_type => || ges_sys::ges_asset_get_type(), } } @@ -35,34 +35,32 @@ impl Asset { pub fn needs_reload(extractable_type: glib::types::Type, id: &str) -> bool { assert_initialized_main_thread!(); unsafe { - from_glib(ffi::ges_asset_needs_reload(extractable_type.to_glib(), id.to_glib_none().0)) + from_glib(ges_sys::ges_asset_needs_reload(extractable_type.to_glib(), id.to_glib_none().0)) } } - pub fn request<'a, P: Into>>(extractable_type: glib::types::Type, id: P) -> Result, Error> { + pub fn request(extractable_type: glib::types::Type, id: Option<&str>) -> Result, Error> { assert_initialized_main_thread!(); - let id = id.into(); unsafe { let mut error = ptr::null_mut(); - let ret = ffi::ges_asset_request(extractable_type.to_glib(), id.to_glib_none().0, &mut error); + let ret = ges_sys::ges_asset_request(extractable_type.to_glib(), id.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } - pub fn request_async<'a, P: IsA + 'a, Q: Into>, R: FnOnce(Result) + Send + 'static>(extractable_type: glib::types::Type, id: &str, cancellable: Q, callback: R) { + pub fn request_async, Q: FnOnce(Result) + Send + 'static>(extractable_type: glib::types::Type, id: &str, cancellable: Option<&P>, callback: Q) { assert_initialized_main_thread!(); - let cancellable = cancellable.into(); - let user_data: Box = Box::new(callback); - unsafe extern "C" fn request_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut gio_ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + let user_data: Box = Box::new(callback); + unsafe extern "C" fn request_async_trampoline) + Send + 'static>(_source_object: *mut gobject_sys::GObject, res: *mut gio_sys::GAsyncResult, user_data: glib_sys::gpointer) { let mut error = ptr::null_mut(); - let ret = ffi::ges_asset_request_finish(res, &mut error); + let ret = ges_sys::ges_asset_request_finish(res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; - let callback: Box = Box::from_raw(user_data as *mut _); + let callback: Box = Box::from_raw(user_data as *mut _); callback(result); } - let callback = request_async_trampoline::; + let callback = request_async_trampoline::; unsafe { - ffi::ges_asset_request_async(extractable_type.to_glib(), id.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, Some(callback), Box::into_raw(user_data) as *mut _); + ges_sys::ges_asset_request_async(extractable_type.to_glib(), id.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, Some(callback), Box::into_raw(user_data) as *mut _); } } @@ -76,12 +74,12 @@ impl Asset { let cancellable = gio::Cancellable::new(); let send = Fragile::new(send); Self::request_async( - extractable_type, - &id, - Some(&cancellable), - move |res| { - let _ = send.into_inner().send(res); - }, + extractable_type, + &id, + Some(&cancellable), + move |res| { + let _ = send.into_inner().send(res); + }, ); cancellable @@ -106,11 +104,11 @@ pub trait AssetExt: 'static { fn list_proxies(&self) -> Vec; - fn set_proxy<'a, P: IsA + 'a, Q: Into>>(&self, proxy: Q) -> Result<(), glib::error::BoolError>; + fn set_proxy>(&self, proxy: Option<&P>) -> Result<(), glib::error::BoolError>; fn unproxy>(&self, proxy: &P) -> Result<(), glib::error::BoolError>; - fn set_property_proxy_target + glib::value::SetValueOptional>(&self, proxy_target: Option<&P>); + fn set_property_proxy_target(&self, proxy_target: Option<&Asset>); fn connect_property_proxy_notify(&self, f: F) -> SignalHandlerId; @@ -121,63 +119,62 @@ impl> AssetExt for O { fn extract(&self) -> Result, Error> { unsafe { let mut error = ptr::null_mut(); - let ret = ffi::ges_asset_extract(self.as_ref().to_glib_none().0, &mut error); + let ret = ges_sys::ges_asset_extract(self.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) } } } fn get_error(&self) -> Option { unsafe { - from_glib_none(ffi::ges_asset_get_error(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_asset_get_error(self.as_ref().to_glib_none().0)) } } fn get_extractable_type(&self) -> glib::types::Type { unsafe { - from_glib(ffi::ges_asset_get_extractable_type(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_asset_get_extractable_type(self.as_ref().to_glib_none().0)) } } fn get_id(&self) -> Option { unsafe { - from_glib_none(ffi::ges_asset_get_id(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_asset_get_id(self.as_ref().to_glib_none().0)) } } fn get_proxy(&self) -> Option { unsafe { - from_glib_none(ffi::ges_asset_get_proxy(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_asset_get_proxy(self.as_ref().to_glib_none().0)) } } fn get_proxy_target(&self) -> Option { unsafe { - from_glib_none(ffi::ges_asset_get_proxy_target(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_asset_get_proxy_target(self.as_ref().to_glib_none().0)) } } fn list_proxies(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::ges_asset_list_proxies(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(ges_sys::ges_asset_list_proxies(self.as_ref().to_glib_none().0)) } } - fn set_proxy<'a, P: IsA + 'a, Q: Into>>(&self, proxy: Q) -> Result<(), glib::error::BoolError> { - let proxy = proxy.into(); + fn set_proxy>(&self, proxy: Option<&P>) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_asset_set_proxy(self.as_ref().to_glib_none().0, proxy.map(|p| p.as_ref()).to_glib_none().0), "Failed to set proxy") + glib_result_from_gboolean!(ges_sys::ges_asset_set_proxy(self.as_ref().to_glib_none().0, proxy.map(|p| p.as_ref()).to_glib_none().0), "Failed to set proxy") } } fn unproxy>(&self, proxy: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_asset_unproxy(self.as_ref().to_glib_none().0, proxy.as_ref().to_glib_none().0), "Failed to unproxy asset") + glib_result_from_gboolean!(ges_sys::ges_asset_unproxy(self.as_ref().to_glib_none().0, proxy.as_ref().to_glib_none().0), "Failed to unproxy asset") } } - fn set_property_proxy_target + glib::value::SetValueOptional>(&self, proxy_target: Option<&P>) { + fn set_property_proxy_target(&self, proxy_target: Option<&Asset>) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"proxy-target\0".as_ptr() as *const _, Value::from(proxy_target).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"proxy-target\0".as_ptr() as *const _, Value::from(proxy_target).to_glib_none().0); } } @@ -198,13 +195,13 @@ impl> AssetExt for O { } } -unsafe extern "C" fn notify_proxy_trampoline(this: *mut ffi::GESAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_proxy_trampoline(this: *mut ges_sys::GESAsset, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Asset::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_proxy_target_trampoline(this: *mut ffi::GESAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_proxy_target_trampoline(this: *mut ges_sys::GESAsset, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Asset::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-editing-services/src/auto/base_effect.rs b/gstreamer-editing-services/src/auto/base_effect.rs index faeb2bffb..2be0c98fa 100644 --- a/gstreamer-editing-services/src/auto/base_effect.rs +++ b/gstreamer-editing-services/src/auto/base_effect.rs @@ -5,14 +5,14 @@ use Extractable; use TimelineElement; use TrackElement; -use ffi; +use ges_sys; use glib::translate::*; glib_wrapper! { - pub struct BaseEffect(Object) @extends TrackElement, TimelineElement, @implements Extractable; + pub struct BaseEffect(Object) @extends TrackElement, TimelineElement, @implements Extractable; match fn { - get_type => || ffi::ges_base_effect_get_type(), + get_type => || ges_sys::ges_base_effect_get_type(), } } diff --git a/gstreamer-editing-services/src/auto/clip.rs b/gstreamer-editing-services/src/auto/clip.rs index 24a3a99a8..911fee06a 100644 --- a/gstreamer-editing-services/src/auto/clip.rs +++ b/gstreamer-editing-services/src/auto/clip.rs @@ -11,22 +11,22 @@ use TimelineElement; use Track; use TrackElement; use TrackType; -use ffi; +use ges_sys; use glib; use glib::object::Cast; use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Clip(Object) @extends Container, TimelineElement, @implements Extractable; + pub struct Clip(Object) @extends Container, TimelineElement, @implements Extractable; match fn { - get_type => || ffi::ges_clip_get_type(), + get_type => || ges_sys::ges_clip_get_type(), } } @@ -35,9 +35,9 @@ pub const NONE_CLIP: Option<&Clip> = None; pub trait ClipExt: 'static { fn add_asset>(&self, asset: &P) -> Option; - fn find_track_element<'a, P: IsA + 'a, Q: Into>>(&self, track: Q, type_: glib::types::Type) -> Option; + fn find_track_element>(&self, track: Option<&P>, type_: glib::types::Type) -> Option; - fn find_track_elements<'a, P: IsA + 'a, Q: Into>>(&self, track: Q, track_type: TrackType, type_: glib::types::Type) -> Vec; + fn find_track_elements>(&self, track: Option<&P>, track_type: TrackType, type_: glib::types::Type) -> Vec; fn get_layer(&self) -> Option; @@ -67,81 +67,79 @@ pub trait ClipExt: 'static { impl> ClipExt for O { fn add_asset>(&self, asset: &P) -> Option { unsafe { - from_glib_none(ffi::ges_clip_add_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_clip_add_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0)) } } - fn find_track_element<'a, P: IsA + 'a, Q: Into>>(&self, track: Q, type_: glib::types::Type) -> Option { - let track = track.into(); + fn find_track_element>(&self, track: Option<&P>, type_: glib::types::Type) -> Option { unsafe { - from_glib_full(ffi::ges_clip_find_track_element(self.as_ref().to_glib_none().0, track.map(|p| p.as_ref()).to_glib_none().0, type_.to_glib())) + from_glib_full(ges_sys::ges_clip_find_track_element(self.as_ref().to_glib_none().0, track.map(|p| p.as_ref()).to_glib_none().0, type_.to_glib())) } } - fn find_track_elements<'a, P: IsA + 'a, Q: Into>>(&self, track: Q, track_type: TrackType, type_: glib::types::Type) -> Vec { - let track = track.into(); + fn find_track_elements>(&self, track: Option<&P>, track_type: TrackType, type_: glib::types::Type) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::ges_clip_find_track_elements(self.as_ref().to_glib_none().0, track.map(|p| p.as_ref()).to_glib_none().0, track_type.to_glib(), type_.to_glib())) + FromGlibPtrContainer::from_glib_full(ges_sys::ges_clip_find_track_elements(self.as_ref().to_glib_none().0, track.map(|p| p.as_ref()).to_glib_none().0, track_type.to_glib(), type_.to_glib())) } } fn get_layer(&self) -> Option { unsafe { - from_glib_full(ffi::ges_clip_get_layer(self.as_ref().to_glib_none().0)) + from_glib_full(ges_sys::ges_clip_get_layer(self.as_ref().to_glib_none().0)) } } fn get_supported_formats(&self) -> TrackType { unsafe { - from_glib(ffi::ges_clip_get_supported_formats(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_clip_get_supported_formats(self.as_ref().to_glib_none().0)) } } fn get_top_effect_index>(&self, effect: &P) -> i32 { unsafe { - ffi::ges_clip_get_top_effect_index(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0) + ges_sys::ges_clip_get_top_effect_index(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0) } } fn get_top_effect_position>(&self, effect: &P) -> i32 { unsafe { - ffi::ges_clip_get_top_effect_position(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0) + ges_sys::ges_clip_get_top_effect_position(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0) } } fn get_top_effects(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::ges_clip_get_top_effects(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(ges_sys::ges_clip_get_top_effects(self.as_ref().to_glib_none().0)) } } fn move_to_layer>(&self, layer: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_clip_move_to_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0), "Failed to move clip to specified layer") + glib_result_from_gboolean!(ges_sys::ges_clip_move_to_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0), "Failed to move clip to specified layer") } } fn set_supported_formats(&self, supportedformats: TrackType) { unsafe { - ffi::ges_clip_set_supported_formats(self.as_ref().to_glib_none().0, supportedformats.to_glib()); + ges_sys::ges_clip_set_supported_formats(self.as_ref().to_glib_none().0, supportedformats.to_glib()); } } fn set_top_effect_index>(&self, effect: &P, newindex: u32) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_clip_set_top_effect_index(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0, newindex), "Failed to move effect") + glib_result_from_gboolean!(ges_sys::ges_clip_set_top_effect_index(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0, newindex), "Failed to move effect") } } fn set_top_effect_priority>(&self, effect: &P, newpriority: u32) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_clip_set_top_effect_priority(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0, newpriority), "Failed to the set top effect priority") + glib_result_from_gboolean!(ges_sys::ges_clip_set_top_effect_priority(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0, newpriority), "Failed to the set top effect priority") } } fn split(&self, position: u64) -> Option { unsafe { - from_glib_none(ffi::ges_clip_split(self.as_ref().to_glib_none().0, position)) + from_glib_none(ges_sys::ges_clip_split(self.as_ref().to_glib_none().0, position)) } } @@ -162,13 +160,13 @@ impl> ClipExt for O { } } -unsafe extern "C" fn notify_layer_trampoline(this: *mut ffi::GESClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_layer_trampoline(this: *mut ges_sys::GESClip, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Clip::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_supported_formats_trampoline(this: *mut ffi::GESClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_supported_formats_trampoline(this: *mut ges_sys::GESClip, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Clip::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-editing-services/src/auto/container.rs b/gstreamer-editing-services/src/auto/container.rs index 0b28eca00..5b0d758f7 100644 --- a/gstreamer-editing-services/src/auto/container.rs +++ b/gstreamer-editing-services/src/auto/container.rs @@ -7,7 +7,7 @@ use EditMode; use Extractable; use Layer; use TimelineElement; -use ffi; +use ges_sys; use glib; use glib::StaticType; use glib::Value; @@ -16,16 +16,16 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Container(Object) @extends TimelineElement, @implements Extractable; + pub struct Container(Object) @extends TimelineElement, @implements Extractable; match fn { - get_type => || ffi::ges_container_get_type(), + get_type => || ges_sys::ges_container_get_type(), } } @@ -33,7 +33,7 @@ impl Container { pub fn group(containers: &[Container]) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::ges_container_group(containers.to_glib_none().0)) + from_glib_none(ges_sys::ges_container_group(containers.to_glib_none().0)) } } } @@ -63,38 +63,38 @@ pub trait GESContainerExt: 'static { impl> GESContainerExt for O { fn add>(&self, child: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_container_add(self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0), "Failed to add element") + glib_result_from_gboolean!(ges_sys::ges_container_add(self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0), "Failed to add element") } } fn edit(&self, layers: &[Layer], new_layer_priority: i32, mode: EditMode, edge: Edge, position: u64) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_container_edit(self.as_ref().to_glib_none().0, layers.to_glib_none().0, new_layer_priority, mode.to_glib(), edge.to_glib(), position), "Failed to edit container") + glib_result_from_gboolean!(ges_sys::ges_container_edit(self.as_ref().to_glib_none().0, layers.to_glib_none().0, new_layer_priority, mode.to_glib(), edge.to_glib(), position), "Failed to edit container") } } fn get_children(&self, recursive: bool) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::ges_container_get_children(self.as_ref().to_glib_none().0, recursive.to_glib())) + FromGlibPtrContainer::from_glib_full(ges_sys::ges_container_get_children(self.as_ref().to_glib_none().0, recursive.to_glib())) } } fn remove>(&self, child: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_container_remove(self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0), "Failed to remove element") + glib_result_from_gboolean!(ges_sys::ges_container_remove(self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0), "Failed to remove element") } } fn ungroup(&self, recursive: bool) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::ges_container_ungroup(self.as_ref().to_glib_full(), recursive.to_glib())) + FromGlibPtrContainer::from_glib_full(ges_sys::ges_container_ungroup(self.as_ref().to_glib_full(), recursive.to_glib())) } } fn get_property_height(&self) -> u32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"height\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"height\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -124,19 +124,19 @@ impl> GESContainerExt for O { } } -unsafe extern "C" fn child_added_trampoline(this: *mut ffi::GESContainer, element: *mut ffi::GESTimelineElement, f: glib_ffi::gpointer) +unsafe extern "C" fn child_added_trampoline(this: *mut ges_sys::GESContainer, element: *mut ges_sys::GESTimelineElement, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Container::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(element)) } -unsafe extern "C" fn child_removed_trampoline(this: *mut ffi::GESContainer, element: *mut ffi::GESTimelineElement, f: glib_ffi::gpointer) +unsafe extern "C" fn child_removed_trampoline(this: *mut ges_sys::GESContainer, element: *mut ges_sys::GESTimelineElement, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Container::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(element)) } -unsafe extern "C" fn notify_height_trampoline(this: *mut ffi::GESContainer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_height_trampoline(this: *mut ges_sys::GESContainer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Container::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-editing-services/src/auto/effect.rs b/gstreamer-editing-services/src/auto/effect.rs index 18030e9df..1c2e6283e 100644 --- a/gstreamer-editing-services/src/auto/effect.rs +++ b/gstreamer-editing-services/src/auto/effect.rs @@ -6,19 +6,19 @@ use BaseEffect; use Extractable; use TimelineElement; use TrackElement; -use ffi; +use ges_sys; use glib::GString; use glib::StaticType; use glib::Value; use glib::object::IsA; use glib::translate::*; -use gobject_ffi; +use gobject_sys; glib_wrapper! { - pub struct Effect(Object) @extends BaseEffect, TrackElement, TimelineElement, @implements Extractable; + pub struct Effect(Object) @extends BaseEffect, TrackElement, TimelineElement, @implements Extractable; match fn { - get_type => || ffi::ges_effect_get_type(), + get_type => || ges_sys::ges_effect_get_type(), } } @@ -26,7 +26,7 @@ impl Effect { pub fn new(bin_description: &str) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::ges_effect_new(bin_description.to_glib_none().0)) + from_glib_none(ges_sys::ges_effect_new(bin_description.to_glib_none().0)) } } } @@ -41,7 +41,7 @@ impl> EffectExt for O { fn get_property_bin_description(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"bin-description\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"bin-description\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } diff --git a/gstreamer-editing-services/src/auto/enums.rs b/gstreamer-editing-services/src/auto/enums.rs index 1193220ba..6a6144a7f 100644 --- a/gstreamer-editing-services/src/auto/enums.rs +++ b/gstreamer-editing-services/src/auto/enums.rs @@ -2,7 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; +use ges_sys; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +10,7 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] @@ -24,21 +24,21 @@ pub enum Edge { #[doc(hidden)] impl ToGlib for Edge { - type GlibType = ffi::GESEdge; + type GlibType = ges_sys::GESEdge; - fn to_glib(&self) -> ffi::GESEdge { + fn to_glib(&self) -> ges_sys::GESEdge { match *self { - Edge::EdgeStart => ffi::GES_EDGE_START, - Edge::EdgeEnd => ffi::GES_EDGE_END, - Edge::EdgeNone => ffi::GES_EDGE_NONE, + Edge::EdgeStart => ges_sys::GES_EDGE_START, + Edge::EdgeEnd => ges_sys::GES_EDGE_END, + Edge::EdgeNone => ges_sys::GES_EDGE_NONE, Edge::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for Edge { - fn from_glib(value: ffi::GESEdge) -> Self { +impl FromGlib for Edge { + fn from_glib(value: ges_sys::GESEdge) -> Self { skip_assert_initialized!(); match value { 0 => Edge::EdgeStart, @@ -51,7 +51,7 @@ impl FromGlib for Edge { impl StaticType for Edge { fn static_type() -> Type { - unsafe { from_glib(ffi::ges_edge_get_type()) } + unsafe { from_glib(ges_sys::ges_edge_get_type()) } } } @@ -63,13 +63,13 @@ impl<'a> FromValueOptional<'a> for Edge { impl<'a> FromValue<'a> for Edge { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for Edge { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -87,23 +87,23 @@ pub enum EditMode { #[doc(hidden)] impl ToGlib for EditMode { - type GlibType = ffi::GESEditMode; + type GlibType = ges_sys::GESEditMode; - fn to_glib(&self) -> ffi::GESEditMode { + fn to_glib(&self) -> ges_sys::GESEditMode { match *self { - EditMode::EditNormal => ffi::GES_EDIT_MODE_NORMAL, - EditMode::EditRipple => ffi::GES_EDIT_MODE_RIPPLE, - EditMode::EditRoll => ffi::GES_EDIT_MODE_ROLL, - EditMode::EditTrim => ffi::GES_EDIT_MODE_TRIM, - EditMode::EditSlide => ffi::GES_EDIT_MODE_SLIDE, + EditMode::EditNormal => ges_sys::GES_EDIT_MODE_NORMAL, + EditMode::EditRipple => ges_sys::GES_EDIT_MODE_RIPPLE, + EditMode::EditRoll => ges_sys::GES_EDIT_MODE_ROLL, + EditMode::EditTrim => ges_sys::GES_EDIT_MODE_TRIM, + EditMode::EditSlide => ges_sys::GES_EDIT_MODE_SLIDE, EditMode::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for EditMode { - fn from_glib(value: ffi::GESEditMode) -> Self { +impl FromGlib for EditMode { + fn from_glib(value: ges_sys::GESEditMode) -> Self { skip_assert_initialized!(); match value { 0 => EditMode::EditNormal, @@ -118,7 +118,7 @@ impl FromGlib for EditMode { impl StaticType for EditMode { fn static_type() -> Type { - unsafe { from_glib(ffi::ges_edit_mode_get_type()) } + unsafe { from_glib(ges_sys::ges_edit_mode_get_type()) } } } @@ -130,13 +130,13 @@ impl<'a> FromValueOptional<'a> for EditMode { impl<'a> FromValue<'a> for EditMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for EditMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-editing-services/src/auto/extractable.rs b/gstreamer-editing-services/src/auto/extractable.rs index 32b6da434..05183a2b2 100644 --- a/gstreamer-editing-services/src/auto/extractable.rs +++ b/gstreamer-editing-services/src/auto/extractable.rs @@ -3,17 +3,17 @@ // DO NOT EDIT use Asset; -use ffi; +use ges_sys; use glib; use glib::GString; use glib::object::IsA; use glib::translate::*; glib_wrapper! { - pub struct Extractable(Interface); + pub struct Extractable(Interface); match fn { - get_type => || ffi::ges_extractable_get_type(), + get_type => || ges_sys::ges_extractable_get_type(), } } @@ -30,19 +30,19 @@ pub trait ExtractableExt: 'static { impl> ExtractableExt for O { fn get_asset(&self) -> Option { unsafe { - from_glib_none(ffi::ges_extractable_get_asset(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_extractable_get_asset(self.as_ref().to_glib_none().0)) } } fn get_id(&self) -> Option { unsafe { - from_glib_full(ffi::ges_extractable_get_id(self.as_ref().to_glib_none().0)) + from_glib_full(ges_sys::ges_extractable_get_id(self.as_ref().to_glib_none().0)) } } fn set_asset>(&self, asset: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_extractable_set_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0), "Failed to set asset") + glib_result_from_gboolean!(ges_sys::ges_extractable_set_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0), "Failed to set asset") } } } diff --git a/gstreamer-editing-services/src/auto/flags.rs b/gstreamer-editing-services/src/auto/flags.rs index 29909f240..c4fe7bddc 100644 --- a/gstreamer-editing-services/src/auto/flags.rs +++ b/gstreamer-editing-services/src/auto/flags.rs @@ -2,7 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; +use ges_sys; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +10,7 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; bitflags! { pub struct PipelineFlags: u32 { @@ -24,16 +24,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for PipelineFlags { - type GlibType = ffi::GESPipelineFlags; + type GlibType = ges_sys::GESPipelineFlags; - fn to_glib(&self) -> ffi::GESPipelineFlags { + fn to_glib(&self) -> ges_sys::GESPipelineFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for PipelineFlags { - fn from_glib(value: ffi::GESPipelineFlags) -> PipelineFlags { +impl FromGlib for PipelineFlags { + fn from_glib(value: ges_sys::GESPipelineFlags) -> PipelineFlags { skip_assert_initialized!(); PipelineFlags::from_bits_truncate(value) } @@ -41,7 +41,7 @@ impl FromGlib for PipelineFlags { impl StaticType for PipelineFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::ges_pipeline_flags_get_type()) } + unsafe { from_glib(ges_sys::ges_pipeline_flags_get_type()) } } } @@ -53,13 +53,13 @@ impl<'a> FromValueOptional<'a> for PipelineFlags { impl<'a> FromValue<'a> for PipelineFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for PipelineFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -75,16 +75,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for TrackType { - type GlibType = ffi::GESTrackType; + type GlibType = ges_sys::GESTrackType; - fn to_glib(&self) -> ffi::GESTrackType { + fn to_glib(&self) -> ges_sys::GESTrackType { self.bits() } } #[doc(hidden)] -impl FromGlib for TrackType { - fn from_glib(value: ffi::GESTrackType) -> TrackType { +impl FromGlib for TrackType { + fn from_glib(value: ges_sys::GESTrackType) -> TrackType { skip_assert_initialized!(); TrackType::from_bits_truncate(value) } @@ -92,7 +92,7 @@ impl FromGlib for TrackType { impl StaticType for TrackType { fn static_type() -> Type { - unsafe { from_glib(ffi::ges_track_type_get_type()) } + unsafe { from_glib(ges_sys::ges_track_type_get_type()) } } } @@ -104,13 +104,13 @@ impl<'a> FromValueOptional<'a> for TrackType { impl<'a> FromValue<'a> for TrackType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for TrackType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-editing-services/src/auto/group.rs b/gstreamer-editing-services/src/auto/group.rs index 8d01cd553..c65294077 100644 --- a/gstreamer-editing-services/src/auto/group.rs +++ b/gstreamer-editing-services/src/auto/group.rs @@ -5,7 +5,7 @@ use Container; use Extractable; use TimelineElement; -use ffi; +use ges_sys; use glib::StaticType; use glib::Value; use glib::object::Cast; @@ -13,16 +13,16 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Group(Object) @extends Container, TimelineElement, @implements Extractable; + pub struct Group(Object) @extends Container, TimelineElement, @implements Extractable; match fn { - get_type => || ffi::ges_group_get_type(), + get_type => || ges_sys::ges_group_get_type(), } } @@ -30,7 +30,7 @@ impl Group { pub fn new() -> Group { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::ges_group_new()) + from_glib_none(ges_sys::ges_group_new()) } } } @@ -79,70 +79,70 @@ impl> GroupExt for O { fn get_property_duration(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_duration(&self, duration: u64) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0); } } fn get_property_in_point(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"in-point\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_in_point(&self, in_point: u64) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, Value::from(&in_point).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"in-point\0".as_ptr() as *const _, Value::from(&in_point).to_glib_none().0); } } fn get_property_max_duration(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"max-duration\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"max-duration\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_max_duration(&self, max_duration: u64) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"max-duration\0".as_ptr() as *const _, Value::from(&max_duration).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"max-duration\0".as_ptr() as *const _, Value::from(&max_duration).to_glib_none().0); } } fn get_property_priority(&self) -> u32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"priority\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"priority\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_priority(&self, priority: u32) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"priority\0".as_ptr() as *const _, Value::from(&priority).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"priority\0".as_ptr() as *const _, Value::from(&priority).to_glib_none().0); } } fn get_property_start(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"start\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_start(&self, start: u64) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start\0".as_ptr() as *const _, Value::from(&start).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"start\0".as_ptr() as *const _, Value::from(&start).to_glib_none().0); } } @@ -187,31 +187,31 @@ impl> GroupExt for O { } } -unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_duration_trampoline(this: *mut ges_sys::GESGroup, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Group::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_in_point_trampoline(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_in_point_trampoline(this: *mut ges_sys::GESGroup, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Group::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_max_duration_trampoline(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_max_duration_trampoline(this: *mut ges_sys::GESGroup, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Group::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_priority_trampoline(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_priority_trampoline(this: *mut ges_sys::GESGroup, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Group::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_start_trampoline(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_start_trampoline(this: *mut ges_sys::GESGroup, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Group::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-editing-services/src/auto/layer.rs b/gstreamer-editing-services/src/auto/layer.rs index bf064ad59..1bff63522 100644 --- a/gstreamer-editing-services/src/auto/layer.rs +++ b/gstreamer-editing-services/src/auto/layer.rs @@ -7,23 +7,23 @@ use Clip; use Extractable; use Timeline; use TrackType; -use ffi; +use ges_sys; use glib; use glib::object::Cast; use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; use gst; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Layer(Object) @implements Extractable; + pub struct Layer(Object) @implements Extractable; match fn { - get_type => || ffi::ges_layer_get_type(), + get_type => || ges_sys::ges_layer_get_type(), } } @@ -31,7 +31,7 @@ impl Layer { pub fn new() -> Layer { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::ges_layer_new()) + from_glib_none(ges_sys::ges_layer_new()) } } } @@ -85,79 +85,79 @@ pub trait LayerExt: 'static { impl> LayerExt for O { fn add_asset>(&self, asset: &P, start: gst::ClockTime, inpoint: gst::ClockTime, duration: gst::ClockTime, track_types: TrackType) -> Option { unsafe { - from_glib_none(ffi::ges_layer_add_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0, start.to_glib(), inpoint.to_glib(), duration.to_glib(), track_types.to_glib())) + from_glib_none(ges_sys::ges_layer_add_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0, start.to_glib(), inpoint.to_glib(), duration.to_glib(), track_types.to_glib())) } } fn add_clip>(&self, clip: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_layer_add_clip(self.as_ref().to_glib_none().0, clip.as_ref().to_glib_none().0), "Failed to add clip") + glib_result_from_gboolean!(ges_sys::ges_layer_add_clip(self.as_ref().to_glib_none().0, clip.as_ref().to_glib_none().0), "Failed to add clip") } } fn get_auto_transition(&self) -> bool { unsafe { - from_glib(ffi::ges_layer_get_auto_transition(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_layer_get_auto_transition(self.as_ref().to_glib_none().0)) } } fn get_clips(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::ges_layer_get_clips(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(ges_sys::ges_layer_get_clips(self.as_ref().to_glib_none().0)) } } fn get_clips_in_interval(&self, start: gst::ClockTime, end: gst::ClockTime) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::ges_layer_get_clips_in_interval(self.as_ref().to_glib_none().0, start.to_glib(), end.to_glib())) + FromGlibPtrContainer::from_glib_full(ges_sys::ges_layer_get_clips_in_interval(self.as_ref().to_glib_none().0, start.to_glib(), end.to_glib())) } } fn get_duration(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::ges_layer_get_duration(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_layer_get_duration(self.as_ref().to_glib_none().0)) } } fn get_priority(&self) -> u32 { unsafe { - ffi::ges_layer_get_priority(self.as_ref().to_glib_none().0) + ges_sys::ges_layer_get_priority(self.as_ref().to_glib_none().0) } } fn get_timeline(&self) -> Option { unsafe { - from_glib_none(ffi::ges_layer_get_timeline(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_layer_get_timeline(self.as_ref().to_glib_none().0)) } } fn is_empty(&self) -> bool { unsafe { - from_glib(ffi::ges_layer_is_empty(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_layer_is_empty(self.as_ref().to_glib_none().0)) } } fn remove_clip>(&self, clip: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_layer_remove_clip(self.as_ref().to_glib_none().0, clip.as_ref().to_glib_none().0), "Failed to remove clip") + glib_result_from_gboolean!(ges_sys::ges_layer_remove_clip(self.as_ref().to_glib_none().0, clip.as_ref().to_glib_none().0), "Failed to remove clip") } } fn set_auto_transition(&self, auto_transition: bool) { unsafe { - ffi::ges_layer_set_auto_transition(self.as_ref().to_glib_none().0, auto_transition.to_glib()); + ges_sys::ges_layer_set_auto_transition(self.as_ref().to_glib_none().0, auto_transition.to_glib()); } } fn set_priority(&self, priority: u32) { unsafe { - ffi::ges_layer_set_priority(self.as_ref().to_glib_none().0, priority); + ges_sys::ges_layer_set_priority(self.as_ref().to_glib_none().0, priority); } } fn set_timeline>(&self, timeline: &P) { unsafe { - ffi::ges_layer_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0); + ges_sys::ges_layer_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0); } } @@ -194,25 +194,25 @@ impl> LayerExt for O { } } -unsafe extern "C" fn clip_added_trampoline(this: *mut ffi::GESLayer, clip: *mut ffi::GESClip, f: glib_ffi::gpointer) +unsafe extern "C" fn clip_added_trampoline(this: *mut ges_sys::GESLayer, clip: *mut ges_sys::GESClip, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Layer::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(clip)) } -unsafe extern "C" fn clip_removed_trampoline(this: *mut ffi::GESLayer, clip: *mut ffi::GESClip, f: glib_ffi::gpointer) +unsafe extern "C" fn clip_removed_trampoline(this: *mut ges_sys::GESLayer, clip: *mut ges_sys::GESClip, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Layer::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(clip)) } -unsafe extern "C" fn notify_auto_transition_trampoline(this: *mut ffi::GESLayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_auto_transition_trampoline(this: *mut ges_sys::GESLayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Layer::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_priority_trampoline(this: *mut ffi::GESLayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_priority_trampoline(this: *mut ges_sys::GESLayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Layer::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-editing-services/src/auto/pipeline.rs b/gstreamer-editing-services/src/auto/pipeline.rs index 0902ef8b0..8ac838f27 100644 --- a/gstreamer-editing-services/src/auto/pipeline.rs +++ b/gstreamer-editing-services/src/auto/pipeline.rs @@ -5,7 +5,7 @@ use Error; use PipelineFlags; use Timeline; -use ffi; +use ges_sys; use glib; use glib::StaticType; use glib::Value; @@ -14,8 +14,8 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; use gst_pbutils; use std::boxed::Box as Box_; @@ -23,10 +23,10 @@ use std::mem::transmute; use std::ptr; glib_wrapper! { - pub struct Pipeline(Object) @extends gst::Pipeline, gst::Element, gst::Object; + pub struct Pipeline(Object) @extends gst::Pipeline, gst::Element, gst::Object; match fn { - get_type => || ffi::ges_pipeline_get_type(), + get_type => || ges_sys::ges_pipeline_get_type(), } } @@ -34,7 +34,7 @@ impl Pipeline { pub fn new() -> Pipeline { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::ges_pipeline_new()) + from_glib_none(ges_sys::ges_pipeline_new()) } } } @@ -72,21 +72,21 @@ pub trait GESPipelineExt: 'static { fn get_property_audio_filter(&self) -> Option; - fn set_property_audio_filter + glib::value::SetValueOptional>(&self, audio_filter: Option<&P>); + fn set_property_audio_filter(&self, audio_filter: Option<&gst::Element>); fn get_property_audio_sink(&self) -> Option; - fn set_property_audio_sink + glib::value::SetValueOptional>(&self, audio_sink: Option<&P>); + fn set_property_audio_sink(&self, audio_sink: Option<&gst::Element>); fn get_property_timeline(&self) -> Option; fn get_property_video_filter(&self) -> Option; - fn set_property_video_filter + glib::value::SetValueOptional>(&self, video_filter: Option<&P>); + fn set_property_video_filter(&self, video_filter: Option<&gst::Element>); fn get_property_video_sink(&self) -> Option; - fn set_property_video_sink + glib::value::SetValueOptional>(&self, video_sink: Option<&P>); + fn set_property_video_sink(&self, video_sink: Option<&gst::Element>); fn connect_property_audio_filter_notify(&self, f: F) -> SignalHandlerId; @@ -104,104 +104,104 @@ pub trait GESPipelineExt: 'static { impl> GESPipelineExt for O { fn get_mode(&self) -> PipelineFlags { unsafe { - from_glib(ffi::ges_pipeline_get_mode(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_pipeline_get_mode(self.as_ref().to_glib_none().0)) } } fn get_thumbnail(&self, caps: &gst::Caps) -> Option { unsafe { - from_glib_full(ffi::ges_pipeline_get_thumbnail(self.as_ref().to_glib_none().0, caps.to_glib_none().0)) + from_glib_full(ges_sys::ges_pipeline_get_thumbnail(self.as_ref().to_glib_none().0, caps.to_glib_none().0)) } } fn get_thumbnail_rgb24(&self, width: i32, height: i32) -> Option { unsafe { - from_glib_full(ffi::ges_pipeline_get_thumbnail_rgb24(self.as_ref().to_glib_none().0, width, height)) + from_glib_full(ges_sys::ges_pipeline_get_thumbnail_rgb24(self.as_ref().to_glib_none().0, width, height)) } } fn preview_get_audio_sink(&self) -> Option { unsafe { - from_glib_full(ffi::ges_pipeline_preview_get_audio_sink(self.as_ref().to_glib_none().0)) + from_glib_full(ges_sys::ges_pipeline_preview_get_audio_sink(self.as_ref().to_glib_none().0)) } } fn preview_get_video_sink(&self) -> Option { unsafe { - from_glib_full(ffi::ges_pipeline_preview_get_video_sink(self.as_ref().to_glib_none().0)) + from_glib_full(ges_sys::ges_pipeline_preview_get_video_sink(self.as_ref().to_glib_none().0)) } } fn preview_set_audio_sink>(&self, sink: &P) { unsafe { - ffi::ges_pipeline_preview_set_audio_sink(self.as_ref().to_glib_none().0, sink.as_ref().to_glib_none().0); + ges_sys::ges_pipeline_preview_set_audio_sink(self.as_ref().to_glib_none().0, sink.as_ref().to_glib_none().0); } } fn preview_set_video_sink>(&self, sink: &P) { unsafe { - ffi::ges_pipeline_preview_set_video_sink(self.as_ref().to_glib_none().0, sink.as_ref().to_glib_none().0); + ges_sys::ges_pipeline_preview_set_video_sink(self.as_ref().to_glib_none().0, sink.as_ref().to_glib_none().0); } } fn save_thumbnail(&self, width: i32, height: i32, format: &str, location: &str) -> Result<(), Error> { unsafe { let mut error = ptr::null_mut(); - let _ = ffi::ges_pipeline_save_thumbnail(self.as_ref().to_glib_none().0, width, height, format.to_glib_none().0, location.to_glib_none().0, &mut error); + let _ = ges_sys::ges_pipeline_save_thumbnail(self.as_ref().to_glib_none().0, width, height, format.to_glib_none().0, location.to_glib_none().0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } fn set_mode(&self, mode: PipelineFlags) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_pipeline_set_mode(self.as_ref().to_glib_none().0, mode.to_glib()), "Failed to set mode") + glib_result_from_gboolean!(ges_sys::ges_pipeline_set_mode(self.as_ref().to_glib_none().0, mode.to_glib()), "Failed to set mode") } } fn set_render_settings>(&self, output_uri: &str, profile: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_pipeline_set_render_settings(self.as_ref().to_glib_none().0, output_uri.to_glib_none().0, profile.as_ref().to_glib_none().0), "Failed to set render settings") + glib_result_from_gboolean!(ges_sys::ges_pipeline_set_render_settings(self.as_ref().to_glib_none().0, output_uri.to_glib_none().0, profile.as_ref().to_glib_none().0), "Failed to set render settings") } } fn set_timeline>(&self, timeline: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_pipeline_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_full()), "Failed to set timeline") + glib_result_from_gboolean!(ges_sys::ges_pipeline_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_full()), "Failed to set timeline") } } fn get_property_audio_filter(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-filter\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"audio-filter\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - fn set_property_audio_filter + glib::value::SetValueOptional>(&self, audio_filter: Option<&P>) { + fn set_property_audio_filter(&self, audio_filter: Option<&gst::Element>) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-filter\0".as_ptr() as *const _, Value::from(audio_filter).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"audio-filter\0".as_ptr() as *const _, Value::from(audio_filter).to_glib_none().0); } } fn get_property_audio_sink(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"audio-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - fn set_property_audio_sink + glib::value::SetValueOptional>(&self, audio_sink: Option<&P>) { + fn set_property_audio_sink(&self, audio_sink: Option<&gst::Element>) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-sink\0".as_ptr() as *const _, Value::from(audio_sink).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"audio-sink\0".as_ptr() as *const _, Value::from(audio_sink).to_glib_none().0); } } fn get_property_timeline(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"timeline\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"timeline\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -209,28 +209,28 @@ impl> GESPipelineExt for O { fn get_property_video_filter(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-filter\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"video-filter\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - fn set_property_video_filter + glib::value::SetValueOptional>(&self, video_filter: Option<&P>) { + fn set_property_video_filter(&self, video_filter: Option<&gst::Element>) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-filter\0".as_ptr() as *const _, Value::from(video_filter).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"video-filter\0".as_ptr() as *const _, Value::from(video_filter).to_glib_none().0); } } fn get_property_video_sink(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"video-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - fn set_property_video_sink + glib::value::SetValueOptional>(&self, video_sink: Option<&P>) { + fn set_property_video_sink(&self, video_sink: Option<&gst::Element>) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-sink\0".as_ptr() as *const _, Value::from(video_sink).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"video-sink\0".as_ptr() as *const _, Value::from(video_sink).to_glib_none().0); } } @@ -283,37 +283,37 @@ impl> GESPipelineExt for O { } } -unsafe extern "C" fn notify_audio_filter_trampoline(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_audio_filter_trampoline(this: *mut ges_sys::GESPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_audio_sink_trampoline(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_audio_sink_trampoline(this: *mut ges_sys::GESPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_mode_trampoline(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_mode_trampoline(this: *mut ges_sys::GESPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_timeline_trampoline(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_timeline_trampoline(this: *mut ges_sys::GESPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_video_filter_trampoline(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_video_filter_trampoline(this: *mut ges_sys::GESPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_video_sink_trampoline(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_video_sink_trampoline(this: *mut ges_sys::GESPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-editing-services/src/auto/project.rs b/gstreamer-editing-services/src/auto/project.rs index c35646f1f..ba532333c 100644 --- a/gstreamer-editing-services/src/auto/project.rs +++ b/gstreamer-editing-services/src/auto/project.rs @@ -5,7 +5,7 @@ use Asset; use Error; use Timeline; -use ffi; +use ges_sys; use glib; use glib::GString; use glib::object::Cast; @@ -13,7 +13,7 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; use gst_pbutils; use libc; use std::boxed::Box as Box_; @@ -21,19 +21,18 @@ use std::mem::transmute; use std::ptr; glib_wrapper! { - pub struct Project(Object) @extends Asset; + pub struct Project(Object) @extends Asset; match fn { - get_type => || ffi::ges_project_get_type(), + get_type => || ges_sys::ges_project_get_type(), } } impl Project { - pub fn new<'a, P: Into>>(uri: P) -> Project { + pub fn new(uri: Option<&str>) -> Project { assert_initialized_main_thread!(); - let uri = uri.into(); unsafe { - from_glib_full(ffi::ges_project_new(uri.to_glib_none().0)) + from_glib_full(ges_sys::ges_project_new(uri.to_glib_none().0)) } } } @@ -45,9 +44,9 @@ pub trait ProjectExt: 'static { fn add_encoding_profile>(&self, profile: &P) -> Result<(), glib::error::BoolError>; - fn create_asset<'a, P: Into>>(&self, id: P, extractable_type: glib::types::Type) -> bool; + fn create_asset(&self, id: Option<&str>, extractable_type: glib::types::Type) -> bool; - fn create_asset_sync<'a, P: Into>>(&self, id: P, extractable_type: glib::types::Type) -> Result, Error>; + fn create_asset_sync(&self, id: Option<&str>, extractable_type: glib::types::Type) -> Result, Error>; fn get_asset(&self, id: &str, extractable_type: glib::types::Type) -> Option; @@ -63,7 +62,7 @@ pub trait ProjectExt: 'static { fn remove_asset>(&self, asset: &P) -> Result<(), glib::error::BoolError>; - fn save<'a, P: IsA, Q: IsA + 'a, R: Into>>(&self, timeline: &P, uri: &str, formatter_asset: R, overwrite: bool) -> Result<(), Error>; + fn save, Q: IsA>(&self, timeline: &P, uri: &str, formatter_asset: Option<&Q>, overwrite: bool) -> Result<(), Error>; fn connect_asset_added(&self, f: F) -> SignalHandlerId; @@ -81,81 +80,78 @@ pub trait ProjectExt: 'static { impl> ProjectExt for O { fn add_asset>(&self, asset: &P) -> bool { unsafe { - from_glib(ffi::ges_project_add_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_project_add_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0)) } } fn add_encoding_profile>(&self, profile: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_project_add_encoding_profile(self.as_ref().to_glib_none().0, profile.as_ref().to_glib_none().0), "Failed to add profile") + glib_result_from_gboolean!(ges_sys::ges_project_add_encoding_profile(self.as_ref().to_glib_none().0, profile.as_ref().to_glib_none().0), "Failed to add profile") } } - fn create_asset<'a, P: Into>>(&self, id: P, extractable_type: glib::types::Type) -> bool { - let id = id.into(); + fn create_asset(&self, id: Option<&str>, extractable_type: glib::types::Type) -> bool { unsafe { - from_glib(ffi::ges_project_create_asset(self.as_ref().to_glib_none().0, id.to_glib_none().0, extractable_type.to_glib())) + from_glib(ges_sys::ges_project_create_asset(self.as_ref().to_glib_none().0, id.to_glib_none().0, extractable_type.to_glib())) } } - fn create_asset_sync<'a, P: Into>>(&self, id: P, extractable_type: glib::types::Type) -> Result, Error> { - let id = id.into(); + fn create_asset_sync(&self, id: Option<&str>, extractable_type: glib::types::Type) -> Result, Error> { unsafe { let mut error = ptr::null_mut(); - let ret = ffi::ges_project_create_asset_sync(self.as_ref().to_glib_none().0, id.to_glib_none().0, extractable_type.to_glib(), &mut error); + let ret = ges_sys::ges_project_create_asset_sync(self.as_ref().to_glib_none().0, id.to_glib_none().0, extractable_type.to_glib(), &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } fn get_asset(&self, id: &str, extractable_type: glib::types::Type) -> Option { unsafe { - from_glib_full(ffi::ges_project_get_asset(self.as_ref().to_glib_none().0, id.to_glib_none().0, extractable_type.to_glib())) + from_glib_full(ges_sys::ges_project_get_asset(self.as_ref().to_glib_none().0, id.to_glib_none().0, extractable_type.to_glib())) } } fn get_loading_assets(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::ges_project_get_loading_assets(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(ges_sys::ges_project_get_loading_assets(self.as_ref().to_glib_none().0)) } } fn get_uri(&self) -> Option { unsafe { - from_glib_full(ffi::ges_project_get_uri(self.as_ref().to_glib_none().0)) + from_glib_full(ges_sys::ges_project_get_uri(self.as_ref().to_glib_none().0)) } } fn list_assets(&self, filter: glib::types::Type) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::ges_project_list_assets(self.as_ref().to_glib_none().0, filter.to_glib())) + FromGlibPtrContainer::from_glib_full(ges_sys::ges_project_list_assets(self.as_ref().to_glib_none().0, filter.to_glib())) } } fn list_encoding_profiles(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::ges_project_list_encoding_profiles(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(ges_sys::ges_project_list_encoding_profiles(self.as_ref().to_glib_none().0)) } } fn load>(&self, timeline: &P) -> Result<(), Error> { unsafe { let mut error = ptr::null_mut(); - let _ = ffi::ges_project_load(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0, &mut error); + let _ = ges_sys::ges_project_load(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } fn remove_asset>(&self, asset: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_project_remove_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0), "Failed to remove asset") + glib_result_from_gboolean!(ges_sys::ges_project_remove_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0), "Failed to remove asset") } } - fn save<'a, P: IsA, Q: IsA + 'a, R: Into>>(&self, timeline: &P, uri: &str, formatter_asset: R, overwrite: bool) -> Result<(), Error> { - let formatter_asset = formatter_asset.into(); + fn save, Q: IsA>(&self, timeline: &P, uri: &str, formatter_asset: Option<&Q>, overwrite: bool) -> Result<(), Error> { unsafe { let mut error = ptr::null_mut(); - let _ = ffi::ges_project_save(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0, uri.to_glib_none().0, formatter_asset.map(|p| p.as_ref()).to_glib_none().0, overwrite.to_glib(), &mut error); + let _ = ges_sys::ges_project_save(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0, uri.to_glib_none().0, formatter_asset.map(|p| p.as_ref()).to_glib_none().0, overwrite.to_glib(), &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } @@ -209,37 +205,37 @@ impl> ProjectExt for O { } } -unsafe extern "C" fn asset_added_trampoline(this: *mut ffi::GESProject, asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) +unsafe extern "C" fn asset_added_trampoline(this: *mut ges_sys::GESProject, asset: *mut ges_sys::GESAsset, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(asset)) } -unsafe extern "C" fn asset_loading_trampoline(this: *mut ffi::GESProject, asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) +unsafe extern "C" fn asset_loading_trampoline(this: *mut ges_sys::GESProject, asset: *mut ges_sys::GESAsset, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(asset)) } -unsafe extern "C" fn asset_removed_trampoline(this: *mut ffi::GESProject, asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) +unsafe extern "C" fn asset_removed_trampoline(this: *mut ges_sys::GESProject, asset: *mut ges_sys::GESAsset, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(asset)) } -unsafe extern "C" fn error_loading_asset_trampoline(this: *mut ffi::GESProject, error: *mut glib_ffi::GError, id: *mut libc::c_char, extractable_type: glib_ffi::GType, f: glib_ffi::gpointer) +unsafe extern "C" fn error_loading_asset_trampoline(this: *mut ges_sys::GESProject, error: *mut glib_sys::GError, id: *mut libc::c_char, extractable_type: glib_sys::GType, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(error), &GString::from_glib_borrow(id), from_glib(extractable_type)) } -unsafe extern "C" fn loaded_trampoline(this: *mut ffi::GESProject, timeline: *mut ffi::GESTimeline, f: glib_ffi::gpointer) +unsafe extern "C" fn loaded_trampoline(this: *mut ges_sys::GESProject, timeline: *mut ges_sys::GESTimeline, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(timeline)) } -unsafe extern "C" fn missing_uri_trampoline Option + 'static>(this: *mut ffi::GESProject, error: *mut glib_ffi::GError, wrong_asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) -> *mut libc::c_char +unsafe extern "C" fn missing_uri_trampoline Option + 'static>(this: *mut ges_sys::GESProject, error: *mut glib_sys::GError, wrong_asset: *mut ges_sys::GESAsset, f: glib_sys::gpointer) -> *mut libc::c_char where P: IsA { let f: &F = &*(f as *const F); f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(error), &from_glib_borrow(wrong_asset)).to_glib_full() diff --git a/gstreamer-editing-services/src/auto/timeline.rs b/gstreamer-editing-services/src/auto/timeline.rs index 5546500df..d7af97d08 100644 --- a/gstreamer-editing-services/src/auto/timeline.rs +++ b/gstreamer-editing-services/src/auto/timeline.rs @@ -10,24 +10,24 @@ use Layer; use TimelineElement; use Track; use TrackElement; -use ffi; +use ges_sys; use glib; use glib::object::Cast; use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; use gst; use std::boxed::Box as Box_; use std::mem::transmute; use std::ptr; glib_wrapper! { - pub struct Timeline(Object) @extends gst::Element, gst::Object, @implements Extractable; + pub struct Timeline(Object) @extends gst::Element, gst::Object, @implements Extractable; match fn { - get_type => || ffi::ges_timeline_get_type(), + get_type => || ges_sys::ges_timeline_get_type(), } } @@ -35,14 +35,14 @@ impl Timeline { pub fn new() -> Timeline { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::ges_timeline_new()) + from_glib_none(ges_sys::ges_timeline_new()) } } pub fn new_audio_video() -> Timeline { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::ges_timeline_new_audio_video()) + from_glib_none(ges_sys::ges_timeline_new_audio_video()) } } @@ -50,7 +50,7 @@ impl Timeline { assert_initialized_main_thread!(); unsafe { let mut error = ptr::null_mut(); - let ret = ffi::ges_timeline_new_from_uri(uri.to_glib_none().0, &mut error); + let ret = ges_sys::ges_timeline_new_from_uri(uri.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) } } } @@ -107,7 +107,7 @@ pub trait TimelineExt: 'static { fn remove_track>(&self, track: &P) -> Result<(), glib::error::BoolError>; - fn save_to_uri<'a, P: IsA + 'a, Q: Into>>(&self, uri: &str, formatter_asset: Q, overwrite: bool) -> Result<(), Error>; + fn save_to_uri>(&self, uri: &str, formatter_asset: Option<&P>, overwrite: bool) -> Result<(), Error>; fn set_auto_transition(&self, auto_transition: bool); @@ -143,150 +143,149 @@ pub trait TimelineExt: 'static { impl> TimelineExt for O { fn add_layer>(&self, layer: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_timeline_add_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0), "Failed to add layer") + glib_result_from_gboolean!(ges_sys::ges_timeline_add_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0), "Failed to add layer") } } fn add_track>(&self, track: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_timeline_add_track(self.as_ref().to_glib_none().0, track.as_ref().to_glib_full()), "Failed to add track") + glib_result_from_gboolean!(ges_sys::ges_timeline_add_track(self.as_ref().to_glib_none().0, track.as_ref().to_glib_full()), "Failed to add track") } } fn append_layer(&self) -> Layer { unsafe { - from_glib_none(ffi::ges_timeline_append_layer(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_timeline_append_layer(self.as_ref().to_glib_none().0)) } } fn commit(&self) -> bool { unsafe { - from_glib(ffi::ges_timeline_commit(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_timeline_commit(self.as_ref().to_glib_none().0)) } } fn commit_sync(&self) -> bool { unsafe { - from_glib(ffi::ges_timeline_commit_sync(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_timeline_commit_sync(self.as_ref().to_glib_none().0)) } } fn get_auto_transition(&self) -> bool { unsafe { - from_glib(ffi::ges_timeline_get_auto_transition(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_timeline_get_auto_transition(self.as_ref().to_glib_none().0)) } } fn get_duration(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::ges_timeline_get_duration(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_timeline_get_duration(self.as_ref().to_glib_none().0)) } } fn get_element(&self, name: &str) -> Option { unsafe { - from_glib_full(ffi::ges_timeline_get_element(self.as_ref().to_glib_none().0, name.to_glib_none().0)) + from_glib_full(ges_sys::ges_timeline_get_element(self.as_ref().to_glib_none().0, name.to_glib_none().0)) } } fn get_groups(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::ges_timeline_get_groups(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(ges_sys::ges_timeline_get_groups(self.as_ref().to_glib_none().0)) } } fn get_layer(&self, priority: u32) -> Option { unsafe { - from_glib_full(ffi::ges_timeline_get_layer(self.as_ref().to_glib_none().0, priority)) + from_glib_full(ges_sys::ges_timeline_get_layer(self.as_ref().to_glib_none().0, priority)) } } fn get_layers(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::ges_timeline_get_layers(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(ges_sys::ges_timeline_get_layers(self.as_ref().to_glib_none().0)) } } fn get_pad_for_track>(&self, track: &P) -> Option { unsafe { - from_glib_none(ffi::ges_timeline_get_pad_for_track(self.as_ref().to_glib_none().0, track.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_timeline_get_pad_for_track(self.as_ref().to_glib_none().0, track.as_ref().to_glib_none().0)) } } fn get_snapping_distance(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::ges_timeline_get_snapping_distance(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_timeline_get_snapping_distance(self.as_ref().to_glib_none().0)) } } fn get_track_for_pad>(&self, pad: &P) -> Option { unsafe { - from_glib_none(ffi::ges_timeline_get_track_for_pad(self.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_timeline_get_track_for_pad(self.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0)) } } fn get_tracks(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::ges_timeline_get_tracks(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(ges_sys::ges_timeline_get_tracks(self.as_ref().to_glib_none().0)) } } fn is_empty(&self) -> bool { unsafe { - from_glib(ffi::ges_timeline_is_empty(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_timeline_is_empty(self.as_ref().to_glib_none().0)) } } fn load_from_uri(&self, uri: &str) -> Result<(), Error> { unsafe { let mut error = ptr::null_mut(); - let _ = ffi::ges_timeline_load_from_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0, &mut error); + let _ = ges_sys::ges_timeline_load_from_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } fn move_layer>(&self, layer: &P, new_layer_priority: u32) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_timeline_move_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0, new_layer_priority), "Failed to move layer") + glib_result_from_gboolean!(ges_sys::ges_timeline_move_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0, new_layer_priority), "Failed to move layer") } } fn paste_element>(&self, element: &P, position: gst::ClockTime, layer_priority: i32) -> Option { unsafe { - from_glib_none(ffi::ges_timeline_paste_element(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0, position.to_glib(), layer_priority)) + from_glib_none(ges_sys::ges_timeline_paste_element(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0, position.to_glib(), layer_priority)) } } fn remove_layer>(&self, layer: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_timeline_remove_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0), "Failed to remove layer") + glib_result_from_gboolean!(ges_sys::ges_timeline_remove_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0), "Failed to remove layer") } } fn remove_track>(&self, track: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_timeline_remove_track(self.as_ref().to_glib_none().0, track.as_ref().to_glib_none().0), "Failed to remove track") + glib_result_from_gboolean!(ges_sys::ges_timeline_remove_track(self.as_ref().to_glib_none().0, track.as_ref().to_glib_none().0), "Failed to remove track") } } - fn save_to_uri<'a, P: IsA + 'a, Q: Into>>(&self, uri: &str, formatter_asset: Q, overwrite: bool) -> Result<(), Error> { - let formatter_asset = formatter_asset.into(); + fn save_to_uri>(&self, uri: &str, formatter_asset: Option<&P>, overwrite: bool) -> Result<(), Error> { unsafe { let mut error = ptr::null_mut(); - let _ = ffi::ges_timeline_save_to_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0, formatter_asset.map(|p| p.as_ref()).to_glib_none().0, overwrite.to_glib(), &mut error); + let _ = ges_sys::ges_timeline_save_to_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0, formatter_asset.map(|p| p.as_ref()).to_glib_none().0, overwrite.to_glib(), &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } fn set_auto_transition(&self, auto_transition: bool) { unsafe { - ffi::ges_timeline_set_auto_transition(self.as_ref().to_glib_none().0, auto_transition.to_glib()); + ges_sys::ges_timeline_set_auto_transition(self.as_ref().to_glib_none().0, auto_transition.to_glib()); } } fn set_snapping_distance(&self, snapping_distance: gst::ClockTime) { unsafe { - ffi::ges_timeline_set_snapping_distance(self.as_ref().to_glib_none().0, snapping_distance.to_glib()); + ges_sys::ges_timeline_set_snapping_distance(self.as_ref().to_glib_none().0, snapping_distance.to_glib()); } } @@ -387,67 +386,67 @@ impl> TimelineExt for O { } } -unsafe extern "C" fn commited_trampoline(this: *mut ffi::GESTimeline, f: glib_ffi::gpointer) +unsafe extern "C" fn commited_trampoline(this: *mut ges_sys::GESTimeline, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Timeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn group_added_trampoline(this: *mut ffi::GESTimeline, group: *mut ffi::GESGroup, f: glib_ffi::gpointer) +unsafe extern "C" fn group_added_trampoline(this: *mut ges_sys::GESTimeline, group: *mut ges_sys::GESGroup, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(group)) } -unsafe extern "C" fn layer_added_trampoline(this: *mut ffi::GESTimeline, layer: *mut ffi::GESLayer, f: glib_ffi::gpointer) +unsafe extern "C" fn layer_added_trampoline(this: *mut ges_sys::GESTimeline, layer: *mut ges_sys::GESLayer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(layer)) } -unsafe extern "C" fn layer_removed_trampoline(this: *mut ffi::GESTimeline, layer: *mut ffi::GESLayer, f: glib_ffi::gpointer) +unsafe extern "C" fn layer_removed_trampoline(this: *mut ges_sys::GESTimeline, layer: *mut ges_sys::GESLayer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(layer)) } -unsafe extern "C" fn snapping_ended_trampoline(this: *mut ffi::GESTimeline, object: *mut ffi::GESTrackElement, p0: *mut ffi::GESTrackElement, p1: u64, f: glib_ffi::gpointer) +unsafe extern "C" fn snapping_ended_trampoline(this: *mut ges_sys::GESTimeline, object: *mut ges_sys::GESTrackElement, p0: *mut ges_sys::GESTrackElement, p1: u64, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object), &from_glib_borrow(p0), p1) } -unsafe extern "C" fn snapping_started_trampoline(this: *mut ffi::GESTimeline, object: *mut ffi::GESTrackElement, p0: *mut ffi::GESTrackElement, p1: u64, f: glib_ffi::gpointer) +unsafe extern "C" fn snapping_started_trampoline(this: *mut ges_sys::GESTimeline, object: *mut ges_sys::GESTrackElement, p0: *mut ges_sys::GESTrackElement, p1: u64, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object), &from_glib_borrow(p0), p1) } -unsafe extern "C" fn track_added_trampoline(this: *mut ffi::GESTimeline, track: *mut ffi::GESTrack, f: glib_ffi::gpointer) +unsafe extern "C" fn track_added_trampoline(this: *mut ges_sys::GESTimeline, track: *mut ges_sys::GESTrack, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(track)) } -unsafe extern "C" fn track_removed_trampoline(this: *mut ffi::GESTimeline, track: *mut ffi::GESTrack, f: glib_ffi::gpointer) +unsafe extern "C" fn track_removed_trampoline(this: *mut ges_sys::GESTimeline, track: *mut ges_sys::GESTrack, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(track)) } -unsafe extern "C" fn notify_auto_transition_trampoline(this: *mut ffi::GESTimeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_auto_transition_trampoline(this: *mut ges_sys::GESTimeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Timeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GESTimeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_duration_trampoline(this: *mut ges_sys::GESTimeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Timeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_snapping_distance_trampoline(this: *mut ffi::GESTimeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_snapping_distance_trampoline(this: *mut ges_sys::GESTimeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Timeline::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-editing-services/src/auto/timeline_element.rs b/gstreamer-editing-services/src/auto/timeline_element.rs index 94ea2eda9..4205240f1 100644 --- a/gstreamer-editing-services/src/auto/timeline_element.rs +++ b/gstreamer-editing-services/src/auto/timeline_element.rs @@ -5,7 +5,7 @@ use Extractable; use Timeline; use TrackType; -use ffi; +use ges_sys; use glib; use glib::GString; use glib::StaticType; @@ -15,17 +15,17 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct TimelineElement(Object) @implements Extractable; + pub struct TimelineElement(Object) @implements Extractable; match fn { - get_type => || ffi::ges_timeline_element_get_type(), + get_type => || ges_sys::ges_timeline_element_get_type(), } } @@ -94,7 +94,7 @@ pub trait TimelineElementExt: 'static { fn set_max_duration(&self, maxduration: gst::ClockTime); - fn set_name<'a, P: Into>>(&self, name: P) -> Result<(), glib::error::BoolError>; + fn set_name(&self, name: Option<&str>) -> Result<(), glib::error::BoolError>; fn set_parent>(&self, parent: &P) -> Result<(), glib::error::BoolError>; @@ -137,229 +137,228 @@ pub trait TimelineElementExt: 'static { impl> TimelineElementExt for O { //fn add_child_property>(&self, pspec: /*Ignored*/&glib::ParamSpec, child: &P) -> bool { - // unsafe { TODO: call ffi::ges_timeline_element_add_child_property() } + // unsafe { TODO: call ges_sys:ges_timeline_element_add_child_property() } //} fn copy(&self, deep: bool) -> Option { unsafe { - from_glib_none(ffi::ges_timeline_element_copy(self.as_ref().to_glib_none().0, deep.to_glib())) + from_glib_none(ges_sys::ges_timeline_element_copy(self.as_ref().to_glib_none().0, deep.to_glib())) } } //fn get_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { - // unsafe { TODO: call ffi::ges_timeline_element_get_child_properties() } + // unsafe { TODO: call ges_sys:ges_timeline_element_get_child_properties() } //} //fn get_child_property(&self, property_name: &str, value: /*Ignored*/glib::Value) -> bool { - // unsafe { TODO: call ffi::ges_timeline_element_get_child_property() } + // unsafe { TODO: call ges_sys:ges_timeline_element_get_child_property() } //} //fn get_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/glib::Value) { - // unsafe { TODO: call ffi::ges_timeline_element_get_child_property_by_pspec() } + // unsafe { TODO: call ges_sys:ges_timeline_element_get_child_property_by_pspec() } //} //fn get_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { - // unsafe { TODO: call ffi::ges_timeline_element_get_child_property_valist() } + // unsafe { TODO: call ges_sys:ges_timeline_element_get_child_property_valist() } //} fn get_duration(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::ges_timeline_element_get_duration(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_timeline_element_get_duration(self.as_ref().to_glib_none().0)) } } fn get_inpoint(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::ges_timeline_element_get_inpoint(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_timeline_element_get_inpoint(self.as_ref().to_glib_none().0)) } } fn get_max_duration(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::ges_timeline_element_get_max_duration(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_timeline_element_get_max_duration(self.as_ref().to_glib_none().0)) } } fn get_name(&self) -> Option { unsafe { - from_glib_full(ffi::ges_timeline_element_get_name(self.as_ref().to_glib_none().0)) + from_glib_full(ges_sys::ges_timeline_element_get_name(self.as_ref().to_glib_none().0)) } } fn get_parent(&self) -> Option { unsafe { - from_glib_full(ffi::ges_timeline_element_get_parent(self.as_ref().to_glib_none().0)) + from_glib_full(ges_sys::ges_timeline_element_get_parent(self.as_ref().to_glib_none().0)) } } fn get_priority(&self) -> u32 { unsafe { - ffi::ges_timeline_element_get_priority(self.as_ref().to_glib_none().0) + ges_sys::ges_timeline_element_get_priority(self.as_ref().to_glib_none().0) } } fn get_start(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::ges_timeline_element_get_start(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_timeline_element_get_start(self.as_ref().to_glib_none().0)) } } fn get_timeline(&self) -> Option { unsafe { - from_glib_full(ffi::ges_timeline_element_get_timeline(self.as_ref().to_glib_none().0)) + from_glib_full(ges_sys::ges_timeline_element_get_timeline(self.as_ref().to_glib_none().0)) } } fn get_toplevel_parent(&self) -> Option { unsafe { - from_glib_full(ffi::ges_timeline_element_get_toplevel_parent(self.as_ref().to_glib_none().0)) + from_glib_full(ges_sys::ges_timeline_element_get_toplevel_parent(self.as_ref().to_glib_none().0)) } } fn get_track_types(&self) -> TrackType { unsafe { - from_glib(ffi::ges_timeline_element_get_track_types(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_timeline_element_get_track_types(self.as_ref().to_glib_none().0)) } } //fn list_children_properties(&self) -> /*Ignored*/Vec { - // unsafe { TODO: call ffi::ges_timeline_element_list_children_properties() } + // unsafe { TODO: call ges_sys:ges_timeline_element_list_children_properties() } //} //fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option { - // unsafe { TODO: call ffi::ges_timeline_element_lookup_child() } + // unsafe { TODO: call ges_sys:ges_timeline_element_lookup_child() } //} fn paste(&self, paste_position: gst::ClockTime) -> Option { unsafe { - from_glib_none(ffi::ges_timeline_element_paste(self.as_ref().to_glib_none().0, paste_position.to_glib())) + from_glib_none(ges_sys::ges_timeline_element_paste(self.as_ref().to_glib_none().0, paste_position.to_glib())) } } //fn remove_child_property(&self, pspec: /*Ignored*/&glib::ParamSpec) -> bool { - // unsafe { TODO: call ffi::ges_timeline_element_remove_child_property() } + // unsafe { TODO: call ges_sys:ges_timeline_element_remove_child_property() } //} fn ripple(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_timeline_element_ripple(self.as_ref().to_glib_none().0, start.to_glib()), "Failed to ripple") + glib_result_from_gboolean!(ges_sys::ges_timeline_element_ripple(self.as_ref().to_glib_none().0, start.to_glib()), "Failed to ripple") } } fn ripple_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_timeline_element_ripple_end(self.as_ref().to_glib_none().0, end.to_glib()), "Failed to ripple") + glib_result_from_gboolean!(ges_sys::ges_timeline_element_ripple_end(self.as_ref().to_glib_none().0, end.to_glib()), "Failed to ripple") } } fn roll_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_timeline_element_roll_end(self.as_ref().to_glib_none().0, end.to_glib()), "Failed to roll") + glib_result_from_gboolean!(ges_sys::ges_timeline_element_roll_end(self.as_ref().to_glib_none().0, end.to_glib()), "Failed to roll") } } fn roll_start(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_timeline_element_roll_start(self.as_ref().to_glib_none().0, start.to_glib()), "Failed to roll") + glib_result_from_gboolean!(ges_sys::ges_timeline_element_roll_start(self.as_ref().to_glib_none().0, start.to_glib()), "Failed to roll") } } //fn set_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { - // unsafe { TODO: call ffi::ges_timeline_element_set_child_properties() } + // unsafe { TODO: call ges_sys:ges_timeline_element_set_child_properties() } //} //fn set_child_property(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> bool { - // unsafe { TODO: call ffi::ges_timeline_element_set_child_property() } + // unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property() } //} //fn set_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/&glib::Value) { - // unsafe { TODO: call ffi::ges_timeline_element_set_child_property_by_pspec() } + // unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property_by_pspec() } //} //fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { - // unsafe { TODO: call ffi::ges_timeline_element_set_child_property_valist() } + // unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property_valist() } //} fn set_duration(&self, duration: gst::ClockTime) { unsafe { - ffi::ges_timeline_element_set_duration(self.as_ref().to_glib_none().0, duration.to_glib()); + ges_sys::ges_timeline_element_set_duration(self.as_ref().to_glib_none().0, duration.to_glib()); } } fn set_inpoint(&self, inpoint: gst::ClockTime) { unsafe { - ffi::ges_timeline_element_set_inpoint(self.as_ref().to_glib_none().0, inpoint.to_glib()); + ges_sys::ges_timeline_element_set_inpoint(self.as_ref().to_glib_none().0, inpoint.to_glib()); } } fn set_max_duration(&self, maxduration: gst::ClockTime) { unsafe { - ffi::ges_timeline_element_set_max_duration(self.as_ref().to_glib_none().0, maxduration.to_glib()); + ges_sys::ges_timeline_element_set_max_duration(self.as_ref().to_glib_none().0, maxduration.to_glib()); } } - fn set_name<'a, P: Into>>(&self, name: P) -> Result<(), glib::error::BoolError> { - let name = name.into(); + fn set_name(&self, name: Option<&str>) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_timeline_element_set_name(self.as_ref().to_glib_none().0, name.to_glib_none().0), "Failed to set name") + glib_result_from_gboolean!(ges_sys::ges_timeline_element_set_name(self.as_ref().to_glib_none().0, name.to_glib_none().0), "Failed to set name") } } fn set_parent>(&self, parent: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_timeline_element_set_parent(self.as_ref().to_glib_none().0, parent.as_ref().to_glib_none().0), "`TimelineElement` already had a parent or its parent was the same as specified") + glib_result_from_gboolean!(ges_sys::ges_timeline_element_set_parent(self.as_ref().to_glib_none().0, parent.as_ref().to_glib_none().0), "`TimelineElement` already had a parent or its parent was the same as specified") } } fn set_priority(&self, priority: u32) { unsafe { - ffi::ges_timeline_element_set_priority(self.as_ref().to_glib_none().0, priority); + ges_sys::ges_timeline_element_set_priority(self.as_ref().to_glib_none().0, priority); } } fn set_start(&self, start: gst::ClockTime) { unsafe { - ffi::ges_timeline_element_set_start(self.as_ref().to_glib_none().0, start.to_glib()); + ges_sys::ges_timeline_element_set_start(self.as_ref().to_glib_none().0, start.to_glib()); } } fn set_timeline>(&self, timeline: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_timeline_element_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0), "`Failed to set timeline") + glib_result_from_gboolean!(ges_sys::ges_timeline_element_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0), "`Failed to set timeline") } } fn trim(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_timeline_element_trim(self.as_ref().to_glib_none().0, start.to_glib()), "`Failed to trim") + glib_result_from_gboolean!(ges_sys::ges_timeline_element_trim(self.as_ref().to_glib_none().0, start.to_glib()), "`Failed to trim") } } fn get_property_in_point(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"in-point\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_in_point(&self, in_point: u64) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, Value::from(&in_point).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"in-point\0".as_ptr() as *const _, Value::from(&in_point).to_glib_none().0); } } fn get_property_serialize(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"serialize\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"serialize\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_serialize(&self, serialize: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"serialize\0".as_ptr() as *const _, Value::from(&serialize).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"serialize\0".as_ptr() as *const _, Value::from(&serialize).to_glib_none().0); } } @@ -440,55 +439,55 @@ impl> TimelineElementExt for O { } } -unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_duration_trampoline(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_in_point_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_in_point_trampoline(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_max_duration_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_max_duration_trampoline(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_name_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_name_trampoline(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_parent_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_parent_trampoline(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_priority_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_priority_trampoline(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_serialize_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_serialize_trampoline(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_start_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_start_trampoline(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_timeline_trampoline(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_timeline_trampoline(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-editing-services/src/auto/track.rs b/gstreamer-editing-services/src/auto/track.rs index ff5a2da63..fc53112a2 100644 --- a/gstreamer-editing-services/src/auto/track.rs +++ b/gstreamer-editing-services/src/auto/track.rs @@ -5,7 +5,7 @@ use Timeline; use TrackElement; use TrackType; -use ffi; +use ges_sys; use glib; use glib::StaticType; use glib::Value; @@ -14,17 +14,17 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Track(Object) @extends gst::Element, gst::Object; + pub struct Track(Object) @extends gst::Element, gst::Object; match fn { - get_type => || ffi::ges_track_get_type(), + get_type => || ges_sys::ges_track_get_type(), } } @@ -32,7 +32,7 @@ impl Track { pub fn new(type_: TrackType, caps: &gst::Caps) -> Track { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::ges_track_new(type_.to_glib(), caps.to_glib_full())) + from_glib_none(ges_sys::ges_track_new(type_.to_glib(), caps.to_glib_full())) } } } @@ -86,78 +86,78 @@ pub trait GESTrackExt: 'static { impl> GESTrackExt for O { fn add_element>(&self, object: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_track_add_element(self.as_ref().to_glib_none().0, object.as_ref().to_glib_none().0), "Failed to add element") + glib_result_from_gboolean!(ges_sys::ges_track_add_element(self.as_ref().to_glib_none().0, object.as_ref().to_glib_none().0), "Failed to add element") } } fn commit(&self) -> bool { unsafe { - from_glib(ffi::ges_track_commit(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_track_commit(self.as_ref().to_glib_none().0)) } } fn get_caps(&self) -> Option { unsafe { - from_glib_none(ffi::ges_track_get_caps(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_track_get_caps(self.as_ref().to_glib_none().0)) } } fn get_elements(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::ges_track_get_elements(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(ges_sys::ges_track_get_elements(self.as_ref().to_glib_none().0)) } } fn get_mixing(&self) -> bool { unsafe { - from_glib(ffi::ges_track_get_mixing(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_track_get_mixing(self.as_ref().to_glib_none().0)) } } fn get_timeline(&self) -> Option { unsafe { - from_glib_none(ffi::ges_track_get_timeline(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_track_get_timeline(self.as_ref().to_glib_none().0)) } } fn remove_element>(&self, object: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_track_remove_element(self.as_ref().to_glib_none().0, object.as_ref().to_glib_none().0), "Failed to remove element") + glib_result_from_gboolean!(ges_sys::ges_track_remove_element(self.as_ref().to_glib_none().0, object.as_ref().to_glib_none().0), "Failed to remove element") } } //fn set_create_element_for_gap_func gst::Element + 'static>(&self, func: P) { - // unsafe { TODO: call ffi::ges_track_set_create_element_for_gap_func() } + // unsafe { TODO: call ges_sys:ges_track_set_create_element_for_gap_func() } //} fn set_mixing(&self, mixing: bool) { unsafe { - ffi::ges_track_set_mixing(self.as_ref().to_glib_none().0, mixing.to_glib()); + ges_sys::ges_track_set_mixing(self.as_ref().to_glib_none().0, mixing.to_glib()); } } fn set_restriction_caps(&self, caps: &gst::Caps) { unsafe { - ffi::ges_track_set_restriction_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0); + ges_sys::ges_track_set_restriction_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0); } } fn set_timeline>(&self, timeline: &P) { unsafe { - ffi::ges_track_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0); + ges_sys::ges_track_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0); } } fn update_restriction_caps(&self, caps: &gst::Caps) { unsafe { - ffi::ges_track_update_restriction_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0); + ges_sys::ges_track_update_restriction_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0); } } fn get_property_duration(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -165,7 +165,7 @@ impl> GESTrackExt for O { fn get_property_restriction_caps(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"restriction-caps\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"restriction-caps\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -173,7 +173,7 @@ impl> GESTrackExt for O { fn get_property_track_type(&self) -> TrackType { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"track-type\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"track-type\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -227,37 +227,37 @@ impl> GESTrackExt for O { } } -unsafe extern "C" fn commited_trampoline(this: *mut ffi::GESTrack, f: glib_ffi::gpointer) +unsafe extern "C" fn commited_trampoline(this: *mut ges_sys::GESTrack, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Track::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn track_element_added_trampoline(this: *mut ffi::GESTrack, effect: *mut ffi::GESTrackElement, f: glib_ffi::gpointer) +unsafe extern "C" fn track_element_added_trampoline(this: *mut ges_sys::GESTrack, effect: *mut ges_sys::GESTrackElement, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Track::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(effect)) } -unsafe extern "C" fn track_element_removed_trampoline(this: *mut ffi::GESTrack, effect: *mut ffi::GESTrackElement, f: glib_ffi::gpointer) +unsafe extern "C" fn track_element_removed_trampoline(this: *mut ges_sys::GESTrack, effect: *mut ges_sys::GESTrackElement, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Track::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(effect)) } -unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GESTrack, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_duration_trampoline(this: *mut ges_sys::GESTrack, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Track::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_mixing_trampoline(this: *mut ffi::GESTrack, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_mixing_trampoline(this: *mut ges_sys::GESTrack, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Track::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_restriction_caps_trampoline(this: *mut ffi::GESTrack, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_restriction_caps_trampoline(this: *mut ges_sys::GESTrack, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Track::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-editing-services/src/auto/track_element.rs b/gstreamer-editing-services/src/auto/track_element.rs index 5e59ad5f7..ec4dbc35c 100644 --- a/gstreamer-editing-services/src/auto/track_element.rs +++ b/gstreamer-editing-services/src/auto/track_element.rs @@ -9,7 +9,7 @@ use Layer; use TimelineElement; use Track; use TrackType; -use ffi; +use ges_sys; use glib; use glib::GString; use glib::StaticType; @@ -19,17 +19,17 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct TrackElement(Object) @extends TimelineElement, @implements Extractable; + pub struct TrackElement(Object) @extends TimelineElement, @implements Extractable; match fn { - get_type => || ffi::ges_track_element_get_type(), + get_type => || ges_sys::ges_track_element_get_type(), } } @@ -82,90 +82,90 @@ pub trait TrackElementExt: 'static { impl> TrackElementExt for O { fn add_children_props>(&self, element: &P, wanted_categories: &[&str], blacklist: &[&str], whitelist: &[&str]) { unsafe { - ffi::ges_track_element_add_children_props(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0, wanted_categories.to_glib_none().0, blacklist.to_glib_none().0, whitelist.to_glib_none().0); + ges_sys::ges_track_element_add_children_props(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0, wanted_categories.to_glib_none().0, blacklist.to_glib_none().0, whitelist.to_glib_none().0); } } fn edit(&self, layers: &[Layer], mode: EditMode, edge: Edge, position: u64) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_track_element_edit(self.as_ref().to_glib_none().0, layers.to_glib_none().0, mode.to_glib(), edge.to_glib(), position), "Failed to edit") + glib_result_from_gboolean!(ges_sys::ges_track_element_edit(self.as_ref().to_glib_none().0, layers.to_glib_none().0, mode.to_glib(), edge.to_glib(), position), "Failed to edit") } } //fn get_all_control_bindings(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 6, id: 83 } { - // unsafe { TODO: call ffi::ges_track_element_get_all_control_bindings() } + // unsafe { TODO: call ges_sys:ges_track_element_get_all_control_bindings() } //} //fn get_control_binding(&self, property_name: &str) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::ges_track_element_get_control_binding() } + // unsafe { TODO: call ges_sys:ges_track_element_get_control_binding() } //} fn get_element(&self) -> Option { unsafe { - from_glib_none(ffi::ges_track_element_get_element(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_track_element_get_element(self.as_ref().to_glib_none().0)) } } fn get_gnlobject(&self) -> Option { unsafe { - from_glib_none(ffi::ges_track_element_get_gnlobject(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_track_element_get_gnlobject(self.as_ref().to_glib_none().0)) } } fn get_nleobject(&self) -> Option { unsafe { - from_glib_none(ffi::ges_track_element_get_nleobject(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_track_element_get_nleobject(self.as_ref().to_glib_none().0)) } } fn get_track(&self) -> Option { unsafe { - from_glib_none(ffi::ges_track_element_get_track(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_track_element_get_track(self.as_ref().to_glib_none().0)) } } fn get_track_type(&self) -> TrackType { unsafe { - from_glib(ffi::ges_track_element_get_track_type(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_track_element_get_track_type(self.as_ref().to_glib_none().0)) } } fn is_active(&self) -> bool { unsafe { - from_glib(ffi::ges_track_element_is_active(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_track_element_is_active(self.as_ref().to_glib_none().0)) } } //fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option { - // unsafe { TODO: call ffi::ges_track_element_lookup_child() } + // unsafe { TODO: call ges_sys:ges_track_element_lookup_child() } //} fn remove_control_binding(&self, property_name: &str) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::ges_track_element_remove_control_binding(self.as_ref().to_glib_none().0, property_name.to_glib_none().0), "Failed to remove control binding") + glib_result_from_gboolean!(ges_sys::ges_track_element_remove_control_binding(self.as_ref().to_glib_none().0, property_name.to_glib_none().0), "Failed to remove control binding") } } fn set_active(&self, active: bool) -> bool { unsafe { - from_glib(ffi::ges_track_element_set_active(self.as_ref().to_glib_none().0, active.to_glib())) + from_glib(ges_sys::ges_track_element_set_active(self.as_ref().to_glib_none().0, active.to_glib())) } } //fn set_control_source(&self, source: /*Ignored*/&gst::ControlSource, property_name: &str, binding_type: &str) -> bool { - // unsafe { TODO: call ffi::ges_track_element_set_control_source() } + // unsafe { TODO: call ges_sys:ges_track_element_set_control_source() } //} fn set_track_type(&self, type_: TrackType) { unsafe { - ffi::ges_track_element_set_track_type(self.as_ref().to_glib_none().0, type_.to_glib()); + ges_sys::ges_track_element_set_track_type(self.as_ref().to_glib_none().0, type_.to_glib()); } } fn get_property_active(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"active\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"active\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -203,19 +203,19 @@ impl> TrackElementExt for O { } } -unsafe extern "C" fn notify_active_trampoline(this: *mut ffi::GESTrackElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_active_trampoline(this: *mut ges_sys::GESTrackElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&TrackElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_track_trampoline(this: *mut ffi::GESTrackElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_track_trampoline(this: *mut ges_sys::GESTrackElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&TrackElement::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_track_type_trampoline(this: *mut ffi::GESTrackElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_track_type_trampoline(this: *mut ges_sys::GESTrackElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&TrackElement::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-editing-services/src/auto/uri_clip.rs b/gstreamer-editing-services/src/auto/uri_clip.rs index b8b40a496..8ad1e344d 100644 --- a/gstreamer-editing-services/src/auto/uri_clip.rs +++ b/gstreamer-editing-services/src/auto/uri_clip.rs @@ -6,7 +6,7 @@ use Clip; use Container; use Extractable; use TimelineElement; -use ffi; +use ges_sys; use glib::GString; use glib::StaticType; use glib::Value; @@ -15,16 +15,16 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct UriClip(Object) @extends Clip, Container, TimelineElement, @implements Extractable; + pub struct UriClip(Object) @extends Clip, Container, TimelineElement, @implements Extractable; match fn { - get_type => || ffi::ges_uri_clip_get_type(), + get_type => || ges_sys::ges_uri_clip_get_type(), } } @@ -32,7 +32,7 @@ impl UriClip { pub fn new(uri: &str) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::ges_uri_clip_new(uri.to_glib_none().0)) + from_glib_none(ges_sys::ges_uri_clip_new(uri.to_glib_none().0)) } } } @@ -64,38 +64,38 @@ pub trait UriClipExt: 'static { impl> UriClipExt for O { fn get_uri(&self) -> Option { unsafe { - from_glib_none(ffi::ges_uri_clip_get_uri(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_uri_clip_get_uri(self.as_ref().to_glib_none().0)) } } fn is_image(&self) -> bool { unsafe { - from_glib(ffi::ges_uri_clip_is_image(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_uri_clip_is_image(self.as_ref().to_glib_none().0)) } } fn is_muted(&self) -> bool { unsafe { - from_glib(ffi::ges_uri_clip_is_muted(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_uri_clip_is_muted(self.as_ref().to_glib_none().0)) } } fn set_is_image(&self, is_image: bool) { unsafe { - ffi::ges_uri_clip_set_is_image(self.as_ref().to_glib_none().0, is_image.to_glib()); + ges_sys::ges_uri_clip_set_is_image(self.as_ref().to_glib_none().0, is_image.to_glib()); } } fn set_mute(&self, mute: bool) { unsafe { - ffi::ges_uri_clip_set_mute(self.as_ref().to_glib_none().0, mute.to_glib()); + ges_sys::ges_uri_clip_set_mute(self.as_ref().to_glib_none().0, mute.to_glib()); } } fn get_property_is_image(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"is-image\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"is-image\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -103,7 +103,7 @@ impl> UriClipExt for O { fn get_property_mute(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"mute\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"mute\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -133,19 +133,19 @@ impl> UriClipExt for O { } } -unsafe extern "C" fn notify_is_image_trampoline(this: *mut ffi::GESUriClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_is_image_trampoline(this: *mut ges_sys::GESUriClip, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&UriClip::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_mute_trampoline(this: *mut ffi::GESUriClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_mute_trampoline(this: *mut ges_sys::GESUriClip, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&UriClip::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_supported_formats_trampoline(this: *mut ffi::GESUriClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_supported_formats_trampoline(this: *mut ges_sys::GESUriClip, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&UriClip::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-editing-services/src/auto/uri_clip_asset.rs b/gstreamer-editing-services/src/auto/uri_clip_asset.rs index 6f28505c8..dff695608 100644 --- a/gstreamer-editing-services/src/auto/uri_clip_asset.rs +++ b/gstreamer-editing-services/src/auto/uri_clip_asset.rs @@ -5,15 +5,15 @@ use Asset; use Error; use UriSourceAsset; -use ffi; +use ges_sys; use glib::Value; use glib::object::Cast; use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; use gst_pbutils; use std::boxed::Box as Box_; @@ -21,23 +21,23 @@ use std::mem::transmute; use std::ptr; glib_wrapper! { - pub struct UriClipAsset(Object) @extends Asset; + pub struct UriClipAsset(Object) @extends Asset; match fn { - get_type => || ffi::ges_uri_clip_asset_get_type(), + get_type => || ges_sys::ges_uri_clip_asset_get_type(), } } impl UriClipAsset { - //pub fn new<'a, P: IsA + 'a, Q: Into>, R: FnOnce(Result<(), Error>) + 'static>(uri: &str, cancellable: Q, callback: R) { - // unsafe { TODO: call ffi::ges_uri_clip_asset_new() } + //pub fn new, Q: FnOnce(Result<(), Error>) + 'static>(uri: &str, cancellable: Option<&P>, callback: Q) { + // unsafe { TODO: call ges_sys:ges_uri_clip_asset_new() } //} pub fn request_sync(uri: &str) -> Result, Error> { assert_initialized_main_thread!(); unsafe { let mut error = ptr::null_mut(); - let ret = ffi::ges_uri_clip_asset_request_sync(uri.to_glib_none().0, &mut error); + let ret = ges_sys::ges_uri_clip_asset_request_sync(uri.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) } } } @@ -62,31 +62,31 @@ pub trait UriClipAssetExt: 'static { impl> UriClipAssetExt for O { fn get_duration(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::ges_uri_clip_asset_get_duration(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_uri_clip_asset_get_duration(self.as_ref().to_glib_none().0)) } } fn get_info(&self) -> Option { unsafe { - from_glib_none(ffi::ges_uri_clip_asset_get_info(const_override(self.as_ref().to_glib_none().0))) + from_glib_none(ges_sys::ges_uri_clip_asset_get_info(const_override(self.as_ref().to_glib_none().0))) } } fn get_stream_assets(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::ges_uri_clip_asset_get_stream_assets(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(ges_sys::ges_uri_clip_asset_get_stream_assets(self.as_ref().to_glib_none().0)) } } fn is_image(&self) -> bool { unsafe { - from_glib(ffi::ges_uri_clip_asset_is_image(self.as_ref().to_glib_none().0)) + from_glib(ges_sys::ges_uri_clip_asset_is_image(self.as_ref().to_glib_none().0)) } } fn set_property_duration(&self, duration: u64) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0); } } @@ -99,7 +99,7 @@ impl> UriClipAssetExt for O { } } -unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GESUriClipAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_duration_trampoline(this: *mut ges_sys::GESUriClipAsset, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&UriClipAsset::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-editing-services/src/auto/uri_source_asset.rs b/gstreamer-editing-services/src/auto/uri_source_asset.rs index dde9b5d1f..63c5de77a 100644 --- a/gstreamer-editing-services/src/auto/uri_source_asset.rs +++ b/gstreamer-editing-services/src/auto/uri_source_asset.rs @@ -4,17 +4,17 @@ use Asset; use UriClipAsset; -use ffi; +use ges_sys; use glib::GString; use glib::object::IsA; use glib::translate::*; use gst_pbutils; glib_wrapper! { - pub struct UriSourceAsset(Object) @extends Asset; + pub struct UriSourceAsset(Object) @extends Asset; match fn { - get_type => || ffi::ges_uri_source_asset_get_type(), + get_type => || ges_sys::ges_uri_source_asset_get_type(), } } @@ -31,19 +31,19 @@ pub trait UriSourceAssetExt: 'static { impl> UriSourceAssetExt for O { fn get_filesource_asset(&self) -> Option { unsafe { - from_glib_none(ffi::ges_uri_source_asset_get_filesource_asset(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_uri_source_asset_get_filesource_asset(self.as_ref().to_glib_none().0)) } } fn get_stream_info(&self) -> Option { unsafe { - from_glib_none(ffi::ges_uri_source_asset_get_stream_info(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_uri_source_asset_get_stream_info(self.as_ref().to_glib_none().0)) } } fn get_stream_uri(&self) -> Option { unsafe { - from_glib_none(ffi::ges_uri_source_asset_get_stream_uri(self.as_ref().to_glib_none().0)) + from_glib_none(ges_sys::ges_uri_source_asset_get_stream_uri(self.as_ref().to_glib_none().0)) } } } diff --git a/gstreamer-editing-services/src/auto/versions.txt b/gstreamer-editing-services/src/auto/versions.txt index b9131200d..a9e0ccc5d 100644 --- a/gstreamer-editing-services/src/auto/versions.txt +++ b/gstreamer-editing-services/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-gl/src/auto/enums.rs b/gstreamer-gl/src/auto/enums.rs index 3a6e88a49..0f50a4058 100644 --- a/gstreamer-gl/src/auto/enums.rs +++ b/gstreamer-gl/src/auto/enums.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::Quark; use glib::StaticType; use glib::Type; @@ -12,7 +11,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_gl_sys; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] @@ -29,24 +29,24 @@ pub enum GLContextError { #[doc(hidden)] impl ToGlib for GLContextError { - type GlibType = ffi::GstGLContextError; + type GlibType = gst_gl_sys::GstGLContextError; - fn to_glib(&self) -> ffi::GstGLContextError { + fn to_glib(&self) -> gst_gl_sys::GstGLContextError { match *self { - GLContextError::Failed => ffi::GST_GL_CONTEXT_ERROR_FAILED, - GLContextError::WrongConfig => ffi::GST_GL_CONTEXT_ERROR_WRONG_CONFIG, - GLContextError::WrongApi => ffi::GST_GL_CONTEXT_ERROR_WRONG_API, - GLContextError::OldLibs => ffi::GST_GL_CONTEXT_ERROR_OLD_LIBS, - GLContextError::CreateContext => ffi::GST_GL_CONTEXT_ERROR_CREATE_CONTEXT, - GLContextError::ResourceUnavailable => ffi::GST_GL_CONTEXT_ERROR_RESOURCE_UNAVAILABLE, + GLContextError::Failed => gst_gl_sys::GST_GL_CONTEXT_ERROR_FAILED, + GLContextError::WrongConfig => gst_gl_sys::GST_GL_CONTEXT_ERROR_WRONG_CONFIG, + GLContextError::WrongApi => gst_gl_sys::GST_GL_CONTEXT_ERROR_WRONG_API, + GLContextError::OldLibs => gst_gl_sys::GST_GL_CONTEXT_ERROR_OLD_LIBS, + GLContextError::CreateContext => gst_gl_sys::GST_GL_CONTEXT_ERROR_CREATE_CONTEXT, + GLContextError::ResourceUnavailable => gst_gl_sys::GST_GL_CONTEXT_ERROR_RESOURCE_UNAVAILABLE, GLContextError::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for GLContextError { - fn from_glib(value: ffi::GstGLContextError) -> Self { +impl FromGlib for GLContextError { + fn from_glib(value: gst_gl_sys::GstGLContextError) -> Self { skip_assert_initialized!(); match value { 0 => GLContextError::Failed, @@ -63,7 +63,7 @@ impl FromGlib for GLContextError { impl ErrorDomain for GLContextError { fn domain() -> Quark { skip_assert_initialized!(); - unsafe { from_glib(ffi::gst_gl_context_error_quark()) } + unsafe { from_glib(gst_gl_sys::gst_gl_context_error_quark()) } } fn code(self) -> i32 { @@ -107,32 +107,32 @@ pub enum GLFormat { #[doc(hidden)] impl ToGlib for GLFormat { - type GlibType = ffi::GstGLFormat; + type GlibType = gst_gl_sys::GstGLFormat; - fn to_glib(&self) -> ffi::GstGLFormat { + fn to_glib(&self) -> gst_gl_sys::GstGLFormat { match *self { - GLFormat::Luminance => ffi::GST_GL_LUMINANCE, - GLFormat::Alpha => ffi::GST_GL_ALPHA, - GLFormat::LuminanceAlpha => ffi::GST_GL_LUMINANCE_ALPHA, - GLFormat::Red => ffi::GST_GL_RED, - GLFormat::R8 => ffi::GST_GL_R8, - GLFormat::Rg => ffi::GST_GL_RG, - GLFormat::Rg8 => ffi::GST_GL_RG8, - GLFormat::Rgb => ffi::GST_GL_RGB, - GLFormat::Rgb8 => ffi::GST_GL_RGB8, - GLFormat::Rgb565 => ffi::GST_GL_RGB565, - GLFormat::Rgba => ffi::GST_GL_RGBA, - GLFormat::Rgba8 => ffi::GST_GL_RGBA8, - GLFormat::DepthComponent16 => ffi::GST_GL_DEPTH_COMPONENT16, - GLFormat::Depth24Stencil8 => ffi::GST_GL_DEPTH24_STENCIL8, + GLFormat::Luminance => gst_gl_sys::GST_GL_LUMINANCE, + GLFormat::Alpha => gst_gl_sys::GST_GL_ALPHA, + GLFormat::LuminanceAlpha => gst_gl_sys::GST_GL_LUMINANCE_ALPHA, + GLFormat::Red => gst_gl_sys::GST_GL_RED, + GLFormat::R8 => gst_gl_sys::GST_GL_R8, + GLFormat::Rg => gst_gl_sys::GST_GL_RG, + GLFormat::Rg8 => gst_gl_sys::GST_GL_RG8, + GLFormat::Rgb => gst_gl_sys::GST_GL_RGB, + GLFormat::Rgb8 => gst_gl_sys::GST_GL_RGB8, + GLFormat::Rgb565 => gst_gl_sys::GST_GL_RGB565, + GLFormat::Rgba => gst_gl_sys::GST_GL_RGBA, + GLFormat::Rgba8 => gst_gl_sys::GST_GL_RGBA8, + GLFormat::DepthComponent16 => gst_gl_sys::GST_GL_DEPTH_COMPONENT16, + GLFormat::Depth24Stencil8 => gst_gl_sys::GST_GL_DEPTH24_STENCIL8, GLFormat::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for GLFormat { - fn from_glib(value: ffi::GstGLFormat) -> Self { +impl FromGlib for GLFormat { + fn from_glib(value: gst_gl_sys::GstGLFormat) -> Self { skip_assert_initialized!(); match value { 6409 => GLFormat::Luminance, @@ -166,21 +166,21 @@ pub enum GLQueryType { #[doc(hidden)] impl ToGlib for GLQueryType { - type GlibType = ffi::GstGLQueryType; + type GlibType = gst_gl_sys::GstGLQueryType; - fn to_glib(&self) -> ffi::GstGLQueryType { + fn to_glib(&self) -> gst_gl_sys::GstGLQueryType { match *self { - GLQueryType::None => ffi::GST_GL_QUERY_NONE, - GLQueryType::TimeElapsed => ffi::GST_GL_QUERY_TIME_ELAPSED, - GLQueryType::Timestamp => ffi::GST_GL_QUERY_TIMESTAMP, + GLQueryType::None => gst_gl_sys::GST_GL_QUERY_NONE, + GLQueryType::TimeElapsed => gst_gl_sys::GST_GL_QUERY_TIME_ELAPSED, + GLQueryType::Timestamp => gst_gl_sys::GST_GL_QUERY_TIMESTAMP, GLQueryType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for GLQueryType { - fn from_glib(value: ffi::GstGLQueryType) -> Self { +impl FromGlib for GLQueryType { + fn from_glib(value: gst_gl_sys::GstGLQueryType) -> Self { skip_assert_initialized!(); match value { 0 => GLQueryType::None, @@ -203,21 +203,21 @@ pub enum GLSLError { #[doc(hidden)] impl ToGlib for GLSLError { - type GlibType = ffi::GstGLSLError; + type GlibType = gst_gl_sys::GstGLSLError; - fn to_glib(&self) -> ffi::GstGLSLError { + fn to_glib(&self) -> gst_gl_sys::GstGLSLError { match *self { - GLSLError::Compile => ffi::GST_GLSL_ERROR_COMPILE, - GLSLError::Link => ffi::GST_GLSL_ERROR_LINK, - GLSLError::Program => ffi::GST_GLSL_ERROR_PROGRAM, + GLSLError::Compile => gst_gl_sys::GST_GLSL_ERROR_COMPILE, + GLSLError::Link => gst_gl_sys::GST_GLSL_ERROR_LINK, + GLSLError::Program => gst_gl_sys::GST_GLSL_ERROR_PROGRAM, GLSLError::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for GLSLError { - fn from_glib(value: ffi::GstGLSLError) -> Self { +impl FromGlib for GLSLError { + fn from_glib(value: gst_gl_sys::GstGLSLError) -> Self { skip_assert_initialized!(); match value { 0 => GLSLError::Compile, @@ -231,7 +231,7 @@ impl FromGlib for GLSLError { impl ErrorDomain for GLSLError { fn domain() -> Quark { skip_assert_initialized!(); - unsafe { from_glib(ffi::gst_glsl_error_quark()) } + unsafe { from_glib(gst_gl_sys::gst_glsl_error_quark()) } } fn code(self) -> i32 { @@ -275,35 +275,35 @@ pub enum GLSLVersion { #[doc(hidden)] impl ToGlib for GLSLVersion { - type GlibType = ffi::GstGLSLVersion; + type GlibType = gst_gl_sys::GstGLSLVersion; - fn to_glib(&self) -> ffi::GstGLSLVersion { + fn to_glib(&self) -> gst_gl_sys::GstGLSLVersion { match *self { - GLSLVersion::None => ffi::GST_GLSL_VERSION_NONE, - GLSLVersion::_100 => ffi::GST_GLSL_VERSION_100, - GLSLVersion::_110 => ffi::GST_GLSL_VERSION_110, - GLSLVersion::_120 => ffi::GST_GLSL_VERSION_120, - GLSLVersion::_130 => ffi::GST_GLSL_VERSION_130, - GLSLVersion::_140 => ffi::GST_GLSL_VERSION_140, - GLSLVersion::_150 => ffi::GST_GLSL_VERSION_150, - GLSLVersion::_300 => ffi::GST_GLSL_VERSION_300, - GLSLVersion::_310 => ffi::GST_GLSL_VERSION_310, - GLSLVersion::_320 => ffi::GST_GLSL_VERSION_320, - GLSLVersion::_330 => ffi::GST_GLSL_VERSION_330, - GLSLVersion::_400 => ffi::GST_GLSL_VERSION_400, - GLSLVersion::_410 => ffi::GST_GLSL_VERSION_410, - GLSLVersion::_420 => ffi::GST_GLSL_VERSION_420, - GLSLVersion::_430 => ffi::GST_GLSL_VERSION_430, - GLSLVersion::_440 => ffi::GST_GLSL_VERSION_440, - GLSLVersion::_450 => ffi::GST_GLSL_VERSION_450, + GLSLVersion::None => gst_gl_sys::GST_GLSL_VERSION_NONE, + GLSLVersion::_100 => gst_gl_sys::GST_GLSL_VERSION_100, + GLSLVersion::_110 => gst_gl_sys::GST_GLSL_VERSION_110, + GLSLVersion::_120 => gst_gl_sys::GST_GLSL_VERSION_120, + GLSLVersion::_130 => gst_gl_sys::GST_GLSL_VERSION_130, + GLSLVersion::_140 => gst_gl_sys::GST_GLSL_VERSION_140, + GLSLVersion::_150 => gst_gl_sys::GST_GLSL_VERSION_150, + GLSLVersion::_300 => gst_gl_sys::GST_GLSL_VERSION_300, + GLSLVersion::_310 => gst_gl_sys::GST_GLSL_VERSION_310, + GLSLVersion::_320 => gst_gl_sys::GST_GLSL_VERSION_320, + GLSLVersion::_330 => gst_gl_sys::GST_GLSL_VERSION_330, + GLSLVersion::_400 => gst_gl_sys::GST_GLSL_VERSION_400, + GLSLVersion::_410 => gst_gl_sys::GST_GLSL_VERSION_410, + GLSLVersion::_420 => gst_gl_sys::GST_GLSL_VERSION_420, + GLSLVersion::_430 => gst_gl_sys::GST_GLSL_VERSION_430, + GLSLVersion::_440 => gst_gl_sys::GST_GLSL_VERSION_440, + GLSLVersion::_450 => gst_gl_sys::GST_GLSL_VERSION_450, GLSLVersion::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for GLSLVersion { - fn from_glib(value: ffi::GstGLSLVersion) -> Self { +impl FromGlib for GLSLVersion { + fn from_glib(value: gst_gl_sys::GstGLSLVersion) -> Self { skip_assert_initialized!(); match value { 0 => GLSLVersion::None, @@ -340,21 +340,21 @@ pub enum GLStereoDownmix { #[doc(hidden)] impl ToGlib for GLStereoDownmix { - type GlibType = ffi::GstGLStereoDownmix; + type GlibType = gst_gl_sys::GstGLStereoDownmix; - fn to_glib(&self) -> ffi::GstGLStereoDownmix { + fn to_glib(&self) -> gst_gl_sys::GstGLStereoDownmix { match *self { - GLStereoDownmix::GreenMagentaDubois => ffi::GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS, - GLStereoDownmix::RedCyanDubois => ffi::GST_GL_STEREO_DOWNMIX_ANAGLYPH_RED_CYAN_DUBOIS, - GLStereoDownmix::AmberBlueDubois => ffi::GST_GL_STEREO_DOWNMIX_ANAGLYPH_AMBER_BLUE_DUBOIS, + GLStereoDownmix::GreenMagentaDubois => gst_gl_sys::GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS, + GLStereoDownmix::RedCyanDubois => gst_gl_sys::GST_GL_STEREO_DOWNMIX_ANAGLYPH_RED_CYAN_DUBOIS, + GLStereoDownmix::AmberBlueDubois => gst_gl_sys::GST_GL_STEREO_DOWNMIX_ANAGLYPH_AMBER_BLUE_DUBOIS, GLStereoDownmix::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for GLStereoDownmix { - fn from_glib(value: ffi::GstGLStereoDownmix) -> Self { +impl FromGlib for GLStereoDownmix { + fn from_glib(value: gst_gl_sys::GstGLStereoDownmix) -> Self { skip_assert_initialized!(); match value { 0 => GLStereoDownmix::GreenMagentaDubois, @@ -367,7 +367,7 @@ impl FromGlib for GLStereoDownmix { impl StaticType for GLStereoDownmix { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_gl_stereo_downmix_mode_get_type()) } + unsafe { from_glib(gst_gl_sys::gst_gl_stereo_downmix_mode_get_type()) } } } @@ -379,13 +379,13 @@ impl<'a> FromValueOptional<'a> for GLStereoDownmix { impl<'a> FromValue<'a> for GLStereoDownmix { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for GLStereoDownmix { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -402,22 +402,22 @@ pub enum GLTextureTarget { #[doc(hidden)] impl ToGlib for GLTextureTarget { - type GlibType = ffi::GstGLTextureTarget; + type GlibType = gst_gl_sys::GstGLTextureTarget; - fn to_glib(&self) -> ffi::GstGLTextureTarget { + fn to_glib(&self) -> gst_gl_sys::GstGLTextureTarget { match *self { - GLTextureTarget::None => ffi::GST_GL_TEXTURE_TARGET_NONE, - GLTextureTarget::_2d => ffi::GST_GL_TEXTURE_TARGET_2D, - GLTextureTarget::Rectangle => ffi::GST_GL_TEXTURE_TARGET_RECTANGLE, - GLTextureTarget::ExternalOes => ffi::GST_GL_TEXTURE_TARGET_EXTERNAL_OES, + GLTextureTarget::None => gst_gl_sys::GST_GL_TEXTURE_TARGET_NONE, + GLTextureTarget::_2d => gst_gl_sys::GST_GL_TEXTURE_TARGET_2D, + GLTextureTarget::Rectangle => gst_gl_sys::GST_GL_TEXTURE_TARGET_RECTANGLE, + GLTextureTarget::ExternalOes => gst_gl_sys::GST_GL_TEXTURE_TARGET_EXTERNAL_OES, GLTextureTarget::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for GLTextureTarget { - fn from_glib(value: ffi::GstGLTextureTarget) -> Self { +impl FromGlib for GLTextureTarget { + fn from_glib(value: gst_gl_sys::GstGLTextureTarget) -> Self { skip_assert_initialized!(); match value { 0 => GLTextureTarget::None, @@ -442,22 +442,22 @@ pub enum GLUploadReturn { #[doc(hidden)] impl ToGlib for GLUploadReturn { - type GlibType = ffi::GstGLUploadReturn; + type GlibType = gst_gl_sys::GstGLUploadReturn; - fn to_glib(&self) -> ffi::GstGLUploadReturn { + fn to_glib(&self) -> gst_gl_sys::GstGLUploadReturn { match *self { - GLUploadReturn::Done => ffi::GST_GL_UPLOAD_DONE, - GLUploadReturn::Error => ffi::GST_GL_UPLOAD_ERROR, - GLUploadReturn::Unsupported => ffi::GST_GL_UPLOAD_UNSUPPORTED, - GLUploadReturn::Reconfigure => ffi::GST_GL_UPLOAD_RECONFIGURE, + GLUploadReturn::Done => gst_gl_sys::GST_GL_UPLOAD_DONE, + GLUploadReturn::Error => gst_gl_sys::GST_GL_UPLOAD_ERROR, + GLUploadReturn::Unsupported => gst_gl_sys::GST_GL_UPLOAD_UNSUPPORTED, + GLUploadReturn::Reconfigure => gst_gl_sys::GST_GL_UPLOAD_RECONFIGURE, GLUploadReturn::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for GLUploadReturn { - fn from_glib(value: ffi::GstGLUploadReturn) -> Self { +impl FromGlib for GLUploadReturn { + fn from_glib(value: gst_gl_sys::GstGLUploadReturn) -> Self { skip_assert_initialized!(); match value { 1 => GLUploadReturn::Done, @@ -481,21 +481,21 @@ pub enum GLWindowError { #[doc(hidden)] impl ToGlib for GLWindowError { - type GlibType = ffi::GstGLWindowError; + type GlibType = gst_gl_sys::GstGLWindowError; - fn to_glib(&self) -> ffi::GstGLWindowError { + fn to_glib(&self) -> gst_gl_sys::GstGLWindowError { match *self { - GLWindowError::Failed => ffi::GST_GL_WINDOW_ERROR_FAILED, - GLWindowError::OldLibs => ffi::GST_GL_WINDOW_ERROR_OLD_LIBS, - GLWindowError::ResourceUnavailable => ffi::GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE, + GLWindowError::Failed => gst_gl_sys::GST_GL_WINDOW_ERROR_FAILED, + GLWindowError::OldLibs => gst_gl_sys::GST_GL_WINDOW_ERROR_OLD_LIBS, + GLWindowError::ResourceUnavailable => gst_gl_sys::GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE, GLWindowError::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for GLWindowError { - fn from_glib(value: ffi::GstGLWindowError) -> Self { +impl FromGlib for GLWindowError { + fn from_glib(value: gst_gl_sys::GstGLWindowError) -> Self { skip_assert_initialized!(); match value { 0 => GLWindowError::Failed, @@ -509,7 +509,7 @@ impl FromGlib for GLWindowError { impl ErrorDomain for GLWindowError { fn domain() -> Quark { skip_assert_initialized!(); - unsafe { from_glib(ffi::gst_gl_window_error_quark()) } + unsafe { from_glib(gst_gl_sys::gst_gl_window_error_quark()) } } fn code(self) -> i32 { diff --git a/gstreamer-gl/src/auto/flags.rs b/gstreamer-gl/src/auto/flags.rs index bbf82f7f1..338580e18 100644 --- a/gstreamer-gl/src/auto/flags.rs +++ b/gstreamer-gl/src/auto/flags.rs @@ -2,8 +2,8 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::translate::*; +use gst_gl_sys; bitflags! { pub struct GLAPI: u32 { @@ -18,16 +18,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for GLAPI { - type GlibType = ffi::GstGLAPI; + type GlibType = gst_gl_sys::GstGLAPI; - fn to_glib(&self) -> ffi::GstGLAPI { + fn to_glib(&self) -> gst_gl_sys::GstGLAPI { self.bits() } } #[doc(hidden)] -impl FromGlib for GLAPI { - fn from_glib(value: ffi::GstGLAPI) -> GLAPI { +impl FromGlib for GLAPI { + fn from_glib(value: gst_gl_sys::GstGLAPI) -> GLAPI { skip_assert_initialized!(); GLAPI::from_bits_truncate(value) } @@ -50,16 +50,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for GLDisplayType { - type GlibType = ffi::GstGLDisplayType; + type GlibType = gst_gl_sys::GstGLDisplayType; - fn to_glib(&self) -> ffi::GstGLDisplayType { + fn to_glib(&self) -> gst_gl_sys::GstGLDisplayType { self.bits() } } #[doc(hidden)] -impl FromGlib for GLDisplayType { - fn from_glib(value: ffi::GstGLDisplayType) -> GLDisplayType { +impl FromGlib for GLDisplayType { + fn from_glib(value: gst_gl_sys::GstGLDisplayType) -> GLDisplayType { skip_assert_initialized!(); GLDisplayType::from_bits_truncate(value) } @@ -79,16 +79,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for GLPlatform { - type GlibType = ffi::GstGLPlatform; + type GlibType = gst_gl_sys::GstGLPlatform; - fn to_glib(&self) -> ffi::GstGLPlatform { + fn to_glib(&self) -> gst_gl_sys::GstGLPlatform { self.bits() } } #[doc(hidden)] -impl FromGlib for GLPlatform { - fn from_glib(value: ffi::GstGLPlatform) -> GLPlatform { +impl FromGlib for GLPlatform { + fn from_glib(value: gst_gl_sys::GstGLPlatform) -> GLPlatform { skip_assert_initialized!(); GLPlatform::from_bits_truncate(value) } @@ -106,16 +106,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for GLSLProfile { - type GlibType = ffi::GstGLSLProfile; + type GlibType = gst_gl_sys::GstGLSLProfile; - fn to_glib(&self) -> ffi::GstGLSLProfile { + fn to_glib(&self) -> gst_gl_sys::GstGLSLProfile { self.bits() } } #[doc(hidden)] -impl FromGlib for GLSLProfile { - fn from_glib(value: ffi::GstGLSLProfile) -> GLSLProfile { +impl FromGlib for GLSLProfile { + fn from_glib(value: gst_gl_sys::GstGLSLProfile) -> GLSLProfile { skip_assert_initialized!(); GLSLProfile::from_bits_truncate(value) } diff --git a/gstreamer-gl/src/auto/gl_base_filter.rs b/gstreamer-gl/src/auto/gl_base_filter.rs index 37dd28d15..c94d104bc 100644 --- a/gstreamer-gl/src/auto/gl_base_filter.rs +++ b/gstreamer-gl/src/auto/gl_base_filter.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use GLContext; -use ffi; use glib::StaticType; use glib::Value; use glib::object::Cast; @@ -11,17 +10,18 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_gl_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct GLBaseFilter(Object) @extends gst::Object; + pub struct GLBaseFilter(Object) @extends gst::Object; match fn { - get_type => || ffi::gst_gl_base_filter_get_type(), + get_type => || gst_gl_sys::gst_gl_base_filter_get_type(), } } @@ -40,7 +40,7 @@ impl> GLBaseFilterExt for O { fn get_property_context(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"context\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"context\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -54,7 +54,7 @@ impl> GLBaseFilterExt for O { } } -unsafe extern "C" fn notify_context_trampoline(this: *mut ffi::GstGLBaseFilter, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_context_trampoline(this: *mut gst_gl_sys::GstGLBaseFilter, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&GLBaseFilter::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-gl/src/auto/gl_color_convert.rs b/gstreamer-gl/src/auto/gl_color_convert.rs index 292aaccbd..2f72977e3 100644 --- a/gstreamer-gl/src/auto/gl_color_convert.rs +++ b/gstreamer-gl/src/auto/gl_color_convert.rs @@ -3,17 +3,17 @@ // DO NOT EDIT use GLContext; -use ffi; use glib; use glib::object::IsA; use glib::translate::*; use gst; +use gst_gl_sys; glib_wrapper! { - pub struct GLColorConvert(Object) @extends gst::Object; + pub struct GLColorConvert(Object) @extends gst::Object; match fn { - get_type => || ffi::gst_gl_color_convert_get_type(), + get_type => || gst_gl_sys::gst_gl_color_convert_get_type(), } } @@ -21,20 +21,20 @@ impl GLColorConvert { pub fn new>(context: &P) -> GLColorConvert { skip_assert_initialized!(); unsafe { - from_glib_full(ffi::gst_gl_color_convert_new(context.as_ref().to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_color_convert_new(context.as_ref().to_glib_none().0)) } } pub fn set_caps(&self, in_caps: &gst::Caps, out_caps: &gst::Caps) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_gl_color_convert_set_caps(self.to_glib_none().0, in_caps.to_glib_none().0, out_caps.to_glib_none().0), "Failed to set caps") + glib_result_from_gboolean!(gst_gl_sys::gst_gl_color_convert_set_caps(self.to_glib_none().0, in_caps.to_glib_none().0, out_caps.to_glib_none().0), "Failed to set caps") } } pub fn transform_caps>(context: &P, direction: gst::PadDirection, caps: &gst::Caps, filter: &gst::Caps) -> Option { skip_assert_initialized!(); unsafe { - from_glib_full(ffi::gst_gl_color_convert_transform_caps(context.as_ref().to_glib_none().0, direction.to_glib(), caps.to_glib_none().0, filter.to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_color_convert_transform_caps(context.as_ref().to_glib_none().0, direction.to_glib(), caps.to_glib_none().0, filter.to_glib_none().0)) } } } diff --git a/gstreamer-gl/src/auto/gl_context.rs b/gstreamer-gl/src/auto/gl_context.rs index b65f66250..418654e5c 100644 --- a/gstreamer-gl/src/auto/gl_context.rs +++ b/gstreamer-gl/src/auto/gl_context.rs @@ -9,19 +9,19 @@ use GLPlatform; use GLSLProfile; use GLSLVersion; use GLWindow; -use ffi; use glib; use glib::object::IsA; use glib::translate::*; use gst; +use gst_gl_sys; use std::mem; use std::ptr; glib_wrapper! { - pub struct GLContext(Object) @extends gst::Object; + pub struct GLContext(Object) @extends gst::Object; match fn { - get_type => || ffi::gst_gl_context_get_type(), + get_type => || gst_gl_sys::gst_gl_context_get_type(), } } @@ -29,14 +29,14 @@ impl GLContext { pub fn new>(display: &P) -> GLContext { skip_assert_initialized!(); unsafe { - from_glib_none(ffi::gst_gl_context_new(display.as_ref().to_glib_none().0)) + from_glib_none(gst_gl_sys::gst_gl_context_new(display.as_ref().to_glib_none().0)) } } pub fn get_current() -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::gst_gl_context_get_current()) + from_glib_none(gst_gl_sys::gst_gl_context_get_current()) } } @@ -45,7 +45,7 @@ impl GLContext { unsafe { let mut major = mem::uninitialized(); let mut minor = mem::uninitialized(); - let ret = from_glib(ffi::gst_gl_context_get_current_gl_api(platform.to_glib(), &mut major, &mut minor)); + let ret = from_glib(gst_gl_sys::gst_gl_context_get_current_gl_api(platform.to_glib(), &mut major, &mut minor)); (ret, major, minor) } } @@ -71,7 +71,7 @@ pub trait GLContextExt: 'static { fn clear_shader(&self); - fn create<'a, P: IsA + 'a, Q: Into>>(&self, other_context: Q) -> Result<(), Error>; + fn create>(&self, other_context: Option<&P>) -> Result<(), Error>; fn destroy(&self); @@ -103,84 +103,83 @@ pub trait GLContextExt: 'static { impl> GLContextExt for O { fn activate(&self, activate: bool) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_gl_context_activate(self.as_ref().to_glib_none().0, activate.to_glib()), "Failed to activate OpenGL context") + glib_result_from_gboolean!(gst_gl_sys::gst_gl_context_activate(self.as_ref().to_glib_none().0, activate.to_glib()), "Failed to activate OpenGL context") } } fn can_share>(&self, other_context: &P) -> bool { unsafe { - from_glib(ffi::gst_gl_context_can_share(self.as_ref().to_glib_none().0, other_context.as_ref().to_glib_none().0)) + from_glib(gst_gl_sys::gst_gl_context_can_share(self.as_ref().to_glib_none().0, other_context.as_ref().to_glib_none().0)) } } fn check_feature(&self, feature: &str) -> bool { unsafe { - from_glib(ffi::gst_gl_context_check_feature(self.as_ref().to_glib_none().0, feature.to_glib_none().0)) + from_glib(gst_gl_sys::gst_gl_context_check_feature(self.as_ref().to_glib_none().0, feature.to_glib_none().0)) } } fn check_framebuffer_status(&self, fbo_target: u32) -> bool { unsafe { - from_glib(ffi::gst_gl_context_check_framebuffer_status(self.as_ref().to_glib_none().0, fbo_target)) + from_glib(gst_gl_sys::gst_gl_context_check_framebuffer_status(self.as_ref().to_glib_none().0, fbo_target)) } } fn check_gl_version(&self, api: GLAPI, maj: i32, min: i32) -> bool { unsafe { - from_glib(ffi::gst_gl_context_check_gl_version(self.as_ref().to_glib_none().0, api.to_glib(), maj, min)) + from_glib(gst_gl_sys::gst_gl_context_check_gl_version(self.as_ref().to_glib_none().0, api.to_glib(), maj, min)) } } fn clear_framebuffer(&self) { unsafe { - ffi::gst_gl_context_clear_framebuffer(self.as_ref().to_glib_none().0); + gst_gl_sys::gst_gl_context_clear_framebuffer(self.as_ref().to_glib_none().0); } } fn clear_shader(&self) { unsafe { - ffi::gst_gl_context_clear_shader(self.as_ref().to_glib_none().0); + gst_gl_sys::gst_gl_context_clear_shader(self.as_ref().to_glib_none().0); } } - fn create<'a, P: IsA + 'a, Q: Into>>(&self, other_context: Q) -> Result<(), Error> { - let other_context = other_context.into(); + fn create>(&self, other_context: Option<&P>) -> Result<(), Error> { unsafe { let mut error = ptr::null_mut(); - let _ = ffi::gst_gl_context_create(self.as_ref().to_glib_none().0, other_context.map(|p| p.as_ref()).to_glib_none().0, &mut error); + let _ = gst_gl_sys::gst_gl_context_create(self.as_ref().to_glib_none().0, other_context.map(|p| p.as_ref()).to_glib_none().0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } fn destroy(&self) { unsafe { - ffi::gst_gl_context_destroy(self.as_ref().to_glib_none().0); + gst_gl_sys::gst_gl_context_destroy(self.as_ref().to_glib_none().0); } } fn fill_info(&self) -> Result<(), Error> { unsafe { let mut error = ptr::null_mut(); - let _ = ffi::gst_gl_context_fill_info(self.as_ref().to_glib_none().0, &mut error); + let _ = gst_gl_sys::gst_gl_context_fill_info(self.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } fn get_display(&self) -> GLDisplay { unsafe { - from_glib_full(ffi::gst_gl_context_get_display(self.as_ref().to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_context_get_display(self.as_ref().to_glib_none().0)) } } fn get_gl_api(&self) -> GLAPI { unsafe { - from_glib(ffi::gst_gl_context_get_gl_api(self.as_ref().to_glib_none().0)) + from_glib(gst_gl_sys::gst_gl_context_get_gl_api(self.as_ref().to_glib_none().0)) } } fn get_gl_platform(&self) -> GLPlatform { unsafe { - from_glib(ffi::gst_gl_context_get_gl_platform(self.as_ref().to_glib_none().0)) + from_glib(gst_gl_sys::gst_gl_context_get_gl_platform(self.as_ref().to_glib_none().0)) } } @@ -188,7 +187,7 @@ impl> GLContextExt for O { unsafe { let mut major = mem::uninitialized(); let mut minor = mem::uninitialized(); - ffi::gst_gl_context_get_gl_platform_version(self.as_ref().to_glib_none().0, &mut major, &mut minor); + gst_gl_sys::gst_gl_context_get_gl_platform_version(self.as_ref().to_glib_none().0, &mut major, &mut minor); (major, minor) } } @@ -197,44 +196,44 @@ impl> GLContextExt for O { unsafe { let mut maj = mem::uninitialized(); let mut min = mem::uninitialized(); - ffi::gst_gl_context_get_gl_version(self.as_ref().to_glib_none().0, &mut maj, &mut min); + gst_gl_sys::gst_gl_context_get_gl_version(self.as_ref().to_glib_none().0, &mut maj, &mut min); (maj, min) } } fn get_window(&self) -> Option { unsafe { - from_glib_full(ffi::gst_gl_context_get_window(self.as_ref().to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_context_get_window(self.as_ref().to_glib_none().0)) } } fn is_shared(&self) -> bool { unsafe { - from_glib(ffi::gst_gl_context_is_shared(self.as_ref().to_glib_none().0)) + from_glib(gst_gl_sys::gst_gl_context_is_shared(self.as_ref().to_glib_none().0)) } } fn set_shared_with>(&self, share: &P) { unsafe { - ffi::gst_gl_context_set_shared_with(self.as_ref().to_glib_none().0, share.as_ref().to_glib_none().0); + gst_gl_sys::gst_gl_context_set_shared_with(self.as_ref().to_glib_none().0, share.as_ref().to_glib_none().0); } } fn set_window>(&self, window: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_gl_context_set_window(self.as_ref().to_glib_none().0, window.as_ref().to_glib_full()), "Failed to set window") + glib_result_from_gboolean!(gst_gl_sys::gst_gl_context_set_window(self.as_ref().to_glib_none().0, window.as_ref().to_glib_full()), "Failed to set window") } } fn supports_glsl_profile_version(&self, version: GLSLVersion, profile: GLSLProfile) -> bool { unsafe { - from_glib(ffi::gst_gl_context_supports_glsl_profile_version(self.as_ref().to_glib_none().0, version.to_glib(), profile.to_glib())) + from_glib(gst_gl_sys::gst_gl_context_supports_glsl_profile_version(self.as_ref().to_glib_none().0, version.to_glib(), profile.to_glib())) } } fn swap_buffers(&self) { unsafe { - ffi::gst_gl_context_swap_buffers(self.as_ref().to_glib_none().0); + gst_gl_sys::gst_gl_context_swap_buffers(self.as_ref().to_glib_none().0); } } } diff --git a/gstreamer-gl/src/auto/gl_display.rs b/gstreamer-gl/src/auto/gl_display.rs index 9463966c5..1caefbee6 100644 --- a/gstreamer-gl/src/auto/gl_display.rs +++ b/gstreamer-gl/src/auto/gl_display.rs @@ -7,24 +7,24 @@ use GLAPI; use GLContext; use GLDisplayType; use GLWindow; -use ffi; use glib; use glib::object::Cast; use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; use gst; +use gst_gl_sys; use std::boxed::Box as Box_; use std::mem::transmute; use std::ptr; glib_wrapper! { - pub struct GLDisplay(Object) @extends gst::Object; + pub struct GLDisplay(Object) @extends gst::Object; match fn { - get_type => || ffi::gst_gl_display_get_type(), + get_type => || gst_gl_sys::gst_gl_display_get_type(), } } @@ -32,7 +32,7 @@ impl GLDisplay { pub fn new() -> GLDisplay { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_gl_display_new()) + from_glib_full(gst_gl_sys::gst_gl_display_new()) } } } @@ -71,7 +71,7 @@ pub trait GLDisplayExt: 'static { impl> GLDisplayExt for O { fn add_context>(&self, context: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_gl_display_add_context(self.as_ref().to_glib_none().0, context.as_ref().to_glib_none().0), "Failed to add OpenGL context") + glib_result_from_gboolean!(gst_gl_sys::gst_gl_display_add_context(self.as_ref().to_glib_none().0, context.as_ref().to_glib_none().0), "Failed to add OpenGL context") } } @@ -79,44 +79,44 @@ impl> GLDisplayExt for O { unsafe { let mut p_context = ptr::null_mut(); let mut error = ptr::null_mut(); - let _ = ffi::gst_gl_display_create_context(self.as_ref().to_glib_none().0, other_context.as_ref().to_glib_none().0, &mut p_context, &mut error); + let _ = gst_gl_sys::gst_gl_display_create_context(self.as_ref().to_glib_none().0, other_context.as_ref().to_glib_none().0, &mut p_context, &mut error); if error.is_null() { Ok(from_glib_full(p_context)) } else { Err(from_glib_full(error)) } } } fn create_window(&self) -> Option { unsafe { - from_glib_full(ffi::gst_gl_display_create_window(self.as_ref().to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_display_create_window(self.as_ref().to_glib_none().0)) } } fn filter_gl_api(&self, gl_api: GLAPI) { unsafe { - ffi::gst_gl_display_filter_gl_api(self.as_ref().to_glib_none().0, gl_api.to_glib()); + gst_gl_sys::gst_gl_display_filter_gl_api(self.as_ref().to_glib_none().0, gl_api.to_glib()); } } fn get_gl_api(&self) -> GLAPI { unsafe { - from_glib(ffi::gst_gl_display_get_gl_api(self.as_ref().to_glib_none().0)) + from_glib(gst_gl_sys::gst_gl_display_get_gl_api(self.as_ref().to_glib_none().0)) } } fn get_gl_api_unlocked(&self) -> GLAPI { unsafe { - from_glib(ffi::gst_gl_display_get_gl_api_unlocked(self.as_ref().to_glib_none().0)) + from_glib(gst_gl_sys::gst_gl_display_get_gl_api_unlocked(self.as_ref().to_glib_none().0)) } } fn get_handle_type(&self) -> GLDisplayType { unsafe { - from_glib(ffi::gst_gl_display_get_handle_type(self.as_ref().to_glib_none().0)) + from_glib(gst_gl_sys::gst_gl_display_get_handle_type(self.as_ref().to_glib_none().0)) } } fn remove_window>(&self, window: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_gl_display_remove_window(self.as_ref().to_glib_none().0, window.as_ref().to_glib_none().0), "Failed to remove window") + glib_result_from_gboolean!(gst_gl_sys::gst_gl_display_remove_window(self.as_ref().to_glib_none().0, window.as_ref().to_glib_none().0), "Failed to remove window") } } @@ -129,7 +129,7 @@ impl> GLDisplayExt for O { } } -unsafe extern "C" fn create_context_trampoline GLContext + Send + Sync + 'static>(this: *mut ffi::GstGLDisplay, context: *mut ffi::GstGLContext, f: glib_ffi::gpointer) -> *mut ffi::GstGLContext +unsafe extern "C" fn create_context_trampoline GLContext + Send + Sync + 'static>(this: *mut gst_gl_sys::GstGLDisplay, context: *mut gst_gl_sys::GstGLContext, f: glib_sys::gpointer) -> *mut gst_gl_sys::GstGLContext where P: IsA { let f: &F = &*(f as *const F); f(&GLDisplay::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(context)).to_glib_full() diff --git a/gstreamer-gl/src/auto/gl_display_egl.rs b/gstreamer-gl/src/auto/gl_display_egl.rs index 18dfac41c..051c8bc2e 100644 --- a/gstreamer-gl/src/auto/gl_display_egl.rs +++ b/gstreamer-gl/src/auto/gl_display_egl.rs @@ -3,15 +3,15 @@ // DO NOT EDIT use GLDisplay; -use ffi; use glib::translate::*; use gst; +use gst_gl_sys; glib_wrapper! { - pub struct GLDisplayEGL(Object) @extends GLDisplay, gst::Object; + pub struct GLDisplayEGL(Object) @extends GLDisplay, gst::Object; match fn { - get_type => || ffi::gst_gl_display_egl_get_type(), + get_type => || gst_gl_sys::gst_gl_display_egl_get_type(), } } @@ -19,16 +19,16 @@ impl GLDisplayEGL { pub fn new() -> GLDisplayEGL { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_gl_display_egl_new()) + from_glib_full(gst_gl_sys::gst_gl_display_egl_new()) } } //pub fn new_with_egl_display(display: /*Unimplemented*/Option) -> GLDisplayEGL { - // unsafe { TODO: call ffi::gst_gl_display_egl_new_with_egl_display() } + // unsafe { TODO: call gst_gl_sys:gst_gl_display_egl_new_with_egl_display() } //} //pub fn get_from_native(type_: GLDisplayType, display: /*Unimplemented*/Fundamental: UIntPtr) -> /*Unimplemented*/Option { - // unsafe { TODO: call ffi::gst_gl_display_egl_get_from_native() } + // unsafe { TODO: call gst_gl_sys:gst_gl_display_egl_get_from_native() } //} } diff --git a/gstreamer-gl/src/auto/gl_display_wayland.rs b/gstreamer-gl/src/auto/gl_display_wayland.rs index 1225e2431..e85d5d3c1 100644 --- a/gstreamer-gl/src/auto/gl_display_wayland.rs +++ b/gstreamer-gl/src/auto/gl_display_wayland.rs @@ -3,29 +3,28 @@ // DO NOT EDIT use GLDisplay; -use ffi; use glib::translate::*; use gst; +use gst_gl_sys; glib_wrapper! { - pub struct GLDisplayWayland(Object) @extends GLDisplay, gst::Object; + pub struct GLDisplayWayland(Object) @extends GLDisplay, gst::Object; match fn { - get_type => || ffi::gst_gl_display_wayland_get_type(), + get_type => || gst_gl_sys::gst_gl_display_wayland_get_type(), } } impl GLDisplayWayland { - pub fn new<'a, P: Into>>(name: P) -> GLDisplayWayland { + pub fn new(name: Option<&str>) -> GLDisplayWayland { assert_initialized_main_thread!(); - let name = name.into(); unsafe { - from_glib_full(ffi::gst_gl_display_wayland_new(name.to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_display_wayland_new(name.to_glib_none().0)) } } //pub fn new_with_display(display: /*Unimplemented*/Option) -> GLDisplayWayland { - // unsafe { TODO: call ffi::gst_gl_display_wayland_new_with_display() } + // unsafe { TODO: call gst_gl_sys:gst_gl_display_wayland_new_with_display() } //} } diff --git a/gstreamer-gl/src/auto/gl_display_x11.rs b/gstreamer-gl/src/auto/gl_display_x11.rs index 556cc7dd0..1379951c0 100644 --- a/gstreamer-gl/src/auto/gl_display_x11.rs +++ b/gstreamer-gl/src/auto/gl_display_x11.rs @@ -3,29 +3,28 @@ // DO NOT EDIT use GLDisplay; -use ffi; use glib::translate::*; use gst; +use gst_gl_sys; glib_wrapper! { - pub struct GLDisplayX11(Object) @extends GLDisplay, gst::Object; + pub struct GLDisplayX11(Object) @extends GLDisplay, gst::Object; match fn { - get_type => || ffi::gst_gl_display_x11_get_type(), + get_type => || gst_gl_sys::gst_gl_display_x11_get_type(), } } impl GLDisplayX11 { - pub fn new<'a, P: Into>>(name: P) -> GLDisplayX11 { + pub fn new(name: Option<&str>) -> GLDisplayX11 { assert_initialized_main_thread!(); - let name = name.into(); unsafe { - from_glib_full(ffi::gst_gl_display_x11_new(name.to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_display_x11_new(name.to_glib_none().0)) } } //pub fn new_with_display(display: /*Unimplemented*/Fundamental: Pointer) -> GLDisplayX11 { - // unsafe { TODO: call ffi::gst_gl_display_x11_new_with_display() } + // unsafe { TODO: call gst_gl_sys:gst_gl_display_x11_new_with_display() } //} } diff --git a/gstreamer-gl/src/auto/gl_framebuffer.rs b/gstreamer-gl/src/auto/gl_framebuffer.rs index 8b36a3e9c..b1ceceb88 100644 --- a/gstreamer-gl/src/auto/gl_framebuffer.rs +++ b/gstreamer-gl/src/auto/gl_framebuffer.rs @@ -3,17 +3,17 @@ // DO NOT EDIT use GLContext; -use ffi; use glib::object::IsA; use glib::translate::*; use gst; +use gst_gl_sys; use std::mem; glib_wrapper! { - pub struct GLFramebuffer(Object) @extends gst::Object; + pub struct GLFramebuffer(Object) @extends gst::Object; match fn { - get_type => || ffi::gst_gl_framebuffer_get_type(), + get_type => || gst_gl_sys::gst_gl_framebuffer_get_type(), } } @@ -21,14 +21,14 @@ impl GLFramebuffer { pub fn new>(context: &P) -> GLFramebuffer { skip_assert_initialized!(); unsafe { - from_glib_full(ffi::gst_gl_framebuffer_new(context.as_ref().to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_framebuffer_new(context.as_ref().to_glib_none().0)) } } pub fn new_with_default_depth>(context: &P, width: u32, height: u32) -> GLFramebuffer { skip_assert_initialized!(); unsafe { - from_glib_none(ffi::gst_gl_framebuffer_new_with_default_depth(context.as_ref().to_glib_none().0, width, height)) + from_glib_none(gst_gl_sys::gst_gl_framebuffer_new_with_default_depth(context.as_ref().to_glib_none().0, width, height)) } } } @@ -43,7 +43,7 @@ pub trait GLFramebufferExt: 'static { fn bind(&self); - //fn draw_to_texture(&self, mem: /*Ignored*/&mut GLMemory, func: /*Unimplemented*/FnMut(/*Unimplemented*/Fundamental: Pointer) -> bool, user_data: /*Unimplemented*/Option) -> bool; + //fn draw_to_texture(&self, mem: /*Ignored*/&mut GLMemory, func: /*Unimplemented*/FnMut(/*Unimplemented*/Option) -> bool, user_data: /*Unimplemented*/Option) -> bool; fn get_effective_dimensions(&self) -> (u32, u32); @@ -52,31 +52,31 @@ pub trait GLFramebufferExt: 'static { impl> GLFramebufferExt for O { //fn attach(&self, attachment_point: u32, mem: /*Ignored*/&mut GLBaseMemory) { - // unsafe { TODO: call ffi::gst_gl_framebuffer_attach() } + // unsafe { TODO: call gst_gl_sys:gst_gl_framebuffer_attach() } //} fn bind(&self) { unsafe { - ffi::gst_gl_framebuffer_bind(self.as_ref().to_glib_none().0); + gst_gl_sys::gst_gl_framebuffer_bind(self.as_ref().to_glib_none().0); } } - //fn draw_to_texture(&self, mem: /*Ignored*/&mut GLMemory, func: /*Unimplemented*/FnMut(/*Unimplemented*/Fundamental: Pointer) -> bool, user_data: /*Unimplemented*/Option) -> bool { - // unsafe { TODO: call ffi::gst_gl_framebuffer_draw_to_texture() } + //fn draw_to_texture(&self, mem: /*Ignored*/&mut GLMemory, func: /*Unimplemented*/FnMut(/*Unimplemented*/Option) -> bool, user_data: /*Unimplemented*/Option) -> bool { + // unsafe { TODO: call gst_gl_sys:gst_gl_framebuffer_draw_to_texture() } //} fn get_effective_dimensions(&self) -> (u32, u32) { unsafe { let mut width = mem::uninitialized(); let mut height = mem::uninitialized(); - ffi::gst_gl_framebuffer_get_effective_dimensions(self.as_ref().to_glib_none().0, &mut width, &mut height); + gst_gl_sys::gst_gl_framebuffer_get_effective_dimensions(self.as_ref().to_glib_none().0, &mut width, &mut height); (width, height) } } fn get_id(&self) -> u32 { unsafe { - ffi::gst_gl_framebuffer_get_id(self.as_ref().to_glib_none().0) + gst_gl_sys::gst_gl_framebuffer_get_id(self.as_ref().to_glib_none().0) } } } diff --git a/gstreamer-gl/src/auto/gl_overlay_compositor.rs b/gstreamer-gl/src/auto/gl_overlay_compositor.rs index aaccf1e97..115815a97 100644 --- a/gstreamer-gl/src/auto/gl_overlay_compositor.rs +++ b/gstreamer-gl/src/auto/gl_overlay_compositor.rs @@ -3,16 +3,16 @@ // DO NOT EDIT use GLContext; -use ffi; use glib::object::IsA; use glib::translate::*; use gst; +use gst_gl_sys; glib_wrapper! { - pub struct GLOverlayCompositor(Object) @extends gst::Object; + pub struct GLOverlayCompositor(Object) @extends gst::Object; match fn { - get_type => || ffi::gst_gl_overlay_compositor_get_type(), + get_type => || gst_gl_sys::gst_gl_overlay_compositor_get_type(), } } @@ -20,26 +20,26 @@ impl GLOverlayCompositor { pub fn new>(context: &P) -> GLOverlayCompositor { skip_assert_initialized!(); unsafe { - from_glib_none(ffi::gst_gl_overlay_compositor_new(context.as_ref().to_glib_none().0)) + from_glib_none(gst_gl_sys::gst_gl_overlay_compositor_new(context.as_ref().to_glib_none().0)) } } pub fn draw_overlays(&self) { unsafe { - ffi::gst_gl_overlay_compositor_draw_overlays(self.to_glib_none().0); + gst_gl_sys::gst_gl_overlay_compositor_draw_overlays(self.to_glib_none().0); } } pub fn free_overlays(&self) { unsafe { - ffi::gst_gl_overlay_compositor_free_overlays(self.to_glib_none().0); + gst_gl_sys::gst_gl_overlay_compositor_free_overlays(self.to_glib_none().0); } } pub fn add_caps(caps: &gst::Caps) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_gl_overlay_compositor_add_caps(caps.to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_overlay_compositor_add_caps(caps.to_glib_none().0)) } } } diff --git a/gstreamer-gl/src/auto/gl_shader.rs b/gstreamer-gl/src/auto/gl_shader.rs index 18c43f521..22bfe9efd 100644 --- a/gstreamer-gl/src/auto/gl_shader.rs +++ b/gstreamer-gl/src/auto/gl_shader.rs @@ -5,7 +5,6 @@ use Error; use GLContext; use GLSLStage; -use ffi; use glib; use glib::StaticType; use glib::Value; @@ -14,18 +13,19 @@ use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_gl_sys; use std::boxed::Box as Box_; use std::mem::transmute; use std::ptr; glib_wrapper! { - pub struct GLShader(Object) @extends gst::Object; + pub struct GLShader(Object) @extends gst::Object; match fn { - get_type => || ffi::gst_gl_shader_get_type(), + get_type => || gst_gl_sys::gst_gl_shader_get_type(), } } @@ -33,7 +33,7 @@ impl GLShader { pub fn new>(context: &P) -> GLShader { skip_assert_initialized!(); unsafe { - from_glib_full(ffi::gst_gl_shader_new(context.as_ref().to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_shader_new(context.as_ref().to_glib_none().0)) } } @@ -41,215 +41,215 @@ impl GLShader { skip_assert_initialized!(); unsafe { let mut error = ptr::null_mut(); - let ret = ffi::gst_gl_shader_new_default(context.as_ref().to_glib_none().0, &mut error); + let ret = gst_gl_sys::gst_gl_shader_new_default(context.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } //pub fn new_link_with_stages>(context: &P, error: &mut Error, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> GLShader { - // unsafe { TODO: call ffi::gst_gl_shader_new_link_with_stages() } + // unsafe { TODO: call gst_gl_sys:gst_gl_shader_new_link_with_stages() } //} //pub fn new_with_stages>(context: &P, error: &mut Error, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> GLShader { - // unsafe { TODO: call ffi::gst_gl_shader_new_with_stages() } + // unsafe { TODO: call gst_gl_sys:gst_gl_shader_new_with_stages() } //} pub fn attach(&self, stage: &GLSLStage) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_gl_shader_attach(self.to_glib_none().0, stage.to_glib_none().0), "Failed to attach stage to shader") + glib_result_from_gboolean!(gst_gl_sys::gst_gl_shader_attach(self.to_glib_none().0, stage.to_glib_none().0), "Failed to attach stage to shader") } } pub fn attach_unlocked(&self, stage: &GLSLStage) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_gl_shader_attach_unlocked(self.to_glib_none().0, stage.to_glib_none().0), "Failed to attach stage to shader") + glib_result_from_gboolean!(gst_gl_sys::gst_gl_shader_attach_unlocked(self.to_glib_none().0, stage.to_glib_none().0), "Failed to attach stage to shader") } } pub fn bind_attribute_location(&self, index: u32, name: &str) { unsafe { - ffi::gst_gl_shader_bind_attribute_location(self.to_glib_none().0, index, name.to_glib_none().0); + gst_gl_sys::gst_gl_shader_bind_attribute_location(self.to_glib_none().0, index, name.to_glib_none().0); } } pub fn bind_frag_data_location(&self, index: u32, name: &str) { unsafe { - ffi::gst_gl_shader_bind_frag_data_location(self.to_glib_none().0, index, name.to_glib_none().0); + gst_gl_sys::gst_gl_shader_bind_frag_data_location(self.to_glib_none().0, index, name.to_glib_none().0); } } pub fn compile_attach_stage(&self, stage: &GLSLStage) -> Result<(), Error> { unsafe { let mut error = ptr::null_mut(); - let _ = ffi::gst_gl_shader_compile_attach_stage(self.to_glib_none().0, stage.to_glib_none().0, &mut error); + let _ = gst_gl_sys::gst_gl_shader_compile_attach_stage(self.to_glib_none().0, stage.to_glib_none().0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } pub fn detach(&self, stage: &GLSLStage) { unsafe { - ffi::gst_gl_shader_detach(self.to_glib_none().0, stage.to_glib_none().0); + gst_gl_sys::gst_gl_shader_detach(self.to_glib_none().0, stage.to_glib_none().0); } } pub fn detach_unlocked(&self, stage: &GLSLStage) { unsafe { - ffi::gst_gl_shader_detach_unlocked(self.to_glib_none().0, stage.to_glib_none().0); + gst_gl_sys::gst_gl_shader_detach_unlocked(self.to_glib_none().0, stage.to_glib_none().0); } } pub fn get_attribute_location(&self, name: &str) -> i32 { unsafe { - ffi::gst_gl_shader_get_attribute_location(self.to_glib_none().0, name.to_glib_none().0) + gst_gl_sys::gst_gl_shader_get_attribute_location(self.to_glib_none().0, name.to_glib_none().0) } } pub fn get_program_handle(&self) -> i32 { unsafe { - ffi::gst_gl_shader_get_program_handle(self.to_glib_none().0) + gst_gl_sys::gst_gl_shader_get_program_handle(self.to_glib_none().0) } } pub fn is_linked(&self) -> bool { unsafe { - from_glib(ffi::gst_gl_shader_is_linked(self.to_glib_none().0)) + from_glib(gst_gl_sys::gst_gl_shader_is_linked(self.to_glib_none().0)) } } pub fn link(&self) -> Result<(), Error> { unsafe { let mut error = ptr::null_mut(); - let _ = ffi::gst_gl_shader_link(self.to_glib_none().0, &mut error); + let _ = gst_gl_sys::gst_gl_shader_link(self.to_glib_none().0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } pub fn release(&self) { unsafe { - ffi::gst_gl_shader_release(self.to_glib_none().0); + gst_gl_sys::gst_gl_shader_release(self.to_glib_none().0); } } pub fn release_unlocked(&self) { unsafe { - ffi::gst_gl_shader_release_unlocked(self.to_glib_none().0); + gst_gl_sys::gst_gl_shader_release_unlocked(self.to_glib_none().0); } } pub fn set_uniform_1f(&self, name: &str, value: f32) { unsafe { - ffi::gst_gl_shader_set_uniform_1f(self.to_glib_none().0, name.to_glib_none().0, value); + gst_gl_sys::gst_gl_shader_set_uniform_1f(self.to_glib_none().0, name.to_glib_none().0, value); } } pub fn set_uniform_1fv(&self, name: &str, value: &[f32]) { let count = value.len() as u32; unsafe { - ffi::gst_gl_shader_set_uniform_1fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); + gst_gl_sys::gst_gl_shader_set_uniform_1fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); } } pub fn set_uniform_1i(&self, name: &str, value: i32) { unsafe { - ffi::gst_gl_shader_set_uniform_1i(self.to_glib_none().0, name.to_glib_none().0, value); + gst_gl_sys::gst_gl_shader_set_uniform_1i(self.to_glib_none().0, name.to_glib_none().0, value); } } pub fn set_uniform_1iv(&self, name: &str, value: &[i32]) { let count = value.len() as u32; unsafe { - ffi::gst_gl_shader_set_uniform_1iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); + gst_gl_sys::gst_gl_shader_set_uniform_1iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); } } pub fn set_uniform_2f(&self, name: &str, v0: f32, v1: f32) { unsafe { - ffi::gst_gl_shader_set_uniform_2f(self.to_glib_none().0, name.to_glib_none().0, v0, v1); + gst_gl_sys::gst_gl_shader_set_uniform_2f(self.to_glib_none().0, name.to_glib_none().0, v0, v1); } } pub fn set_uniform_2fv(&self, name: &str, value: &[f32]) { let count = value.len() as u32; unsafe { - ffi::gst_gl_shader_set_uniform_2fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); + gst_gl_sys::gst_gl_shader_set_uniform_2fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); } } pub fn set_uniform_2i(&self, name: &str, v0: i32, v1: i32) { unsafe { - ffi::gst_gl_shader_set_uniform_2i(self.to_glib_none().0, name.to_glib_none().0, v0, v1); + gst_gl_sys::gst_gl_shader_set_uniform_2i(self.to_glib_none().0, name.to_glib_none().0, v0, v1); } } pub fn set_uniform_2iv(&self, name: &str, value: &[i32]) { let count = value.len() as u32; unsafe { - ffi::gst_gl_shader_set_uniform_2iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); + gst_gl_sys::gst_gl_shader_set_uniform_2iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); } } pub fn set_uniform_3f(&self, name: &str, v0: f32, v1: f32, v2: f32) { unsafe { - ffi::gst_gl_shader_set_uniform_3f(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2); + gst_gl_sys::gst_gl_shader_set_uniform_3f(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2); } } pub fn set_uniform_3fv(&self, name: &str, value: &[f32]) { let count = value.len() as u32; unsafe { - ffi::gst_gl_shader_set_uniform_3fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); + gst_gl_sys::gst_gl_shader_set_uniform_3fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); } } pub fn set_uniform_3i(&self, name: &str, v0: i32, v1: i32, v2: i32) { unsafe { - ffi::gst_gl_shader_set_uniform_3i(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2); + gst_gl_sys::gst_gl_shader_set_uniform_3i(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2); } } pub fn set_uniform_3iv(&self, name: &str, value: &[i32]) { let count = value.len() as u32; unsafe { - ffi::gst_gl_shader_set_uniform_3iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); + gst_gl_sys::gst_gl_shader_set_uniform_3iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); } } pub fn set_uniform_4f(&self, name: &str, v0: f32, v1: f32, v2: f32, v3: f32) { unsafe { - ffi::gst_gl_shader_set_uniform_4f(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2, v3); + gst_gl_sys::gst_gl_shader_set_uniform_4f(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2, v3); } } pub fn set_uniform_4fv(&self, name: &str, value: &[f32]) { let count = value.len() as u32; unsafe { - ffi::gst_gl_shader_set_uniform_4fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); + gst_gl_sys::gst_gl_shader_set_uniform_4fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); } } pub fn set_uniform_4i(&self, name: &str, v0: i32, v1: i32, v2: i32, v3: i32) { unsafe { - ffi::gst_gl_shader_set_uniform_4i(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2, v3); + gst_gl_sys::gst_gl_shader_set_uniform_4i(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2, v3); } } pub fn set_uniform_4iv(&self, name: &str, value: &[i32]) { let count = value.len() as u32; unsafe { - ffi::gst_gl_shader_set_uniform_4iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); + gst_gl_sys::gst_gl_shader_set_uniform_4iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0); } } pub fn use_(&self) { unsafe { - ffi::gst_gl_shader_use(self.to_glib_none().0); + gst_gl_sys::gst_gl_shader_use(self.to_glib_none().0); } } pub fn get_property_linked(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"linked\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"linked\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -266,7 +266,7 @@ impl GLShader { unsafe impl Send for GLShader {} unsafe impl Sync for GLShader {} -unsafe extern "C" fn notify_linked_trampoline(this: *mut ffi::GstGLShader, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_linked_trampoline(this: *mut gst_gl_sys::GstGLShader, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer-gl/src/auto/gl_upload.rs b/gstreamer-gl/src/auto/gl_upload.rs index faa54a42c..035f6028c 100644 --- a/gstreamer-gl/src/auto/gl_upload.rs +++ b/gstreamer-gl/src/auto/gl_upload.rs @@ -3,18 +3,18 @@ // DO NOT EDIT use GLContext; -use ffi; use glib; use glib::object::IsA; use glib::translate::*; use gst; +use gst_gl_sys; use std::ptr; glib_wrapper! { - pub struct GLUpload(Object) @extends gst::Object; + pub struct GLUpload(Object) @extends gst::Object; match fn { - get_type => || ffi::gst_gl_upload_get_type(), + get_type => || gst_gl_sys::gst_gl_upload_get_type(), } } @@ -22,7 +22,7 @@ impl GLUpload { pub fn new>(context: &P) -> GLUpload { skip_assert_initialized!(); unsafe { - from_glib_full(ffi::gst_gl_upload_new(context.as_ref().to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_upload_new(context.as_ref().to_glib_none().0)) } } @@ -30,33 +30,33 @@ impl GLUpload { unsafe { let mut in_caps = ptr::null_mut(); let mut out_caps = ptr::null_mut(); - ffi::gst_gl_upload_get_caps(self.to_glib_none().0, &mut in_caps, &mut out_caps); + gst_gl_sys::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)) } } pub fn set_caps(&self, in_caps: &gst::Caps, out_caps: &gst::Caps) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_gl_upload_set_caps(self.to_glib_none().0, in_caps.to_glib_none().0, out_caps.to_glib_none().0), "Failed to set caps") + glib_result_from_gboolean!(gst_gl_sys::gst_gl_upload_set_caps(self.to_glib_none().0, in_caps.to_glib_none().0, out_caps.to_glib_none().0), "Failed to set caps") } } pub fn set_context>(&self, context: &P) { unsafe { - ffi::gst_gl_upload_set_context(self.to_glib_none().0, context.as_ref().to_glib_none().0); + gst_gl_sys::gst_gl_upload_set_context(self.to_glib_none().0, context.as_ref().to_glib_none().0); } } pub fn transform_caps>(&self, context: &P, direction: gst::PadDirection, caps: &gst::Caps, filter: &gst::Caps) -> Option { unsafe { - from_glib_full(ffi::gst_gl_upload_transform_caps(self.to_glib_none().0, context.as_ref().to_glib_none().0, direction.to_glib(), caps.to_glib_none().0, filter.to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_upload_transform_caps(self.to_glib_none().0, context.as_ref().to_glib_none().0, direction.to_glib(), caps.to_glib_none().0, filter.to_glib_none().0)) } } pub fn get_input_template_caps() -> gst::Caps { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_gl_upload_get_input_template_caps()) + from_glib_full(gst_gl_sys::gst_gl_upload_get_input_template_caps()) } } } diff --git a/gstreamer-gl/src/auto/gl_view_convert.rs b/gstreamer-gl/src/auto/gl_view_convert.rs index a242024e4..e786727fb 100644 --- a/gstreamer-gl/src/auto/gl_view_convert.rs +++ b/gstreamer-gl/src/auto/gl_view_convert.rs @@ -4,7 +4,6 @@ use GLContext; use GLStereoDownmix; -use ffi; use glib; use glib::StaticType; use glib::Value; @@ -13,18 +12,19 @@ use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_gl_sys; use gst_video; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct GLViewConvert(Object) @extends gst::Object; + pub struct GLViewConvert(Object) @extends gst::Object; match fn { - get_type => || ffi::gst_gl_view_convert_get_type(), + get_type => || gst_gl_sys::gst_gl_view_convert_get_type(), } } @@ -32,107 +32,107 @@ impl GLViewConvert { pub fn new() -> GLViewConvert { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_gl_view_convert_new()) + from_glib_full(gst_gl_sys::gst_gl_view_convert_new()) } } pub fn perform(&self, inbuf: &gst::Buffer) -> Option { unsafe { - from_glib_full(ffi::gst_gl_view_convert_perform(self.to_glib_none().0, inbuf.to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_view_convert_perform(self.to_glib_none().0, inbuf.to_glib_none().0)) } } pub fn reset(&self) { unsafe { - ffi::gst_gl_view_convert_reset(self.to_glib_none().0); + gst_gl_sys::gst_gl_view_convert_reset(self.to_glib_none().0); } } pub fn set_caps(&self, in_caps: &gst::Caps, out_caps: &gst::Caps) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_gl_view_convert_set_caps(self.to_glib_none().0, in_caps.to_glib_none().0, out_caps.to_glib_none().0), "Failed to set caps") + glib_result_from_gboolean!(gst_gl_sys::gst_gl_view_convert_set_caps(self.to_glib_none().0, in_caps.to_glib_none().0, out_caps.to_glib_none().0), "Failed to set caps") } } pub fn set_context>(&self, context: &P) { unsafe { - ffi::gst_gl_view_convert_set_context(self.to_glib_none().0, context.as_ref().to_glib_none().0); + gst_gl_sys::gst_gl_view_convert_set_context(self.to_glib_none().0, context.as_ref().to_glib_none().0); } } pub fn transform_caps(&self, direction: gst::PadDirection, caps: &gst::Caps, filter: &gst::Caps) -> Option { unsafe { - from_glib_full(ffi::gst_gl_view_convert_transform_caps(self.to_glib_none().0, direction.to_glib(), caps.to_glib_none().0, filter.to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_view_convert_transform_caps(self.to_glib_none().0, direction.to_glib(), caps.to_glib_none().0, filter.to_glib_none().0)) } } pub fn get_property_downmix_mode(&self) -> GLStereoDownmix { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"downmix-mode\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"downmix-mode\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_downmix_mode(&self, downmix_mode: GLStereoDownmix) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"downmix-mode\0".as_ptr() as *const _, Value::from(&downmix_mode).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"downmix-mode\0".as_ptr() as *const _, Value::from(&downmix_mode).to_glib_none().0); } } pub fn get_property_input_flags_override(&self) -> gst_video::VideoMultiviewFlags { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"input-flags-override\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"input-flags-override\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_input_flags_override(&self, input_flags_override: gst_video::VideoMultiviewFlags) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"input-flags-override\0".as_ptr() as *const _, Value::from(&input_flags_override).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"input-flags-override\0".as_ptr() as *const _, Value::from(&input_flags_override).to_glib_none().0); } } pub fn get_property_input_mode_override(&self) -> gst_video::VideoMultiviewMode { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"input-mode-override\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"input-mode-override\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_input_mode_override(&self, input_mode_override: gst_video::VideoMultiviewMode) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"input-mode-override\0".as_ptr() as *const _, Value::from(&input_mode_override).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"input-mode-override\0".as_ptr() as *const _, Value::from(&input_mode_override).to_glib_none().0); } } pub fn get_property_output_flags_override(&self) -> gst_video::VideoMultiviewFlags { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"output-flags-override\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"output-flags-override\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_output_flags_override(&self, output_flags_override: gst_video::VideoMultiviewFlags) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"output-flags-override\0".as_ptr() as *const _, Value::from(&output_flags_override).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"output-flags-override\0".as_ptr() as *const _, Value::from(&output_flags_override).to_glib_none().0); } } pub fn get_property_output_mode_override(&self) -> gst_video::VideoMultiviewMode { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"output-mode-override\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"output-mode-override\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_output_mode_override(&self, output_mode_override: gst_video::VideoMultiviewMode) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"output-mode-override\0".as_ptr() as *const _, Value::from(&output_mode_override).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"output-mode-override\0".as_ptr() as *const _, Value::from(&output_mode_override).to_glib_none().0); } } @@ -186,27 +186,27 @@ impl Default for GLViewConvert { unsafe impl Send for GLViewConvert {} unsafe impl Sync for GLViewConvert {} -unsafe extern "C" fn notify_downmix_mode_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_downmix_mode_trampoline(this: *mut gst_gl_sys::GstGLViewConvert, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_input_flags_override_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_input_flags_override_trampoline(this: *mut gst_gl_sys::GstGLViewConvert, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_input_mode_override_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_input_mode_override_trampoline(this: *mut gst_gl_sys::GstGLViewConvert, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_output_flags_override_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_output_flags_override_trampoline(this: *mut gst_gl_sys::GstGLViewConvert, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_output_mode_override_trampoline(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_output_mode_override_trampoline(this: *mut gst_gl_sys::GstGLViewConvert, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer-gl/src/auto/gl_window.rs b/gstreamer-gl/src/auto/gl_window.rs index 0197a9b9a..aea3fcad8 100644 --- a/gstreamer-gl/src/auto/gl_window.rs +++ b/gstreamer-gl/src/auto/gl_window.rs @@ -4,7 +4,6 @@ use GLContext; use GLDisplay; -use ffi; use glib; use glib::GString; use glib::object::Cast; @@ -12,18 +11,19 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; use gst; +use gst_gl_sys; use libc; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; glib_wrapper! { - pub struct GLWindow(Object) @extends gst::Object; + pub struct GLWindow(Object) @extends gst::Object; match fn { - get_type => || ffi::gst_gl_window_get_type(), + get_type => || gst_gl_sys::gst_gl_window_get_type(), } } @@ -31,7 +31,7 @@ impl GLWindow { pub fn new>(display: &P) -> GLWindow { skip_assert_initialized!(); unsafe { - from_glib_full(ffi::gst_gl_window_new(display.as_ref().to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_window_new(display.as_ref().to_glib_none().0)) } } } @@ -76,13 +76,13 @@ pub trait GLWindowExt: 'static { impl> GLWindowExt for O { fn draw(&self) { unsafe { - ffi::gst_gl_window_draw(self.as_ref().to_glib_none().0); + gst_gl_sys::gst_gl_window_draw(self.as_ref().to_glib_none().0); } } fn get_context(&self) -> Option { unsafe { - from_glib_full(ffi::gst_gl_window_get_context(self.as_ref().to_glib_none().0)) + from_glib_full(gst_gl_sys::gst_gl_window_get_context(self.as_ref().to_glib_none().0)) } } @@ -90,68 +90,68 @@ impl> GLWindowExt for O { unsafe { let mut width = mem::uninitialized(); let mut height = mem::uninitialized(); - ffi::gst_gl_window_get_surface_dimensions(self.as_ref().to_glib_none().0, &mut width, &mut height); + gst_gl_sys::gst_gl_window_get_surface_dimensions(self.as_ref().to_glib_none().0, &mut width, &mut height); (width, height) } } fn handle_events(&self, handle_events: bool) { unsafe { - ffi::gst_gl_window_handle_events(self.as_ref().to_glib_none().0, handle_events.to_glib()); + gst_gl_sys::gst_gl_window_handle_events(self.as_ref().to_glib_none().0, handle_events.to_glib()); } } fn queue_resize(&self) { unsafe { - ffi::gst_gl_window_queue_resize(self.as_ref().to_glib_none().0); + gst_gl_sys::gst_gl_window_queue_resize(self.as_ref().to_glib_none().0); } } fn quit(&self) { unsafe { - ffi::gst_gl_window_quit(self.as_ref().to_glib_none().0); + gst_gl_sys::gst_gl_window_quit(self.as_ref().to_glib_none().0); } } fn resize(&self, width: u32, height: u32) { unsafe { - ffi::gst_gl_window_resize(self.as_ref().to_glib_none().0, width, height); + gst_gl_sys::gst_gl_window_resize(self.as_ref().to_glib_none().0, width, height); } } fn run(&self) { unsafe { - ffi::gst_gl_window_run(self.as_ref().to_glib_none().0); + gst_gl_sys::gst_gl_window_run(self.as_ref().to_glib_none().0); } } fn send_key_event(&self, event_type: &str, key_str: &str) { unsafe { - ffi::gst_gl_window_send_key_event(self.as_ref().to_glib_none().0, event_type.to_glib_none().0, key_str.to_glib_none().0); + gst_gl_sys::gst_gl_window_send_key_event(self.as_ref().to_glib_none().0, event_type.to_glib_none().0, key_str.to_glib_none().0); } } fn send_mouse_event(&self, event_type: &str, button: i32, posx: f64, posy: f64) { unsafe { - ffi::gst_gl_window_send_mouse_event(self.as_ref().to_glib_none().0, event_type.to_glib_none().0, button, posx, posy); + gst_gl_sys::gst_gl_window_send_mouse_event(self.as_ref().to_glib_none().0, event_type.to_glib_none().0, button, posx, posy); } } fn set_preferred_size(&self, width: i32, height: i32) { unsafe { - ffi::gst_gl_window_set_preferred_size(self.as_ref().to_glib_none().0, width, height); + gst_gl_sys::gst_gl_window_set_preferred_size(self.as_ref().to_glib_none().0, width, height); } } fn set_render_rectangle(&self, x: i32, y: i32, width: i32, height: i32) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_gl_window_set_render_rectangle(self.as_ref().to_glib_none().0, x, y, width, height), "Failed to set the specified region") + glib_result_from_gboolean!(gst_gl_sys::gst_gl_window_set_render_rectangle(self.as_ref().to_glib_none().0, x, y, width, height), "Failed to set the specified region") } } fn show(&self) { unsafe { - ffi::gst_gl_window_show(self.as_ref().to_glib_none().0); + gst_gl_sys::gst_gl_window_show(self.as_ref().to_glib_none().0); } } @@ -172,13 +172,13 @@ impl> GLWindowExt for O { } } -unsafe extern "C" fn key_event_trampoline(this: *mut ffi::GstGLWindow, id: *mut libc::c_char, key: *mut libc::c_char, f: glib_ffi::gpointer) +unsafe extern "C" fn key_event_trampoline(this: *mut gst_gl_sys::GstGLWindow, id: *mut libc::c_char, key: *mut libc::c_char, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&GLWindow::from_glib_borrow(this).unsafe_cast(), &GString::from_glib_borrow(id), &GString::from_glib_borrow(key)) } -unsafe extern "C" fn mouse_event_trampoline(this: *mut ffi::GstGLWindow, id: *mut libc::c_char, button: libc::c_int, x: libc::c_double, y: libc::c_double, f: glib_ffi::gpointer) +unsafe extern "C" fn mouse_event_trampoline(this: *mut gst_gl_sys::GstGLWindow, id: *mut libc::c_char, button: libc::c_int, x: libc::c_double, y: libc::c_double, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&GLWindow::from_glib_borrow(this).unsafe_cast(), &GString::from_glib_borrow(id), button, x, y) diff --git a/gstreamer-gl/src/auto/glsl_stage.rs b/gstreamer-gl/src/auto/glsl_stage.rs index e33589083..f3b3aefac 100644 --- a/gstreamer-gl/src/auto/glsl_stage.rs +++ b/gstreamer-gl/src/auto/glsl_stage.rs @@ -6,19 +6,19 @@ use Error; use GLContext; use GLSLProfile; use GLSLVersion; -use ffi; use glib; use glib::GString; use glib::object::IsA; use glib::translate::*; use gst; +use gst_gl_sys; use std::ptr; glib_wrapper! { - pub struct GLSLStage(Object) @extends gst::Object; + pub struct GLSLStage(Object) @extends gst::Object; match fn { - get_type => || ffi::gst_glsl_stage_get_type(), + get_type => || gst_gl_sys::gst_glsl_stage_get_type(), } } @@ -26,28 +26,28 @@ impl GLSLStage { pub fn new>(context: &P, type_: u32) -> GLSLStage { skip_assert_initialized!(); unsafe { - from_glib_none(ffi::gst_glsl_stage_new(context.as_ref().to_glib_none().0, type_)) + from_glib_none(gst_gl_sys::gst_glsl_stage_new(context.as_ref().to_glib_none().0, type_)) } } pub fn new_default_fragment>(context: &P) -> GLSLStage { skip_assert_initialized!(); unsafe { - from_glib_none(ffi::gst_glsl_stage_new_default_fragment(context.as_ref().to_glib_none().0)) + from_glib_none(gst_gl_sys::gst_glsl_stage_new_default_fragment(context.as_ref().to_glib_none().0)) } } pub fn new_default_vertex>(context: &P) -> GLSLStage { skip_assert_initialized!(); unsafe { - from_glib_none(ffi::gst_glsl_stage_new_default_vertex(context.as_ref().to_glib_none().0)) + from_glib_none(gst_gl_sys::gst_glsl_stage_new_default_vertex(context.as_ref().to_glib_none().0)) } } pub fn new_with_string>(context: &P, type_: u32, version: GLSLVersion, profile: GLSLProfile, str: &str) -> GLSLStage { skip_assert_initialized!(); unsafe { - from_glib_none(ffi::gst_glsl_stage_new_with_string(context.as_ref().to_glib_none().0, type_, version.to_glib(), profile.to_glib(), str.to_glib_none().0)) + from_glib_none(gst_gl_sys::gst_glsl_stage_new_with_string(context.as_ref().to_glib_none().0, type_, version.to_glib(), profile.to_glib(), str.to_glib_none().0)) } } @@ -55,46 +55,46 @@ impl GLSLStage { skip_assert_initialized!(); let n_strings = str.len() as i32; unsafe { - from_glib_none(ffi::gst_glsl_stage_new_with_strings(context.as_ref().to_glib_none().0, type_, version.to_glib(), profile.to_glib(), n_strings, str.to_glib_none().0)) + from_glib_none(gst_gl_sys::gst_glsl_stage_new_with_strings(context.as_ref().to_glib_none().0, type_, version.to_glib(), profile.to_glib(), n_strings, str.to_glib_none().0)) } } pub fn compile(&self) -> Result<(), Error> { unsafe { let mut error = ptr::null_mut(); - let _ = ffi::gst_glsl_stage_compile(self.to_glib_none().0, &mut error); + let _ = gst_gl_sys::gst_glsl_stage_compile(self.to_glib_none().0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } pub fn get_handle(&self) -> u32 { unsafe { - ffi::gst_glsl_stage_get_handle(self.to_glib_none().0) + gst_gl_sys::gst_glsl_stage_get_handle(self.to_glib_none().0) } } pub fn get_profile(&self) -> GLSLProfile { unsafe { - from_glib(ffi::gst_glsl_stage_get_profile(self.to_glib_none().0)) + from_glib(gst_gl_sys::gst_glsl_stage_get_profile(self.to_glib_none().0)) } } pub fn get_shader_type(&self) -> u32 { unsafe { - ffi::gst_glsl_stage_get_shader_type(self.to_glib_none().0) + gst_gl_sys::gst_glsl_stage_get_shader_type(self.to_glib_none().0) } } pub fn get_version(&self) -> GLSLVersion { unsafe { - from_glib(ffi::gst_glsl_stage_get_version(self.to_glib_none().0)) + from_glib(gst_gl_sys::gst_glsl_stage_get_version(self.to_glib_none().0)) } } pub fn set_strings(&self, version: GLSLVersion, profile: GLSLProfile, str: &[&str]) -> Result<(), glib::error::BoolError> { let n_strings = str.len() as i32; unsafe { - glib_result_from_gboolean!(ffi::gst_glsl_stage_set_strings(self.to_glib_none().0, version.to_glib(), profile.to_glib(), n_strings, str.to_glib_none().0), "Failed to attach stage to set strings") + glib_result_from_gboolean!(gst_gl_sys::gst_glsl_stage_set_strings(self.to_glib_none().0, version.to_glib(), profile.to_glib(), n_strings, str.to_glib_none().0), "Failed to attach stage to set strings") } } } diff --git a/gstreamer-gl/src/auto/versions.txt b/gstreamer-gl/src/auto/versions.txt index b9131200d..a9e0ccc5d 100644 --- a/gstreamer-gl/src/auto/versions.txt +++ b/gstreamer-gl/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-net/src/auto/net_client_clock.rs b/gstreamer-net/src/auto/net_client_clock.rs index c8ba4e9ba..aa729cba2 100644 --- a/gstreamer-net/src/auto/net_client_clock.rs +++ b/gstreamer-net/src/auto/net_client_clock.rs @@ -2,27 +2,25 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; -use glib; use glib::GString; use glib::StaticType; use glib::Value; -use glib::object::IsA; use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_net_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct NetClientClock(Object) @extends gst::Clock, gst::Object; + pub struct NetClientClock(Object) @extends gst::Clock, gst::Object; match fn { - get_type => || ffi::gst_net_client_clock_get_type(), + get_type => || gst_net_sys::gst_net_client_clock_get_type(), } } @@ -30,22 +28,21 @@ impl NetClientClock { pub fn get_property_address(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - pub fn set_property_address<'a, P: Into>>(&self, address: P) { - let address = address.into(); + pub fn set_property_address(&self, address: Option<&str>) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"address\0".as_ptr() as *const _, Value::from(address).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"address\0".as_ptr() as *const _, Value::from(address).to_glib_none().0); } } pub fn get_property_base_time(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"base-time\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"base-time\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -53,21 +50,21 @@ impl NetClientClock { pub fn get_property_bus(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"bus\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"bus\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - pub fn set_property_bus + glib::value::SetValueOptional>(&self, bus: Option<&P>) { + pub fn set_property_bus(&self, bus: Option<&gst::Bus>) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"bus\0".as_ptr() as *const _, Value::from(bus).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"bus\0".as_ptr() as *const _, Value::from(bus).to_glib_none().0); } } pub fn get_property_internal_clock(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -75,56 +72,56 @@ impl NetClientClock { pub fn get_property_minimum_update_interval(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"minimum-update-interval\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"minimum-update-interval\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_minimum_update_interval(&self, minimum_update_interval: u64) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"minimum-update-interval\0".as_ptr() as *const _, Value::from(&minimum_update_interval).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"minimum-update-interval\0".as_ptr() as *const _, Value::from(&minimum_update_interval).to_glib_none().0); } } pub fn get_property_port(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"port\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"port\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_port(&self, port: i32) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"port\0".as_ptr() as *const _, Value::from(&port).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"port\0".as_ptr() as *const _, Value::from(&port).to_glib_none().0); } } pub fn get_property_qos_dscp(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"qos-dscp\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"qos-dscp\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_qos_dscp(&self, qos_dscp: i32) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"qos-dscp\0".as_ptr() as *const _, Value::from(&qos_dscp).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"qos-dscp\0".as_ptr() as *const _, Value::from(&qos_dscp).to_glib_none().0); } } pub fn get_property_round_trip_limit(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"round-trip-limit\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"round-trip-limit\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_round_trip_limit(&self, round_trip_limit: u64) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"round-trip-limit\0".as_ptr() as *const _, Value::from(&round_trip_limit).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"round-trip-limit\0".as_ptr() as *const _, Value::from(&round_trip_limit).to_glib_none().0); } } @@ -188,37 +185,37 @@ impl NetClientClock { unsafe impl Send for NetClientClock {} unsafe impl Sync for NetClientClock {} -unsafe extern "C" fn notify_address_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_address_trampoline(this: *mut gst_net_sys::GstNetClientClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_bus_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_bus_trampoline(this: *mut gst_net_sys::GstNetClientClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_internal_clock_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_internal_clock_trampoline(this: *mut gst_net_sys::GstNetClientClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_minimum_update_interval_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_minimum_update_interval_trampoline(this: *mut gst_net_sys::GstNetClientClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_port_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_port_trampoline(this: *mut gst_net_sys::GstNetClientClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_qos_dscp_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_qos_dscp_trampoline(this: *mut gst_net_sys::GstNetClientClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_round_trip_limit_trampoline(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_round_trip_limit_trampoline(this: *mut gst_net_sys::GstNetClientClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer-net/src/auto/net_time_provider.rs b/gstreamer-net/src/auto/net_time_provider.rs index 72b2a9f64..bb496d569 100644 --- a/gstreamer-net/src/auto/net_time_provider.rs +++ b/gstreamer-net/src/auto/net_time_provider.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::GString; use glib::StaticType; use glib::Value; @@ -10,17 +9,18 @@ use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_net_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct NetTimeProvider(Object) @extends gst::Object; + pub struct NetTimeProvider(Object) @extends gst::Object; match fn { - get_type => || ffi::gst_net_time_provider_get_type(), + get_type => || gst_net_sys::gst_net_time_provider_get_type(), } } @@ -28,21 +28,21 @@ impl NetTimeProvider { pub fn get_property_active(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"active\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"active\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_active(&self, active: bool) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"active\0".as_ptr() as *const _, Value::from(&active).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"active\0".as_ptr() as *const _, Value::from(&active).to_glib_none().0); } } pub fn get_property_address(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -50,7 +50,7 @@ impl NetTimeProvider { pub fn get_property_clock(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"clock\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"clock\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -58,7 +58,7 @@ impl NetTimeProvider { pub fn get_property_port(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"port\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"port\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -66,14 +66,14 @@ impl NetTimeProvider { pub fn get_property_qos_dscp(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"qos-dscp\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"qos-dscp\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_qos_dscp(&self, qos_dscp: i32) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"qos-dscp\0".as_ptr() as *const _, Value::from(&qos_dscp).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"qos-dscp\0".as_ptr() as *const _, Value::from(&qos_dscp).to_glib_none().0); } } @@ -97,12 +97,12 @@ impl NetTimeProvider { unsafe impl Send for NetTimeProvider {} unsafe impl Sync for NetTimeProvider {} -unsafe extern "C" fn notify_active_trampoline(this: *mut ffi::GstNetTimeProvider, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_active_trampoline(this: *mut gst_net_sys::GstNetTimeProvider, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_qos_dscp_trampoline(this: *mut ffi::GstNetTimeProvider, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_qos_dscp_trampoline(this: *mut gst_net_sys::GstNetTimeProvider, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer-net/src/auto/ntp_clock.rs b/gstreamer-net/src/auto/ntp_clock.rs index 7c09d6776..cf3dcadea 100644 --- a/gstreamer-net/src/auto/ntp_clock.rs +++ b/gstreamer-net/src/auto/ntp_clock.rs @@ -3,15 +3,15 @@ // DO NOT EDIT use NetClientClock; -use ffi; use glib::translate::*; use gst; +use gst_net_sys; glib_wrapper! { - pub struct NtpClock(Object) @extends NetClientClock, gst::Clock, gst::Object; + pub struct NtpClock(Object) @extends NetClientClock, gst::Clock, gst::Object; match fn { - get_type => || ffi::gst_ntp_clock_get_type(), + get_type => || gst_net_sys::gst_ntp_clock_get_type(), } } diff --git a/gstreamer-net/src/auto/ptp_clock.rs b/gstreamer-net/src/auto/ptp_clock.rs index 6c18995ae..f99d79b47 100644 --- a/gstreamer-net/src/auto/ptp_clock.rs +++ b/gstreamer-net/src/auto/ptp_clock.rs @@ -2,24 +2,24 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Value; use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_net_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct PtpClock(Object) @extends gst::Clock, gst::Object; + pub struct PtpClock(Object) @extends gst::Clock, gst::Object; match fn { - get_type => || ffi::gst_ptp_clock_get_type(), + get_type => || gst_net_sys::gst_ptp_clock_get_type(), } } @@ -27,7 +27,7 @@ impl PtpClock { pub fn get_property_domain(&self) -> u32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"domain\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"domain\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -35,7 +35,7 @@ impl PtpClock { pub fn get_property_grandmaster_clock_id(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"grandmaster-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"grandmaster-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -43,7 +43,7 @@ impl PtpClock { pub fn get_property_internal_clock(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -51,7 +51,7 @@ impl PtpClock { pub fn get_property_master_clock_id(&self) -> u64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"master-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"master-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -84,17 +84,17 @@ impl PtpClock { unsafe impl Send for PtpClock {} unsafe impl Sync for PtpClock {} -unsafe extern "C" fn notify_grandmaster_clock_id_trampoline(this: *mut ffi::GstPtpClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_grandmaster_clock_id_trampoline(this: *mut gst_net_sys::GstPtpClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_internal_clock_trampoline(this: *mut ffi::GstPtpClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_internal_clock_trampoline(this: *mut gst_net_sys::GstPtpClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_master_clock_id_trampoline(this: *mut ffi::GstPtpClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_master_clock_id_trampoline(this: *mut gst_net_sys::GstPtpClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer-net/src/auto/versions.txt b/gstreamer-net/src/auto/versions.txt index b9131200d..a9e0ccc5d 100644 --- a/gstreamer-net/src/auto/versions.txt +++ b/gstreamer-net/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-pbutils/src/auto/discoverer.rs b/gstreamer-pbutils/src/auto/discoverer.rs index 0c07d29e3..41340ee60 100644 --- a/gstreamer-pbutils/src/auto/discoverer.rs +++ b/gstreamer-pbutils/src/auto/discoverer.rs @@ -4,24 +4,24 @@ use DiscovererInfo; use Error; -use ffi; use glib; use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; use gst; -use gst_ffi; +use gst_pbutils_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem::transmute; use std::ptr; glib_wrapper! { - pub struct Discoverer(Object); + pub struct Discoverer(Object); match fn { - get_type => || ffi::gst_discoverer_get_type(), + get_type => || gst_pbutils_sys::gst_discoverer_get_type(), } } @@ -30,7 +30,7 @@ impl Discoverer { assert_initialized_main_thread!(); unsafe { let mut error = ptr::null_mut(); - let ret = ffi::gst_discoverer_new(timeout.to_glib(), &mut error); + let ret = gst_pbutils_sys::gst_discoverer_new(timeout.to_glib(), &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } @@ -38,26 +38,26 @@ impl Discoverer { pub fn discover_uri(&self, uri: &str) -> Result { unsafe { let mut error = ptr::null_mut(); - let ret = ffi::gst_discoverer_discover_uri(self.to_glib_none().0, uri.to_glib_none().0, &mut error); + let ret = gst_pbutils_sys::gst_discoverer_discover_uri(self.to_glib_none().0, uri.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } pub fn discover_uri_async(&self, uri: &str) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_discoverer_discover_uri_async(self.to_glib_none().0, uri.to_glib_none().0), "Failed to add URI to list of discovers") + glib_result_from_gboolean!(gst_pbutils_sys::gst_discoverer_discover_uri_async(self.to_glib_none().0, uri.to_glib_none().0), "Failed to add URI to list of discovers") } } pub fn start(&self) { unsafe { - ffi::gst_discoverer_start(self.to_glib_none().0); + gst_pbutils_sys::gst_discoverer_start(self.to_glib_none().0); } } pub fn stop(&self) { unsafe { - ffi::gst_discoverer_stop(self.to_glib_none().0); + gst_pbutils_sys::gst_discoverer_stop(self.to_glib_none().0); } } @@ -97,22 +97,22 @@ impl Discoverer { unsafe impl Send for Discoverer {} unsafe impl Sync for Discoverer {} -unsafe extern "C" fn discovered_trampoline) + Send + Sync + 'static>(this: *mut ffi::GstDiscoverer, info: *mut ffi::GstDiscovererInfo, error: *mut glib_ffi::GError, f: glib_ffi::gpointer) { +unsafe extern "C" fn discovered_trampoline) + Send + Sync + 'static>(this: *mut gst_pbutils_sys::GstDiscoverer, info: *mut gst_pbutils_sys::GstDiscovererInfo, error: *mut glib_sys::GError, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), &from_glib_borrow(info), &from_glib_borrow(error)) } -unsafe extern "C" fn finished_trampoline(this: *mut ffi::GstDiscoverer, f: glib_ffi::gpointer) { +unsafe extern "C" fn finished_trampoline(this: *mut gst_pbutils_sys::GstDiscoverer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn source_setup_trampoline(this: *mut ffi::GstDiscoverer, source: *mut gst_ffi::GstElement, f: glib_ffi::gpointer) { +unsafe extern "C" fn source_setup_trampoline(this: *mut gst_pbutils_sys::GstDiscoverer, source: *mut gst_sys::GstElement, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), &from_glib_borrow(source)) } -unsafe extern "C" fn starting_trampoline(this: *mut ffi::GstDiscoverer, f: glib_ffi::gpointer) { +unsafe extern "C" fn starting_trampoline(this: *mut gst_pbutils_sys::GstDiscoverer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer-pbutils/src/auto/discoverer_audio_info.rs b/gstreamer-pbutils/src/auto/discoverer_audio_info.rs index 97d56b8aa..afc37298f 100644 --- a/gstreamer-pbutils/src/auto/discoverer_audio_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_audio_info.rs @@ -3,59 +3,59 @@ // DO NOT EDIT use DiscovererStreamInfo; -use ffi; use glib::GString; use glib::translate::*; +use gst_pbutils_sys; glib_wrapper! { - pub struct DiscovererAudioInfo(Object) @extends DiscovererStreamInfo; + pub struct DiscovererAudioInfo(Object) @extends DiscovererStreamInfo; match fn { - get_type => || ffi::gst_discoverer_audio_info_get_type(), + get_type => || gst_pbutils_sys::gst_discoverer_audio_info_get_type(), } } impl DiscovererAudioInfo { pub fn get_bitrate(&self) -> u32 { unsafe { - ffi::gst_discoverer_audio_info_get_bitrate(self.to_glib_none().0) + gst_pbutils_sys::gst_discoverer_audio_info_get_bitrate(self.to_glib_none().0) } } #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn get_channel_mask(&self) -> u64 { unsafe { - ffi::gst_discoverer_audio_info_get_channel_mask(self.to_glib_none().0) + gst_pbutils_sys::gst_discoverer_audio_info_get_channel_mask(self.to_glib_none().0) } } pub fn get_channels(&self) -> u32 { unsafe { - ffi::gst_discoverer_audio_info_get_channels(self.to_glib_none().0) + gst_pbutils_sys::gst_discoverer_audio_info_get_channels(self.to_glib_none().0) } } pub fn get_depth(&self) -> u32 { unsafe { - ffi::gst_discoverer_audio_info_get_depth(self.to_glib_none().0) + gst_pbutils_sys::gst_discoverer_audio_info_get_depth(self.to_glib_none().0) } } pub fn get_language(&self) -> Option { unsafe { - from_glib_none(ffi::gst_discoverer_audio_info_get_language(self.to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_discoverer_audio_info_get_language(self.to_glib_none().0)) } } pub fn get_max_bitrate(&self) -> u32 { unsafe { - ffi::gst_discoverer_audio_info_get_max_bitrate(self.to_glib_none().0) + gst_pbutils_sys::gst_discoverer_audio_info_get_max_bitrate(self.to_glib_none().0) } } pub fn get_sample_rate(&self) -> u32 { unsafe { - ffi::gst_discoverer_audio_info_get_sample_rate(self.to_glib_none().0) + gst_pbutils_sys::gst_discoverer_audio_info_get_sample_rate(self.to_glib_none().0) } } } diff --git a/gstreamer-pbutils/src/auto/discoverer_container_info.rs b/gstreamer-pbutils/src/auto/discoverer_container_info.rs index 0b998a7c1..ca930b677 100644 --- a/gstreamer-pbutils/src/auto/discoverer_container_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_container_info.rs @@ -3,21 +3,21 @@ // DO NOT EDIT use DiscovererStreamInfo; -use ffi; use glib::translate::*; +use gst_pbutils_sys; glib_wrapper! { - pub struct DiscovererContainerInfo(Object) @extends DiscovererStreamInfo; + pub struct DiscovererContainerInfo(Object) @extends DiscovererStreamInfo; match fn { - get_type => || ffi::gst_discoverer_container_info_get_type(), + get_type => || gst_pbutils_sys::gst_discoverer_container_info_get_type(), } } impl DiscovererContainerInfo { pub fn get_streams(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_container_info_get_streams(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_discoverer_container_info_get_streams(self.to_glib_none().0)) } } } diff --git a/gstreamer-pbutils/src/auto/discoverer_info.rs b/gstreamer-pbutils/src/auto/discoverer_info.rs index 2f0aac81d..664f8f3ab 100644 --- a/gstreamer-pbutils/src/auto/discoverer_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_info.rs @@ -5,134 +5,134 @@ use DiscovererResult; use DiscovererSerializeFlags; use DiscovererStreamInfo; -use ffi; use glib; use glib::GString; use glib::translate::*; use gst; +use gst_pbutils_sys; glib_wrapper! { - pub struct DiscovererInfo(Object); + pub struct DiscovererInfo(Object); match fn { - get_type => || ffi::gst_discoverer_info_get_type(), + get_type => || gst_pbutils_sys::gst_discoverer_info_get_type(), } } impl DiscovererInfo { pub fn copy(&self) -> DiscovererInfo { unsafe { - from_glib_full(ffi::gst_discoverer_info_copy(self.to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_discoverer_info_copy(self.to_glib_none().0)) } } pub fn get_audio_streams(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_info_get_audio_streams(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_discoverer_info_get_audio_streams(self.to_glib_none().0)) } } pub fn get_container_streams(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_info_get_container_streams(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_discoverer_info_get_container_streams(self.to_glib_none().0)) } } pub fn get_duration(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_discoverer_info_get_duration(self.to_glib_none().0)) + from_glib(gst_pbutils_sys::gst_discoverer_info_get_duration(self.to_glib_none().0)) } } #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn get_live(&self) -> bool { unsafe { - from_glib(ffi::gst_discoverer_info_get_live(self.to_glib_none().0)) + from_glib(gst_pbutils_sys::gst_discoverer_info_get_live(self.to_glib_none().0)) } } pub fn get_misc(&self) -> Option { unsafe { - from_glib_none(ffi::gst_discoverer_info_get_misc(self.to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_discoverer_info_get_misc(self.to_glib_none().0)) } } pub fn get_missing_elements_installer_details(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_discoverer_info_get_missing_elements_installer_details(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_pbutils_sys::gst_discoverer_info_get_missing_elements_installer_details(self.to_glib_none().0)) } } pub fn get_result(&self) -> DiscovererResult { unsafe { - from_glib(ffi::gst_discoverer_info_get_result(self.to_glib_none().0)) + from_glib(gst_pbutils_sys::gst_discoverer_info_get_result(self.to_glib_none().0)) } } pub fn get_seekable(&self) -> bool { unsafe { - from_glib(ffi::gst_discoverer_info_get_seekable(self.to_glib_none().0)) + from_glib(gst_pbutils_sys::gst_discoverer_info_get_seekable(self.to_glib_none().0)) } } pub fn get_stream_info(&self) -> Option { unsafe { - from_glib_full(ffi::gst_discoverer_info_get_stream_info(self.to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_discoverer_info_get_stream_info(self.to_glib_none().0)) } } pub fn get_stream_list(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_info_get_stream_list(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_discoverer_info_get_stream_list(self.to_glib_none().0)) } } pub fn get_streams(&self, streamtype: glib::types::Type) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_info_get_streams(self.to_glib_none().0, streamtype.to_glib())) + FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_discoverer_info_get_streams(self.to_glib_none().0, streamtype.to_glib())) } } pub fn get_subtitle_streams(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_info_get_subtitle_streams(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_discoverer_info_get_subtitle_streams(self.to_glib_none().0)) } } pub fn get_tags(&self) -> Option { unsafe { - from_glib_none(ffi::gst_discoverer_info_get_tags(self.to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_discoverer_info_get_tags(self.to_glib_none().0)) } } pub fn get_toc(&self) -> Option { unsafe { - from_glib_none(ffi::gst_discoverer_info_get_toc(self.to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_discoverer_info_get_toc(self.to_glib_none().0)) } } pub fn get_uri(&self) -> Option { unsafe { - from_glib_none(ffi::gst_discoverer_info_get_uri(self.to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_discoverer_info_get_uri(self.to_glib_none().0)) } } pub fn get_video_streams(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_info_get_video_streams(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_discoverer_info_get_video_streams(self.to_glib_none().0)) } } pub fn to_variant(&self, flags: DiscovererSerializeFlags) -> Option { unsafe { - from_glib_full(ffi::gst_discoverer_info_to_variant(self.to_glib_none().0, flags.to_glib())) + from_glib_full(gst_pbutils_sys::gst_discoverer_info_to_variant(self.to_glib_none().0, flags.to_glib())) } } pub fn from_variant(variant: &glib::Variant) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_discoverer_info_from_variant(variant.to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_discoverer_info_from_variant(variant.to_glib_none().0)) } } } diff --git a/gstreamer-pbutils/src/auto/discoverer_stream_info.rs b/gstreamer-pbutils/src/auto/discoverer_stream_info.rs index 5e1fef1cb..10038f14e 100644 --- a/gstreamer-pbutils/src/auto/discoverer_stream_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_stream_info.rs @@ -2,17 +2,17 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::GString; use glib::object::IsA; use glib::translate::*; use gst; +use gst_pbutils_sys; glib_wrapper! { - pub struct DiscovererStreamInfo(Object); + pub struct DiscovererStreamInfo(Object); match fn { - get_type => || ffi::gst_discoverer_stream_info_get_type(), + get_type => || gst_pbutils_sys::gst_discoverer_stream_info_get_type(), } } @@ -42,49 +42,49 @@ pub trait DiscovererStreamInfoExt: 'static { impl> DiscovererStreamInfoExt for O { fn get_caps(&self) -> Option { unsafe { - from_glib_full(ffi::gst_discoverer_stream_info_get_caps(self.as_ref().to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_discoverer_stream_info_get_caps(self.as_ref().to_glib_none().0)) } } fn get_misc(&self) -> Option { unsafe { - from_glib_none(ffi::gst_discoverer_stream_info_get_misc(self.as_ref().to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_discoverer_stream_info_get_misc(self.as_ref().to_glib_none().0)) } } fn get_next(&self) -> Option { unsafe { - from_glib_full(ffi::gst_discoverer_stream_info_get_next(self.as_ref().to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_discoverer_stream_info_get_next(self.as_ref().to_glib_none().0)) } } fn get_previous(&self) -> Option { unsafe { - from_glib_full(ffi::gst_discoverer_stream_info_get_previous(self.as_ref().to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_discoverer_stream_info_get_previous(self.as_ref().to_glib_none().0)) } } fn get_stream_id(&self) -> Option { unsafe { - from_glib_none(ffi::gst_discoverer_stream_info_get_stream_id(self.as_ref().to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_discoverer_stream_info_get_stream_id(self.as_ref().to_glib_none().0)) } } fn get_stream_type_nick(&self) -> GString { unsafe { - from_glib_none(ffi::gst_discoverer_stream_info_get_stream_type_nick(self.as_ref().to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_discoverer_stream_info_get_stream_type_nick(self.as_ref().to_glib_none().0)) } } fn get_tags(&self) -> Option { unsafe { - from_glib_none(ffi::gst_discoverer_stream_info_get_tags(self.as_ref().to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_discoverer_stream_info_get_tags(self.as_ref().to_glib_none().0)) } } fn get_toc(&self) -> Option { unsafe { - from_glib_none(ffi::gst_discoverer_stream_info_get_toc(self.as_ref().to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_discoverer_stream_info_get_toc(self.as_ref().to_glib_none().0)) } } } diff --git a/gstreamer-pbutils/src/auto/discoverer_subtitle_info.rs b/gstreamer-pbutils/src/auto/discoverer_subtitle_info.rs index 154599b66..95aae8a02 100644 --- a/gstreamer-pbutils/src/auto/discoverer_subtitle_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_subtitle_info.rs @@ -3,22 +3,22 @@ // DO NOT EDIT use DiscovererStreamInfo; -use ffi; use glib::GString; use glib::translate::*; +use gst_pbutils_sys; glib_wrapper! { - pub struct DiscovererSubtitleInfo(Object) @extends DiscovererStreamInfo; + pub struct DiscovererSubtitleInfo(Object) @extends DiscovererStreamInfo; match fn { - get_type => || ffi::gst_discoverer_subtitle_info_get_type(), + get_type => || gst_pbutils_sys::gst_discoverer_subtitle_info_get_type(), } } impl DiscovererSubtitleInfo { pub fn get_language(&self) -> Option { unsafe { - from_glib_none(ffi::gst_discoverer_subtitle_info_get_language(self.to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_discoverer_subtitle_info_get_language(self.to_glib_none().0)) } } } diff --git a/gstreamer-pbutils/src/auto/discoverer_video_info.rs b/gstreamer-pbutils/src/auto/discoverer_video_info.rs index 07663149c..7e763ddda 100644 --- a/gstreamer-pbutils/src/auto/discoverer_video_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_video_info.rs @@ -3,57 +3,57 @@ // DO NOT EDIT use DiscovererStreamInfo; -use ffi; use glib::translate::*; +use gst_pbutils_sys; glib_wrapper! { - pub struct DiscovererVideoInfo(Object) @extends DiscovererStreamInfo; + pub struct DiscovererVideoInfo(Object) @extends DiscovererStreamInfo; match fn { - get_type => || ffi::gst_discoverer_video_info_get_type(), + get_type => || gst_pbutils_sys::gst_discoverer_video_info_get_type(), } } impl DiscovererVideoInfo { pub fn get_bitrate(&self) -> u32 { unsafe { - ffi::gst_discoverer_video_info_get_bitrate(self.to_glib_none().0) + gst_pbutils_sys::gst_discoverer_video_info_get_bitrate(self.to_glib_none().0) } } pub fn get_depth(&self) -> u32 { unsafe { - ffi::gst_discoverer_video_info_get_depth(self.to_glib_none().0) + gst_pbutils_sys::gst_discoverer_video_info_get_depth(self.to_glib_none().0) } } pub fn get_height(&self) -> u32 { unsafe { - ffi::gst_discoverer_video_info_get_height(self.to_glib_none().0) + gst_pbutils_sys::gst_discoverer_video_info_get_height(self.to_glib_none().0) } } pub fn get_max_bitrate(&self) -> u32 { unsafe { - ffi::gst_discoverer_video_info_get_max_bitrate(self.to_glib_none().0) + gst_pbutils_sys::gst_discoverer_video_info_get_max_bitrate(self.to_glib_none().0) } } pub fn get_width(&self) -> u32 { unsafe { - ffi::gst_discoverer_video_info_get_width(self.to_glib_none().0) + gst_pbutils_sys::gst_discoverer_video_info_get_width(self.to_glib_none().0) } } pub fn is_image(&self) -> bool { unsafe { - from_glib(ffi::gst_discoverer_video_info_is_image(self.to_glib_none().0)) + from_glib(gst_pbutils_sys::gst_discoverer_video_info_is_image(self.to_glib_none().0)) } } pub fn is_interlaced(&self) -> bool { unsafe { - from_glib(ffi::gst_discoverer_video_info_is_interlaced(self.to_glib_none().0)) + from_glib(gst_pbutils_sys::gst_discoverer_video_info_is_interlaced(self.to_glib_none().0)) } } } diff --git a/gstreamer-pbutils/src/auto/encoding_audio_profile.rs b/gstreamer-pbutils/src/auto/encoding_audio_profile.rs index 7dd2118a6..4df7a1917 100644 --- a/gstreamer-pbutils/src/auto/encoding_audio_profile.rs +++ b/gstreamer-pbutils/src/auto/encoding_audio_profile.rs @@ -3,14 +3,14 @@ // DO NOT EDIT use EncodingProfile; -use ffi; use glib::translate::*; +use gst_pbutils_sys; glib_wrapper! { - pub struct EncodingAudioProfile(Object) @extends EncodingProfile; + pub struct EncodingAudioProfile(Object) @extends EncodingProfile; match fn { - get_type => || ffi::gst_encoding_audio_profile_get_type(), + get_type => || gst_pbutils_sys::gst_encoding_audio_profile_get_type(), } } diff --git a/gstreamer-pbutils/src/auto/encoding_container_profile.rs b/gstreamer-pbutils/src/auto/encoding_container_profile.rs index ca9abceff..2e8e8c4ab 100644 --- a/gstreamer-pbutils/src/auto/encoding_container_profile.rs +++ b/gstreamer-pbutils/src/auto/encoding_container_profile.rs @@ -3,15 +3,15 @@ // DO NOT EDIT use EncodingProfile; -use ffi; use glib::object::IsA; use glib::translate::*; +use gst_pbutils_sys; glib_wrapper! { - pub struct EncodingContainerProfile(Object) @extends EncodingProfile; + pub struct EncodingContainerProfile(Object) @extends EncodingProfile; match fn { - get_type => || ffi::gst_encoding_container_profile_get_type(), + get_type => || gst_pbutils_sys::gst_encoding_container_profile_get_type(), } } @@ -29,13 +29,13 @@ pub trait EncodingContainerProfileExt: 'static { impl> EncodingContainerProfileExt for O { fn contains_profile>(&self, profile: &P) -> bool { unsafe { - from_glib(ffi::gst_encoding_container_profile_contains_profile(self.as_ref().to_glib_none().0, profile.as_ref().to_glib_none().0)) + from_glib(gst_pbutils_sys::gst_encoding_container_profile_contains_profile(self.as_ref().to_glib_none().0, profile.as_ref().to_glib_none().0)) } } fn get_profiles(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_encoding_container_profile_get_profiles(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_pbutils_sys::gst_encoding_container_profile_get_profiles(self.as_ref().to_glib_none().0)) } } } diff --git a/gstreamer-pbutils/src/auto/encoding_profile.rs b/gstreamer-pbutils/src/auto/encoding_profile.rs index de5ed7005..ecde08dfd 100644 --- a/gstreamer-pbutils/src/auto/encoding_profile.rs +++ b/gstreamer-pbutils/src/auto/encoding_profile.rs @@ -3,34 +3,32 @@ // DO NOT EDIT use DiscovererInfo; -use ffi; use glib::GString; use glib::object::IsA; use glib::translate::*; use gst; +use gst_pbutils_sys; glib_wrapper! { - pub struct EncodingProfile(Object); + pub struct EncodingProfile(Object); match fn { - get_type => || ffi::gst_encoding_profile_get_type(), + get_type => || gst_pbutils_sys::gst_encoding_profile_get_type(), } } impl EncodingProfile { - pub fn find<'a, 'b, P: Into>, Q: Into>>(targetname: &str, profilename: P, category: Q) -> Option { + pub fn find(targetname: &str, profilename: Option<&str>, category: Option<&str>) -> Option { assert_initialized_main_thread!(); - let profilename = profilename.into(); - let category = category.into(); unsafe { - from_glib_full(ffi::gst_encoding_profile_find(targetname.to_glib_none().0, profilename.to_glib_none().0, category.to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_encoding_profile_find(targetname.to_glib_none().0, profilename.to_glib_none().0, category.to_glib_none().0)) } } pub fn from_discoverer(info: &DiscovererInfo) -> Option { skip_assert_initialized!(); unsafe { - from_glib_full(ffi::gst_encoding_profile_from_discoverer(info.to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_encoding_profile_from_discoverer(info.to_glib_none().0)) } } } @@ -73,85 +71,85 @@ pub trait EncodingProfileExt: 'static { impl> EncodingProfileExt for O { fn copy(&self) -> EncodingProfile { unsafe { - from_glib_full(ffi::gst_encoding_profile_copy(self.as_ref().to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_encoding_profile_copy(self.as_ref().to_glib_none().0)) } } fn get_allow_dynamic_output(&self) -> bool { unsafe { - from_glib(ffi::gst_encoding_profile_get_allow_dynamic_output(self.as_ref().to_glib_none().0)) + from_glib(gst_pbutils_sys::gst_encoding_profile_get_allow_dynamic_output(self.as_ref().to_glib_none().0)) } } fn get_description(&self) -> Option { unsafe { - from_glib_none(ffi::gst_encoding_profile_get_description(self.as_ref().to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_encoding_profile_get_description(self.as_ref().to_glib_none().0)) } } fn get_file_extension(&self) -> Option { unsafe { - from_glib_none(ffi::gst_encoding_profile_get_file_extension(self.as_ref().to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_encoding_profile_get_file_extension(self.as_ref().to_glib_none().0)) } } fn get_format(&self) -> gst::Caps { unsafe { - from_glib_full(ffi::gst_encoding_profile_get_format(self.as_ref().to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_encoding_profile_get_format(self.as_ref().to_glib_none().0)) } } fn get_input_caps(&self) -> gst::Caps { unsafe { - from_glib_full(ffi::gst_encoding_profile_get_input_caps(self.as_ref().to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_encoding_profile_get_input_caps(self.as_ref().to_glib_none().0)) } } fn get_name(&self) -> Option { unsafe { - from_glib_none(ffi::gst_encoding_profile_get_name(self.as_ref().to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_encoding_profile_get_name(self.as_ref().to_glib_none().0)) } } fn get_presence(&self) -> u32 { unsafe { - ffi::gst_encoding_profile_get_presence(self.as_ref().to_glib_none().0) + gst_pbutils_sys::gst_encoding_profile_get_presence(self.as_ref().to_glib_none().0) } } fn get_preset(&self) -> Option { unsafe { - from_glib_none(ffi::gst_encoding_profile_get_preset(self.as_ref().to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_encoding_profile_get_preset(self.as_ref().to_glib_none().0)) } } fn get_preset_name(&self) -> Option { unsafe { - from_glib_none(ffi::gst_encoding_profile_get_preset_name(self.as_ref().to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_encoding_profile_get_preset_name(self.as_ref().to_glib_none().0)) } } fn get_restriction(&self) -> Option { unsafe { - from_glib_full(ffi::gst_encoding_profile_get_restriction(self.as_ref().to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_encoding_profile_get_restriction(self.as_ref().to_glib_none().0)) } } fn get_type_nick(&self) -> Option { unsafe { - from_glib_none(ffi::gst_encoding_profile_get_type_nick(self.as_ref().to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_encoding_profile_get_type_nick(self.as_ref().to_glib_none().0)) } } fn is_enabled(&self) -> bool { unsafe { - from_glib(ffi::gst_encoding_profile_is_enabled(self.as_ref().to_glib_none().0)) + from_glib(gst_pbutils_sys::gst_encoding_profile_is_enabled(self.as_ref().to_glib_none().0)) } } fn is_equal>(&self, b: &P) -> bool { unsafe { - from_glib(ffi::gst_encoding_profile_is_equal(self.as_ref().to_glib_none().0, b.as_ref().to_glib_none().0)) + from_glib(gst_pbutils_sys::gst_encoding_profile_is_equal(self.as_ref().to_glib_none().0, b.as_ref().to_glib_none().0)) } } } diff --git a/gstreamer-pbutils/src/auto/encoding_target.rs b/gstreamer-pbutils/src/auto/encoding_target.rs index bf5e8d505..e38931744 100644 --- a/gstreamer-pbutils/src/auto/encoding_target.rs +++ b/gstreamer-pbutils/src/auto/encoding_target.rs @@ -4,17 +4,17 @@ use EncodingProfile; use Error; -use ffi; use glib::GString; use glib::translate::*; +use gst_pbutils_sys; use std; use std::ptr; glib_wrapper! { - pub struct EncodingTarget(Object); + pub struct EncodingTarget(Object); match fn { - get_type => || ffi::gst_encoding_target_get_type(), + get_type => || gst_pbutils_sys::gst_encoding_target_get_type(), } } @@ -22,44 +22,44 @@ impl EncodingTarget { pub fn new(name: &str, category: &str, description: &str, profiles: &[EncodingProfile]) -> EncodingTarget { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_encoding_target_new(name.to_glib_none().0, category.to_glib_none().0, description.to_glib_none().0, profiles.to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_encoding_target_new(name.to_glib_none().0, category.to_glib_none().0, description.to_glib_none().0, profiles.to_glib_none().0)) } } pub fn get_category(&self) -> GString { unsafe { - from_glib_none(ffi::gst_encoding_target_get_category(self.to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_encoding_target_get_category(self.to_glib_none().0)) } } pub fn get_description(&self) -> GString { unsafe { - from_glib_none(ffi::gst_encoding_target_get_description(self.to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_encoding_target_get_description(self.to_glib_none().0)) } } pub fn get_name(&self) -> GString { unsafe { - from_glib_none(ffi::gst_encoding_target_get_name(self.to_glib_none().0)) + from_glib_none(gst_pbutils_sys::gst_encoding_target_get_name(self.to_glib_none().0)) } } pub fn get_profile(&self, name: &str) -> Option { unsafe { - from_glib_full(ffi::gst_encoding_target_get_profile(self.to_glib_none().0, name.to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_encoding_target_get_profile(self.to_glib_none().0, name.to_glib_none().0)) } } pub fn get_profiles(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_encoding_target_get_profiles(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_pbutils_sys::gst_encoding_target_get_profiles(self.to_glib_none().0)) } } pub fn save(&self) -> Result<(), Error> { unsafe { let mut error = ptr::null_mut(); - let _ = ffi::gst_encoding_target_save(self.to_glib_none().0, &mut error); + let _ = gst_pbutils_sys::gst_encoding_target_save(self.to_glib_none().0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } @@ -67,17 +67,16 @@ impl EncodingTarget { pub fn save_to_file>(&self, filepath: P) -> Result<(), Error> { unsafe { let mut error = ptr::null_mut(); - let _ = ffi::gst_encoding_target_save_to_file(self.to_glib_none().0, filepath.as_ref().to_glib_none().0, &mut error); + let _ = gst_pbutils_sys::gst_encoding_target_save_to_file(self.to_glib_none().0, filepath.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } - pub fn load<'a, P: Into>>(name: &str, category: P) -> Result { + pub fn load(name: &str, category: Option<&str>) -> Result { assert_initialized_main_thread!(); - let category = category.into(); unsafe { let mut error = ptr::null_mut(); - let ret = ffi::gst_encoding_target_load(name.to_glib_none().0, category.to_glib_none().0, &mut error); + let ret = gst_pbutils_sys::gst_encoding_target_load(name.to_glib_none().0, category.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } @@ -86,7 +85,7 @@ impl EncodingTarget { assert_initialized_main_thread!(); unsafe { let mut error = ptr::null_mut(); - let ret = ffi::gst_encoding_target_load_from_file(filepath.as_ref().to_glib_none().0, &mut error); + let ret = gst_pbutils_sys::gst_encoding_target_load_from_file(filepath.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } diff --git a/gstreamer-pbutils/src/auto/encoding_video_profile.rs b/gstreamer-pbutils/src/auto/encoding_video_profile.rs index 89565c3d9..d66c6710f 100644 --- a/gstreamer-pbutils/src/auto/encoding_video_profile.rs +++ b/gstreamer-pbutils/src/auto/encoding_video_profile.rs @@ -3,27 +3,27 @@ // DO NOT EDIT use EncodingProfile; -use ffi; use glib::translate::*; +use gst_pbutils_sys; glib_wrapper! { - pub struct EncodingVideoProfile(Object) @extends EncodingProfile; + pub struct EncodingVideoProfile(Object) @extends EncodingProfile; match fn { - get_type => || ffi::gst_encoding_video_profile_get_type(), + get_type => || gst_pbutils_sys::gst_encoding_video_profile_get_type(), } } impl EncodingVideoProfile { pub fn get_pass(&self) -> u32 { unsafe { - ffi::gst_encoding_video_profile_get_pass(self.to_glib_none().0) + gst_pbutils_sys::gst_encoding_video_profile_get_pass(self.to_glib_none().0) } } pub fn get_variableframerate(&self) -> bool { unsafe { - from_glib(ffi::gst_encoding_video_profile_get_variableframerate(self.to_glib_none().0)) + from_glib(gst_pbutils_sys::gst_encoding_video_profile_get_variableframerate(self.to_glib_none().0)) } } } diff --git a/gstreamer-pbutils/src/auto/enums.rs b/gstreamer-pbutils/src/auto/enums.rs index 37f60915c..7cd476933 100644 --- a/gstreamer-pbutils/src/auto/enums.rs +++ b/gstreamer-pbutils/src/auto/enums.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +9,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_pbutils_sys; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] @@ -27,24 +27,24 @@ pub enum DiscovererResult { #[doc(hidden)] impl ToGlib for DiscovererResult { - type GlibType = ffi::GstDiscovererResult; + type GlibType = gst_pbutils_sys::GstDiscovererResult; - fn to_glib(&self) -> ffi::GstDiscovererResult { + fn to_glib(&self) -> gst_pbutils_sys::GstDiscovererResult { match *self { - DiscovererResult::Ok => ffi::GST_DISCOVERER_OK, - DiscovererResult::UriInvalid => ffi::GST_DISCOVERER_URI_INVALID, - DiscovererResult::Error => ffi::GST_DISCOVERER_ERROR, - DiscovererResult::Timeout => ffi::GST_DISCOVERER_TIMEOUT, - DiscovererResult::Busy => ffi::GST_DISCOVERER_BUSY, - DiscovererResult::MissingPlugins => ffi::GST_DISCOVERER_MISSING_PLUGINS, + DiscovererResult::Ok => gst_pbutils_sys::GST_DISCOVERER_OK, + DiscovererResult::UriInvalid => gst_pbutils_sys::GST_DISCOVERER_URI_INVALID, + DiscovererResult::Error => gst_pbutils_sys::GST_DISCOVERER_ERROR, + DiscovererResult::Timeout => gst_pbutils_sys::GST_DISCOVERER_TIMEOUT, + DiscovererResult::Busy => gst_pbutils_sys::GST_DISCOVERER_BUSY, + DiscovererResult::MissingPlugins => gst_pbutils_sys::GST_DISCOVERER_MISSING_PLUGINS, DiscovererResult::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for DiscovererResult { - fn from_glib(value: ffi::GstDiscovererResult) -> Self { +impl FromGlib for DiscovererResult { + fn from_glib(value: gst_pbutils_sys::GstDiscovererResult) -> Self { skip_assert_initialized!(); match value { 0 => DiscovererResult::Ok, @@ -60,7 +60,7 @@ impl FromGlib for DiscovererResult { impl StaticType for DiscovererResult { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_discoverer_result_get_type()) } + unsafe { from_glib(gst_pbutils_sys::gst_discoverer_result_get_type()) } } } @@ -72,13 +72,13 @@ impl<'a> FromValueOptional<'a> for DiscovererResult { impl<'a> FromValue<'a> for DiscovererResult { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for DiscovererResult { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-pbutils/src/auto/flags.rs b/gstreamer-pbutils/src/auto/flags.rs index 88a11358c..c29dabf92 100644 --- a/gstreamer-pbutils/src/auto/flags.rs +++ b/gstreamer-pbutils/src/auto/flags.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +9,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_pbutils_sys; bitflags! { pub struct DiscovererSerializeFlags: u32 { @@ -24,16 +24,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for DiscovererSerializeFlags { - type GlibType = ffi::GstDiscovererSerializeFlags; + type GlibType = gst_pbutils_sys::GstDiscovererSerializeFlags; - fn to_glib(&self) -> ffi::GstDiscovererSerializeFlags { + fn to_glib(&self) -> gst_pbutils_sys::GstDiscovererSerializeFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for DiscovererSerializeFlags { - fn from_glib(value: ffi::GstDiscovererSerializeFlags) -> DiscovererSerializeFlags { +impl FromGlib for DiscovererSerializeFlags { + fn from_glib(value: gst_pbutils_sys::GstDiscovererSerializeFlags) -> DiscovererSerializeFlags { skip_assert_initialized!(); DiscovererSerializeFlags::from_bits_truncate(value) } @@ -41,7 +41,7 @@ impl FromGlib for DiscovererSerializeFlags { impl StaticType for DiscovererSerializeFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_discoverer_serialize_flags_get_type()) } + unsafe { from_glib(gst_pbutils_sys::gst_discoverer_serialize_flags_get_type()) } } } @@ -53,13 +53,13 @@ impl<'a> FromValueOptional<'a> for DiscovererSerializeFlags { impl<'a> FromValue<'a> for DiscovererSerializeFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for DiscovererSerializeFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-pbutils/src/auto/functions.rs b/gstreamer-pbutils/src/auto/functions.rs index e3cf6f8f7..655d67be1 100644 --- a/gstreamer-pbutils/src/auto/functions.rs +++ b/gstreamer-pbutils/src/auto/functions.rs @@ -3,45 +3,44 @@ // DO NOT EDIT use EncodingTarget; -use ffi; use glib::GString; use glib::translate::*; +use gst_pbutils_sys; use std::mem; -pub fn encoding_list_all_targets<'a, P: Into>>(categoryname: P) -> Vec { +pub fn encoding_list_all_targets(categoryname: Option<&str>) -> Vec { assert_initialized_main_thread!(); - let categoryname = categoryname.into(); unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_encoding_list_all_targets(categoryname.to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_encoding_list_all_targets(categoryname.to_glib_none().0)) } } pub fn encoding_list_available_categories() -> Vec { assert_initialized_main_thread!(); unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_encoding_list_available_categories()) + FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_encoding_list_available_categories()) } } pub fn pb_utils_get_element_description(factory_name: &str) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_pb_utils_get_element_description(factory_name.to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_pb_utils_get_element_description(factory_name.to_glib_none().0)) } } pub fn pb_utils_get_sink_description(protocol: &str) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_pb_utils_get_sink_description(protocol.to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_pb_utils_get_sink_description(protocol.to_glib_none().0)) } } pub fn pb_utils_get_source_description(protocol: &str) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_pb_utils_get_source_description(protocol.to_glib_none().0)) + from_glib_full(gst_pbutils_sys::gst_pb_utils_get_source_description(protocol.to_glib_none().0)) } } @@ -52,7 +51,7 @@ pub fn plugins_base_version() -> (u32, u32, u32, u32) { let mut minor = mem::uninitialized(); let mut micro = mem::uninitialized(); let mut nano = mem::uninitialized(); - ffi::gst_plugins_base_version(&mut major, &mut minor, &mut micro, &mut nano); + gst_pbutils_sys::gst_plugins_base_version(&mut major, &mut minor, &mut micro, &mut nano); (major, minor, micro, nano) } } @@ -60,6 +59,6 @@ pub fn plugins_base_version() -> (u32, u32, u32, u32) { pub fn plugins_base_version_string() -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_plugins_base_version_string()) + from_glib_full(gst_pbutils_sys::gst_plugins_base_version_string()) } } diff --git a/gstreamer-pbutils/src/auto/versions.txt b/gstreamer-pbutils/src/auto/versions.txt index b9131200d..a9e0ccc5d 100644 --- a/gstreamer-pbutils/src/auto/versions.txt +++ b/gstreamer-pbutils/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-player/src/auto/enums.rs b/gstreamer-player/src/auto/enums.rs index 0bd329142..862be8b04 100644 --- a/gstreamer-player/src/auto/enums.rs +++ b/gstreamer-player/src/auto/enums.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::Quark; use glib::StaticType; use glib::Type; @@ -12,7 +11,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_player_sys; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] @@ -27,22 +27,22 @@ pub enum PlayerColorBalanceType { #[doc(hidden)] impl ToGlib for PlayerColorBalanceType { - type GlibType = ffi::GstPlayerColorBalanceType; + type GlibType = gst_player_sys::GstPlayerColorBalanceType; - fn to_glib(&self) -> ffi::GstPlayerColorBalanceType { + fn to_glib(&self) -> gst_player_sys::GstPlayerColorBalanceType { match *self { - PlayerColorBalanceType::Hue => ffi::GST_PLAYER_COLOR_BALANCE_HUE, - PlayerColorBalanceType::Brightness => ffi::GST_PLAYER_COLOR_BALANCE_BRIGHTNESS, - PlayerColorBalanceType::Saturation => ffi::GST_PLAYER_COLOR_BALANCE_SATURATION, - PlayerColorBalanceType::Contrast => ffi::GST_PLAYER_COLOR_BALANCE_CONTRAST, + PlayerColorBalanceType::Hue => gst_player_sys::GST_PLAYER_COLOR_BALANCE_HUE, + PlayerColorBalanceType::Brightness => gst_player_sys::GST_PLAYER_COLOR_BALANCE_BRIGHTNESS, + PlayerColorBalanceType::Saturation => gst_player_sys::GST_PLAYER_COLOR_BALANCE_SATURATION, + PlayerColorBalanceType::Contrast => gst_player_sys::GST_PLAYER_COLOR_BALANCE_CONTRAST, PlayerColorBalanceType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for PlayerColorBalanceType { - fn from_glib(value: ffi::GstPlayerColorBalanceType) -> Self { +impl FromGlib for PlayerColorBalanceType { + fn from_glib(value: gst_player_sys::GstPlayerColorBalanceType) -> Self { skip_assert_initialized!(); match value { 3 => PlayerColorBalanceType::Hue, @@ -56,7 +56,7 @@ impl FromGlib for PlayerColorBalanceType { impl StaticType for PlayerColorBalanceType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_player_color_balance_type_get_type()) } + unsafe { from_glib(gst_player_sys::gst_player_color_balance_type_get_type()) } } } @@ -68,13 +68,13 @@ impl<'a> FromValueOptional<'a> for PlayerColorBalanceType { impl<'a> FromValue<'a> for PlayerColorBalanceType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PlayerColorBalanceType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -88,19 +88,19 @@ pub enum PlayerError { #[doc(hidden)] impl ToGlib for PlayerError { - type GlibType = ffi::GstPlayerError; + type GlibType = gst_player_sys::GstPlayerError; - fn to_glib(&self) -> ffi::GstPlayerError { + fn to_glib(&self) -> gst_player_sys::GstPlayerError { match *self { - PlayerError::Failed => ffi::GST_PLAYER_ERROR_FAILED, + PlayerError::Failed => gst_player_sys::GST_PLAYER_ERROR_FAILED, PlayerError::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for PlayerError { - fn from_glib(value: ffi::GstPlayerError) -> Self { +impl FromGlib for PlayerError { + fn from_glib(value: gst_player_sys::GstPlayerError) -> Self { skip_assert_initialized!(); match value { 0 => PlayerError::Failed, @@ -112,7 +112,7 @@ impl FromGlib for PlayerError { impl ErrorDomain for PlayerError { fn domain() -> Quark { skip_assert_initialized!(); - unsafe { from_glib(ffi::gst_player_error_quark()) } + unsafe { from_glib(gst_player_sys::gst_player_error_quark()) } } fn code(self) -> i32 { @@ -130,7 +130,7 @@ impl ErrorDomain for PlayerError { impl StaticType for PlayerError { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_player_error_get_type()) } + unsafe { from_glib(gst_player_sys::gst_player_error_get_type()) } } } @@ -142,13 +142,13 @@ impl<'a> FromValueOptional<'a> for PlayerError { impl<'a> FromValue<'a> for PlayerError { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PlayerError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -166,23 +166,23 @@ pub enum PlayerSnapshotFormat { #[doc(hidden)] impl ToGlib for PlayerSnapshotFormat { - type GlibType = ffi::GstPlayerSnapshotFormat; + type GlibType = gst_player_sys::GstPlayerSnapshotFormat; - fn to_glib(&self) -> ffi::GstPlayerSnapshotFormat { + fn to_glib(&self) -> gst_player_sys::GstPlayerSnapshotFormat { match *self { - PlayerSnapshotFormat::RawNative => ffi::GST_PLAYER_THUMBNAIL_RAW_NATIVE, - PlayerSnapshotFormat::RawXrgb => ffi::GST_PLAYER_THUMBNAIL_RAW_xRGB, - PlayerSnapshotFormat::RawBgrx => ffi::GST_PLAYER_THUMBNAIL_RAW_BGRx, - PlayerSnapshotFormat::Jpg => ffi::GST_PLAYER_THUMBNAIL_JPG, - PlayerSnapshotFormat::Png => ffi::GST_PLAYER_THUMBNAIL_PNG, + PlayerSnapshotFormat::RawNative => gst_player_sys::GST_PLAYER_THUMBNAIL_RAW_NATIVE, + PlayerSnapshotFormat::RawXrgb => gst_player_sys::GST_PLAYER_THUMBNAIL_RAW_xRGB, + PlayerSnapshotFormat::RawBgrx => gst_player_sys::GST_PLAYER_THUMBNAIL_RAW_BGRx, + PlayerSnapshotFormat::Jpg => gst_player_sys::GST_PLAYER_THUMBNAIL_JPG, + PlayerSnapshotFormat::Png => gst_player_sys::GST_PLAYER_THUMBNAIL_PNG, PlayerSnapshotFormat::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for PlayerSnapshotFormat { - fn from_glib(value: ffi::GstPlayerSnapshotFormat) -> Self { +impl FromGlib for PlayerSnapshotFormat { + fn from_glib(value: gst_player_sys::GstPlayerSnapshotFormat) -> Self { skip_assert_initialized!(); match value { 0 => PlayerSnapshotFormat::RawNative, @@ -208,22 +208,22 @@ pub enum PlayerState { #[doc(hidden)] impl ToGlib for PlayerState { - type GlibType = ffi::GstPlayerState; + type GlibType = gst_player_sys::GstPlayerState; - fn to_glib(&self) -> ffi::GstPlayerState { + fn to_glib(&self) -> gst_player_sys::GstPlayerState { match *self { - PlayerState::Stopped => ffi::GST_PLAYER_STATE_STOPPED, - PlayerState::Buffering => ffi::GST_PLAYER_STATE_BUFFERING, - PlayerState::Paused => ffi::GST_PLAYER_STATE_PAUSED, - PlayerState::Playing => ffi::GST_PLAYER_STATE_PLAYING, + PlayerState::Stopped => gst_player_sys::GST_PLAYER_STATE_STOPPED, + PlayerState::Buffering => gst_player_sys::GST_PLAYER_STATE_BUFFERING, + PlayerState::Paused => gst_player_sys::GST_PLAYER_STATE_PAUSED, + PlayerState::Playing => gst_player_sys::GST_PLAYER_STATE_PLAYING, PlayerState::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for PlayerState { - fn from_glib(value: ffi::GstPlayerState) -> Self { +impl FromGlib for PlayerState { + fn from_glib(value: gst_player_sys::GstPlayerState) -> Self { skip_assert_initialized!(); match value { 0 => PlayerState::Stopped, @@ -237,7 +237,7 @@ impl FromGlib for PlayerState { impl StaticType for PlayerState { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_player_state_get_type()) } + unsafe { from_glib(gst_player_sys::gst_player_state_get_type()) } } } @@ -249,13 +249,13 @@ impl<'a> FromValueOptional<'a> for PlayerState { impl<'a> FromValue<'a> for PlayerState { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PlayerState { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-player/src/auto/player.rs b/gstreamer-player/src/auto/player.rs index e4f347a19..2924a6c89 100644 --- a/gstreamer-player/src/auto/player.rs +++ b/gstreamer-player/src/auto/player.rs @@ -11,7 +11,6 @@ use PlayerState; use PlayerSubtitleInfo; use PlayerVideoInfo; use PlayerVisualization; -use ffi; use glib; use glib::GString; use glib::StaticType; @@ -20,333 +19,331 @@ use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_player_sys; use gst_video; use libc; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Player(Object) @extends gst::Object; + pub struct Player(Object) @extends gst::Object; match fn { - get_type => || ffi::gst_player_get_type(), + get_type => || gst_player_sys::gst_player_get_type(), } } impl Player { pub fn get_audio_video_offset(&self) -> i64 { unsafe { - ffi::gst_player_get_audio_video_offset(self.to_glib_none().0) + gst_player_sys::gst_player_get_audio_video_offset(self.to_glib_none().0) } } pub fn get_color_balance(&self, type_: PlayerColorBalanceType) -> f64 { unsafe { - ffi::gst_player_get_color_balance(self.to_glib_none().0, type_.to_glib()) + gst_player_sys::gst_player_get_color_balance(self.to_glib_none().0, type_.to_glib()) } } pub fn get_current_audio_track(&self) -> Option { unsafe { - from_glib_full(ffi::gst_player_get_current_audio_track(self.to_glib_none().0)) + from_glib_full(gst_player_sys::gst_player_get_current_audio_track(self.to_glib_none().0)) } } pub fn get_current_subtitle_track(&self) -> Option { unsafe { - from_glib_none(ffi::gst_player_get_current_subtitle_track(self.to_glib_none().0)) + from_glib_none(gst_player_sys::gst_player_get_current_subtitle_track(self.to_glib_none().0)) } } pub fn get_current_video_track(&self) -> Option { unsafe { - from_glib_full(ffi::gst_player_get_current_video_track(self.to_glib_none().0)) + from_glib_full(gst_player_sys::gst_player_get_current_video_track(self.to_glib_none().0)) } } pub fn get_current_visualization(&self) -> Option { unsafe { - from_glib_full(ffi::gst_player_get_current_visualization(self.to_glib_none().0)) + from_glib_full(gst_player_sys::gst_player_get_current_visualization(self.to_glib_none().0)) } } pub fn get_duration(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_player_get_duration(self.to_glib_none().0)) + from_glib(gst_player_sys::gst_player_get_duration(self.to_glib_none().0)) } } pub fn get_media_info(&self) -> Option { unsafe { - from_glib_full(ffi::gst_player_get_media_info(self.to_glib_none().0)) + from_glib_full(gst_player_sys::gst_player_get_media_info(self.to_glib_none().0)) } } pub fn get_multiview_flags(&self) -> gst_video::VideoMultiviewFlags { unsafe { - from_glib(ffi::gst_player_get_multiview_flags(self.to_glib_none().0)) + from_glib(gst_player_sys::gst_player_get_multiview_flags(self.to_glib_none().0)) } } pub fn get_multiview_mode(&self) -> gst_video::VideoMultiviewFramePacking { unsafe { - from_glib(ffi::gst_player_get_multiview_mode(self.to_glib_none().0)) + from_glib(gst_player_sys::gst_player_get_multiview_mode(self.to_glib_none().0)) } } pub fn get_mute(&self) -> bool { unsafe { - from_glib(ffi::gst_player_get_mute(self.to_glib_none().0)) + from_glib(gst_player_sys::gst_player_get_mute(self.to_glib_none().0)) } } pub fn get_pipeline(&self) -> gst::Element { unsafe { - from_glib_full(ffi::gst_player_get_pipeline(self.to_glib_none().0)) + from_glib_full(gst_player_sys::gst_player_get_pipeline(self.to_glib_none().0)) } } pub fn get_position(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_player_get_position(self.to_glib_none().0)) + from_glib(gst_player_sys::gst_player_get_position(self.to_glib_none().0)) } } pub fn get_rate(&self) -> f64 { unsafe { - ffi::gst_player_get_rate(self.to_glib_none().0) + gst_player_sys::gst_player_get_rate(self.to_glib_none().0) } } pub fn get_subtitle_uri(&self) -> Option { unsafe { - from_glib_full(ffi::gst_player_get_subtitle_uri(self.to_glib_none().0)) + from_glib_full(gst_player_sys::gst_player_get_subtitle_uri(self.to_glib_none().0)) } } pub fn get_uri(&self) -> Option { unsafe { - from_glib_full(ffi::gst_player_get_uri(self.to_glib_none().0)) + from_glib_full(gst_player_sys::gst_player_get_uri(self.to_glib_none().0)) } } - pub fn get_video_snapshot<'a, P: Into>>(&self, format: PlayerSnapshotFormat, config: P) -> Option { - let config = config.into(); + pub fn get_video_snapshot(&self, format: PlayerSnapshotFormat, config: Option<&gst::Structure>) -> Option { unsafe { - from_glib_full(ffi::gst_player_get_video_snapshot(self.to_glib_none().0, format.to_glib(), config.to_glib_none().0)) + from_glib_full(gst_player_sys::gst_player_get_video_snapshot(self.to_glib_none().0, format.to_glib(), config.to_glib_none().0)) } } pub fn get_volume(&self) -> f64 { unsafe { - ffi::gst_player_get_volume(self.to_glib_none().0) + gst_player_sys::gst_player_get_volume(self.to_glib_none().0) } } pub fn has_color_balance(&self) -> bool { unsafe { - from_glib(ffi::gst_player_has_color_balance(self.to_glib_none().0)) + from_glib(gst_player_sys::gst_player_has_color_balance(self.to_glib_none().0)) } } pub fn pause(&self) { unsafe { - ffi::gst_player_pause(self.to_glib_none().0); + gst_player_sys::gst_player_pause(self.to_glib_none().0); } } pub fn play(&self) { unsafe { - ffi::gst_player_play(self.to_glib_none().0); + gst_player_sys::gst_player_play(self.to_glib_none().0); } } pub fn seek(&self, position: gst::ClockTime) { unsafe { - ffi::gst_player_seek(self.to_glib_none().0, position.to_glib()); + gst_player_sys::gst_player_seek(self.to_glib_none().0, position.to_glib()); } } pub fn set_audio_track(&self, stream_index: i32) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_player_set_audio_track(self.to_glib_none().0, stream_index), "Failed to set audio track") + glib_result_from_gboolean!(gst_player_sys::gst_player_set_audio_track(self.to_glib_none().0, stream_index), "Failed to set audio track") } } pub fn set_audio_track_enabled(&self, enabled: bool) { unsafe { - ffi::gst_player_set_audio_track_enabled(self.to_glib_none().0, enabled.to_glib()); + gst_player_sys::gst_player_set_audio_track_enabled(self.to_glib_none().0, enabled.to_glib()); } } pub fn set_audio_video_offset(&self, offset: i64) { unsafe { - ffi::gst_player_set_audio_video_offset(self.to_glib_none().0, offset); + gst_player_sys::gst_player_set_audio_video_offset(self.to_glib_none().0, offset); } } pub fn set_color_balance(&self, type_: PlayerColorBalanceType, value: f64) { unsafe { - ffi::gst_player_set_color_balance(self.to_glib_none().0, type_.to_glib(), value); + gst_player_sys::gst_player_set_color_balance(self.to_glib_none().0, type_.to_glib(), value); } } pub fn set_multiview_flags(&self, flags: gst_video::VideoMultiviewFlags) { unsafe { - ffi::gst_player_set_multiview_flags(self.to_glib_none().0, flags.to_glib()); + gst_player_sys::gst_player_set_multiview_flags(self.to_glib_none().0, flags.to_glib()); } } pub fn set_multiview_mode(&self, mode: gst_video::VideoMultiviewFramePacking) { unsafe { - ffi::gst_player_set_multiview_mode(self.to_glib_none().0, mode.to_glib()); + gst_player_sys::gst_player_set_multiview_mode(self.to_glib_none().0, mode.to_glib()); } } pub fn set_mute(&self, val: bool) { unsafe { - ffi::gst_player_set_mute(self.to_glib_none().0, val.to_glib()); + gst_player_sys::gst_player_set_mute(self.to_glib_none().0, val.to_glib()); } } pub fn set_rate(&self, rate: f64) { unsafe { - ffi::gst_player_set_rate(self.to_glib_none().0, rate); + gst_player_sys::gst_player_set_rate(self.to_glib_none().0, rate); } } pub fn set_subtitle_track(&self, stream_index: i32) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_player_set_subtitle_track(self.to_glib_none().0, stream_index), "Failed to set subtitle track") + glib_result_from_gboolean!(gst_player_sys::gst_player_set_subtitle_track(self.to_glib_none().0, stream_index), "Failed to set subtitle track") } } pub fn set_subtitle_track_enabled(&self, enabled: bool) { unsafe { - ffi::gst_player_set_subtitle_track_enabled(self.to_glib_none().0, enabled.to_glib()); + gst_player_sys::gst_player_set_subtitle_track_enabled(self.to_glib_none().0, enabled.to_glib()); } } pub fn set_subtitle_uri(&self, uri: &str) { unsafe { - ffi::gst_player_set_subtitle_uri(self.to_glib_none().0, uri.to_glib_none().0); + gst_player_sys::gst_player_set_subtitle_uri(self.to_glib_none().0, uri.to_glib_none().0); } } pub fn set_uri(&self, uri: &str) { unsafe { - ffi::gst_player_set_uri(self.to_glib_none().0, uri.to_glib_none().0); + gst_player_sys::gst_player_set_uri(self.to_glib_none().0, uri.to_glib_none().0); } } pub fn set_video_track(&self, stream_index: i32) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_player_set_video_track(self.to_glib_none().0, stream_index), "Failed to set video track") + glib_result_from_gboolean!(gst_player_sys::gst_player_set_video_track(self.to_glib_none().0, stream_index), "Failed to set video track") } } pub fn set_video_track_enabled(&self, enabled: bool) { unsafe { - ffi::gst_player_set_video_track_enabled(self.to_glib_none().0, enabled.to_glib()); + gst_player_sys::gst_player_set_video_track_enabled(self.to_glib_none().0, enabled.to_glib()); } } - pub fn set_visualization<'a, P: Into>>(&self, name: P) -> Result<(), glib::error::BoolError> { - let name = name.into(); + pub fn set_visualization(&self, name: Option<&str>) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_player_set_visualization(self.to_glib_none().0, name.to_glib_none().0), "Failed to set visualization") + glib_result_from_gboolean!(gst_player_sys::gst_player_set_visualization(self.to_glib_none().0, name.to_glib_none().0), "Failed to set visualization") } } pub fn set_visualization_enabled(&self, enabled: bool) { unsafe { - ffi::gst_player_set_visualization_enabled(self.to_glib_none().0, enabled.to_glib()); + gst_player_sys::gst_player_set_visualization_enabled(self.to_glib_none().0, enabled.to_glib()); } } pub fn set_volume(&self, val: f64) { unsafe { - ffi::gst_player_set_volume(self.to_glib_none().0, val); + gst_player_sys::gst_player_set_volume(self.to_glib_none().0, val); } } pub fn stop(&self) { unsafe { - ffi::gst_player_stop(self.to_glib_none().0); + gst_player_sys::gst_player_stop(self.to_glib_none().0); } } pub fn get_property_suburi(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"suburi\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"suburi\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - pub fn set_property_suburi<'a, P: Into>>(&self, suburi: P) { - let suburi = suburi.into(); + pub fn set_property_suburi(&self, suburi: Option<&str>) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"suburi\0".as_ptr() as *const _, Value::from(suburi).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"suburi\0".as_ptr() as *const _, Value::from(suburi).to_glib_none().0); } } pub fn get_property_video_multiview_flags(&self) -> gst_video::VideoMultiviewFlags { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"video-multiview-flags\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"video-multiview-flags\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_video_multiview_flags(&self, video_multiview_flags: gst_video::VideoMultiviewFlags) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"video-multiview-flags\0".as_ptr() as *const _, Value::from(&video_multiview_flags).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"video-multiview-flags\0".as_ptr() as *const _, Value::from(&video_multiview_flags).to_glib_none().0); } } pub fn get_property_video_multiview_mode(&self) -> gst_video::VideoMultiviewFramePacking { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"video-multiview-mode\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"video-multiview-mode\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_video_multiview_mode(&self, video_multiview_mode: gst_video::VideoMultiviewFramePacking) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"video-multiview-mode\0".as_ptr() as *const _, Value::from(&video_multiview_mode).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"video-multiview-mode\0".as_ptr() as *const _, Value::from(&video_multiview_mode).to_glib_none().0); } } pub fn get_audio_streams(info: &PlayerMediaInfo) -> Vec { skip_assert_initialized!(); unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_player_get_audio_streams(info.to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_player_sys::gst_player_get_audio_streams(info.to_glib_none().0)) } } pub fn get_subtitle_streams(info: &PlayerMediaInfo) -> Vec { skip_assert_initialized!(); unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_player_get_subtitle_streams(info.to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_player_sys::gst_player_get_subtitle_streams(info.to_glib_none().0)) } } pub fn get_video_streams(info: &PlayerMediaInfo) -> Vec { skip_assert_initialized!(); unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_player_get_video_streams(info.to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_player_sys::gst_player_get_video_streams(info.to_glib_none().0)) } } pub fn visualizations_get() -> Vec { assert_initialized_main_thread!(); unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_player_visualizations_get()) + FromGlibPtrContainer::from_glib_full(gst_player_sys::gst_player_visualizations_get()) } } @@ -554,127 +551,127 @@ impl Player { unsafe impl Send for Player {} unsafe impl Sync for Player {} -unsafe extern "C" fn buffering_trampoline(this: *mut ffi::GstPlayer, object: libc::c_int, f: glib_ffi::gpointer) { +unsafe extern "C" fn buffering_trampoline(this: *mut gst_player_sys::GstPlayer, object: libc::c_int, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), object) } -unsafe extern "C" fn end_of_stream_trampoline(this: *mut ffi::GstPlayer, f: glib_ffi::gpointer) { +unsafe extern "C" fn end_of_stream_trampoline(this: *mut gst_player_sys::GstPlayer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn error_trampoline(this: *mut ffi::GstPlayer, object: *mut glib_ffi::GError, f: glib_ffi::gpointer) { +unsafe extern "C" fn error_trampoline(this: *mut gst_player_sys::GstPlayer, object: *mut glib_sys::GError, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), &from_glib_borrow(object)) } -unsafe extern "C" fn media_info_updated_trampoline(this: *mut ffi::GstPlayer, object: *mut ffi::GstPlayerMediaInfo, f: glib_ffi::gpointer) { +unsafe extern "C" fn media_info_updated_trampoline(this: *mut gst_player_sys::GstPlayer, object: *mut gst_player_sys::GstPlayerMediaInfo, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), &from_glib_borrow(object)) } -unsafe extern "C" fn mute_changed_trampoline(this: *mut ffi::GstPlayer, f: glib_ffi::gpointer) { +unsafe extern "C" fn mute_changed_trampoline(this: *mut gst_player_sys::GstPlayer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn state_changed_trampoline(this: *mut ffi::GstPlayer, object: ffi::GstPlayerState, f: glib_ffi::gpointer) { +unsafe extern "C" fn state_changed_trampoline(this: *mut gst_player_sys::GstPlayer, object: gst_player_sys::GstPlayerState, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), from_glib(object)) } -unsafe extern "C" fn uri_loaded_trampoline(this: *mut ffi::GstPlayer, object: *mut libc::c_char, f: glib_ffi::gpointer) { +unsafe extern "C" fn uri_loaded_trampoline(this: *mut gst_player_sys::GstPlayer, object: *mut libc::c_char, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), &GString::from_glib_borrow(object)) } -unsafe extern "C" fn video_dimensions_changed_trampoline(this: *mut ffi::GstPlayer, object: libc::c_int, p0: libc::c_int, f: glib_ffi::gpointer) { +unsafe extern "C" fn video_dimensions_changed_trampoline(this: *mut gst_player_sys::GstPlayer, object: libc::c_int, p0: libc::c_int, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), object, p0) } -unsafe extern "C" fn volume_changed_trampoline(this: *mut ffi::GstPlayer, f: glib_ffi::gpointer) { +unsafe extern "C" fn volume_changed_trampoline(this: *mut gst_player_sys::GstPlayer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn warning_trampoline(this: *mut ffi::GstPlayer, object: *mut glib_ffi::GError, f: glib_ffi::gpointer) { +unsafe extern "C" fn warning_trampoline(this: *mut gst_player_sys::GstPlayer, object: *mut glib_sys::GError, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), &from_glib_borrow(object)) } -unsafe extern "C" fn notify_audio_video_offset_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_audio_video_offset_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_current_audio_track_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_current_audio_track_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_current_subtitle_track_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_current_subtitle_track_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_current_video_track_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_current_video_track_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_duration_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_media_info_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_media_info_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_mute_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_mute_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_pipeline_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_pipeline_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_position_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_position_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_rate_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_rate_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_suburi_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_suburi_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_uri_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_uri_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_video_multiview_flags_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_video_multiview_flags_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_video_multiview_mode_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_video_multiview_mode_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_volume_trampoline(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_volume_trampoline(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer-player/src/auto/player_audio_info.rs b/gstreamer-player/src/auto/player_audio_info.rs index 69c1ca241..10bbf6e80 100644 --- a/gstreamer-player/src/auto/player_audio_info.rs +++ b/gstreamer-player/src/auto/player_audio_info.rs @@ -3,46 +3,46 @@ // DO NOT EDIT use PlayerStreamInfo; -use ffi; use glib::GString; use glib::translate::*; +use gst_player_sys; glib_wrapper! { - pub struct PlayerAudioInfo(Object) @extends PlayerStreamInfo; + pub struct PlayerAudioInfo(Object) @extends PlayerStreamInfo; match fn { - get_type => || ffi::gst_player_audio_info_get_type(), + get_type => || gst_player_sys::gst_player_audio_info_get_type(), } } impl PlayerAudioInfo { pub fn get_bitrate(&self) -> i32 { unsafe { - ffi::gst_player_audio_info_get_bitrate(self.to_glib_none().0) + gst_player_sys::gst_player_audio_info_get_bitrate(self.to_glib_none().0) } } pub fn get_channels(&self) -> i32 { unsafe { - ffi::gst_player_audio_info_get_channels(self.to_glib_none().0) + gst_player_sys::gst_player_audio_info_get_channels(self.to_glib_none().0) } } pub fn get_language(&self) -> Option { unsafe { - from_glib_none(ffi::gst_player_audio_info_get_language(self.to_glib_none().0)) + from_glib_none(gst_player_sys::gst_player_audio_info_get_language(self.to_glib_none().0)) } } pub fn get_max_bitrate(&self) -> i32 { unsafe { - ffi::gst_player_audio_info_get_max_bitrate(self.to_glib_none().0) + gst_player_sys::gst_player_audio_info_get_max_bitrate(self.to_glib_none().0) } } pub fn get_sample_rate(&self) -> i32 { unsafe { - ffi::gst_player_audio_info_get_sample_rate(self.to_glib_none().0) + gst_player_sys::gst_player_audio_info_get_sample_rate(self.to_glib_none().0) } } } diff --git a/gstreamer-player/src/auto/player_gmain_context_signal_dispatcher.rs b/gstreamer-player/src/auto/player_gmain_context_signal_dispatcher.rs index d514bd155..e2dbf9afb 100644 --- a/gstreamer-player/src/auto/player_gmain_context_signal_dispatcher.rs +++ b/gstreamer-player/src/auto/player_gmain_context_signal_dispatcher.rs @@ -3,19 +3,19 @@ // DO NOT EDIT use PlayerSignalDispatcher; -use ffi; use glib; use glib::StaticType; use glib::Value; use glib::object::ObjectType; use glib::translate::*; -use gobject_ffi; +use gobject_sys; +use gst_player_sys; glib_wrapper! { - pub struct PlayerGMainContextSignalDispatcher(Object) @implements PlayerSignalDispatcher; + pub struct PlayerGMainContextSignalDispatcher(Object) @implements PlayerSignalDispatcher; match fn { - get_type => || ffi::gst_player_g_main_context_signal_dispatcher_get_type(), + get_type => || gst_player_sys::gst_player_g_main_context_signal_dispatcher_get_type(), } } @@ -23,7 +23,7 @@ impl PlayerGMainContextSignalDispatcher { pub fn get_property_application_context(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"application-context\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"application-context\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } diff --git a/gstreamer-player/src/auto/player_media_info.rs b/gstreamer-player/src/auto/player_media_info.rs index 851dc2363..4a384015c 100644 --- a/gstreamer-player/src/auto/player_media_info.rs +++ b/gstreamer-player/src/auto/player_media_info.rs @@ -6,113 +6,113 @@ use PlayerAudioInfo; use PlayerStreamInfo; use PlayerSubtitleInfo; use PlayerVideoInfo; -use ffi; use glib::GString; use glib::translate::*; use gst; +use gst_player_sys; glib_wrapper! { - pub struct PlayerMediaInfo(Object); + pub struct PlayerMediaInfo(Object); match fn { - get_type => || ffi::gst_player_media_info_get_type(), + get_type => || gst_player_sys::gst_player_media_info_get_type(), } } impl PlayerMediaInfo { pub fn get_audio_streams(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_audio_streams(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_player_sys::gst_player_media_info_get_audio_streams(self.to_glib_none().0)) } } pub fn get_container_format(&self) -> Option { unsafe { - from_glib_none(ffi::gst_player_media_info_get_container_format(self.to_glib_none().0)) + from_glib_none(gst_player_sys::gst_player_media_info_get_container_format(self.to_glib_none().0)) } } pub fn get_duration(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_player_media_info_get_duration(self.to_glib_none().0)) + from_glib(gst_player_sys::gst_player_media_info_get_duration(self.to_glib_none().0)) } } pub fn get_image_sample(&self) -> Option { unsafe { - from_glib_none(ffi::gst_player_media_info_get_image_sample(self.to_glib_none().0)) + from_glib_none(gst_player_sys::gst_player_media_info_get_image_sample(self.to_glib_none().0)) } } pub fn get_number_of_audio_streams(&self) -> u32 { unsafe { - ffi::gst_player_media_info_get_number_of_audio_streams(self.to_glib_none().0) + gst_player_sys::gst_player_media_info_get_number_of_audio_streams(self.to_glib_none().0) } } pub fn get_number_of_streams(&self) -> u32 { unsafe { - ffi::gst_player_media_info_get_number_of_streams(self.to_glib_none().0) + gst_player_sys::gst_player_media_info_get_number_of_streams(self.to_glib_none().0) } } pub fn get_number_of_subtitle_streams(&self) -> u32 { unsafe { - ffi::gst_player_media_info_get_number_of_subtitle_streams(self.to_glib_none().0) + gst_player_sys::gst_player_media_info_get_number_of_subtitle_streams(self.to_glib_none().0) } } pub fn get_number_of_video_streams(&self) -> u32 { unsafe { - ffi::gst_player_media_info_get_number_of_video_streams(self.to_glib_none().0) + gst_player_sys::gst_player_media_info_get_number_of_video_streams(self.to_glib_none().0) } } pub fn get_stream_list(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_stream_list(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_player_sys::gst_player_media_info_get_stream_list(self.to_glib_none().0)) } } pub fn get_subtitle_streams(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_subtitle_streams(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_player_sys::gst_player_media_info_get_subtitle_streams(self.to_glib_none().0)) } } pub fn get_tags(&self) -> Option { unsafe { - from_glib_none(ffi::gst_player_media_info_get_tags(self.to_glib_none().0)) + from_glib_none(gst_player_sys::gst_player_media_info_get_tags(self.to_glib_none().0)) } } pub fn get_title(&self) -> Option { unsafe { - from_glib_none(ffi::gst_player_media_info_get_title(self.to_glib_none().0)) + from_glib_none(gst_player_sys::gst_player_media_info_get_title(self.to_glib_none().0)) } } pub fn get_uri(&self) -> GString { unsafe { - from_glib_none(ffi::gst_player_media_info_get_uri(self.to_glib_none().0)) + from_glib_none(gst_player_sys::gst_player_media_info_get_uri(self.to_glib_none().0)) } } pub fn get_video_streams(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_video_streams(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_player_sys::gst_player_media_info_get_video_streams(self.to_glib_none().0)) } } pub fn is_live(&self) -> bool { unsafe { - from_glib(ffi::gst_player_media_info_is_live(self.to_glib_none().0)) + from_glib(gst_player_sys::gst_player_media_info_is_live(self.to_glib_none().0)) } } pub fn is_seekable(&self) -> bool { unsafe { - from_glib(ffi::gst_player_media_info_is_seekable(self.to_glib_none().0)) + from_glib(gst_player_sys::gst_player_media_info_is_seekable(self.to_glib_none().0)) } } } diff --git a/gstreamer-player/src/auto/player_signal_dispatcher.rs b/gstreamer-player/src/auto/player_signal_dispatcher.rs index c27c87a57..95b08c70f 100644 --- a/gstreamer-player/src/auto/player_signal_dispatcher.rs +++ b/gstreamer-player/src/auto/player_signal_dispatcher.rs @@ -2,15 +2,15 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::object::IsA; use glib::translate::*; +use gst_player_sys; glib_wrapper! { - pub struct PlayerSignalDispatcher(Interface); + pub struct PlayerSignalDispatcher(Interface); match fn { - get_type => || ffi::gst_player_signal_dispatcher_get_type(), + get_type => || gst_player_sys::gst_player_signal_dispatcher_get_type(), } } diff --git a/gstreamer-player/src/auto/player_stream_info.rs b/gstreamer-player/src/auto/player_stream_info.rs index e8724ea46..3cbd0dd8b 100644 --- a/gstreamer-player/src/auto/player_stream_info.rs +++ b/gstreamer-player/src/auto/player_stream_info.rs @@ -2,17 +2,17 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::GString; use glib::object::IsA; use glib::translate::*; use gst; +use gst_player_sys; glib_wrapper! { - pub struct PlayerStreamInfo(Object); + pub struct PlayerStreamInfo(Object); match fn { - get_type => || ffi::gst_player_stream_info_get_type(), + get_type => || gst_player_sys::gst_player_stream_info_get_type(), } } @@ -36,31 +36,31 @@ pub trait PlayerStreamInfoExt: 'static { impl> PlayerStreamInfoExt for O { fn get_caps(&self) -> Option { unsafe { - from_glib_none(ffi::gst_player_stream_info_get_caps(const_override(self.as_ref().to_glib_none().0))) + from_glib_none(gst_player_sys::gst_player_stream_info_get_caps(const_override(self.as_ref().to_glib_none().0))) } } fn get_codec(&self) -> Option { unsafe { - from_glib_none(ffi::gst_player_stream_info_get_codec(const_override(self.as_ref().to_glib_none().0))) + from_glib_none(gst_player_sys::gst_player_stream_info_get_codec(const_override(self.as_ref().to_glib_none().0))) } } fn get_index(&self) -> i32 { unsafe { - ffi::gst_player_stream_info_get_index(const_override(self.as_ref().to_glib_none().0)) + gst_player_sys::gst_player_stream_info_get_index(const_override(self.as_ref().to_glib_none().0)) } } fn get_stream_type(&self) -> GString { unsafe { - from_glib_none(ffi::gst_player_stream_info_get_stream_type(const_override(self.as_ref().to_glib_none().0))) + from_glib_none(gst_player_sys::gst_player_stream_info_get_stream_type(const_override(self.as_ref().to_glib_none().0))) } } fn get_tags(&self) -> Option { unsafe { - from_glib_none(ffi::gst_player_stream_info_get_tags(const_override(self.as_ref().to_glib_none().0))) + from_glib_none(gst_player_sys::gst_player_stream_info_get_tags(const_override(self.as_ref().to_glib_none().0))) } } } diff --git a/gstreamer-player/src/auto/player_subtitle_info.rs b/gstreamer-player/src/auto/player_subtitle_info.rs index ef3de8d08..e61e5c14f 100644 --- a/gstreamer-player/src/auto/player_subtitle_info.rs +++ b/gstreamer-player/src/auto/player_subtitle_info.rs @@ -3,22 +3,22 @@ // DO NOT EDIT use PlayerStreamInfo; -use ffi; use glib::GString; use glib::translate::*; +use gst_player_sys; glib_wrapper! { - pub struct PlayerSubtitleInfo(Object) @extends PlayerStreamInfo; + pub struct PlayerSubtitleInfo(Object) @extends PlayerStreamInfo; match fn { - get_type => || ffi::gst_player_subtitle_info_get_type(), + get_type => || gst_player_sys::gst_player_subtitle_info_get_type(), } } impl PlayerSubtitleInfo { pub fn get_language(&self) -> Option { unsafe { - from_glib_none(ffi::gst_player_subtitle_info_get_language(self.to_glib_none().0)) + from_glib_none(gst_player_sys::gst_player_subtitle_info_get_language(self.to_glib_none().0)) } } } diff --git a/gstreamer-player/src/auto/player_video_info.rs b/gstreamer-player/src/auto/player_video_info.rs index 5f6eb6e83..5e93690c9 100644 --- a/gstreamer-player/src/auto/player_video_info.rs +++ b/gstreamer-player/src/auto/player_video_info.rs @@ -3,39 +3,39 @@ // DO NOT EDIT use PlayerStreamInfo; -use ffi; use glib::translate::*; +use gst_player_sys; glib_wrapper! { - pub struct PlayerVideoInfo(Object) @extends PlayerStreamInfo; + pub struct PlayerVideoInfo(Object) @extends PlayerStreamInfo; match fn { - get_type => || ffi::gst_player_video_info_get_type(), + get_type => || gst_player_sys::gst_player_video_info_get_type(), } } impl PlayerVideoInfo { pub fn get_bitrate(&self) -> i32 { unsafe { - ffi::gst_player_video_info_get_bitrate(self.to_glib_none().0) + gst_player_sys::gst_player_video_info_get_bitrate(self.to_glib_none().0) } } pub fn get_height(&self) -> i32 { unsafe { - ffi::gst_player_video_info_get_height(self.to_glib_none().0) + gst_player_sys::gst_player_video_info_get_height(self.to_glib_none().0) } } pub fn get_max_bitrate(&self) -> i32 { unsafe { - ffi::gst_player_video_info_get_max_bitrate(self.to_glib_none().0) + gst_player_sys::gst_player_video_info_get_max_bitrate(self.to_glib_none().0) } } pub fn get_width(&self) -> i32 { unsafe { - ffi::gst_player_video_info_get_width(self.to_glib_none().0) + gst_player_sys::gst_player_video_info_get_width(self.to_glib_none().0) } } } 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 f3332fa7d..f3e5cc8b1 100644 --- a/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs +++ b/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs @@ -3,34 +3,32 @@ // DO NOT EDIT use PlayerVideoRenderer; -use ffi; -use glib; use glib::StaticType; use glib::Value; -use glib::object::IsA; use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; +use gst_player_sys; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; glib_wrapper! { - pub struct PlayerVideoOverlayVideoRenderer(Object) @implements PlayerVideoRenderer; + pub struct PlayerVideoOverlayVideoRenderer(Object) @implements PlayerVideoRenderer; match fn { - get_type => || ffi::gst_player_video_overlay_video_renderer_get_type(), + get_type => || gst_player_sys::gst_player_video_overlay_video_renderer_get_type(), } } impl PlayerVideoOverlayVideoRenderer { pub fn expose(&self) { unsafe { - ffi::gst_player_video_overlay_video_renderer_expose(self.to_glib_none().0); + gst_player_sys::gst_player_video_overlay_video_renderer_expose(self.to_glib_none().0); } } @@ -40,45 +38,45 @@ impl PlayerVideoOverlayVideoRenderer { let mut y = mem::uninitialized(); let mut width = mem::uninitialized(); let mut height = mem::uninitialized(); - ffi::gst_player_video_overlay_video_renderer_get_render_rectangle(self.to_glib_none().0, &mut x, &mut y, &mut width, &mut height); + gst_player_sys::gst_player_video_overlay_video_renderer_get_render_rectangle(self.to_glib_none().0, &mut x, &mut y, &mut width, &mut height); (x, y, width, height) } } //pub fn get_window_handle(&self) -> /*Unimplemented*/Option { - // unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_get_window_handle() } + // unsafe { TODO: call gst_player_sys:gst_player_video_overlay_video_renderer_get_window_handle() } //} pub fn set_render_rectangle(&self, x: i32, y: i32, width: i32, height: i32) { unsafe { - ffi::gst_player_video_overlay_video_renderer_set_render_rectangle(self.to_glib_none().0, x, y, width, height); + gst_player_sys::gst_player_video_overlay_video_renderer_set_render_rectangle(self.to_glib_none().0, x, y, width, height); } } //pub fn set_window_handle(&self, window_handle: /*Unimplemented*/Option) { - // unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_set_window_handle() } + // unsafe { TODO: call gst_player_sys:gst_player_video_overlay_video_renderer_set_window_handle() } //} pub fn get_property_video_sink(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"video-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"video-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - pub fn set_property_video_sink + glib::value::SetValueOptional>(&self, video_sink: Option<&P>) { + pub fn set_property_video_sink(&self, video_sink: Option<&gst::Element>) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"video-sink\0".as_ptr() as *const _, Value::from(video_sink).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"video-sink\0".as_ptr() as *const _, Value::from(video_sink).to_glib_none().0); } } //pub fn new(window_handle: /*Unimplemented*/Option) -> Option { - // unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_new() } + // unsafe { TODO: call gst_player_sys:gst_player_video_overlay_video_renderer_new() } //} //pub fn new_with_sink>(window_handle: /*Unimplemented*/Option, video_sink: &P) -> Option { - // unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_new_with_sink() } + // unsafe { TODO: call gst_player_sys:gst_player_video_overlay_video_renderer_new_with_sink() } //} pub fn connect_property_video_sink_notify(&self, f: F) -> SignalHandlerId { @@ -101,12 +99,12 @@ impl PlayerVideoOverlayVideoRenderer { unsafe impl Send for PlayerVideoOverlayVideoRenderer {} unsafe impl Sync for PlayerVideoOverlayVideoRenderer {} -unsafe extern "C" fn notify_video_sink_trampoline(this: *mut ffi::GstPlayerVideoOverlayVideoRenderer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_video_sink_trampoline(this: *mut gst_player_sys::GstPlayerVideoOverlayVideoRenderer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_window_handle_trampoline(this: *mut ffi::GstPlayerVideoOverlayVideoRenderer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_window_handle_trampoline(this: *mut gst_player_sys::GstPlayerVideoOverlayVideoRenderer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer-player/src/auto/player_video_renderer.rs b/gstreamer-player/src/auto/player_video_renderer.rs index 4b83d0639..77bb456ba 100644 --- a/gstreamer-player/src/auto/player_video_renderer.rs +++ b/gstreamer-player/src/auto/player_video_renderer.rs @@ -2,15 +2,15 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::object::IsA; use glib::translate::*; +use gst_player_sys; glib_wrapper! { - pub struct PlayerVideoRenderer(Interface); + pub struct PlayerVideoRenderer(Interface); match fn { - get_type => || ffi::gst_player_video_renderer_get_type(), + get_type => || gst_player_sys::gst_player_video_renderer_get_type(), } } diff --git a/gstreamer-player/src/auto/player_visualization.rs b/gstreamer-player/src/auto/player_visualization.rs index 8769285b6..0d187f2a4 100644 --- a/gstreamer-player/src/auto/player_visualization.rs +++ b/gstreamer-player/src/auto/player_visualization.rs @@ -2,17 +2,17 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::translate::*; +use gst_player_sys; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct PlayerVisualization(Boxed); + pub struct PlayerVisualization(Boxed); match fn { - copy => |ptr| ffi::gst_player_visualization_copy(mut_override(ptr)), - free => |ptr| ffi::gst_player_visualization_free(ptr), - get_type => || ffi::gst_player_visualization_get_type(), + copy => |ptr| gst_player_sys::gst_player_visualization_copy(mut_override(ptr)), + free => |ptr| gst_player_sys::gst_player_visualization_free(ptr), + get_type => || gst_player_sys::gst_player_visualization_get_type(), } } diff --git a/gstreamer-player/src/auto/versions.txt b/gstreamer-player/src/auto/versions.txt index b9131200d..a9e0ccc5d 100644 --- a/gstreamer-player/src/auto/versions.txt +++ b/gstreamer-player/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-rtsp-server/src/auto/enums.rs b/gstreamer-rtsp-server/src/auto/enums.rs index 52337fe2d..a69aaa57d 100644 --- a/gstreamer-rtsp-server/src/auto/enums.rs +++ b/gstreamer-rtsp-server/src/auto/enums.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +9,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_rtsp_server_sys; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] @@ -26,23 +26,23 @@ pub enum RTSPAddressPoolResult { #[doc(hidden)] impl ToGlib for RTSPAddressPoolResult { - type GlibType = ffi::GstRTSPAddressPoolResult; + type GlibType = gst_rtsp_server_sys::GstRTSPAddressPoolResult; - fn to_glib(&self) -> ffi::GstRTSPAddressPoolResult { + fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPAddressPoolResult { match *self { - RTSPAddressPoolResult::Ok => ffi::GST_RTSP_ADDRESS_POOL_OK, - RTSPAddressPoolResult::Einval => ffi::GST_RTSP_ADDRESS_POOL_EINVAL, - RTSPAddressPoolResult::Ereserved => ffi::GST_RTSP_ADDRESS_POOL_ERESERVED, - RTSPAddressPoolResult::Erange => ffi::GST_RTSP_ADDRESS_POOL_ERANGE, - RTSPAddressPoolResult::Elast => ffi::GST_RTSP_ADDRESS_POOL_ELAST, + RTSPAddressPoolResult::Ok => gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_OK, + RTSPAddressPoolResult::Einval => gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_EINVAL, + RTSPAddressPoolResult::Ereserved => gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_ERESERVED, + RTSPAddressPoolResult::Erange => gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_ERANGE, + RTSPAddressPoolResult::Elast => gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_ELAST, RTSPAddressPoolResult::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPAddressPoolResult { - fn from_glib(value: ffi::GstRTSPAddressPoolResult) -> Self { +impl FromGlib for RTSPAddressPoolResult { + fn from_glib(value: gst_rtsp_server_sys::GstRTSPAddressPoolResult) -> Self { skip_assert_initialized!(); match value { 0 => RTSPAddressPoolResult::Ok, @@ -67,21 +67,21 @@ pub enum RTSPFilterResult { #[doc(hidden)] impl ToGlib for RTSPFilterResult { - type GlibType = ffi::GstRTSPFilterResult; + type GlibType = gst_rtsp_server_sys::GstRTSPFilterResult; - fn to_glib(&self) -> ffi::GstRTSPFilterResult { + fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPFilterResult { match *self { - RTSPFilterResult::Remove => ffi::GST_RTSP_FILTER_REMOVE, - RTSPFilterResult::Keep => ffi::GST_RTSP_FILTER_KEEP, - RTSPFilterResult::Ref => ffi::GST_RTSP_FILTER_REF, + RTSPFilterResult::Remove => gst_rtsp_server_sys::GST_RTSP_FILTER_REMOVE, + RTSPFilterResult::Keep => gst_rtsp_server_sys::GST_RTSP_FILTER_KEEP, + RTSPFilterResult::Ref => gst_rtsp_server_sys::GST_RTSP_FILTER_REF, RTSPFilterResult::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPFilterResult { - fn from_glib(value: ffi::GstRTSPFilterResult) -> Self { +impl FromGlib for RTSPFilterResult { + fn from_glib(value: gst_rtsp_server_sys::GstRTSPFilterResult) -> Self { skip_assert_initialized!(); match value { 0 => RTSPFilterResult::Remove, @@ -107,24 +107,24 @@ pub enum RTSPMediaStatus { #[doc(hidden)] impl ToGlib for RTSPMediaStatus { - type GlibType = ffi::GstRTSPMediaStatus; + type GlibType = gst_rtsp_server_sys::GstRTSPMediaStatus; - fn to_glib(&self) -> ffi::GstRTSPMediaStatus { + fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPMediaStatus { match *self { - RTSPMediaStatus::Unprepared => ffi::GST_RTSP_MEDIA_STATUS_UNPREPARED, - RTSPMediaStatus::Unpreparing => ffi::GST_RTSP_MEDIA_STATUS_UNPREPARING, - RTSPMediaStatus::Preparing => ffi::GST_RTSP_MEDIA_STATUS_PREPARING, - RTSPMediaStatus::Prepared => ffi::GST_RTSP_MEDIA_STATUS_PREPARED, - RTSPMediaStatus::Suspended => ffi::GST_RTSP_MEDIA_STATUS_SUSPENDED, - RTSPMediaStatus::Error => ffi::GST_RTSP_MEDIA_STATUS_ERROR, + RTSPMediaStatus::Unprepared => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_UNPREPARED, + RTSPMediaStatus::Unpreparing => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_UNPREPARING, + RTSPMediaStatus::Preparing => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_PREPARING, + RTSPMediaStatus::Prepared => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_PREPARED, + RTSPMediaStatus::Suspended => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_SUSPENDED, + RTSPMediaStatus::Error => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_ERROR, RTSPMediaStatus::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPMediaStatus { - fn from_glib(value: ffi::GstRTSPMediaStatus) -> Self { +impl FromGlib for RTSPMediaStatus { + fn from_glib(value: gst_rtsp_server_sys::GstRTSPMediaStatus) -> Self { skip_assert_initialized!(); match value { 0 => RTSPMediaStatus::Unprepared, @@ -150,21 +150,21 @@ pub enum RTSPPublishClockMode { #[doc(hidden)] impl ToGlib for RTSPPublishClockMode { - type GlibType = ffi::GstRTSPPublishClockMode; + type GlibType = gst_rtsp_server_sys::GstRTSPPublishClockMode; - fn to_glib(&self) -> ffi::GstRTSPPublishClockMode { + fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPPublishClockMode { match *self { - RTSPPublishClockMode::None => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_NONE, - RTSPPublishClockMode::Clock => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK, - RTSPPublishClockMode::ClockAndOffset => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET, + RTSPPublishClockMode::None => gst_rtsp_server_sys::GST_RTSP_PUBLISH_CLOCK_MODE_NONE, + RTSPPublishClockMode::Clock => gst_rtsp_server_sys::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK, + RTSPPublishClockMode::ClockAndOffset => gst_rtsp_server_sys::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET, RTSPPublishClockMode::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPPublishClockMode { - fn from_glib(value: ffi::GstRTSPPublishClockMode) -> Self { +impl FromGlib for RTSPPublishClockMode { + fn from_glib(value: gst_rtsp_server_sys::GstRTSPPublishClockMode) -> Self { skip_assert_initialized!(); match value { 0 => RTSPPublishClockMode::None, @@ -177,7 +177,7 @@ impl FromGlib for RTSPPublishClockMode { impl StaticType for RTSPPublishClockMode { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_publish_clock_mode_get_type()) } + unsafe { from_glib(gst_rtsp_server_sys::gst_rtsp_publish_clock_mode_get_type()) } } } @@ -189,13 +189,13 @@ impl<'a> FromValueOptional<'a> for RTSPPublishClockMode { impl<'a> FromValue<'a> for RTSPPublishClockMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for RTSPPublishClockMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -211,21 +211,21 @@ pub enum RTSPSuspendMode { #[doc(hidden)] impl ToGlib for RTSPSuspendMode { - type GlibType = ffi::GstRTSPSuspendMode; + type GlibType = gst_rtsp_server_sys::GstRTSPSuspendMode; - fn to_glib(&self) -> ffi::GstRTSPSuspendMode { + fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPSuspendMode { match *self { - RTSPSuspendMode::None => ffi::GST_RTSP_SUSPEND_MODE_NONE, - RTSPSuspendMode::Pause => ffi::GST_RTSP_SUSPEND_MODE_PAUSE, - RTSPSuspendMode::Reset => ffi::GST_RTSP_SUSPEND_MODE_RESET, + RTSPSuspendMode::None => gst_rtsp_server_sys::GST_RTSP_SUSPEND_MODE_NONE, + RTSPSuspendMode::Pause => gst_rtsp_server_sys::GST_RTSP_SUSPEND_MODE_PAUSE, + RTSPSuspendMode::Reset => gst_rtsp_server_sys::GST_RTSP_SUSPEND_MODE_RESET, RTSPSuspendMode::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPSuspendMode { - fn from_glib(value: ffi::GstRTSPSuspendMode) -> Self { +impl FromGlib for RTSPSuspendMode { + fn from_glib(value: gst_rtsp_server_sys::GstRTSPSuspendMode) -> Self { skip_assert_initialized!(); match value { 0 => RTSPSuspendMode::None, @@ -238,7 +238,7 @@ impl FromGlib for RTSPSuspendMode { impl StaticType for RTSPSuspendMode { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_suspend_mode_get_type()) } + unsafe { from_glib(gst_rtsp_server_sys::gst_rtsp_suspend_mode_get_type()) } } } @@ -250,13 +250,13 @@ impl<'a> FromValueOptional<'a> for RTSPSuspendMode { impl<'a> FromValue<'a> for RTSPSuspendMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for RTSPSuspendMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -271,20 +271,20 @@ pub enum RTSPThreadType { #[doc(hidden)] impl ToGlib for RTSPThreadType { - type GlibType = ffi::GstRTSPThreadType; + type GlibType = gst_rtsp_server_sys::GstRTSPThreadType; - fn to_glib(&self) -> ffi::GstRTSPThreadType { + fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPThreadType { match *self { - RTSPThreadType::Client => ffi::GST_RTSP_THREAD_TYPE_CLIENT, - RTSPThreadType::Media => ffi::GST_RTSP_THREAD_TYPE_MEDIA, + RTSPThreadType::Client => gst_rtsp_server_sys::GST_RTSP_THREAD_TYPE_CLIENT, + RTSPThreadType::Media => gst_rtsp_server_sys::GST_RTSP_THREAD_TYPE_MEDIA, RTSPThreadType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPThreadType { - fn from_glib(value: ffi::GstRTSPThreadType) -> Self { +impl FromGlib for RTSPThreadType { + fn from_glib(value: gst_rtsp_server_sys::GstRTSPThreadType) -> Self { skip_assert_initialized!(); match value { 0 => RTSPThreadType::Client, diff --git a/gstreamer-rtsp-server/src/auto/flags.rs b/gstreamer-rtsp-server/src/auto/flags.rs index 389179ab5..d790ccc3c 100644 --- a/gstreamer-rtsp-server/src/auto/flags.rs +++ b/gstreamer-rtsp-server/src/auto/flags.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +9,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_rtsp_server_sys; bitflags! { pub struct RTSPAddressFlags: u32 { @@ -25,16 +25,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for RTSPAddressFlags { - type GlibType = ffi::GstRTSPAddressFlags; + type GlibType = gst_rtsp_server_sys::GstRTSPAddressFlags; - fn to_glib(&self) -> ffi::GstRTSPAddressFlags { + fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPAddressFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for RTSPAddressFlags { - fn from_glib(value: ffi::GstRTSPAddressFlags) -> RTSPAddressFlags { +impl FromGlib for RTSPAddressFlags { + fn from_glib(value: gst_rtsp_server_sys::GstRTSPAddressFlags) -> RTSPAddressFlags { skip_assert_initialized!(); RTSPAddressFlags::from_bits_truncate(value) } @@ -49,16 +49,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for RTSPTransportMode { - type GlibType = ffi::GstRTSPTransportMode; + type GlibType = gst_rtsp_server_sys::GstRTSPTransportMode; - fn to_glib(&self) -> ffi::GstRTSPTransportMode { + fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPTransportMode { self.bits() } } #[doc(hidden)] -impl FromGlib for RTSPTransportMode { - fn from_glib(value: ffi::GstRTSPTransportMode) -> RTSPTransportMode { +impl FromGlib for RTSPTransportMode { + fn from_glib(value: gst_rtsp_server_sys::GstRTSPTransportMode) -> RTSPTransportMode { skip_assert_initialized!(); RTSPTransportMode::from_bits_truncate(value) } @@ -66,7 +66,7 @@ impl FromGlib for RTSPTransportMode { impl StaticType for RTSPTransportMode { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_transport_mode_get_type()) } + unsafe { from_glib(gst_rtsp_server_sys::gst_rtsp_transport_mode_get_type()) } } } @@ -78,13 +78,13 @@ impl<'a> FromValueOptional<'a> for RTSPTransportMode { impl<'a> FromValue<'a> for RTSPTransportMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for RTSPTransportMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_address.rs b/gstreamer-rtsp-server/src/auto/rtsp_address.rs index 406a006a8..a5845f1fc 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_address.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_address.rs @@ -2,17 +2,17 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::translate::*; +use gst_rtsp_server_sys; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct RTSPAddress(Boxed); + pub struct RTSPAddress(Boxed); match fn { - copy => |ptr| ffi::gst_rtsp_address_copy(mut_override(ptr)), - free => |ptr| ffi::gst_rtsp_address_free(ptr), - get_type => || ffi::gst_rtsp_address_get_type(), + copy => |ptr| gst_rtsp_server_sys::gst_rtsp_address_copy(mut_override(ptr)), + free => |ptr| gst_rtsp_server_sys::gst_rtsp_address_free(ptr), + get_type => || gst_rtsp_server_sys::gst_rtsp_address_get_type(), } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs index 41e1ffd1f..d1813993f 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs @@ -4,16 +4,16 @@ use RTSPAddress; use RTSPAddressFlags; -use ffi; use glib; use glib::object::IsA; use glib::translate::*; +use gst_rtsp_server_sys; glib_wrapper! { - pub struct RTSPAddressPool(Object); + pub struct RTSPAddressPool(Object); match fn { - get_type => || ffi::gst_rtsp_address_pool_get_type(), + get_type => || gst_rtsp_server_sys::gst_rtsp_address_pool_get_type(), } } @@ -21,7 +21,7 @@ impl RTSPAddressPool { pub fn new() -> RTSPAddressPool { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_rtsp_address_pool_new()) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_address_pool_new()) } } } @@ -52,31 +52,31 @@ pub trait RTSPAddressPoolExt: 'static { impl> RTSPAddressPoolExt for O { fn acquire_address(&self, flags: RTSPAddressFlags, n_ports: i32) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_address_pool_acquire_address(self.as_ref().to_glib_none().0, flags.to_glib(), n_ports)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_address_pool_acquire_address(self.as_ref().to_glib_none().0, flags.to_glib(), n_ports)) } } fn add_range(&self, min_address: &str, max_address: &str, min_port: u16, max_port: u16, ttl: u8) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_address_pool_add_range(self.as_ref().to_glib_none().0, min_address.to_glib_none().0, max_address.to_glib_none().0, min_port, max_port, ttl), "Failed to add address range") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_address_pool_add_range(self.as_ref().to_glib_none().0, min_address.to_glib_none().0, max_address.to_glib_none().0, min_port, max_port, ttl), "Failed to add address range") } } fn clear(&self) { unsafe { - ffi::gst_rtsp_address_pool_clear(self.as_ref().to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_address_pool_clear(self.as_ref().to_glib_none().0); } } fn dump(&self) { unsafe { - ffi::gst_rtsp_address_pool_dump(self.as_ref().to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_address_pool_dump(self.as_ref().to_glib_none().0); } } fn has_unicast_addresses(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_address_pool_has_unicast_addresses(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_address_pool_has_unicast_addresses(self.as_ref().to_glib_none().0)) } } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_auth.rs b/gstreamer-rtsp-server/src/auto/rtsp_auth.rs index e7a00ad86..d2b78cc37 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_auth.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_auth.rs @@ -3,9 +3,8 @@ // DO NOT EDIT use RTSPToken; -use ffi; use gio; -use gio_ffi; +use gio_sys; use glib; use glib::GString; use glib::object::Cast; @@ -13,17 +12,18 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; #[cfg(any(feature = "v1_12", feature = "dox"))] use gst_rtsp; +use gst_rtsp_server_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct RTSPAuth(Object); + pub struct RTSPAuth(Object); match fn { - get_type => || ffi::gst_rtsp_auth_get_type(), + get_type => || gst_rtsp_server_sys::gst_rtsp_auth_get_type(), } } @@ -31,21 +31,21 @@ impl RTSPAuth { pub fn new() -> RTSPAuth { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_rtsp_auth_new()) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_new()) } } pub fn check(check: &str) -> Result<(), glib::error::BoolError> { assert_initialized_main_thread!(); unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_auth_check(check.to_glib_none().0), "Check failed") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_auth_check(check.to_glib_none().0), "Check failed") } } pub fn make_basic(user: &str, pass: &str) -> GString { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_rtsp_auth_make_basic(user.to_glib_none().0, pass.to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_make_basic(user.to_glib_none().0, pass.to_glib_none().0)) } } } @@ -88,9 +88,9 @@ pub trait RTSPAuthExt: 'static { fn set_tls_authentication_mode(&self, mode: gio::TlsAuthenticationMode); - fn set_tls_certificate<'a, P: IsA + 'a, Q: Into>>(&self, cert: Q); + fn set_tls_certificate>(&self, cert: Option<&P>); - fn set_tls_database<'a, P: IsA + 'a, Q: Into>>(&self, database: Q); + fn set_tls_database>(&self, database: Option<&P>); fn connect_accept_certificate bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; } @@ -98,85 +98,83 @@ pub trait RTSPAuthExt: 'static { impl> RTSPAuthExt for O { fn add_basic(&self, basic: &str, token: &RTSPToken) { unsafe { - ffi::gst_rtsp_auth_add_basic(self.as_ref().to_glib_none().0, basic.to_glib_none().0, token.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_auth_add_basic(self.as_ref().to_glib_none().0, basic.to_glib_none().0, token.to_glib_none().0); } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn add_digest(&self, user: &str, pass: &str, token: &RTSPToken) { unsafe { - ffi::gst_rtsp_auth_add_digest(self.as_ref().to_glib_none().0, user.to_glib_none().0, pass.to_glib_none().0, token.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_auth_add_digest(self.as_ref().to_glib_none().0, user.to_glib_none().0, pass.to_glib_none().0, token.to_glib_none().0); } } fn get_default_token(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_auth_get_default_token(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_get_default_token(self.as_ref().to_glib_none().0)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn get_supported_methods(&self) -> gst_rtsp::RTSPAuthMethod { unsafe { - from_glib(ffi::gst_rtsp_auth_get_supported_methods(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_auth_get_supported_methods(self.as_ref().to_glib_none().0)) } } fn get_tls_authentication_mode(&self) -> gio::TlsAuthenticationMode { unsafe { - from_glib(ffi::gst_rtsp_auth_get_tls_authentication_mode(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_auth_get_tls_authentication_mode(self.as_ref().to_glib_none().0)) } } fn get_tls_certificate(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_auth_get_tls_certificate(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_get_tls_certificate(self.as_ref().to_glib_none().0)) } } fn get_tls_database(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_auth_get_tls_database(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_get_tls_database(self.as_ref().to_glib_none().0)) } } fn remove_basic(&self, basic: &str) { unsafe { - ffi::gst_rtsp_auth_remove_basic(self.as_ref().to_glib_none().0, basic.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_auth_remove_basic(self.as_ref().to_glib_none().0, basic.to_glib_none().0); } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn remove_digest(&self, user: &str) { unsafe { - ffi::gst_rtsp_auth_remove_digest(self.as_ref().to_glib_none().0, user.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_auth_remove_digest(self.as_ref().to_glib_none().0, user.to_glib_none().0); } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn set_supported_methods(&self, methods: gst_rtsp::RTSPAuthMethod) { unsafe { - ffi::gst_rtsp_auth_set_supported_methods(self.as_ref().to_glib_none().0, methods.to_glib()); + gst_rtsp_server_sys::gst_rtsp_auth_set_supported_methods(self.as_ref().to_glib_none().0, methods.to_glib()); } } fn set_tls_authentication_mode(&self, mode: gio::TlsAuthenticationMode) { unsafe { - ffi::gst_rtsp_auth_set_tls_authentication_mode(self.as_ref().to_glib_none().0, mode.to_glib()); + gst_rtsp_server_sys::gst_rtsp_auth_set_tls_authentication_mode(self.as_ref().to_glib_none().0, mode.to_glib()); } } - fn set_tls_certificate<'a, P: IsA + 'a, Q: Into>>(&self, cert: Q) { - let cert = cert.into(); + fn set_tls_certificate>(&self, cert: Option<&P>) { unsafe { - ffi::gst_rtsp_auth_set_tls_certificate(self.as_ref().to_glib_none().0, cert.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_auth_set_tls_certificate(self.as_ref().to_glib_none().0, cert.map(|p| p.as_ref()).to_glib_none().0); } } - fn set_tls_database<'a, P: IsA + 'a, Q: Into>>(&self, database: Q) { - let database = database.into(); + fn set_tls_database>(&self, database: Option<&P>) { unsafe { - ffi::gst_rtsp_auth_set_tls_database(self.as_ref().to_glib_none().0, database.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_auth_set_tls_database(self.as_ref().to_glib_none().0, database.map(|p| p.as_ref()).to_glib_none().0); } } @@ -189,7 +187,7 @@ impl> RTSPAuthExt for O { } } -unsafe extern "C" fn accept_certificate_trampoline bool + Send + Sync + 'static>(this: *mut ffi::GstRTSPAuth, connection: *mut gio_ffi::GTlsConnection, peer_cert: *mut gio_ffi::GTlsCertificate, errors: gio_ffi::GTlsCertificateFlags, f: glib_ffi::gpointer) -> glib_ffi::gboolean +unsafe extern "C" fn accept_certificate_trampoline bool + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPAuth, connection: *mut gio_sys::GTlsConnection, peer_cert: *mut gio_sys::GTlsCertificate, errors: gio_sys::GTlsCertificateFlags, f: glib_sys::gpointer) -> glib_sys::gboolean where P: IsA { let f: &F = &*(f as *const F); f(&RTSPAuth::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(connection), &from_glib_borrow(peer_cert), from_glib(errors)).to_glib() diff --git a/gstreamer-rtsp-server/src/auto/rtsp_client.rs b/gstreamer-rtsp-server/src/auto/rtsp_client.rs index 3580e2dc2..3eac1a7a0 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_client.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_client.rs @@ -9,7 +9,6 @@ use RTSPMountPoints; use RTSPSession; use RTSPSessionPool; use RTSPThreadPool; -use ffi; use glib::StaticType; use glib::Value; use glib::object::Cast; @@ -17,20 +16,21 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; #[cfg(any(feature = "v1_12", feature = "dox"))] use gst_rtsp; +use gst_rtsp_server_sys; #[cfg(any(feature = "v1_12", feature = "dox"))] -use gst_rtsp_ffi; +use gst_rtsp_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct RTSPClient(Object); + pub struct RTSPClient(Object); match fn { - get_type => || ffi::gst_rtsp_client_get_type(), + get_type => || gst_rtsp_server_sys::gst_rtsp_client_get_type(), } } @@ -38,7 +38,7 @@ impl RTSPClient { pub fn new() -> RTSPClient { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_rtsp_client_new()) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_new()) } } } @@ -69,21 +69,21 @@ pub trait RTSPClientExt: 'static { //fn handle_message(&self, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult; - //fn send_message<'a, P: IsA + 'a, Q: Into>>(&self, session: Q, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult; + //fn send_message>(&self, session: Option<&P>, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult; fn session_filter(&self, func: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)>) -> Vec; - fn set_auth<'a, P: IsA + 'a, Q: Into>>(&self, auth: Q); + fn set_auth>(&self, auth: Option<&P>); //fn set_connection(&self, conn: /*Ignored*/&mut gst_rtsp::RTSPConnection) -> bool; - fn set_mount_points<'a, P: IsA + 'a, Q: Into>>(&self, mounts: Q); + fn set_mount_points>(&self, mounts: Option<&P>); //fn set_send_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, bool) -> bool, user_data: /*Unimplemented*/Option); - fn set_session_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q); + fn set_session_pool>(&self, pool: Option<&P>); - fn set_thread_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q); + fn set_thread_pool>(&self, pool: Option<&P>); fn get_property_drop_backlog(&self) -> bool; @@ -159,49 +159,49 @@ pub trait RTSPClientExt: 'static { impl> RTSPClientExt for O { fn close(&self) { unsafe { - ffi::gst_rtsp_client_close(self.as_ref().to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_client_close(self.as_ref().to_glib_none().0); } } fn get_auth(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_client_get_auth(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_auth(self.as_ref().to_glib_none().0)) } } //fn get_connection(&self) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_rtsp_client_get_connection() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_get_connection() } //} fn get_mount_points(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_client_get_mount_points(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_mount_points(self.as_ref().to_glib_none().0)) } } fn get_session_pool(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_client_get_session_pool(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_session_pool(self.as_ref().to_glib_none().0)) } } fn get_thread_pool(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_client_get_thread_pool(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_thread_pool(self.as_ref().to_glib_none().0)) } } //fn handle_message(&self, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult { - // unsafe { TODO: call ffi::gst_rtsp_client_handle_message() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_handle_message() } //} - //fn send_message<'a, P: IsA + 'a, Q: Into>>(&self, session: Q, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult { - // unsafe { TODO: call ffi::gst_rtsp_client_send_message() } + //fn send_message>(&self, session: Option<&P>, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult { + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_send_message() } //} fn session_filter(&self, func: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)>) -> Vec { let func_data: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)> = func; - unsafe extern "C" fn func_func(client: *mut ffi::GstRTSPClient, sess: *mut ffi::GstRTSPSession, user_data: glib_ffi::gpointer) -> ffi::GstRTSPFilterResult { + unsafe extern "C" fn func_func(client: *mut gst_rtsp_server_sys::GstRTSPClient, sess: *mut gst_rtsp_server_sys::GstRTSPSession, user_data: glib_sys::gpointer) -> gst_rtsp_server_sys::GstRTSPFilterResult { let client = from_glib_borrow(client); let sess = from_glib_borrow(sess); let callback: *mut Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)> = user_data as *const _ as usize as *mut Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)>; @@ -212,60 +212,56 @@ impl> RTSPClientExt for O { }; res.to_glib() } - let func = Some(func_func as _); + let func = if func_data.is_some() { Some(func_func as _) } else { None }; let super_callback0: &Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)> = &func_data; unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_client_session_filter(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) + FromGlibPtrContainer::from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_session_filter(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) } } - fn set_auth<'a, P: IsA + 'a, Q: Into>>(&self, auth: Q) { - let auth = auth.into(); + fn set_auth>(&self, auth: Option<&P>) { unsafe { - ffi::gst_rtsp_client_set_auth(self.as_ref().to_glib_none().0, auth.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_client_set_auth(self.as_ref().to_glib_none().0, auth.map(|p| p.as_ref()).to_glib_none().0); } } //fn set_connection(&self, conn: /*Ignored*/&mut gst_rtsp::RTSPConnection) -> bool { - // unsafe { TODO: call ffi::gst_rtsp_client_set_connection() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_set_connection() } //} - fn set_mount_points<'a, P: IsA + 'a, Q: Into>>(&self, mounts: Q) { - let mounts = mounts.into(); + fn set_mount_points>(&self, mounts: Option<&P>) { unsafe { - ffi::gst_rtsp_client_set_mount_points(self.as_ref().to_glib_none().0, mounts.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_client_set_mount_points(self.as_ref().to_glib_none().0, mounts.map(|p| p.as_ref()).to_glib_none().0); } } //fn set_send_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, bool) -> bool, user_data: /*Unimplemented*/Option) { - // unsafe { TODO: call ffi::gst_rtsp_client_set_send_func() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_set_send_func() } //} - fn set_session_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q) { - let pool = pool.into(); + fn set_session_pool>(&self, pool: Option<&P>) { unsafe { - ffi::gst_rtsp_client_set_session_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_client_set_session_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); } } - fn set_thread_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q) { - let pool = pool.into(); + fn set_thread_pool>(&self, pool: Option<&P>) { unsafe { - ffi::gst_rtsp_client_set_thread_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_client_set_thread_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); } } fn get_property_drop_backlog(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"drop-backlog\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"drop-backlog\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_drop_backlog(&self, drop_backlog: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"drop-backlog\0".as_ptr() as *const _, Value::from(&drop_backlog).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"drop-backlog\0".as_ptr() as *const _, Value::from(&drop_backlog).to_glib_none().0); } } @@ -496,167 +492,167 @@ impl> RTSPClientExt for O { } } -unsafe extern "C" fn announce_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn announce_request_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn closed_trampoline(this: *mut ffi::GstRTSPClient, f: glib_ffi::gpointer) +unsafe extern "C" fn closed_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn describe_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn describe_request_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn get_parameter_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn get_parameter_request_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn handle_response_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn handle_response_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn new_session_trampoline(this: *mut ffi::GstRTSPClient, object: *mut ffi::GstRTSPSession, f: glib_ffi::gpointer) +unsafe extern "C" fn new_session_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, object: *mut gst_rtsp_server_sys::GstRTSPSession, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn options_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn options_request_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn pause_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn pause_request_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn play_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn play_request_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_announce_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_announce_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_describe_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_describe_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_get_parameter_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_get_parameter_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_options_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_options_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_pause_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_pause_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_play_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_play_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_record_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_record_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_set_parameter_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_set_parameter_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_setup_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_setup_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } #[cfg(any(feature = "v1_12", feature = "dox"))] -unsafe extern "C" fn pre_teardown_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode +unsafe extern "C" fn pre_teardown_request_trampoline gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib() } -unsafe extern "C" fn record_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn record_request_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn set_parameter_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn set_parameter_request_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn setup_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn setup_request_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn teardown_request_trampoline(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) +unsafe extern "C" fn teardown_request_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)) } -unsafe extern "C" fn notify_drop_backlog_trampoline(this: *mut ffi::GstRTSPClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_drop_backlog_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_mount_points_trampoline(this: *mut ffi::GstRTSPClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_mount_points_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_session_pool_trampoline(this: *mut ffi::GstRTSPClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_session_pool_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPClient, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPClient::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_media.rs index c3e022814..66c2f8bba 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media.rs @@ -8,7 +8,6 @@ use RTSPPublishClockMode; use RTSPStream; use RTSPSuspendMode; use RTSPTransportMode; -use ffi; use glib; use glib::GString; use glib::StaticType; @@ -18,19 +17,20 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; use gst_rtsp; +use gst_rtsp_server_sys; use libc; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct RTSPMedia(Object); + pub struct RTSPMedia(Object); match fn { - get_type => || ffi::gst_rtsp_media_get_type(), + get_type => || gst_rtsp_server_sys::gst_rtsp_media_get_type(), } } @@ -38,7 +38,7 @@ impl RTSPMedia { pub fn new>(element: &P) -> RTSPMedia { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_rtsp_media_new(element.as_ref().to_glib_full())) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_new(element.as_ref().to_glib_full())) } } } @@ -89,7 +89,7 @@ pub trait RTSPMediaExt: 'static { fn get_suspend_mode(&self) -> RTSPSuspendMode; - //fn get_time_provider<'a, P: Into>>(&self, address: P, port: u16) -> /*Ignored*/Option; + //fn get_time_provider(&self, address: Option<&str>, port: u16) -> /*Ignored*/Option; fn get_transport_mode(&self) -> RTSPTransportMode; @@ -115,17 +115,17 @@ pub trait RTSPMediaExt: 'static { //fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff; - fn set_address_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q); + fn set_address_pool>(&self, pool: Option<&P>); fn set_buffer_size(&self, size: u32); - fn set_clock<'a, P: IsA + 'a, Q: Into>>(&self, clock: Q); + fn set_clock>(&self, clock: Option<&P>); fn set_eos_shutdown(&self, eos_shutdown: bool); fn set_latency(&self, latency: u32); - fn set_multicast_iface<'a, P: Into>>(&self, multicast_iface: P); + fn set_multicast_iface(&self, multicast_iface: Option<&str>); //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>); @@ -213,331 +213,328 @@ pub trait RTSPMediaExt: 'static { impl> RTSPMediaExt for O { fn collect_streams(&self) { unsafe { - ffi::gst_rtsp_media_collect_streams(self.as_ref().to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_media_collect_streams(self.as_ref().to_glib_none().0); } } //fn complete_pipeline(&self, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 9, id: 31 }) -> bool { - // unsafe { TODO: call ffi::gst_rtsp_media_complete_pipeline() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_complete_pipeline() } //} fn create_stream, Q: IsA>(&self, payloader: &P, pad: &Q) -> Option { unsafe { - from_glib_none(ffi::gst_rtsp_media_create_stream(self.as_ref().to_glib_none().0, payloader.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0)) + from_glib_none(gst_rtsp_server_sys::gst_rtsp_media_create_stream(self.as_ref().to_glib_none().0, payloader.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0)) } } fn find_stream(&self, control: &str) -> Option { unsafe { - from_glib_none(ffi::gst_rtsp_media_find_stream(self.as_ref().to_glib_none().0, control.to_glib_none().0)) + from_glib_none(gst_rtsp_server_sys::gst_rtsp_media_find_stream(self.as_ref().to_glib_none().0, control.to_glib_none().0)) } } fn get_address_pool(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_media_get_address_pool(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_address_pool(self.as_ref().to_glib_none().0)) } } fn get_base_time(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_rtsp_media_get_base_time(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_base_time(self.as_ref().to_glib_none().0)) } } fn get_buffer_size(&self) -> u32 { unsafe { - ffi::gst_rtsp_media_get_buffer_size(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_media_get_buffer_size(self.as_ref().to_glib_none().0) } } fn get_clock(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_media_get_clock(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_clock(self.as_ref().to_glib_none().0)) } } fn get_element(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_media_get_element(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_element(self.as_ref().to_glib_none().0)) } } fn get_latency(&self) -> u32 { unsafe { - ffi::gst_rtsp_media_get_latency(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_media_get_latency(self.as_ref().to_glib_none().0) } } fn get_multicast_iface(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_media_get_multicast_iface(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_multicast_iface(self.as_ref().to_glib_none().0)) } } //fn get_permissions(&self) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_rtsp_media_get_permissions() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_get_permissions() } //} fn get_profiles(&self) -> gst_rtsp::RTSPProfile { unsafe { - from_glib(ffi::gst_rtsp_media_get_profiles(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_profiles(self.as_ref().to_glib_none().0)) } } fn get_protocols(&self) -> gst_rtsp::RTSPLowerTrans { unsafe { - from_glib(ffi::gst_rtsp_media_get_protocols(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_protocols(self.as_ref().to_glib_none().0)) } } fn get_publish_clock_mode(&self) -> RTSPPublishClockMode { unsafe { - from_glib(ffi::gst_rtsp_media_get_publish_clock_mode(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_publish_clock_mode(self.as_ref().to_glib_none().0)) } } fn get_range_string(&self, play: bool, unit: gst_rtsp::RTSPRangeUnit) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_media_get_range_string(self.as_ref().to_glib_none().0, play.to_glib(), unit.to_glib())) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_range_string(self.as_ref().to_glib_none().0, play.to_glib(), unit.to_glib())) } } fn get_retransmission_time(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_rtsp_media_get_retransmission_time(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_retransmission_time(self.as_ref().to_glib_none().0)) } } fn get_status(&self) -> RTSPMediaStatus { unsafe { - from_glib(ffi::gst_rtsp_media_get_status(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_status(self.as_ref().to_glib_none().0)) } } fn get_stream(&self, idx: u32) -> Option { unsafe { - from_glib_none(ffi::gst_rtsp_media_get_stream(self.as_ref().to_glib_none().0, idx)) + from_glib_none(gst_rtsp_server_sys::gst_rtsp_media_get_stream(self.as_ref().to_glib_none().0, idx)) } } fn get_suspend_mode(&self) -> RTSPSuspendMode { unsafe { - from_glib(ffi::gst_rtsp_media_get_suspend_mode(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_suspend_mode(self.as_ref().to_glib_none().0)) } } - //fn get_time_provider<'a, P: Into>>(&self, address: P, port: u16) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_rtsp_media_get_time_provider() } + //fn get_time_provider(&self, address: Option<&str>, port: u16) -> /*Ignored*/Option { + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_get_time_provider() } //} fn get_transport_mode(&self) -> RTSPTransportMode { unsafe { - from_glib(ffi::gst_rtsp_media_get_transport_mode(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_transport_mode(self.as_ref().to_glib_none().0)) } } //fn handle_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage) -> bool { - // unsafe { TODO: call ffi::gst_rtsp_media_handle_sdp() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_handle_sdp() } //} fn is_eos_shutdown(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_media_is_eos_shutdown(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_eos_shutdown(self.as_ref().to_glib_none().0)) } } fn is_reusable(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_media_is_reusable(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_reusable(self.as_ref().to_glib_none().0)) } } fn is_shared(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_media_is_shared(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_shared(self.as_ref().to_glib_none().0)) } } fn is_stop_on_disconnect(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_media_is_stop_on_disconnect(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_stop_on_disconnect(self.as_ref().to_glib_none().0)) } } fn is_time_provider(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_media_is_time_provider(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_time_provider(self.as_ref().to_glib_none().0)) } } fn n_streams(&self) -> u32 { unsafe { - ffi::gst_rtsp_media_n_streams(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_media_n_streams(self.as_ref().to_glib_none().0) } } //fn prepare(&self, thread: /*Ignored*/Option<&mut RTSPThread>) -> bool { - // unsafe { TODO: call ffi::gst_rtsp_media_prepare() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_prepare() } //} //fn seek(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange) -> bool { - // unsafe { TODO: call ffi::gst_rtsp_media_seek() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seek() } //} //fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool { - // unsafe { TODO: call ffi::gst_rtsp_media_seek_full() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seek_full() } //} //fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff { - // unsafe { TODO: call ffi::gst_rtsp_media_seekable() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seekable() } //} - fn set_address_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q) { - let pool = pool.into(); + fn set_address_pool>(&self, pool: Option<&P>) { unsafe { - ffi::gst_rtsp_media_set_address_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_media_set_address_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); } } fn set_buffer_size(&self, size: u32) { unsafe { - ffi::gst_rtsp_media_set_buffer_size(self.as_ref().to_glib_none().0, size); + gst_rtsp_server_sys::gst_rtsp_media_set_buffer_size(self.as_ref().to_glib_none().0, size); } } - fn set_clock<'a, P: IsA + 'a, Q: Into>>(&self, clock: Q) { - let clock = clock.into(); + fn set_clock>(&self, clock: Option<&P>) { unsafe { - ffi::gst_rtsp_media_set_clock(self.as_ref().to_glib_none().0, clock.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_media_set_clock(self.as_ref().to_glib_none().0, clock.map(|p| p.as_ref()).to_glib_none().0); } } fn set_eos_shutdown(&self, eos_shutdown: bool) { unsafe { - ffi::gst_rtsp_media_set_eos_shutdown(self.as_ref().to_glib_none().0, eos_shutdown.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_set_eos_shutdown(self.as_ref().to_glib_none().0, eos_shutdown.to_glib()); } } fn set_latency(&self, latency: u32) { unsafe { - ffi::gst_rtsp_media_set_latency(self.as_ref().to_glib_none().0, latency); + gst_rtsp_server_sys::gst_rtsp_media_set_latency(self.as_ref().to_glib_none().0, latency); } } - fn set_multicast_iface<'a, P: Into>>(&self, multicast_iface: P) { - let multicast_iface = multicast_iface.into(); + fn set_multicast_iface(&self, multicast_iface: Option<&str>) { unsafe { - ffi::gst_rtsp_media_set_multicast_iface(self.as_ref().to_glib_none().0, multicast_iface.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_media_set_multicast_iface(self.as_ref().to_glib_none().0, multicast_iface.to_glib_none().0); } } //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>) { - // unsafe { TODO: call ffi::gst_rtsp_media_set_permissions() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_set_permissions() } //} fn set_pipeline_state(&self, state: gst::State) { unsafe { - ffi::gst_rtsp_media_set_pipeline_state(self.as_ref().to_glib_none().0, state.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_set_pipeline_state(self.as_ref().to_glib_none().0, state.to_glib()); } } fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile) { unsafe { - ffi::gst_rtsp_media_set_profiles(self.as_ref().to_glib_none().0, profiles.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_set_profiles(self.as_ref().to_glib_none().0, profiles.to_glib()); } } fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans) { unsafe { - ffi::gst_rtsp_media_set_protocols(self.as_ref().to_glib_none().0, protocols.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_set_protocols(self.as_ref().to_glib_none().0, protocols.to_glib()); } } fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) { unsafe { - ffi::gst_rtsp_media_set_publish_clock_mode(self.as_ref().to_glib_none().0, mode.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_set_publish_clock_mode(self.as_ref().to_glib_none().0, mode.to_glib()); } } fn set_retransmission_time(&self, time: gst::ClockTime) { unsafe { - ffi::gst_rtsp_media_set_retransmission_time(self.as_ref().to_glib_none().0, time.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_set_retransmission_time(self.as_ref().to_glib_none().0, time.to_glib()); } } fn set_reusable(&self, reusable: bool) { unsafe { - ffi::gst_rtsp_media_set_reusable(self.as_ref().to_glib_none().0, reusable.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_set_reusable(self.as_ref().to_glib_none().0, reusable.to_glib()); } } fn set_shared(&self, shared: bool) { unsafe { - ffi::gst_rtsp_media_set_shared(self.as_ref().to_glib_none().0, shared.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_set_shared(self.as_ref().to_glib_none().0, shared.to_glib()); } } //fn set_state(&self, state: gst::State, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 26 }) -> bool { - // unsafe { TODO: call ffi::gst_rtsp_media_set_state() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_set_state() } //} fn set_stop_on_disconnect(&self, stop_on_disconnect: bool) { unsafe { - ffi::gst_rtsp_media_set_stop_on_disconnect(self.as_ref().to_glib_none().0, stop_on_disconnect.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_set_stop_on_disconnect(self.as_ref().to_glib_none().0, stop_on_disconnect.to_glib()); } } fn set_suspend_mode(&self, mode: RTSPSuspendMode) { unsafe { - ffi::gst_rtsp_media_set_suspend_mode(self.as_ref().to_glib_none().0, mode.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_set_suspend_mode(self.as_ref().to_glib_none().0, mode.to_glib()); } } fn set_transport_mode(&self, mode: RTSPTransportMode) { unsafe { - ffi::gst_rtsp_media_set_transport_mode(self.as_ref().to_glib_none().0, mode.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_set_transport_mode(self.as_ref().to_glib_none().0, mode.to_glib()); } } //fn setup_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage, info: /*Ignored*/&mut SDPInfo) -> bool { - // unsafe { TODO: call ffi::gst_rtsp_media_setup_sdp() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_setup_sdp() } //} fn suspend(&self) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_media_suspend(self.as_ref().to_glib_none().0), "Failed to suspend media") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_media_suspend(self.as_ref().to_glib_none().0), "Failed to suspend media") } } fn take_pipeline>(&self, pipeline: &P) { unsafe { - ffi::gst_rtsp_media_take_pipeline(self.as_ref().to_glib_none().0, pipeline.as_ref().to_glib_full()); + gst_rtsp_server_sys::gst_rtsp_media_take_pipeline(self.as_ref().to_glib_none().0, pipeline.as_ref().to_glib_full()); } } fn unprepare(&self) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_media_unprepare(self.as_ref().to_glib_none().0), "Failed to unprepare media") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_media_unprepare(self.as_ref().to_glib_none().0), "Failed to unprepare media") } } fn unsuspend(&self) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_media_unsuspend(self.as_ref().to_glib_none().0), "Failed to unsuspend media") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_media_unsuspend(self.as_ref().to_glib_none().0), "Failed to unsuspend media") } } fn use_time_provider(&self, time_provider: bool) { unsafe { - ffi::gst_rtsp_media_use_time_provider(self.as_ref().to_glib_none().0, time_provider.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_use_time_provider(self.as_ref().to_glib_none().0, time_provider.to_glib()); } } fn get_property_eos_shutdown(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"eos-shutdown\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"eos-shutdown\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -545,7 +542,7 @@ impl> RTSPMediaExt for O { fn get_property_reusable(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"reusable\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"reusable\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -553,7 +550,7 @@ impl> RTSPMediaExt for O { fn get_property_shared(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"shared\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"shared\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -561,14 +558,14 @@ impl> RTSPMediaExt for O { fn get_property_stop_on_disconnect(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"stop-on-disconnect\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"stop-on-disconnect\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_time_provider(&self, time_provider: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"time-provider\0".as_ptr() as *const _, Value::from(&time_provider).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"time-provider\0".as_ptr() as *const _, Value::from(&time_provider).to_glib_none().0); } } @@ -717,109 +714,109 @@ impl> RTSPMediaExt for O { } } -unsafe extern "C" fn new_state_trampoline(this: *mut ffi::GstRTSPMedia, object: libc::c_int, f: glib_ffi::gpointer) +unsafe extern "C" fn new_state_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, object: libc::c_int, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast(), object) } -unsafe extern "C" fn new_stream_trampoline(this: *mut ffi::GstRTSPMedia, object: *mut ffi::GstRTSPStream, f: glib_ffi::gpointer) +unsafe extern "C" fn new_stream_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, object: *mut gst_rtsp_server_sys::GstRTSPStream, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn prepared_trampoline(this: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer) +unsafe extern "C" fn prepared_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn removed_stream_trampoline(this: *mut ffi::GstRTSPMedia, object: *mut ffi::GstRTSPStream, f: glib_ffi::gpointer) +unsafe extern "C" fn removed_stream_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, object: *mut gst_rtsp_server_sys::GstRTSPStream, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn target_state_trampoline(this: *mut ffi::GstRTSPMedia, object: libc::c_int, f: glib_ffi::gpointer) +unsafe extern "C" fn target_state_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, object: libc::c_int, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast(), object) } -unsafe extern "C" fn unprepared_trampoline(this: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer) +unsafe extern "C" fn unprepared_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_buffer_size_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_buffer_size_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_clock_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_clock_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_eos_shutdown_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_eos_shutdown_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_latency_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_latency_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_profiles_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_profiles_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_protocols_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_protocols_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_reusable_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_reusable_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_shared_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_shared_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_stop_on_disconnect_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_stop_on_disconnect_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_suspend_mode_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_suspend_mode_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_time_provider_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_time_provider_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_transport_mode_trampoline(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_transport_mode_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs b/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs index ebef4bd94..505cbbda7 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs @@ -7,7 +7,6 @@ use RTSPMedia; use RTSPPublishClockMode; use RTSPSuspendMode; use RTSPTransportMode; -use ffi; use glib; use glib::GString; use glib::StaticType; @@ -17,18 +16,19 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; use gst; use gst_rtsp; +use gst_rtsp_server_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct RTSPMediaFactory(Object); + pub struct RTSPMediaFactory(Object); match fn { - get_type => || ffi::gst_rtsp_media_factory_get_type(), + get_type => || gst_rtsp_server_sys::gst_rtsp_media_factory_get_type(), } } @@ -36,7 +36,7 @@ impl RTSPMediaFactory { pub fn new() -> RTSPMediaFactory { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_rtsp_media_factory_new()) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_new()) } } } @@ -93,11 +93,11 @@ pub trait RTSPMediaFactoryExt: 'static { fn is_stop_on_disonnect(&self) -> bool; - fn set_address_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q); + fn set_address_pool>(&self, pool: Option<&P>); fn set_buffer_size(&self, size: u32); - fn set_clock<'a, P: IsA + 'a, Q: Into>>(&self, clock: Q); + fn set_clock>(&self, clock: Option<&P>); fn set_eos_shutdown(&self, eos_shutdown: bool); @@ -107,7 +107,7 @@ pub trait RTSPMediaFactoryExt: 'static { fn set_media_gtype(&self, media_gtype: glib::types::Type); - fn set_multicast_iface<'a, P: Into>>(&self, multicast_iface: P); + fn set_multicast_iface(&self, multicast_iface: Option<&str>); //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>); @@ -162,228 +162,225 @@ pub trait RTSPMediaFactoryExt: 'static { impl> RTSPMediaFactoryExt for O { //fn add_role(&self, role: &str, fieldname: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { - // unsafe { TODO: call ffi::gst_rtsp_media_factory_add_role() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_factory_add_role() } //} fn construct(&self, url: &gst_rtsp::RTSPUrl) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_media_factory_construct(self.as_ref().to_glib_none().0, url.to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_construct(self.as_ref().to_glib_none().0, url.to_glib_none().0)) } } fn create_element(&self, url: &gst_rtsp::RTSPUrl) -> Option { unsafe { - from_glib_none(ffi::gst_rtsp_media_factory_create_element(self.as_ref().to_glib_none().0, url.to_glib_none().0)) + from_glib_none(gst_rtsp_server_sys::gst_rtsp_media_factory_create_element(self.as_ref().to_glib_none().0, url.to_glib_none().0)) } } fn get_address_pool(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_media_factory_get_address_pool(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_get_address_pool(self.as_ref().to_glib_none().0)) } } fn get_buffer_size(&self) -> u32 { unsafe { - ffi::gst_rtsp_media_factory_get_buffer_size(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_media_factory_get_buffer_size(self.as_ref().to_glib_none().0) } } fn get_clock(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_media_factory_get_clock(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_get_clock(self.as_ref().to_glib_none().0)) } } fn get_latency(&self) -> u32 { unsafe { - ffi::gst_rtsp_media_factory_get_latency(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_media_factory_get_latency(self.as_ref().to_glib_none().0) } } fn get_launch(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_media_factory_get_launch(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_get_launch(self.as_ref().to_glib_none().0)) } } fn get_media_gtype(&self) -> glib::types::Type { unsafe { - from_glib(ffi::gst_rtsp_media_factory_get_media_gtype(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_media_gtype(self.as_ref().to_glib_none().0)) } } fn get_multicast_iface(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_media_factory_get_multicast_iface(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_get_multicast_iface(self.as_ref().to_glib_none().0)) } } //fn get_permissions(&self) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_rtsp_media_factory_get_permissions() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_factory_get_permissions() } //} fn get_profiles(&self) -> gst_rtsp::RTSPProfile { unsafe { - from_glib(ffi::gst_rtsp_media_factory_get_profiles(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_profiles(self.as_ref().to_glib_none().0)) } } fn get_protocols(&self) -> gst_rtsp::RTSPLowerTrans { unsafe { - from_glib(ffi::gst_rtsp_media_factory_get_protocols(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_protocols(self.as_ref().to_glib_none().0)) } } fn get_publish_clock_mode(&self) -> RTSPPublishClockMode { unsafe { - from_glib(ffi::gst_rtsp_media_factory_get_publish_clock_mode(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_publish_clock_mode(self.as_ref().to_glib_none().0)) } } fn get_retransmission_time(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_rtsp_media_factory_get_retransmission_time(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_retransmission_time(self.as_ref().to_glib_none().0)) } } fn get_suspend_mode(&self) -> RTSPSuspendMode { unsafe { - from_glib(ffi::gst_rtsp_media_factory_get_suspend_mode(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_suspend_mode(self.as_ref().to_glib_none().0)) } } fn get_transport_mode(&self) -> RTSPTransportMode { unsafe { - from_glib(ffi::gst_rtsp_media_factory_get_transport_mode(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_transport_mode(self.as_ref().to_glib_none().0)) } } fn is_eos_shutdown(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_media_factory_is_eos_shutdown(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_is_eos_shutdown(self.as_ref().to_glib_none().0)) } } fn is_shared(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_media_factory_is_shared(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_is_shared(self.as_ref().to_glib_none().0)) } } fn is_stop_on_disonnect(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_media_factory_is_stop_on_disonnect(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_is_stop_on_disonnect(self.as_ref().to_glib_none().0)) } } - fn set_address_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q) { - let pool = pool.into(); + fn set_address_pool>(&self, pool: Option<&P>) { unsafe { - ffi::gst_rtsp_media_factory_set_address_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_address_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); } } fn set_buffer_size(&self, size: u32) { unsafe { - ffi::gst_rtsp_media_factory_set_buffer_size(self.as_ref().to_glib_none().0, size); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_buffer_size(self.as_ref().to_glib_none().0, size); } } - fn set_clock<'a, P: IsA + 'a, Q: Into>>(&self, clock: Q) { - let clock = clock.into(); + fn set_clock>(&self, clock: Option<&P>) { unsafe { - ffi::gst_rtsp_media_factory_set_clock(self.as_ref().to_glib_none().0, clock.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_clock(self.as_ref().to_glib_none().0, clock.map(|p| p.as_ref()).to_glib_none().0); } } fn set_eos_shutdown(&self, eos_shutdown: bool) { unsafe { - ffi::gst_rtsp_media_factory_set_eos_shutdown(self.as_ref().to_glib_none().0, eos_shutdown.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_eos_shutdown(self.as_ref().to_glib_none().0, eos_shutdown.to_glib()); } } fn set_latency(&self, latency: u32) { unsafe { - ffi::gst_rtsp_media_factory_set_latency(self.as_ref().to_glib_none().0, latency); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_latency(self.as_ref().to_glib_none().0, latency); } } fn set_launch(&self, launch: &str) { unsafe { - ffi::gst_rtsp_media_factory_set_launch(self.as_ref().to_glib_none().0, launch.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_launch(self.as_ref().to_glib_none().0, launch.to_glib_none().0); } } fn set_media_gtype(&self, media_gtype: glib::types::Type) { unsafe { - ffi::gst_rtsp_media_factory_set_media_gtype(self.as_ref().to_glib_none().0, media_gtype.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_media_gtype(self.as_ref().to_glib_none().0, media_gtype.to_glib()); } } - fn set_multicast_iface<'a, P: Into>>(&self, multicast_iface: P) { - let multicast_iface = multicast_iface.into(); + fn set_multicast_iface(&self, multicast_iface: Option<&str>) { unsafe { - ffi::gst_rtsp_media_factory_set_multicast_iface(self.as_ref().to_glib_none().0, multicast_iface.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_multicast_iface(self.as_ref().to_glib_none().0, multicast_iface.to_glib_none().0); } } //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>) { - // unsafe { TODO: call ffi::gst_rtsp_media_factory_set_permissions() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_factory_set_permissions() } //} fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile) { unsafe { - ffi::gst_rtsp_media_factory_set_profiles(self.as_ref().to_glib_none().0, profiles.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_profiles(self.as_ref().to_glib_none().0, profiles.to_glib()); } } fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans) { unsafe { - ffi::gst_rtsp_media_factory_set_protocols(self.as_ref().to_glib_none().0, protocols.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_protocols(self.as_ref().to_glib_none().0, protocols.to_glib()); } } fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) { unsafe { - ffi::gst_rtsp_media_factory_set_publish_clock_mode(self.as_ref().to_glib_none().0, mode.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_publish_clock_mode(self.as_ref().to_glib_none().0, mode.to_glib()); } } fn set_retransmission_time(&self, time: gst::ClockTime) { unsafe { - ffi::gst_rtsp_media_factory_set_retransmission_time(self.as_ref().to_glib_none().0, time.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_retransmission_time(self.as_ref().to_glib_none().0, time.to_glib()); } } fn set_shared(&self, shared: bool) { unsafe { - ffi::gst_rtsp_media_factory_set_shared(self.as_ref().to_glib_none().0, shared.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_shared(self.as_ref().to_glib_none().0, shared.to_glib()); } } fn set_stop_on_disconnect(&self, stop_on_disconnect: bool) { unsafe { - ffi::gst_rtsp_media_factory_set_stop_on_disconnect(self.as_ref().to_glib_none().0, stop_on_disconnect.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_stop_on_disconnect(self.as_ref().to_glib_none().0, stop_on_disconnect.to_glib()); } } fn set_suspend_mode(&self, mode: RTSPSuspendMode) { unsafe { - ffi::gst_rtsp_media_factory_set_suspend_mode(self.as_ref().to_glib_none().0, mode.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_suspend_mode(self.as_ref().to_glib_none().0, mode.to_glib()); } } fn set_transport_mode(&self, mode: RTSPTransportMode) { unsafe { - ffi::gst_rtsp_media_factory_set_transport_mode(self.as_ref().to_glib_none().0, mode.to_glib()); + gst_rtsp_server_sys::gst_rtsp_media_factory_set_transport_mode(self.as_ref().to_glib_none().0, mode.to_glib()); } } fn get_property_eos_shutdown(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"eos-shutdown\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"eos-shutdown\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -391,7 +388,7 @@ impl> RTSPMediaFactoryExt for O { fn get_property_shared(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"shared\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"shared\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -399,7 +396,7 @@ impl> RTSPMediaFactoryExt for O { fn get_property_stop_on_disconnect(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"stop-on-disconnect\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"stop-on-disconnect\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -509,79 +506,79 @@ impl> RTSPMediaFactoryExt for O { } } -unsafe extern "C" fn media_configure_trampoline(this: *mut ffi::GstRTSPMediaFactory, object: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer) +unsafe extern "C" fn media_configure_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, object: *mut gst_rtsp_server_sys::GstRTSPMedia, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn media_constructed_trampoline(this: *mut ffi::GstRTSPMediaFactory, object: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer) +unsafe extern "C" fn media_constructed_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, object: *mut gst_rtsp_server_sys::GstRTSPMedia, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn notify_buffer_size_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_buffer_size_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_clock_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_clock_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_eos_shutdown_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_eos_shutdown_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_latency_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_latency_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_launch_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_launch_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_profiles_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_profiles_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_protocols_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_protocols_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_shared_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_shared_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_stop_on_disconnect_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_stop_on_disconnect_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_suspend_mode_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_suspend_mode_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_transport_mode_trampoline(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_transport_mode_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) 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 799c28347..752acfcba 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use RTSPMediaFactory; -use ffi; use glib::GString; use glib::StaticType; use glib::Value; @@ -12,16 +11,17 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; +use gst_rtsp_server_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct RTSPMediaFactoryURI(Object) @extends RTSPMediaFactory; + pub struct RTSPMediaFactoryURI(Object) @extends RTSPMediaFactory; match fn { - get_type => || ffi::gst_rtsp_media_factory_uri_get_type(), + get_type => || gst_rtsp_server_sys::gst_rtsp_media_factory_uri_get_type(), } } @@ -29,7 +29,7 @@ impl RTSPMediaFactoryURI { pub fn new() -> RTSPMediaFactoryURI { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_rtsp_media_factory_uri_new()) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_uri_new()) } } } @@ -62,27 +62,27 @@ pub trait RTSPMediaFactoryURIExt: 'static { impl> RTSPMediaFactoryURIExt for O { fn get_uri(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_media_factory_uri_get_uri(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_uri_get_uri(self.as_ref().to_glib_none().0)) } } fn set_uri(&self, uri: &str) { unsafe { - ffi::gst_rtsp_media_factory_uri_set_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_media_factory_uri_set_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0); } } fn get_property_use_gstpay(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"use-gstpay\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"use-gstpay\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_use_gstpay(&self, use_gstpay: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"use-gstpay\0".as_ptr() as *const _, Value::from(&use_gstpay).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"use-gstpay\0".as_ptr() as *const _, Value::from(&use_gstpay).to_glib_none().0); } } @@ -103,13 +103,13 @@ impl> RTSPMediaFactoryURIExt for O { } } -unsafe extern "C" fn notify_uri_trampoline(this: *mut ffi::GstRTSPMediaFactoryURI, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_uri_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactoryURI, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactoryURI::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_use_gstpay_trampoline(this: *mut ffi::GstRTSPMediaFactoryURI, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_use_gstpay_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactoryURI, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPMediaFactoryURI::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs b/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs index b31a2e634..5d7ef5562 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs @@ -3,18 +3,18 @@ // DO NOT EDIT use RTSPMediaFactory; -use ffi; use glib::GString; use glib::object::IsA; use glib::translate::*; use gst_rtsp; +use gst_rtsp_server_sys; use std::mem; glib_wrapper! { - pub struct RTSPMountPoints(Object); + pub struct RTSPMountPoints(Object); match fn { - get_type => || ffi::gst_rtsp_mount_points_get_type(), + get_type => || gst_rtsp_server_sys::gst_rtsp_mount_points_get_type(), } } @@ -22,7 +22,7 @@ impl RTSPMountPoints { pub fn new() -> RTSPMountPoints { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_rtsp_mount_points_new()) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_mount_points_new()) } } } @@ -51,27 +51,27 @@ pub trait RTSPMountPointsExt: 'static { impl> RTSPMountPointsExt for O { fn add_factory>(&self, path: &str, factory: &P) { unsafe { - ffi::gst_rtsp_mount_points_add_factory(self.as_ref().to_glib_none().0, path.to_glib_none().0, factory.as_ref().to_glib_full()); + gst_rtsp_server_sys::gst_rtsp_mount_points_add_factory(self.as_ref().to_glib_none().0, path.to_glib_none().0, factory.as_ref().to_glib_full()); } } fn make_path(&self, url: &gst_rtsp::RTSPUrl) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_mount_points_make_path(self.as_ref().to_glib_none().0, url.to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_mount_points_make_path(self.as_ref().to_glib_none().0, url.to_glib_none().0)) } } fn match_(&self, path: &str) -> (RTSPMediaFactory, i32) { unsafe { let mut matched = mem::uninitialized(); - let ret = from_glib_full(ffi::gst_rtsp_mount_points_match(self.as_ref().to_glib_none().0, path.to_glib_none().0, &mut matched)); + let ret = from_glib_full(gst_rtsp_server_sys::gst_rtsp_mount_points_match(self.as_ref().to_glib_none().0, path.to_glib_none().0, &mut matched)); (ret, matched) } } fn remove_factory(&self, path: &str) { unsafe { - ffi::gst_rtsp_mount_points_remove_factory(self.as_ref().to_glib_none().0, path.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_mount_points_remove_factory(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 c8bb7ea9e..8e0c45e75 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_server.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_server.rs @@ -9,7 +9,6 @@ use RTSPFilterResult; use RTSPMountPoints; use RTSPSessionPool; use RTSPThreadPool; -use ffi; use gio; use glib; use glib::GString; @@ -18,16 +17,17 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; +use gst_rtsp_server_sys; use std::boxed::Box as Box_; use std::mem::transmute; use std::ptr; glib_wrapper! { - pub struct RTSPServer(Object); + pub struct RTSPServer(Object); match fn { - get_type => || ffi::gst_rtsp_server_get_type(), + get_type => || gst_rtsp_server_sys::gst_rtsp_server_get_type(), } } @@ -35,14 +35,14 @@ impl RTSPServer { pub fn new() -> RTSPServer { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_rtsp_server_new()) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_new()) } } pub fn io_func, Q: IsA>(socket: &P, condition: glib::IOCondition, server: &Q) -> Result<(), glib::error::BoolError> { skip_assert_initialized!(); unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_server_io_func(socket.as_ref().to_glib_none().0, condition.to_glib(), server.as_ref().to_glib_none().0), "Failed to connect the source") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_server_io_func(socket.as_ref().to_glib_none().0, condition.to_glib(), server.as_ref().to_glib_none().0), "Failed to connect the source") } } } @@ -61,9 +61,9 @@ pub const NONE_RTSP_SERVER: Option<&RTSPServer> = None; pub trait RTSPServerExt: 'static { fn client_filter(&self, func: Option<&mut dyn (FnMut(&RTSPServer, &RTSPClient) -> RTSPFilterResult)>) -> Vec; - fn create_socket<'a, P: IsA + 'a, Q: Into>>(&self, cancellable: Q) -> Result; + fn create_socket>(&self, cancellable: Option<&P>) -> Result; - fn create_source<'a, P: IsA + 'a, Q: Into>>(&self, cancellable: Q) -> Result; + fn create_source>(&self, cancellable: Option<&P>) -> Result; fn get_address(&self) -> Option; @@ -83,19 +83,19 @@ pub trait RTSPServerExt: 'static { fn set_address(&self, address: &str); - fn set_auth<'a, P: IsA + 'a, Q: Into>>(&self, auth: Q); + fn set_auth>(&self, auth: Option<&P>); fn set_backlog(&self, backlog: i32); - fn set_mount_points<'a, P: IsA + 'a, Q: Into>>(&self, mounts: Q); + fn set_mount_points>(&self, mounts: Option<&P>); fn set_service(&self, service: &str); - fn set_session_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q); + fn set_session_pool>(&self, pool: Option<&P>); - fn set_thread_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q); + fn set_thread_pool>(&self, pool: Option<&P>); - fn transfer_connection<'a, P: IsA, Q: Into>>(&self, socket: &P, ip: &str, port: i32, initial_buffer: Q) -> Result<(), glib::error::BoolError>; + fn transfer_connection>(&self, socket: &P, ip: &str, port: i32, initial_buffer: Option<&str>) -> Result<(), glib::error::BoolError>; fn connect_client_connected(&self, f: F) -> SignalHandlerId; @@ -115,7 +115,7 @@ pub trait RTSPServerExt: 'static { impl> RTSPServerExt for O { fn client_filter(&self, func: Option<&mut dyn (FnMut(&RTSPServer, &RTSPClient) -> RTSPFilterResult)>) -> Vec { let func_data: Option<&mut dyn (FnMut(&RTSPServer, &RTSPClient) -> RTSPFilterResult)> = func; - unsafe extern "C" fn func_func(server: *mut ffi::GstRTSPServer, client: *mut ffi::GstRTSPClient, user_data: glib_ffi::gpointer) -> ffi::GstRTSPFilterResult { + unsafe extern "C" fn func_func(server: *mut gst_rtsp_server_sys::GstRTSPServer, client: *mut gst_rtsp_server_sys::GstRTSPClient, user_data: glib_sys::gpointer) -> gst_rtsp_server_sys::GstRTSPFilterResult { let server = from_glib_borrow(server); let client = from_glib_borrow(client); let callback: *mut Option<&mut dyn (FnMut(&RTSPServer, &RTSPClient) -> RTSPFilterResult)> = user_data as *const _ as usize as *mut Option<&mut dyn (FnMut(&RTSPServer, &RTSPClient) -> RTSPFilterResult)>; @@ -126,129 +126,122 @@ impl> RTSPServerExt for O { }; res.to_glib() } - let func = Some(func_func as _); + let func = if func_data.is_some() { Some(func_func as _) } else { None }; let super_callback0: &Option<&mut dyn (FnMut(&RTSPServer, &RTSPClient) -> RTSPFilterResult)> = &func_data; unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_server_client_filter(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) + FromGlibPtrContainer::from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_client_filter(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) } } - fn create_socket<'a, P: IsA + 'a, Q: Into>>(&self, cancellable: Q) -> Result { - let cancellable = cancellable.into(); + fn create_socket>(&self, cancellable: Option<&P>) -> Result { unsafe { let mut error = 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, &mut error); + let ret = gst_rtsp_server_sys::gst_rtsp_server_create_socket(self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } - fn create_source<'a, P: IsA + 'a, Q: Into>>(&self, cancellable: Q) -> Result { - let cancellable = cancellable.into(); + fn create_source>(&self, cancellable: Option<&P>) -> Result { unsafe { let mut error = 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, &mut error); + let ret = gst_rtsp_server_sys::gst_rtsp_server_create_source(self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } fn get_address(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_server_get_address(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_get_address(self.as_ref().to_glib_none().0)) } } fn get_auth(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_server_get_auth(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_get_auth(self.as_ref().to_glib_none().0)) } } fn get_backlog(&self) -> i32 { unsafe { - ffi::gst_rtsp_server_get_backlog(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_server_get_backlog(self.as_ref().to_glib_none().0) } } fn get_bound_port(&self) -> i32 { unsafe { - ffi::gst_rtsp_server_get_bound_port(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_server_get_bound_port(self.as_ref().to_glib_none().0) } } fn get_mount_points(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_server_get_mount_points(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_get_mount_points(self.as_ref().to_glib_none().0)) } } fn get_service(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_server_get_service(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_get_service(self.as_ref().to_glib_none().0)) } } fn get_session_pool(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_server_get_session_pool(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_get_session_pool(self.as_ref().to_glib_none().0)) } } fn get_thread_pool(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_server_get_thread_pool(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_get_thread_pool(self.as_ref().to_glib_none().0)) } } fn set_address(&self, address: &str) { unsafe { - ffi::gst_rtsp_server_set_address(self.as_ref().to_glib_none().0, address.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_server_set_address(self.as_ref().to_glib_none().0, address.to_glib_none().0); } } - fn set_auth<'a, P: IsA + 'a, Q: Into>>(&self, auth: Q) { - let auth = auth.into(); + fn set_auth>(&self, auth: Option<&P>) { unsafe { - ffi::gst_rtsp_server_set_auth(self.as_ref().to_glib_none().0, auth.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_server_set_auth(self.as_ref().to_glib_none().0, auth.map(|p| p.as_ref()).to_glib_none().0); } } fn set_backlog(&self, backlog: i32) { unsafe { - ffi::gst_rtsp_server_set_backlog(self.as_ref().to_glib_none().0, backlog); + gst_rtsp_server_sys::gst_rtsp_server_set_backlog(self.as_ref().to_glib_none().0, backlog); } } - fn set_mount_points<'a, P: IsA + 'a, Q: Into>>(&self, mounts: Q) { - let mounts = mounts.into(); + fn set_mount_points>(&self, mounts: Option<&P>) { unsafe { - ffi::gst_rtsp_server_set_mount_points(self.as_ref().to_glib_none().0, mounts.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_server_set_mount_points(self.as_ref().to_glib_none().0, mounts.map(|p| p.as_ref()).to_glib_none().0); } } fn set_service(&self, service: &str) { unsafe { - ffi::gst_rtsp_server_set_service(self.as_ref().to_glib_none().0, service.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_server_set_service(self.as_ref().to_glib_none().0, service.to_glib_none().0); } } - fn set_session_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q) { - let pool = pool.into(); + fn set_session_pool>(&self, pool: Option<&P>) { unsafe { - ffi::gst_rtsp_server_set_session_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_server_set_session_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); } } - fn set_thread_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q) { - let pool = pool.into(); + fn set_thread_pool>(&self, pool: Option<&P>) { unsafe { - ffi::gst_rtsp_server_set_thread_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_server_set_thread_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); } } - fn transfer_connection<'a, P: IsA, Q: Into>>(&self, socket: &P, ip: &str, port: i32, initial_buffer: Q) -> Result<(), glib::error::BoolError> { - let initial_buffer = initial_buffer.into(); + fn transfer_connection>(&self, socket: &P, ip: &str, port: i32, initial_buffer: Option<&str>) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_server_transfer_connection(self.as_ref().to_glib_none().0, socket.as_ref().to_glib_full(), ip.to_glib_none().0, port, initial_buffer.to_glib_none().0), "Failed to transfer to the connection") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_server_transfer_connection(self.as_ref().to_glib_none().0, socket.as_ref().to_glib_full(), ip.to_glib_none().0, port, initial_buffer.to_glib_none().0), "Failed to transfer to the connection") } } @@ -309,43 +302,43 @@ impl> RTSPServerExt for O { } } -unsafe extern "C" fn client_connected_trampoline(this: *mut ffi::GstRTSPServer, object: *mut ffi::GstRTSPClient, f: glib_ffi::gpointer) +unsafe extern "C" fn client_connected_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPServer, object: *mut gst_rtsp_server_sys::GstRTSPClient, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPServer::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn notify_address_trampoline(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_address_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPServer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPServer::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_backlog_trampoline(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_backlog_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPServer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPServer::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_bound_port_trampoline(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_bound_port_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPServer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPServer::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_mount_points_trampoline(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_mount_points_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPServer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPServer::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_service_trampoline(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_service_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPServer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPServer::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_session_pool_trampoline(this: *mut ffi::GstRTSPServer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_session_pool_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPServer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPServer::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session.rs b/gstreamer-rtsp-server/src/auto/rtsp_session.rs index 9beb80bc5..6d36d7c67 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session.rs @@ -5,7 +5,6 @@ use RTSPFilterResult; use RTSPMedia; use RTSPSessionMedia; -use ffi; use glib::GString; use glib::StaticType; use glib::Value; @@ -14,17 +13,18 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; +use gst_rtsp_server_sys; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; glib_wrapper! { - pub struct RTSPSession(Object); + pub struct RTSPSession(Object); match fn { - get_type => || ffi::gst_rtsp_session_get_type(), + get_type => || gst_rtsp_server_sys::gst_rtsp_session_get_type(), } } @@ -32,7 +32,7 @@ impl RTSPSession { pub fn new(sessionid: &str) -> RTSPSession { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_rtsp_session_new(sessionid.to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_new(sessionid.to_glib_none().0)) } } } @@ -85,13 +85,13 @@ pub trait RTSPSessionExt: 'static { impl> RTSPSessionExt for O { fn allow_expire(&self) { unsafe { - ffi::gst_rtsp_session_allow_expire(self.as_ref().to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_session_allow_expire(self.as_ref().to_glib_none().0); } } fn filter(&self, func: Option<&mut dyn (FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult)>) -> Vec { let func_data: Option<&mut dyn (FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult)> = func; - unsafe extern "C" fn func_func(sess: *mut ffi::GstRTSPSession, media: *mut ffi::GstRTSPSessionMedia, user_data: glib_ffi::gpointer) -> ffi::GstRTSPFilterResult { + unsafe extern "C" fn func_func(sess: *mut gst_rtsp_server_sys::GstRTSPSession, media: *mut gst_rtsp_server_sys::GstRTSPSessionMedia, user_data: glib_sys::gpointer) -> gst_rtsp_server_sys::GstRTSPFilterResult { let sess = from_glib_borrow(sess); let media = from_glib_borrow(media); let callback: *mut Option<&mut dyn (FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult)> = user_data as *const _ as usize as *mut Option<&mut dyn (FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult)>; @@ -102,100 +102,100 @@ impl> RTSPSessionExt for O { }; res.to_glib() } - let func = Some(func_func as _); + let func = if func_data.is_some() { Some(func_func as _) } else { None }; let super_callback0: &Option<&mut dyn (FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult)> = &func_data; unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_session_filter(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) + FromGlibPtrContainer::from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_filter(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) } } fn get_header(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_session_get_header(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_get_header(self.as_ref().to_glib_none().0)) } } fn get_media(&self, path: &str) -> (Option, i32) { unsafe { let mut matched = mem::uninitialized(); - let ret = from_glib_none(ffi::gst_rtsp_session_get_media(self.as_ref().to_glib_none().0, path.to_glib_none().0, &mut matched)); + let ret = from_glib_none(gst_rtsp_server_sys::gst_rtsp_session_get_media(self.as_ref().to_glib_none().0, path.to_glib_none().0, &mut matched)); (ret, matched) } } fn get_sessionid(&self) -> Option { unsafe { - from_glib_none(ffi::gst_rtsp_session_get_sessionid(self.as_ref().to_glib_none().0)) + from_glib_none(gst_rtsp_server_sys::gst_rtsp_session_get_sessionid(self.as_ref().to_glib_none().0)) } } fn get_timeout(&self) -> u32 { unsafe { - ffi::gst_rtsp_session_get_timeout(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_session_get_timeout(self.as_ref().to_glib_none().0) } } //fn is_expired(&self, now: /*Ignored*/&mut glib::TimeVal) -> bool { - // unsafe { TODO: call ffi::gst_rtsp_session_is_expired() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_is_expired() } //} fn is_expired_usec(&self, now: i64) -> bool { unsafe { - from_glib(ffi::gst_rtsp_session_is_expired_usec(self.as_ref().to_glib_none().0, now)) + from_glib(gst_rtsp_server_sys::gst_rtsp_session_is_expired_usec(self.as_ref().to_glib_none().0, now)) } } fn manage_media>(&self, path: &str, media: &P) -> Option { unsafe { - from_glib_none(ffi::gst_rtsp_session_manage_media(self.as_ref().to_glib_none().0, path.to_glib_none().0, media.as_ref().to_glib_full())) + from_glib_none(gst_rtsp_server_sys::gst_rtsp_session_manage_media(self.as_ref().to_glib_none().0, path.to_glib_none().0, media.as_ref().to_glib_full())) } } //fn next_timeout(&self, now: /*Ignored*/&mut glib::TimeVal) -> i32 { - // unsafe { TODO: call ffi::gst_rtsp_session_next_timeout() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_next_timeout() } //} fn next_timeout_usec(&self, now: i64) -> i32 { unsafe { - ffi::gst_rtsp_session_next_timeout_usec(self.as_ref().to_glib_none().0, now) + gst_rtsp_server_sys::gst_rtsp_session_next_timeout_usec(self.as_ref().to_glib_none().0, now) } } fn prevent_expire(&self) { unsafe { - ffi::gst_rtsp_session_prevent_expire(self.as_ref().to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_session_prevent_expire(self.as_ref().to_glib_none().0); } } fn release_media>(&self, media: &P) -> bool { unsafe { - from_glib(ffi::gst_rtsp_session_release_media(self.as_ref().to_glib_none().0, media.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_session_release_media(self.as_ref().to_glib_none().0, media.as_ref().to_glib_none().0)) } } fn set_timeout(&self, timeout: u32) { unsafe { - ffi::gst_rtsp_session_set_timeout(self.as_ref().to_glib_none().0, timeout); + gst_rtsp_server_sys::gst_rtsp_session_set_timeout(self.as_ref().to_glib_none().0, timeout); } } fn touch(&self) { unsafe { - ffi::gst_rtsp_session_touch(self.as_ref().to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_session_touch(self.as_ref().to_glib_none().0); } } fn get_property_timeout_always_visible(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"timeout-always-visible\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"timeout-always-visible\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_timeout_always_visible(&self, timeout_always_visible: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"timeout-always-visible\0".as_ptr() as *const _, Value::from(&timeout_always_visible).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"timeout-always-visible\0".as_ptr() as *const _, Value::from(&timeout_always_visible).to_glib_none().0); } } @@ -216,13 +216,13 @@ impl> RTSPSessionExt for O { } } -unsafe extern "C" fn notify_timeout_trampoline(this: *mut ffi::GstRTSPSession, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_timeout_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPSession, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPSession::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_timeout_always_visible_trampoline(this: *mut ffi::GstRTSPSession, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_timeout_always_visible_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPSession, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPSession::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs index 1e077eb07..9671d90f2 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs @@ -4,19 +4,19 @@ use RTSPMedia; use RTSPStreamTransport; -use ffi; use glib; use glib::GString; use glib::object::IsA; use glib::translate::*; use gst; +use gst_rtsp_server_sys; use std::mem; glib_wrapper! { - pub struct RTSPSessionMedia(Object); + pub struct RTSPSessionMedia(Object); match fn { - get_type => || ffi::gst_rtsp_session_media_get_type(), + get_type => || gst_rtsp_server_sys::gst_rtsp_session_media_get_type(), } } @@ -24,7 +24,7 @@ impl RTSPSessionMedia { pub fn new>(path: &str, media: &P) -> RTSPSessionMedia { skip_assert_initialized!(); unsafe { - from_glib_full(ffi::gst_rtsp_session_media_new(path.to_glib_none().0, media.as_ref().to_glib_full())) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_media_new(path.to_glib_none().0, media.as_ref().to_glib_full())) } } } @@ -60,60 +60,60 @@ pub trait RTSPSessionMediaExt: 'static { impl> RTSPSessionMediaExt for O { //fn alloc_channels(&self, range: /*Ignored*/gst_rtsp::RTSPRange) -> bool { - // unsafe { TODO: call ffi::gst_rtsp_session_media_alloc_channels() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_media_alloc_channels() } //} fn get_base_time(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_rtsp_session_media_get_base_time(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_session_media_get_base_time(self.as_ref().to_glib_none().0)) } } fn get_media(&self) -> Option { unsafe { - from_glib_none(ffi::gst_rtsp_session_media_get_media(self.as_ref().to_glib_none().0)) + from_glib_none(gst_rtsp_server_sys::gst_rtsp_session_media_get_media(self.as_ref().to_glib_none().0)) } } fn get_rtpinfo(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_session_media_get_rtpinfo(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_media_get_rtpinfo(self.as_ref().to_glib_none().0)) } } //fn get_rtsp_state(&self) -> /*Ignored*/gst_rtsp::RTSPState { - // unsafe { TODO: call ffi::gst_rtsp_session_media_get_rtsp_state() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_media_get_rtsp_state() } //} fn get_transport(&self, idx: u32) -> Option { unsafe { - from_glib_none(ffi::gst_rtsp_session_media_get_transport(self.as_ref().to_glib_none().0, idx)) + from_glib_none(gst_rtsp_server_sys::gst_rtsp_session_media_get_transport(self.as_ref().to_glib_none().0, idx)) } } //fn get_transports(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 26 } { - // unsafe { TODO: call ffi::gst_rtsp_session_media_get_transports() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_media_get_transports() } //} fn matches(&self, path: &str) -> Option { unsafe { let mut matched = mem::uninitialized(); - let ret = from_glib(ffi::gst_rtsp_session_media_matches(self.as_ref().to_glib_none().0, path.to_glib_none().0, &mut matched)); + let ret = from_glib(gst_rtsp_server_sys::gst_rtsp_session_media_matches(self.as_ref().to_glib_none().0, path.to_glib_none().0, &mut matched)); if ret { Some(matched) } else { None } } } //fn set_rtsp_state(&self, state: /*Ignored*/gst_rtsp::RTSPState) { - // unsafe { TODO: call ffi::gst_rtsp_session_media_set_rtsp_state() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_media_set_rtsp_state() } //} fn set_state(&self, state: gst::State) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_session_media_set_state(self.as_ref().to_glib_none().0, state.to_glib()), "Failed to set state of session media") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_session_media_set_state(self.as_ref().to_glib_none().0, state.to_glib()), "Failed to set state of session media") } } //fn set_transport>(&self, stream: &P, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> Option { - // unsafe { TODO: call ffi::gst_rtsp_session_media_set_transport() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_media_set_transport() } //} } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs index 4f0898fe1..308a966f8 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs @@ -4,22 +4,22 @@ use RTSPFilterResult; use RTSPSession; -use ffi; use glib; use glib::object::Cast; use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; +use gst_rtsp_server_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct RTSPSessionPool(Object); + pub struct RTSPSessionPool(Object); match fn { - get_type => || ffi::gst_rtsp_session_pool_get_type(), + get_type => || gst_rtsp_server_sys::gst_rtsp_session_pool_get_type(), } } @@ -27,7 +27,7 @@ impl RTSPSessionPool { pub fn new() -> RTSPSessionPool { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_rtsp_session_pool_new()) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_pool_new()) } } } @@ -68,19 +68,19 @@ pub trait RTSPSessionPoolExt: 'static { impl> RTSPSessionPoolExt for O { fn cleanup(&self) -> u32 { unsafe { - ffi::gst_rtsp_session_pool_cleanup(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_session_pool_cleanup(self.as_ref().to_glib_none().0) } } fn create(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_session_pool_create(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_pool_create(self.as_ref().to_glib_none().0)) } } fn filter(&self, func: Option<&mut dyn (FnMut(&RTSPSessionPool, &RTSPSession) -> RTSPFilterResult)>) -> Vec { let func_data: Option<&mut dyn (FnMut(&RTSPSessionPool, &RTSPSession) -> RTSPFilterResult)> = func; - unsafe extern "C" fn func_func(pool: *mut ffi::GstRTSPSessionPool, session: *mut ffi::GstRTSPSession, user_data: glib_ffi::gpointer) -> ffi::GstRTSPFilterResult { + unsafe extern "C" fn func_func(pool: *mut gst_rtsp_server_sys::GstRTSPSessionPool, session: *mut gst_rtsp_server_sys::GstRTSPSession, user_data: glib_sys::gpointer) -> gst_rtsp_server_sys::GstRTSPFilterResult { let pool = from_glib_borrow(pool); let session = from_glib_borrow(session); let callback: *mut Option<&mut dyn (FnMut(&RTSPSessionPool, &RTSPSession) -> RTSPFilterResult)> = user_data as *const _ as usize as *mut Option<&mut dyn (FnMut(&RTSPSessionPool, &RTSPSession) -> RTSPFilterResult)>; @@ -91,40 +91,40 @@ impl> RTSPSessionPoolExt for O { }; res.to_glib() } - let func = Some(func_func as _); + let func = if func_data.is_some() { Some(func_func as _) } else { None }; let super_callback0: &Option<&mut dyn (FnMut(&RTSPSessionPool, &RTSPSession) -> RTSPFilterResult)> = &func_data; unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_session_pool_filter(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) + FromGlibPtrContainer::from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_pool_filter(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) } } fn find(&self, sessionid: &str) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_session_pool_find(self.as_ref().to_glib_none().0, sessionid.to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_pool_find(self.as_ref().to_glib_none().0, sessionid.to_glib_none().0)) } } fn get_max_sessions(&self) -> u32 { unsafe { - ffi::gst_rtsp_session_pool_get_max_sessions(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_session_pool_get_max_sessions(self.as_ref().to_glib_none().0) } } fn get_n_sessions(&self) -> u32 { unsafe { - ffi::gst_rtsp_session_pool_get_n_sessions(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_session_pool_get_n_sessions(self.as_ref().to_glib_none().0) } } fn remove>(&self, sess: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_session_pool_remove(self.as_ref().to_glib_none().0, sess.as_ref().to_glib_none().0), "Failed to remove session from pool") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_session_pool_remove(self.as_ref().to_glib_none().0, sess.as_ref().to_glib_none().0), "Failed to remove session from pool") } } fn set_max_sessions(&self, max: u32) { unsafe { - ffi::gst_rtsp_session_pool_set_max_sessions(self.as_ref().to_glib_none().0, max); + gst_rtsp_server_sys::gst_rtsp_session_pool_set_max_sessions(self.as_ref().to_glib_none().0, max); } } @@ -145,13 +145,13 @@ impl> RTSPSessionPoolExt for O { } } -unsafe extern "C" fn session_removed_trampoline(this: *mut ffi::GstRTSPSessionPool, object: *mut ffi::GstRTSPSession, f: glib_ffi::gpointer) +unsafe extern "C" fn session_removed_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPSessionPool, object: *mut gst_rtsp_server_sys::GstRTSPSession, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPSessionPool::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn notify_max_sessions_trampoline(this: *mut ffi::GstRTSPSessionPool, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_max_sessions_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPSessionPool, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPSessionPool::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs index 4f7145dae..c0705590b 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs @@ -7,7 +7,6 @@ use RTSPAddressPool; use RTSPFilterResult; use RTSPPublishClockMode; use RTSPStreamTransport; -use ffi; use gio; use glib; use glib::GString; @@ -16,19 +15,20 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; use gst; -use gst_ffi; use gst_rtsp; +use gst_rtsp_server_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; glib_wrapper! { - pub struct RTSPStream(Object); + pub struct RTSPStream(Object); match fn { - get_type => || ffi::gst_rtsp_stream_get_type(), + get_type => || gst_rtsp_server_sys::gst_rtsp_stream_get_type(), } } @@ -36,7 +36,7 @@ impl RTSPStream { pub fn new, Q: IsA>(idx: u32, payloader: &P, pad: &Q) -> RTSPStream { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_rtsp_stream_new(idx, payloader.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_new(idx, payloader.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0)) } } } @@ -109,7 +109,7 @@ pub trait RTSPStreamExt: 'static { fn get_ssrc(&self) -> u32; - fn has_control<'a, P: Into>>(&self, control: P) -> bool; + fn has_control(&self, control: Option<&str>) -> bool; fn is_blocking(&self) -> bool; @@ -135,7 +135,7 @@ pub trait RTSPStreamExt: 'static { fn seekable(&self) -> bool; - fn set_address_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q); + fn set_address_pool>(&self, pool: Option<&P>); fn set_blocked(&self, blocked: bool) -> Result<(), glib::error::BoolError>; @@ -143,13 +143,13 @@ pub trait RTSPStreamExt: 'static { fn set_client_side(&self, client_side: bool); - fn set_control<'a, P: Into>>(&self, control: P); + fn set_control(&self, control: Option<&str>); fn set_dscp_qos(&self, dscp_qos: i32); fn set_mtu(&self, mtu: u32); - fn set_multicast_iface<'a, P: Into>>(&self, multicast_iface: P); + fn set_multicast_iface(&self, multicast_iface: Option<&str>); fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile); @@ -169,7 +169,7 @@ pub trait RTSPStreamExt: 'static { fn unblock_linked(&self) -> Result<(), glib::error::BoolError>; - fn update_crypto<'a, P: Into>>(&self, ssrc: u32, crypto: P) -> Result<(), glib::error::BoolError>; + fn update_crypto(&self, ssrc: u32, crypto: Option<&gst::Caps>) -> Result<(), glib::error::BoolError>; fn connect_new_rtcp_encoder(&self, f: F) -> SignalHandlerId; @@ -185,141 +185,141 @@ pub trait RTSPStreamExt: 'static { impl> RTSPStreamExt for O { fn add_transport>(&self, trans: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_stream_add_transport(self.as_ref().to_glib_none().0, trans.as_ref().to_glib_none().0), "Failed to add transport") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_add_transport(self.as_ref().to_glib_none().0, trans.as_ref().to_glib_none().0), "Failed to add transport") } } //fn allocate_udp_sockets(&self, family: gio::SocketFamily, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport, use_client_settings: bool) -> bool { - // unsafe { TODO: call ffi::gst_rtsp_stream_allocate_udp_sockets() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_allocate_udp_sockets() } //} //fn complete_stream(&self, transport: /*Ignored*/&gst_rtsp::RTSPTransport) -> bool { - // unsafe { TODO: call ffi::gst_rtsp_stream_complete_stream() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_complete_stream() } //} fn get_address_pool(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_get_address_pool(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_address_pool(self.as_ref().to_glib_none().0)) } } fn get_buffer_size(&self) -> u32 { unsafe { - ffi::gst_rtsp_stream_get_buffer_size(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_stream_get_buffer_size(self.as_ref().to_glib_none().0) } } fn get_caps(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_get_caps(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_caps(self.as_ref().to_glib_none().0)) } } fn get_control(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_get_control(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_control(self.as_ref().to_glib_none().0)) } } fn get_current_seqnum(&self) -> u16 { unsafe { - ffi::gst_rtsp_stream_get_current_seqnum(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_stream_get_current_seqnum(self.as_ref().to_glib_none().0) } } fn get_dscp_qos(&self) -> i32 { unsafe { - ffi::gst_rtsp_stream_get_dscp_qos(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_stream_get_dscp_qos(self.as_ref().to_glib_none().0) } } fn get_index(&self) -> u32 { unsafe { - ffi::gst_rtsp_stream_get_index(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_stream_get_index(self.as_ref().to_glib_none().0) } } fn get_joined_bin(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_get_joined_bin(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_joined_bin(self.as_ref().to_glib_none().0)) } } fn get_mtu(&self) -> u32 { unsafe { - ffi::gst_rtsp_stream_get_mtu(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_stream_get_mtu(self.as_ref().to_glib_none().0) } } fn get_multicast_address(&self, family: gio::SocketFamily) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_get_multicast_address(self.as_ref().to_glib_none().0, family.to_glib())) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_multicast_address(self.as_ref().to_glib_none().0, family.to_glib())) } } fn get_multicast_iface(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_get_multicast_iface(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_multicast_iface(self.as_ref().to_glib_none().0)) } } fn get_profiles(&self) -> gst_rtsp::RTSPProfile { unsafe { - from_glib(ffi::gst_rtsp_stream_get_profiles(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_profiles(self.as_ref().to_glib_none().0)) } } fn get_protocols(&self) -> gst_rtsp::RTSPLowerTrans { unsafe { - from_glib(ffi::gst_rtsp_stream_get_protocols(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_protocols(self.as_ref().to_glib_none().0)) } } fn get_pt(&self) -> u32 { unsafe { - ffi::gst_rtsp_stream_get_pt(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_stream_get_pt(self.as_ref().to_glib_none().0) } } fn get_publish_clock_mode(&self) -> RTSPPublishClockMode { unsafe { - from_glib(ffi::gst_rtsp_stream_get_publish_clock_mode(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_publish_clock_mode(self.as_ref().to_glib_none().0)) } } fn get_retransmission_pt(&self) -> u32 { unsafe { - ffi::gst_rtsp_stream_get_retransmission_pt(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_stream_get_retransmission_pt(self.as_ref().to_glib_none().0) } } fn get_retransmission_time(&self) -> gst::ClockTime { unsafe { - from_glib(ffi::gst_rtsp_stream_get_retransmission_time(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_retransmission_time(self.as_ref().to_glib_none().0)) } } fn get_rtcp_multicast_socket(&self, family: gio::SocketFamily) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_get_rtcp_multicast_socket(self.as_ref().to_glib_none().0, family.to_glib())) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_rtcp_multicast_socket(self.as_ref().to_glib_none().0, family.to_glib())) } } fn get_rtcp_socket(&self, family: gio::SocketFamily) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_get_rtcp_socket(self.as_ref().to_glib_none().0, family.to_glib())) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_rtcp_socket(self.as_ref().to_glib_none().0, family.to_glib())) } } fn get_rtp_multicast_socket(&self, family: gio::SocketFamily) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_get_rtp_multicast_socket(self.as_ref().to_glib_none().0, family.to_glib())) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_rtp_multicast_socket(self.as_ref().to_glib_none().0, family.to_glib())) } } fn get_rtp_socket(&self, family: gio::SocketFamily) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_get_rtp_socket(self.as_ref().to_glib_none().0, family.to_glib())) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_rtp_socket(self.as_ref().to_glib_none().0, family.to_glib())) } } @@ -329,220 +329,216 @@ impl> RTSPStreamExt for O { let mut seq = mem::uninitialized(); let mut clock_rate = mem::uninitialized(); let mut running_time = mem::uninitialized(); - let ret = from_glib(ffi::gst_rtsp_stream_get_rtpinfo(self.as_ref().to_glib_none().0, &mut rtptime, &mut seq, &mut clock_rate, &mut running_time)); + let ret = from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_rtpinfo(self.as_ref().to_glib_none().0, &mut rtptime, &mut seq, &mut clock_rate, &mut running_time)); if ret { Some((rtptime, seq, clock_rate, from_glib(running_time))) } else { None } } } fn get_rtpsession(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_get_rtpsession(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_rtpsession(self.as_ref().to_glib_none().0)) } } //fn get_server_port(&self, server_port: /*Ignored*/gst_rtsp::RTSPRange, family: gio::SocketFamily) { - // unsafe { TODO: call ffi::gst_rtsp_stream_get_server_port() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_get_server_port() } //} fn get_sinkpad(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_get_sinkpad(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_sinkpad(self.as_ref().to_glib_none().0)) } } fn get_srcpad(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_get_srcpad(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_srcpad(self.as_ref().to_glib_none().0)) } } fn get_srtp_encoder(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_get_srtp_encoder(self.as_ref().to_glib_none().0)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_srtp_encoder(self.as_ref().to_glib_none().0)) } } fn get_ssrc(&self) -> u32 { unsafe { let mut ssrc = mem::uninitialized(); - ffi::gst_rtsp_stream_get_ssrc(self.as_ref().to_glib_none().0, &mut ssrc); + gst_rtsp_server_sys::gst_rtsp_stream_get_ssrc(self.as_ref().to_glib_none().0, &mut ssrc); ssrc } } - fn has_control<'a, P: Into>>(&self, control: P) -> bool { - let control = control.into(); + fn has_control(&self, control: Option<&str>) -> bool { unsafe { - from_glib(ffi::gst_rtsp_stream_has_control(self.as_ref().to_glib_none().0, control.to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_stream_has_control(self.as_ref().to_glib_none().0, control.to_glib_none().0)) } } fn is_blocking(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_stream_is_blocking(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_blocking(self.as_ref().to_glib_none().0)) } } fn is_client_side(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_stream_is_client_side(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_client_side(self.as_ref().to_glib_none().0)) } } fn is_complete(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_stream_is_complete(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_complete(self.as_ref().to_glib_none().0)) } } fn is_receiver(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_stream_is_receiver(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_receiver(self.as_ref().to_glib_none().0)) } } fn is_sender(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_stream_is_sender(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_sender(self.as_ref().to_glib_none().0)) } } //fn is_transport_supported(&self, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> bool { - // unsafe { TODO: call ffi::gst_rtsp_stream_is_transport_supported() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_is_transport_supported() } //} fn join_bin, Q: IsA>(&self, bin: &P, rtpbin: &Q, state: gst::State) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_stream_join_bin(self.as_ref().to_glib_none().0, bin.as_ref().to_glib_none().0, rtpbin.as_ref().to_glib_none().0, state.to_glib()), "Failed to join bin") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_join_bin(self.as_ref().to_glib_none().0, bin.as_ref().to_glib_none().0, rtpbin.as_ref().to_glib_none().0, state.to_glib()), "Failed to join bin") } } fn leave_bin, Q: IsA>(&self, bin: &P, rtpbin: &Q) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_stream_leave_bin(self.as_ref().to_glib_none().0, bin.as_ref().to_glib_none().0, rtpbin.as_ref().to_glib_none().0), "Failed to leave bin") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_leave_bin(self.as_ref().to_glib_none().0, bin.as_ref().to_glib_none().0, rtpbin.as_ref().to_glib_none().0), "Failed to leave bin") } } fn remove_transport>(&self, trans: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_stream_remove_transport(self.as_ref().to_glib_none().0, trans.as_ref().to_glib_none().0), "Failed to remove transport") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_remove_transport(self.as_ref().to_glib_none().0, trans.as_ref().to_glib_none().0), "Failed to remove transport") } } fn request_aux_sender(&self, sessid: u32) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_request_aux_sender(self.as_ref().to_glib_none().0, sessid)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_request_aux_sender(self.as_ref().to_glib_none().0, sessid)) } } fn reserve_address(&self, address: &str, port: u32, n_ports: u32, ttl: u32) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_reserve_address(self.as_ref().to_glib_none().0, address.to_glib_none().0, port, n_ports, ttl)) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_reserve_address(self.as_ref().to_glib_none().0, address.to_glib_none().0, port, n_ports, ttl)) } } fn seekable(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_stream_seekable(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_stream_seekable(self.as_ref().to_glib_none().0)) } } - fn set_address_pool<'a, P: IsA + 'a, Q: Into>>(&self, pool: Q) { - let pool = pool.into(); + fn set_address_pool>(&self, pool: Option<&P>) { unsafe { - ffi::gst_rtsp_stream_set_address_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_stream_set_address_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); } } fn set_blocked(&self, blocked: bool) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_stream_set_blocked(self.as_ref().to_glib_none().0, blocked.to_glib()), "Failed to block/unblock the dataflow") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_set_blocked(self.as_ref().to_glib_none().0, blocked.to_glib()), "Failed to block/unblock the dataflow") } } fn set_buffer_size(&self, size: u32) { unsafe { - ffi::gst_rtsp_stream_set_buffer_size(self.as_ref().to_glib_none().0, size); + gst_rtsp_server_sys::gst_rtsp_stream_set_buffer_size(self.as_ref().to_glib_none().0, size); } } fn set_client_side(&self, client_side: bool) { unsafe { - ffi::gst_rtsp_stream_set_client_side(self.as_ref().to_glib_none().0, client_side.to_glib()); + gst_rtsp_server_sys::gst_rtsp_stream_set_client_side(self.as_ref().to_glib_none().0, client_side.to_glib()); } } - fn set_control<'a, P: Into>>(&self, control: P) { - let control = control.into(); + fn set_control(&self, control: Option<&str>) { unsafe { - ffi::gst_rtsp_stream_set_control(self.as_ref().to_glib_none().0, control.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_stream_set_control(self.as_ref().to_glib_none().0, control.to_glib_none().0); } } fn set_dscp_qos(&self, dscp_qos: i32) { unsafe { - ffi::gst_rtsp_stream_set_dscp_qos(self.as_ref().to_glib_none().0, dscp_qos); + gst_rtsp_server_sys::gst_rtsp_stream_set_dscp_qos(self.as_ref().to_glib_none().0, dscp_qos); } } fn set_mtu(&self, mtu: u32) { unsafe { - ffi::gst_rtsp_stream_set_mtu(self.as_ref().to_glib_none().0, mtu); + gst_rtsp_server_sys::gst_rtsp_stream_set_mtu(self.as_ref().to_glib_none().0, mtu); } } - fn set_multicast_iface<'a, P: Into>>(&self, multicast_iface: P) { - let multicast_iface = multicast_iface.into(); + fn set_multicast_iface(&self, multicast_iface: Option<&str>) { unsafe { - ffi::gst_rtsp_stream_set_multicast_iface(self.as_ref().to_glib_none().0, multicast_iface.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_stream_set_multicast_iface(self.as_ref().to_glib_none().0, multicast_iface.to_glib_none().0); } } fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile) { unsafe { - ffi::gst_rtsp_stream_set_profiles(self.as_ref().to_glib_none().0, profiles.to_glib()); + gst_rtsp_server_sys::gst_rtsp_stream_set_profiles(self.as_ref().to_glib_none().0, profiles.to_glib()); } } fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans) { unsafe { - ffi::gst_rtsp_stream_set_protocols(self.as_ref().to_glib_none().0, protocols.to_glib()); + gst_rtsp_server_sys::gst_rtsp_stream_set_protocols(self.as_ref().to_glib_none().0, protocols.to_glib()); } } fn set_pt_map(&self, pt: u32, caps: &gst::Caps) { unsafe { - ffi::gst_rtsp_stream_set_pt_map(self.as_ref().to_glib_none().0, pt, caps.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_stream_set_pt_map(self.as_ref().to_glib_none().0, pt, caps.to_glib_none().0); } } fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) { unsafe { - ffi::gst_rtsp_stream_set_publish_clock_mode(self.as_ref().to_glib_none().0, mode.to_glib()); + gst_rtsp_server_sys::gst_rtsp_stream_set_publish_clock_mode(self.as_ref().to_glib_none().0, mode.to_glib()); } } fn set_retransmission_pt(&self, rtx_pt: u32) { unsafe { - ffi::gst_rtsp_stream_set_retransmission_pt(self.as_ref().to_glib_none().0, rtx_pt); + gst_rtsp_server_sys::gst_rtsp_stream_set_retransmission_pt(self.as_ref().to_glib_none().0, rtx_pt); } } fn set_retransmission_time(&self, time: gst::ClockTime) { unsafe { - ffi::gst_rtsp_stream_set_retransmission_time(self.as_ref().to_glib_none().0, time.to_glib()); + gst_rtsp_server_sys::gst_rtsp_stream_set_retransmission_time(self.as_ref().to_glib_none().0, time.to_glib()); } } fn set_seqnum_offset(&self, seqnum: u16) { unsafe { - ffi::gst_rtsp_stream_set_seqnum_offset(self.as_ref().to_glib_none().0, seqnum); + gst_rtsp_server_sys::gst_rtsp_stream_set_seqnum_offset(self.as_ref().to_glib_none().0, seqnum); } } fn transport_filter(&self, func: Option<&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult)>) -> Vec { let func_data: Option<&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult)> = func; - unsafe extern "C" fn func_func(stream: *mut ffi::GstRTSPStream, trans: *mut ffi::GstRTSPStreamTransport, user_data: glib_ffi::gpointer) -> ffi::GstRTSPFilterResult { + unsafe extern "C" fn func_func(stream: *mut gst_rtsp_server_sys::GstRTSPStream, trans: *mut gst_rtsp_server_sys::GstRTSPStreamTransport, user_data: glib_sys::gpointer) -> gst_rtsp_server_sys::GstRTSPFilterResult { let stream = from_glib_borrow(stream); let trans = from_glib_borrow(trans); let callback: *mut Option<&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult)> = user_data as *const _ as usize as *mut Option<&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult)>; @@ -553,23 +549,22 @@ impl> RTSPStreamExt for O { }; res.to_glib() } - let func = Some(func_func as _); + let func = if func_data.is_some() { Some(func_func as _) } else { None }; let super_callback0: &Option<&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult)> = &func_data; unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_stream_transport_filter(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) + FromGlibPtrContainer::from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_transport_filter(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) } } fn unblock_linked(&self) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_stream_unblock_linked(self.as_ref().to_glib_none().0), "Failed to unblock the dataflow") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_unblock_linked(self.as_ref().to_glib_none().0), "Failed to unblock the dataflow") } } - fn update_crypto<'a, P: Into>>(&self, ssrc: u32, crypto: P) -> Result<(), glib::error::BoolError> { - let crypto = crypto.into(); + fn update_crypto(&self, ssrc: u32, crypto: Option<&gst::Caps>) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_stream_update_crypto(self.as_ref().to_glib_none().0, ssrc, crypto.to_glib_none().0), "Failed to update crypto") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_update_crypto(self.as_ref().to_glib_none().0, ssrc, crypto.to_glib_none().0), "Failed to update crypto") } } @@ -614,31 +609,31 @@ impl> RTSPStreamExt for O { } } -unsafe extern "C" fn new_rtcp_encoder_trampoline(this: *mut ffi::GstRTSPStream, object: *mut gst_ffi::GstElement, f: glib_ffi::gpointer) +unsafe extern "C" fn new_rtcp_encoder_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPStream, object: *mut gst_sys::GstElement, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPStream::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn new_rtp_encoder_trampoline(this: *mut ffi::GstRTSPStream, object: *mut gst_ffi::GstElement, f: glib_ffi::gpointer) +unsafe extern "C" fn new_rtp_encoder_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPStream, object: *mut gst_sys::GstElement, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPStream::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) } -unsafe extern "C" fn notify_control_trampoline(this: *mut ffi::GstRTSPStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_control_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPStream, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPStream::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_profiles_trampoline(this: *mut ffi::GstRTSPStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_profiles_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPStream, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPStream::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_protocols_trampoline(this: *mut ffi::GstRTSPStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_protocols_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPStream, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPStream::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs index f6943edfa..f952cc2f2 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs @@ -3,26 +3,26 @@ // DO NOT EDIT use RTSPStream; -use ffi; use glib; use glib::GString; use glib::object::IsA; use glib::translate::*; use gst; use gst_rtsp; +use gst_rtsp_server_sys; use std::boxed::Box as Box_; glib_wrapper! { - pub struct RTSPStreamTransport(Object); + pub struct RTSPStreamTransport(Object); match fn { - get_type => || ffi::gst_rtsp_stream_transport_get_type(), + get_type => || gst_rtsp_server_sys::gst_rtsp_stream_transport_get_type(), } } impl RTSPStreamTransport { //pub fn new>(stream: &P, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> RTSPStreamTransport { - // unsafe { TODO: call ffi::gst_rtsp_stream_transport_new() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_new() } //} } @@ -55,97 +55,96 @@ pub trait RTSPStreamTransportExt: 'static { //fn set_transport(&self, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport); - fn set_url<'a, P: Into>>(&self, url: P); + fn set_url(&self, url: Option<&gst_rtsp::RTSPUrl>); } impl> RTSPStreamTransportExt for O { fn get_rtpinfo(&self, start_time: gst::ClockTime) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_stream_transport_get_rtpinfo(self.as_ref().to_glib_none().0, start_time.to_glib())) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_transport_get_rtpinfo(self.as_ref().to_glib_none().0, start_time.to_glib())) } } fn get_stream(&self) -> Option { unsafe { - from_glib_none(ffi::gst_rtsp_stream_transport_get_stream(self.as_ref().to_glib_none().0)) + from_glib_none(gst_rtsp_server_sys::gst_rtsp_stream_transport_get_stream(self.as_ref().to_glib_none().0)) } } //fn get_transport(&self) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_rtsp_stream_transport_get_transport() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_get_transport() } //} fn get_url(&self) -> Option { unsafe { - from_glib_none(ffi::gst_rtsp_stream_transport_get_url(self.as_ref().to_glib_none().0)) + from_glib_none(gst_rtsp_server_sys::gst_rtsp_stream_transport_get_url(self.as_ref().to_glib_none().0)) } } fn is_timed_out(&self) -> bool { unsafe { - from_glib(ffi::gst_rtsp_stream_transport_is_timed_out(self.as_ref().to_glib_none().0)) + from_glib(gst_rtsp_server_sys::gst_rtsp_stream_transport_is_timed_out(self.as_ref().to_glib_none().0)) } } fn keep_alive(&self) { unsafe { - ffi::gst_rtsp_stream_transport_keep_alive(self.as_ref().to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_stream_transport_keep_alive(self.as_ref().to_glib_none().0); } } fn send_rtcp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_stream_transport_send_rtcp(self.as_ref().to_glib_none().0, buffer.to_glib_none().0), "Failed to send rtcp") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_transport_send_rtcp(self.as_ref().to_glib_none().0, buffer.to_glib_none().0), "Failed to send rtcp") } } fn send_rtp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_stream_transport_send_rtp(self.as_ref().to_glib_none().0, buffer.to_glib_none().0), "Failed to send rtp") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_transport_send_rtp(self.as_ref().to_glib_none().0, buffer.to_glib_none().0), "Failed to send rtp") } } fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_rtsp_stream_transport_set_active(self.as_ref().to_glib_none().0, active.to_glib()), "Failed to set active") + glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_transport_set_active(self.as_ref().to_glib_none().0, active.to_glib()), "Failed to set active") } } //fn set_callbacks bool + 'static, Q: Fn(&gst::Buffer, u8) -> bool + 'static>(&self, send_rtp: P, send_rtcp: Q) { - // unsafe { TODO: call ffi::gst_rtsp_stream_transport_set_callbacks() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_set_callbacks() } //} fn set_keepalive(&self, keep_alive: P) { let keep_alive_data: Box_

= Box::new(keep_alive); - unsafe extern "C" fn keep_alive_func(user_data: glib_ffi::gpointer) { + unsafe extern "C" fn keep_alive_func(user_data: glib_sys::gpointer) { let callback: &P = &*(user_data as *mut _); (*callback)(); } let keep_alive = Some(keep_alive_func::

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

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

as _); let super_callback0: Box_

= keep_alive_data; unsafe { - ffi::gst_rtsp_stream_transport_set_keepalive(self.as_ref().to_glib_none().0, keep_alive, Box::into_raw(super_callback0) as *mut _, destroy_call3); + gst_rtsp_server_sys::gst_rtsp_stream_transport_set_keepalive(self.as_ref().to_glib_none().0, keep_alive, Box::into_raw(super_callback0) as *mut _, destroy_call3); } } fn set_timed_out(&self, timedout: bool) { unsafe { - ffi::gst_rtsp_stream_transport_set_timed_out(self.as_ref().to_glib_none().0, timedout.to_glib()); + gst_rtsp_server_sys::gst_rtsp_stream_transport_set_timed_out(self.as_ref().to_glib_none().0, timedout.to_glib()); } } //fn set_transport(&self, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport) { - // unsafe { TODO: call ffi::gst_rtsp_stream_transport_set_transport() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_set_transport() } //} - fn set_url<'a, P: Into>>(&self, url: P) { - let url = url.into(); + fn set_url(&self, url: Option<&gst_rtsp::RTSPUrl>) { unsafe { - ffi::gst_rtsp_stream_transport_set_url(self.as_ref().to_glib_none().0, url.to_glib_none().0); + gst_rtsp_server_sys::gst_rtsp_stream_transport_set_url(self.as_ref().to_glib_none().0, url.to_glib_none().0); } } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs index 13965a2de..4a1fcdcbc 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs @@ -2,21 +2,21 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::object::Cast; use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; +use gst_rtsp_server_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct RTSPThreadPool(Object); + pub struct RTSPThreadPool(Object); match fn { - get_type => || ffi::gst_rtsp_thread_pool_get_type(), + get_type => || gst_rtsp_server_sys::gst_rtsp_thread_pool_get_type(), } } @@ -24,14 +24,14 @@ impl RTSPThreadPool { pub fn new() -> RTSPThreadPool { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_rtsp_thread_pool_new()) + from_glib_full(gst_rtsp_server_sys::gst_rtsp_thread_pool_new()) } } pub fn cleanup() { assert_initialized_main_thread!(); unsafe { - ffi::gst_rtsp_thread_pool_cleanup(); + gst_rtsp_server_sys::gst_rtsp_thread_pool_cleanup(); } } } @@ -60,17 +60,17 @@ pub trait RTSPThreadPoolExt: 'static { impl> RTSPThreadPoolExt for O { fn get_max_threads(&self) -> i32 { unsafe { - ffi::gst_rtsp_thread_pool_get_max_threads(self.as_ref().to_glib_none().0) + gst_rtsp_server_sys::gst_rtsp_thread_pool_get_max_threads(self.as_ref().to_glib_none().0) } } //fn get_thread(&self, type_: RTSPThreadType, ctx: &RTSPContext) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_rtsp_thread_pool_get_thread() } + // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_thread_pool_get_thread() } //} fn set_max_threads(&self, max_threads: i32) { unsafe { - ffi::gst_rtsp_thread_pool_set_max_threads(self.as_ref().to_glib_none().0, max_threads); + gst_rtsp_server_sys::gst_rtsp_thread_pool_set_max_threads(self.as_ref().to_glib_none().0, max_threads); } } @@ -83,7 +83,7 @@ impl> RTSPThreadPoolExt for O { } } -unsafe extern "C" fn notify_max_threads_trampoline(this: *mut ffi::GstRTSPThreadPool, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_max_threads_trampoline(this: *mut gst_rtsp_server_sys::GstRTSPThreadPool, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&RTSPThreadPool::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer-rtsp-server/src/auto/versions.txt b/gstreamer-rtsp-server/src/auto/versions.txt index b9131200d..a9e0ccc5d 100644 --- a/gstreamer-rtsp-server/src/auto/versions.txt +++ b/gstreamer-rtsp-server/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-rtsp/src/auto/enums.rs b/gstreamer-rtsp/src/auto/enums.rs index 1dadaafaa..1cfb2e5f2 100644 --- a/gstreamer-rtsp/src/auto/enums.rs +++ b/gstreamer-rtsp/src/auto/enums.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +9,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_rtsp_sys; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] @@ -24,21 +24,21 @@ pub enum RTSPAuthMethod { #[doc(hidden)] impl ToGlib for RTSPAuthMethod { - type GlibType = ffi::GstRTSPAuthMethod; + type GlibType = gst_rtsp_sys::GstRTSPAuthMethod; - fn to_glib(&self) -> ffi::GstRTSPAuthMethod { + fn to_glib(&self) -> gst_rtsp_sys::GstRTSPAuthMethod { match *self { - RTSPAuthMethod::None => ffi::GST_RTSP_AUTH_NONE, - RTSPAuthMethod::Basic => ffi::GST_RTSP_AUTH_BASIC, - RTSPAuthMethod::Digest => ffi::GST_RTSP_AUTH_DIGEST, + RTSPAuthMethod::None => gst_rtsp_sys::GST_RTSP_AUTH_NONE, + RTSPAuthMethod::Basic => gst_rtsp_sys::GST_RTSP_AUTH_BASIC, + RTSPAuthMethod::Digest => gst_rtsp_sys::GST_RTSP_AUTH_DIGEST, RTSPAuthMethod::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPAuthMethod { - fn from_glib(value: ffi::GstRTSPAuthMethod) -> Self { +impl FromGlib for RTSPAuthMethod { + fn from_glib(value: gst_rtsp_sys::GstRTSPAuthMethod) -> Self { skip_assert_initialized!(); match value { 0 => RTSPAuthMethod::None, @@ -51,7 +51,7 @@ impl FromGlib for RTSPAuthMethod { impl StaticType for RTSPAuthMethod { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_auth_method_get_type()) } + unsafe { from_glib(gst_rtsp_sys::gst_rtsp_auth_method_get_type()) } } } @@ -63,13 +63,13 @@ impl<'a> FromValueOptional<'a> for RTSPAuthMethod { impl<'a> FromValue<'a> for RTSPAuthMethod { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for RTSPAuthMethod { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -85,21 +85,21 @@ pub enum RTSPFamily { #[doc(hidden)] impl ToGlib for RTSPFamily { - type GlibType = ffi::GstRTSPFamily; + type GlibType = gst_rtsp_sys::GstRTSPFamily; - fn to_glib(&self) -> ffi::GstRTSPFamily { + fn to_glib(&self) -> gst_rtsp_sys::GstRTSPFamily { match *self { - RTSPFamily::None => ffi::GST_RTSP_FAM_NONE, - RTSPFamily::Inet => ffi::GST_RTSP_FAM_INET, - RTSPFamily::Inet6 => ffi::GST_RTSP_FAM_INET6, + RTSPFamily::None => gst_rtsp_sys::GST_RTSP_FAM_NONE, + RTSPFamily::Inet => gst_rtsp_sys::GST_RTSP_FAM_INET, + RTSPFamily::Inet6 => gst_rtsp_sys::GST_RTSP_FAM_INET6, RTSPFamily::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPFamily { - fn from_glib(value: ffi::GstRTSPFamily) -> Self { +impl FromGlib for RTSPFamily { + fn from_glib(value: gst_rtsp_sys::GstRTSPFamily) -> Self { skip_assert_initialized!(); match value { 0 => RTSPFamily::None, @@ -112,7 +112,7 @@ impl FromGlib for RTSPFamily { impl StaticType for RTSPFamily { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_family_get_type()) } + unsafe { from_glib(gst_rtsp_sys::gst_rtsp_family_get_type()) } } } @@ -124,13 +124,13 @@ impl<'a> FromValueOptional<'a> for RTSPFamily { impl<'a> FromValue<'a> for RTSPFamily { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for RTSPFamily { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -231,106 +231,106 @@ pub enum RTSPHeaderField { #[doc(hidden)] impl ToGlib for RTSPHeaderField { - type GlibType = ffi::GstRTSPHeaderField; + type GlibType = gst_rtsp_sys::GstRTSPHeaderField; - fn to_glib(&self) -> ffi::GstRTSPHeaderField { + fn to_glib(&self) -> gst_rtsp_sys::GstRTSPHeaderField { match *self { - RTSPHeaderField::Invalid => ffi::GST_RTSP_HDR_INVALID, - RTSPHeaderField::Accept => ffi::GST_RTSP_HDR_ACCEPT, - RTSPHeaderField::AcceptEncoding => ffi::GST_RTSP_HDR_ACCEPT_ENCODING, - RTSPHeaderField::AcceptLanguage => ffi::GST_RTSP_HDR_ACCEPT_LANGUAGE, - RTSPHeaderField::Allow => ffi::GST_RTSP_HDR_ALLOW, - RTSPHeaderField::Authorization => ffi::GST_RTSP_HDR_AUTHORIZATION, - RTSPHeaderField::Bandwidth => ffi::GST_RTSP_HDR_BANDWIDTH, - RTSPHeaderField::Blocksize => ffi::GST_RTSP_HDR_BLOCKSIZE, - RTSPHeaderField::CacheControl => ffi::GST_RTSP_HDR_CACHE_CONTROL, - RTSPHeaderField::Conference => ffi::GST_RTSP_HDR_CONFERENCE, - RTSPHeaderField::Connection => ffi::GST_RTSP_HDR_CONNECTION, - RTSPHeaderField::ContentBase => ffi::GST_RTSP_HDR_CONTENT_BASE, - RTSPHeaderField::ContentEncoding => ffi::GST_RTSP_HDR_CONTENT_ENCODING, - RTSPHeaderField::ContentLanguage => ffi::GST_RTSP_HDR_CONTENT_LANGUAGE, - RTSPHeaderField::ContentLength => ffi::GST_RTSP_HDR_CONTENT_LENGTH, - RTSPHeaderField::ContentLocation => ffi::GST_RTSP_HDR_CONTENT_LOCATION, - RTSPHeaderField::ContentType => ffi::GST_RTSP_HDR_CONTENT_TYPE, - RTSPHeaderField::Cseq => ffi::GST_RTSP_HDR_CSEQ, - RTSPHeaderField::Date => ffi::GST_RTSP_HDR_DATE, - RTSPHeaderField::Expires => ffi::GST_RTSP_HDR_EXPIRES, - RTSPHeaderField::From => ffi::GST_RTSP_HDR_FROM, - RTSPHeaderField::IfModifiedSince => ffi::GST_RTSP_HDR_IF_MODIFIED_SINCE, - RTSPHeaderField::LastModified => ffi::GST_RTSP_HDR_LAST_MODIFIED, - RTSPHeaderField::ProxyAuthenticate => ffi::GST_RTSP_HDR_PROXY_AUTHENTICATE, - RTSPHeaderField::ProxyRequire => ffi::GST_RTSP_HDR_PROXY_REQUIRE, - RTSPHeaderField::Public => ffi::GST_RTSP_HDR_PUBLIC, - RTSPHeaderField::Range => ffi::GST_RTSP_HDR_RANGE, - RTSPHeaderField::Referer => ffi::GST_RTSP_HDR_REFERER, - RTSPHeaderField::Require => ffi::GST_RTSP_HDR_REQUIRE, - RTSPHeaderField::RetryAfter => ffi::GST_RTSP_HDR_RETRY_AFTER, - RTSPHeaderField::RtpInfo => ffi::GST_RTSP_HDR_RTP_INFO, - RTSPHeaderField::Scale => ffi::GST_RTSP_HDR_SCALE, - RTSPHeaderField::Session => ffi::GST_RTSP_HDR_SESSION, - RTSPHeaderField::Server => ffi::GST_RTSP_HDR_SERVER, - RTSPHeaderField::Speed => ffi::GST_RTSP_HDR_SPEED, - RTSPHeaderField::Transport => ffi::GST_RTSP_HDR_TRANSPORT, - RTSPHeaderField::Unsupported => ffi::GST_RTSP_HDR_UNSUPPORTED, - RTSPHeaderField::UserAgent => ffi::GST_RTSP_HDR_USER_AGENT, - RTSPHeaderField::Via => ffi::GST_RTSP_HDR_VIA, - RTSPHeaderField::WwwAuthenticate => ffi::GST_RTSP_HDR_WWW_AUTHENTICATE, - RTSPHeaderField::ClientChallenge => ffi::GST_RTSP_HDR_CLIENT_CHALLENGE, - RTSPHeaderField::RealChallenge1 => ffi::GST_RTSP_HDR_REAL_CHALLENGE1, - RTSPHeaderField::RealChallenge2 => ffi::GST_RTSP_HDR_REAL_CHALLENGE2, - RTSPHeaderField::RealChallenge3 => ffi::GST_RTSP_HDR_REAL_CHALLENGE3, - RTSPHeaderField::Subscribe => ffi::GST_RTSP_HDR_SUBSCRIBE, - RTSPHeaderField::Alert => ffi::GST_RTSP_HDR_ALERT, - RTSPHeaderField::ClientId => ffi::GST_RTSP_HDR_CLIENT_ID, - RTSPHeaderField::CompanyId => ffi::GST_RTSP_HDR_COMPANY_ID, - RTSPHeaderField::Guid => ffi::GST_RTSP_HDR_GUID, - RTSPHeaderField::RegionData => ffi::GST_RTSP_HDR_REGION_DATA, - RTSPHeaderField::MaxAsmWidth => ffi::GST_RTSP_HDR_MAX_ASM_WIDTH, - RTSPHeaderField::Language => ffi::GST_RTSP_HDR_LANGUAGE, - RTSPHeaderField::PlayerStartTime => ffi::GST_RTSP_HDR_PLAYER_START_TIME, - RTSPHeaderField::Location => ffi::GST_RTSP_HDR_LOCATION, - RTSPHeaderField::Etag => ffi::GST_RTSP_HDR_ETAG, - RTSPHeaderField::IfMatch => ffi::GST_RTSP_HDR_IF_MATCH, - RTSPHeaderField::AcceptCharset => ffi::GST_RTSP_HDR_ACCEPT_CHARSET, - RTSPHeaderField::Supported => ffi::GST_RTSP_HDR_SUPPORTED, - RTSPHeaderField::Vary => ffi::GST_RTSP_HDR_VARY, - RTSPHeaderField::XAccelerateStreaming => ffi::GST_RTSP_HDR_X_ACCELERATE_STREAMING, - RTSPHeaderField::XAcceptAuthent => ffi::GST_RTSP_HDR_X_ACCEPT_AUTHENT, - RTSPHeaderField::XAcceptProxyAuthent => ffi::GST_RTSP_HDR_X_ACCEPT_PROXY_AUTHENT, - RTSPHeaderField::XBroadcastId => ffi::GST_RTSP_HDR_X_BROADCAST_ID, - RTSPHeaderField::XBurstStreaming => ffi::GST_RTSP_HDR_X_BURST_STREAMING, - RTSPHeaderField::XNotice => ffi::GST_RTSP_HDR_X_NOTICE, - RTSPHeaderField::XPlayerLagTime => ffi::GST_RTSP_HDR_X_PLAYER_LAG_TIME, - RTSPHeaderField::XPlaylist => ffi::GST_RTSP_HDR_X_PLAYLIST, - RTSPHeaderField::XPlaylistChangeNotice => ffi::GST_RTSP_HDR_X_PLAYLIST_CHANGE_NOTICE, - RTSPHeaderField::XPlaylistGenId => ffi::GST_RTSP_HDR_X_PLAYLIST_GEN_ID, - RTSPHeaderField::XPlaylistSeekId => ffi::GST_RTSP_HDR_X_PLAYLIST_SEEK_ID, - RTSPHeaderField::XProxyClientAgent => ffi::GST_RTSP_HDR_X_PROXY_CLIENT_AGENT, - RTSPHeaderField::XProxyClientVerb => ffi::GST_RTSP_HDR_X_PROXY_CLIENT_VERB, - RTSPHeaderField::XRecedingPlaylistchange => ffi::GST_RTSP_HDR_X_RECEDING_PLAYLISTCHANGE, - RTSPHeaderField::XRtpInfo => ffi::GST_RTSP_HDR_X_RTP_INFO, - RTSPHeaderField::XStartupprofile => ffi::GST_RTSP_HDR_X_STARTUPPROFILE, - RTSPHeaderField::Timestamp => ffi::GST_RTSP_HDR_TIMESTAMP, - RTSPHeaderField::AuthenticationInfo => ffi::GST_RTSP_HDR_AUTHENTICATION_INFO, - RTSPHeaderField::Host => ffi::GST_RTSP_HDR_HOST, - RTSPHeaderField::Pragma => ffi::GST_RTSP_HDR_PRAGMA, - RTSPHeaderField::XServerIpAddress => ffi::GST_RTSP_HDR_X_SERVER_IP_ADDRESS, - RTSPHeaderField::XSessioncookie => ffi::GST_RTSP_HDR_X_SESSIONCOOKIE, - RTSPHeaderField::RtcpInterval => ffi::GST_RTSP_HDR_RTCP_INTERVAL, - RTSPHeaderField::Keymgmt => ffi::GST_RTSP_HDR_KEYMGMT, - RTSPHeaderField::PipelinedRequests => ffi::GST_RTSP_HDR_PIPELINED_REQUESTS, - RTSPHeaderField::MediaProperties => ffi::GST_RTSP_HDR_MEDIA_PROPERTIES, - RTSPHeaderField::SeekStyle => ffi::GST_RTSP_HDR_SEEK_STYLE, - RTSPHeaderField::AcceptRanges => ffi::GST_RTSP_HDR_ACCEPT_RANGES, - RTSPHeaderField::Last => ffi::GST_RTSP_HDR_LAST, + RTSPHeaderField::Invalid => gst_rtsp_sys::GST_RTSP_HDR_INVALID, + RTSPHeaderField::Accept => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT, + RTSPHeaderField::AcceptEncoding => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT_ENCODING, + RTSPHeaderField::AcceptLanguage => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT_LANGUAGE, + RTSPHeaderField::Allow => gst_rtsp_sys::GST_RTSP_HDR_ALLOW, + RTSPHeaderField::Authorization => gst_rtsp_sys::GST_RTSP_HDR_AUTHORIZATION, + RTSPHeaderField::Bandwidth => gst_rtsp_sys::GST_RTSP_HDR_BANDWIDTH, + RTSPHeaderField::Blocksize => gst_rtsp_sys::GST_RTSP_HDR_BLOCKSIZE, + RTSPHeaderField::CacheControl => gst_rtsp_sys::GST_RTSP_HDR_CACHE_CONTROL, + RTSPHeaderField::Conference => gst_rtsp_sys::GST_RTSP_HDR_CONFERENCE, + RTSPHeaderField::Connection => gst_rtsp_sys::GST_RTSP_HDR_CONNECTION, + RTSPHeaderField::ContentBase => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_BASE, + RTSPHeaderField::ContentEncoding => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_ENCODING, + RTSPHeaderField::ContentLanguage => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_LANGUAGE, + RTSPHeaderField::ContentLength => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_LENGTH, + RTSPHeaderField::ContentLocation => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_LOCATION, + RTSPHeaderField::ContentType => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_TYPE, + RTSPHeaderField::Cseq => gst_rtsp_sys::GST_RTSP_HDR_CSEQ, + RTSPHeaderField::Date => gst_rtsp_sys::GST_RTSP_HDR_DATE, + RTSPHeaderField::Expires => gst_rtsp_sys::GST_RTSP_HDR_EXPIRES, + RTSPHeaderField::From => gst_rtsp_sys::GST_RTSP_HDR_FROM, + RTSPHeaderField::IfModifiedSince => gst_rtsp_sys::GST_RTSP_HDR_IF_MODIFIED_SINCE, + RTSPHeaderField::LastModified => gst_rtsp_sys::GST_RTSP_HDR_LAST_MODIFIED, + RTSPHeaderField::ProxyAuthenticate => gst_rtsp_sys::GST_RTSP_HDR_PROXY_AUTHENTICATE, + RTSPHeaderField::ProxyRequire => gst_rtsp_sys::GST_RTSP_HDR_PROXY_REQUIRE, + RTSPHeaderField::Public => gst_rtsp_sys::GST_RTSP_HDR_PUBLIC, + RTSPHeaderField::Range => gst_rtsp_sys::GST_RTSP_HDR_RANGE, + RTSPHeaderField::Referer => gst_rtsp_sys::GST_RTSP_HDR_REFERER, + RTSPHeaderField::Require => gst_rtsp_sys::GST_RTSP_HDR_REQUIRE, + RTSPHeaderField::RetryAfter => gst_rtsp_sys::GST_RTSP_HDR_RETRY_AFTER, + RTSPHeaderField::RtpInfo => gst_rtsp_sys::GST_RTSP_HDR_RTP_INFO, + RTSPHeaderField::Scale => gst_rtsp_sys::GST_RTSP_HDR_SCALE, + RTSPHeaderField::Session => gst_rtsp_sys::GST_RTSP_HDR_SESSION, + RTSPHeaderField::Server => gst_rtsp_sys::GST_RTSP_HDR_SERVER, + RTSPHeaderField::Speed => gst_rtsp_sys::GST_RTSP_HDR_SPEED, + RTSPHeaderField::Transport => gst_rtsp_sys::GST_RTSP_HDR_TRANSPORT, + RTSPHeaderField::Unsupported => gst_rtsp_sys::GST_RTSP_HDR_UNSUPPORTED, + RTSPHeaderField::UserAgent => gst_rtsp_sys::GST_RTSP_HDR_USER_AGENT, + RTSPHeaderField::Via => gst_rtsp_sys::GST_RTSP_HDR_VIA, + RTSPHeaderField::WwwAuthenticate => gst_rtsp_sys::GST_RTSP_HDR_WWW_AUTHENTICATE, + RTSPHeaderField::ClientChallenge => gst_rtsp_sys::GST_RTSP_HDR_CLIENT_CHALLENGE, + RTSPHeaderField::RealChallenge1 => gst_rtsp_sys::GST_RTSP_HDR_REAL_CHALLENGE1, + RTSPHeaderField::RealChallenge2 => gst_rtsp_sys::GST_RTSP_HDR_REAL_CHALLENGE2, + RTSPHeaderField::RealChallenge3 => gst_rtsp_sys::GST_RTSP_HDR_REAL_CHALLENGE3, + RTSPHeaderField::Subscribe => gst_rtsp_sys::GST_RTSP_HDR_SUBSCRIBE, + RTSPHeaderField::Alert => gst_rtsp_sys::GST_RTSP_HDR_ALERT, + RTSPHeaderField::ClientId => gst_rtsp_sys::GST_RTSP_HDR_CLIENT_ID, + RTSPHeaderField::CompanyId => gst_rtsp_sys::GST_RTSP_HDR_COMPANY_ID, + RTSPHeaderField::Guid => gst_rtsp_sys::GST_RTSP_HDR_GUID, + RTSPHeaderField::RegionData => gst_rtsp_sys::GST_RTSP_HDR_REGION_DATA, + RTSPHeaderField::MaxAsmWidth => gst_rtsp_sys::GST_RTSP_HDR_MAX_ASM_WIDTH, + RTSPHeaderField::Language => gst_rtsp_sys::GST_RTSP_HDR_LANGUAGE, + RTSPHeaderField::PlayerStartTime => gst_rtsp_sys::GST_RTSP_HDR_PLAYER_START_TIME, + RTSPHeaderField::Location => gst_rtsp_sys::GST_RTSP_HDR_LOCATION, + RTSPHeaderField::Etag => gst_rtsp_sys::GST_RTSP_HDR_ETAG, + RTSPHeaderField::IfMatch => gst_rtsp_sys::GST_RTSP_HDR_IF_MATCH, + RTSPHeaderField::AcceptCharset => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT_CHARSET, + RTSPHeaderField::Supported => gst_rtsp_sys::GST_RTSP_HDR_SUPPORTED, + RTSPHeaderField::Vary => gst_rtsp_sys::GST_RTSP_HDR_VARY, + RTSPHeaderField::XAccelerateStreaming => gst_rtsp_sys::GST_RTSP_HDR_X_ACCELERATE_STREAMING, + RTSPHeaderField::XAcceptAuthent => gst_rtsp_sys::GST_RTSP_HDR_X_ACCEPT_AUTHENT, + RTSPHeaderField::XAcceptProxyAuthent => gst_rtsp_sys::GST_RTSP_HDR_X_ACCEPT_PROXY_AUTHENT, + RTSPHeaderField::XBroadcastId => gst_rtsp_sys::GST_RTSP_HDR_X_BROADCAST_ID, + RTSPHeaderField::XBurstStreaming => gst_rtsp_sys::GST_RTSP_HDR_X_BURST_STREAMING, + RTSPHeaderField::XNotice => gst_rtsp_sys::GST_RTSP_HDR_X_NOTICE, + RTSPHeaderField::XPlayerLagTime => gst_rtsp_sys::GST_RTSP_HDR_X_PLAYER_LAG_TIME, + RTSPHeaderField::XPlaylist => gst_rtsp_sys::GST_RTSP_HDR_X_PLAYLIST, + RTSPHeaderField::XPlaylistChangeNotice => gst_rtsp_sys::GST_RTSP_HDR_X_PLAYLIST_CHANGE_NOTICE, + RTSPHeaderField::XPlaylistGenId => gst_rtsp_sys::GST_RTSP_HDR_X_PLAYLIST_GEN_ID, + RTSPHeaderField::XPlaylistSeekId => gst_rtsp_sys::GST_RTSP_HDR_X_PLAYLIST_SEEK_ID, + RTSPHeaderField::XProxyClientAgent => gst_rtsp_sys::GST_RTSP_HDR_X_PROXY_CLIENT_AGENT, + RTSPHeaderField::XProxyClientVerb => gst_rtsp_sys::GST_RTSP_HDR_X_PROXY_CLIENT_VERB, + RTSPHeaderField::XRecedingPlaylistchange => gst_rtsp_sys::GST_RTSP_HDR_X_RECEDING_PLAYLISTCHANGE, + RTSPHeaderField::XRtpInfo => gst_rtsp_sys::GST_RTSP_HDR_X_RTP_INFO, + RTSPHeaderField::XStartupprofile => gst_rtsp_sys::GST_RTSP_HDR_X_STARTUPPROFILE, + RTSPHeaderField::Timestamp => gst_rtsp_sys::GST_RTSP_HDR_TIMESTAMP, + RTSPHeaderField::AuthenticationInfo => gst_rtsp_sys::GST_RTSP_HDR_AUTHENTICATION_INFO, + RTSPHeaderField::Host => gst_rtsp_sys::GST_RTSP_HDR_HOST, + RTSPHeaderField::Pragma => gst_rtsp_sys::GST_RTSP_HDR_PRAGMA, + RTSPHeaderField::XServerIpAddress => gst_rtsp_sys::GST_RTSP_HDR_X_SERVER_IP_ADDRESS, + RTSPHeaderField::XSessioncookie => gst_rtsp_sys::GST_RTSP_HDR_X_SESSIONCOOKIE, + RTSPHeaderField::RtcpInterval => gst_rtsp_sys::GST_RTSP_HDR_RTCP_INTERVAL, + RTSPHeaderField::Keymgmt => gst_rtsp_sys::GST_RTSP_HDR_KEYMGMT, + RTSPHeaderField::PipelinedRequests => gst_rtsp_sys::GST_RTSP_HDR_PIPELINED_REQUESTS, + RTSPHeaderField::MediaProperties => gst_rtsp_sys::GST_RTSP_HDR_MEDIA_PROPERTIES, + RTSPHeaderField::SeekStyle => gst_rtsp_sys::GST_RTSP_HDR_SEEK_STYLE, + RTSPHeaderField::AcceptRanges => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT_RANGES, + RTSPHeaderField::Last => gst_rtsp_sys::GST_RTSP_HDR_LAST, RTSPHeaderField::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPHeaderField { - fn from_glib(value: ffi::GstRTSPHeaderField) -> Self { +impl FromGlib for RTSPHeaderField { + fn from_glib(value: gst_rtsp_sys::GstRTSPHeaderField) -> Self { skip_assert_initialized!(); match value { 0 => RTSPHeaderField::Invalid, @@ -428,7 +428,7 @@ impl FromGlib for RTSPHeaderField { impl StaticType for RTSPHeaderField { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_header_field_get_type()) } + unsafe { from_glib(gst_rtsp_sys::gst_rtsp_header_field_get_type()) } } } @@ -440,13 +440,13 @@ impl<'a> FromValueOptional<'a> for RTSPHeaderField { impl<'a> FromValue<'a> for RTSPHeaderField { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for RTSPHeaderField { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -465,24 +465,24 @@ pub enum RTSPMsgType { #[doc(hidden)] impl ToGlib for RTSPMsgType { - type GlibType = ffi::GstRTSPMsgType; + type GlibType = gst_rtsp_sys::GstRTSPMsgType; - fn to_glib(&self) -> ffi::GstRTSPMsgType { + fn to_glib(&self) -> gst_rtsp_sys::GstRTSPMsgType { match *self { - RTSPMsgType::Invalid => ffi::GST_RTSP_MESSAGE_INVALID, - RTSPMsgType::Request => ffi::GST_RTSP_MESSAGE_REQUEST, - RTSPMsgType::Response => ffi::GST_RTSP_MESSAGE_RESPONSE, - RTSPMsgType::HttpRequest => ffi::GST_RTSP_MESSAGE_HTTP_REQUEST, - RTSPMsgType::HttpResponse => ffi::GST_RTSP_MESSAGE_HTTP_RESPONSE, - RTSPMsgType::Data => ffi::GST_RTSP_MESSAGE_DATA, + RTSPMsgType::Invalid => gst_rtsp_sys::GST_RTSP_MESSAGE_INVALID, + RTSPMsgType::Request => gst_rtsp_sys::GST_RTSP_MESSAGE_REQUEST, + RTSPMsgType::Response => gst_rtsp_sys::GST_RTSP_MESSAGE_RESPONSE, + RTSPMsgType::HttpRequest => gst_rtsp_sys::GST_RTSP_MESSAGE_HTTP_REQUEST, + RTSPMsgType::HttpResponse => gst_rtsp_sys::GST_RTSP_MESSAGE_HTTP_RESPONSE, + RTSPMsgType::Data => gst_rtsp_sys::GST_RTSP_MESSAGE_DATA, RTSPMsgType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPMsgType { - fn from_glib(value: ffi::GstRTSPMsgType) -> Self { +impl FromGlib for RTSPMsgType { + fn from_glib(value: gst_rtsp_sys::GstRTSPMsgType) -> Self { skip_assert_initialized!(); match value { 0 => RTSPMsgType::Invalid, @@ -498,7 +498,7 @@ impl FromGlib for RTSPMsgType { impl StaticType for RTSPMsgType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_msg_type_get_type()) } + unsafe { from_glib(gst_rtsp_sys::gst_rtsp_msg_type_get_type()) } } } @@ -510,13 +510,13 @@ impl<'a> FromValueOptional<'a> for RTSPMsgType { impl<'a> FromValue<'a> for RTSPMsgType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for RTSPMsgType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -534,23 +534,23 @@ pub enum RTSPRangeUnit { #[doc(hidden)] impl ToGlib for RTSPRangeUnit { - type GlibType = ffi::GstRTSPRangeUnit; + type GlibType = gst_rtsp_sys::GstRTSPRangeUnit; - fn to_glib(&self) -> ffi::GstRTSPRangeUnit { + fn to_glib(&self) -> gst_rtsp_sys::GstRTSPRangeUnit { match *self { - RTSPRangeUnit::Smpte => ffi::GST_RTSP_RANGE_SMPTE, - RTSPRangeUnit::Smpte30Drop => ffi::GST_RTSP_RANGE_SMPTE_30_DROP, - RTSPRangeUnit::Smpte25 => ffi::GST_RTSP_RANGE_SMPTE_25, - RTSPRangeUnit::Npt => ffi::GST_RTSP_RANGE_NPT, - RTSPRangeUnit::Clock => ffi::GST_RTSP_RANGE_CLOCK, + RTSPRangeUnit::Smpte => gst_rtsp_sys::GST_RTSP_RANGE_SMPTE, + RTSPRangeUnit::Smpte30Drop => gst_rtsp_sys::GST_RTSP_RANGE_SMPTE_30_DROP, + RTSPRangeUnit::Smpte25 => gst_rtsp_sys::GST_RTSP_RANGE_SMPTE_25, + RTSPRangeUnit::Npt => gst_rtsp_sys::GST_RTSP_RANGE_NPT, + RTSPRangeUnit::Clock => gst_rtsp_sys::GST_RTSP_RANGE_CLOCK, RTSPRangeUnit::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPRangeUnit { - fn from_glib(value: ffi::GstRTSPRangeUnit) -> Self { +impl FromGlib for RTSPRangeUnit { + fn from_glib(value: gst_rtsp_sys::GstRTSPRangeUnit) -> Self { skip_assert_initialized!(); match value { 0 => RTSPRangeUnit::Smpte, @@ -565,7 +565,7 @@ impl FromGlib for RTSPRangeUnit { impl StaticType for RTSPRangeUnit { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_range_unit_get_type()) } + unsafe { from_glib(gst_rtsp_sys::gst_rtsp_range_unit_get_type()) } } } @@ -577,13 +577,13 @@ impl<'a> FromValueOptional<'a> for RTSPRangeUnit { impl<'a> FromValue<'a> for RTSPRangeUnit { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for RTSPRangeUnit { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -614,36 +614,36 @@ pub enum RTSPResult { #[doc(hidden)] impl ToGlib for RTSPResult { - type GlibType = ffi::GstRTSPResult; + type GlibType = gst_rtsp_sys::GstRTSPResult; - fn to_glib(&self) -> ffi::GstRTSPResult { + fn to_glib(&self) -> gst_rtsp_sys::GstRTSPResult { match *self { - RTSPResult::Ok => ffi::GST_RTSP_OK, - RTSPResult::Error => ffi::GST_RTSP_ERROR, - RTSPResult::Einval => ffi::GST_RTSP_EINVAL, - RTSPResult::Eintr => ffi::GST_RTSP_EINTR, - RTSPResult::Enomem => ffi::GST_RTSP_ENOMEM, - RTSPResult::Eresolv => ffi::GST_RTSP_ERESOLV, - RTSPResult::Enotimpl => ffi::GST_RTSP_ENOTIMPL, - RTSPResult::Esys => ffi::GST_RTSP_ESYS, - RTSPResult::Eparse => ffi::GST_RTSP_EPARSE, - RTSPResult::Ewsastart => ffi::GST_RTSP_EWSASTART, - RTSPResult::Ewsaversion => ffi::GST_RTSP_EWSAVERSION, - RTSPResult::Eeof => ffi::GST_RTSP_EEOF, - RTSPResult::Enet => ffi::GST_RTSP_ENET, - RTSPResult::Enotip => ffi::GST_RTSP_ENOTIP, - RTSPResult::Etimeout => ffi::GST_RTSP_ETIMEOUT, - RTSPResult::Etget => ffi::GST_RTSP_ETGET, - RTSPResult::Etpost => ffi::GST_RTSP_ETPOST, - RTSPResult::Elast => ffi::GST_RTSP_ELAST, + RTSPResult::Ok => gst_rtsp_sys::GST_RTSP_OK, + RTSPResult::Error => gst_rtsp_sys::GST_RTSP_ERROR, + RTSPResult::Einval => gst_rtsp_sys::GST_RTSP_EINVAL, + RTSPResult::Eintr => gst_rtsp_sys::GST_RTSP_EINTR, + RTSPResult::Enomem => gst_rtsp_sys::GST_RTSP_ENOMEM, + RTSPResult::Eresolv => gst_rtsp_sys::GST_RTSP_ERESOLV, + RTSPResult::Enotimpl => gst_rtsp_sys::GST_RTSP_ENOTIMPL, + RTSPResult::Esys => gst_rtsp_sys::GST_RTSP_ESYS, + RTSPResult::Eparse => gst_rtsp_sys::GST_RTSP_EPARSE, + RTSPResult::Ewsastart => gst_rtsp_sys::GST_RTSP_EWSASTART, + RTSPResult::Ewsaversion => gst_rtsp_sys::GST_RTSP_EWSAVERSION, + RTSPResult::Eeof => gst_rtsp_sys::GST_RTSP_EEOF, + RTSPResult::Enet => gst_rtsp_sys::GST_RTSP_ENET, + RTSPResult::Enotip => gst_rtsp_sys::GST_RTSP_ENOTIP, + RTSPResult::Etimeout => gst_rtsp_sys::GST_RTSP_ETIMEOUT, + RTSPResult::Etget => gst_rtsp_sys::GST_RTSP_ETGET, + RTSPResult::Etpost => gst_rtsp_sys::GST_RTSP_ETPOST, + RTSPResult::Elast => gst_rtsp_sys::GST_RTSP_ELAST, RTSPResult::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPResult { - fn from_glib(value: ffi::GstRTSPResult) -> Self { +impl FromGlib for RTSPResult { + fn from_glib(value: gst_rtsp_sys::GstRTSPResult) -> Self { skip_assert_initialized!(); match value { 0 => RTSPResult::Ok, @@ -671,7 +671,7 @@ impl FromGlib for RTSPResult { impl StaticType for RTSPResult { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_result_get_type()) } + unsafe { from_glib(gst_rtsp_sys::gst_rtsp_result_get_type()) } } } @@ -683,13 +683,13 @@ impl<'a> FromValueOptional<'a> for RTSPResult { impl<'a> FromValue<'a> for RTSPResult { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for RTSPResult { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -708,24 +708,24 @@ pub enum RTSPState { #[doc(hidden)] impl ToGlib for RTSPState { - type GlibType = ffi::GstRTSPState; + type GlibType = gst_rtsp_sys::GstRTSPState; - fn to_glib(&self) -> ffi::GstRTSPState { + fn to_glib(&self) -> gst_rtsp_sys::GstRTSPState { match *self { - RTSPState::Invalid => ffi::GST_RTSP_STATE_INVALID, - RTSPState::Init => ffi::GST_RTSP_STATE_INIT, - RTSPState::Ready => ffi::GST_RTSP_STATE_READY, - RTSPState::Seeking => ffi::GST_RTSP_STATE_SEEKING, - RTSPState::Playing => ffi::GST_RTSP_STATE_PLAYING, - RTSPState::Recording => ffi::GST_RTSP_STATE_RECORDING, + RTSPState::Invalid => gst_rtsp_sys::GST_RTSP_STATE_INVALID, + RTSPState::Init => gst_rtsp_sys::GST_RTSP_STATE_INIT, + RTSPState::Ready => gst_rtsp_sys::GST_RTSP_STATE_READY, + RTSPState::Seeking => gst_rtsp_sys::GST_RTSP_STATE_SEEKING, + RTSPState::Playing => gst_rtsp_sys::GST_RTSP_STATE_PLAYING, + RTSPState::Recording => gst_rtsp_sys::GST_RTSP_STATE_RECORDING, RTSPState::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPState { - fn from_glib(value: ffi::GstRTSPState) -> Self { +impl FromGlib for RTSPState { + fn from_glib(value: gst_rtsp_sys::GstRTSPState) -> Self { skip_assert_initialized!(); match value { 0 => RTSPState::Invalid, @@ -741,7 +741,7 @@ impl FromGlib for RTSPState { impl StaticType for RTSPState { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_state_get_type()) } + unsafe { from_glib(gst_rtsp_sys::gst_rtsp_state_get_type()) } } } @@ -753,13 +753,13 @@ impl<'a> FromValueOptional<'a> for RTSPState { impl<'a> FromValue<'a> for RTSPState { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for RTSPState { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -818,64 +818,64 @@ pub enum RTSPStatusCode { #[doc(hidden)] impl ToGlib for RTSPStatusCode { - type GlibType = ffi::GstRTSPStatusCode; + type GlibType = gst_rtsp_sys::GstRTSPStatusCode; - fn to_glib(&self) -> ffi::GstRTSPStatusCode { + fn to_glib(&self) -> gst_rtsp_sys::GstRTSPStatusCode { match *self { - RTSPStatusCode::Invalid => ffi::GST_RTSP_STS_INVALID, - RTSPStatusCode::Continue => ffi::GST_RTSP_STS_CONTINUE, - RTSPStatusCode::Ok => ffi::GST_RTSP_STS_OK, - RTSPStatusCode::Created => ffi::GST_RTSP_STS_CREATED, - RTSPStatusCode::LowOnStorage => ffi::GST_RTSP_STS_LOW_ON_STORAGE, - RTSPStatusCode::MultipleChoices => ffi::GST_RTSP_STS_MULTIPLE_CHOICES, - RTSPStatusCode::MovedPermanently => ffi::GST_RTSP_STS_MOVED_PERMANENTLY, - RTSPStatusCode::MoveTemporarily => ffi::GST_RTSP_STS_MOVE_TEMPORARILY, - RTSPStatusCode::SeeOther => ffi::GST_RTSP_STS_SEE_OTHER, - RTSPStatusCode::NotModified => ffi::GST_RTSP_STS_NOT_MODIFIED, - RTSPStatusCode::UseProxy => ffi::GST_RTSP_STS_USE_PROXY, - RTSPStatusCode::BadRequest => ffi::GST_RTSP_STS_BAD_REQUEST, - RTSPStatusCode::Unauthorized => ffi::GST_RTSP_STS_UNAUTHORIZED, - RTSPStatusCode::PaymentRequired => ffi::GST_RTSP_STS_PAYMENT_REQUIRED, - RTSPStatusCode::Forbidden => ffi::GST_RTSP_STS_FORBIDDEN, - RTSPStatusCode::NotFound => ffi::GST_RTSP_STS_NOT_FOUND, - RTSPStatusCode::MethodNotAllowed => ffi::GST_RTSP_STS_METHOD_NOT_ALLOWED, - RTSPStatusCode::NotAcceptable => ffi::GST_RTSP_STS_NOT_ACCEPTABLE, - RTSPStatusCode::ProxyAuthRequired => ffi::GST_RTSP_STS_PROXY_AUTH_REQUIRED, - RTSPStatusCode::RequestTimeout => ffi::GST_RTSP_STS_REQUEST_TIMEOUT, - RTSPStatusCode::Gone => ffi::GST_RTSP_STS_GONE, - RTSPStatusCode::LengthRequired => ffi::GST_RTSP_STS_LENGTH_REQUIRED, - RTSPStatusCode::PreconditionFailed => ffi::GST_RTSP_STS_PRECONDITION_FAILED, - RTSPStatusCode::RequestEntityTooLarge => ffi::GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE, - RTSPStatusCode::RequestUriTooLarge => ffi::GST_RTSP_STS_REQUEST_URI_TOO_LARGE, - RTSPStatusCode::UnsupportedMediaType => ffi::GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE, - RTSPStatusCode::ParameterNotUnderstood => ffi::GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD, - RTSPStatusCode::ConferenceNotFound => ffi::GST_RTSP_STS_CONFERENCE_NOT_FOUND, - RTSPStatusCode::NotEnoughBandwidth => ffi::GST_RTSP_STS_NOT_ENOUGH_BANDWIDTH, - RTSPStatusCode::SessionNotFound => ffi::GST_RTSP_STS_SESSION_NOT_FOUND, - RTSPStatusCode::MethodNotValidInThisState => ffi::GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE, - RTSPStatusCode::HeaderFieldNotValidForResource => ffi::GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE, - RTSPStatusCode::InvalidRange => ffi::GST_RTSP_STS_INVALID_RANGE, - RTSPStatusCode::ParameterIsReadonly => ffi::GST_RTSP_STS_PARAMETER_IS_READONLY, - RTSPStatusCode::AggregateOperationNotAllowed => ffi::GST_RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED, - RTSPStatusCode::OnlyAggregateOperationAllowed => ffi::GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED, - RTSPStatusCode::UnsupportedTransport => ffi::GST_RTSP_STS_UNSUPPORTED_TRANSPORT, - RTSPStatusCode::DestinationUnreachable => ffi::GST_RTSP_STS_DESTINATION_UNREACHABLE, - RTSPStatusCode::KeyManagementFailure => ffi::GST_RTSP_STS_KEY_MANAGEMENT_FAILURE, - RTSPStatusCode::InternalServerError => ffi::GST_RTSP_STS_INTERNAL_SERVER_ERROR, - RTSPStatusCode::NotImplemented => ffi::GST_RTSP_STS_NOT_IMPLEMENTED, - RTSPStatusCode::BadGateway => ffi::GST_RTSP_STS_BAD_GATEWAY, - RTSPStatusCode::ServiceUnavailable => ffi::GST_RTSP_STS_SERVICE_UNAVAILABLE, - RTSPStatusCode::GatewayTimeout => ffi::GST_RTSP_STS_GATEWAY_TIMEOUT, - RTSPStatusCode::RtspVersionNotSupported => ffi::GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED, - RTSPStatusCode::OptionNotSupported => ffi::GST_RTSP_STS_OPTION_NOT_SUPPORTED, + RTSPStatusCode::Invalid => gst_rtsp_sys::GST_RTSP_STS_INVALID, + RTSPStatusCode::Continue => gst_rtsp_sys::GST_RTSP_STS_CONTINUE, + RTSPStatusCode::Ok => gst_rtsp_sys::GST_RTSP_STS_OK, + RTSPStatusCode::Created => gst_rtsp_sys::GST_RTSP_STS_CREATED, + RTSPStatusCode::LowOnStorage => gst_rtsp_sys::GST_RTSP_STS_LOW_ON_STORAGE, + RTSPStatusCode::MultipleChoices => gst_rtsp_sys::GST_RTSP_STS_MULTIPLE_CHOICES, + RTSPStatusCode::MovedPermanently => gst_rtsp_sys::GST_RTSP_STS_MOVED_PERMANENTLY, + RTSPStatusCode::MoveTemporarily => gst_rtsp_sys::GST_RTSP_STS_MOVE_TEMPORARILY, + RTSPStatusCode::SeeOther => gst_rtsp_sys::GST_RTSP_STS_SEE_OTHER, + RTSPStatusCode::NotModified => gst_rtsp_sys::GST_RTSP_STS_NOT_MODIFIED, + RTSPStatusCode::UseProxy => gst_rtsp_sys::GST_RTSP_STS_USE_PROXY, + RTSPStatusCode::BadRequest => gst_rtsp_sys::GST_RTSP_STS_BAD_REQUEST, + RTSPStatusCode::Unauthorized => gst_rtsp_sys::GST_RTSP_STS_UNAUTHORIZED, + RTSPStatusCode::PaymentRequired => gst_rtsp_sys::GST_RTSP_STS_PAYMENT_REQUIRED, + RTSPStatusCode::Forbidden => gst_rtsp_sys::GST_RTSP_STS_FORBIDDEN, + RTSPStatusCode::NotFound => gst_rtsp_sys::GST_RTSP_STS_NOT_FOUND, + RTSPStatusCode::MethodNotAllowed => gst_rtsp_sys::GST_RTSP_STS_METHOD_NOT_ALLOWED, + RTSPStatusCode::NotAcceptable => gst_rtsp_sys::GST_RTSP_STS_NOT_ACCEPTABLE, + RTSPStatusCode::ProxyAuthRequired => gst_rtsp_sys::GST_RTSP_STS_PROXY_AUTH_REQUIRED, + RTSPStatusCode::RequestTimeout => gst_rtsp_sys::GST_RTSP_STS_REQUEST_TIMEOUT, + RTSPStatusCode::Gone => gst_rtsp_sys::GST_RTSP_STS_GONE, + RTSPStatusCode::LengthRequired => gst_rtsp_sys::GST_RTSP_STS_LENGTH_REQUIRED, + RTSPStatusCode::PreconditionFailed => gst_rtsp_sys::GST_RTSP_STS_PRECONDITION_FAILED, + RTSPStatusCode::RequestEntityTooLarge => gst_rtsp_sys::GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE, + RTSPStatusCode::RequestUriTooLarge => gst_rtsp_sys::GST_RTSP_STS_REQUEST_URI_TOO_LARGE, + RTSPStatusCode::UnsupportedMediaType => gst_rtsp_sys::GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE, + RTSPStatusCode::ParameterNotUnderstood => gst_rtsp_sys::GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD, + RTSPStatusCode::ConferenceNotFound => gst_rtsp_sys::GST_RTSP_STS_CONFERENCE_NOT_FOUND, + RTSPStatusCode::NotEnoughBandwidth => gst_rtsp_sys::GST_RTSP_STS_NOT_ENOUGH_BANDWIDTH, + RTSPStatusCode::SessionNotFound => gst_rtsp_sys::GST_RTSP_STS_SESSION_NOT_FOUND, + RTSPStatusCode::MethodNotValidInThisState => gst_rtsp_sys::GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE, + RTSPStatusCode::HeaderFieldNotValidForResource => gst_rtsp_sys::GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE, + RTSPStatusCode::InvalidRange => gst_rtsp_sys::GST_RTSP_STS_INVALID_RANGE, + RTSPStatusCode::ParameterIsReadonly => gst_rtsp_sys::GST_RTSP_STS_PARAMETER_IS_READONLY, + RTSPStatusCode::AggregateOperationNotAllowed => gst_rtsp_sys::GST_RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED, + RTSPStatusCode::OnlyAggregateOperationAllowed => gst_rtsp_sys::GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED, + RTSPStatusCode::UnsupportedTransport => gst_rtsp_sys::GST_RTSP_STS_UNSUPPORTED_TRANSPORT, + RTSPStatusCode::DestinationUnreachable => gst_rtsp_sys::GST_RTSP_STS_DESTINATION_UNREACHABLE, + RTSPStatusCode::KeyManagementFailure => gst_rtsp_sys::GST_RTSP_STS_KEY_MANAGEMENT_FAILURE, + RTSPStatusCode::InternalServerError => gst_rtsp_sys::GST_RTSP_STS_INTERNAL_SERVER_ERROR, + RTSPStatusCode::NotImplemented => gst_rtsp_sys::GST_RTSP_STS_NOT_IMPLEMENTED, + RTSPStatusCode::BadGateway => gst_rtsp_sys::GST_RTSP_STS_BAD_GATEWAY, + RTSPStatusCode::ServiceUnavailable => gst_rtsp_sys::GST_RTSP_STS_SERVICE_UNAVAILABLE, + RTSPStatusCode::GatewayTimeout => gst_rtsp_sys::GST_RTSP_STS_GATEWAY_TIMEOUT, + RTSPStatusCode::RtspVersionNotSupported => gst_rtsp_sys::GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED, + RTSPStatusCode::OptionNotSupported => gst_rtsp_sys::GST_RTSP_STS_OPTION_NOT_SUPPORTED, RTSPStatusCode::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPStatusCode { - fn from_glib(value: ffi::GstRTSPStatusCode) -> Self { +impl FromGlib for RTSPStatusCode { + fn from_glib(value: gst_rtsp_sys::GstRTSPStatusCode) -> Self { skip_assert_initialized!(); match value { 0 => RTSPStatusCode::Invalid, @@ -931,7 +931,7 @@ impl FromGlib for RTSPStatusCode { impl StaticType for RTSPStatusCode { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_status_code_get_type()) } + unsafe { from_glib(gst_rtsp_sys::gst_rtsp_status_code_get_type()) } } } @@ -943,13 +943,13 @@ impl<'a> FromValueOptional<'a> for RTSPStatusCode { impl<'a> FromValue<'a> for RTSPStatusCode { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for RTSPStatusCode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -967,23 +967,23 @@ pub enum RTSPTimeType { #[doc(hidden)] impl ToGlib for RTSPTimeType { - type GlibType = ffi::GstRTSPTimeType; + type GlibType = gst_rtsp_sys::GstRTSPTimeType; - fn to_glib(&self) -> ffi::GstRTSPTimeType { + fn to_glib(&self) -> gst_rtsp_sys::GstRTSPTimeType { match *self { - RTSPTimeType::Seconds => ffi::GST_RTSP_TIME_SECONDS, - RTSPTimeType::Now => ffi::GST_RTSP_TIME_NOW, - RTSPTimeType::End => ffi::GST_RTSP_TIME_END, - RTSPTimeType::Frames => ffi::GST_RTSP_TIME_FRAMES, - RTSPTimeType::Utc => ffi::GST_RTSP_TIME_UTC, + RTSPTimeType::Seconds => gst_rtsp_sys::GST_RTSP_TIME_SECONDS, + RTSPTimeType::Now => gst_rtsp_sys::GST_RTSP_TIME_NOW, + RTSPTimeType::End => gst_rtsp_sys::GST_RTSP_TIME_END, + RTSPTimeType::Frames => gst_rtsp_sys::GST_RTSP_TIME_FRAMES, + RTSPTimeType::Utc => gst_rtsp_sys::GST_RTSP_TIME_UTC, RTSPTimeType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for RTSPTimeType { - fn from_glib(value: ffi::GstRTSPTimeType) -> Self { +impl FromGlib for RTSPTimeType { + fn from_glib(value: gst_rtsp_sys::GstRTSPTimeType) -> Self { skip_assert_initialized!(); match value { 0 => RTSPTimeType::Seconds, @@ -998,7 +998,7 @@ impl FromGlib for RTSPTimeType { impl StaticType for RTSPTimeType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_time_type_get_type()) } + unsafe { from_glib(gst_rtsp_sys::gst_rtsp_time_type_get_type()) } } } @@ -1010,13 +1010,13 @@ impl<'a> FromValueOptional<'a> for RTSPTimeType { impl<'a> FromValue<'a> for RTSPTimeType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for RTSPTimeType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-rtsp/src/auto/flags.rs b/gstreamer-rtsp/src/auto/flags.rs index ccfe2392f..0db79843e 100644 --- a/gstreamer-rtsp/src/auto/flags.rs +++ b/gstreamer-rtsp/src/auto/flags.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +9,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_rtsp_sys; bitflags! { pub struct RTSPEvent: u32 { @@ -21,16 +21,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for RTSPEvent { - type GlibType = ffi::GstRTSPEvent; + type GlibType = gst_rtsp_sys::GstRTSPEvent; - fn to_glib(&self) -> ffi::GstRTSPEvent { + fn to_glib(&self) -> gst_rtsp_sys::GstRTSPEvent { self.bits() } } #[doc(hidden)] -impl FromGlib for RTSPEvent { - fn from_glib(value: ffi::GstRTSPEvent) -> RTSPEvent { +impl FromGlib for RTSPEvent { + fn from_glib(value: gst_rtsp_sys::GstRTSPEvent) -> RTSPEvent { skip_assert_initialized!(); RTSPEvent::from_bits_truncate(value) } @@ -38,7 +38,7 @@ impl FromGlib for RTSPEvent { impl StaticType for RTSPEvent { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_event_get_type()) } + unsafe { from_glib(gst_rtsp_sys::gst_rtsp_event_get_type()) } } } @@ -50,13 +50,13 @@ impl<'a> FromValueOptional<'a> for RTSPEvent { impl<'a> FromValue<'a> for RTSPEvent { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for RTSPEvent { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -73,16 +73,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for RTSPLowerTrans { - type GlibType = ffi::GstRTSPLowerTrans; + type GlibType = gst_rtsp_sys::GstRTSPLowerTrans; - fn to_glib(&self) -> ffi::GstRTSPLowerTrans { + fn to_glib(&self) -> gst_rtsp_sys::GstRTSPLowerTrans { self.bits() } } #[doc(hidden)] -impl FromGlib for RTSPLowerTrans { - fn from_glib(value: ffi::GstRTSPLowerTrans) -> RTSPLowerTrans { +impl FromGlib for RTSPLowerTrans { + fn from_glib(value: gst_rtsp_sys::GstRTSPLowerTrans) -> RTSPLowerTrans { skip_assert_initialized!(); RTSPLowerTrans::from_bits_truncate(value) } @@ -90,7 +90,7 @@ impl FromGlib for RTSPLowerTrans { impl StaticType for RTSPLowerTrans { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_lower_trans_get_type()) } + unsafe { from_glib(gst_rtsp_sys::gst_rtsp_lower_trans_get_type()) } } } @@ -102,13 +102,13 @@ impl<'a> FromValueOptional<'a> for RTSPLowerTrans { impl<'a> FromValue<'a> for RTSPLowerTrans { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for RTSPLowerTrans { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -133,16 +133,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for RTSPMethod { - type GlibType = ffi::GstRTSPMethod; + type GlibType = gst_rtsp_sys::GstRTSPMethod; - fn to_glib(&self) -> ffi::GstRTSPMethod { + fn to_glib(&self) -> gst_rtsp_sys::GstRTSPMethod { self.bits() } } #[doc(hidden)] -impl FromGlib for RTSPMethod { - fn from_glib(value: ffi::GstRTSPMethod) -> RTSPMethod { +impl FromGlib for RTSPMethod { + fn from_glib(value: gst_rtsp_sys::GstRTSPMethod) -> RTSPMethod { skip_assert_initialized!(); RTSPMethod::from_bits_truncate(value) } @@ -150,7 +150,7 @@ impl FromGlib for RTSPMethod { impl StaticType for RTSPMethod { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_method_get_type()) } + unsafe { from_glib(gst_rtsp_sys::gst_rtsp_method_get_type()) } } } @@ -162,13 +162,13 @@ impl<'a> FromValueOptional<'a> for RTSPMethod { impl<'a> FromValue<'a> for RTSPMethod { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for RTSPMethod { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -184,16 +184,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for RTSPProfile { - type GlibType = ffi::GstRTSPProfile; + type GlibType = gst_rtsp_sys::GstRTSPProfile; - fn to_glib(&self) -> ffi::GstRTSPProfile { + fn to_glib(&self) -> gst_rtsp_sys::GstRTSPProfile { self.bits() } } #[doc(hidden)] -impl FromGlib for RTSPProfile { - fn from_glib(value: ffi::GstRTSPProfile) -> RTSPProfile { +impl FromGlib for RTSPProfile { + fn from_glib(value: gst_rtsp_sys::GstRTSPProfile) -> RTSPProfile { skip_assert_initialized!(); RTSPProfile::from_bits_truncate(value) } @@ -201,7 +201,7 @@ impl FromGlib for RTSPProfile { impl StaticType for RTSPProfile { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_profile_get_type()) } + unsafe { from_glib(gst_rtsp_sys::gst_rtsp_profile_get_type()) } } } @@ -213,13 +213,13 @@ impl<'a> FromValueOptional<'a> for RTSPProfile { impl<'a> FromValue<'a> for RTSPProfile { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for RTSPProfile { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -233,16 +233,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for RTSPTransMode { - type GlibType = ffi::GstRTSPTransMode; + type GlibType = gst_rtsp_sys::GstRTSPTransMode; - fn to_glib(&self) -> ffi::GstRTSPTransMode { + fn to_glib(&self) -> gst_rtsp_sys::GstRTSPTransMode { self.bits() } } #[doc(hidden)] -impl FromGlib for RTSPTransMode { - fn from_glib(value: ffi::GstRTSPTransMode) -> RTSPTransMode { +impl FromGlib for RTSPTransMode { + fn from_glib(value: gst_rtsp_sys::GstRTSPTransMode) -> RTSPTransMode { skip_assert_initialized!(); RTSPTransMode::from_bits_truncate(value) } @@ -250,7 +250,7 @@ impl FromGlib for RTSPTransMode { impl StaticType for RTSPTransMode { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rtsp_trans_mode_get_type()) } + unsafe { from_glib(gst_rtsp_sys::gst_rtsp_trans_mode_get_type()) } } } @@ -262,13 +262,13 @@ impl<'a> FromValueOptional<'a> for RTSPTransMode { impl<'a> FromValue<'a> for RTSPTransMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for RTSPTransMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-rtsp/src/auto/rtsp_auth_param.rs b/gstreamer-rtsp/src/auto/rtsp_auth_param.rs index adda78782..867113f21 100644 --- a/gstreamer-rtsp/src/auto/rtsp_auth_param.rs +++ b/gstreamer-rtsp/src/auto/rtsp_auth_param.rs @@ -2,17 +2,17 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::translate::*; +use gst_rtsp_sys; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct RTSPAuthParam(Boxed); + pub struct RTSPAuthParam(Boxed); match fn { - copy => |ptr| ffi::gst_rtsp_auth_param_copy(mut_override(ptr)), - free => |ptr| ffi::gst_rtsp_auth_param_free(ptr), - get_type => || ffi::gst_rtsp_auth_param_get_type(), + copy => |ptr| gst_rtsp_sys::gst_rtsp_auth_param_copy(mut_override(ptr)), + free => |ptr| gst_rtsp_sys::gst_rtsp_auth_param_free(ptr), + get_type => || gst_rtsp_sys::gst_rtsp_auth_param_get_type(), } } diff --git a/gstreamer-rtsp/src/auto/rtsp_url.rs b/gstreamer-rtsp/src/auto/rtsp_url.rs index a067837ab..df2a4a884 100644 --- a/gstreamer-rtsp/src/auto/rtsp_url.rs +++ b/gstreamer-rtsp/src/auto/rtsp_url.rs @@ -3,38 +3,38 @@ // DO NOT EDIT use RTSPResult; -use ffi; use glib::GString; use glib::translate::*; +use gst_rtsp_sys; use std::ptr; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct RTSPUrl(Boxed); + pub struct RTSPUrl(Boxed); match fn { - copy => |ptr| ffi::gst_rtsp_url_copy(mut_override(ptr)), - free => |ptr| ffi::gst_rtsp_url_free(ptr), - get_type => || ffi::gst_rtsp_url_get_type(), + copy => |ptr| gst_rtsp_sys::gst_rtsp_url_copy(mut_override(ptr)), + free => |ptr| gst_rtsp_sys::gst_rtsp_url_free(ptr), + get_type => || gst_rtsp_sys::gst_rtsp_url_get_type(), } } impl RTSPUrl { pub fn decode_path_components(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_url_decode_path_components(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_rtsp_sys::gst_rtsp_url_decode_path_components(self.to_glib_none().0)) } } pub fn get_request_uri(&self) -> Option { unsafe { - from_glib_full(ffi::gst_rtsp_url_get_request_uri(self.to_glib_none().0)) + from_glib_full(gst_rtsp_sys::gst_rtsp_url_get_request_uri(self.to_glib_none().0)) } } pub fn set_port(&mut self, port: u16) -> RTSPResult { unsafe { - from_glib(ffi::gst_rtsp_url_set_port(self.to_glib_none_mut().0, port)) + from_glib(gst_rtsp_sys::gst_rtsp_url_set_port(self.to_glib_none_mut().0, port)) } } @@ -42,7 +42,7 @@ impl RTSPUrl { assert_initialized_main_thread!(); unsafe { let mut url = ptr::null_mut(); - let ret = from_glib(ffi::gst_rtsp_url_parse(urlstr.to_glib_none().0, &mut url)); + let ret = from_glib(gst_rtsp_sys::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 b9131200d..a9e0ccc5d 100644 --- a/gstreamer-rtsp/src/auto/versions.txt +++ b/gstreamer-rtsp/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-sdp/src/auto/versions.txt b/gstreamer-sdp/src/auto/versions.txt index b9131200d..a9e0ccc5d 100644 --- a/gstreamer-sdp/src/auto/versions.txt +++ b/gstreamer-sdp/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-video/src/auto/enums.rs b/gstreamer-video/src/auto/enums.rs index 502ddb0b3..150226679 100644 --- a/gstreamer-video/src/auto/enums.rs +++ b/gstreamer-video/src/auto/enums.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +9,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_video_sys; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] @@ -28,25 +28,25 @@ pub enum VideoColorMatrix { #[doc(hidden)] impl ToGlib for VideoColorMatrix { - type GlibType = ffi::GstVideoColorMatrix; + type GlibType = gst_video_sys::GstVideoColorMatrix; - fn to_glib(&self) -> ffi::GstVideoColorMatrix { + fn to_glib(&self) -> gst_video_sys::GstVideoColorMatrix { match *self { - VideoColorMatrix::Unknown => ffi::GST_VIDEO_COLOR_MATRIX_UNKNOWN, - VideoColorMatrix::Rgb => ffi::GST_VIDEO_COLOR_MATRIX_RGB, - VideoColorMatrix::Fcc => ffi::GST_VIDEO_COLOR_MATRIX_FCC, - VideoColorMatrix::Bt709 => ffi::GST_VIDEO_COLOR_MATRIX_BT709, - VideoColorMatrix::Bt601 => ffi::GST_VIDEO_COLOR_MATRIX_BT601, - VideoColorMatrix::Smpte240m => ffi::GST_VIDEO_COLOR_MATRIX_SMPTE240M, - VideoColorMatrix::Bt2020 => ffi::GST_VIDEO_COLOR_MATRIX_BT2020, + VideoColorMatrix::Unknown => gst_video_sys::GST_VIDEO_COLOR_MATRIX_UNKNOWN, + VideoColorMatrix::Rgb => gst_video_sys::GST_VIDEO_COLOR_MATRIX_RGB, + VideoColorMatrix::Fcc => gst_video_sys::GST_VIDEO_COLOR_MATRIX_FCC, + VideoColorMatrix::Bt709 => gst_video_sys::GST_VIDEO_COLOR_MATRIX_BT709, + VideoColorMatrix::Bt601 => gst_video_sys::GST_VIDEO_COLOR_MATRIX_BT601, + VideoColorMatrix::Smpte240m => gst_video_sys::GST_VIDEO_COLOR_MATRIX_SMPTE240M, + VideoColorMatrix::Bt2020 => gst_video_sys::GST_VIDEO_COLOR_MATRIX_BT2020, VideoColorMatrix::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for VideoColorMatrix { - fn from_glib(value: ffi::GstVideoColorMatrix) -> Self { +impl FromGlib for VideoColorMatrix { + fn from_glib(value: gst_video_sys::GstVideoColorMatrix) -> Self { skip_assert_initialized!(); match value { 0 => VideoColorMatrix::Unknown, @@ -63,7 +63,7 @@ impl FromGlib for VideoColorMatrix { impl StaticType for VideoColorMatrix { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_video_color_matrix_get_type()) } + unsafe { from_glib(gst_video_sys::gst_video_color_matrix_get_type()) } } } @@ -75,13 +75,13 @@ impl<'a> FromValueOptional<'a> for VideoColorMatrix { impl<'a> FromValue<'a> for VideoColorMatrix { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoColorMatrix { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -103,27 +103,27 @@ pub enum VideoColorPrimaries { #[doc(hidden)] impl ToGlib for VideoColorPrimaries { - type GlibType = ffi::GstVideoColorPrimaries; + type GlibType = gst_video_sys::GstVideoColorPrimaries; - fn to_glib(&self) -> ffi::GstVideoColorPrimaries { + fn to_glib(&self) -> gst_video_sys::GstVideoColorPrimaries { match *self { - VideoColorPrimaries::Unknown => ffi::GST_VIDEO_COLOR_PRIMARIES_UNKNOWN, - VideoColorPrimaries::Bt709 => ffi::GST_VIDEO_COLOR_PRIMARIES_BT709, - VideoColorPrimaries::Bt470m => ffi::GST_VIDEO_COLOR_PRIMARIES_BT470M, - VideoColorPrimaries::Bt470bg => ffi::GST_VIDEO_COLOR_PRIMARIES_BT470BG, - VideoColorPrimaries::Smpte170m => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTE170M, - VideoColorPrimaries::Smpte240m => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTE240M, - VideoColorPrimaries::Film => ffi::GST_VIDEO_COLOR_PRIMARIES_FILM, - VideoColorPrimaries::Bt2020 => ffi::GST_VIDEO_COLOR_PRIMARIES_BT2020, - VideoColorPrimaries::Adobergb => ffi::GST_VIDEO_COLOR_PRIMARIES_ADOBERGB, + VideoColorPrimaries::Unknown => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_UNKNOWN, + VideoColorPrimaries::Bt709 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_BT709, + VideoColorPrimaries::Bt470m => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_BT470M, + VideoColorPrimaries::Bt470bg => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_BT470BG, + VideoColorPrimaries::Smpte170m => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_SMPTE170M, + VideoColorPrimaries::Smpte240m => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_SMPTE240M, + VideoColorPrimaries::Film => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_FILM, + VideoColorPrimaries::Bt2020 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_BT2020, + VideoColorPrimaries::Adobergb => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_ADOBERGB, VideoColorPrimaries::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for VideoColorPrimaries { - fn from_glib(value: ffi::GstVideoColorPrimaries) -> Self { +impl FromGlib for VideoColorPrimaries { + fn from_glib(value: gst_video_sys::GstVideoColorPrimaries) -> Self { skip_assert_initialized!(); match value { 0 => VideoColorPrimaries::Unknown, @@ -142,7 +142,7 @@ impl FromGlib for VideoColorPrimaries { impl StaticType for VideoColorPrimaries { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_video_color_primaries_get_type()) } + unsafe { from_glib(gst_video_sys::gst_video_color_primaries_get_type()) } } } @@ -154,13 +154,13 @@ impl<'a> FromValueOptional<'a> for VideoColorPrimaries { impl<'a> FromValue<'a> for VideoColorPrimaries { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoColorPrimaries { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -178,13 +178,13 @@ pub enum VideoFieldOrder { #[cfg(any(feature = "v1_12", feature = "dox"))] #[doc(hidden)] impl ToGlib for VideoFieldOrder { - type GlibType = ffi::GstVideoFieldOrder; + type GlibType = gst_video_sys::GstVideoFieldOrder; - fn to_glib(&self) -> ffi::GstVideoFieldOrder { + fn to_glib(&self) -> gst_video_sys::GstVideoFieldOrder { match *self { - VideoFieldOrder::Unknown => ffi::GST_VIDEO_FIELD_ORDER_UNKNOWN, - VideoFieldOrder::TopFieldFirst => ffi::GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST, - VideoFieldOrder::BottomFieldFirst => ffi::GST_VIDEO_FIELD_ORDER_BOTTOM_FIELD_FIRST, + VideoFieldOrder::Unknown => gst_video_sys::GST_VIDEO_FIELD_ORDER_UNKNOWN, + VideoFieldOrder::TopFieldFirst => gst_video_sys::GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST, + VideoFieldOrder::BottomFieldFirst => gst_video_sys::GST_VIDEO_FIELD_ORDER_BOTTOM_FIELD_FIRST, VideoFieldOrder::__Unknown(value) => value } } @@ -192,8 +192,8 @@ impl ToGlib for VideoFieldOrder { #[cfg(any(feature = "v1_12", feature = "dox"))] #[doc(hidden)] -impl FromGlib for VideoFieldOrder { - fn from_glib(value: ffi::GstVideoFieldOrder) -> Self { +impl FromGlib for VideoFieldOrder { + fn from_glib(value: gst_video_sys::GstVideoFieldOrder) -> Self { skip_assert_initialized!(); match value { 0 => VideoFieldOrder::Unknown, @@ -207,7 +207,7 @@ impl FromGlib for VideoFieldOrder { #[cfg(any(feature = "v1_12", feature = "dox"))] impl StaticType for VideoFieldOrder { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_video_field_order_get_type()) } + unsafe { from_glib(gst_video_sys::gst_video_field_order_get_type()) } } } @@ -221,14 +221,14 @@ impl<'a> FromValueOptional<'a> for VideoFieldOrder { #[cfg(any(feature = "v1_12", feature = "dox"))] impl<'a> FromValue<'a> for VideoFieldOrder { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] impl SetValue for VideoFieldOrder { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -322,99 +322,99 @@ pub enum VideoFormat { #[doc(hidden)] impl ToGlib for VideoFormat { - type GlibType = ffi::GstVideoFormat; + type GlibType = gst_video_sys::GstVideoFormat; - fn to_glib(&self) -> ffi::GstVideoFormat { + fn to_glib(&self) -> gst_video_sys::GstVideoFormat { match *self { - VideoFormat::Unknown => ffi::GST_VIDEO_FORMAT_UNKNOWN, - VideoFormat::Encoded => ffi::GST_VIDEO_FORMAT_ENCODED, - VideoFormat::I420 => ffi::GST_VIDEO_FORMAT_I420, - VideoFormat::Yv12 => ffi::GST_VIDEO_FORMAT_YV12, - VideoFormat::Yuy2 => ffi::GST_VIDEO_FORMAT_YUY2, - VideoFormat::Uyvy => ffi::GST_VIDEO_FORMAT_UYVY, - VideoFormat::Ayuv => ffi::GST_VIDEO_FORMAT_AYUV, - VideoFormat::Rgbx => ffi::GST_VIDEO_FORMAT_RGBx, - VideoFormat::Bgrx => ffi::GST_VIDEO_FORMAT_BGRx, - VideoFormat::Xrgb => ffi::GST_VIDEO_FORMAT_xRGB, - VideoFormat::Xbgr => ffi::GST_VIDEO_FORMAT_xBGR, - VideoFormat::Rgba => ffi::GST_VIDEO_FORMAT_RGBA, - VideoFormat::Bgra => ffi::GST_VIDEO_FORMAT_BGRA, - VideoFormat::Argb => ffi::GST_VIDEO_FORMAT_ARGB, - VideoFormat::Abgr => ffi::GST_VIDEO_FORMAT_ABGR, - VideoFormat::Rgb => ffi::GST_VIDEO_FORMAT_RGB, - VideoFormat::Bgr => ffi::GST_VIDEO_FORMAT_BGR, - VideoFormat::Y41b => ffi::GST_VIDEO_FORMAT_Y41B, - VideoFormat::Y42b => ffi::GST_VIDEO_FORMAT_Y42B, - VideoFormat::Yvyu => ffi::GST_VIDEO_FORMAT_YVYU, - VideoFormat::Y444 => ffi::GST_VIDEO_FORMAT_Y444, - VideoFormat::V210 => ffi::GST_VIDEO_FORMAT_v210, - VideoFormat::V216 => ffi::GST_VIDEO_FORMAT_v216, - VideoFormat::Nv12 => ffi::GST_VIDEO_FORMAT_NV12, - VideoFormat::Nv21 => ffi::GST_VIDEO_FORMAT_NV21, - VideoFormat::Gray8 => ffi::GST_VIDEO_FORMAT_GRAY8, - VideoFormat::Gray16Be => ffi::GST_VIDEO_FORMAT_GRAY16_BE, - VideoFormat::Gray16Le => ffi::GST_VIDEO_FORMAT_GRAY16_LE, - VideoFormat::V308 => ffi::GST_VIDEO_FORMAT_v308, - VideoFormat::Rgb16 => ffi::GST_VIDEO_FORMAT_RGB16, - VideoFormat::Bgr16 => ffi::GST_VIDEO_FORMAT_BGR16, - VideoFormat::Rgb15 => ffi::GST_VIDEO_FORMAT_RGB15, - VideoFormat::Bgr15 => ffi::GST_VIDEO_FORMAT_BGR15, - VideoFormat::Uyvp => ffi::GST_VIDEO_FORMAT_UYVP, - VideoFormat::A420 => ffi::GST_VIDEO_FORMAT_A420, - VideoFormat::Rgb8p => ffi::GST_VIDEO_FORMAT_RGB8P, - VideoFormat::Yuv9 => ffi::GST_VIDEO_FORMAT_YUV9, - VideoFormat::Yvu9 => ffi::GST_VIDEO_FORMAT_YVU9, - VideoFormat::Iyu1 => ffi::GST_VIDEO_FORMAT_IYU1, - VideoFormat::Argb64 => ffi::GST_VIDEO_FORMAT_ARGB64, - VideoFormat::Ayuv64 => ffi::GST_VIDEO_FORMAT_AYUV64, - VideoFormat::R210 => ffi::GST_VIDEO_FORMAT_r210, - VideoFormat::I42010be => ffi::GST_VIDEO_FORMAT_I420_10BE, - VideoFormat::I42010le => ffi::GST_VIDEO_FORMAT_I420_10LE, - VideoFormat::I42210be => ffi::GST_VIDEO_FORMAT_I422_10BE, - VideoFormat::I42210le => ffi::GST_VIDEO_FORMAT_I422_10LE, - VideoFormat::Y44410be => ffi::GST_VIDEO_FORMAT_Y444_10BE, - VideoFormat::Y44410le => ffi::GST_VIDEO_FORMAT_Y444_10LE, - VideoFormat::Gbr => ffi::GST_VIDEO_FORMAT_GBR, - VideoFormat::Gbr10be => ffi::GST_VIDEO_FORMAT_GBR_10BE, - VideoFormat::Gbr10le => ffi::GST_VIDEO_FORMAT_GBR_10LE, - VideoFormat::Nv16 => ffi::GST_VIDEO_FORMAT_NV16, - VideoFormat::Nv24 => ffi::GST_VIDEO_FORMAT_NV24, - VideoFormat::Nv1264z32 => ffi::GST_VIDEO_FORMAT_NV12_64Z32, - VideoFormat::A42010be => ffi::GST_VIDEO_FORMAT_A420_10BE, - VideoFormat::A42010le => ffi::GST_VIDEO_FORMAT_A420_10LE, - VideoFormat::A42210be => ffi::GST_VIDEO_FORMAT_A422_10BE, - VideoFormat::A42210le => ffi::GST_VIDEO_FORMAT_A422_10LE, - VideoFormat::A44410be => ffi::GST_VIDEO_FORMAT_A444_10BE, - VideoFormat::A44410le => ffi::GST_VIDEO_FORMAT_A444_10LE, - VideoFormat::Nv61 => ffi::GST_VIDEO_FORMAT_NV61, - VideoFormat::P01010be => ffi::GST_VIDEO_FORMAT_P010_10BE, - VideoFormat::P01010le => ffi::GST_VIDEO_FORMAT_P010_10LE, - VideoFormat::Iyu2 => ffi::GST_VIDEO_FORMAT_IYU2, - VideoFormat::Vyuy => ffi::GST_VIDEO_FORMAT_VYUY, - VideoFormat::Gbra => ffi::GST_VIDEO_FORMAT_GBRA, - VideoFormat::Gbra10be => ffi::GST_VIDEO_FORMAT_GBRA_10BE, - VideoFormat::Gbra10le => ffi::GST_VIDEO_FORMAT_GBRA_10LE, - VideoFormat::Gbr12be => ffi::GST_VIDEO_FORMAT_GBR_12BE, - VideoFormat::Gbr12le => ffi::GST_VIDEO_FORMAT_GBR_12LE, - VideoFormat::Gbra12be => ffi::GST_VIDEO_FORMAT_GBRA_12BE, - VideoFormat::Gbra12le => ffi::GST_VIDEO_FORMAT_GBRA_12LE, - VideoFormat::I42012be => ffi::GST_VIDEO_FORMAT_I420_12BE, - VideoFormat::I42012le => ffi::GST_VIDEO_FORMAT_I420_12LE, - VideoFormat::I42212be => ffi::GST_VIDEO_FORMAT_I422_12BE, - VideoFormat::I42212le => ffi::GST_VIDEO_FORMAT_I422_12LE, - VideoFormat::Y44412be => ffi::GST_VIDEO_FORMAT_Y444_12BE, - VideoFormat::Y44412le => ffi::GST_VIDEO_FORMAT_Y444_12LE, - VideoFormat::Gray10Le32 => ffi::GST_VIDEO_FORMAT_GRAY10_LE32, - VideoFormat::Nv1210le32 => ffi::GST_VIDEO_FORMAT_NV12_10LE32, - VideoFormat::Nv1610le32 => ffi::GST_VIDEO_FORMAT_NV16_10LE32, + VideoFormat::Unknown => gst_video_sys::GST_VIDEO_FORMAT_UNKNOWN, + VideoFormat::Encoded => gst_video_sys::GST_VIDEO_FORMAT_ENCODED, + VideoFormat::I420 => gst_video_sys::GST_VIDEO_FORMAT_I420, + VideoFormat::Yv12 => gst_video_sys::GST_VIDEO_FORMAT_YV12, + VideoFormat::Yuy2 => gst_video_sys::GST_VIDEO_FORMAT_YUY2, + VideoFormat::Uyvy => gst_video_sys::GST_VIDEO_FORMAT_UYVY, + VideoFormat::Ayuv => gst_video_sys::GST_VIDEO_FORMAT_AYUV, + VideoFormat::Rgbx => gst_video_sys::GST_VIDEO_FORMAT_RGBx, + VideoFormat::Bgrx => gst_video_sys::GST_VIDEO_FORMAT_BGRx, + VideoFormat::Xrgb => gst_video_sys::GST_VIDEO_FORMAT_xRGB, + VideoFormat::Xbgr => gst_video_sys::GST_VIDEO_FORMAT_xBGR, + VideoFormat::Rgba => gst_video_sys::GST_VIDEO_FORMAT_RGBA, + VideoFormat::Bgra => gst_video_sys::GST_VIDEO_FORMAT_BGRA, + VideoFormat::Argb => gst_video_sys::GST_VIDEO_FORMAT_ARGB, + VideoFormat::Abgr => gst_video_sys::GST_VIDEO_FORMAT_ABGR, + VideoFormat::Rgb => gst_video_sys::GST_VIDEO_FORMAT_RGB, + VideoFormat::Bgr => gst_video_sys::GST_VIDEO_FORMAT_BGR, + VideoFormat::Y41b => gst_video_sys::GST_VIDEO_FORMAT_Y41B, + VideoFormat::Y42b => gst_video_sys::GST_VIDEO_FORMAT_Y42B, + VideoFormat::Yvyu => gst_video_sys::GST_VIDEO_FORMAT_YVYU, + VideoFormat::Y444 => gst_video_sys::GST_VIDEO_FORMAT_Y444, + VideoFormat::V210 => gst_video_sys::GST_VIDEO_FORMAT_v210, + VideoFormat::V216 => gst_video_sys::GST_VIDEO_FORMAT_v216, + VideoFormat::Nv12 => gst_video_sys::GST_VIDEO_FORMAT_NV12, + VideoFormat::Nv21 => gst_video_sys::GST_VIDEO_FORMAT_NV21, + VideoFormat::Gray8 => gst_video_sys::GST_VIDEO_FORMAT_GRAY8, + VideoFormat::Gray16Be => gst_video_sys::GST_VIDEO_FORMAT_GRAY16_BE, + VideoFormat::Gray16Le => gst_video_sys::GST_VIDEO_FORMAT_GRAY16_LE, + VideoFormat::V308 => gst_video_sys::GST_VIDEO_FORMAT_v308, + VideoFormat::Rgb16 => gst_video_sys::GST_VIDEO_FORMAT_RGB16, + VideoFormat::Bgr16 => gst_video_sys::GST_VIDEO_FORMAT_BGR16, + VideoFormat::Rgb15 => gst_video_sys::GST_VIDEO_FORMAT_RGB15, + VideoFormat::Bgr15 => gst_video_sys::GST_VIDEO_FORMAT_BGR15, + VideoFormat::Uyvp => gst_video_sys::GST_VIDEO_FORMAT_UYVP, + VideoFormat::A420 => gst_video_sys::GST_VIDEO_FORMAT_A420, + VideoFormat::Rgb8p => gst_video_sys::GST_VIDEO_FORMAT_RGB8P, + VideoFormat::Yuv9 => gst_video_sys::GST_VIDEO_FORMAT_YUV9, + VideoFormat::Yvu9 => gst_video_sys::GST_VIDEO_FORMAT_YVU9, + VideoFormat::Iyu1 => gst_video_sys::GST_VIDEO_FORMAT_IYU1, + VideoFormat::Argb64 => gst_video_sys::GST_VIDEO_FORMAT_ARGB64, + VideoFormat::Ayuv64 => gst_video_sys::GST_VIDEO_FORMAT_AYUV64, + VideoFormat::R210 => gst_video_sys::GST_VIDEO_FORMAT_r210, + VideoFormat::I42010be => gst_video_sys::GST_VIDEO_FORMAT_I420_10BE, + VideoFormat::I42010le => gst_video_sys::GST_VIDEO_FORMAT_I420_10LE, + VideoFormat::I42210be => gst_video_sys::GST_VIDEO_FORMAT_I422_10BE, + VideoFormat::I42210le => gst_video_sys::GST_VIDEO_FORMAT_I422_10LE, + VideoFormat::Y44410be => gst_video_sys::GST_VIDEO_FORMAT_Y444_10BE, + VideoFormat::Y44410le => gst_video_sys::GST_VIDEO_FORMAT_Y444_10LE, + VideoFormat::Gbr => gst_video_sys::GST_VIDEO_FORMAT_GBR, + VideoFormat::Gbr10be => gst_video_sys::GST_VIDEO_FORMAT_GBR_10BE, + VideoFormat::Gbr10le => gst_video_sys::GST_VIDEO_FORMAT_GBR_10LE, + VideoFormat::Nv16 => gst_video_sys::GST_VIDEO_FORMAT_NV16, + VideoFormat::Nv24 => gst_video_sys::GST_VIDEO_FORMAT_NV24, + VideoFormat::Nv1264z32 => gst_video_sys::GST_VIDEO_FORMAT_NV12_64Z32, + VideoFormat::A42010be => gst_video_sys::GST_VIDEO_FORMAT_A420_10BE, + VideoFormat::A42010le => gst_video_sys::GST_VIDEO_FORMAT_A420_10LE, + VideoFormat::A42210be => gst_video_sys::GST_VIDEO_FORMAT_A422_10BE, + VideoFormat::A42210le => gst_video_sys::GST_VIDEO_FORMAT_A422_10LE, + VideoFormat::A44410be => gst_video_sys::GST_VIDEO_FORMAT_A444_10BE, + VideoFormat::A44410le => gst_video_sys::GST_VIDEO_FORMAT_A444_10LE, + VideoFormat::Nv61 => gst_video_sys::GST_VIDEO_FORMAT_NV61, + VideoFormat::P01010be => gst_video_sys::GST_VIDEO_FORMAT_P010_10BE, + VideoFormat::P01010le => gst_video_sys::GST_VIDEO_FORMAT_P010_10LE, + VideoFormat::Iyu2 => gst_video_sys::GST_VIDEO_FORMAT_IYU2, + VideoFormat::Vyuy => gst_video_sys::GST_VIDEO_FORMAT_VYUY, + VideoFormat::Gbra => gst_video_sys::GST_VIDEO_FORMAT_GBRA, + VideoFormat::Gbra10be => gst_video_sys::GST_VIDEO_FORMAT_GBRA_10BE, + VideoFormat::Gbra10le => gst_video_sys::GST_VIDEO_FORMAT_GBRA_10LE, + VideoFormat::Gbr12be => gst_video_sys::GST_VIDEO_FORMAT_GBR_12BE, + VideoFormat::Gbr12le => gst_video_sys::GST_VIDEO_FORMAT_GBR_12LE, + VideoFormat::Gbra12be => gst_video_sys::GST_VIDEO_FORMAT_GBRA_12BE, + VideoFormat::Gbra12le => gst_video_sys::GST_VIDEO_FORMAT_GBRA_12LE, + VideoFormat::I42012be => gst_video_sys::GST_VIDEO_FORMAT_I420_12BE, + VideoFormat::I42012le => gst_video_sys::GST_VIDEO_FORMAT_I420_12LE, + VideoFormat::I42212be => gst_video_sys::GST_VIDEO_FORMAT_I422_12BE, + VideoFormat::I42212le => gst_video_sys::GST_VIDEO_FORMAT_I422_12LE, + VideoFormat::Y44412be => gst_video_sys::GST_VIDEO_FORMAT_Y444_12BE, + VideoFormat::Y44412le => gst_video_sys::GST_VIDEO_FORMAT_Y444_12LE, + VideoFormat::Gray10Le32 => gst_video_sys::GST_VIDEO_FORMAT_GRAY10_LE32, + VideoFormat::Nv1210le32 => gst_video_sys::GST_VIDEO_FORMAT_NV12_10LE32, + VideoFormat::Nv1610le32 => gst_video_sys::GST_VIDEO_FORMAT_NV16_10LE32, VideoFormat::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for VideoFormat { - fn from_glib(value: ffi::GstVideoFormat) -> Self { +impl FromGlib for VideoFormat { + fn from_glib(value: gst_video_sys::GstVideoFormat) -> Self { skip_assert_initialized!(); match value { 0 => VideoFormat::Unknown, @@ -505,7 +505,7 @@ impl FromGlib for VideoFormat { impl StaticType for VideoFormat { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_video_format_get_type()) } + unsafe { from_glib(gst_video_sys::gst_video_format_get_type()) } } } @@ -517,13 +517,13 @@ impl<'a> FromValueOptional<'a> for VideoFormat { impl<'a> FromValue<'a> for VideoFormat { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoFormat { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -540,22 +540,22 @@ pub enum VideoInterlaceMode { #[doc(hidden)] impl ToGlib for VideoInterlaceMode { - type GlibType = ffi::GstVideoInterlaceMode; + type GlibType = gst_video_sys::GstVideoInterlaceMode; - fn to_glib(&self) -> ffi::GstVideoInterlaceMode { + fn to_glib(&self) -> gst_video_sys::GstVideoInterlaceMode { match *self { - VideoInterlaceMode::Progressive => ffi::GST_VIDEO_INTERLACE_MODE_PROGRESSIVE, - VideoInterlaceMode::Interleaved => ffi::GST_VIDEO_INTERLACE_MODE_INTERLEAVED, - VideoInterlaceMode::Mixed => ffi::GST_VIDEO_INTERLACE_MODE_MIXED, - VideoInterlaceMode::Fields => ffi::GST_VIDEO_INTERLACE_MODE_FIELDS, + VideoInterlaceMode::Progressive => gst_video_sys::GST_VIDEO_INTERLACE_MODE_PROGRESSIVE, + VideoInterlaceMode::Interleaved => gst_video_sys::GST_VIDEO_INTERLACE_MODE_INTERLEAVED, + VideoInterlaceMode::Mixed => gst_video_sys::GST_VIDEO_INTERLACE_MODE_MIXED, + VideoInterlaceMode::Fields => gst_video_sys::GST_VIDEO_INTERLACE_MODE_FIELDS, VideoInterlaceMode::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for VideoInterlaceMode { - fn from_glib(value: ffi::GstVideoInterlaceMode) -> Self { +impl FromGlib for VideoInterlaceMode { + fn from_glib(value: gst_video_sys::GstVideoInterlaceMode) -> Self { skip_assert_initialized!(); match value { 0 => VideoInterlaceMode::Progressive, @@ -569,7 +569,7 @@ impl FromGlib for VideoInterlaceMode { impl StaticType for VideoInterlaceMode { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_video_interlace_mode_get_type()) } + unsafe { from_glib(gst_video_sys::gst_video_interlace_mode_get_type()) } } } @@ -581,13 +581,13 @@ impl<'a> FromValueOptional<'a> for VideoInterlaceMode { impl<'a> FromValue<'a> for VideoInterlaceMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoInterlaceMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -610,28 +610,28 @@ pub enum VideoMultiviewFramePacking { #[doc(hidden)] impl ToGlib for VideoMultiviewFramePacking { - type GlibType = ffi::GstVideoMultiviewFramePacking; + type GlibType = gst_video_sys::GstVideoMultiviewFramePacking; - fn to_glib(&self) -> ffi::GstVideoMultiviewFramePacking { + fn to_glib(&self) -> gst_video_sys::GstVideoMultiviewFramePacking { match *self { - VideoMultiviewFramePacking::None => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE, - VideoMultiviewFramePacking::Mono => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_MONO, - VideoMultiviewFramePacking::Left => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_LEFT, - VideoMultiviewFramePacking::Right => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT, - VideoMultiviewFramePacking::SideBySide => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE, - VideoMultiviewFramePacking::SideBySideQuincunx => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX, - VideoMultiviewFramePacking::ColumnInterleaved => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED, - VideoMultiviewFramePacking::RowInterleaved => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED, - VideoMultiviewFramePacking::TopBottom => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM, - VideoMultiviewFramePacking::Checkerboard => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_CHECKERBOARD, + VideoMultiviewFramePacking::None => gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE, + VideoMultiviewFramePacking::Mono => gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_MONO, + VideoMultiviewFramePacking::Left => gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_LEFT, + VideoMultiviewFramePacking::Right => gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT, + VideoMultiviewFramePacking::SideBySide => gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE, + VideoMultiviewFramePacking::SideBySideQuincunx => gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX, + VideoMultiviewFramePacking::ColumnInterleaved => gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED, + VideoMultiviewFramePacking::RowInterleaved => gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED, + VideoMultiviewFramePacking::TopBottom => gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM, + VideoMultiviewFramePacking::Checkerboard => gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_CHECKERBOARD, VideoMultiviewFramePacking::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for VideoMultiviewFramePacking { - fn from_glib(value: ffi::GstVideoMultiviewFramePacking) -> Self { +impl FromGlib for VideoMultiviewFramePacking { + fn from_glib(value: gst_video_sys::GstVideoMultiviewFramePacking) -> Self { skip_assert_initialized!(); match value { -1 => VideoMultiviewFramePacking::None, @@ -651,7 +651,7 @@ impl FromGlib for VideoMultiviewFramePacking impl StaticType for VideoMultiviewFramePacking { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_video_multiview_frame_packing_get_type()) } + unsafe { from_glib(gst_video_sys::gst_video_multiview_frame_packing_get_type()) } } } @@ -663,13 +663,13 @@ impl<'a> FromValueOptional<'a> for VideoMultiviewFramePacking { impl<'a> FromValue<'a> for VideoMultiviewFramePacking { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoMultiviewFramePacking { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -695,31 +695,31 @@ pub enum VideoMultiviewMode { #[doc(hidden)] impl ToGlib for VideoMultiviewMode { - type GlibType = ffi::GstVideoMultiviewMode; + type GlibType = gst_video_sys::GstVideoMultiviewMode; - fn to_glib(&self) -> ffi::GstVideoMultiviewMode { + fn to_glib(&self) -> gst_video_sys::GstVideoMultiviewMode { match *self { - VideoMultiviewMode::None => ffi::GST_VIDEO_MULTIVIEW_MODE_NONE, - VideoMultiviewMode::Mono => ffi::GST_VIDEO_MULTIVIEW_MODE_MONO, - VideoMultiviewMode::Left => ffi::GST_VIDEO_MULTIVIEW_MODE_LEFT, - VideoMultiviewMode::Right => ffi::GST_VIDEO_MULTIVIEW_MODE_RIGHT, - VideoMultiviewMode::SideBySide => ffi::GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE, - VideoMultiviewMode::SideBySideQuincunx => ffi::GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX, - VideoMultiviewMode::ColumnInterleaved => ffi::GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED, - VideoMultiviewMode::RowInterleaved => ffi::GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED, - VideoMultiviewMode::TopBottom => ffi::GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM, - VideoMultiviewMode::Checkerboard => ffi::GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD, - VideoMultiviewMode::FrameByFrame => ffi::GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME, - VideoMultiviewMode::MultiviewFrameByFrame => ffi::GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME, - VideoMultiviewMode::Separated => ffi::GST_VIDEO_MULTIVIEW_MODE_SEPARATED, + VideoMultiviewMode::None => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_NONE, + VideoMultiviewMode::Mono => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_MONO, + VideoMultiviewMode::Left => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_LEFT, + VideoMultiviewMode::Right => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_RIGHT, + VideoMultiviewMode::SideBySide => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE, + VideoMultiviewMode::SideBySideQuincunx => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX, + VideoMultiviewMode::ColumnInterleaved => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED, + VideoMultiviewMode::RowInterleaved => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED, + VideoMultiviewMode::TopBottom => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM, + VideoMultiviewMode::Checkerboard => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD, + VideoMultiviewMode::FrameByFrame => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME, + VideoMultiviewMode::MultiviewFrameByFrame => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME, + VideoMultiviewMode::Separated => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_SEPARATED, VideoMultiviewMode::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for VideoMultiviewMode { - fn from_glib(value: ffi::GstVideoMultiviewMode) -> Self { +impl FromGlib for VideoMultiviewMode { + fn from_glib(value: gst_video_sys::GstVideoMultiviewMode) -> Self { skip_assert_initialized!(); match value { -1 => VideoMultiviewMode::None, @@ -742,7 +742,7 @@ impl FromGlib for VideoMultiviewMode { impl StaticType for VideoMultiviewMode { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_video_multiview_mode_get_type()) } + unsafe { from_glib(gst_video_sys::gst_video_multiview_mode_get_type()) } } } @@ -754,13 +754,13 @@ impl<'a> FromValueOptional<'a> for VideoMultiviewMode { impl<'a> FromValue<'a> for VideoMultiviewMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoMultiviewMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -775,20 +775,20 @@ pub enum VideoTileMode { #[doc(hidden)] impl ToGlib for VideoTileMode { - type GlibType = ffi::GstVideoTileMode; + type GlibType = gst_video_sys::GstVideoTileMode; - fn to_glib(&self) -> ffi::GstVideoTileMode { + fn to_glib(&self) -> gst_video_sys::GstVideoTileMode { match *self { - VideoTileMode::Unknown => ffi::GST_VIDEO_TILE_MODE_UNKNOWN, - VideoTileMode::Zflipz2x2 => ffi::GST_VIDEO_TILE_MODE_ZFLIPZ_2X2, + VideoTileMode::Unknown => gst_video_sys::GST_VIDEO_TILE_MODE_UNKNOWN, + VideoTileMode::Zflipz2x2 => gst_video_sys::GST_VIDEO_TILE_MODE_ZFLIPZ_2X2, VideoTileMode::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for VideoTileMode { - fn from_glib(value: ffi::GstVideoTileMode) -> Self { +impl FromGlib for VideoTileMode { + fn from_glib(value: gst_video_sys::GstVideoTileMode) -> Self { skip_assert_initialized!(); match value { 0 => VideoTileMode::Unknown, @@ -800,7 +800,7 @@ impl FromGlib for VideoTileMode { impl StaticType for VideoTileMode { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_video_tile_mode_get_type()) } + unsafe { from_glib(gst_video_sys::gst_video_tile_mode_get_type()) } } } @@ -812,13 +812,13 @@ impl<'a> FromValueOptional<'a> for VideoTileMode { impl<'a> FromValue<'a> for VideoTileMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoTileMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -844,31 +844,31 @@ pub enum VideoTransferFunction { #[doc(hidden)] impl ToGlib for VideoTransferFunction { - type GlibType = ffi::GstVideoTransferFunction; + type GlibType = gst_video_sys::GstVideoTransferFunction; - fn to_glib(&self) -> ffi::GstVideoTransferFunction { + fn to_glib(&self) -> gst_video_sys::GstVideoTransferFunction { match *self { - VideoTransferFunction::Unknown => ffi::GST_VIDEO_TRANSFER_UNKNOWN, - VideoTransferFunction::Gamma10 => ffi::GST_VIDEO_TRANSFER_GAMMA10, - VideoTransferFunction::Gamma18 => ffi::GST_VIDEO_TRANSFER_GAMMA18, - VideoTransferFunction::Gamma20 => ffi::GST_VIDEO_TRANSFER_GAMMA20, - VideoTransferFunction::Gamma22 => ffi::GST_VIDEO_TRANSFER_GAMMA22, - VideoTransferFunction::Bt709 => ffi::GST_VIDEO_TRANSFER_BT709, - VideoTransferFunction::Smpte240m => ffi::GST_VIDEO_TRANSFER_SMPTE240M, - VideoTransferFunction::Srgb => ffi::GST_VIDEO_TRANSFER_SRGB, - VideoTransferFunction::Gamma28 => ffi::GST_VIDEO_TRANSFER_GAMMA28, - VideoTransferFunction::Log100 => ffi::GST_VIDEO_TRANSFER_LOG100, - VideoTransferFunction::Log316 => ffi::GST_VIDEO_TRANSFER_LOG316, - VideoTransferFunction::Bt202012 => ffi::GST_VIDEO_TRANSFER_BT2020_12, - VideoTransferFunction::Adobergb => ffi::GST_VIDEO_TRANSFER_ADOBERGB, + VideoTransferFunction::Unknown => gst_video_sys::GST_VIDEO_TRANSFER_UNKNOWN, + VideoTransferFunction::Gamma10 => gst_video_sys::GST_VIDEO_TRANSFER_GAMMA10, + VideoTransferFunction::Gamma18 => gst_video_sys::GST_VIDEO_TRANSFER_GAMMA18, + VideoTransferFunction::Gamma20 => gst_video_sys::GST_VIDEO_TRANSFER_GAMMA20, + VideoTransferFunction::Gamma22 => gst_video_sys::GST_VIDEO_TRANSFER_GAMMA22, + VideoTransferFunction::Bt709 => gst_video_sys::GST_VIDEO_TRANSFER_BT709, + VideoTransferFunction::Smpte240m => gst_video_sys::GST_VIDEO_TRANSFER_SMPTE240M, + VideoTransferFunction::Srgb => gst_video_sys::GST_VIDEO_TRANSFER_SRGB, + VideoTransferFunction::Gamma28 => gst_video_sys::GST_VIDEO_TRANSFER_GAMMA28, + VideoTransferFunction::Log100 => gst_video_sys::GST_VIDEO_TRANSFER_LOG100, + VideoTransferFunction::Log316 => gst_video_sys::GST_VIDEO_TRANSFER_LOG316, + VideoTransferFunction::Bt202012 => gst_video_sys::GST_VIDEO_TRANSFER_BT2020_12, + VideoTransferFunction::Adobergb => gst_video_sys::GST_VIDEO_TRANSFER_ADOBERGB, VideoTransferFunction::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for VideoTransferFunction { - fn from_glib(value: ffi::GstVideoTransferFunction) -> Self { +impl FromGlib for VideoTransferFunction { + fn from_glib(value: gst_video_sys::GstVideoTransferFunction) -> Self { skip_assert_initialized!(); match value { 0 => VideoTransferFunction::Unknown, @@ -891,7 +891,7 @@ impl FromGlib for VideoTransferFunction { impl StaticType for VideoTransferFunction { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_video_transfer_function_get_type()) } + unsafe { from_glib(gst_video_sys::gst_video_transfer_function_get_type()) } } } @@ -903,13 +903,13 @@ impl<'a> FromValueOptional<'a> for VideoTransferFunction { impl<'a> FromValue<'a> for VideoTransferFunction { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoTransferFunction { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-video/src/auto/flags.rs b/gstreamer-video/src/auto/flags.rs index 31dd9f5ca..cc92e30ad 100644 --- a/gstreamer-video/src/auto/flags.rs +++ b/gstreamer-video/src/auto/flags.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +9,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_video_sys; bitflags! { pub struct VideoChromaSite: u32 { @@ -28,16 +28,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for VideoChromaSite { - type GlibType = ffi::GstVideoChromaSite; + type GlibType = gst_video_sys::GstVideoChromaSite; - fn to_glib(&self) -> ffi::GstVideoChromaSite { + fn to_glib(&self) -> gst_video_sys::GstVideoChromaSite { self.bits() } } #[doc(hidden)] -impl FromGlib for VideoChromaSite { - fn from_glib(value: ffi::GstVideoChromaSite) -> VideoChromaSite { +impl FromGlib for VideoChromaSite { + fn from_glib(value: gst_video_sys::GstVideoChromaSite) -> VideoChromaSite { skip_assert_initialized!(); VideoChromaSite::from_bits_truncate(value) } @@ -45,7 +45,7 @@ impl FromGlib for VideoChromaSite { impl StaticType for VideoChromaSite { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_video_chroma_site_get_type()) } + unsafe { from_glib(gst_video_sys::gst_video_chroma_site_get_type()) } } } @@ -57,13 +57,13 @@ impl<'a> FromValueOptional<'a> for VideoChromaSite { impl<'a> FromValue<'a> for VideoChromaSite { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for VideoChromaSite { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -77,16 +77,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for VideoFlags { - type GlibType = ffi::GstVideoFlags; + type GlibType = gst_video_sys::GstVideoFlags; - fn to_glib(&self) -> ffi::GstVideoFlags { + fn to_glib(&self) -> gst_video_sys::GstVideoFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for VideoFlags { - fn from_glib(value: ffi::GstVideoFlags) -> VideoFlags { +impl FromGlib for VideoFlags { + fn from_glib(value: gst_video_sys::GstVideoFlags) -> VideoFlags { skip_assert_initialized!(); VideoFlags::from_bits_truncate(value) } @@ -94,7 +94,7 @@ impl FromGlib for VideoFlags { impl StaticType for VideoFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_video_flags_get_type()) } + unsafe { from_glib(gst_video_sys::gst_video_flags_get_type()) } } } @@ -106,13 +106,13 @@ impl<'a> FromValueOptional<'a> for VideoFlags { impl<'a> FromValue<'a> for VideoFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for VideoFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -132,16 +132,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for VideoFormatFlags { - type GlibType = ffi::GstVideoFormatFlags; + type GlibType = gst_video_sys::GstVideoFormatFlags; - fn to_glib(&self) -> ffi::GstVideoFormatFlags { + fn to_glib(&self) -> gst_video_sys::GstVideoFormatFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for VideoFormatFlags { - fn from_glib(value: ffi::GstVideoFormatFlags) -> VideoFormatFlags { +impl FromGlib for VideoFormatFlags { + fn from_glib(value: gst_video_sys::GstVideoFormatFlags) -> VideoFormatFlags { skip_assert_initialized!(); VideoFormatFlags::from_bits_truncate(value) } @@ -149,7 +149,7 @@ impl FromGlib for VideoFormatFlags { impl StaticType for VideoFormatFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_video_format_flags_get_type()) } + unsafe { from_glib(gst_video_sys::gst_video_format_flags_get_type()) } } } @@ -161,13 +161,13 @@ impl<'a> FromValueOptional<'a> for VideoFormatFlags { impl<'a> FromValue<'a> for VideoFormatFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for VideoFormatFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -185,16 +185,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for VideoFrameFlags { - type GlibType = ffi::GstVideoFrameFlags; + type GlibType = gst_video_sys::GstVideoFrameFlags; - fn to_glib(&self) -> ffi::GstVideoFrameFlags { + fn to_glib(&self) -> gst_video_sys::GstVideoFrameFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for VideoFrameFlags { - fn from_glib(value: ffi::GstVideoFrameFlags) -> VideoFrameFlags { +impl FromGlib for VideoFrameFlags { + fn from_glib(value: gst_video_sys::GstVideoFrameFlags) -> VideoFrameFlags { skip_assert_initialized!(); VideoFrameFlags::from_bits_truncate(value) } @@ -202,7 +202,7 @@ impl FromGlib for VideoFrameFlags { impl StaticType for VideoFrameFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_video_frame_flags_get_type()) } + unsafe { from_glib(gst_video_sys::gst_video_frame_flags_get_type()) } } } @@ -214,13 +214,13 @@ impl<'a> FromValueOptional<'a> for VideoFrameFlags { impl<'a> FromValue<'a> for VideoFrameFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for VideoFrameFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -239,16 +239,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for VideoMultiviewFlags { - type GlibType = ffi::GstVideoMultiviewFlags; + type GlibType = gst_video_sys::GstVideoMultiviewFlags; - fn to_glib(&self) -> ffi::GstVideoMultiviewFlags { + fn to_glib(&self) -> gst_video_sys::GstVideoMultiviewFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for VideoMultiviewFlags { - fn from_glib(value: ffi::GstVideoMultiviewFlags) -> VideoMultiviewFlags { +impl FromGlib for VideoMultiviewFlags { + fn from_glib(value: gst_video_sys::GstVideoMultiviewFlags) -> VideoMultiviewFlags { skip_assert_initialized!(); VideoMultiviewFlags::from_bits_truncate(value) } @@ -256,7 +256,7 @@ impl FromGlib for VideoMultiviewFlags { impl StaticType for VideoMultiviewFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_video_multiview_flags_get_type()) } + unsafe { from_glib(gst_video_sys::gst_video_multiview_flags_get_type()) } } } @@ -268,13 +268,13 @@ impl<'a> FromValueOptional<'a> for VideoMultiviewFlags { impl<'a> FromValue<'a> for VideoMultiviewFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for VideoMultiviewFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -288,16 +288,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for VideoOverlayFormatFlags { - type GlibType = ffi::GstVideoOverlayFormatFlags; + type GlibType = gst_video_sys::GstVideoOverlayFormatFlags; - fn to_glib(&self) -> ffi::GstVideoOverlayFormatFlags { + fn to_glib(&self) -> gst_video_sys::GstVideoOverlayFormatFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for VideoOverlayFormatFlags { - fn from_glib(value: ffi::GstVideoOverlayFormatFlags) -> VideoOverlayFormatFlags { +impl FromGlib for VideoOverlayFormatFlags { + fn from_glib(value: gst_video_sys::GstVideoOverlayFormatFlags) -> VideoOverlayFormatFlags { skip_assert_initialized!(); VideoOverlayFormatFlags::from_bits_truncate(value) } @@ -315,17 +315,17 @@ bitflags! { #[cfg(any(feature = "v1_10", feature = "dox"))] #[doc(hidden)] impl ToGlib for VideoTimeCodeFlags { - type GlibType = ffi::GstVideoTimeCodeFlags; + type GlibType = gst_video_sys::GstVideoTimeCodeFlags; - fn to_glib(&self) -> ffi::GstVideoTimeCodeFlags { + fn to_glib(&self) -> gst_video_sys::GstVideoTimeCodeFlags { self.bits() } } #[cfg(any(feature = "v1_10", feature = "dox"))] #[doc(hidden)] -impl FromGlib for VideoTimeCodeFlags { - fn from_glib(value: ffi::GstVideoTimeCodeFlags) -> VideoTimeCodeFlags { +impl FromGlib for VideoTimeCodeFlags { + fn from_glib(value: gst_video_sys::GstVideoTimeCodeFlags) -> VideoTimeCodeFlags { skip_assert_initialized!(); VideoTimeCodeFlags::from_bits_truncate(value) } diff --git a/gstreamer-video/src/auto/versions.txt b/gstreamer-video/src/auto/versions.txt index b9131200d..a9e0ccc5d 100644 --- a/gstreamer-video/src/auto/versions.txt +++ b/gstreamer-video/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-video/src/auto/video_filter.rs b/gstreamer-video/src/auto/video_filter.rs index 686472c1f..fc595a85e 100644 --- a/gstreamer-video/src/auto/video_filter.rs +++ b/gstreamer-video/src/auto/video_filter.rs @@ -2,16 +2,16 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::translate::*; use gst; use gst_base; +use gst_video_sys; glib_wrapper! { - pub struct VideoFilter(Object) @extends gst_base::BaseTransform, gst::Element, gst::Object; + pub struct VideoFilter(Object) @extends gst_base::BaseTransform, gst::Element, gst::Object; match fn { - get_type => || ffi::gst_video_filter_get_type(), + get_type => || gst_video_sys::gst_video_filter_get_type(), } } diff --git a/gstreamer-video/src/auto/video_overlay.rs b/gstreamer-video/src/auto/video_overlay.rs index 2ab6826bc..0feb3c7a8 100644 --- a/gstreamer-video/src/auto/video_overlay.rs +++ b/gstreamer-video/src/auto/video_overlay.rs @@ -2,26 +2,26 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib; use glib::object::IsA; use glib::translate::*; +use gst_video_sys; glib_wrapper! { - pub struct VideoOverlay(Interface); + pub struct VideoOverlay(Interface); match fn { - get_type => || ffi::gst_video_overlay_get_type(), + get_type => || gst_video_sys::gst_video_overlay_get_type(), } } impl VideoOverlay { //pub fn install_properties(oclass: /*Ignored*/&mut glib::ObjectClass, last_prop_id: i32) { - // unsafe { TODO: call ffi::gst_video_overlay_install_properties() } + // unsafe { TODO: call gst_video_sys:gst_video_overlay_install_properties() } //} //pub fn set_property>(object: &P, last_prop_id: i32, property_id: u32, value: /*Ignored*/&glib::Value) -> bool { - // unsafe { TODO: call ffi::gst_video_overlay_set_property() } + // unsafe { TODO: call gst_video_sys:gst_video_overlay_set_property() } //} } @@ -47,33 +47,33 @@ pub trait VideoOverlayExt: 'static { impl> VideoOverlayExt for O { fn expose(&self) { unsafe { - ffi::gst_video_overlay_expose(self.as_ref().to_glib_none().0); + gst_video_sys::gst_video_overlay_expose(self.as_ref().to_glib_none().0); } } //fn got_window_handle(&self, handle: /*Unimplemented*/Fundamental: UIntPtr) { - // unsafe { TODO: call ffi::gst_video_overlay_got_window_handle() } + // unsafe { TODO: call gst_video_sys:gst_video_overlay_got_window_handle() } //} fn handle_events(&self, handle_events: bool) { unsafe { - ffi::gst_video_overlay_handle_events(self.as_ref().to_glib_none().0, handle_events.to_glib()); + gst_video_sys::gst_video_overlay_handle_events(self.as_ref().to_glib_none().0, handle_events.to_glib()); } } fn prepare_window_handle(&self) { unsafe { - ffi::gst_video_overlay_prepare_window_handle(self.as_ref().to_glib_none().0); + gst_video_sys::gst_video_overlay_prepare_window_handle(self.as_ref().to_glib_none().0); } } fn set_render_rectangle(&self, x: i32, y: i32, width: i32, height: i32) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_video_overlay_set_render_rectangle(self.as_ref().to_glib_none().0, x, y, width, height), "Failed to set render rectangle") + glib_result_from_gboolean!(gst_video_sys::gst_video_overlay_set_render_rectangle(self.as_ref().to_glib_none().0, x, y, width, height), "Failed to set render rectangle") } } //fn set_window_handle(&self, handle: /*Unimplemented*/Fundamental: UIntPtr) { - // unsafe { TODO: call ffi::gst_video_overlay_set_window_handle() } + // unsafe { TODO: call gst_video_sys:gst_video_overlay_set_window_handle() } //} } diff --git a/gstreamer-webrtc/src/auto/enums.rs b/gstreamer-webrtc/src/auto/enums.rs index a722ea24f..0176a8788 100644 --- a/gstreamer-webrtc/src/auto/enums.rs +++ b/gstreamer-webrtc/src/auto/enums.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +9,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_web_rtc_sys; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] @@ -25,22 +25,22 @@ pub enum WebRTCDTLSSetup { #[doc(hidden)] impl ToGlib for WebRTCDTLSSetup { - type GlibType = ffi::GstWebRTCDTLSSetup; + type GlibType = gst_web_rtc_sys::GstWebRTCDTLSSetup; - fn to_glib(&self) -> ffi::GstWebRTCDTLSSetup { + fn to_glib(&self) -> gst_web_rtc_sys::GstWebRTCDTLSSetup { match *self { - WebRTCDTLSSetup::None => ffi::GST_WEBRTC_DTLS_SETUP_NONE, - WebRTCDTLSSetup::Actpass => ffi::GST_WEBRTC_DTLS_SETUP_ACTPASS, - WebRTCDTLSSetup::Active => ffi::GST_WEBRTC_DTLS_SETUP_ACTIVE, - WebRTCDTLSSetup::Passive => ffi::GST_WEBRTC_DTLS_SETUP_PASSIVE, + WebRTCDTLSSetup::None => gst_web_rtc_sys::GST_WEBRTC_DTLS_SETUP_NONE, + WebRTCDTLSSetup::Actpass => gst_web_rtc_sys::GST_WEBRTC_DTLS_SETUP_ACTPASS, + WebRTCDTLSSetup::Active => gst_web_rtc_sys::GST_WEBRTC_DTLS_SETUP_ACTIVE, + WebRTCDTLSSetup::Passive => gst_web_rtc_sys::GST_WEBRTC_DTLS_SETUP_PASSIVE, WebRTCDTLSSetup::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for WebRTCDTLSSetup { - fn from_glib(value: ffi::GstWebRTCDTLSSetup) -> Self { +impl FromGlib for WebRTCDTLSSetup { + fn from_glib(value: gst_web_rtc_sys::GstWebRTCDTLSSetup) -> Self { skip_assert_initialized!(); match value { 0 => WebRTCDTLSSetup::None, @@ -54,7 +54,7 @@ impl FromGlib for WebRTCDTLSSetup { impl StaticType for WebRTCDTLSSetup { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_webrtc_dtls_setup_get_type()) } + unsafe { from_glib(gst_web_rtc_sys::gst_webrtc_dtls_setup_get_type()) } } } @@ -66,13 +66,13 @@ impl<'a> FromValueOptional<'a> for WebRTCDTLSSetup { impl<'a> FromValue<'a> for WebRTCDTLSSetup { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for WebRTCDTLSSetup { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -90,23 +90,23 @@ pub enum WebRTCDTLSTransportState { #[doc(hidden)] impl ToGlib for WebRTCDTLSTransportState { - type GlibType = ffi::GstWebRTCDTLSTransportState; + type GlibType = gst_web_rtc_sys::GstWebRTCDTLSTransportState; - fn to_glib(&self) -> ffi::GstWebRTCDTLSTransportState { + fn to_glib(&self) -> gst_web_rtc_sys::GstWebRTCDTLSTransportState { match *self { - WebRTCDTLSTransportState::New => ffi::GST_WEBRTC_DTLS_TRANSPORT_STATE_NEW, - WebRTCDTLSTransportState::Closed => ffi::GST_WEBRTC_DTLS_TRANSPORT_STATE_CLOSED, - WebRTCDTLSTransportState::Failed => ffi::GST_WEBRTC_DTLS_TRANSPORT_STATE_FAILED, - WebRTCDTLSTransportState::Connecting => ffi::GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTING, - WebRTCDTLSTransportState::Connected => ffi::GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTED, + WebRTCDTLSTransportState::New => gst_web_rtc_sys::GST_WEBRTC_DTLS_TRANSPORT_STATE_NEW, + WebRTCDTLSTransportState::Closed => gst_web_rtc_sys::GST_WEBRTC_DTLS_TRANSPORT_STATE_CLOSED, + WebRTCDTLSTransportState::Failed => gst_web_rtc_sys::GST_WEBRTC_DTLS_TRANSPORT_STATE_FAILED, + WebRTCDTLSTransportState::Connecting => gst_web_rtc_sys::GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTING, + WebRTCDTLSTransportState::Connected => gst_web_rtc_sys::GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTED, WebRTCDTLSTransportState::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for WebRTCDTLSTransportState { - fn from_glib(value: ffi::GstWebRTCDTLSTransportState) -> Self { +impl FromGlib for WebRTCDTLSTransportState { + fn from_glib(value: gst_web_rtc_sys::GstWebRTCDTLSTransportState) -> Self { skip_assert_initialized!(); match value { 0 => WebRTCDTLSTransportState::New, @@ -121,7 +121,7 @@ impl FromGlib for WebRTCDTLSTransportState { impl StaticType for WebRTCDTLSTransportState { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_webrtc_dtls_transport_state_get_type()) } + unsafe { from_glib(gst_web_rtc_sys::gst_webrtc_dtls_transport_state_get_type()) } } } @@ -133,13 +133,13 @@ impl<'a> FromValueOptional<'a> for WebRTCDTLSTransportState { impl<'a> FromValue<'a> for WebRTCDTLSTransportState { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for WebRTCDTLSTransportState { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -154,20 +154,20 @@ pub enum WebRTCICEComponent { #[doc(hidden)] impl ToGlib for WebRTCICEComponent { - type GlibType = ffi::GstWebRTCICEComponent; + type GlibType = gst_web_rtc_sys::GstWebRTCICEComponent; - fn to_glib(&self) -> ffi::GstWebRTCICEComponent { + fn to_glib(&self) -> gst_web_rtc_sys::GstWebRTCICEComponent { match *self { - WebRTCICEComponent::Rtp => ffi::GST_WEBRTC_ICE_COMPONENT_RTP, - WebRTCICEComponent::Rtcp => ffi::GST_WEBRTC_ICE_COMPONENT_RTCP, + WebRTCICEComponent::Rtp => gst_web_rtc_sys::GST_WEBRTC_ICE_COMPONENT_RTP, + WebRTCICEComponent::Rtcp => gst_web_rtc_sys::GST_WEBRTC_ICE_COMPONENT_RTCP, WebRTCICEComponent::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for WebRTCICEComponent { - fn from_glib(value: ffi::GstWebRTCICEComponent) -> Self { +impl FromGlib for WebRTCICEComponent { + fn from_glib(value: gst_web_rtc_sys::GstWebRTCICEComponent) -> Self { skip_assert_initialized!(); match value { 0 => WebRTCICEComponent::Rtp, @@ -179,7 +179,7 @@ impl FromGlib for WebRTCICEComponent { impl StaticType for WebRTCICEComponent { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_webrtc_ice_component_get_type()) } + unsafe { from_glib(gst_web_rtc_sys::gst_webrtc_ice_component_get_type()) } } } @@ -191,13 +191,13 @@ impl<'a> FromValueOptional<'a> for WebRTCICEComponent { impl<'a> FromValue<'a> for WebRTCICEComponent { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for WebRTCICEComponent { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -217,25 +217,25 @@ pub enum WebRTCICEConnectionState { #[doc(hidden)] impl ToGlib for WebRTCICEConnectionState { - type GlibType = ffi::GstWebRTCICEConnectionState; + type GlibType = gst_web_rtc_sys::GstWebRTCICEConnectionState; - fn to_glib(&self) -> ffi::GstWebRTCICEConnectionState { + fn to_glib(&self) -> gst_web_rtc_sys::GstWebRTCICEConnectionState { match *self { - WebRTCICEConnectionState::New => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_NEW, - WebRTCICEConnectionState::Checking => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING, - WebRTCICEConnectionState::Connected => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED, - WebRTCICEConnectionState::Completed => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED, - WebRTCICEConnectionState::Failed => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_FAILED, - WebRTCICEConnectionState::Disconnected => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED, - WebRTCICEConnectionState::Closed => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED, + WebRTCICEConnectionState::New => gst_web_rtc_sys::GST_WEBRTC_ICE_CONNECTION_STATE_NEW, + WebRTCICEConnectionState::Checking => gst_web_rtc_sys::GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING, + WebRTCICEConnectionState::Connected => gst_web_rtc_sys::GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED, + WebRTCICEConnectionState::Completed => gst_web_rtc_sys::GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED, + WebRTCICEConnectionState::Failed => gst_web_rtc_sys::GST_WEBRTC_ICE_CONNECTION_STATE_FAILED, + WebRTCICEConnectionState::Disconnected => gst_web_rtc_sys::GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED, + WebRTCICEConnectionState::Closed => gst_web_rtc_sys::GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED, WebRTCICEConnectionState::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for WebRTCICEConnectionState { - fn from_glib(value: ffi::GstWebRTCICEConnectionState) -> Self { +impl FromGlib for WebRTCICEConnectionState { + fn from_glib(value: gst_web_rtc_sys::GstWebRTCICEConnectionState) -> Self { skip_assert_initialized!(); match value { 0 => WebRTCICEConnectionState::New, @@ -252,7 +252,7 @@ impl FromGlib for WebRTCICEConnectionState { impl StaticType for WebRTCICEConnectionState { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_webrtc_ice_connection_state_get_type()) } + unsafe { from_glib(gst_web_rtc_sys::gst_webrtc_ice_connection_state_get_type()) } } } @@ -264,13 +264,13 @@ impl<'a> FromValueOptional<'a> for WebRTCICEConnectionState { impl<'a> FromValue<'a> for WebRTCICEConnectionState { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for WebRTCICEConnectionState { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -286,21 +286,21 @@ pub enum WebRTCICEGatheringState { #[doc(hidden)] impl ToGlib for WebRTCICEGatheringState { - type GlibType = ffi::GstWebRTCICEGatheringState; + type GlibType = gst_web_rtc_sys::GstWebRTCICEGatheringState; - fn to_glib(&self) -> ffi::GstWebRTCICEGatheringState { + fn to_glib(&self) -> gst_web_rtc_sys::GstWebRTCICEGatheringState { match *self { - WebRTCICEGatheringState::New => ffi::GST_WEBRTC_ICE_GATHERING_STATE_NEW, - WebRTCICEGatheringState::Gathering => ffi::GST_WEBRTC_ICE_GATHERING_STATE_GATHERING, - WebRTCICEGatheringState::Complete => ffi::GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE, + WebRTCICEGatheringState::New => gst_web_rtc_sys::GST_WEBRTC_ICE_GATHERING_STATE_NEW, + WebRTCICEGatheringState::Gathering => gst_web_rtc_sys::GST_WEBRTC_ICE_GATHERING_STATE_GATHERING, + WebRTCICEGatheringState::Complete => gst_web_rtc_sys::GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE, WebRTCICEGatheringState::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for WebRTCICEGatheringState { - fn from_glib(value: ffi::GstWebRTCICEGatheringState) -> Self { +impl FromGlib for WebRTCICEGatheringState { + fn from_glib(value: gst_web_rtc_sys::GstWebRTCICEGatheringState) -> Self { skip_assert_initialized!(); match value { 0 => WebRTCICEGatheringState::New, @@ -313,7 +313,7 @@ impl FromGlib for WebRTCICEGatheringState { impl StaticType for WebRTCICEGatheringState { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_webrtc_ice_gathering_state_get_type()) } + unsafe { from_glib(gst_web_rtc_sys::gst_webrtc_ice_gathering_state_get_type()) } } } @@ -325,13 +325,13 @@ impl<'a> FromValueOptional<'a> for WebRTCICEGatheringState { impl<'a> FromValue<'a> for WebRTCICEGatheringState { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for WebRTCICEGatheringState { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -346,20 +346,20 @@ pub enum WebRTCICERole { #[doc(hidden)] impl ToGlib for WebRTCICERole { - type GlibType = ffi::GstWebRTCICERole; + type GlibType = gst_web_rtc_sys::GstWebRTCICERole; - fn to_glib(&self) -> ffi::GstWebRTCICERole { + fn to_glib(&self) -> gst_web_rtc_sys::GstWebRTCICERole { match *self { - WebRTCICERole::Controlled => ffi::GST_WEBRTC_ICE_ROLE_CONTROLLED, - WebRTCICERole::Controlling => ffi::GST_WEBRTC_ICE_ROLE_CONTROLLING, + WebRTCICERole::Controlled => gst_web_rtc_sys::GST_WEBRTC_ICE_ROLE_CONTROLLED, + WebRTCICERole::Controlling => gst_web_rtc_sys::GST_WEBRTC_ICE_ROLE_CONTROLLING, WebRTCICERole::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for WebRTCICERole { - fn from_glib(value: ffi::GstWebRTCICERole) -> Self { +impl FromGlib for WebRTCICERole { + fn from_glib(value: gst_web_rtc_sys::GstWebRTCICERole) -> Self { skip_assert_initialized!(); match value { 0 => WebRTCICERole::Controlled, @@ -371,7 +371,7 @@ impl FromGlib for WebRTCICERole { impl StaticType for WebRTCICERole { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_webrtc_ice_role_get_type()) } + unsafe { from_glib(gst_web_rtc_sys::gst_webrtc_ice_role_get_type()) } } } @@ -383,13 +383,13 @@ impl<'a> FromValueOptional<'a> for WebRTCICERole { impl<'a> FromValue<'a> for WebRTCICERole { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for WebRTCICERole { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -408,24 +408,24 @@ pub enum WebRTCPeerConnectionState { #[doc(hidden)] impl ToGlib for WebRTCPeerConnectionState { - type GlibType = ffi::GstWebRTCPeerConnectionState; + type GlibType = gst_web_rtc_sys::GstWebRTCPeerConnectionState; - fn to_glib(&self) -> ffi::GstWebRTCPeerConnectionState { + fn to_glib(&self) -> gst_web_rtc_sys::GstWebRTCPeerConnectionState { match *self { - WebRTCPeerConnectionState::New => ffi::GST_WEBRTC_PEER_CONNECTION_STATE_NEW, - WebRTCPeerConnectionState::Connecting => ffi::GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING, - WebRTCPeerConnectionState::Connected => ffi::GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED, - WebRTCPeerConnectionState::Disconnected => ffi::GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED, - WebRTCPeerConnectionState::Failed => ffi::GST_WEBRTC_PEER_CONNECTION_STATE_FAILED, - WebRTCPeerConnectionState::Closed => ffi::GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED, + WebRTCPeerConnectionState::New => gst_web_rtc_sys::GST_WEBRTC_PEER_CONNECTION_STATE_NEW, + WebRTCPeerConnectionState::Connecting => gst_web_rtc_sys::GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING, + WebRTCPeerConnectionState::Connected => gst_web_rtc_sys::GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED, + WebRTCPeerConnectionState::Disconnected => gst_web_rtc_sys::GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED, + WebRTCPeerConnectionState::Failed => gst_web_rtc_sys::GST_WEBRTC_PEER_CONNECTION_STATE_FAILED, + WebRTCPeerConnectionState::Closed => gst_web_rtc_sys::GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED, WebRTCPeerConnectionState::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for WebRTCPeerConnectionState { - fn from_glib(value: ffi::GstWebRTCPeerConnectionState) -> Self { +impl FromGlib for WebRTCPeerConnectionState { + fn from_glib(value: gst_web_rtc_sys::GstWebRTCPeerConnectionState) -> Self { skip_assert_initialized!(); match value { 0 => WebRTCPeerConnectionState::New, @@ -441,7 +441,7 @@ impl FromGlib for WebRTCPeerConnectionState { impl StaticType for WebRTCPeerConnectionState { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_webrtc_peer_connection_state_get_type()) } + unsafe { from_glib(gst_web_rtc_sys::gst_webrtc_peer_connection_state_get_type()) } } } @@ -453,13 +453,13 @@ impl<'a> FromValueOptional<'a> for WebRTCPeerConnectionState { impl<'a> FromValue<'a> for WebRTCPeerConnectionState { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for WebRTCPeerConnectionState { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -477,23 +477,23 @@ pub enum WebRTCRTPTransceiverDirection { #[doc(hidden)] impl ToGlib for WebRTCRTPTransceiverDirection { - type GlibType = ffi::GstWebRTCRTPTransceiverDirection; + type GlibType = gst_web_rtc_sys::GstWebRTCRTPTransceiverDirection; - fn to_glib(&self) -> ffi::GstWebRTCRTPTransceiverDirection { + fn to_glib(&self) -> gst_web_rtc_sys::GstWebRTCRTPTransceiverDirection { match *self { - WebRTCRTPTransceiverDirection::None => ffi::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE, - WebRTCRTPTransceiverDirection::Inactive => ffi::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_INACTIVE, - WebRTCRTPTransceiverDirection::Sendonly => ffi::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY, - WebRTCRTPTransceiverDirection::Recvonly => ffi::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY, - WebRTCRTPTransceiverDirection::Sendrecv => ffi::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV, + WebRTCRTPTransceiverDirection::None => gst_web_rtc_sys::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE, + WebRTCRTPTransceiverDirection::Inactive => gst_web_rtc_sys::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_INACTIVE, + WebRTCRTPTransceiverDirection::Sendonly => gst_web_rtc_sys::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY, + WebRTCRTPTransceiverDirection::Recvonly => gst_web_rtc_sys::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY, + WebRTCRTPTransceiverDirection::Sendrecv => gst_web_rtc_sys::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV, WebRTCRTPTransceiverDirection::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for WebRTCRTPTransceiverDirection { - fn from_glib(value: ffi::GstWebRTCRTPTransceiverDirection) -> Self { +impl FromGlib for WebRTCRTPTransceiverDirection { + fn from_glib(value: gst_web_rtc_sys::GstWebRTCRTPTransceiverDirection) -> Self { skip_assert_initialized!(); match value { 0 => WebRTCRTPTransceiverDirection::None, @@ -508,7 +508,7 @@ impl FromGlib for WebRTCRTPTransceiverDir impl StaticType for WebRTCRTPTransceiverDirection { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_webrtc_rtp_transceiver_direction_get_type()) } + unsafe { from_glib(gst_web_rtc_sys::gst_webrtc_rtp_transceiver_direction_get_type()) } } } @@ -520,13 +520,13 @@ impl<'a> FromValueOptional<'a> for WebRTCRTPTransceiverDirection { impl<'a> FromValue<'a> for WebRTCRTPTransceiverDirection { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for WebRTCRTPTransceiverDirection { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -543,22 +543,22 @@ pub enum WebRTCSDPType { #[doc(hidden)] impl ToGlib for WebRTCSDPType { - type GlibType = ffi::GstWebRTCSDPType; + type GlibType = gst_web_rtc_sys::GstWebRTCSDPType; - fn to_glib(&self) -> ffi::GstWebRTCSDPType { + fn to_glib(&self) -> gst_web_rtc_sys::GstWebRTCSDPType { match *self { - WebRTCSDPType::Offer => ffi::GST_WEBRTC_SDP_TYPE_OFFER, - WebRTCSDPType::Pranswer => ffi::GST_WEBRTC_SDP_TYPE_PRANSWER, - WebRTCSDPType::Answer => ffi::GST_WEBRTC_SDP_TYPE_ANSWER, - WebRTCSDPType::Rollback => ffi::GST_WEBRTC_SDP_TYPE_ROLLBACK, + WebRTCSDPType::Offer => gst_web_rtc_sys::GST_WEBRTC_SDP_TYPE_OFFER, + WebRTCSDPType::Pranswer => gst_web_rtc_sys::GST_WEBRTC_SDP_TYPE_PRANSWER, + WebRTCSDPType::Answer => gst_web_rtc_sys::GST_WEBRTC_SDP_TYPE_ANSWER, + WebRTCSDPType::Rollback => gst_web_rtc_sys::GST_WEBRTC_SDP_TYPE_ROLLBACK, WebRTCSDPType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for WebRTCSDPType { - fn from_glib(value: ffi::GstWebRTCSDPType) -> Self { +impl FromGlib for WebRTCSDPType { + fn from_glib(value: gst_web_rtc_sys::GstWebRTCSDPType) -> Self { skip_assert_initialized!(); match value { 1 => WebRTCSDPType::Offer, @@ -572,7 +572,7 @@ impl FromGlib for WebRTCSDPType { impl StaticType for WebRTCSDPType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_webrtc_sdp_type_get_type()) } + unsafe { from_glib(gst_web_rtc_sys::gst_webrtc_sdp_type_get_type()) } } } @@ -584,13 +584,13 @@ impl<'a> FromValueOptional<'a> for WebRTCSDPType { impl<'a> FromValue<'a> for WebRTCSDPType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for WebRTCSDPType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -609,24 +609,24 @@ pub enum WebRTCSignalingState { #[doc(hidden)] impl ToGlib for WebRTCSignalingState { - type GlibType = ffi::GstWebRTCSignalingState; + type GlibType = gst_web_rtc_sys::GstWebRTCSignalingState; - fn to_glib(&self) -> ffi::GstWebRTCSignalingState { + fn to_glib(&self) -> gst_web_rtc_sys::GstWebRTCSignalingState { match *self { - WebRTCSignalingState::Stable => ffi::GST_WEBRTC_SIGNALING_STATE_STABLE, - WebRTCSignalingState::Closed => ffi::GST_WEBRTC_SIGNALING_STATE_CLOSED, - WebRTCSignalingState::HaveLocalOffer => ffi::GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER, - WebRTCSignalingState::HaveRemoteOffer => ffi::GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER, - WebRTCSignalingState::HaveLocalPranswer => ffi::GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER, - WebRTCSignalingState::HaveRemotePranswer => ffi::GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER, + WebRTCSignalingState::Stable => gst_web_rtc_sys::GST_WEBRTC_SIGNALING_STATE_STABLE, + WebRTCSignalingState::Closed => gst_web_rtc_sys::GST_WEBRTC_SIGNALING_STATE_CLOSED, + WebRTCSignalingState::HaveLocalOffer => gst_web_rtc_sys::GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER, + WebRTCSignalingState::HaveRemoteOffer => gst_web_rtc_sys::GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER, + WebRTCSignalingState::HaveLocalPranswer => gst_web_rtc_sys::GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER, + WebRTCSignalingState::HaveRemotePranswer => gst_web_rtc_sys::GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER, WebRTCSignalingState::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for WebRTCSignalingState { - fn from_glib(value: ffi::GstWebRTCSignalingState) -> Self { +impl FromGlib for WebRTCSignalingState { + fn from_glib(value: gst_web_rtc_sys::GstWebRTCSignalingState) -> Self { skip_assert_initialized!(); match value { 0 => WebRTCSignalingState::Stable, @@ -642,7 +642,7 @@ impl FromGlib for WebRTCSignalingState { impl StaticType for WebRTCSignalingState { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_webrtc_signaling_state_get_type()) } + unsafe { from_glib(gst_web_rtc_sys::gst_webrtc_signaling_state_get_type()) } } } @@ -654,13 +654,13 @@ impl<'a> FromValueOptional<'a> for WebRTCSignalingState { impl<'a> FromValue<'a> for WebRTCSignalingState { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for WebRTCSignalingState { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -687,32 +687,32 @@ pub enum WebRTCStatsType { #[doc(hidden)] impl ToGlib for WebRTCStatsType { - type GlibType = ffi::GstWebRTCStatsType; + type GlibType = gst_web_rtc_sys::GstWebRTCStatsType; - fn to_glib(&self) -> ffi::GstWebRTCStatsType { + fn to_glib(&self) -> gst_web_rtc_sys::GstWebRTCStatsType { match *self { - WebRTCStatsType::Codec => ffi::GST_WEBRTC_STATS_CODEC, - WebRTCStatsType::InboundRtp => ffi::GST_WEBRTC_STATS_INBOUND_RTP, - WebRTCStatsType::OutboundRtp => ffi::GST_WEBRTC_STATS_OUTBOUND_RTP, - WebRTCStatsType::RemoteInboundRtp => ffi::GST_WEBRTC_STATS_REMOTE_INBOUND_RTP, - WebRTCStatsType::RemoteOutboundRtp => ffi::GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP, - WebRTCStatsType::Csrc => ffi::GST_WEBRTC_STATS_CSRC, - WebRTCStatsType::PeerConnection => ffi::GST_WEBRTC_STATS_PEER_CONNECTION, - WebRTCStatsType::DataChannel => ffi::GST_WEBRTC_STATS_DATA_CHANNEL, - WebRTCStatsType::Stream => ffi::GST_WEBRTC_STATS_STREAM, - WebRTCStatsType::Transport => ffi::GST_WEBRTC_STATS_TRANSPORT, - WebRTCStatsType::CandidatePair => ffi::GST_WEBRTC_STATS_CANDIDATE_PAIR, - WebRTCStatsType::LocalCandidate => ffi::GST_WEBRTC_STATS_LOCAL_CANDIDATE, - WebRTCStatsType::RemoteCandidate => ffi::GST_WEBRTC_STATS_REMOTE_CANDIDATE, - WebRTCStatsType::Certificate => ffi::GST_WEBRTC_STATS_CERTIFICATE, + WebRTCStatsType::Codec => gst_web_rtc_sys::GST_WEBRTC_STATS_CODEC, + WebRTCStatsType::InboundRtp => gst_web_rtc_sys::GST_WEBRTC_STATS_INBOUND_RTP, + WebRTCStatsType::OutboundRtp => gst_web_rtc_sys::GST_WEBRTC_STATS_OUTBOUND_RTP, + WebRTCStatsType::RemoteInboundRtp => gst_web_rtc_sys::GST_WEBRTC_STATS_REMOTE_INBOUND_RTP, + WebRTCStatsType::RemoteOutboundRtp => gst_web_rtc_sys::GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP, + WebRTCStatsType::Csrc => gst_web_rtc_sys::GST_WEBRTC_STATS_CSRC, + WebRTCStatsType::PeerConnection => gst_web_rtc_sys::GST_WEBRTC_STATS_PEER_CONNECTION, + WebRTCStatsType::DataChannel => gst_web_rtc_sys::GST_WEBRTC_STATS_DATA_CHANNEL, + WebRTCStatsType::Stream => gst_web_rtc_sys::GST_WEBRTC_STATS_STREAM, + WebRTCStatsType::Transport => gst_web_rtc_sys::GST_WEBRTC_STATS_TRANSPORT, + WebRTCStatsType::CandidatePair => gst_web_rtc_sys::GST_WEBRTC_STATS_CANDIDATE_PAIR, + WebRTCStatsType::LocalCandidate => gst_web_rtc_sys::GST_WEBRTC_STATS_LOCAL_CANDIDATE, + WebRTCStatsType::RemoteCandidate => gst_web_rtc_sys::GST_WEBRTC_STATS_REMOTE_CANDIDATE, + WebRTCStatsType::Certificate => gst_web_rtc_sys::GST_WEBRTC_STATS_CERTIFICATE, WebRTCStatsType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for WebRTCStatsType { - fn from_glib(value: ffi::GstWebRTCStatsType) -> Self { +impl FromGlib for WebRTCStatsType { + fn from_glib(value: gst_web_rtc_sys::GstWebRTCStatsType) -> Self { skip_assert_initialized!(); match value { 1 => WebRTCStatsType::Codec, @@ -736,7 +736,7 @@ impl FromGlib for WebRTCStatsType { impl StaticType for WebRTCStatsType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_webrtc_stats_type_get_type()) } + unsafe { from_glib(gst_web_rtc_sys::gst_webrtc_stats_type_get_type()) } } } @@ -748,13 +748,13 @@ impl<'a> FromValueOptional<'a> for WebRTCStatsType { impl<'a> FromValue<'a> for WebRTCStatsType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for WebRTCStatsType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-webrtc/src/auto/versions.txt b/gstreamer-webrtc/src/auto/versions.txt index b9131200d..a9e0ccc5d 100644 --- a/gstreamer-webrtc/src/auto/versions.txt +++ b/gstreamer-webrtc/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???) diff --git a/gstreamer-webrtc/src/auto/web_rtc_session_description.rs b/gstreamer-webrtc/src/auto/web_rtc_session_description.rs index d04361cdd..309fcbd5f 100644 --- a/gstreamer-webrtc/src/auto/web_rtc_session_description.rs +++ b/gstreamer-webrtc/src/auto/web_rtc_session_description.rs @@ -2,17 +2,17 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::translate::*; +use gst_web_rtc_sys; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct WebRTCSessionDescription(Boxed); + pub struct WebRTCSessionDescription(Boxed); match fn { - copy => |ptr| ffi::gst_webrtc_session_description_copy(mut_override(ptr)), - free => |ptr| ffi::gst_webrtc_session_description_free(ptr), - get_type => || ffi::gst_webrtc_session_description_get_type(), + copy => |ptr| gst_web_rtc_sys::gst_webrtc_session_description_copy(mut_override(ptr)), + free => |ptr| gst_web_rtc_sys::gst_webrtc_session_description_free(ptr), + get_type => || gst_web_rtc_sys::gst_webrtc_session_description_get_type(), } } diff --git a/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs b/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs index 10b7743ca..c9503a4bb 100644 --- a/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs +++ b/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs @@ -4,7 +4,6 @@ use WebRTCDTLSTransportState; use WebRTCICETransport; -use ffi; use glib::GString; use glib::StaticType; use glib::Value; @@ -12,16 +11,17 @@ use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; +use gst_web_rtc_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct WebRTCDTLSTransport(Object); + pub struct WebRTCDTLSTransport(Object); match fn { - get_type => || ffi::gst_webrtc_dtls_transport_get_type(), + get_type => || gst_web_rtc_sys::gst_webrtc_dtls_transport_get_type(), } } @@ -29,49 +29,48 @@ impl WebRTCDTLSTransport { pub fn new(session_id: u32, rtcp: bool) -> WebRTCDTLSTransport { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::gst_webrtc_dtls_transport_new(session_id, rtcp.to_glib())) + from_glib_none(gst_web_rtc_sys::gst_webrtc_dtls_transport_new(session_id, rtcp.to_glib())) } } pub fn set_transport(&self, ice: &WebRTCICETransport) { unsafe { - ffi::gst_webrtc_dtls_transport_set_transport(self.to_glib_none().0, ice.to_glib_none().0); + gst_web_rtc_sys::gst_webrtc_dtls_transport_set_transport(self.to_glib_none().0, ice.to_glib_none().0); } } pub fn get_property_certificate(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"certificate\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"certificate\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - pub fn set_property_certificate<'a, P: Into>>(&self, certificate: P) { - let certificate = certificate.into(); + pub fn set_property_certificate(&self, certificate: Option<&str>) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"certificate\0".as_ptr() as *const _, Value::from(certificate).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"certificate\0".as_ptr() as *const _, Value::from(certificate).to_glib_none().0); } } pub fn get_property_client(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"client\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"client\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_client(&self, client: bool) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"client\0".as_ptr() as *const _, Value::from(&client).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"client\0".as_ptr() as *const _, Value::from(&client).to_glib_none().0); } } pub fn get_property_remote_certificate(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"remote-certificate\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"remote-certificate\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -79,7 +78,7 @@ impl WebRTCDTLSTransport { pub fn get_property_rtcp(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"rtcp\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"rtcp\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -87,7 +86,7 @@ impl WebRTCDTLSTransport { pub fn get_property_session_id(&self) -> u32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"session-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"session-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -95,7 +94,7 @@ impl WebRTCDTLSTransport { pub fn get_property_state(&self) -> WebRTCDTLSTransportState { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"state\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"state\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -103,7 +102,7 @@ impl WebRTCDTLSTransport { pub fn get_property_transport(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"transport\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"transport\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -152,27 +151,27 @@ impl WebRTCDTLSTransport { unsafe impl Send for WebRTCDTLSTransport {} unsafe impl Sync for WebRTCDTLSTransport {} -unsafe extern "C" fn notify_certificate_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_certificate_trampoline(this: *mut gst_web_rtc_sys::GstWebRTCDTLSTransport, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_client_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_client_trampoline(this: *mut gst_web_rtc_sys::GstWebRTCDTLSTransport, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_remote_certificate_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_remote_certificate_trampoline(this: *mut gst_web_rtc_sys::GstWebRTCDTLSTransport, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_state_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_state_trampoline(this: *mut gst_web_rtc_sys::GstWebRTCDTLSTransport, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_transport_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_transport_trampoline(this: *mut gst_web_rtc_sys::GstWebRTCDTLSTransport, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer-webrtc/src/auto/web_rtcice_transport.rs b/gstreamer-webrtc/src/auto/web_rtcice_transport.rs index 2c0bcfc34..6ec3497a6 100644 --- a/gstreamer-webrtc/src/auto/web_rtcice_transport.rs +++ b/gstreamer-webrtc/src/auto/web_rtcice_transport.rs @@ -5,7 +5,6 @@ use WebRTCICEComponent; use WebRTCICEConnectionState; use WebRTCICEGatheringState; -use ffi; use glib::GString; use glib::StaticType; use glib::Value; @@ -13,49 +12,50 @@ use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; +use gst_web_rtc_sys; use libc; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct WebRTCICETransport(Object); + pub struct WebRTCICETransport(Object); match fn { - get_type => || ffi::gst_webrtc_ice_transport_get_type(), + get_type => || gst_web_rtc_sys::gst_webrtc_ice_transport_get_type(), } } impl WebRTCICETransport { pub fn connection_state_change(&self, new_state: WebRTCICEConnectionState) { unsafe { - ffi::gst_webrtc_ice_transport_connection_state_change(self.to_glib_none().0, new_state.to_glib()); + gst_web_rtc_sys::gst_webrtc_ice_transport_connection_state_change(self.to_glib_none().0, new_state.to_glib()); } } pub fn gathering_state_change(&self, new_state: WebRTCICEGatheringState) { unsafe { - ffi::gst_webrtc_ice_transport_gathering_state_change(self.to_glib_none().0, new_state.to_glib()); + gst_web_rtc_sys::gst_webrtc_ice_transport_gathering_state_change(self.to_glib_none().0, new_state.to_glib()); } } pub fn new_candidate(&self, stream_id: u32, component: WebRTCICEComponent, attr: &str) { unsafe { - ffi::gst_webrtc_ice_transport_new_candidate(self.to_glib_none().0, stream_id, component.to_glib(), attr.to_glib_none().0); + gst_web_rtc_sys::gst_webrtc_ice_transport_new_candidate(self.to_glib_none().0, stream_id, component.to_glib(), attr.to_glib_none().0); } } pub fn selected_pair_change(&self) { unsafe { - ffi::gst_webrtc_ice_transport_selected_pair_change(self.to_glib_none().0); + gst_web_rtc_sys::gst_webrtc_ice_transport_selected_pair_change(self.to_glib_none().0); } } pub fn get_property_component(&self) -> WebRTCICEComponent { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"component\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"component\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -63,7 +63,7 @@ impl WebRTCICETransport { pub fn get_property_gathering_state(&self) -> WebRTCICEGatheringState { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"gathering-state\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"gathering-state\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -71,7 +71,7 @@ impl WebRTCICETransport { pub fn get_property_state(&self) -> WebRTCICEConnectionState { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"state\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"state\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -112,22 +112,22 @@ impl WebRTCICETransport { unsafe impl Send for WebRTCICETransport {} unsafe impl Sync for WebRTCICETransport {} -unsafe extern "C" fn on_new_candidate_trampoline(this: *mut ffi::GstWebRTCICETransport, object: *mut libc::c_char, f: glib_ffi::gpointer) { +unsafe extern "C" fn on_new_candidate_trampoline(this: *mut gst_web_rtc_sys::GstWebRTCICETransport, object: *mut libc::c_char, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), &GString::from_glib_borrow(object)) } -unsafe extern "C" fn on_selected_candidate_pair_change_trampoline(this: *mut ffi::GstWebRTCICETransport, f: glib_ffi::gpointer) { +unsafe extern "C" fn on_selected_candidate_pair_change_trampoline(this: *mut gst_web_rtc_sys::GstWebRTCICETransport, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_gathering_state_trampoline(this: *mut ffi::GstWebRTCICETransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_gathering_state_trampoline(this: *mut gst_web_rtc_sys::GstWebRTCICETransport, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_state_trampoline(this: *mut ffi::GstWebRTCICETransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_state_trampoline(this: *mut gst_web_rtc_sys::GstWebRTCICETransport, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs b/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs index a35387281..281c09653 100644 --- a/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs +++ b/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs @@ -3,14 +3,14 @@ // DO NOT EDIT use WebRTCDTLSTransport; -use ffi; use glib::translate::*; +use gst_web_rtc_sys; glib_wrapper! { - pub struct WebRTCRTPReceiver(Object); + pub struct WebRTCRTPReceiver(Object); match fn { - get_type => || ffi::gst_webrtc_rtp_receiver_get_type(), + get_type => || gst_web_rtc_sys::gst_webrtc_rtp_receiver_get_type(), } } @@ -18,19 +18,19 @@ impl WebRTCRTPReceiver { pub fn new() -> WebRTCRTPReceiver { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::gst_webrtc_rtp_receiver_new()) + from_glib_none(gst_web_rtc_sys::gst_webrtc_rtp_receiver_new()) } } pub fn set_rtcp_transport(&self, transport: &WebRTCDTLSTransport) { unsafe { - ffi::gst_webrtc_rtp_receiver_set_rtcp_transport(self.to_glib_none().0, transport.to_glib_none().0); + gst_web_rtc_sys::gst_webrtc_rtp_receiver_set_rtcp_transport(self.to_glib_none().0, transport.to_glib_none().0); } } pub fn set_transport(&self, transport: &WebRTCDTLSTransport) { unsafe { - ffi::gst_webrtc_rtp_receiver_set_transport(self.to_glib_none().0, transport.to_glib_none().0); + gst_web_rtc_sys::gst_webrtc_rtp_receiver_set_transport(self.to_glib_none().0, transport.to_glib_none().0); } } } diff --git a/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs b/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs index 5437f695c..c20dfd135 100644 --- a/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs +++ b/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs @@ -3,14 +3,14 @@ // DO NOT EDIT use WebRTCDTLSTransport; -use ffi; use glib::translate::*; +use gst_web_rtc_sys; glib_wrapper! { - pub struct WebRTCRTPSender(Object); + pub struct WebRTCRTPSender(Object); match fn { - get_type => || ffi::gst_webrtc_rtp_sender_get_type(), + get_type => || gst_web_rtc_sys::gst_webrtc_rtp_sender_get_type(), } } @@ -18,19 +18,19 @@ impl WebRTCRTPSender { pub fn new() -> WebRTCRTPSender { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::gst_webrtc_rtp_sender_new()) + from_glib_none(gst_web_rtc_sys::gst_webrtc_rtp_sender_new()) } } pub fn set_rtcp_transport(&self, transport: &WebRTCDTLSTransport) { unsafe { - ffi::gst_webrtc_rtp_sender_set_rtcp_transport(self.to_glib_none().0, transport.to_glib_none().0); + gst_web_rtc_sys::gst_webrtc_rtp_sender_set_rtcp_transport(self.to_glib_none().0, transport.to_glib_none().0); } } pub fn set_transport(&self, transport: &WebRTCDTLSTransport) { unsafe { - ffi::gst_webrtc_rtp_sender_set_transport(self.to_glib_none().0, transport.to_glib_none().0); + gst_web_rtc_sys::gst_webrtc_rtp_sender_set_transport(self.to_glib_none().0, transport.to_glib_none().0); } } } diff --git a/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs b/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs index ff7e0d53a..ed9da1625 100644 --- a/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs +++ b/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs @@ -4,18 +4,18 @@ use WebRTCRTPReceiver; use WebRTCRTPSender; -use ffi; use glib::StaticType; use glib::Value; use glib::object::ObjectType; use glib::translate::*; -use gobject_ffi; +use gobject_sys; +use gst_web_rtc_sys; glib_wrapper! { - pub struct WebRTCRTPTransceiver(Object); + pub struct WebRTCRTPTransceiver(Object); match fn { - get_type => || ffi::gst_webrtc_rtp_transceiver_get_type(), + get_type => || gst_web_rtc_sys::gst_webrtc_rtp_transceiver_get_type(), } } @@ -23,7 +23,7 @@ impl WebRTCRTPTransceiver { pub fn get_property_mlineindex(&self) -> u32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"mlineindex\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"mlineindex\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -31,7 +31,7 @@ impl WebRTCRTPTransceiver { pub fn get_property_receiver(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"receiver\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"receiver\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -39,7 +39,7 @@ impl WebRTCRTPTransceiver { pub fn get_property_sender(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"sender\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"sender\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } diff --git a/gstreamer/src/auto/bin.rs b/gstreamer/src/auto/bin.rs index 75c87249e..43e304fd1 100644 --- a/gstreamer/src/auto/bin.rs +++ b/gstreamer/src/auto/bin.rs @@ -9,7 +9,6 @@ use ElementFlags; use Object; use Pad; use PadDirection; -use ffi; use glib; use glib::StaticType; use glib::Value; @@ -18,25 +17,25 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Bin(Object) @extends Element, Object, @implements ChildProxy; + pub struct Bin(Object) @extends Element, Object, @implements ChildProxy; match fn { - get_type => || ffi::gst_bin_get_type(), + get_type => || gst_sys::gst_bin_get_type(), } } impl Bin { - pub fn new<'a, P: Into>>(name: P) -> Bin { + pub fn new(name: Option<&str>) -> Bin { assert_initialized_main_thread!(); - let name = name.into(); unsafe { - Element::from_glib_none(ffi::gst_bin_new(name.to_glib_none().0)).unsafe_cast() + Element::from_glib_none(gst_sys::gst_bin_new(name.to_glib_none().0)).unsafe_cast() } } } @@ -111,123 +110,123 @@ pub trait GstBinExt: 'static { impl> GstBinExt for O { fn add>(&self, element: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_bin_add(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0), "Failed to add element") + glib_result_from_gboolean!(gst_sys::gst_bin_add(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0), "Failed to add element") } } //fn add_many>(&self, element_1: &P, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { - // unsafe { TODO: call ffi::gst_bin_add_many() } + // unsafe { TODO: call gst_sys:gst_bin_add_many() } //} fn find_unlinked_pad(&self, direction: PadDirection) -> Option { unsafe { - from_glib_full(ffi::gst_bin_find_unlinked_pad(self.as_ref().to_glib_none().0, direction.to_glib())) + from_glib_full(gst_sys::gst_bin_find_unlinked_pad(self.as_ref().to_glib_none().0, direction.to_glib())) } } fn get_by_interface(&self, iface: glib::types::Type) -> Option { unsafe { - from_glib_full(ffi::gst_bin_get_by_interface(self.as_ref().to_glib_none().0, iface.to_glib())) + from_glib_full(gst_sys::gst_bin_get_by_interface(self.as_ref().to_glib_none().0, iface.to_glib())) } } fn get_by_name(&self, name: &str) -> Option { unsafe { - from_glib_full(ffi::gst_bin_get_by_name(self.as_ref().to_glib_none().0, name.to_glib_none().0)) + from_glib_full(gst_sys::gst_bin_get_by_name(self.as_ref().to_glib_none().0, name.to_glib_none().0)) } } fn get_by_name_recurse_up(&self, name: &str) -> Option { unsafe { - from_glib_full(ffi::gst_bin_get_by_name_recurse_up(self.as_ref().to_glib_none().0, name.to_glib_none().0)) + from_glib_full(gst_sys::gst_bin_get_by_name_recurse_up(self.as_ref().to_glib_none().0, name.to_glib_none().0)) } } #[cfg(any(feature = "v1_10", feature = "dox"))] fn get_suppressed_flags(&self) -> ElementFlags { unsafe { - from_glib(ffi::gst_bin_get_suppressed_flags(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_bin_get_suppressed_flags(self.as_ref().to_glib_none().0)) } } //fn iterate_all_by_interface(&self, iface: glib::types::Type) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_bin_iterate_all_by_interface() } + // unsafe { TODO: call gst_sys:gst_bin_iterate_all_by_interface() } //} //fn iterate_elements(&self) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_bin_iterate_elements() } + // unsafe { TODO: call gst_sys:gst_bin_iterate_elements() } //} //fn iterate_recurse(&self) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_bin_iterate_recurse() } + // unsafe { TODO: call gst_sys:gst_bin_iterate_recurse() } //} //fn iterate_sinks(&self) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_bin_iterate_sinks() } + // unsafe { TODO: call gst_sys:gst_bin_iterate_sinks() } //} //fn iterate_sorted(&self) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_bin_iterate_sorted() } + // unsafe { TODO: call gst_sys:gst_bin_iterate_sorted() } //} //fn iterate_sources(&self) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_bin_iterate_sources() } + // unsafe { TODO: call gst_sys:gst_bin_iterate_sources() } //} fn recalculate_latency(&self) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_bin_recalculate_latency(self.as_ref().to_glib_none().0), "Failed to recalculate latency") + glib_result_from_gboolean!(gst_sys::gst_bin_recalculate_latency(self.as_ref().to_glib_none().0), "Failed to recalculate latency") } } fn remove>(&self, element: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_bin_remove(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0), "Failed to remove element") + glib_result_from_gboolean!(gst_sys::gst_bin_remove(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0), "Failed to remove element") } } //fn remove_many>(&self, element_1: &P, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { - // unsafe { TODO: call ffi::gst_bin_remove_many() } + // unsafe { TODO: call gst_sys:gst_bin_remove_many() } //} #[cfg(any(feature = "v1_10", feature = "dox"))] fn set_suppressed_flags(&self, flags: ElementFlags) { unsafe { - ffi::gst_bin_set_suppressed_flags(self.as_ref().to_glib_none().0, flags.to_glib()); + gst_sys::gst_bin_set_suppressed_flags(self.as_ref().to_glib_none().0, flags.to_glib()); } } fn sync_children_states(&self) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_bin_sync_children_states(self.as_ref().to_glib_none().0), "Failed to sync children states") + glib_result_from_gboolean!(gst_sys::gst_bin_sync_children_states(self.as_ref().to_glib_none().0), "Failed to sync children states") } } fn get_property_async_handling(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"async-handling\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"async-handling\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_async_handling(&self, async_handling: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"async-handling\0".as_ptr() as *const _, Value::from(&async_handling).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"async-handling\0".as_ptr() as *const _, Value::from(&async_handling).to_glib_none().0); } } fn get_property_message_forward(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"message-forward\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"message-forward\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_message_forward(&self, message_forward: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"message-forward\0".as_ptr() as *const _, Value::from(&message_forward).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"message-forward\0".as_ptr() as *const _, Value::from(&message_forward).to_glib_none().0); } } @@ -283,38 +282,38 @@ impl> GstBinExt for O { } #[cfg(any(feature = "v1_10", feature = "dox"))] -unsafe extern "C" fn deep_element_added_trampoline(this: *mut ffi::GstBin, sub_bin: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer) +unsafe extern "C" fn deep_element_added_trampoline(this: *mut gst_sys::GstBin, sub_bin: *mut gst_sys::GstBin, element: *mut gst_sys::GstElement, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Bin::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(sub_bin), &from_glib_borrow(element)) } #[cfg(any(feature = "v1_10", feature = "dox"))] -unsafe extern "C" fn deep_element_removed_trampoline(this: *mut ffi::GstBin, sub_bin: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer) +unsafe extern "C" fn deep_element_removed_trampoline(this: *mut gst_sys::GstBin, sub_bin: *mut gst_sys::GstBin, element: *mut gst_sys::GstElement, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Bin::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(sub_bin), &from_glib_borrow(element)) } -unsafe extern "C" fn element_added_trampoline(this: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer) +unsafe extern "C" fn element_added_trampoline(this: *mut gst_sys::GstBin, element: *mut gst_sys::GstElement, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Bin::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(element)) } -unsafe extern "C" fn element_removed_trampoline(this: *mut ffi::GstBin, element: *mut ffi::GstElement, f: glib_ffi::gpointer) +unsafe extern "C" fn element_removed_trampoline(this: *mut gst_sys::GstBin, element: *mut gst_sys::GstElement, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Bin::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(element)) } -unsafe extern "C" fn notify_async_handling_trampoline(this: *mut ffi::GstBin, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_async_handling_trampoline(this: *mut gst_sys::GstBin, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Bin::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_message_forward_trampoline(this: *mut ffi::GstBin, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_message_forward_trampoline(this: *mut gst_sys::GstBin, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Bin::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer/src/auto/buffer_pool.rs b/gstreamer/src/auto/buffer_pool.rs index 799aa60cc..0d8be4601 100644 --- a/gstreamer/src/auto/buffer_pool.rs +++ b/gstreamer/src/auto/buffer_pool.rs @@ -3,17 +3,17 @@ // DO NOT EDIT use Object; -use ffi; use glib; use glib::GString; use glib::object::IsA; use glib::translate::*; +use gst_sys; glib_wrapper! { - pub struct BufferPool(Object) @extends Object; + pub struct BufferPool(Object) @extends Object; match fn { - get_type => || ffi::gst_buffer_pool_get_type(), + get_type => || gst_sys::gst_buffer_pool_get_type(), } } @@ -37,31 +37,31 @@ pub trait BufferPoolExt: 'static { impl> BufferPoolExt for O { fn get_options(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_buffer_pool_get_options(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_sys::gst_buffer_pool_get_options(self.as_ref().to_glib_none().0)) } } fn has_option(&self, option: &str) -> bool { unsafe { - from_glib(ffi::gst_buffer_pool_has_option(self.as_ref().to_glib_none().0, option.to_glib_none().0)) + from_glib(gst_sys::gst_buffer_pool_has_option(self.as_ref().to_glib_none().0, option.to_glib_none().0)) } } fn is_active(&self) -> bool { unsafe { - from_glib(ffi::gst_buffer_pool_is_active(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_buffer_pool_is_active(self.as_ref().to_glib_none().0)) } } fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_buffer_pool_set_active(self.as_ref().to_glib_none().0, active.to_glib()), "Failed to activate buffer pool") + glib_result_from_gboolean!(gst_sys::gst_buffer_pool_set_active(self.as_ref().to_glib_none().0, active.to_glib()), "Failed to activate buffer pool") } } fn set_flushing(&self, flushing: bool) { unsafe { - ffi::gst_buffer_pool_set_flushing(self.as_ref().to_glib_none().0, flushing.to_glib()); + gst_sys::gst_buffer_pool_set_flushing(self.as_ref().to_glib_none().0, flushing.to_glib()); } } } diff --git a/gstreamer/src/auto/bus.rs b/gstreamer/src/auto/bus.rs index 2e47c3f34..dc2cee7da 100644 --- a/gstreamer/src/auto/bus.rs +++ b/gstreamer/src/auto/bus.rs @@ -5,21 +5,21 @@ use ClockTime; use Message; use Object; -use ffi; use glib; use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Bus(Object) @extends Object; + pub struct Bus(Object) @extends Object; match fn { - get_type => || ffi::gst_bus_get_type(), + get_type => || gst_sys::gst_bus_get_type(), } } @@ -27,86 +27,86 @@ impl Bus { pub fn new() -> Bus { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_bus_new()) + from_glib_full(gst_sys::gst_bus_new()) } } pub fn add_signal_watch(&self) { unsafe { - ffi::gst_bus_add_signal_watch(self.to_glib_none().0); + gst_sys::gst_bus_add_signal_watch(self.to_glib_none().0); } } //pub fn async_signal_func(&self, message: &Message, data: /*Unimplemented*/Option) -> bool { - // unsafe { TODO: call ffi::gst_bus_async_signal_func() } + // unsafe { TODO: call gst_sys:gst_bus_async_signal_func() } //} pub fn disable_sync_message_emission(&self) { unsafe { - ffi::gst_bus_disable_sync_message_emission(self.to_glib_none().0); + gst_sys::gst_bus_disable_sync_message_emission(self.to_glib_none().0); } } pub fn enable_sync_message_emission(&self) { unsafe { - ffi::gst_bus_enable_sync_message_emission(self.to_glib_none().0); + gst_sys::gst_bus_enable_sync_message_emission(self.to_glib_none().0); } } //#[cfg(any(feature = "v1_14", feature = "dox"))] //pub fn get_pollfd(&self, fd: /*Ignored*/&mut glib::PollFD) { - // unsafe { TODO: call ffi::gst_bus_get_pollfd() } + // unsafe { TODO: call gst_sys:gst_bus_get_pollfd() } //} pub fn have_pending(&self) -> bool { unsafe { - from_glib(ffi::gst_bus_have_pending(self.to_glib_none().0)) + from_glib(gst_sys::gst_bus_have_pending(self.to_glib_none().0)) } } pub fn peek(&self) -> Option { unsafe { - from_glib_full(ffi::gst_bus_peek(self.to_glib_none().0)) + from_glib_full(gst_sys::gst_bus_peek(self.to_glib_none().0)) } } pub fn pop(&self) -> Option { unsafe { - from_glib_full(ffi::gst_bus_pop(self.to_glib_none().0)) + from_glib_full(gst_sys::gst_bus_pop(self.to_glib_none().0)) } } pub fn post(&self, message: &Message) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_bus_post(self.to_glib_none().0, message.to_glib_full()), "Failed to post message") + glib_result_from_gboolean!(gst_sys::gst_bus_post(self.to_glib_none().0, message.to_glib_full()), "Failed to post message") } } pub fn remove_signal_watch(&self) { unsafe { - ffi::gst_bus_remove_signal_watch(self.to_glib_none().0); + gst_sys::gst_bus_remove_signal_watch(self.to_glib_none().0); } } pub fn remove_watch(&self) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_bus_remove_watch(self.to_glib_none().0), "Bus has no event source") + glib_result_from_gboolean!(gst_sys::gst_bus_remove_watch(self.to_glib_none().0), "Bus has no event source") } } pub fn set_flushing(&self, flushing: bool) { unsafe { - ffi::gst_bus_set_flushing(self.to_glib_none().0, flushing.to_glib()); + gst_sys::gst_bus_set_flushing(self.to_glib_none().0, flushing.to_glib()); } } //pub fn sync_signal_handler(&self, message: &Message, data: /*Unimplemented*/Option) -> BusSyncReply { - // unsafe { TODO: call ffi::gst_bus_sync_signal_handler() } + // unsafe { TODO: call gst_sys:gst_bus_sync_signal_handler() } //} pub fn timed_pop(&self, timeout: ClockTime) -> Option { unsafe { - from_glib_full(ffi::gst_bus_timed_pop(self.to_glib_none().0, timeout.to_glib())) + from_glib_full(gst_sys::gst_bus_timed_pop(self.to_glib_none().0, timeout.to_glib())) } } @@ -136,12 +136,12 @@ impl Default for Bus { unsafe impl Send for Bus {} unsafe impl Sync for Bus {} -unsafe extern "C" fn message_trampoline(this: *mut ffi::GstBus, message: *mut ffi::GstMessage, f: glib_ffi::gpointer) { +unsafe extern "C" fn message_trampoline(this: *mut gst_sys::GstBus, message: *mut gst_sys::GstMessage, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), &from_glib_borrow(message)) } -unsafe extern "C" fn sync_message_trampoline(this: *mut ffi::GstBus, message: *mut ffi::GstMessage, f: glib_ffi::gpointer) { +unsafe extern "C" fn sync_message_trampoline(this: *mut gst_sys::GstBus, message: *mut gst_sys::GstMessage, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), &from_glib_borrow(message)) } diff --git a/gstreamer/src/auto/child_proxy.rs b/gstreamer/src/auto/child_proxy.rs index 1e94d29d3..8f3d5ea8b 100644 --- a/gstreamer/src/auto/child_proxy.rs +++ b/gstreamer/src/auto/child_proxy.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib; use glib::GString; use glib::object::Cast; @@ -10,17 +9,18 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; +use gst_sys; use libc; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct ChildProxy(Interface); + pub struct ChildProxy(Interface); match fn { - get_type => || ffi::gst_child_proxy_get_type(), + get_type => || gst_sys::gst_child_proxy_get_type(), } } @@ -62,60 +62,60 @@ pub trait ChildProxyExt: 'static { impl> ChildProxyExt for O { fn child_added>(&self, child: &P, name: &str) { unsafe { - ffi::gst_child_proxy_child_added(self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0, name.to_glib_none().0); + gst_sys::gst_child_proxy_child_added(self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0, name.to_glib_none().0); } } fn child_removed>(&self, child: &P, name: &str) { unsafe { - ffi::gst_child_proxy_child_removed(self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0, name.to_glib_none().0); + gst_sys::gst_child_proxy_child_removed(self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0, name.to_glib_none().0); } } //fn get(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { - // unsafe { TODO: call ffi::gst_child_proxy_get() } + // unsafe { TODO: call gst_sys:gst_child_proxy_get() } //} fn get_child_by_index(&self, index: u32) -> Option { unsafe { - from_glib_full(ffi::gst_child_proxy_get_child_by_index(self.as_ref().to_glib_none().0, index)) + from_glib_full(gst_sys::gst_child_proxy_get_child_by_index(self.as_ref().to_glib_none().0, index)) } } fn get_child_by_name(&self, name: &str) -> Option { unsafe { - from_glib_full(ffi::gst_child_proxy_get_child_by_name(self.as_ref().to_glib_none().0, name.to_glib_none().0)) + from_glib_full(gst_sys::gst_child_proxy_get_child_by_name(self.as_ref().to_glib_none().0, name.to_glib_none().0)) } } fn get_children_count(&self) -> u32 { unsafe { - ffi::gst_child_proxy_get_children_count(self.as_ref().to_glib_none().0) + gst_sys::gst_child_proxy_get_children_count(self.as_ref().to_glib_none().0) } } //fn get_property(&self, name: &str, value: /*Ignored*/glib::Value) { - // unsafe { TODO: call ffi::gst_child_proxy_get_property() } + // unsafe { TODO: call gst_sys:gst_child_proxy_get_property() } //} //fn get_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { - // unsafe { TODO: call ffi::gst_child_proxy_get_valist() } + // unsafe { TODO: call gst_sys:gst_child_proxy_get_valist() } //} //fn lookup(&self, name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option { - // unsafe { TODO: call ffi::gst_child_proxy_lookup() } + // unsafe { TODO: call gst_sys:gst_child_proxy_lookup() } //} //fn set(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { - // unsafe { TODO: call ffi::gst_child_proxy_set() } + // unsafe { TODO: call gst_sys:gst_child_proxy_set() } //} //fn set_property(&self, name: &str, value: /*Ignored*/&glib::Value) { - // unsafe { TODO: call ffi::gst_child_proxy_set_property() } + // unsafe { TODO: call gst_sys:gst_child_proxy_set_property() } //} //fn set_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { - // unsafe { TODO: call ffi::gst_child_proxy_set_valist() } + // unsafe { TODO: call gst_sys:gst_child_proxy_set_valist() } //} fn connect_child_added(&self, f: F) -> SignalHandlerId { @@ -135,13 +135,13 @@ impl> ChildProxyExt for O { } } -unsafe extern "C" fn child_added_trampoline(this: *mut ffi::GstChildProxy, object: *mut gobject_ffi::GObject, name: *mut libc::c_char, f: glib_ffi::gpointer) +unsafe extern "C" fn child_added_trampoline(this: *mut gst_sys::GstChildProxy, object: *mut gobject_sys::GObject, name: *mut libc::c_char, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&ChildProxy::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object), &GString::from_glib_borrow(name)) } -unsafe extern "C" fn child_removed_trampoline(this: *mut ffi::GstChildProxy, object: *mut gobject_ffi::GObject, name: *mut libc::c_char, f: glib_ffi::gpointer) +unsafe extern "C" fn child_removed_trampoline(this: *mut gst_sys::GstChildProxy, object: *mut gobject_sys::GObject, name: *mut libc::c_char, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&ChildProxy::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object), &GString::from_glib_borrow(name)) diff --git a/gstreamer/src/auto/clock.rs b/gstreamer/src/auto/clock.rs index e26d4bc3c..53de69087 100644 --- a/gstreamer/src/auto/clock.rs +++ b/gstreamer/src/auto/clock.rs @@ -4,7 +4,6 @@ use ClockTime; use Object; -use ffi; use glib; use glib::StaticType; use glib::Value; @@ -13,47 +12,48 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; glib_wrapper! { - pub struct Clock(Object) @extends Object; + pub struct Clock(Object) @extends Object; match fn { - get_type => || ffi::gst_clock_get_type(), + get_type => || gst_sys::gst_clock_get_type(), } } impl Clock { //pub fn id_compare_func(id1: /*Unimplemented*/Option, id2: /*Unimplemented*/Option) -> i32 { - // unsafe { TODO: call ffi::gst_clock_id_compare_func() } + // unsafe { TODO: call gst_sys:gst_clock_id_compare_func() } //} //pub fn id_get_time(id: /*Unimplemented*/ClockID) -> ClockTime { - // unsafe { TODO: call ffi::gst_clock_id_get_time() } + // unsafe { TODO: call gst_sys:gst_clock_id_get_time() } //} //pub fn id_ref(id: /*Unimplemented*/ClockID) -> /*Unimplemented*/Option { - // unsafe { TODO: call ffi::gst_clock_id_ref() } + // unsafe { TODO: call gst_sys:gst_clock_id_ref() } //} //pub fn id_unref(id: /*Unimplemented*/ClockID) { - // unsafe { TODO: call ffi::gst_clock_id_unref() } + // unsafe { TODO: call gst_sys:gst_clock_id_unref() } //} //pub fn id_unschedule(id: /*Unimplemented*/ClockID) { - // unsafe { TODO: call ffi::gst_clock_id_unschedule() } + // unsafe { TODO: call gst_sys:gst_clock_id_unschedule() } //} //pub fn id_wait(id: /*Unimplemented*/ClockID) -> (ClockReturn, ClockTimeDiff) { - // unsafe { TODO: call ffi::gst_clock_id_wait() } + // unsafe { TODO: call gst_sys:gst_clock_id_wait() } //} //pub fn id_wait_async(id: /*Unimplemented*/ClockID, func: /*Unimplemented*/Fn(&Clock, ClockTime, /*Unimplemented*/ClockID) -> bool, user_data: /*Unimplemented*/Option) -> ClockReturn { - // unsafe { TODO: call ffi::gst_clock_id_wait_async() } + // unsafe { TODO: call gst_sys:gst_clock_id_wait_async() } //} } @@ -91,7 +91,7 @@ pub trait ClockExt: 'static { fn set_calibration(&self, internal: ClockTime, external: ClockTime, rate_num: ClockTime, rate_denom: ClockTime); - fn set_master<'a, P: IsA + 'a, Q: Into>>(&self, master: Q) -> Result<(), glib::error::BoolError>; + fn set_master>(&self, master: Option<&P>) -> Result<(), glib::error::BoolError>; fn set_resolution(&self, resolution: ClockTime) -> ClockTime; @@ -126,7 +126,7 @@ impl> ClockExt for O { fn add_observation(&self, slave: ClockTime, master: ClockTime) -> Option { unsafe { let mut r_squared = mem::uninitialized(); - let ret = from_glib(ffi::gst_clock_add_observation(self.as_ref().to_glib_none().0, slave.to_glib(), master.to_glib(), &mut r_squared)); + let ret = from_glib(gst_sys::gst_clock_add_observation(self.as_ref().to_glib_none().0, slave.to_glib(), master.to_glib(), &mut r_squared)); if ret { Some(r_squared) } else { None } } } @@ -138,14 +138,14 @@ impl> ClockExt for O { let mut external = mem::uninitialized(); let mut rate_num = mem::uninitialized(); let mut rate_denom = mem::uninitialized(); - let ret = from_glib(ffi::gst_clock_add_observation_unapplied(self.as_ref().to_glib_none().0, slave.to_glib(), master.to_glib(), &mut r_squared, &mut internal, &mut external, &mut rate_num, &mut rate_denom)); + let ret = from_glib(gst_sys::gst_clock_add_observation_unapplied(self.as_ref().to_glib_none().0, slave.to_glib(), master.to_glib(), &mut r_squared, &mut internal, &mut external, &mut rate_num, &mut rate_denom)); if ret { Some((r_squared, from_glib(internal), from_glib(external), from_glib(rate_num), from_glib(rate_denom))) } else { None } } } fn adjust_unlocked(&self, internal: ClockTime) -> ClockTime { unsafe { - from_glib(ffi::gst_clock_adjust_unlocked(self.as_ref().to_glib_none().0, internal.to_glib())) + from_glib(gst_sys::gst_clock_adjust_unlocked(self.as_ref().to_glib_none().0, internal.to_glib())) } } @@ -155,131 +155,130 @@ impl> ClockExt for O { let mut external = mem::uninitialized(); let mut rate_num = mem::uninitialized(); let mut rate_denom = mem::uninitialized(); - ffi::gst_clock_get_calibration(self.as_ref().to_glib_none().0, &mut internal, &mut external, &mut rate_num, &mut rate_denom); + gst_sys::gst_clock_get_calibration(self.as_ref().to_glib_none().0, &mut internal, &mut external, &mut rate_num, &mut rate_denom); (from_glib(internal), from_glib(external), from_glib(rate_num), from_glib(rate_denom)) } } fn get_internal_time(&self) -> ClockTime { unsafe { - from_glib(ffi::gst_clock_get_internal_time(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_clock_get_internal_time(self.as_ref().to_glib_none().0)) } } fn get_master(&self) -> Option { unsafe { - from_glib_full(ffi::gst_clock_get_master(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_clock_get_master(self.as_ref().to_glib_none().0)) } } fn get_resolution(&self) -> ClockTime { unsafe { - from_glib(ffi::gst_clock_get_resolution(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_clock_get_resolution(self.as_ref().to_glib_none().0)) } } fn get_time(&self) -> ClockTime { unsafe { - from_glib(ffi::gst_clock_get_time(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_clock_get_time(self.as_ref().to_glib_none().0)) } } fn get_timeout(&self) -> ClockTime { unsafe { - from_glib(ffi::gst_clock_get_timeout(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_clock_get_timeout(self.as_ref().to_glib_none().0)) } } fn is_synced(&self) -> bool { unsafe { - from_glib(ffi::gst_clock_is_synced(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_clock_is_synced(self.as_ref().to_glib_none().0)) } } //fn new_periodic_id(&self, start_time: ClockTime, interval: ClockTime) -> /*Unimplemented*/Option { - // unsafe { TODO: call ffi::gst_clock_new_periodic_id() } + // unsafe { TODO: call gst_sys:gst_clock_new_periodic_id() } //} //fn new_single_shot_id(&self, time: ClockTime) -> /*Unimplemented*/Option { - // unsafe { TODO: call ffi::gst_clock_new_single_shot_id() } + // unsafe { TODO: call gst_sys:gst_clock_new_single_shot_id() } //} //fn periodic_id_reinit(&self, id: /*Unimplemented*/ClockID, start_time: ClockTime, interval: ClockTime) -> bool { - // unsafe { TODO: call ffi::gst_clock_periodic_id_reinit() } + // unsafe { TODO: call gst_sys:gst_clock_periodic_id_reinit() } //} fn set_calibration(&self, internal: ClockTime, external: ClockTime, rate_num: ClockTime, rate_denom: ClockTime) { unsafe { - ffi::gst_clock_set_calibration(self.as_ref().to_glib_none().0, internal.to_glib(), external.to_glib(), rate_num.to_glib(), rate_denom.to_glib()); + gst_sys::gst_clock_set_calibration(self.as_ref().to_glib_none().0, internal.to_glib(), external.to_glib(), rate_num.to_glib(), rate_denom.to_glib()); } } - fn set_master<'a, P: IsA + 'a, Q: Into>>(&self, master: Q) -> Result<(), glib::error::BoolError> { - let master = master.into(); + fn set_master>(&self, master: Option<&P>) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_clock_set_master(self.as_ref().to_glib_none().0, master.map(|p| p.as_ref()).to_glib_none().0), "Failed to set master clock") + glib_result_from_gboolean!(gst_sys::gst_clock_set_master(self.as_ref().to_glib_none().0, master.map(|p| p.as_ref()).to_glib_none().0), "Failed to set master clock") } } fn set_resolution(&self, resolution: ClockTime) -> ClockTime { unsafe { - from_glib(ffi::gst_clock_set_resolution(self.as_ref().to_glib_none().0, resolution.to_glib())) + from_glib(gst_sys::gst_clock_set_resolution(self.as_ref().to_glib_none().0, resolution.to_glib())) } } fn set_synced(&self, synced: bool) { unsafe { - ffi::gst_clock_set_synced(self.as_ref().to_glib_none().0, synced.to_glib()); + gst_sys::gst_clock_set_synced(self.as_ref().to_glib_none().0, synced.to_glib()); } } fn set_timeout(&self, timeout: ClockTime) { unsafe { - ffi::gst_clock_set_timeout(self.as_ref().to_glib_none().0, timeout.to_glib()); + gst_sys::gst_clock_set_timeout(self.as_ref().to_glib_none().0, timeout.to_glib()); } } //fn single_shot_id_reinit(&self, id: /*Unimplemented*/ClockID, time: ClockTime) -> bool { - // unsafe { TODO: call ffi::gst_clock_single_shot_id_reinit() } + // unsafe { TODO: call gst_sys:gst_clock_single_shot_id_reinit() } //} fn unadjust_unlocked(&self, external: ClockTime) -> ClockTime { unsafe { - from_glib(ffi::gst_clock_unadjust_unlocked(self.as_ref().to_glib_none().0, external.to_glib())) + from_glib(gst_sys::gst_clock_unadjust_unlocked(self.as_ref().to_glib_none().0, external.to_glib())) } } fn wait_for_sync(&self, timeout: ClockTime) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_clock_wait_for_sync(self.as_ref().to_glib_none().0, timeout.to_glib()), "Timed out waiting for sync") + glib_result_from_gboolean!(gst_sys::gst_clock_wait_for_sync(self.as_ref().to_glib_none().0, timeout.to_glib()), "Timed out waiting for sync") } } fn get_property_window_size(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"window-size\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"window-size\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_window_size(&self, window_size: i32) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"window-size\0".as_ptr() as *const _, Value::from(&window_size).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"window-size\0".as_ptr() as *const _, Value::from(&window_size).to_glib_none().0); } } fn get_property_window_threshold(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"window-threshold\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"window-threshold\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_window_threshold(&self, window_threshold: i32) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"window-threshold\0".as_ptr() as *const _, Value::from(&window_threshold).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"window-threshold\0".as_ptr() as *const _, Value::from(&window_threshold).to_glib_none().0); } } @@ -316,25 +315,25 @@ impl> ClockExt for O { } } -unsafe extern "C" fn synced_trampoline(this: *mut ffi::GstClock, synced: glib_ffi::gboolean, f: glib_ffi::gpointer) +unsafe extern "C" fn synced_trampoline(this: *mut gst_sys::GstClock, synced: glib_sys::gboolean, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Clock::from_glib_borrow(this).unsafe_cast(), from_glib(synced)) } -unsafe extern "C" fn notify_timeout_trampoline(this: *mut ffi::GstClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_timeout_trampoline(this: *mut gst_sys::GstClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Clock::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_window_size_trampoline(this: *mut ffi::GstClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_window_size_trampoline(this: *mut gst_sys::GstClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Clock::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_window_threshold_trampoline(this: *mut ffi::GstClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_window_threshold_trampoline(this: *mut gst_sys::GstClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Clock::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer/src/auto/date_time.rs b/gstreamer/src/auto/date_time.rs index f9d54c07c..f3c18c246 100644 --- a/gstreamer/src/auto/date_time.rs +++ b/gstreamer/src/auto/date_time.rs @@ -2,19 +2,19 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib; use glib::GString; use glib::translate::*; +use gst_sys; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct DateTime(Shared); + pub struct DateTime(Shared); match fn { - ref => |ptr| ffi::gst_date_time_ref(ptr), - unref => |ptr| ffi::gst_date_time_unref(ptr), - get_type => || ffi::gst_date_time_get_type(), + ref => |ptr| gst_sys::gst_date_time_ref(ptr), + unref => |ptr| gst_sys::gst_date_time_unref(ptr), + get_type => || gst_sys::gst_date_time_get_type(), } } @@ -22,167 +22,167 @@ impl DateTime { pub fn new(tzoffset: f32, year: i32, month: i32, day: i32, hour: i32, minute: i32, seconds: f64) -> DateTime { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_date_time_new(tzoffset, year, month, day, hour, minute, seconds)) + from_glib_full(gst_sys::gst_date_time_new(tzoffset, year, month, day, hour, minute, seconds)) } } pub fn new_from_g_date_time(dt: &glib::DateTime) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_date_time_new_from_g_date_time(dt.to_glib_full())) + from_glib_full(gst_sys::gst_date_time_new_from_g_date_time(dt.to_glib_full())) } } pub fn new_from_iso8601_string(string: &str) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_date_time_new_from_iso8601_string(string.to_glib_none().0)) + from_glib_full(gst_sys::gst_date_time_new_from_iso8601_string(string.to_glib_none().0)) } } pub fn new_from_unix_epoch_local_time(secs: i64) -> DateTime { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_date_time_new_from_unix_epoch_local_time(secs)) + from_glib_full(gst_sys::gst_date_time_new_from_unix_epoch_local_time(secs)) } } pub fn new_from_unix_epoch_utc(secs: i64) -> DateTime { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_date_time_new_from_unix_epoch_utc(secs)) + from_glib_full(gst_sys::gst_date_time_new_from_unix_epoch_utc(secs)) } } pub fn new_local_time(year: i32, month: i32, day: i32, hour: i32, minute: i32, seconds: f64) -> DateTime { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_date_time_new_local_time(year, month, day, hour, minute, seconds)) + from_glib_full(gst_sys::gst_date_time_new_local_time(year, month, day, hour, minute, seconds)) } } pub fn new_now_local_time() -> DateTime { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_date_time_new_now_local_time()) + from_glib_full(gst_sys::gst_date_time_new_now_local_time()) } } pub fn new_now_utc() -> DateTime { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_date_time_new_now_utc()) + from_glib_full(gst_sys::gst_date_time_new_now_utc()) } } pub fn new_y(year: i32) -> DateTime { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_date_time_new_y(year)) + from_glib_full(gst_sys::gst_date_time_new_y(year)) } } pub fn new_ym(year: i32, month: i32) -> DateTime { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_date_time_new_ym(year, month)) + from_glib_full(gst_sys::gst_date_time_new_ym(year, month)) } } pub fn new_ymd(year: i32, month: i32, day: i32) -> DateTime { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_date_time_new_ymd(year, month, day)) + from_glib_full(gst_sys::gst_date_time_new_ymd(year, month, day)) } } pub fn get_day(&self) -> i32 { unsafe { - ffi::gst_date_time_get_day(self.to_glib_none().0) + gst_sys::gst_date_time_get_day(self.to_glib_none().0) } } pub fn get_hour(&self) -> i32 { unsafe { - ffi::gst_date_time_get_hour(self.to_glib_none().0) + gst_sys::gst_date_time_get_hour(self.to_glib_none().0) } } pub fn get_microsecond(&self) -> i32 { unsafe { - ffi::gst_date_time_get_microsecond(self.to_glib_none().0) + gst_sys::gst_date_time_get_microsecond(self.to_glib_none().0) } } pub fn get_minute(&self) -> i32 { unsafe { - ffi::gst_date_time_get_minute(self.to_glib_none().0) + gst_sys::gst_date_time_get_minute(self.to_glib_none().0) } } pub fn get_month(&self) -> i32 { unsafe { - ffi::gst_date_time_get_month(self.to_glib_none().0) + gst_sys::gst_date_time_get_month(self.to_glib_none().0) } } pub fn get_second(&self) -> i32 { unsafe { - ffi::gst_date_time_get_second(self.to_glib_none().0) + gst_sys::gst_date_time_get_second(self.to_glib_none().0) } } pub fn get_time_zone_offset(&self) -> f32 { unsafe { - ffi::gst_date_time_get_time_zone_offset(self.to_glib_none().0) + gst_sys::gst_date_time_get_time_zone_offset(self.to_glib_none().0) } } pub fn get_year(&self) -> i32 { unsafe { - ffi::gst_date_time_get_year(self.to_glib_none().0) + gst_sys::gst_date_time_get_year(self.to_glib_none().0) } } pub fn has_day(&self) -> bool { unsafe { - from_glib(ffi::gst_date_time_has_day(self.to_glib_none().0)) + from_glib(gst_sys::gst_date_time_has_day(self.to_glib_none().0)) } } pub fn has_month(&self) -> bool { unsafe { - from_glib(ffi::gst_date_time_has_month(self.to_glib_none().0)) + from_glib(gst_sys::gst_date_time_has_month(self.to_glib_none().0)) } } pub fn has_second(&self) -> bool { unsafe { - from_glib(ffi::gst_date_time_has_second(self.to_glib_none().0)) + from_glib(gst_sys::gst_date_time_has_second(self.to_glib_none().0)) } } pub fn has_time(&self) -> bool { unsafe { - from_glib(ffi::gst_date_time_has_time(self.to_glib_none().0)) + from_glib(gst_sys::gst_date_time_has_time(self.to_glib_none().0)) } } pub fn has_year(&self) -> bool { unsafe { - from_glib(ffi::gst_date_time_has_year(self.to_glib_none().0)) + from_glib(gst_sys::gst_date_time_has_year(self.to_glib_none().0)) } } pub fn to_g_date_time(&self) -> Option { unsafe { - from_glib_full(ffi::gst_date_time_to_g_date_time(self.to_glib_none().0)) + from_glib_full(gst_sys::gst_date_time_to_g_date_time(self.to_glib_none().0)) } } pub fn to_iso8601_string(&self) -> Option { unsafe { - from_glib_full(ffi::gst_date_time_to_iso8601_string(self.to_glib_none().0)) + from_glib_full(gst_sys::gst_date_time_to_iso8601_string(self.to_glib_none().0)) } } } diff --git a/gstreamer/src/auto/device.rs b/gstreamer/src/auto/device.rs index f8631aed3..a4a2d22df 100644 --- a/gstreamer/src/auto/device.rs +++ b/gstreamer/src/auto/device.rs @@ -6,7 +6,6 @@ use Caps; use Element; use Object; use Structure; -use ffi; use glib; use glib::GString; use glib::object::Cast; @@ -14,15 +13,16 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Device(Object) @extends Object; + pub struct Device(Object) @extends Object; match fn { - get_type => || ffi::gst_device_get_type(), + get_type => || gst_sys::gst_device_get_type(), } } @@ -32,7 +32,7 @@ unsafe impl Sync for Device {} pub const NONE_DEVICE: Option<&Device> = None; pub trait DeviceExt: 'static { - fn create_element<'a, P: Into>>(&self, name: P) -> Option; + fn create_element(&self, name: Option<&str>) -> Option; fn get_caps(&self) -> Option; @@ -52,52 +52,51 @@ pub trait DeviceExt: 'static { } impl> DeviceExt for O { - fn create_element<'a, P: Into>>(&self, name: P) -> Option { - let name = name.into(); + fn create_element(&self, name: Option<&str>) -> Option { unsafe { - from_glib_full(ffi::gst_device_create_element(self.as_ref().to_glib_none().0, name.to_glib_none().0)) + from_glib_full(gst_sys::gst_device_create_element(self.as_ref().to_glib_none().0, name.to_glib_none().0)) } } fn get_caps(&self) -> Option { unsafe { - from_glib_full(ffi::gst_device_get_caps(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_device_get_caps(self.as_ref().to_glib_none().0)) } } fn get_device_class(&self) -> GString { unsafe { - from_glib_full(ffi::gst_device_get_device_class(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_device_get_device_class(self.as_ref().to_glib_none().0)) } } fn get_display_name(&self) -> GString { unsafe { - from_glib_full(ffi::gst_device_get_display_name(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_device_get_display_name(self.as_ref().to_glib_none().0)) } } fn get_properties(&self) -> Option { unsafe { - from_glib_full(ffi::gst_device_get_properties(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_device_get_properties(self.as_ref().to_glib_none().0)) } } fn has_classes(&self, classes: &str) -> bool { unsafe { - from_glib(ffi::gst_device_has_classes(self.as_ref().to_glib_none().0, classes.to_glib_none().0)) + from_glib(gst_sys::gst_device_has_classes(self.as_ref().to_glib_none().0, classes.to_glib_none().0)) } } fn has_classesv(&self, classes: &[&str]) -> bool { unsafe { - from_glib(ffi::gst_device_has_classesv(self.as_ref().to_glib_none().0, classes.to_glib_none().0)) + from_glib(gst_sys::gst_device_has_classesv(self.as_ref().to_glib_none().0, classes.to_glib_none().0)) } } fn reconfigure_element>(&self, element: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_device_reconfigure_element(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0), "Failed to reconfigure the element to use this device") + glib_result_from_gboolean!(gst_sys::gst_device_reconfigure_element(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0), "Failed to reconfigure the element to use this device") } } @@ -110,7 +109,7 @@ impl> DeviceExt for O { } } -unsafe extern "C" fn removed_trampoline(this: *mut ffi::GstDevice, f: glib_ffi::gpointer) +unsafe extern "C" fn removed_trampoline(this: *mut gst_sys::GstDevice, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Device::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer/src/auto/device_monitor.rs b/gstreamer/src/auto/device_monitor.rs index 743a5113a..f098fb384 100644 --- a/gstreamer/src/auto/device_monitor.rs +++ b/gstreamer/src/auto/device_monitor.rs @@ -5,7 +5,6 @@ use Bus; use Device; use Object; -use ffi; use glib; use glib::GString; use glib::StaticType; @@ -15,16 +14,17 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct DeviceMonitor(Object) @extends Object; + pub struct DeviceMonitor(Object) @extends Object; match fn { - get_type => || ffi::gst_device_monitor_get_type(), + get_type => || gst_sys::gst_device_monitor_get_type(), } } @@ -58,57 +58,57 @@ pub trait DeviceMonitorExt: 'static { impl> DeviceMonitorExt for O { fn get_bus(&self) -> Bus { unsafe { - from_glib_full(ffi::gst_device_monitor_get_bus(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_device_monitor_get_bus(self.as_ref().to_glib_none().0)) } } fn get_devices(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_device_monitor_get_devices(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_device_monitor_get_devices(self.as_ref().to_glib_none().0)) } } fn get_providers(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_device_monitor_get_providers(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_device_monitor_get_providers(self.as_ref().to_glib_none().0)) } } fn get_show_all_devices(&self) -> bool { unsafe { - from_glib(ffi::gst_device_monitor_get_show_all_devices(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_device_monitor_get_show_all_devices(self.as_ref().to_glib_none().0)) } } fn set_show_all_devices(&self, show_all: bool) { unsafe { - ffi::gst_device_monitor_set_show_all_devices(self.as_ref().to_glib_none().0, show_all.to_glib()); + gst_sys::gst_device_monitor_set_show_all_devices(self.as_ref().to_glib_none().0, show_all.to_glib()); } } fn start(&self) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_device_monitor_start(self.as_ref().to_glib_none().0), "Failed to start") + glib_result_from_gboolean!(gst_sys::gst_device_monitor_start(self.as_ref().to_glib_none().0), "Failed to start") } } fn stop(&self) { unsafe { - ffi::gst_device_monitor_stop(self.as_ref().to_glib_none().0); + gst_sys::gst_device_monitor_stop(self.as_ref().to_glib_none().0); } } fn get_property_show_all(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"show-all\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"show-all\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_show_all(&self, show_all: bool) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"show-all\0".as_ptr() as *const _, Value::from(&show_all).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"show-all\0".as_ptr() as *const _, Value::from(&show_all).to_glib_none().0); } } @@ -121,7 +121,7 @@ impl> DeviceMonitorExt for O { } } -unsafe extern "C" fn notify_show_all_trampoline(this: *mut ffi::GstDeviceMonitor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_show_all_trampoline(this: *mut gst_sys::GstDeviceMonitor, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&DeviceMonitor::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer/src/auto/device_provider.rs b/gstreamer/src/auto/device_provider.rs index 650cd5cda..60ac886c8 100644 --- a/gstreamer/src/auto/device_provider.rs +++ b/gstreamer/src/auto/device_provider.rs @@ -7,7 +7,6 @@ use Device; use DeviceProviderFactory; use Object; use Plugin; -use ffi; use glib; use glib::GString; use glib::object::Cast; @@ -15,25 +14,25 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; +use gst_sys; use libc; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct DeviceProvider(Object) @extends Object; + pub struct DeviceProvider(Object) @extends Object; match fn { - get_type => || ffi::gst_device_provider_get_type(), + get_type => || gst_sys::gst_device_provider_get_type(), } } impl DeviceProvider { - pub fn register<'a, P: Into>>(plugin: P, name: &str, rank: u32, type_: glib::types::Type) -> Result<(), glib::error::BoolError> { + pub fn register(plugin: Option<&Plugin>, name: &str, rank: u32, type_: glib::types::Type) -> Result<(), glib::error::BoolError> { assert_initialized_main_thread!(); - let plugin = plugin.into(); unsafe { - glib_result_from_gboolean!(ffi::gst_device_provider_register(plugin.to_glib_none().0, name.to_glib_none().0, rank, type_.to_glib()), "Failed to register device provider factory") + glib_result_from_gboolean!(gst_sys::gst_device_provider_register(plugin.to_glib_none().0, name.to_glib_none().0, rank, type_.to_glib()), "Failed to register device provider factory") } } } @@ -74,67 +73,67 @@ pub trait DeviceProviderExt: 'static { impl> DeviceProviderExt for O { fn can_monitor(&self) -> bool { unsafe { - from_glib(ffi::gst_device_provider_can_monitor(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_device_provider_can_monitor(self.as_ref().to_glib_none().0)) } } fn device_add>(&self, device: &P) { unsafe { - ffi::gst_device_provider_device_add(self.as_ref().to_glib_none().0, device.as_ref().to_glib_none().0); + gst_sys::gst_device_provider_device_add(self.as_ref().to_glib_none().0, device.as_ref().to_glib_none().0); } } fn device_remove>(&self, device: &P) { unsafe { - ffi::gst_device_provider_device_remove(self.as_ref().to_glib_none().0, device.as_ref().to_glib_none().0); + gst_sys::gst_device_provider_device_remove(self.as_ref().to_glib_none().0, device.as_ref().to_glib_none().0); } } fn get_bus(&self) -> Bus { unsafe { - from_glib_full(ffi::gst_device_provider_get_bus(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_device_provider_get_bus(self.as_ref().to_glib_none().0)) } } fn get_devices(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_device_provider_get_devices(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_device_provider_get_devices(self.as_ref().to_glib_none().0)) } } fn get_factory(&self) -> Option { unsafe { - from_glib_none(ffi::gst_device_provider_get_factory(self.as_ref().to_glib_none().0)) + from_glib_none(gst_sys::gst_device_provider_get_factory(self.as_ref().to_glib_none().0)) } } fn get_hidden_providers(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_device_provider_get_hidden_providers(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_device_provider_get_hidden_providers(self.as_ref().to_glib_none().0)) } } fn hide_provider(&self, name: &str) { unsafe { - ffi::gst_device_provider_hide_provider(self.as_ref().to_glib_none().0, name.to_glib_none().0); + gst_sys::gst_device_provider_hide_provider(self.as_ref().to_glib_none().0, name.to_glib_none().0); } } fn start(&self) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_device_provider_start(self.as_ref().to_glib_none().0), "Failed to start") + glib_result_from_gboolean!(gst_sys::gst_device_provider_start(self.as_ref().to_glib_none().0), "Failed to start") } } fn stop(&self) { unsafe { - ffi::gst_device_provider_stop(self.as_ref().to_glib_none().0); + gst_sys::gst_device_provider_stop(self.as_ref().to_glib_none().0); } } fn unhide_provider(&self, name: &str) { unsafe { - ffi::gst_device_provider_unhide_provider(self.as_ref().to_glib_none().0, name.to_glib_none().0); + gst_sys::gst_device_provider_unhide_provider(self.as_ref().to_glib_none().0, name.to_glib_none().0); } } @@ -155,13 +154,13 @@ impl> DeviceProviderExt for O { } } -unsafe extern "C" fn provider_hidden_trampoline(this: *mut ffi::GstDeviceProvider, object: *mut libc::c_char, f: glib_ffi::gpointer) +unsafe extern "C" fn provider_hidden_trampoline(this: *mut gst_sys::GstDeviceProvider, object: *mut libc::c_char, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&DeviceProvider::from_glib_borrow(this).unsafe_cast(), &GString::from_glib_borrow(object)) } -unsafe extern "C" fn provider_unhidden_trampoline(this: *mut ffi::GstDeviceProvider, object: *mut libc::c_char, f: glib_ffi::gpointer) +unsafe extern "C" fn provider_unhidden_trampoline(this: *mut gst_sys::GstDeviceProvider, object: *mut libc::c_char, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&DeviceProvider::from_glib_borrow(this).unsafe_cast(), &GString::from_glib_borrow(object)) diff --git a/gstreamer/src/auto/device_provider_factory.rs b/gstreamer/src/auto/device_provider_factory.rs index 33ebcb097..56eceefd2 100644 --- a/gstreamer/src/auto/device_provider_factory.rs +++ b/gstreamer/src/auto/device_provider_factory.rs @@ -6,75 +6,74 @@ use DeviceProvider; use Object; use PluginFeature; use Rank; -use ffi; use glib; use glib::GString; use glib::translate::*; +use gst_sys; glib_wrapper! { - pub struct DeviceProviderFactory(Object) @extends PluginFeature, Object; + pub struct DeviceProviderFactory(Object) @extends PluginFeature, Object; match fn { - get_type => || ffi::gst_device_provider_factory_get_type(), + get_type => || gst_sys::gst_device_provider_factory_get_type(), } } impl DeviceProviderFactory { pub fn get(&self) -> Option { unsafe { - from_glib_full(ffi::gst_device_provider_factory_get(self.to_glib_none().0)) + from_glib_full(gst_sys::gst_device_provider_factory_get(self.to_glib_none().0)) } } pub fn get_device_provider_type(&self) -> glib::types::Type { unsafe { - from_glib(ffi::gst_device_provider_factory_get_device_provider_type(self.to_glib_none().0)) + from_glib(gst_sys::gst_device_provider_factory_get_device_provider_type(self.to_glib_none().0)) } } pub fn get_metadata(&self, key: &str) -> Option { unsafe { - from_glib_none(ffi::gst_device_provider_factory_get_metadata(self.to_glib_none().0, key.to_glib_none().0)) + from_glib_none(gst_sys::gst_device_provider_factory_get_metadata(self.to_glib_none().0, key.to_glib_none().0)) } } pub fn get_metadata_keys(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_device_provider_factory_get_metadata_keys(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_device_provider_factory_get_metadata_keys(self.to_glib_none().0)) } } - pub fn has_classes<'a, P: Into>>(&self, classes: P) -> bool { - let classes = classes.into(); + pub fn has_classes(&self, classes: Option<&str>) -> bool { unsafe { - from_glib(ffi::gst_device_provider_factory_has_classes(self.to_glib_none().0, classes.to_glib_none().0)) + from_glib(gst_sys::gst_device_provider_factory_has_classes(self.to_glib_none().0, classes.to_glib_none().0)) } } pub fn has_classesv(&self, classes: &[&str]) -> bool { unsafe { - from_glib(ffi::gst_device_provider_factory_has_classesv(self.to_glib_none().0, classes.to_glib_none().0)) + from_glib(gst_sys::gst_device_provider_factory_has_classesv(self.to_glib_none().0, classes.to_glib_none().0)) } } pub fn find(name: &str) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_device_provider_factory_find(name.to_glib_none().0)) + from_glib_full(gst_sys::gst_device_provider_factory_find(name.to_glib_none().0)) } } pub fn get_by_name(factoryname: &str) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_device_provider_factory_get_by_name(factoryname.to_glib_none().0)) + from_glib_full(gst_sys::gst_device_provider_factory_get_by_name(factoryname.to_glib_none().0)) } } pub fn list_get_device_providers(minrank: Rank) -> Vec { assert_initialized_main_thread!(); unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_device_provider_factory_list_get_device_providers(minrank.to_glib())) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_device_provider_factory_list_get_device_providers(minrank.to_glib())) } } } diff --git a/gstreamer/src/auto/element.rs b/gstreamer/src/auto/element.rs index 42178a3fd..104e6e101 100644 --- a/gstreamer/src/auto/element.rs +++ b/gstreamer/src/auto/element.rs @@ -16,42 +16,40 @@ use PadLinkCheck; use PadTemplate; use Plugin; use URIType; -use ffi; use glib; use glib::object::Cast; use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem::transmute; use std::ptr; glib_wrapper! { - pub struct Element(Object) @extends Object; + pub struct Element(Object) @extends Object; match fn { - get_type => || ffi::gst_element_get_type(), + get_type => || gst_sys::gst_element_get_type(), } } impl Element { - pub fn make_from_uri<'a, P: Into>>(type_: URIType, uri: &str, elementname: P) -> Result { + pub fn make_from_uri(type_: URIType, uri: &str, elementname: Option<&str>) -> Result { assert_initialized_main_thread!(); - let elementname = elementname.into(); unsafe { let mut error = ptr::null_mut(); - let ret = ffi::gst_element_make_from_uri(type_.to_glib(), uri.to_glib_none().0, elementname.to_glib_none().0, &mut error); + let ret = gst_sys::gst_element_make_from_uri(type_.to_glib(), uri.to_glib_none().0, elementname.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) } } } - pub fn register<'a, P: Into>>(plugin: P, name: &str, rank: u32, type_: glib::types::Type) -> Result<(), glib::error::BoolError> { + pub fn register(plugin: Option<&Plugin>, name: &str, rank: u32, type_: glib::types::Type) -> Result<(), glib::error::BoolError> { assert_initialized_main_thread!(); - let plugin = plugin.into(); unsafe { - glib_result_from_gboolean!(ffi::gst_element_register(plugin.to_glib_none().0, name.to_glib_none().0, rank, type_.to_glib()), "Failed to register element factory") + glib_result_from_gboolean!(gst_sys::gst_element_register(plugin.to_glib_none().0, name.to_glib_none().0, rank, type_.to_glib()), "Failed to register element factory") } } } @@ -83,7 +81,7 @@ pub trait ElementExt: 'static { fn get_clock(&self) -> Option; - fn get_compatible_pad<'a, P: IsA, Q: Into>>(&self, pad: &P, caps: Q) -> Option; + fn get_compatible_pad>(&self, pad: &P, caps: Option<&Caps>) -> Option; fn get_compatible_pad_template(&self, compattempl: &PadTemplate) -> Option; @@ -109,22 +107,22 @@ pub trait ElementExt: 'static { fn link>(&self, dest: &P) -> Result<(), glib::error::BoolError>; - fn link_filtered<'a, P: IsA, Q: Into>>(&self, dest: &P, filter: Q) -> Result<(), glib::error::BoolError>; + fn link_filtered>(&self, dest: &P, filter: Option<&Caps>) -> Result<(), glib::error::BoolError>; //fn link_many>(&self, element_2: &P, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> bool; - fn link_pads<'a, 'b, P: Into>, Q: IsA, R: Into>>(&self, srcpadname: P, dest: &Q, destpadname: R) -> Result<(), glib::error::BoolError>; + fn link_pads>(&self, srcpadname: Option<&str>, dest: &P, destpadname: Option<&str>) -> Result<(), glib::error::BoolError>; - fn link_pads_filtered<'a, 'b, 'c, P: Into>, Q: IsA, R: Into>, S: Into>>(&self, srcpadname: P, dest: &Q, destpadname: R, filter: S) -> Result<(), glib::error::BoolError>; + fn link_pads_filtered>(&self, srcpadname: Option<&str>, dest: &P, destpadname: Option<&str>, filter: Option<&Caps>) -> Result<(), glib::error::BoolError>; - fn link_pads_full<'a, 'b, P: Into>, Q: IsA, R: Into>>(&self, srcpadname: P, dest: &Q, destpadname: R, flags: PadLinkCheck) -> Result<(), glib::error::BoolError>; + fn link_pads_full>(&self, srcpadname: Option<&str>, dest: &P, destpadname: Option<&str>, flags: PadLinkCheck) -> Result<(), glib::error::BoolError>; fn lost_state(&self); - //fn message_full<'a, 'b, P: Into>, Q: Into>>(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: P, debug: Q, file: &str, function: &str, line: i32); + //fn message_full(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: i32); //#[cfg(any(feature = "v1_10", feature = "dox"))] - //fn message_full_with_details<'a, 'b, P: Into>, Q: Into>>(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: P, debug: Q, file: &str, function: &str, line: i32, structure: &mut Structure); + //fn message_full_with_details(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: i32, structure: &mut Structure); fn no_more_pads(&self); @@ -136,13 +134,13 @@ pub trait ElementExt: 'static { fn remove_pad>(&self, pad: &P) -> Result<(), glib::error::BoolError>; - fn request_pad<'a, 'b, P: Into>, Q: Into>>(&self, templ: &PadTemplate, name: P, caps: Q) -> Option; + fn request_pad(&self, templ: &PadTemplate, name: Option<&str>, caps: Option<&Caps>) -> Option; fn set_base_time(&self, time: ClockTime); - fn set_bus<'a, P: Into>>(&self, bus: P); + fn set_bus(&self, bus: Option<&Bus>); - fn set_clock<'a, P: IsA + 'a, Q: Into>>(&self, clock: Q) -> Result<(), glib::error::BoolError>; + fn set_clock>(&self, clock: Option<&P>) -> Result<(), glib::error::BoolError>; fn set_context(&self, context: &Context); @@ -168,26 +166,26 @@ pub trait ElementExt: 'static { impl> ElementExt for O { fn abort_state(&self) { unsafe { - ffi::gst_element_abort_state(self.as_ref().to_glib_none().0); + gst_sys::gst_element_abort_state(self.as_ref().to_glib_none().0); } } fn add_pad>(&self, pad: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_element_add_pad(self.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0), "Failed to add pad") + glib_result_from_gboolean!(gst_sys::gst_element_add_pad(self.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0), "Failed to add pad") } } fn create_all_pads(&self) { unsafe { - ffi::gst_element_create_all_pads(self.as_ref().to_glib_none().0); + gst_sys::gst_element_create_all_pads(self.as_ref().to_glib_none().0); } } #[cfg(any(feature = "v1_14", feature = "dox"))] fn foreach_pad bool>(&self, func: P) -> bool { let func_data: P = func; - unsafe extern "C" fn func_func bool>(element: *mut ffi::GstElement, pad: *mut ffi::GstPad, user_data: glib_ffi::gpointer) -> glib_ffi::gboolean { + unsafe extern "C" fn func_func bool>(element: *mut gst_sys::GstElement, pad: *mut gst_sys::GstPad, user_data: glib_sys::gpointer) -> glib_sys::gboolean { let element = from_glib_borrow(element); let pad = from_glib_borrow(pad); let callback: *mut P = user_data as *const _ as usize as *mut P; @@ -197,14 +195,14 @@ impl> ElementExt for O { let func = Some(func_func::

as _); let super_callback0: &P = &func_data; unsafe { - from_glib(ffi::gst_element_foreach_pad(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) + from_glib(gst_sys::gst_element_foreach_pad(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) } } #[cfg(any(feature = "v1_14", feature = "dox"))] fn foreach_sink_pad bool>(&self, func: P) -> bool { let func_data: P = func; - unsafe extern "C" fn func_func bool>(element: *mut ffi::GstElement, pad: *mut ffi::GstPad, user_data: glib_ffi::gpointer) -> glib_ffi::gboolean { + unsafe extern "C" fn func_func bool>(element: *mut gst_sys::GstElement, pad: *mut gst_sys::GstPad, user_data: glib_sys::gpointer) -> glib_sys::gboolean { let element = from_glib_borrow(element); let pad = from_glib_borrow(pad); let callback: *mut P = user_data as *const _ as usize as *mut P; @@ -214,14 +212,14 @@ impl> ElementExt for O { let func = Some(func_func::

as _); let super_callback0: &P = &func_data; unsafe { - from_glib(ffi::gst_element_foreach_sink_pad(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) + from_glib(gst_sys::gst_element_foreach_sink_pad(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) } } #[cfg(any(feature = "v1_14", feature = "dox"))] fn foreach_src_pad bool>(&self, func: P) -> bool { let func_data: P = func; - unsafe extern "C" fn func_func bool>(element: *mut ffi::GstElement, pad: *mut ffi::GstPad, user_data: glib_ffi::gpointer) -> glib_ffi::gboolean { + unsafe extern "C" fn func_func bool>(element: *mut gst_sys::GstElement, pad: *mut gst_sys::GstPad, user_data: glib_sys::gpointer) -> glib_sys::gboolean { let element = from_glib_borrow(element); let pad = from_glib_borrow(pad); let callback: *mut P = user_data as *const _ as usize as *mut P; @@ -231,247 +229,234 @@ impl> ElementExt for O { let func = Some(func_func::

as _); let super_callback0: &P = &func_data; unsafe { - from_glib(ffi::gst_element_foreach_src_pad(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) + from_glib(gst_sys::gst_element_foreach_src_pad(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _)) } } fn get_base_time(&self) -> ClockTime { unsafe { - from_glib(ffi::gst_element_get_base_time(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_element_get_base_time(self.as_ref().to_glib_none().0)) } } fn get_bus(&self) -> Option { unsafe { - from_glib_full(ffi::gst_element_get_bus(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_element_get_bus(self.as_ref().to_glib_none().0)) } } fn get_clock(&self) -> Option { unsafe { - from_glib_full(ffi::gst_element_get_clock(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_element_get_clock(self.as_ref().to_glib_none().0)) } } - fn get_compatible_pad<'a, P: IsA, Q: Into>>(&self, pad: &P, caps: Q) -> Option { - let caps = caps.into(); + fn get_compatible_pad>(&self, pad: &P, caps: Option<&Caps>) -> Option { unsafe { - from_glib_full(ffi::gst_element_get_compatible_pad(self.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0, caps.to_glib_none().0)) + from_glib_full(gst_sys::gst_element_get_compatible_pad(self.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0, caps.to_glib_none().0)) } } fn get_compatible_pad_template(&self, compattempl: &PadTemplate) -> Option { unsafe { - from_glib_none(ffi::gst_element_get_compatible_pad_template(self.as_ref().to_glib_none().0, compattempl.to_glib_none().0)) + from_glib_none(gst_sys::gst_element_get_compatible_pad_template(self.as_ref().to_glib_none().0, compattempl.to_glib_none().0)) } } fn get_context(&self, context_type: &str) -> Option { unsafe { - from_glib_full(ffi::gst_element_get_context(self.as_ref().to_glib_none().0, context_type.to_glib_none().0)) + from_glib_full(gst_sys::gst_element_get_context(self.as_ref().to_glib_none().0, context_type.to_glib_none().0)) } } fn get_contexts(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_element_get_contexts(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_element_get_contexts(self.as_ref().to_glib_none().0)) } } fn get_factory(&self) -> Option { unsafe { - from_glib_none(ffi::gst_element_get_factory(self.as_ref().to_glib_none().0)) + from_glib_none(gst_sys::gst_element_get_factory(self.as_ref().to_glib_none().0)) } } fn get_request_pad(&self, name: &str) -> Option { unsafe { - from_glib_full(ffi::gst_element_get_request_pad(self.as_ref().to_glib_none().0, name.to_glib_none().0)) + from_glib_full(gst_sys::gst_element_get_request_pad(self.as_ref().to_glib_none().0, name.to_glib_none().0)) } } fn get_start_time(&self) -> ClockTime { unsafe { - from_glib(ffi::gst_element_get_start_time(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_element_get_start_time(self.as_ref().to_glib_none().0)) } } fn get_static_pad(&self, name: &str) -> Option { unsafe { - from_glib_full(ffi::gst_element_get_static_pad(self.as_ref().to_glib_none().0, name.to_glib_none().0)) + from_glib_full(gst_sys::gst_element_get_static_pad(self.as_ref().to_glib_none().0, name.to_glib_none().0)) } } fn is_locked_state(&self) -> bool { unsafe { - from_glib(ffi::gst_element_is_locked_state(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_element_is_locked_state(self.as_ref().to_glib_none().0)) } } //fn iterate_pads(&self) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_element_iterate_pads() } + // unsafe { TODO: call gst_sys:gst_element_iterate_pads() } //} //fn iterate_sink_pads(&self) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_element_iterate_sink_pads() } + // unsafe { TODO: call gst_sys:gst_element_iterate_sink_pads() } //} //fn iterate_src_pads(&self) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_element_iterate_src_pads() } + // unsafe { TODO: call gst_sys:gst_element_iterate_src_pads() } //} fn link>(&self, dest: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_element_link(self.as_ref().to_glib_none().0, dest.as_ref().to_glib_none().0), "Failed to link elements") + glib_result_from_gboolean!(gst_sys::gst_element_link(self.as_ref().to_glib_none().0, dest.as_ref().to_glib_none().0), "Failed to link elements") } } - fn link_filtered<'a, P: IsA, Q: Into>>(&self, dest: &P, filter: Q) -> Result<(), glib::error::BoolError> { - let filter = filter.into(); + fn link_filtered>(&self, dest: &P, filter: Option<&Caps>) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_element_link_filtered(self.as_ref().to_glib_none().0, dest.as_ref().to_glib_none().0, filter.to_glib_none().0), "Failed to link elements") + glib_result_from_gboolean!(gst_sys::gst_element_link_filtered(self.as_ref().to_glib_none().0, dest.as_ref().to_glib_none().0, filter.to_glib_none().0), "Failed to link elements") } } //fn link_many>(&self, element_2: &P, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> bool { - // unsafe { TODO: call ffi::gst_element_link_many() } + // unsafe { TODO: call gst_sys:gst_element_link_many() } //} - fn link_pads<'a, 'b, P: Into>, Q: IsA, R: Into>>(&self, srcpadname: P, dest: &Q, destpadname: R) -> Result<(), glib::error::BoolError> { - let srcpadname = srcpadname.into(); - let destpadname = destpadname.into(); + fn link_pads>(&self, srcpadname: Option<&str>, dest: &P, destpadname: Option<&str>) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_element_link_pads(self.as_ref().to_glib_none().0, srcpadname.to_glib_none().0, dest.as_ref().to_glib_none().0, destpadname.to_glib_none().0), "Failed to link pads") + glib_result_from_gboolean!(gst_sys::gst_element_link_pads(self.as_ref().to_glib_none().0, srcpadname.to_glib_none().0, dest.as_ref().to_glib_none().0, destpadname.to_glib_none().0), "Failed to link pads") } } - fn link_pads_filtered<'a, 'b, 'c, P: Into>, Q: IsA, R: Into>, S: Into>>(&self, srcpadname: P, dest: &Q, destpadname: R, filter: S) -> Result<(), glib::error::BoolError> { - let srcpadname = srcpadname.into(); - let destpadname = destpadname.into(); - let filter = filter.into(); + fn link_pads_filtered>(&self, srcpadname: Option<&str>, dest: &P, destpadname: Option<&str>, filter: Option<&Caps>) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_element_link_pads_filtered(self.as_ref().to_glib_none().0, srcpadname.to_glib_none().0, dest.as_ref().to_glib_none().0, destpadname.to_glib_none().0, filter.to_glib_none().0), "Failed to link pads") + glib_result_from_gboolean!(gst_sys::gst_element_link_pads_filtered(self.as_ref().to_glib_none().0, srcpadname.to_glib_none().0, dest.as_ref().to_glib_none().0, destpadname.to_glib_none().0, filter.to_glib_none().0), "Failed to link pads") } } - fn link_pads_full<'a, 'b, P: Into>, Q: IsA, R: Into>>(&self, srcpadname: P, dest: &Q, destpadname: R, flags: PadLinkCheck) -> Result<(), glib::error::BoolError> { - let srcpadname = srcpadname.into(); - let destpadname = destpadname.into(); + fn link_pads_full>(&self, srcpadname: Option<&str>, dest: &P, destpadname: Option<&str>, flags: PadLinkCheck) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_element_link_pads_full(self.as_ref().to_glib_none().0, srcpadname.to_glib_none().0, dest.as_ref().to_glib_none().0, destpadname.to_glib_none().0, flags.to_glib()), "Failed to link pads") + glib_result_from_gboolean!(gst_sys::gst_element_link_pads_full(self.as_ref().to_glib_none().0, srcpadname.to_glib_none().0, dest.as_ref().to_glib_none().0, destpadname.to_glib_none().0, flags.to_glib()), "Failed to link pads") } } fn lost_state(&self) { unsafe { - ffi::gst_element_lost_state(self.as_ref().to_glib_none().0); + gst_sys::gst_element_lost_state(self.as_ref().to_glib_none().0); } } - //fn message_full<'a, 'b, P: Into>, Q: Into>>(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: P, debug: Q, file: &str, function: &str, line: i32) { - // unsafe { TODO: call ffi::gst_element_message_full() } + //fn message_full(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: i32) { + // unsafe { TODO: call gst_sys:gst_element_message_full() } //} //#[cfg(any(feature = "v1_10", feature = "dox"))] - //fn message_full_with_details<'a, 'b, P: Into>, Q: Into>>(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: P, debug: Q, file: &str, function: &str, line: i32, structure: &mut Structure) { - // unsafe { TODO: call ffi::gst_element_message_full_with_details() } + //fn message_full_with_details(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: i32, structure: &mut Structure) { + // unsafe { TODO: call gst_sys:gst_element_message_full_with_details() } //} fn no_more_pads(&self) { unsafe { - ffi::gst_element_no_more_pads(self.as_ref().to_glib_none().0); + gst_sys::gst_element_no_more_pads(self.as_ref().to_glib_none().0); } } fn post_message(&self, message: &Message) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_element_post_message(self.as_ref().to_glib_none().0, message.to_glib_full()), "Failed to post message") + glib_result_from_gboolean!(gst_sys::gst_element_post_message(self.as_ref().to_glib_none().0, message.to_glib_full()), "Failed to post message") } } fn provide_clock(&self) -> Option { unsafe { - from_glib_full(ffi::gst_element_provide_clock(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_element_provide_clock(self.as_ref().to_glib_none().0)) } } fn release_request_pad>(&self, pad: &P) { unsafe { - ffi::gst_element_release_request_pad(self.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0); + gst_sys::gst_element_release_request_pad(self.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0); } } fn remove_pad>(&self, pad: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_element_remove_pad(self.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0), "Failed to remove pad") + glib_result_from_gboolean!(gst_sys::gst_element_remove_pad(self.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0), "Failed to remove pad") } } - fn request_pad<'a, 'b, P: Into>, Q: Into>>(&self, templ: &PadTemplate, name: P, caps: Q) -> Option { - let name = name.into(); - let caps = caps.into(); + fn request_pad(&self, templ: &PadTemplate, name: Option<&str>, caps: Option<&Caps>) -> Option { unsafe { - from_glib_full(ffi::gst_element_request_pad(self.as_ref().to_glib_none().0, templ.to_glib_none().0, name.to_glib_none().0, caps.to_glib_none().0)) + from_glib_full(gst_sys::gst_element_request_pad(self.as_ref().to_glib_none().0, templ.to_glib_none().0, name.to_glib_none().0, caps.to_glib_none().0)) } } fn set_base_time(&self, time: ClockTime) { unsafe { - ffi::gst_element_set_base_time(self.as_ref().to_glib_none().0, time.to_glib()); + gst_sys::gst_element_set_base_time(self.as_ref().to_glib_none().0, time.to_glib()); } } - fn set_bus<'a, P: Into>>(&self, bus: P) { - let bus = bus.into(); + fn set_bus(&self, bus: Option<&Bus>) { unsafe { - ffi::gst_element_set_bus(self.as_ref().to_glib_none().0, bus.to_glib_none().0); + gst_sys::gst_element_set_bus(self.as_ref().to_glib_none().0, bus.to_glib_none().0); } } - fn set_clock<'a, P: IsA + 'a, Q: Into>>(&self, clock: Q) -> Result<(), glib::error::BoolError> { - let clock = clock.into(); + fn set_clock>(&self, clock: Option<&P>) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_element_set_clock(self.as_ref().to_glib_none().0, clock.map(|p| p.as_ref()).to_glib_none().0), "Failed to set clock") + glib_result_from_gboolean!(gst_sys::gst_element_set_clock(self.as_ref().to_glib_none().0, clock.map(|p| p.as_ref()).to_glib_none().0), "Failed to set clock") } } fn set_context(&self, context: &Context) { unsafe { - ffi::gst_element_set_context(self.as_ref().to_glib_none().0, context.to_glib_none().0); + gst_sys::gst_element_set_context(self.as_ref().to_glib_none().0, context.to_glib_none().0); } } fn set_locked_state(&self, locked_state: bool) -> bool { unsafe { - from_glib(ffi::gst_element_set_locked_state(self.as_ref().to_glib_none().0, locked_state.to_glib())) + from_glib(gst_sys::gst_element_set_locked_state(self.as_ref().to_glib_none().0, locked_state.to_glib())) } } fn set_start_time(&self, time: ClockTime) { unsafe { - ffi::gst_element_set_start_time(self.as_ref().to_glib_none().0, time.to_glib()); + gst_sys::gst_element_set_start_time(self.as_ref().to_glib_none().0, time.to_glib()); } } fn sync_state_with_parent(&self) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_element_sync_state_with_parent(self.as_ref().to_glib_none().0), "Failed to sync state with parent") + glib_result_from_gboolean!(gst_sys::gst_element_sync_state_with_parent(self.as_ref().to_glib_none().0), "Failed to sync state with parent") } } fn unlink>(&self, dest: &P) { unsafe { - ffi::gst_element_unlink(self.as_ref().to_glib_none().0, dest.as_ref().to_glib_none().0); + gst_sys::gst_element_unlink(self.as_ref().to_glib_none().0, dest.as_ref().to_glib_none().0); } } //fn unlink_many>(&self, element_2: &P, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { - // unsafe { TODO: call ffi::gst_element_unlink_many() } + // unsafe { TODO: call gst_sys:gst_element_unlink_many() } //} fn unlink_pads>(&self, srcpadname: &str, dest: &P, destpadname: &str) { unsafe { - ffi::gst_element_unlink_pads(self.as_ref().to_glib_none().0, srcpadname.to_glib_none().0, dest.as_ref().to_glib_none().0, destpadname.to_glib_none().0); + gst_sys::gst_element_unlink_pads(self.as_ref().to_glib_none().0, srcpadname.to_glib_none().0, dest.as_ref().to_glib_none().0, destpadname.to_glib_none().0); } } @@ -500,19 +485,19 @@ impl> ElementExt for O { } } -unsafe extern "C" fn no_more_pads_trampoline(this: *mut ffi::GstElement, f: glib_ffi::gpointer) +unsafe extern "C" fn no_more_pads_trampoline(this: *mut gst_sys::GstElement, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Element::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn pad_added_trampoline(this: *mut ffi::GstElement, new_pad: *mut ffi::GstPad, f: glib_ffi::gpointer) +unsafe extern "C" fn pad_added_trampoline(this: *mut gst_sys::GstElement, new_pad: *mut gst_sys::GstPad, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Element::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(new_pad)) } -unsafe extern "C" fn pad_removed_trampoline(this: *mut ffi::GstElement, old_pad: *mut ffi::GstPad, f: glib_ffi::gpointer) +unsafe extern "C" fn pad_removed_trampoline(this: *mut gst_sys::GstElement, old_pad: *mut gst_sys::GstPad, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Element::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(old_pad)) diff --git a/gstreamer/src/auto/element_factory.rs b/gstreamer/src/auto/element_factory.rs index d3c3693e2..3493b9eb4 100644 --- a/gstreamer/src/auto/element_factory.rs +++ b/gstreamer/src/auto/element_factory.rs @@ -11,131 +11,129 @@ use PluginFeature; use Rank; use StaticPadTemplate; use URIType; -use ffi; use glib; use glib::GString; use glib::translate::*; +use gst_sys; glib_wrapper! { - pub struct ElementFactory(Object) @extends PluginFeature, Object; + pub struct ElementFactory(Object) @extends PluginFeature, Object; match fn { - get_type => || ffi::gst_element_factory_get_type(), + get_type => || gst_sys::gst_element_factory_get_type(), } } impl ElementFactory { pub fn can_sink_all_caps(&self, caps: &Caps) -> bool { unsafe { - from_glib(ffi::gst_element_factory_can_sink_all_caps(self.to_glib_none().0, caps.to_glib_none().0)) + from_glib(gst_sys::gst_element_factory_can_sink_all_caps(self.to_glib_none().0, caps.to_glib_none().0)) } } pub fn can_sink_any_caps(&self, caps: &Caps) -> bool { unsafe { - from_glib(ffi::gst_element_factory_can_sink_any_caps(self.to_glib_none().0, caps.to_glib_none().0)) + from_glib(gst_sys::gst_element_factory_can_sink_any_caps(self.to_glib_none().0, caps.to_glib_none().0)) } } pub fn can_src_all_caps(&self, caps: &Caps) -> bool { unsafe { - from_glib(ffi::gst_element_factory_can_src_all_caps(self.to_glib_none().0, caps.to_glib_none().0)) + from_glib(gst_sys::gst_element_factory_can_src_all_caps(self.to_glib_none().0, caps.to_glib_none().0)) } } pub fn can_src_any_caps(&self, caps: &Caps) -> bool { unsafe { - from_glib(ffi::gst_element_factory_can_src_any_caps(self.to_glib_none().0, caps.to_glib_none().0)) + from_glib(gst_sys::gst_element_factory_can_src_any_caps(self.to_glib_none().0, caps.to_glib_none().0)) } } - pub fn create<'a, P: Into>>(&self, name: P) -> Option { - let name = name.into(); + pub fn create(&self, name: Option<&str>) -> Option { unsafe { - from_glib_none(ffi::gst_element_factory_create(self.to_glib_none().0, name.to_glib_none().0)) + from_glib_none(gst_sys::gst_element_factory_create(self.to_glib_none().0, name.to_glib_none().0)) } } pub fn get_element_type(&self) -> glib::types::Type { unsafe { - from_glib(ffi::gst_element_factory_get_element_type(self.to_glib_none().0)) + from_glib(gst_sys::gst_element_factory_get_element_type(self.to_glib_none().0)) } } pub fn get_metadata(&self, key: &str) -> Option { unsafe { - from_glib_none(ffi::gst_element_factory_get_metadata(self.to_glib_none().0, key.to_glib_none().0)) + from_glib_none(gst_sys::gst_element_factory_get_metadata(self.to_glib_none().0, key.to_glib_none().0)) } } pub fn get_metadata_keys(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_element_factory_get_metadata_keys(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_element_factory_get_metadata_keys(self.to_glib_none().0)) } } pub fn get_num_pad_templates(&self) -> u32 { unsafe { - ffi::gst_element_factory_get_num_pad_templates(self.to_glib_none().0) + gst_sys::gst_element_factory_get_num_pad_templates(self.to_glib_none().0) } } pub fn get_static_pad_templates(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_element_factory_get_static_pad_templates(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_sys::gst_element_factory_get_static_pad_templates(self.to_glib_none().0)) } } pub fn get_uri_protocols(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_element_factory_get_uri_protocols(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_sys::gst_element_factory_get_uri_protocols(self.to_glib_none().0)) } } pub fn get_uri_type(&self) -> URIType { unsafe { - from_glib(ffi::gst_element_factory_get_uri_type(self.to_glib_none().0)) + from_glib(gst_sys::gst_element_factory_get_uri_type(self.to_glib_none().0)) } } pub fn has_interface(&self, interfacename: &str) -> bool { unsafe { - from_glib(ffi::gst_element_factory_has_interface(self.to_glib_none().0, interfacename.to_glib_none().0)) + from_glib(gst_sys::gst_element_factory_has_interface(self.to_glib_none().0, interfacename.to_glib_none().0)) } } pub fn list_is_type(&self, type_: ElementFactoryListType) -> bool { unsafe { - from_glib(ffi::gst_element_factory_list_is_type(self.to_glib_none().0, type_)) + from_glib(gst_sys::gst_element_factory_list_is_type(self.to_glib_none().0, type_)) } } pub fn find(name: &str) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_element_factory_find(name.to_glib_none().0)) + from_glib_full(gst_sys::gst_element_factory_find(name.to_glib_none().0)) } } pub fn list_filter(list: &[ElementFactory], caps: &Caps, direction: PadDirection, subsetonly: bool) -> Vec { assert_initialized_main_thread!(); unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_element_factory_list_filter(list.to_glib_none().0, caps.to_glib_none().0, direction.to_glib(), subsetonly.to_glib())) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_element_factory_list_filter(list.to_glib_none().0, caps.to_glib_none().0, direction.to_glib(), subsetonly.to_glib())) } } pub fn list_get_elements(type_: ElementFactoryListType, minrank: Rank) -> Vec { assert_initialized_main_thread!(); unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_element_factory_list_get_elements(type_, minrank.to_glib())) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_element_factory_list_get_elements(type_, minrank.to_glib())) } } - pub fn make<'a, P: Into>>(factoryname: &str, name: P) -> Option { + pub fn make(factoryname: &str, name: Option<&str>) -> Option { assert_initialized_main_thread!(); - let name = name.into(); unsafe { - from_glib_none(ffi::gst_element_factory_make(factoryname.to_glib_none().0, name.to_glib_none().0)) + from_glib_none(gst_sys::gst_element_factory_make(factoryname.to_glib_none().0, name.to_glib_none().0)) } } } diff --git a/gstreamer/src/auto/enums.rs b/gstreamer/src/auto/enums.rs index 2aa23a267..4647b30ac 100644 --- a/gstreamer/src/auto/enums.rs +++ b/gstreamer/src/auto/enums.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::Quark; use glib::StaticType; use glib::Type; @@ -12,7 +11,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_sys; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] @@ -27,22 +27,22 @@ pub enum BufferingMode { #[doc(hidden)] impl ToGlib for BufferingMode { - type GlibType = ffi::GstBufferingMode; + type GlibType = gst_sys::GstBufferingMode; - fn to_glib(&self) -> ffi::GstBufferingMode { + fn to_glib(&self) -> gst_sys::GstBufferingMode { match *self { - BufferingMode::Stream => ffi::GST_BUFFERING_STREAM, - BufferingMode::Download => ffi::GST_BUFFERING_DOWNLOAD, - BufferingMode::Timeshift => ffi::GST_BUFFERING_TIMESHIFT, - BufferingMode::Live => ffi::GST_BUFFERING_LIVE, + BufferingMode::Stream => gst_sys::GST_BUFFERING_STREAM, + BufferingMode::Download => gst_sys::GST_BUFFERING_DOWNLOAD, + BufferingMode::Timeshift => gst_sys::GST_BUFFERING_TIMESHIFT, + BufferingMode::Live => gst_sys::GST_BUFFERING_LIVE, BufferingMode::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for BufferingMode { - fn from_glib(value: ffi::GstBufferingMode) -> Self { +impl FromGlib for BufferingMode { + fn from_glib(value: gst_sys::GstBufferingMode) -> Self { skip_assert_initialized!(); match value { 0 => BufferingMode::Stream, @@ -56,7 +56,7 @@ impl FromGlib for BufferingMode { impl StaticType for BufferingMode { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_buffering_mode_get_type()) } + unsafe { from_glib(gst_sys::gst_buffering_mode_get_type()) } } } @@ -68,13 +68,13 @@ impl<'a> FromValueOptional<'a> for BufferingMode { impl<'a> FromValue<'a> for BufferingMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for BufferingMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -90,21 +90,21 @@ pub enum BusSyncReply { #[doc(hidden)] impl ToGlib for BusSyncReply { - type GlibType = ffi::GstBusSyncReply; + type GlibType = gst_sys::GstBusSyncReply; - fn to_glib(&self) -> ffi::GstBusSyncReply { + fn to_glib(&self) -> gst_sys::GstBusSyncReply { match *self { - BusSyncReply::Drop => ffi::GST_BUS_DROP, - BusSyncReply::Pass => ffi::GST_BUS_PASS, - BusSyncReply::Async => ffi::GST_BUS_ASYNC, + BusSyncReply::Drop => gst_sys::GST_BUS_DROP, + BusSyncReply::Pass => gst_sys::GST_BUS_PASS, + BusSyncReply::Async => gst_sys::GST_BUS_ASYNC, BusSyncReply::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for BusSyncReply { - fn from_glib(value: ffi::GstBusSyncReply) -> Self { +impl FromGlib for BusSyncReply { + fn from_glib(value: gst_sys::GstBusSyncReply) -> Self { skip_assert_initialized!(); match value { 0 => BusSyncReply::Drop, @@ -117,7 +117,7 @@ impl FromGlib for BusSyncReply { impl StaticType for BusSyncReply { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_bus_sync_reply_get_type()) } + unsafe { from_glib(gst_sys::gst_bus_sync_reply_get_type()) } } } @@ -129,13 +129,13 @@ impl<'a> FromValueOptional<'a> for BusSyncReply { impl<'a> FromValue<'a> for BusSyncReply { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for BusSyncReply { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -150,20 +150,20 @@ pub enum CapsIntersectMode { #[doc(hidden)] impl ToGlib for CapsIntersectMode { - type GlibType = ffi::GstCapsIntersectMode; + type GlibType = gst_sys::GstCapsIntersectMode; - fn to_glib(&self) -> ffi::GstCapsIntersectMode { + fn to_glib(&self) -> gst_sys::GstCapsIntersectMode { match *self { - CapsIntersectMode::ZigZag => ffi::GST_CAPS_INTERSECT_ZIG_ZAG, - CapsIntersectMode::First => ffi::GST_CAPS_INTERSECT_FIRST, + CapsIntersectMode::ZigZag => gst_sys::GST_CAPS_INTERSECT_ZIG_ZAG, + CapsIntersectMode::First => gst_sys::GST_CAPS_INTERSECT_FIRST, CapsIntersectMode::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for CapsIntersectMode { - fn from_glib(value: ffi::GstCapsIntersectMode) -> Self { +impl FromGlib for CapsIntersectMode { + fn from_glib(value: gst_sys::GstCapsIntersectMode) -> Self { skip_assert_initialized!(); match value { 0 => CapsIntersectMode::ZigZag, @@ -175,7 +175,7 @@ impl FromGlib for CapsIntersectMode { impl StaticType for CapsIntersectMode { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_caps_intersect_mode_get_type()) } + unsafe { from_glib(gst_sys::gst_caps_intersect_mode_get_type()) } } } @@ -187,13 +187,13 @@ impl<'a> FromValueOptional<'a> for CapsIntersectMode { impl<'a> FromValue<'a> for CapsIntersectMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for CapsIntersectMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -215,26 +215,26 @@ pub enum ClockReturn { #[doc(hidden)] impl ToGlib for ClockReturn { - type GlibType = ffi::GstClockReturn; + type GlibType = gst_sys::GstClockReturn; - fn to_glib(&self) -> ffi::GstClockReturn { + fn to_glib(&self) -> gst_sys::GstClockReturn { match *self { - ClockReturn::Ok => ffi::GST_CLOCK_OK, - ClockReturn::Early => ffi::GST_CLOCK_EARLY, - ClockReturn::Unscheduled => ffi::GST_CLOCK_UNSCHEDULED, - ClockReturn::Busy => ffi::GST_CLOCK_BUSY, - ClockReturn::Badtime => ffi::GST_CLOCK_BADTIME, - ClockReturn::Error => ffi::GST_CLOCK_ERROR, - ClockReturn::Unsupported => ffi::GST_CLOCK_UNSUPPORTED, - ClockReturn::Done => ffi::GST_CLOCK_DONE, + ClockReturn::Ok => gst_sys::GST_CLOCK_OK, + ClockReturn::Early => gst_sys::GST_CLOCK_EARLY, + ClockReturn::Unscheduled => gst_sys::GST_CLOCK_UNSCHEDULED, + ClockReturn::Busy => gst_sys::GST_CLOCK_BUSY, + ClockReturn::Badtime => gst_sys::GST_CLOCK_BADTIME, + ClockReturn::Error => gst_sys::GST_CLOCK_ERROR, + ClockReturn::Unsupported => gst_sys::GST_CLOCK_UNSUPPORTED, + ClockReturn::Done => gst_sys::GST_CLOCK_DONE, ClockReturn::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for ClockReturn { - fn from_glib(value: ffi::GstClockReturn) -> Self { +impl FromGlib for ClockReturn { + fn from_glib(value: gst_sys::GstClockReturn) -> Self { skip_assert_initialized!(); match value { 0 => ClockReturn::Ok, @@ -252,7 +252,7 @@ impl FromGlib for ClockReturn { impl StaticType for ClockReturn { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_clock_return_get_type()) } + unsafe { from_glib(gst_sys::gst_clock_return_get_type()) } } } @@ -264,13 +264,13 @@ impl<'a> FromValueOptional<'a> for ClockReturn { impl<'a> FromValue<'a> for ClockReturn { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for ClockReturn { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -286,21 +286,21 @@ pub enum ClockType { #[doc(hidden)] impl ToGlib for ClockType { - type GlibType = ffi::GstClockType; + type GlibType = gst_sys::GstClockType; - fn to_glib(&self) -> ffi::GstClockType { + fn to_glib(&self) -> gst_sys::GstClockType { match *self { - ClockType::Realtime => ffi::GST_CLOCK_TYPE_REALTIME, - ClockType::Monotonic => ffi::GST_CLOCK_TYPE_MONOTONIC, - ClockType::Other => ffi::GST_CLOCK_TYPE_OTHER, + ClockType::Realtime => gst_sys::GST_CLOCK_TYPE_REALTIME, + ClockType::Monotonic => gst_sys::GST_CLOCK_TYPE_MONOTONIC, + ClockType::Other => gst_sys::GST_CLOCK_TYPE_OTHER, ClockType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for ClockType { - fn from_glib(value: ffi::GstClockType) -> Self { +impl FromGlib for ClockType { + fn from_glib(value: gst_sys::GstClockType) -> Self { skip_assert_initialized!(); match value { 0 => ClockType::Realtime, @@ -313,7 +313,7 @@ impl FromGlib for ClockType { impl StaticType for ClockType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_clock_type_get_type()) } + unsafe { from_glib(gst_sys::gst_clock_type_get_type()) } } } @@ -325,13 +325,13 @@ impl<'a> FromValueOptional<'a> for ClockType { impl<'a> FromValue<'a> for ClockType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for ClockType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -359,33 +359,33 @@ pub enum CoreError { #[doc(hidden)] impl ToGlib for CoreError { - type GlibType = ffi::GstCoreError; + type GlibType = gst_sys::GstCoreError; - fn to_glib(&self) -> ffi::GstCoreError { + fn to_glib(&self) -> gst_sys::GstCoreError { match *self { - CoreError::Failed => ffi::GST_CORE_ERROR_FAILED, - CoreError::TooLazy => ffi::GST_CORE_ERROR_TOO_LAZY, - CoreError::NotImplemented => ffi::GST_CORE_ERROR_NOT_IMPLEMENTED, - CoreError::StateChange => ffi::GST_CORE_ERROR_STATE_CHANGE, - CoreError::Pad => ffi::GST_CORE_ERROR_PAD, - CoreError::Thread => ffi::GST_CORE_ERROR_THREAD, - CoreError::Negotiation => ffi::GST_CORE_ERROR_NEGOTIATION, - CoreError::Event => ffi::GST_CORE_ERROR_EVENT, - CoreError::Seek => ffi::GST_CORE_ERROR_SEEK, - CoreError::Caps => ffi::GST_CORE_ERROR_CAPS, - CoreError::Tag => ffi::GST_CORE_ERROR_TAG, - CoreError::MissingPlugin => ffi::GST_CORE_ERROR_MISSING_PLUGIN, - CoreError::Clock => ffi::GST_CORE_ERROR_CLOCK, - CoreError::Disabled => ffi::GST_CORE_ERROR_DISABLED, - CoreError::NumErrors => ffi::GST_CORE_ERROR_NUM_ERRORS, + CoreError::Failed => gst_sys::GST_CORE_ERROR_FAILED, + CoreError::TooLazy => gst_sys::GST_CORE_ERROR_TOO_LAZY, + CoreError::NotImplemented => gst_sys::GST_CORE_ERROR_NOT_IMPLEMENTED, + CoreError::StateChange => gst_sys::GST_CORE_ERROR_STATE_CHANGE, + CoreError::Pad => gst_sys::GST_CORE_ERROR_PAD, + CoreError::Thread => gst_sys::GST_CORE_ERROR_THREAD, + CoreError::Negotiation => gst_sys::GST_CORE_ERROR_NEGOTIATION, + CoreError::Event => gst_sys::GST_CORE_ERROR_EVENT, + CoreError::Seek => gst_sys::GST_CORE_ERROR_SEEK, + CoreError::Caps => gst_sys::GST_CORE_ERROR_CAPS, + CoreError::Tag => gst_sys::GST_CORE_ERROR_TAG, + CoreError::MissingPlugin => gst_sys::GST_CORE_ERROR_MISSING_PLUGIN, + CoreError::Clock => gst_sys::GST_CORE_ERROR_CLOCK, + CoreError::Disabled => gst_sys::GST_CORE_ERROR_DISABLED, + CoreError::NumErrors => gst_sys::GST_CORE_ERROR_NUM_ERRORS, CoreError::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for CoreError { - fn from_glib(value: ffi::GstCoreError) -> Self { +impl FromGlib for CoreError { + fn from_glib(value: gst_sys::GstCoreError) -> Self { skip_assert_initialized!(); match value { 1 => CoreError::Failed, @@ -411,7 +411,7 @@ impl FromGlib for CoreError { impl ErrorDomain for CoreError { fn domain() -> Quark { skip_assert_initialized!(); - unsafe { from_glib(ffi::gst_core_error_quark()) } + unsafe { from_glib(gst_sys::gst_core_error_quark()) } } fn code(self) -> i32 { @@ -443,7 +443,7 @@ impl ErrorDomain for CoreError { impl StaticType for CoreError { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_core_error_get_type()) } + unsafe { from_glib(gst_sys::gst_core_error_get_type()) } } } @@ -455,13 +455,13 @@ impl<'a> FromValueOptional<'a> for CoreError { impl<'a> FromValue<'a> for CoreError { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for CoreError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -484,28 +484,28 @@ pub enum DebugLevel { #[doc(hidden)] impl ToGlib for DebugLevel { - type GlibType = ffi::GstDebugLevel; + type GlibType = gst_sys::GstDebugLevel; - fn to_glib(&self) -> ffi::GstDebugLevel { + fn to_glib(&self) -> gst_sys::GstDebugLevel { match *self { - DebugLevel::None => ffi::GST_LEVEL_NONE, - DebugLevel::Error => ffi::GST_LEVEL_ERROR, - DebugLevel::Warning => ffi::GST_LEVEL_WARNING, - DebugLevel::Fixme => ffi::GST_LEVEL_FIXME, - DebugLevel::Info => ffi::GST_LEVEL_INFO, - DebugLevel::Debug => ffi::GST_LEVEL_DEBUG, - DebugLevel::Log => ffi::GST_LEVEL_LOG, - DebugLevel::Trace => ffi::GST_LEVEL_TRACE, - DebugLevel::Memdump => ffi::GST_LEVEL_MEMDUMP, - DebugLevel::Count => ffi::GST_LEVEL_COUNT, + DebugLevel::None => gst_sys::GST_LEVEL_NONE, + DebugLevel::Error => gst_sys::GST_LEVEL_ERROR, + DebugLevel::Warning => gst_sys::GST_LEVEL_WARNING, + DebugLevel::Fixme => gst_sys::GST_LEVEL_FIXME, + DebugLevel::Info => gst_sys::GST_LEVEL_INFO, + DebugLevel::Debug => gst_sys::GST_LEVEL_DEBUG, + DebugLevel::Log => gst_sys::GST_LEVEL_LOG, + DebugLevel::Trace => gst_sys::GST_LEVEL_TRACE, + DebugLevel::Memdump => gst_sys::GST_LEVEL_MEMDUMP, + DebugLevel::Count => gst_sys::GST_LEVEL_COUNT, DebugLevel::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for DebugLevel { - fn from_glib(value: ffi::GstDebugLevel) -> Self { +impl FromGlib for DebugLevel { + fn from_glib(value: gst_sys::GstDebugLevel) -> Self { skip_assert_initialized!(); match value { 0 => DebugLevel::None, @@ -525,7 +525,7 @@ impl FromGlib for DebugLevel { impl StaticType for DebugLevel { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_debug_level_get_type()) } + unsafe { from_glib(gst_sys::gst_debug_level_get_type()) } } } @@ -537,13 +537,13 @@ impl<'a> FromValueOptional<'a> for DebugLevel { impl<'a> FromValue<'a> for DebugLevel { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for DebugLevel { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -586,48 +586,48 @@ pub enum EventType { #[doc(hidden)] impl ToGlib for EventType { - type GlibType = ffi::GstEventType; + type GlibType = gst_sys::GstEventType; - fn to_glib(&self) -> ffi::GstEventType { + fn to_glib(&self) -> gst_sys::GstEventType { match *self { - EventType::Unknown => ffi::GST_EVENT_UNKNOWN, - EventType::FlushStart => ffi::GST_EVENT_FLUSH_START, - EventType::FlushStop => ffi::GST_EVENT_FLUSH_STOP, - EventType::StreamStart => ffi::GST_EVENT_STREAM_START, - EventType::Caps => ffi::GST_EVENT_CAPS, - EventType::Segment => ffi::GST_EVENT_SEGMENT, - EventType::StreamCollection => ffi::GST_EVENT_STREAM_COLLECTION, - EventType::Tag => ffi::GST_EVENT_TAG, - EventType::Buffersize => ffi::GST_EVENT_BUFFERSIZE, - EventType::SinkMessage => ffi::GST_EVENT_SINK_MESSAGE, - EventType::StreamGroupDone => ffi::GST_EVENT_STREAM_GROUP_DONE, - EventType::Eos => ffi::GST_EVENT_EOS, - EventType::Toc => ffi::GST_EVENT_TOC, - EventType::Protection => ffi::GST_EVENT_PROTECTION, - EventType::SegmentDone => ffi::GST_EVENT_SEGMENT_DONE, - EventType::Gap => ffi::GST_EVENT_GAP, - EventType::Qos => ffi::GST_EVENT_QOS, - EventType::Seek => ffi::GST_EVENT_SEEK, - EventType::Navigation => ffi::GST_EVENT_NAVIGATION, - EventType::Latency => ffi::GST_EVENT_LATENCY, - EventType::Step => ffi::GST_EVENT_STEP, - EventType::Reconfigure => ffi::GST_EVENT_RECONFIGURE, - EventType::TocSelect => ffi::GST_EVENT_TOC_SELECT, - EventType::SelectStreams => ffi::GST_EVENT_SELECT_STREAMS, - EventType::CustomUpstream => ffi::GST_EVENT_CUSTOM_UPSTREAM, - EventType::CustomDownstream => ffi::GST_EVENT_CUSTOM_DOWNSTREAM, - EventType::CustomDownstreamOob => ffi::GST_EVENT_CUSTOM_DOWNSTREAM_OOB, - EventType::CustomDownstreamSticky => ffi::GST_EVENT_CUSTOM_DOWNSTREAM_STICKY, - EventType::CustomBoth => ffi::GST_EVENT_CUSTOM_BOTH, - EventType::CustomBothOob => ffi::GST_EVENT_CUSTOM_BOTH_OOB, + EventType::Unknown => gst_sys::GST_EVENT_UNKNOWN, + EventType::FlushStart => gst_sys::GST_EVENT_FLUSH_START, + EventType::FlushStop => gst_sys::GST_EVENT_FLUSH_STOP, + EventType::StreamStart => gst_sys::GST_EVENT_STREAM_START, + EventType::Caps => gst_sys::GST_EVENT_CAPS, + EventType::Segment => gst_sys::GST_EVENT_SEGMENT, + EventType::StreamCollection => gst_sys::GST_EVENT_STREAM_COLLECTION, + EventType::Tag => gst_sys::GST_EVENT_TAG, + EventType::Buffersize => gst_sys::GST_EVENT_BUFFERSIZE, + EventType::SinkMessage => gst_sys::GST_EVENT_SINK_MESSAGE, + EventType::StreamGroupDone => gst_sys::GST_EVENT_STREAM_GROUP_DONE, + EventType::Eos => gst_sys::GST_EVENT_EOS, + EventType::Toc => gst_sys::GST_EVENT_TOC, + EventType::Protection => gst_sys::GST_EVENT_PROTECTION, + EventType::SegmentDone => gst_sys::GST_EVENT_SEGMENT_DONE, + EventType::Gap => gst_sys::GST_EVENT_GAP, + EventType::Qos => gst_sys::GST_EVENT_QOS, + EventType::Seek => gst_sys::GST_EVENT_SEEK, + EventType::Navigation => gst_sys::GST_EVENT_NAVIGATION, + EventType::Latency => gst_sys::GST_EVENT_LATENCY, + EventType::Step => gst_sys::GST_EVENT_STEP, + EventType::Reconfigure => gst_sys::GST_EVENT_RECONFIGURE, + EventType::TocSelect => gst_sys::GST_EVENT_TOC_SELECT, + EventType::SelectStreams => gst_sys::GST_EVENT_SELECT_STREAMS, + EventType::CustomUpstream => gst_sys::GST_EVENT_CUSTOM_UPSTREAM, + EventType::CustomDownstream => gst_sys::GST_EVENT_CUSTOM_DOWNSTREAM, + EventType::CustomDownstreamOob => gst_sys::GST_EVENT_CUSTOM_DOWNSTREAM_OOB, + EventType::CustomDownstreamSticky => gst_sys::GST_EVENT_CUSTOM_DOWNSTREAM_STICKY, + EventType::CustomBoth => gst_sys::GST_EVENT_CUSTOM_BOTH, + EventType::CustomBothOob => gst_sys::GST_EVENT_CUSTOM_BOTH_OOB, EventType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for EventType { - fn from_glib(value: ffi::GstEventType) -> Self { +impl FromGlib for EventType { + fn from_glib(value: gst_sys::GstEventType) -> Self { skip_assert_initialized!(); match value { 0 => EventType::Unknown, @@ -667,7 +667,7 @@ impl FromGlib for EventType { impl StaticType for EventType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_event_type_get_type()) } + unsafe { from_glib(gst_sys::gst_event_type_get_type()) } } } @@ -679,13 +679,13 @@ impl<'a> FromValueOptional<'a> for EventType { impl<'a> FromValue<'a> for EventType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for EventType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -712,31 +712,31 @@ pub enum FlowReturn { #[doc(hidden)] impl ToGlib for FlowReturn { - type GlibType = ffi::GstFlowReturn; + type GlibType = gst_sys::GstFlowReturn; - fn to_glib(&self) -> ffi::GstFlowReturn { + fn to_glib(&self) -> gst_sys::GstFlowReturn { match *self { - FlowReturn::CustomSuccess2 => ffi::GST_FLOW_CUSTOM_SUCCESS_2, - FlowReturn::CustomSuccess1 => ffi::GST_FLOW_CUSTOM_SUCCESS_1, - FlowReturn::CustomSuccess => ffi::GST_FLOW_CUSTOM_SUCCESS, - FlowReturn::Ok => ffi::GST_FLOW_OK, - FlowReturn::NotLinked => ffi::GST_FLOW_NOT_LINKED, - FlowReturn::Flushing => ffi::GST_FLOW_FLUSHING, - FlowReturn::Eos => ffi::GST_FLOW_EOS, - FlowReturn::NotNegotiated => ffi::GST_FLOW_NOT_NEGOTIATED, - FlowReturn::Error => ffi::GST_FLOW_ERROR, - FlowReturn::NotSupported => ffi::GST_FLOW_NOT_SUPPORTED, - FlowReturn::CustomError => ffi::GST_FLOW_CUSTOM_ERROR, - FlowReturn::CustomError1 => ffi::GST_FLOW_CUSTOM_ERROR_1, - FlowReturn::CustomError2 => ffi::GST_FLOW_CUSTOM_ERROR_2, + FlowReturn::CustomSuccess2 => gst_sys::GST_FLOW_CUSTOM_SUCCESS_2, + FlowReturn::CustomSuccess1 => gst_sys::GST_FLOW_CUSTOM_SUCCESS_1, + FlowReturn::CustomSuccess => gst_sys::GST_FLOW_CUSTOM_SUCCESS, + FlowReturn::Ok => gst_sys::GST_FLOW_OK, + FlowReturn::NotLinked => gst_sys::GST_FLOW_NOT_LINKED, + FlowReturn::Flushing => gst_sys::GST_FLOW_FLUSHING, + FlowReturn::Eos => gst_sys::GST_FLOW_EOS, + FlowReturn::NotNegotiated => gst_sys::GST_FLOW_NOT_NEGOTIATED, + FlowReturn::Error => gst_sys::GST_FLOW_ERROR, + FlowReturn::NotSupported => gst_sys::GST_FLOW_NOT_SUPPORTED, + FlowReturn::CustomError => gst_sys::GST_FLOW_CUSTOM_ERROR, + FlowReturn::CustomError1 => gst_sys::GST_FLOW_CUSTOM_ERROR_1, + FlowReturn::CustomError2 => gst_sys::GST_FLOW_CUSTOM_ERROR_2, FlowReturn::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for FlowReturn { - fn from_glib(value: ffi::GstFlowReturn) -> Self { +impl FromGlib for FlowReturn { + fn from_glib(value: gst_sys::GstFlowReturn) -> Self { skip_assert_initialized!(); match value { 102 => FlowReturn::CustomSuccess2, @@ -759,7 +759,7 @@ impl FromGlib for FlowReturn { impl StaticType for FlowReturn { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_flow_return_get_type()) } + unsafe { from_glib(gst_sys::gst_flow_return_get_type()) } } } @@ -771,13 +771,13 @@ impl<'a> FromValueOptional<'a> for FlowReturn { impl<'a> FromValue<'a> for FlowReturn { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for FlowReturn { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -797,24 +797,24 @@ pub enum Format { #[doc(hidden)] impl ToGlib for Format { - type GlibType = ffi::GstFormat; + type GlibType = gst_sys::GstFormat; - fn to_glib(&self) -> ffi::GstFormat { + fn to_glib(&self) -> gst_sys::GstFormat { match *self { - Format::Undefined => ffi::GST_FORMAT_UNDEFINED, - Format::Default => ffi::GST_FORMAT_DEFAULT, - Format::Bytes => ffi::GST_FORMAT_BYTES, - Format::Time => ffi::GST_FORMAT_TIME, - Format::Buffers => ffi::GST_FORMAT_BUFFERS, - Format::Percent => ffi::GST_FORMAT_PERCENT, + Format::Undefined => gst_sys::GST_FORMAT_UNDEFINED, + Format::Default => gst_sys::GST_FORMAT_DEFAULT, + Format::Bytes => gst_sys::GST_FORMAT_BYTES, + Format::Time => gst_sys::GST_FORMAT_TIME, + Format::Buffers => gst_sys::GST_FORMAT_BUFFERS, + Format::Percent => gst_sys::GST_FORMAT_PERCENT, Format::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for Format { - fn from_glib(value: ffi::GstFormat) -> Self { +impl FromGlib for Format { + fn from_glib(value: gst_sys::GstFormat) -> Self { skip_assert_initialized!(); match value { 0 => Format::Undefined, @@ -830,7 +830,7 @@ impl FromGlib for Format { impl StaticType for Format { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_format_get_type()) } + unsafe { from_glib(gst_sys::gst_format_get_type()) } } } @@ -842,13 +842,13 @@ impl<'a> FromValueOptional<'a> for Format { impl<'a> FromValue<'a> for Format { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for Format { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -868,25 +868,25 @@ pub enum LibraryError { #[doc(hidden)] impl ToGlib for LibraryError { - type GlibType = ffi::GstLibraryError; + type GlibType = gst_sys::GstLibraryError; - fn to_glib(&self) -> ffi::GstLibraryError { + fn to_glib(&self) -> gst_sys::GstLibraryError { match *self { - LibraryError::Failed => ffi::GST_LIBRARY_ERROR_FAILED, - LibraryError::TooLazy => ffi::GST_LIBRARY_ERROR_TOO_LAZY, - LibraryError::Init => ffi::GST_LIBRARY_ERROR_INIT, - LibraryError::Shutdown => ffi::GST_LIBRARY_ERROR_SHUTDOWN, - LibraryError::Settings => ffi::GST_LIBRARY_ERROR_SETTINGS, - LibraryError::Encode => ffi::GST_LIBRARY_ERROR_ENCODE, - LibraryError::NumErrors => ffi::GST_LIBRARY_ERROR_NUM_ERRORS, + LibraryError::Failed => gst_sys::GST_LIBRARY_ERROR_FAILED, + LibraryError::TooLazy => gst_sys::GST_LIBRARY_ERROR_TOO_LAZY, + LibraryError::Init => gst_sys::GST_LIBRARY_ERROR_INIT, + LibraryError::Shutdown => gst_sys::GST_LIBRARY_ERROR_SHUTDOWN, + LibraryError::Settings => gst_sys::GST_LIBRARY_ERROR_SETTINGS, + LibraryError::Encode => gst_sys::GST_LIBRARY_ERROR_ENCODE, + LibraryError::NumErrors => gst_sys::GST_LIBRARY_ERROR_NUM_ERRORS, LibraryError::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for LibraryError { - fn from_glib(value: ffi::GstLibraryError) -> Self { +impl FromGlib for LibraryError { + fn from_glib(value: gst_sys::GstLibraryError) -> Self { skip_assert_initialized!(); match value { 1 => LibraryError::Failed, @@ -904,7 +904,7 @@ impl FromGlib for LibraryError { impl ErrorDomain for LibraryError { fn domain() -> Quark { skip_assert_initialized!(); - unsafe { from_glib(ffi::gst_library_error_quark()) } + unsafe { from_glib(gst_sys::gst_library_error_quark()) } } fn code(self) -> i32 { @@ -928,7 +928,7 @@ impl ErrorDomain for LibraryError { impl StaticType for LibraryError { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_library_error_get_type()) } + unsafe { from_glib(gst_sys::gst_library_error_get_type()) } } } @@ -940,13 +940,13 @@ impl<'a> FromValueOptional<'a> for LibraryError { impl<'a> FromValue<'a> for LibraryError { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for LibraryError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -962,21 +962,21 @@ pub enum PadDirection { #[doc(hidden)] impl ToGlib for PadDirection { - type GlibType = ffi::GstPadDirection; + type GlibType = gst_sys::GstPadDirection; - fn to_glib(&self) -> ffi::GstPadDirection { + fn to_glib(&self) -> gst_sys::GstPadDirection { match *self { - PadDirection::Unknown => ffi::GST_PAD_UNKNOWN, - PadDirection::Src => ffi::GST_PAD_SRC, - PadDirection::Sink => ffi::GST_PAD_SINK, + PadDirection::Unknown => gst_sys::GST_PAD_UNKNOWN, + PadDirection::Src => gst_sys::GST_PAD_SRC, + PadDirection::Sink => gst_sys::GST_PAD_SINK, PadDirection::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for PadDirection { - fn from_glib(value: ffi::GstPadDirection) -> Self { +impl FromGlib for PadDirection { + fn from_glib(value: gst_sys::GstPadDirection) -> Self { skip_assert_initialized!(); match value { 0 => PadDirection::Unknown, @@ -989,7 +989,7 @@ impl FromGlib for PadDirection { impl StaticType for PadDirection { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_pad_direction_get_type()) } + unsafe { from_glib(gst_sys::gst_pad_direction_get_type()) } } } @@ -1001,13 +1001,13 @@ impl<'a> FromValueOptional<'a> for PadDirection { impl<'a> FromValue<'a> for PadDirection { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PadDirection { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1028,25 +1028,25 @@ pub enum PadLinkReturn { #[doc(hidden)] impl ToGlib for PadLinkReturn { - type GlibType = ffi::GstPadLinkReturn; + type GlibType = gst_sys::GstPadLinkReturn; - fn to_glib(&self) -> ffi::GstPadLinkReturn { + fn to_glib(&self) -> gst_sys::GstPadLinkReturn { match *self { - PadLinkReturn::Ok => ffi::GST_PAD_LINK_OK, - PadLinkReturn::WrongHierarchy => ffi::GST_PAD_LINK_WRONG_HIERARCHY, - PadLinkReturn::WasLinked => ffi::GST_PAD_LINK_WAS_LINKED, - PadLinkReturn::WrongDirection => ffi::GST_PAD_LINK_WRONG_DIRECTION, - PadLinkReturn::Noformat => ffi::GST_PAD_LINK_NOFORMAT, - PadLinkReturn::Nosched => ffi::GST_PAD_LINK_NOSCHED, - PadLinkReturn::Refused => ffi::GST_PAD_LINK_REFUSED, + PadLinkReturn::Ok => gst_sys::GST_PAD_LINK_OK, + PadLinkReturn::WrongHierarchy => gst_sys::GST_PAD_LINK_WRONG_HIERARCHY, + PadLinkReturn::WasLinked => gst_sys::GST_PAD_LINK_WAS_LINKED, + PadLinkReturn::WrongDirection => gst_sys::GST_PAD_LINK_WRONG_DIRECTION, + PadLinkReturn::Noformat => gst_sys::GST_PAD_LINK_NOFORMAT, + PadLinkReturn::Nosched => gst_sys::GST_PAD_LINK_NOSCHED, + PadLinkReturn::Refused => gst_sys::GST_PAD_LINK_REFUSED, PadLinkReturn::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for PadLinkReturn { - fn from_glib(value: ffi::GstPadLinkReturn) -> Self { +impl FromGlib for PadLinkReturn { + fn from_glib(value: gst_sys::GstPadLinkReturn) -> Self { skip_assert_initialized!(); match value { 0 => PadLinkReturn::Ok, @@ -1063,7 +1063,7 @@ impl FromGlib for PadLinkReturn { impl StaticType for PadLinkReturn { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_pad_link_return_get_type()) } + unsafe { from_glib(gst_sys::gst_pad_link_return_get_type()) } } } @@ -1075,13 +1075,13 @@ impl<'a> FromValueOptional<'a> for PadLinkReturn { impl<'a> FromValue<'a> for PadLinkReturn { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PadLinkReturn { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1097,21 +1097,21 @@ pub enum PadMode { #[doc(hidden)] impl ToGlib for PadMode { - type GlibType = ffi::GstPadMode; + type GlibType = gst_sys::GstPadMode; - fn to_glib(&self) -> ffi::GstPadMode { + fn to_glib(&self) -> gst_sys::GstPadMode { match *self { - PadMode::None => ffi::GST_PAD_MODE_NONE, - PadMode::Push => ffi::GST_PAD_MODE_PUSH, - PadMode::Pull => ffi::GST_PAD_MODE_PULL, + PadMode::None => gst_sys::GST_PAD_MODE_NONE, + PadMode::Push => gst_sys::GST_PAD_MODE_PUSH, + PadMode::Pull => gst_sys::GST_PAD_MODE_PULL, PadMode::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for PadMode { - fn from_glib(value: ffi::GstPadMode) -> Self { +impl FromGlib for PadMode { + fn from_glib(value: gst_sys::GstPadMode) -> Self { skip_assert_initialized!(); match value { 0 => PadMode::None, @@ -1124,7 +1124,7 @@ impl FromGlib for PadMode { impl StaticType for PadMode { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_pad_mode_get_type()) } + unsafe { from_glib(gst_sys::gst_pad_mode_get_type()) } } } @@ -1136,13 +1136,13 @@ impl<'a> FromValueOptional<'a> for PadMode { impl<'a> FromValue<'a> for PadMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PadMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1158,21 +1158,21 @@ pub enum PadPresence { #[doc(hidden)] impl ToGlib for PadPresence { - type GlibType = ffi::GstPadPresence; + type GlibType = gst_sys::GstPadPresence; - fn to_glib(&self) -> ffi::GstPadPresence { + fn to_glib(&self) -> gst_sys::GstPadPresence { match *self { - PadPresence::Always => ffi::GST_PAD_ALWAYS, - PadPresence::Sometimes => ffi::GST_PAD_SOMETIMES, - PadPresence::Request => ffi::GST_PAD_REQUEST, + PadPresence::Always => gst_sys::GST_PAD_ALWAYS, + PadPresence::Sometimes => gst_sys::GST_PAD_SOMETIMES, + PadPresence::Request => gst_sys::GST_PAD_REQUEST, PadPresence::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for PadPresence { - fn from_glib(value: ffi::GstPadPresence) -> Self { +impl FromGlib for PadPresence { + fn from_glib(value: gst_sys::GstPadPresence) -> Self { skip_assert_initialized!(); match value { 0 => PadPresence::Always, @@ -1185,7 +1185,7 @@ impl FromGlib for PadPresence { impl StaticType for PadPresence { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_pad_presence_get_type()) } + unsafe { from_glib(gst_sys::gst_pad_presence_get_type()) } } } @@ -1197,13 +1197,13 @@ impl<'a> FromValueOptional<'a> for PadPresence { impl<'a> FromValue<'a> for PadPresence { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PadPresence { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1221,23 +1221,23 @@ pub enum PadProbeReturn { #[doc(hidden)] impl ToGlib for PadProbeReturn { - type GlibType = ffi::GstPadProbeReturn; + type GlibType = gst_sys::GstPadProbeReturn; - fn to_glib(&self) -> ffi::GstPadProbeReturn { + fn to_glib(&self) -> gst_sys::GstPadProbeReturn { match *self { - PadProbeReturn::Drop => ffi::GST_PAD_PROBE_DROP, - PadProbeReturn::Ok => ffi::GST_PAD_PROBE_OK, - PadProbeReturn::Remove => ffi::GST_PAD_PROBE_REMOVE, - PadProbeReturn::Pass => ffi::GST_PAD_PROBE_PASS, - PadProbeReturn::Handled => ffi::GST_PAD_PROBE_HANDLED, + PadProbeReturn::Drop => gst_sys::GST_PAD_PROBE_DROP, + PadProbeReturn::Ok => gst_sys::GST_PAD_PROBE_OK, + PadProbeReturn::Remove => gst_sys::GST_PAD_PROBE_REMOVE, + PadProbeReturn::Pass => gst_sys::GST_PAD_PROBE_PASS, + PadProbeReturn::Handled => gst_sys::GST_PAD_PROBE_HANDLED, PadProbeReturn::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for PadProbeReturn { - fn from_glib(value: ffi::GstPadProbeReturn) -> Self { +impl FromGlib for PadProbeReturn { + fn from_glib(value: gst_sys::GstPadProbeReturn) -> Self { skip_assert_initialized!(); match value { 0 => PadProbeReturn::Drop, @@ -1252,7 +1252,7 @@ impl FromGlib for PadProbeReturn { impl StaticType for PadProbeReturn { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_pad_probe_return_get_type()) } + unsafe { from_glib(gst_sys::gst_pad_probe_return_get_type()) } } } @@ -1264,13 +1264,13 @@ impl<'a> FromValueOptional<'a> for PadProbeReturn { impl<'a> FromValue<'a> for PadProbeReturn { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PadProbeReturn { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1291,26 +1291,26 @@ pub enum ParseError { #[doc(hidden)] impl ToGlib for ParseError { - type GlibType = ffi::GstParseError; + type GlibType = gst_sys::GstParseError; - fn to_glib(&self) -> ffi::GstParseError { + fn to_glib(&self) -> gst_sys::GstParseError { match *self { - ParseError::Syntax => ffi::GST_PARSE_ERROR_SYNTAX, - ParseError::NoSuchElement => ffi::GST_PARSE_ERROR_NO_SUCH_ELEMENT, - ParseError::NoSuchProperty => ffi::GST_PARSE_ERROR_NO_SUCH_PROPERTY, - ParseError::Link => ffi::GST_PARSE_ERROR_LINK, - ParseError::CouldNotSetProperty => ffi::GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY, - ParseError::EmptyBin => ffi::GST_PARSE_ERROR_EMPTY_BIN, - ParseError::Empty => ffi::GST_PARSE_ERROR_EMPTY, - ParseError::DelayedLink => ffi::GST_PARSE_ERROR_DELAYED_LINK, + ParseError::Syntax => gst_sys::GST_PARSE_ERROR_SYNTAX, + ParseError::NoSuchElement => gst_sys::GST_PARSE_ERROR_NO_SUCH_ELEMENT, + ParseError::NoSuchProperty => gst_sys::GST_PARSE_ERROR_NO_SUCH_PROPERTY, + ParseError::Link => gst_sys::GST_PARSE_ERROR_LINK, + ParseError::CouldNotSetProperty => gst_sys::GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY, + ParseError::EmptyBin => gst_sys::GST_PARSE_ERROR_EMPTY_BIN, + ParseError::Empty => gst_sys::GST_PARSE_ERROR_EMPTY, + ParseError::DelayedLink => gst_sys::GST_PARSE_ERROR_DELAYED_LINK, ParseError::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for ParseError { - fn from_glib(value: ffi::GstParseError) -> Self { +impl FromGlib for ParseError { + fn from_glib(value: gst_sys::GstParseError) -> Self { skip_assert_initialized!(); match value { 0 => ParseError::Syntax, @@ -1329,7 +1329,7 @@ impl FromGlib for ParseError { impl ErrorDomain for ParseError { fn domain() -> Quark { skip_assert_initialized!(); - unsafe { from_glib(ffi::gst_parse_error_quark()) } + unsafe { from_glib(gst_sys::gst_parse_error_quark()) } } fn code(self) -> i32 { @@ -1354,7 +1354,7 @@ impl ErrorDomain for ParseError { impl StaticType for ParseError { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_parse_error_get_type()) } + unsafe { from_glib(gst_sys::gst_parse_error_get_type()) } } } @@ -1366,13 +1366,13 @@ impl<'a> FromValueOptional<'a> for ParseError { impl<'a> FromValue<'a> for ParseError { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for ParseError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1388,21 +1388,21 @@ pub enum PluginError { #[doc(hidden)] impl ToGlib for PluginError { - type GlibType = ffi::GstPluginError; + type GlibType = gst_sys::GstPluginError; - fn to_glib(&self) -> ffi::GstPluginError { + fn to_glib(&self) -> gst_sys::GstPluginError { match *self { - PluginError::Module => ffi::GST_PLUGIN_ERROR_MODULE, - PluginError::Dependencies => ffi::GST_PLUGIN_ERROR_DEPENDENCIES, - PluginError::NameMismatch => ffi::GST_PLUGIN_ERROR_NAME_MISMATCH, + PluginError::Module => gst_sys::GST_PLUGIN_ERROR_MODULE, + PluginError::Dependencies => gst_sys::GST_PLUGIN_ERROR_DEPENDENCIES, + PluginError::NameMismatch => gst_sys::GST_PLUGIN_ERROR_NAME_MISMATCH, PluginError::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for PluginError { - fn from_glib(value: ffi::GstPluginError) -> Self { +impl FromGlib for PluginError { + fn from_glib(value: gst_sys::GstPluginError) -> Self { skip_assert_initialized!(); match value { 0 => PluginError::Module, @@ -1416,7 +1416,7 @@ impl FromGlib for PluginError { impl ErrorDomain for PluginError { fn domain() -> Quark { skip_assert_initialized!(); - unsafe { from_glib(ffi::gst_plugin_error_quark()) } + unsafe { from_glib(gst_sys::gst_plugin_error_quark()) } } fn code(self) -> i32 { @@ -1436,7 +1436,7 @@ impl ErrorDomain for PluginError { impl StaticType for PluginError { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_plugin_error_get_type()) } + unsafe { from_glib(gst_sys::gst_plugin_error_get_type()) } } } @@ -1448,13 +1448,13 @@ impl<'a> FromValueOptional<'a> for PluginError { impl<'a> FromValue<'a> for PluginError { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PluginError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1472,23 +1472,23 @@ pub enum ProgressType { #[doc(hidden)] impl ToGlib for ProgressType { - type GlibType = ffi::GstProgressType; + type GlibType = gst_sys::GstProgressType; - fn to_glib(&self) -> ffi::GstProgressType { + fn to_glib(&self) -> gst_sys::GstProgressType { match *self { - ProgressType::Start => ffi::GST_PROGRESS_TYPE_START, - ProgressType::Continue => ffi::GST_PROGRESS_TYPE_CONTINUE, - ProgressType::Complete => ffi::GST_PROGRESS_TYPE_COMPLETE, - ProgressType::Canceled => ffi::GST_PROGRESS_TYPE_CANCELED, - ProgressType::Error => ffi::GST_PROGRESS_TYPE_ERROR, + ProgressType::Start => gst_sys::GST_PROGRESS_TYPE_START, + ProgressType::Continue => gst_sys::GST_PROGRESS_TYPE_CONTINUE, + ProgressType::Complete => gst_sys::GST_PROGRESS_TYPE_COMPLETE, + ProgressType::Canceled => gst_sys::GST_PROGRESS_TYPE_CANCELED, + ProgressType::Error => gst_sys::GST_PROGRESS_TYPE_ERROR, ProgressType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for ProgressType { - fn from_glib(value: ffi::GstProgressType) -> Self { +impl FromGlib for ProgressType { + fn from_glib(value: gst_sys::GstProgressType) -> Self { skip_assert_initialized!(); match value { 0 => ProgressType::Start, @@ -1503,7 +1503,7 @@ impl FromGlib for ProgressType { impl StaticType for ProgressType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_progress_type_get_type()) } + unsafe { from_glib(gst_sys::gst_progress_type_get_type()) } } } @@ -1515,13 +1515,13 @@ impl<'a> FromValueOptional<'a> for ProgressType { impl<'a> FromValue<'a> for ProgressType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for ProgressType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1540,14 +1540,14 @@ pub enum PromiseResult { #[cfg(any(feature = "v1_14", feature = "dox"))] #[doc(hidden)] impl ToGlib for PromiseResult { - type GlibType = ffi::GstPromiseResult; + type GlibType = gst_sys::GstPromiseResult; - fn to_glib(&self) -> ffi::GstPromiseResult { + fn to_glib(&self) -> gst_sys::GstPromiseResult { match *self { - PromiseResult::Pending => ffi::GST_PROMISE_RESULT_PENDING, - PromiseResult::Interrupted => ffi::GST_PROMISE_RESULT_INTERRUPTED, - PromiseResult::Replied => ffi::GST_PROMISE_RESULT_REPLIED, - PromiseResult::Expired => ffi::GST_PROMISE_RESULT_EXPIRED, + PromiseResult::Pending => gst_sys::GST_PROMISE_RESULT_PENDING, + PromiseResult::Interrupted => gst_sys::GST_PROMISE_RESULT_INTERRUPTED, + PromiseResult::Replied => gst_sys::GST_PROMISE_RESULT_REPLIED, + PromiseResult::Expired => gst_sys::GST_PROMISE_RESULT_EXPIRED, PromiseResult::__Unknown(value) => value } } @@ -1555,8 +1555,8 @@ impl ToGlib for PromiseResult { #[cfg(any(feature = "v1_14", feature = "dox"))] #[doc(hidden)] -impl FromGlib for PromiseResult { - fn from_glib(value: ffi::GstPromiseResult) -> Self { +impl FromGlib for PromiseResult { + fn from_glib(value: gst_sys::GstPromiseResult) -> Self { skip_assert_initialized!(); match value { 0 => PromiseResult::Pending, @@ -1571,7 +1571,7 @@ impl FromGlib for PromiseResult { #[cfg(any(feature = "v1_14", feature = "dox"))] impl StaticType for PromiseResult { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_promise_result_get_type()) } + unsafe { from_glib(gst_sys::gst_promise_result_get_type()) } } } @@ -1585,14 +1585,14 @@ impl<'a> FromValueOptional<'a> for PromiseResult { #[cfg(any(feature = "v1_14", feature = "dox"))] impl<'a> FromValue<'a> for PromiseResult { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } #[cfg(any(feature = "v1_14", feature = "dox"))] impl SetValue for PromiseResult { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1608,21 +1608,21 @@ pub enum QOSType { #[doc(hidden)] impl ToGlib for QOSType { - type GlibType = ffi::GstQOSType; + type GlibType = gst_sys::GstQOSType; - fn to_glib(&self) -> ffi::GstQOSType { + fn to_glib(&self) -> gst_sys::GstQOSType { match *self { - QOSType::Overflow => ffi::GST_QOS_TYPE_OVERFLOW, - QOSType::Underflow => ffi::GST_QOS_TYPE_UNDERFLOW, - QOSType::Throttle => ffi::GST_QOS_TYPE_THROTTLE, + QOSType::Overflow => gst_sys::GST_QOS_TYPE_OVERFLOW, + QOSType::Underflow => gst_sys::GST_QOS_TYPE_UNDERFLOW, + QOSType::Throttle => gst_sys::GST_QOS_TYPE_THROTTLE, QOSType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for QOSType { - fn from_glib(value: ffi::GstQOSType) -> Self { +impl FromGlib for QOSType { + fn from_glib(value: gst_sys::GstQOSType) -> Self { skip_assert_initialized!(); match value { 0 => QOSType::Overflow, @@ -1635,7 +1635,7 @@ impl FromGlib for QOSType { impl StaticType for QOSType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_qos_type_get_type()) } + unsafe { from_glib(gst_sys::gst_qos_type_get_type()) } } } @@ -1647,13 +1647,13 @@ impl<'a> FromValueOptional<'a> for QOSType { impl<'a> FromValue<'a> for QOSType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for QOSType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1670,22 +1670,22 @@ pub enum Rank { #[doc(hidden)] impl ToGlib for Rank { - type GlibType = ffi::GstRank; + type GlibType = gst_sys::GstRank; - fn to_glib(&self) -> ffi::GstRank { + fn to_glib(&self) -> gst_sys::GstRank { match *self { - Rank::None => ffi::GST_RANK_NONE, - Rank::Marginal => ffi::GST_RANK_MARGINAL, - Rank::Secondary => ffi::GST_RANK_SECONDARY, - Rank::Primary => ffi::GST_RANK_PRIMARY, + Rank::None => gst_sys::GST_RANK_NONE, + Rank::Marginal => gst_sys::GST_RANK_MARGINAL, + Rank::Secondary => gst_sys::GST_RANK_SECONDARY, + Rank::Primary => gst_sys::GST_RANK_PRIMARY, Rank::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for Rank { - fn from_glib(value: ffi::GstRank) -> Self { +impl FromGlib for Rank { + fn from_glib(value: gst_sys::GstRank) -> Self { skip_assert_initialized!(); match value { 0 => Rank::None, @@ -1699,7 +1699,7 @@ impl FromGlib for Rank { impl StaticType for Rank { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_rank_get_type()) } + unsafe { from_glib(gst_sys::gst_rank_get_type()) } } } @@ -1711,13 +1711,13 @@ impl<'a> FromValueOptional<'a> for Rank { impl<'a> FromValue<'a> for Rank { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for Rank { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1746,34 +1746,34 @@ pub enum ResourceError { #[doc(hidden)] impl ToGlib for ResourceError { - type GlibType = ffi::GstResourceError; + type GlibType = gst_sys::GstResourceError; - fn to_glib(&self) -> ffi::GstResourceError { + fn to_glib(&self) -> gst_sys::GstResourceError { match *self { - ResourceError::Failed => ffi::GST_RESOURCE_ERROR_FAILED, - ResourceError::TooLazy => ffi::GST_RESOURCE_ERROR_TOO_LAZY, - ResourceError::NotFound => ffi::GST_RESOURCE_ERROR_NOT_FOUND, - ResourceError::Busy => ffi::GST_RESOURCE_ERROR_BUSY, - ResourceError::OpenRead => ffi::GST_RESOURCE_ERROR_OPEN_READ, - ResourceError::OpenWrite => ffi::GST_RESOURCE_ERROR_OPEN_WRITE, - ResourceError::OpenReadWrite => ffi::GST_RESOURCE_ERROR_OPEN_READ_WRITE, - ResourceError::Close => ffi::GST_RESOURCE_ERROR_CLOSE, - ResourceError::Read => ffi::GST_RESOURCE_ERROR_READ, - ResourceError::Write => ffi::GST_RESOURCE_ERROR_WRITE, - ResourceError::Seek => ffi::GST_RESOURCE_ERROR_SEEK, - ResourceError::Sync => ffi::GST_RESOURCE_ERROR_SYNC, - ResourceError::Settings => ffi::GST_RESOURCE_ERROR_SETTINGS, - ResourceError::NoSpaceLeft => ffi::GST_RESOURCE_ERROR_NO_SPACE_LEFT, - ResourceError::NotAuthorized => ffi::GST_RESOURCE_ERROR_NOT_AUTHORIZED, - ResourceError::NumErrors => ffi::GST_RESOURCE_ERROR_NUM_ERRORS, + ResourceError::Failed => gst_sys::GST_RESOURCE_ERROR_FAILED, + ResourceError::TooLazy => gst_sys::GST_RESOURCE_ERROR_TOO_LAZY, + ResourceError::NotFound => gst_sys::GST_RESOURCE_ERROR_NOT_FOUND, + ResourceError::Busy => gst_sys::GST_RESOURCE_ERROR_BUSY, + ResourceError::OpenRead => gst_sys::GST_RESOURCE_ERROR_OPEN_READ, + ResourceError::OpenWrite => gst_sys::GST_RESOURCE_ERROR_OPEN_WRITE, + ResourceError::OpenReadWrite => gst_sys::GST_RESOURCE_ERROR_OPEN_READ_WRITE, + ResourceError::Close => gst_sys::GST_RESOURCE_ERROR_CLOSE, + ResourceError::Read => gst_sys::GST_RESOURCE_ERROR_READ, + ResourceError::Write => gst_sys::GST_RESOURCE_ERROR_WRITE, + ResourceError::Seek => gst_sys::GST_RESOURCE_ERROR_SEEK, + ResourceError::Sync => gst_sys::GST_RESOURCE_ERROR_SYNC, + ResourceError::Settings => gst_sys::GST_RESOURCE_ERROR_SETTINGS, + ResourceError::NoSpaceLeft => gst_sys::GST_RESOURCE_ERROR_NO_SPACE_LEFT, + ResourceError::NotAuthorized => gst_sys::GST_RESOURCE_ERROR_NOT_AUTHORIZED, + ResourceError::NumErrors => gst_sys::GST_RESOURCE_ERROR_NUM_ERRORS, ResourceError::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for ResourceError { - fn from_glib(value: ffi::GstResourceError) -> Self { +impl FromGlib for ResourceError { + fn from_glib(value: gst_sys::GstResourceError) -> Self { skip_assert_initialized!(); match value { 1 => ResourceError::Failed, @@ -1800,7 +1800,7 @@ impl FromGlib for ResourceError { impl ErrorDomain for ResourceError { fn domain() -> Quark { skip_assert_initialized!(); - unsafe { from_glib(ffi::gst_resource_error_quark()) } + unsafe { from_glib(gst_sys::gst_resource_error_quark()) } } fn code(self) -> i32 { @@ -1833,7 +1833,7 @@ impl ErrorDomain for ResourceError { impl StaticType for ResourceError { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_resource_error_get_type()) } + unsafe { from_glib(gst_sys::gst_resource_error_get_type()) } } } @@ -1845,13 +1845,13 @@ impl<'a> FromValueOptional<'a> for ResourceError { impl<'a> FromValue<'a> for ResourceError { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for ResourceError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1867,21 +1867,21 @@ pub enum SeekType { #[doc(hidden)] impl ToGlib for SeekType { - type GlibType = ffi::GstSeekType; + type GlibType = gst_sys::GstSeekType; - fn to_glib(&self) -> ffi::GstSeekType { + fn to_glib(&self) -> gst_sys::GstSeekType { match *self { - SeekType::None => ffi::GST_SEEK_TYPE_NONE, - SeekType::Set => ffi::GST_SEEK_TYPE_SET, - SeekType::End => ffi::GST_SEEK_TYPE_END, + SeekType::None => gst_sys::GST_SEEK_TYPE_NONE, + SeekType::Set => gst_sys::GST_SEEK_TYPE_SET, + SeekType::End => gst_sys::GST_SEEK_TYPE_END, SeekType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for SeekType { - fn from_glib(value: ffi::GstSeekType) -> Self { +impl FromGlib for SeekType { + fn from_glib(value: gst_sys::GstSeekType) -> Self { skip_assert_initialized!(); match value { 0 => SeekType::None, @@ -1894,7 +1894,7 @@ impl FromGlib for SeekType { impl StaticType for SeekType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_seek_type_get_type()) } + unsafe { from_glib(gst_sys::gst_seek_type_get_type()) } } } @@ -1906,13 +1906,13 @@ impl<'a> FromValueOptional<'a> for SeekType { impl<'a> FromValue<'a> for SeekType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for SeekType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1930,23 +1930,23 @@ pub enum State { #[doc(hidden)] impl ToGlib for State { - type GlibType = ffi::GstState; + type GlibType = gst_sys::GstState; - fn to_glib(&self) -> ffi::GstState { + fn to_glib(&self) -> gst_sys::GstState { match *self { - State::VoidPending => ffi::GST_STATE_VOID_PENDING, - State::Null => ffi::GST_STATE_NULL, - State::Ready => ffi::GST_STATE_READY, - State::Paused => ffi::GST_STATE_PAUSED, - State::Playing => ffi::GST_STATE_PLAYING, + State::VoidPending => gst_sys::GST_STATE_VOID_PENDING, + State::Null => gst_sys::GST_STATE_NULL, + State::Ready => gst_sys::GST_STATE_READY, + State::Paused => gst_sys::GST_STATE_PAUSED, + State::Playing => gst_sys::GST_STATE_PLAYING, State::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for State { - fn from_glib(value: ffi::GstState) -> Self { +impl FromGlib for State { + fn from_glib(value: gst_sys::GstState) -> Self { skip_assert_initialized!(); match value { 0 => State::VoidPending, @@ -1961,7 +1961,7 @@ impl FromGlib for State { impl StaticType for State { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_state_get_type()) } + unsafe { from_glib(gst_sys::gst_state_get_type()) } } } @@ -1973,13 +1973,13 @@ impl<'a> FromValueOptional<'a> for State { impl<'a> FromValue<'a> for State { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for State { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2002,28 +2002,28 @@ pub enum StateChange { #[doc(hidden)] impl ToGlib for StateChange { - type GlibType = ffi::GstStateChange; + type GlibType = gst_sys::GstStateChange; - fn to_glib(&self) -> ffi::GstStateChange { + fn to_glib(&self) -> gst_sys::GstStateChange { match *self { - StateChange::NullToReady => ffi::GST_STATE_CHANGE_NULL_TO_READY, - StateChange::ReadyToPaused => ffi::GST_STATE_CHANGE_READY_TO_PAUSED, - StateChange::PausedToPlaying => ffi::GST_STATE_CHANGE_PAUSED_TO_PLAYING, - StateChange::PlayingToPaused => ffi::GST_STATE_CHANGE_PLAYING_TO_PAUSED, - StateChange::PausedToReady => ffi::GST_STATE_CHANGE_PAUSED_TO_READY, - StateChange::ReadyToNull => ffi::GST_STATE_CHANGE_READY_TO_NULL, - StateChange::NullToNull => ffi::GST_STATE_CHANGE_NULL_TO_NULL, - StateChange::ReadyToReady => ffi::GST_STATE_CHANGE_READY_TO_READY, - StateChange::PausedToPaused => ffi::GST_STATE_CHANGE_PAUSED_TO_PAUSED, - StateChange::PlayingToPlaying => ffi::GST_STATE_CHANGE_PLAYING_TO_PLAYING, + StateChange::NullToReady => gst_sys::GST_STATE_CHANGE_NULL_TO_READY, + StateChange::ReadyToPaused => gst_sys::GST_STATE_CHANGE_READY_TO_PAUSED, + StateChange::PausedToPlaying => gst_sys::GST_STATE_CHANGE_PAUSED_TO_PLAYING, + StateChange::PlayingToPaused => gst_sys::GST_STATE_CHANGE_PLAYING_TO_PAUSED, + StateChange::PausedToReady => gst_sys::GST_STATE_CHANGE_PAUSED_TO_READY, + StateChange::ReadyToNull => gst_sys::GST_STATE_CHANGE_READY_TO_NULL, + StateChange::NullToNull => gst_sys::GST_STATE_CHANGE_NULL_TO_NULL, + StateChange::ReadyToReady => gst_sys::GST_STATE_CHANGE_READY_TO_READY, + StateChange::PausedToPaused => gst_sys::GST_STATE_CHANGE_PAUSED_TO_PAUSED, + StateChange::PlayingToPlaying => gst_sys::GST_STATE_CHANGE_PLAYING_TO_PLAYING, StateChange::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for StateChange { - fn from_glib(value: ffi::GstStateChange) -> Self { +impl FromGlib for StateChange { + fn from_glib(value: gst_sys::GstStateChange) -> Self { skip_assert_initialized!(); match value { 10 => StateChange::NullToReady, @@ -2043,7 +2043,7 @@ impl FromGlib for StateChange { impl StaticType for StateChange { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_state_change_get_type()) } + unsafe { from_glib(gst_sys::gst_state_change_get_type()) } } } @@ -2055,13 +2055,13 @@ impl<'a> FromValueOptional<'a> for StateChange { impl<'a> FromValue<'a> for StateChange { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for StateChange { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2079,22 +2079,22 @@ pub enum StateChangeReturn { #[doc(hidden)] impl ToGlib for StateChangeReturn { - type GlibType = ffi::GstStateChangeReturn; + type GlibType = gst_sys::GstStateChangeReturn; - fn to_glib(&self) -> ffi::GstStateChangeReturn { + fn to_glib(&self) -> gst_sys::GstStateChangeReturn { match *self { - StateChangeReturn::Failure => ffi::GST_STATE_CHANGE_FAILURE, - StateChangeReturn::Success => ffi::GST_STATE_CHANGE_SUCCESS, - StateChangeReturn::Async => ffi::GST_STATE_CHANGE_ASYNC, - StateChangeReturn::NoPreroll => ffi::GST_STATE_CHANGE_NO_PREROLL, + StateChangeReturn::Failure => gst_sys::GST_STATE_CHANGE_FAILURE, + StateChangeReturn::Success => gst_sys::GST_STATE_CHANGE_SUCCESS, + StateChangeReturn::Async => gst_sys::GST_STATE_CHANGE_ASYNC, + StateChangeReturn::NoPreroll => gst_sys::GST_STATE_CHANGE_NO_PREROLL, StateChangeReturn::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for StateChangeReturn { - fn from_glib(value: ffi::GstStateChangeReturn) -> Self { +impl FromGlib for StateChangeReturn { + fn from_glib(value: gst_sys::GstStateChangeReturn) -> Self { skip_assert_initialized!(); match value { 0 => StateChangeReturn::Failure, @@ -2108,7 +2108,7 @@ impl FromGlib for StateChangeReturn { impl StaticType for StateChangeReturn { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_state_change_return_get_type()) } + unsafe { from_glib(gst_sys::gst_state_change_return_get_type()) } } } @@ -2120,13 +2120,13 @@ impl<'a> FromValueOptional<'a> for StateChangeReturn { impl<'a> FromValue<'a> for StateChangeReturn { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for StateChangeReturn { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2153,32 +2153,32 @@ pub enum StreamError { #[doc(hidden)] impl ToGlib for StreamError { - type GlibType = ffi::GstStreamError; + type GlibType = gst_sys::GstStreamError; - fn to_glib(&self) -> ffi::GstStreamError { + fn to_glib(&self) -> gst_sys::GstStreamError { match *self { - StreamError::Failed => ffi::GST_STREAM_ERROR_FAILED, - StreamError::TooLazy => ffi::GST_STREAM_ERROR_TOO_LAZY, - StreamError::NotImplemented => ffi::GST_STREAM_ERROR_NOT_IMPLEMENTED, - StreamError::TypeNotFound => ffi::GST_STREAM_ERROR_TYPE_NOT_FOUND, - StreamError::WrongType => ffi::GST_STREAM_ERROR_WRONG_TYPE, - StreamError::CodecNotFound => ffi::GST_STREAM_ERROR_CODEC_NOT_FOUND, - StreamError::Decode => ffi::GST_STREAM_ERROR_DECODE, - StreamError::Encode => ffi::GST_STREAM_ERROR_ENCODE, - StreamError::Demux => ffi::GST_STREAM_ERROR_DEMUX, - StreamError::Mux => ffi::GST_STREAM_ERROR_MUX, - StreamError::Format => ffi::GST_STREAM_ERROR_FORMAT, - StreamError::Decrypt => ffi::GST_STREAM_ERROR_DECRYPT, - StreamError::DecryptNokey => ffi::GST_STREAM_ERROR_DECRYPT_NOKEY, - StreamError::NumErrors => ffi::GST_STREAM_ERROR_NUM_ERRORS, + StreamError::Failed => gst_sys::GST_STREAM_ERROR_FAILED, + StreamError::TooLazy => gst_sys::GST_STREAM_ERROR_TOO_LAZY, + StreamError::NotImplemented => gst_sys::GST_STREAM_ERROR_NOT_IMPLEMENTED, + StreamError::TypeNotFound => gst_sys::GST_STREAM_ERROR_TYPE_NOT_FOUND, + StreamError::WrongType => gst_sys::GST_STREAM_ERROR_WRONG_TYPE, + StreamError::CodecNotFound => gst_sys::GST_STREAM_ERROR_CODEC_NOT_FOUND, + StreamError::Decode => gst_sys::GST_STREAM_ERROR_DECODE, + StreamError::Encode => gst_sys::GST_STREAM_ERROR_ENCODE, + StreamError::Demux => gst_sys::GST_STREAM_ERROR_DEMUX, + StreamError::Mux => gst_sys::GST_STREAM_ERROR_MUX, + StreamError::Format => gst_sys::GST_STREAM_ERROR_FORMAT, + StreamError::Decrypt => gst_sys::GST_STREAM_ERROR_DECRYPT, + StreamError::DecryptNokey => gst_sys::GST_STREAM_ERROR_DECRYPT_NOKEY, + StreamError::NumErrors => gst_sys::GST_STREAM_ERROR_NUM_ERRORS, StreamError::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for StreamError { - fn from_glib(value: ffi::GstStreamError) -> Self { +impl FromGlib for StreamError { + fn from_glib(value: gst_sys::GstStreamError) -> Self { skip_assert_initialized!(); match value { 1 => StreamError::Failed, @@ -2203,7 +2203,7 @@ impl FromGlib for StreamError { impl ErrorDomain for StreamError { fn domain() -> Quark { skip_assert_initialized!(); - unsafe { from_glib(ffi::gst_stream_error_quark()) } + unsafe { from_glib(gst_sys::gst_stream_error_quark()) } } fn code(self) -> i32 { @@ -2234,7 +2234,7 @@ impl ErrorDomain for StreamError { impl StaticType for StreamError { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_stream_error_get_type()) } + unsafe { from_glib(gst_sys::gst_stream_error_get_type()) } } } @@ -2246,13 +2246,13 @@ impl<'a> FromValueOptional<'a> for StreamError { impl<'a> FromValue<'a> for StreamError { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for StreamError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2272,25 +2272,25 @@ pub enum StreamStatusType { #[doc(hidden)] impl ToGlib for StreamStatusType { - type GlibType = ffi::GstStreamStatusType; + type GlibType = gst_sys::GstStreamStatusType; - fn to_glib(&self) -> ffi::GstStreamStatusType { + fn to_glib(&self) -> gst_sys::GstStreamStatusType { match *self { - StreamStatusType::Create => ffi::GST_STREAM_STATUS_TYPE_CREATE, - StreamStatusType::Enter => ffi::GST_STREAM_STATUS_TYPE_ENTER, - StreamStatusType::Leave => ffi::GST_STREAM_STATUS_TYPE_LEAVE, - StreamStatusType::Destroy => ffi::GST_STREAM_STATUS_TYPE_DESTROY, - StreamStatusType::Start => ffi::GST_STREAM_STATUS_TYPE_START, - StreamStatusType::Pause => ffi::GST_STREAM_STATUS_TYPE_PAUSE, - StreamStatusType::Stop => ffi::GST_STREAM_STATUS_TYPE_STOP, + StreamStatusType::Create => gst_sys::GST_STREAM_STATUS_TYPE_CREATE, + StreamStatusType::Enter => gst_sys::GST_STREAM_STATUS_TYPE_ENTER, + StreamStatusType::Leave => gst_sys::GST_STREAM_STATUS_TYPE_LEAVE, + StreamStatusType::Destroy => gst_sys::GST_STREAM_STATUS_TYPE_DESTROY, + StreamStatusType::Start => gst_sys::GST_STREAM_STATUS_TYPE_START, + StreamStatusType::Pause => gst_sys::GST_STREAM_STATUS_TYPE_PAUSE, + StreamStatusType::Stop => gst_sys::GST_STREAM_STATUS_TYPE_STOP, StreamStatusType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for StreamStatusType { - fn from_glib(value: ffi::GstStreamStatusType) -> Self { +impl FromGlib for StreamStatusType { + fn from_glib(value: gst_sys::GstStreamStatusType) -> Self { skip_assert_initialized!(); match value { 0 => StreamStatusType::Create, @@ -2307,7 +2307,7 @@ impl FromGlib for StreamStatusType { impl StaticType for StreamStatusType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_stream_status_type_get_type()) } + unsafe { from_glib(gst_sys::gst_stream_status_type_get_type()) } } } @@ -2319,13 +2319,13 @@ impl<'a> FromValueOptional<'a> for StreamStatusType { impl<'a> FromValue<'a> for StreamStatusType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for StreamStatusType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2340,20 +2340,20 @@ pub enum StructureChangeType { #[doc(hidden)] impl ToGlib for StructureChangeType { - type GlibType = ffi::GstStructureChangeType; + type GlibType = gst_sys::GstStructureChangeType; - fn to_glib(&self) -> ffi::GstStructureChangeType { + fn to_glib(&self) -> gst_sys::GstStructureChangeType { match *self { - StructureChangeType::Link => ffi::GST_STRUCTURE_CHANGE_TYPE_PAD_LINK, - StructureChangeType::Unlink => ffi::GST_STRUCTURE_CHANGE_TYPE_PAD_UNLINK, + StructureChangeType::Link => gst_sys::GST_STRUCTURE_CHANGE_TYPE_PAD_LINK, + StructureChangeType::Unlink => gst_sys::GST_STRUCTURE_CHANGE_TYPE_PAD_UNLINK, StructureChangeType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for StructureChangeType { - fn from_glib(value: ffi::GstStructureChangeType) -> Self { +impl FromGlib for StructureChangeType { + fn from_glib(value: gst_sys::GstStructureChangeType) -> Self { skip_assert_initialized!(); match value { 0 => StructureChangeType::Link, @@ -2365,7 +2365,7 @@ impl FromGlib for StructureChangeType { impl StaticType for StructureChangeType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_structure_change_type_get_type()) } + unsafe { from_glib(gst_sys::gst_structure_change_type_get_type()) } } } @@ -2377,13 +2377,13 @@ impl<'a> FromValueOptional<'a> for StructureChangeType { impl<'a> FromValue<'a> for StructureChangeType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for StructureChangeType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2401,23 +2401,23 @@ pub enum TagFlag { #[doc(hidden)] impl ToGlib for TagFlag { - type GlibType = ffi::GstTagFlag; + type GlibType = gst_sys::GstTagFlag; - fn to_glib(&self) -> ffi::GstTagFlag { + fn to_glib(&self) -> gst_sys::GstTagFlag { match *self { - TagFlag::Undefined => ffi::GST_TAG_FLAG_UNDEFINED, - TagFlag::Meta => ffi::GST_TAG_FLAG_META, - TagFlag::Encoded => ffi::GST_TAG_FLAG_ENCODED, - TagFlag::Decoded => ffi::GST_TAG_FLAG_DECODED, - TagFlag::Count => ffi::GST_TAG_FLAG_COUNT, + TagFlag::Undefined => gst_sys::GST_TAG_FLAG_UNDEFINED, + TagFlag::Meta => gst_sys::GST_TAG_FLAG_META, + TagFlag::Encoded => gst_sys::GST_TAG_FLAG_ENCODED, + TagFlag::Decoded => gst_sys::GST_TAG_FLAG_DECODED, + TagFlag::Count => gst_sys::GST_TAG_FLAG_COUNT, TagFlag::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for TagFlag { - fn from_glib(value: ffi::GstTagFlag) -> Self { +impl FromGlib for TagFlag { + fn from_glib(value: gst_sys::GstTagFlag) -> Self { skip_assert_initialized!(); match value { 0 => TagFlag::Undefined, @@ -2432,7 +2432,7 @@ impl FromGlib for TagFlag { impl StaticType for TagFlag { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_tag_flag_get_type()) } + unsafe { from_glib(gst_sys::gst_tag_flag_get_type()) } } } @@ -2444,13 +2444,13 @@ impl<'a> FromValueOptional<'a> for TagFlag { impl<'a> FromValue<'a> for TagFlag { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TagFlag { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2471,26 +2471,26 @@ pub enum TagMergeMode { #[doc(hidden)] impl ToGlib for TagMergeMode { - type GlibType = ffi::GstTagMergeMode; + type GlibType = gst_sys::GstTagMergeMode; - fn to_glib(&self) -> ffi::GstTagMergeMode { + fn to_glib(&self) -> gst_sys::GstTagMergeMode { match *self { - TagMergeMode::Undefined => ffi::GST_TAG_MERGE_UNDEFINED, - TagMergeMode::ReplaceAll => ffi::GST_TAG_MERGE_REPLACE_ALL, - TagMergeMode::Replace => ffi::GST_TAG_MERGE_REPLACE, - TagMergeMode::Append => ffi::GST_TAG_MERGE_APPEND, - TagMergeMode::Prepend => ffi::GST_TAG_MERGE_PREPEND, - TagMergeMode::Keep => ffi::GST_TAG_MERGE_KEEP, - TagMergeMode::KeepAll => ffi::GST_TAG_MERGE_KEEP_ALL, - TagMergeMode::Count => ffi::GST_TAG_MERGE_COUNT, + TagMergeMode::Undefined => gst_sys::GST_TAG_MERGE_UNDEFINED, + TagMergeMode::ReplaceAll => gst_sys::GST_TAG_MERGE_REPLACE_ALL, + TagMergeMode::Replace => gst_sys::GST_TAG_MERGE_REPLACE, + TagMergeMode::Append => gst_sys::GST_TAG_MERGE_APPEND, + TagMergeMode::Prepend => gst_sys::GST_TAG_MERGE_PREPEND, + TagMergeMode::Keep => gst_sys::GST_TAG_MERGE_KEEP, + TagMergeMode::KeepAll => gst_sys::GST_TAG_MERGE_KEEP_ALL, + TagMergeMode::Count => gst_sys::GST_TAG_MERGE_COUNT, TagMergeMode::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for TagMergeMode { - fn from_glib(value: ffi::GstTagMergeMode) -> Self { +impl FromGlib for TagMergeMode { + fn from_glib(value: gst_sys::GstTagMergeMode) -> Self { skip_assert_initialized!(); match value { 0 => TagMergeMode::Undefined, @@ -2508,7 +2508,7 @@ impl FromGlib for TagMergeMode { impl StaticType for TagMergeMode { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_tag_merge_mode_get_type()) } + unsafe { from_glib(gst_sys::gst_tag_merge_mode_get_type()) } } } @@ -2520,13 +2520,13 @@ impl<'a> FromValueOptional<'a> for TagMergeMode { impl<'a> FromValue<'a> for TagMergeMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TagMergeMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2542,20 +2542,20 @@ pub enum TagScope { #[doc(hidden)] impl ToGlib for TagScope { - type GlibType = ffi::GstTagScope; + type GlibType = gst_sys::GstTagScope; - fn to_glib(&self) -> ffi::GstTagScope { + fn to_glib(&self) -> gst_sys::GstTagScope { match *self { - TagScope::Stream => ffi::GST_TAG_SCOPE_STREAM, - TagScope::Global => ffi::GST_TAG_SCOPE_GLOBAL, + TagScope::Stream => gst_sys::GST_TAG_SCOPE_STREAM, + TagScope::Global => gst_sys::GST_TAG_SCOPE_GLOBAL, TagScope::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for TagScope { - fn from_glib(value: ffi::GstTagScope) -> Self { +impl FromGlib for TagScope { + fn from_glib(value: gst_sys::GstTagScope) -> Self { skip_assert_initialized!(); match value { 0 => TagScope::Stream, @@ -2567,7 +2567,7 @@ impl FromGlib for TagScope { impl StaticType for TagScope { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_tag_scope_get_type()) } + unsafe { from_glib(gst_sys::gst_tag_scope_get_type()) } } } @@ -2579,13 +2579,13 @@ impl<'a> FromValueOptional<'a> for TagScope { impl<'a> FromValue<'a> for TagScope { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TagScope { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2601,21 +2601,21 @@ pub enum TaskState { #[doc(hidden)] impl ToGlib for TaskState { - type GlibType = ffi::GstTaskState; + type GlibType = gst_sys::GstTaskState; - fn to_glib(&self) -> ffi::GstTaskState { + fn to_glib(&self) -> gst_sys::GstTaskState { match *self { - TaskState::Started => ffi::GST_TASK_STARTED, - TaskState::Stopped => ffi::GST_TASK_STOPPED, - TaskState::Paused => ffi::GST_TASK_PAUSED, + TaskState::Started => gst_sys::GST_TASK_STARTED, + TaskState::Stopped => gst_sys::GST_TASK_STOPPED, + TaskState::Paused => gst_sys::GST_TASK_PAUSED, TaskState::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for TaskState { - fn from_glib(value: ffi::GstTaskState) -> Self { +impl FromGlib for TaskState { + fn from_glib(value: gst_sys::GstTaskState) -> Self { skip_assert_initialized!(); match value { 0 => TaskState::Started, @@ -2628,7 +2628,7 @@ impl FromGlib for TaskState { impl StaticType for TaskState { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_task_state_get_type()) } + unsafe { from_glib(gst_sys::gst_task_state_get_type()) } } } @@ -2640,13 +2640,13 @@ impl<'a> FromValueOptional<'a> for TaskState { impl<'a> FromValue<'a> for TaskState { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TaskState { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2667,25 +2667,25 @@ pub enum TocEntryType { #[doc(hidden)] impl ToGlib for TocEntryType { - type GlibType = ffi::GstTocEntryType; + type GlibType = gst_sys::GstTocEntryType; - fn to_glib(&self) -> ffi::GstTocEntryType { + fn to_glib(&self) -> gst_sys::GstTocEntryType { match *self { - TocEntryType::Angle => ffi::GST_TOC_ENTRY_TYPE_ANGLE, - TocEntryType::Version => ffi::GST_TOC_ENTRY_TYPE_VERSION, - TocEntryType::Edition => ffi::GST_TOC_ENTRY_TYPE_EDITION, - TocEntryType::Invalid => ffi::GST_TOC_ENTRY_TYPE_INVALID, - TocEntryType::Title => ffi::GST_TOC_ENTRY_TYPE_TITLE, - TocEntryType::Track => ffi::GST_TOC_ENTRY_TYPE_TRACK, - TocEntryType::Chapter => ffi::GST_TOC_ENTRY_TYPE_CHAPTER, + TocEntryType::Angle => gst_sys::GST_TOC_ENTRY_TYPE_ANGLE, + TocEntryType::Version => gst_sys::GST_TOC_ENTRY_TYPE_VERSION, + TocEntryType::Edition => gst_sys::GST_TOC_ENTRY_TYPE_EDITION, + TocEntryType::Invalid => gst_sys::GST_TOC_ENTRY_TYPE_INVALID, + TocEntryType::Title => gst_sys::GST_TOC_ENTRY_TYPE_TITLE, + TocEntryType::Track => gst_sys::GST_TOC_ENTRY_TYPE_TRACK, + TocEntryType::Chapter => gst_sys::GST_TOC_ENTRY_TYPE_CHAPTER, TocEntryType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for TocEntryType { - fn from_glib(value: ffi::GstTocEntryType) -> Self { +impl FromGlib for TocEntryType { + fn from_glib(value: gst_sys::GstTocEntryType) -> Self { skip_assert_initialized!(); match value { -3 => TocEntryType::Angle, @@ -2702,7 +2702,7 @@ impl FromGlib for TocEntryType { impl StaticType for TocEntryType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_toc_entry_type_get_type()) } + unsafe { from_glib(gst_sys::gst_toc_entry_type_get_type()) } } } @@ -2714,13 +2714,13 @@ impl<'a> FromValueOptional<'a> for TocEntryType { impl<'a> FromValue<'a> for TocEntryType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TocEntryType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2738,22 +2738,22 @@ pub enum TocLoopType { #[doc(hidden)] impl ToGlib for TocLoopType { - type GlibType = ffi::GstTocLoopType; + type GlibType = gst_sys::GstTocLoopType; - fn to_glib(&self) -> ffi::GstTocLoopType { + fn to_glib(&self) -> gst_sys::GstTocLoopType { match *self { - TocLoopType::None => ffi::GST_TOC_LOOP_NONE, - TocLoopType::Forward => ffi::GST_TOC_LOOP_FORWARD, - TocLoopType::Reverse => ffi::GST_TOC_LOOP_REVERSE, - TocLoopType::PingPong => ffi::GST_TOC_LOOP_PING_PONG, + TocLoopType::None => gst_sys::GST_TOC_LOOP_NONE, + TocLoopType::Forward => gst_sys::GST_TOC_LOOP_FORWARD, + TocLoopType::Reverse => gst_sys::GST_TOC_LOOP_REVERSE, + TocLoopType::PingPong => gst_sys::GST_TOC_LOOP_PING_PONG, TocLoopType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for TocLoopType { - fn from_glib(value: ffi::GstTocLoopType) -> Self { +impl FromGlib for TocLoopType { + fn from_glib(value: gst_sys::GstTocLoopType) -> Self { skip_assert_initialized!(); match value { 0 => TocLoopType::None, @@ -2767,7 +2767,7 @@ impl FromGlib for TocLoopType { impl StaticType for TocLoopType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_toc_loop_type_get_type()) } + unsafe { from_glib(gst_sys::gst_toc_loop_type_get_type()) } } } @@ -2779,13 +2779,13 @@ impl<'a> FromValueOptional<'a> for TocLoopType { impl<'a> FromValue<'a> for TocLoopType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TocLoopType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2801,20 +2801,20 @@ pub enum TocScope { #[doc(hidden)] impl ToGlib for TocScope { - type GlibType = ffi::GstTocScope; + type GlibType = gst_sys::GstTocScope; - fn to_glib(&self) -> ffi::GstTocScope { + fn to_glib(&self) -> gst_sys::GstTocScope { match *self { - TocScope::Global => ffi::GST_TOC_SCOPE_GLOBAL, - TocScope::Current => ffi::GST_TOC_SCOPE_CURRENT, + TocScope::Global => gst_sys::GST_TOC_SCOPE_GLOBAL, + TocScope::Current => gst_sys::GST_TOC_SCOPE_CURRENT, TocScope::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for TocScope { - fn from_glib(value: ffi::GstTocScope) -> Self { +impl FromGlib for TocScope { + fn from_glib(value: gst_sys::GstTocScope) -> Self { skip_assert_initialized!(); match value { 1 => TocScope::Global, @@ -2826,7 +2826,7 @@ impl FromGlib for TocScope { impl StaticType for TocScope { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_toc_scope_get_type()) } + unsafe { from_glib(gst_sys::gst_toc_scope_get_type()) } } } @@ -2838,13 +2838,13 @@ impl<'a> FromValueOptional<'a> for TocScope { impl<'a> FromValue<'a> for TocScope { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TocScope { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2863,24 +2863,24 @@ pub enum TypeFindProbability { #[doc(hidden)] impl ToGlib for TypeFindProbability { - type GlibType = ffi::GstTypeFindProbability; + type GlibType = gst_sys::GstTypeFindProbability; - fn to_glib(&self) -> ffi::GstTypeFindProbability { + fn to_glib(&self) -> gst_sys::GstTypeFindProbability { match *self { - TypeFindProbability::None => ffi::GST_TYPE_FIND_NONE, - TypeFindProbability::Minimum => ffi::GST_TYPE_FIND_MINIMUM, - TypeFindProbability::Possible => ffi::GST_TYPE_FIND_POSSIBLE, - TypeFindProbability::Likely => ffi::GST_TYPE_FIND_LIKELY, - TypeFindProbability::NearlyCertain => ffi::GST_TYPE_FIND_NEARLY_CERTAIN, - TypeFindProbability::Maximum => ffi::GST_TYPE_FIND_MAXIMUM, + TypeFindProbability::None => gst_sys::GST_TYPE_FIND_NONE, + TypeFindProbability::Minimum => gst_sys::GST_TYPE_FIND_MINIMUM, + TypeFindProbability::Possible => gst_sys::GST_TYPE_FIND_POSSIBLE, + TypeFindProbability::Likely => gst_sys::GST_TYPE_FIND_LIKELY, + TypeFindProbability::NearlyCertain => gst_sys::GST_TYPE_FIND_NEARLY_CERTAIN, + TypeFindProbability::Maximum => gst_sys::GST_TYPE_FIND_MAXIMUM, TypeFindProbability::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for TypeFindProbability { - fn from_glib(value: ffi::GstTypeFindProbability) -> Self { +impl FromGlib for TypeFindProbability { + fn from_glib(value: gst_sys::GstTypeFindProbability) -> Self { skip_assert_initialized!(); match value { 0 => TypeFindProbability::None, @@ -2896,7 +2896,7 @@ impl FromGlib for TypeFindProbability { impl StaticType for TypeFindProbability { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_type_find_probability_get_type()) } + unsafe { from_glib(gst_sys::gst_type_find_probability_get_type()) } } } @@ -2908,13 +2908,13 @@ impl<'a> FromValueOptional<'a> for TypeFindProbability { impl<'a> FromValue<'a> for TypeFindProbability { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TypeFindProbability { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2931,22 +2931,22 @@ pub enum URIError { #[doc(hidden)] impl ToGlib for URIError { - type GlibType = ffi::GstURIError; + type GlibType = gst_sys::GstURIError; - fn to_glib(&self) -> ffi::GstURIError { + fn to_glib(&self) -> gst_sys::GstURIError { match *self { - URIError::UnsupportedProtocol => ffi::GST_URI_ERROR_UNSUPPORTED_PROTOCOL, - URIError::BadUri => ffi::GST_URI_ERROR_BAD_URI, - URIError::BadState => ffi::GST_URI_ERROR_BAD_STATE, - URIError::BadReference => ffi::GST_URI_ERROR_BAD_REFERENCE, + URIError::UnsupportedProtocol => gst_sys::GST_URI_ERROR_UNSUPPORTED_PROTOCOL, + URIError::BadUri => gst_sys::GST_URI_ERROR_BAD_URI, + URIError::BadState => gst_sys::GST_URI_ERROR_BAD_STATE, + URIError::BadReference => gst_sys::GST_URI_ERROR_BAD_REFERENCE, URIError::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for URIError { - fn from_glib(value: ffi::GstURIError) -> Self { +impl FromGlib for URIError { + fn from_glib(value: gst_sys::GstURIError) -> Self { skip_assert_initialized!(); match value { 0 => URIError::UnsupportedProtocol, @@ -2961,7 +2961,7 @@ impl FromGlib for URIError { impl ErrorDomain for URIError { fn domain() -> Quark { skip_assert_initialized!(); - unsafe { from_glib(ffi::gst_uri_error_quark()) } + unsafe { from_glib(gst_sys::gst_uri_error_quark()) } } fn code(self) -> i32 { @@ -2982,7 +2982,7 @@ impl ErrorDomain for URIError { impl StaticType for URIError { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_uri_error_get_type()) } + unsafe { from_glib(gst_sys::gst_uri_error_get_type()) } } } @@ -2994,13 +2994,13 @@ impl<'a> FromValueOptional<'a> for URIError { impl<'a> FromValue<'a> for URIError { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for URIError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -3016,21 +3016,21 @@ pub enum URIType { #[doc(hidden)] impl ToGlib for URIType { - type GlibType = ffi::GstURIType; + type GlibType = gst_sys::GstURIType; - fn to_glib(&self) -> ffi::GstURIType { + fn to_glib(&self) -> gst_sys::GstURIType { match *self { - URIType::Unknown => ffi::GST_URI_UNKNOWN, - URIType::Sink => ffi::GST_URI_SINK, - URIType::Src => ffi::GST_URI_SRC, + URIType::Unknown => gst_sys::GST_URI_UNKNOWN, + URIType::Sink => gst_sys::GST_URI_SINK, + URIType::Src => gst_sys::GST_URI_SRC, URIType::__Unknown(value) => value } } } #[doc(hidden)] -impl FromGlib for URIType { - fn from_glib(value: ffi::GstURIType) -> Self { +impl FromGlib for URIType { + fn from_glib(value: gst_sys::GstURIType) -> Self { skip_assert_initialized!(); match value { 0 => URIType::Unknown, @@ -3043,7 +3043,7 @@ impl FromGlib for URIType { impl StaticType for URIType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_uri_type_get_type()) } + unsafe { from_glib(gst_sys::gst_uri_type_get_type()) } } } @@ -3055,13 +3055,13 @@ impl<'a> FromValueOptional<'a> for URIType { impl<'a> FromValue<'a> for URIType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for URIType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer/src/auto/flags.rs b/gstreamer/src/auto/flags.rs index a3e648903..672d79f72 100644 --- a/gstreamer/src/auto/flags.rs +++ b/gstreamer/src/auto/flags.rs @@ -2,7 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib::StaticType; use glib::Type; use glib::translate::*; @@ -10,7 +9,8 @@ use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; -use gobject_ffi; +use gobject_sys; +use gst_sys; bitflags! { pub struct BufferCopyFlags: u32 { @@ -26,16 +26,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for BufferCopyFlags { - type GlibType = ffi::GstBufferCopyFlags; + type GlibType = gst_sys::GstBufferCopyFlags; - fn to_glib(&self) -> ffi::GstBufferCopyFlags { + fn to_glib(&self) -> gst_sys::GstBufferCopyFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for BufferCopyFlags { - fn from_glib(value: ffi::GstBufferCopyFlags) -> BufferCopyFlags { +impl FromGlib for BufferCopyFlags { + fn from_glib(value: gst_sys::GstBufferCopyFlags) -> BufferCopyFlags { skip_assert_initialized!(); BufferCopyFlags::from_bits_truncate(value) } @@ -43,7 +43,7 @@ impl FromGlib for BufferCopyFlags { impl StaticType for BufferCopyFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_buffer_copy_flags_get_type()) } + unsafe { from_glib(gst_sys::gst_buffer_copy_flags_get_type()) } } } @@ -55,13 +55,13 @@ impl<'a> FromValueOptional<'a> for BufferCopyFlags { impl<'a> FromValue<'a> for BufferCopyFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for BufferCopyFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -87,16 +87,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for BufferFlags { - type GlibType = ffi::GstBufferFlags; + type GlibType = gst_sys::GstBufferFlags; - fn to_glib(&self) -> ffi::GstBufferFlags { + fn to_glib(&self) -> gst_sys::GstBufferFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for BufferFlags { - fn from_glib(value: ffi::GstBufferFlags) -> BufferFlags { +impl FromGlib for BufferFlags { + fn from_glib(value: gst_sys::GstBufferFlags) -> BufferFlags { skip_assert_initialized!(); BufferFlags::from_bits_truncate(value) } @@ -104,7 +104,7 @@ impl FromGlib for BufferFlags { impl StaticType for BufferFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_buffer_flags_get_type()) } + unsafe { from_glib(gst_sys::gst_buffer_flags_get_type()) } } } @@ -116,13 +116,13 @@ impl<'a> FromValueOptional<'a> for BufferFlags { impl<'a> FromValue<'a> for BufferFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for BufferFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -138,16 +138,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for BufferPoolAcquireFlags { - type GlibType = ffi::GstBufferPoolAcquireFlags; + type GlibType = gst_sys::GstBufferPoolAcquireFlags; - fn to_glib(&self) -> ffi::GstBufferPoolAcquireFlags { + fn to_glib(&self) -> gst_sys::GstBufferPoolAcquireFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for BufferPoolAcquireFlags { - fn from_glib(value: ffi::GstBufferPoolAcquireFlags) -> BufferPoolAcquireFlags { +impl FromGlib for BufferPoolAcquireFlags { + fn from_glib(value: gst_sys::GstBufferPoolAcquireFlags) -> BufferPoolAcquireFlags { skip_assert_initialized!(); BufferPoolAcquireFlags::from_bits_truncate(value) } @@ -155,7 +155,7 @@ impl FromGlib for BufferPoolAcquireFlags { impl StaticType for BufferPoolAcquireFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_buffer_pool_acquire_flags_get_type()) } + unsafe { from_glib(gst_sys::gst_buffer_pool_acquire_flags_get_type()) } } } @@ -167,13 +167,13 @@ impl<'a> FromValueOptional<'a> for BufferPoolAcquireFlags { impl<'a> FromValue<'a> for BufferPoolAcquireFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for BufferPoolAcquireFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -202,16 +202,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for DebugColorFlags { - type GlibType = ffi::GstDebugColorFlags; + type GlibType = gst_sys::GstDebugColorFlags; - fn to_glib(&self) -> ffi::GstDebugColorFlags { + fn to_glib(&self) -> gst_sys::GstDebugColorFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for DebugColorFlags { - fn from_glib(value: ffi::GstDebugColorFlags) -> DebugColorFlags { +impl FromGlib for DebugColorFlags { + fn from_glib(value: gst_sys::GstDebugColorFlags) -> DebugColorFlags { skip_assert_initialized!(); DebugColorFlags::from_bits_truncate(value) } @@ -219,7 +219,7 @@ impl FromGlib for DebugColorFlags { impl StaticType for DebugColorFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_debug_color_flags_get_type()) } + unsafe { from_glib(gst_sys::gst_debug_color_flags_get_type()) } } } @@ -231,13 +231,13 @@ impl<'a> FromValueOptional<'a> for DebugColorFlags { impl<'a> FromValue<'a> for DebugColorFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for DebugColorFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -255,16 +255,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for DebugGraphDetails { - type GlibType = ffi::GstDebugGraphDetails; + type GlibType = gst_sys::GstDebugGraphDetails; - fn to_glib(&self) -> ffi::GstDebugGraphDetails { + fn to_glib(&self) -> gst_sys::GstDebugGraphDetails { self.bits() } } #[doc(hidden)] -impl FromGlib for DebugGraphDetails { - fn from_glib(value: ffi::GstDebugGraphDetails) -> DebugGraphDetails { +impl FromGlib for DebugGraphDetails { + fn from_glib(value: gst_sys::GstDebugGraphDetails) -> DebugGraphDetails { skip_assert_initialized!(); DebugGraphDetails::from_bits_truncate(value) } @@ -272,7 +272,7 @@ impl FromGlib for DebugGraphDetails { impl StaticType for DebugGraphDetails { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_debug_graph_details_get_type()) } + unsafe { from_glib(gst_sys::gst_debug_graph_details_get_type()) } } } @@ -284,13 +284,13 @@ impl<'a> FromValueOptional<'a> for DebugGraphDetails { impl<'a> FromValue<'a> for DebugGraphDetails { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for DebugGraphDetails { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -308,16 +308,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for ElementFlags { - type GlibType = ffi::GstElementFlags; + type GlibType = gst_sys::GstElementFlags; - fn to_glib(&self) -> ffi::GstElementFlags { + fn to_glib(&self) -> gst_sys::GstElementFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for ElementFlags { - fn from_glib(value: ffi::GstElementFlags) -> ElementFlags { +impl FromGlib for ElementFlags { + fn from_glib(value: gst_sys::GstElementFlags) -> ElementFlags { skip_assert_initialized!(); ElementFlags::from_bits_truncate(value) } @@ -325,7 +325,7 @@ impl FromGlib for ElementFlags { impl StaticType for ElementFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_element_flags_get_type()) } + unsafe { from_glib(gst_sys::gst_element_flags_get_type()) } } } @@ -337,13 +337,13 @@ impl<'a> FromValueOptional<'a> for ElementFlags { impl<'a> FromValue<'a> for ElementFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for ElementFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -360,16 +360,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for PadLinkCheck { - type GlibType = ffi::GstPadLinkCheck; + type GlibType = gst_sys::GstPadLinkCheck; - fn to_glib(&self) -> ffi::GstPadLinkCheck { + fn to_glib(&self) -> gst_sys::GstPadLinkCheck { self.bits() } } #[doc(hidden)] -impl FromGlib for PadLinkCheck { - fn from_glib(value: ffi::GstPadLinkCheck) -> PadLinkCheck { +impl FromGlib for PadLinkCheck { + fn from_glib(value: gst_sys::GstPadLinkCheck) -> PadLinkCheck { skip_assert_initialized!(); PadLinkCheck::from_bits_truncate(value) } @@ -377,7 +377,7 @@ impl FromGlib for PadLinkCheck { impl StaticType for PadLinkCheck { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_pad_link_check_get_type()) } + unsafe { from_glib(gst_sys::gst_pad_link_check_get_type()) } } } @@ -389,13 +389,13 @@ impl<'a> FromValueOptional<'a> for PadLinkCheck { impl<'a> FromValue<'a> for PadLinkCheck { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for PadLinkCheck { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -428,16 +428,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for PadProbeType { - type GlibType = ffi::GstPadProbeType; + type GlibType = gst_sys::GstPadProbeType; - fn to_glib(&self) -> ffi::GstPadProbeType { + fn to_glib(&self) -> gst_sys::GstPadProbeType { self.bits() } } #[doc(hidden)] -impl FromGlib for PadProbeType { - fn from_glib(value: ffi::GstPadProbeType) -> PadProbeType { +impl FromGlib for PadProbeType { + fn from_glib(value: gst_sys::GstPadProbeType) -> PadProbeType { skip_assert_initialized!(); PadProbeType::from_bits_truncate(value) } @@ -445,7 +445,7 @@ impl FromGlib for PadProbeType { impl StaticType for PadProbeType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_pad_probe_type_get_type()) } + unsafe { from_glib(gst_sys::gst_pad_probe_type_get_type()) } } } @@ -457,13 +457,13 @@ impl<'a> FromValueOptional<'a> for PadProbeType { impl<'a> FromValue<'a> for PadProbeType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for PadProbeType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -478,16 +478,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for ParseFlags { - type GlibType = ffi::GstParseFlags; + type GlibType = gst_sys::GstParseFlags; - fn to_glib(&self) -> ffi::GstParseFlags { + fn to_glib(&self) -> gst_sys::GstParseFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for ParseFlags { - fn from_glib(value: ffi::GstParseFlags) -> ParseFlags { +impl FromGlib for ParseFlags { + fn from_glib(value: gst_sys::GstParseFlags) -> ParseFlags { skip_assert_initialized!(); ParseFlags::from_bits_truncate(value) } @@ -495,7 +495,7 @@ impl FromGlib for ParseFlags { impl StaticType for ParseFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_parse_flags_get_type()) } + unsafe { from_glib(gst_sys::gst_parse_flags_get_type()) } } } @@ -507,13 +507,13 @@ impl<'a> FromValueOptional<'a> for ParseFlags { impl<'a> FromValue<'a> for ParseFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for ParseFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -530,16 +530,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for PluginDependencyFlags { - type GlibType = ffi::GstPluginDependencyFlags; + type GlibType = gst_sys::GstPluginDependencyFlags; - fn to_glib(&self) -> ffi::GstPluginDependencyFlags { + fn to_glib(&self) -> gst_sys::GstPluginDependencyFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for PluginDependencyFlags { - fn from_glib(value: ffi::GstPluginDependencyFlags) -> PluginDependencyFlags { +impl FromGlib for PluginDependencyFlags { + fn from_glib(value: gst_sys::GstPluginDependencyFlags) -> PluginDependencyFlags { skip_assert_initialized!(); PluginDependencyFlags::from_bits_truncate(value) } @@ -547,7 +547,7 @@ impl FromGlib for PluginDependencyFlags { impl StaticType for PluginDependencyFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_plugin_dependency_flags_get_type()) } + unsafe { from_glib(gst_sys::gst_plugin_dependency_flags_get_type()) } } } @@ -559,13 +559,13 @@ impl<'a> FromValueOptional<'a> for PluginDependencyFlags { impl<'a> FromValue<'a> for PluginDependencyFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for PluginDependencyFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -579,16 +579,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for SchedulingFlags { - type GlibType = ffi::GstSchedulingFlags; + type GlibType = gst_sys::GstSchedulingFlags; - fn to_glib(&self) -> ffi::GstSchedulingFlags { + fn to_glib(&self) -> gst_sys::GstSchedulingFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for SchedulingFlags { - fn from_glib(value: ffi::GstSchedulingFlags) -> SchedulingFlags { +impl FromGlib for SchedulingFlags { + fn from_glib(value: gst_sys::GstSchedulingFlags) -> SchedulingFlags { skip_assert_initialized!(); SchedulingFlags::from_bits_truncate(value) } @@ -596,7 +596,7 @@ impl FromGlib for SchedulingFlags { impl StaticType for SchedulingFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_scheduling_flags_get_type()) } + unsafe { from_glib(gst_sys::gst_scheduling_flags_get_type()) } } } @@ -608,13 +608,13 @@ impl<'a> FromValueOptional<'a> for SchedulingFlags { impl<'a> FromValue<'a> for SchedulingFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for SchedulingFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -637,16 +637,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for SeekFlags { - type GlibType = ffi::GstSeekFlags; + type GlibType = gst_sys::GstSeekFlags; - fn to_glib(&self) -> ffi::GstSeekFlags { + fn to_glib(&self) -> gst_sys::GstSeekFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for SeekFlags { - fn from_glib(value: ffi::GstSeekFlags) -> SeekFlags { +impl FromGlib for SeekFlags { + fn from_glib(value: gst_sys::GstSeekFlags) -> SeekFlags { skip_assert_initialized!(); SeekFlags::from_bits_truncate(value) } @@ -654,7 +654,7 @@ impl FromGlib for SeekFlags { impl StaticType for SeekFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_seek_flags_get_type()) } + unsafe { from_glib(gst_sys::gst_seek_flags_get_type()) } } } @@ -666,13 +666,13 @@ impl<'a> FromValueOptional<'a> for SeekFlags { impl<'a> FromValue<'a> for SeekFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for SeekFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -691,16 +691,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for SegmentFlags { - type GlibType = ffi::GstSegmentFlags; + type GlibType = gst_sys::GstSegmentFlags; - fn to_glib(&self) -> ffi::GstSegmentFlags { + fn to_glib(&self) -> gst_sys::GstSegmentFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for SegmentFlags { - fn from_glib(value: ffi::GstSegmentFlags) -> SegmentFlags { +impl FromGlib for SegmentFlags { + fn from_glib(value: gst_sys::GstSegmentFlags) -> SegmentFlags { skip_assert_initialized!(); SegmentFlags::from_bits_truncate(value) } @@ -708,7 +708,7 @@ impl FromGlib for SegmentFlags { impl StaticType for SegmentFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_segment_flags_get_type()) } + unsafe { from_glib(gst_sys::gst_segment_flags_get_type()) } } } @@ -720,13 +720,13 @@ impl<'a> FromValueOptional<'a> for SegmentFlags { impl<'a> FromValue<'a> for SegmentFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for SegmentFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -740,17 +740,17 @@ bitflags! { #[cfg(any(feature = "v1_12", feature = "dox"))] #[doc(hidden)] impl ToGlib for StackTraceFlags { - type GlibType = ffi::GstStackTraceFlags; + type GlibType = gst_sys::GstStackTraceFlags; - fn to_glib(&self) -> ffi::GstStackTraceFlags { + fn to_glib(&self) -> gst_sys::GstStackTraceFlags { self.bits() } } #[cfg(any(feature = "v1_12", feature = "dox"))] #[doc(hidden)] -impl FromGlib for StackTraceFlags { - fn from_glib(value: ffi::GstStackTraceFlags) -> StackTraceFlags { +impl FromGlib for StackTraceFlags { + fn from_glib(value: gst_sys::GstStackTraceFlags) -> StackTraceFlags { skip_assert_initialized!(); StackTraceFlags::from_bits_truncate(value) } @@ -759,7 +759,7 @@ impl FromGlib for StackTraceFlags { #[cfg(any(feature = "v1_12", feature = "dox"))] impl StaticType for StackTraceFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_stack_trace_flags_get_type()) } + unsafe { from_glib(gst_sys::gst_stack_trace_flags_get_type()) } } } @@ -773,14 +773,14 @@ impl<'a> FromValueOptional<'a> for StackTraceFlags { #[cfg(any(feature = "v1_12", feature = "dox"))] impl<'a> FromValue<'a> for StackTraceFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] impl SetValue for StackTraceFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -795,16 +795,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for StreamFlags { - type GlibType = ffi::GstStreamFlags; + type GlibType = gst_sys::GstStreamFlags; - fn to_glib(&self) -> ffi::GstStreamFlags { + fn to_glib(&self) -> gst_sys::GstStreamFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for StreamFlags { - fn from_glib(value: ffi::GstStreamFlags) -> StreamFlags { +impl FromGlib for StreamFlags { + fn from_glib(value: gst_sys::GstStreamFlags) -> StreamFlags { skip_assert_initialized!(); StreamFlags::from_bits_truncate(value) } @@ -812,7 +812,7 @@ impl FromGlib for StreamFlags { impl StaticType for StreamFlags { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_stream_flags_get_type()) } + unsafe { from_glib(gst_sys::gst_stream_flags_get_type()) } } } @@ -824,13 +824,13 @@ impl<'a> FromValueOptional<'a> for StreamFlags { impl<'a> FromValue<'a> for StreamFlags { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for StreamFlags { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } @@ -848,17 +848,17 @@ bitflags! { #[cfg(any(feature = "v1_10", feature = "dox"))] #[doc(hidden)] impl ToGlib for StreamType { - type GlibType = ffi::GstStreamType; + type GlibType = gst_sys::GstStreamType; - fn to_glib(&self) -> ffi::GstStreamType { + fn to_glib(&self) -> gst_sys::GstStreamType { self.bits() } } #[cfg(any(feature = "v1_10", feature = "dox"))] #[doc(hidden)] -impl FromGlib for StreamType { - fn from_glib(value: ffi::GstStreamType) -> StreamType { +impl FromGlib for StreamType { + fn from_glib(value: gst_sys::GstStreamType) -> StreamType { skip_assert_initialized!(); StreamType::from_bits_truncate(value) } @@ -867,7 +867,7 @@ impl FromGlib for StreamType { #[cfg(any(feature = "v1_10", feature = "dox"))] impl StaticType for StreamType { fn static_type() -> Type { - unsafe { from_glib(ffi::gst_stream_type_get_type()) } + unsafe { from_glib(gst_sys::gst_stream_type_get_type()) } } } @@ -881,14 +881,14 @@ impl<'a> FromValueOptional<'a> for StreamType { #[cfg(any(feature = "v1_10", feature = "dox"))] impl<'a> FromValue<'a> for StreamType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } #[cfg(any(feature = "v1_10", feature = "dox"))] impl SetValue for StreamType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer/src/auto/functions.rs b/gstreamer/src/auto/functions.rs index 6f8aa8f44..17f0feb5d 100644 --- a/gstreamer/src/auto/functions.rs +++ b/gstreamer/src/auto/functions.rs @@ -10,11 +10,11 @@ use Element; use Error; #[cfg(any(feature = "v1_12", feature = "dox"))] use StackTraceFlags; -use ffi; use glib; use glib::GString; use glib::object::IsA; use glib::translate::*; +use gst_sys; use std; use std::mem; use std::ptr; @@ -24,35 +24,35 @@ use std::ptr; pub fn debug_add_ring_buffer_logger(max_size_per_thread: u32, thread_timeout: u32) { assert_initialized_main_thread!(); unsafe { - ffi::gst_debug_add_ring_buffer_logger(max_size_per_thread, thread_timeout); + gst_sys::gst_debug_add_ring_buffer_logger(max_size_per_thread, thread_timeout); } } pub fn debug_bin_to_dot_data>(bin: &P, details: DebugGraphDetails) -> GString { skip_assert_initialized!(); unsafe { - from_glib_full(ffi::gst_debug_bin_to_dot_data(bin.as_ref().to_glib_none().0, details.to_glib())) + from_glib_full(gst_sys::gst_debug_bin_to_dot_data(bin.as_ref().to_glib_none().0, details.to_glib())) } } pub fn debug_bin_to_dot_file, Q: AsRef>(bin: &P, details: DebugGraphDetails, file_name: Q) { skip_assert_initialized!(); unsafe { - ffi::gst_debug_bin_to_dot_file(bin.as_ref().to_glib_none().0, details.to_glib(), file_name.as_ref().to_glib_none().0); + gst_sys::gst_debug_bin_to_dot_file(bin.as_ref().to_glib_none().0, details.to_glib(), file_name.as_ref().to_glib_none().0); } } pub fn debug_bin_to_dot_file_with_ts, Q: AsRef>(bin: &P, details: DebugGraphDetails, file_name: Q) { skip_assert_initialized!(); unsafe { - ffi::gst_debug_bin_to_dot_file_with_ts(bin.as_ref().to_glib_none().0, details.to_glib(), file_name.as_ref().to_glib_none().0); + gst_sys::gst_debug_bin_to_dot_file_with_ts(bin.as_ref().to_glib_none().0, details.to_glib(), file_name.as_ref().to_glib_none().0); } } pub fn debug_get_default_threshold() -> DebugLevel { assert_initialized_main_thread!(); unsafe { - from_glib(ffi::gst_debug_get_default_threshold()) + from_glib(gst_sys::gst_debug_get_default_threshold()) } } @@ -60,28 +60,28 @@ pub fn debug_get_default_threshold() -> DebugLevel { pub fn debug_get_stack_trace(flags: StackTraceFlags) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_debug_get_stack_trace(flags.to_glib())) + from_glib_full(gst_sys::gst_debug_get_stack_trace(flags.to_glib())) } } pub fn debug_is_active() -> bool { assert_initialized_main_thread!(); unsafe { - from_glib(ffi::gst_debug_is_active()) + from_glib(gst_sys::gst_debug_is_active()) } } pub fn debug_is_colored() -> bool { assert_initialized_main_thread!(); unsafe { - from_glib(ffi::gst_debug_is_colored()) + from_glib(gst_sys::gst_debug_is_colored()) } } pub fn debug_print_stack_trace() { assert_initialized_main_thread!(); unsafe { - ffi::gst_debug_print_stack_trace(); + gst_sys::gst_debug_print_stack_trace(); } } @@ -89,7 +89,7 @@ pub fn debug_print_stack_trace() { pub fn debug_remove_ring_buffer_logger() { assert_initialized_main_thread!(); unsafe { - ffi::gst_debug_remove_ring_buffer_logger(); + gst_sys::gst_debug_remove_ring_buffer_logger(); } } @@ -97,49 +97,49 @@ pub fn debug_remove_ring_buffer_logger() { pub fn debug_ring_buffer_logger_get_logs() -> Vec { assert_initialized_main_thread!(); unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_debug_ring_buffer_logger_get_logs()) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_debug_ring_buffer_logger_get_logs()) } } pub fn debug_set_active(active: bool) { assert_initialized_main_thread!(); unsafe { - ffi::gst_debug_set_active(active.to_glib()); + gst_sys::gst_debug_set_active(active.to_glib()); } } pub fn debug_set_colored(colored: bool) { assert_initialized_main_thread!(); unsafe { - ffi::gst_debug_set_colored(colored.to_glib()); + gst_sys::gst_debug_set_colored(colored.to_glib()); } } pub fn debug_set_default_threshold(level: DebugLevel) { assert_initialized_main_thread!(); unsafe { - ffi::gst_debug_set_default_threshold(level.to_glib()); + gst_sys::gst_debug_set_default_threshold(level.to_glib()); } } pub fn debug_set_threshold_for_name(name: &str, level: DebugLevel) { assert_initialized_main_thread!(); unsafe { - ffi::gst_debug_set_threshold_for_name(name.to_glib_none().0, level.to_glib()); + gst_sys::gst_debug_set_threshold_for_name(name.to_glib_none().0, level.to_glib()); } } pub fn debug_set_threshold_from_string(list: &str, reset: bool) { assert_initialized_main_thread!(); unsafe { - ffi::gst_debug_set_threshold_from_string(list.to_glib_none().0, reset.to_glib()); + gst_sys::gst_debug_set_threshold_from_string(list.to_glib_none().0, reset.to_glib()); } } pub fn debug_unset_threshold_for_name(name: &str) { assert_initialized_main_thread!(); unsafe { - ffi::gst_debug_unset_threshold_for_name(name.to_glib_none().0); + gst_sys::gst_debug_unset_threshold_for_name(name.to_glib_none().0); } } @@ -147,7 +147,7 @@ pub fn debug_unset_threshold_for_name(name: &str) { pub fn get_main_executable_path() -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::gst_get_main_executable_path()) + from_glib_none(gst_sys::gst_get_main_executable_path()) } } @@ -155,7 +155,7 @@ pub fn parse_bin_from_description(bin_description: &str, ghost_unlinked_pads: bo assert_initialized_main_thread!(); unsafe { let mut error = ptr::null_mut(); - let ret = ffi::gst_parse_bin_from_description(bin_description.to_glib_none().0, ghost_unlinked_pads.to_glib(), &mut error); + let ret = gst_sys::gst_parse_bin_from_description(bin_description.to_glib_none().0, ghost_unlinked_pads.to_glib(), &mut error); if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) } } } @@ -164,7 +164,7 @@ pub fn parse_launch(pipeline_description: &str) -> Result { assert_initialized_main_thread!(); unsafe { let mut error = ptr::null_mut(); - let ret = ffi::gst_parse_launch(pipeline_description.to_glib_none().0, &mut error); + let ret = gst_sys::gst_parse_launch(pipeline_description.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) } } } @@ -173,7 +173,7 @@ pub fn parse_launchv(argv: &[&str]) -> Result { assert_initialized_main_thread!(); unsafe { let mut error = ptr::null_mut(); - let ret = ffi::gst_parse_launchv(argv.to_glib_none().0, &mut error); + let ret = gst_sys::gst_parse_launchv(argv.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) } } } @@ -181,14 +181,14 @@ pub fn parse_launchv(argv: &[&str]) -> Result { pub fn update_registry() -> Result<(), glib::error::BoolError> { assert_initialized_main_thread!(); unsafe { - glib_result_from_gboolean!(ffi::gst_update_registry(), "Failed to update the registry") + glib_result_from_gboolean!(gst_sys::gst_update_registry(), "Failed to update the registry") } } pub fn util_get_timestamp() -> ClockTime { assert_initialized_main_thread!(); unsafe { - from_glib(ffi::gst_util_get_timestamp()) + from_glib(gst_sys::gst_util_get_timestamp()) } } @@ -199,7 +199,7 @@ pub fn version() -> (u32, u32, u32, u32) { let mut minor = mem::uninitialized(); let mut micro = mem::uninitialized(); let mut nano = mem::uninitialized(); - ffi::gst_version(&mut major, &mut minor, &mut micro, &mut nano); + gst_sys::gst_version(&mut major, &mut minor, &mut micro, &mut nano); (major, minor, micro, nano) } } @@ -207,6 +207,6 @@ pub fn version() -> (u32, u32, u32, u32) { pub fn version_string() -> GString { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_version_string()) + from_glib_full(gst_sys::gst_version_string()) } } diff --git a/gstreamer/src/auto/ghost_pad.rs b/gstreamer/src/auto/ghost_pad.rs index 854c6e604..4b1f45d91 100644 --- a/gstreamer/src/auto/ghost_pad.rs +++ b/gstreamer/src/auto/ghost_pad.rs @@ -7,34 +7,32 @@ use Pad; use PadDirection; use PadTemplate; use ProxyPad; -use ffi; use glib; use glib::object::Cast; use glib::object::IsA; use glib::translate::*; +use gst_sys; glib_wrapper! { - pub struct GhostPad(Object) @extends ProxyPad, Pad, Object; + pub struct GhostPad(Object) @extends ProxyPad, Pad, Object; match fn { - get_type => || ffi::gst_ghost_pad_get_type(), + get_type => || gst_sys::gst_ghost_pad_get_type(), } } impl GhostPad { - pub fn new_no_target<'a, P: Into>>(name: P, dir: PadDirection) -> Option { + pub fn new_no_target(name: Option<&str>, dir: PadDirection) -> Option { assert_initialized_main_thread!(); - let name = name.into(); unsafe { - Option::::from_glib_none(ffi::gst_ghost_pad_new_no_target(name.to_glib_none().0, dir.to_glib())).map(|o| o.unsafe_cast()) + Option::::from_glib_none(gst_sys::gst_ghost_pad_new_no_target(name.to_glib_none().0, dir.to_glib())).map(|o| o.unsafe_cast()) } } - pub fn new_no_target_from_template<'a, P: Into>>(name: P, templ: &PadTemplate) -> Option { + pub fn new_no_target_from_template(name: Option<&str>, templ: &PadTemplate) -> Option { skip_assert_initialized!(); - let name = name.into(); unsafe { - Option::::from_glib_none(ffi::gst_ghost_pad_new_no_target_from_template(name.to_glib_none().0, templ.to_glib_none().0)).map(|o| o.unsafe_cast()) + Option::::from_glib_none(gst_sys::gst_ghost_pad_new_no_target_from_template(name.to_glib_none().0, templ.to_glib_none().0)).map(|o| o.unsafe_cast()) } } } @@ -47,20 +45,19 @@ pub const NONE_GHOST_PAD: Option<&GhostPad> = None; pub trait GhostPadExt: 'static { fn get_target(&self) -> Option; - fn set_target<'a, P: IsA + 'a, Q: Into>>(&self, newtarget: Q) -> Result<(), glib::error::BoolError>; + fn set_target>(&self, newtarget: Option<&P>) -> Result<(), glib::error::BoolError>; } impl> GhostPadExt for O { fn get_target(&self) -> Option { unsafe { - from_glib_full(ffi::gst_ghost_pad_get_target(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_ghost_pad_get_target(self.as_ref().to_glib_none().0)) } } - fn set_target<'a, P: IsA + 'a, Q: Into>>(&self, newtarget: Q) -> Result<(), glib::error::BoolError> { - let newtarget = newtarget.into(); + fn set_target>(&self, newtarget: Option<&P>) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_ghost_pad_set_target(self.as_ref().to_glib_none().0, newtarget.map(|p| p.as_ref()).to_glib_none().0), "Failed to set target") + glib_result_from_gboolean!(gst_sys::gst_ghost_pad_set_target(self.as_ref().to_glib_none().0, newtarget.map(|p| p.as_ref()).to_glib_none().0), "Failed to set target") } } } diff --git a/gstreamer/src/auto/object.rs b/gstreamer/src/auto/object.rs index 3eea57f5f..d73e9e0d6 100644 --- a/gstreamer/src/auto/object.rs +++ b/gstreamer/src/auto/object.rs @@ -4,7 +4,6 @@ use ClockTime; use Error; -use ffi; use glib; use glib::GString; use glib::object::Cast; @@ -12,15 +11,16 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Object(Object); + pub struct Object(Object); match fn { - get_type => || ffi::gst_object_get_type(), + get_type => || gst_sys::gst_object_get_type(), } } @@ -28,20 +28,20 @@ impl Object { pub fn check_uniqueness(list: &[Object], name: &str) -> bool { assert_initialized_main_thread!(); unsafe { - from_glib(ffi::gst_object_check_uniqueness(list.to_glib_none().0, name.to_glib_none().0)) + from_glib(gst_sys::gst_object_check_uniqueness(list.to_glib_none().0, name.to_glib_none().0)) } } //pub fn default_deep_notify, Q: IsA>(object: &P, orig: &Q, pspec: /*Ignored*/&glib::ParamSpec, excluded_props: &[&str]) { - // unsafe { TODO: call ffi::gst_object_default_deep_notify() } + // unsafe { TODO: call gst_sys:gst_object_default_deep_notify() } //} //pub fn ref_sink(object: /*Unimplemented*/Option) -> /*Unimplemented*/Option { - // unsafe { TODO: call ffi::gst_object_ref_sink() } + // unsafe { TODO: call gst_sys:gst_object_ref_sink() } //} - //pub fn replace<'a, 'b, P: IsA + 'a, Q: Into>, R: IsA + 'b, S: Into>>(oldobj: Q, newobj: S) -> bool { - // unsafe { TODO: call ffi::gst_object_replace() } + //pub fn replace, Q: IsA>(oldobj: Option<&P>, newobj: Option<&Q>) -> bool { + // unsafe { TODO: call gst_sys:gst_object_replace() } //} } @@ -53,7 +53,7 @@ pub const NONE_OBJECT: Option<&Object> = None; pub trait GstObjectExt: 'static { //fn add_control_binding(&self, binding: /*Ignored*/&ControlBinding) -> bool; - fn default_error<'a, P: Into>>(&self, error: &Error, debug: P); + fn default_error(&self, error: &Error, debug: Option<&str>); //fn get_control_binding(&self, property_name: &str) -> /*Ignored*/Option; @@ -106,129 +106,128 @@ pub trait GstObjectExt: 'static { impl> GstObjectExt for O { //fn add_control_binding(&self, binding: /*Ignored*/&ControlBinding) -> bool { - // unsafe { TODO: call ffi::gst_object_add_control_binding() } + // unsafe { TODO: call gst_sys:gst_object_add_control_binding() } //} - fn default_error<'a, P: Into>>(&self, error: &Error, debug: P) { - let debug = debug.into(); + fn default_error(&self, error: &Error, debug: Option<&str>) { unsafe { - ffi::gst_object_default_error(self.as_ref().to_glib_none().0, error.to_glib_none().0, debug.to_glib_none().0); + gst_sys::gst_object_default_error(self.as_ref().to_glib_none().0, error.to_glib_none().0, debug.to_glib_none().0); } } //fn get_control_binding(&self, property_name: &str) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_object_get_control_binding() } + // unsafe { TODO: call gst_sys:gst_object_get_control_binding() } //} fn get_control_rate(&self) -> ClockTime { unsafe { - from_glib(ffi::gst_object_get_control_rate(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_object_get_control_rate(self.as_ref().to_glib_none().0)) } } //fn get_g_value_array(&self, property_name: &str, timestamp: ClockTime, interval: ClockTime, values: /*Ignored*/&[&glib::Value]) -> bool { - // unsafe { TODO: call ffi::gst_object_get_g_value_array() } + // unsafe { TODO: call gst_sys:gst_object_get_g_value_array() } //} fn get_name(&self) -> GString { unsafe { - from_glib_full(ffi::gst_object_get_name(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_object_get_name(self.as_ref().to_glib_none().0)) } } fn get_parent(&self) -> Option { unsafe { - from_glib_full(ffi::gst_object_get_parent(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_object_get_parent(self.as_ref().to_glib_none().0)) } } fn get_path_string(&self) -> GString { unsafe { - from_glib_full(ffi::gst_object_get_path_string(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_object_get_path_string(self.as_ref().to_glib_none().0)) } } //fn get_value(&self, property_name: &str, timestamp: ClockTime) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_object_get_value() } + // unsafe { TODO: call gst_sys:gst_object_get_value() } //} //fn get_value_array(&self, property_name: &str, timestamp: ClockTime, interval: ClockTime, n_values: u32, values: /*Unimplemented*/Option) -> bool { - // unsafe { TODO: call ffi::gst_object_get_value_array() } + // unsafe { TODO: call gst_sys:gst_object_get_value_array() } //} fn has_active_control_bindings(&self) -> bool { unsafe { - from_glib(ffi::gst_object_has_active_control_bindings(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_object_has_active_control_bindings(self.as_ref().to_glib_none().0)) } } fn has_ancestor>(&self, ancestor: &P) -> bool { unsafe { - from_glib(ffi::gst_object_has_ancestor(self.as_ref().to_glib_none().0, ancestor.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_object_has_ancestor(self.as_ref().to_glib_none().0, ancestor.as_ref().to_glib_none().0)) } } fn has_as_ancestor>(&self, ancestor: &P) -> bool { unsafe { - from_glib(ffi::gst_object_has_as_ancestor(self.as_ref().to_glib_none().0, ancestor.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_object_has_as_ancestor(self.as_ref().to_glib_none().0, ancestor.as_ref().to_glib_none().0)) } } fn has_as_parent>(&self, parent: &P) -> bool { unsafe { - from_glib(ffi::gst_object_has_as_parent(self.as_ref().to_glib_none().0, parent.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_object_has_as_parent(self.as_ref().to_glib_none().0, parent.as_ref().to_glib_none().0)) } } //fn remove_control_binding(&self, binding: /*Ignored*/&ControlBinding) -> bool { - // unsafe { TODO: call ffi::gst_object_remove_control_binding() } + // unsafe { TODO: call gst_sys:gst_object_remove_control_binding() } //} fn set_control_binding_disabled(&self, property_name: &str, disabled: bool) { unsafe { - ffi::gst_object_set_control_binding_disabled(self.as_ref().to_glib_none().0, property_name.to_glib_none().0, disabled.to_glib()); + gst_sys::gst_object_set_control_binding_disabled(self.as_ref().to_glib_none().0, property_name.to_glib_none().0, disabled.to_glib()); } } fn set_control_bindings_disabled(&self, disabled: bool) { unsafe { - ffi::gst_object_set_control_bindings_disabled(self.as_ref().to_glib_none().0, disabled.to_glib()); + gst_sys::gst_object_set_control_bindings_disabled(self.as_ref().to_glib_none().0, disabled.to_glib()); } } fn set_control_rate(&self, control_rate: ClockTime) { unsafe { - ffi::gst_object_set_control_rate(self.as_ref().to_glib_none().0, control_rate.to_glib()); + gst_sys::gst_object_set_control_rate(self.as_ref().to_glib_none().0, control_rate.to_glib()); } } fn set_name(&self, name: &str) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_object_set_name(self.as_ref().to_glib_none().0, name.to_glib_none().0), "Failed to set object name") + glib_result_from_gboolean!(gst_sys::gst_object_set_name(self.as_ref().to_glib_none().0, name.to_glib_none().0), "Failed to set object name") } } fn set_parent>(&self, parent: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_object_set_parent(self.as_ref().to_glib_none().0, parent.as_ref().to_glib_none().0), "Failed to set parent object") + glib_result_from_gboolean!(gst_sys::gst_object_set_parent(self.as_ref().to_glib_none().0, parent.as_ref().to_glib_none().0), "Failed to set parent object") } } fn suggest_next_sync(&self) -> ClockTime { unsafe { - from_glib(ffi::gst_object_suggest_next_sync(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_object_suggest_next_sync(self.as_ref().to_glib_none().0)) } } fn sync_values(&self, timestamp: ClockTime) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_object_sync_values(self.as_ref().to_glib_none().0, timestamp.to_glib()), "Failed to sync values") + glib_result_from_gboolean!(gst_sys::gst_object_sync_values(self.as_ref().to_glib_none().0, timestamp.to_glib()), "Failed to sync values") } } fn unparent(&self) { unsafe { - ffi::gst_object_unparent(self.as_ref().to_glib_none().0); + gst_sys::gst_object_unparent(self.as_ref().to_glib_none().0); } } @@ -253,13 +252,13 @@ impl> GstObjectExt for O { } } -unsafe extern "C" fn notify_name_trampoline(this: *mut ffi::GstObject, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_name_trampoline(this: *mut gst_sys::GstObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_parent_trampoline(this: *mut ffi::GstObject, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_parent_trampoline(this: *mut gst_sys::GstObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer/src/auto/pad.rs b/gstreamer/src/auto/pad.rs index 69e7d9994..5723e9b4d 100644 --- a/gstreamer/src/auto/pad.rs +++ b/gstreamer/src/auto/pad.rs @@ -16,7 +16,6 @@ use PadTemplate; use Stream; #[cfg(any(feature = "v1_12", feature = "dox"))] use TaskState; -use ffi; use glib; use glib::GString; use glib::StaticType; @@ -26,33 +25,32 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Pad(Object) @extends Object; + pub struct Pad(Object) @extends Object; match fn { - get_type => || ffi::gst_pad_get_type(), + get_type => || gst_sys::gst_pad_get_type(), } } impl Pad { - pub fn new<'a, P: Into>>(name: P, direction: PadDirection) -> Pad { + pub fn new(name: Option<&str>, direction: PadDirection) -> Pad { assert_initialized_main_thread!(); - let name = name.into(); unsafe { - from_glib_none(ffi::gst_pad_new(name.to_glib_none().0, direction.to_glib())) + from_glib_none(gst_sys::gst_pad_new(name.to_glib_none().0, direction.to_glib())) } } - pub fn new_from_template<'a, P: Into>>(templ: &PadTemplate, name: P) -> Pad { + pub fn new_from_template(templ: &PadTemplate, name: Option<&str>) -> Pad { skip_assert_initialized!(); - let name = name.into(); unsafe { - from_glib_none(ffi::gst_pad_new_from_template(templ.to_glib_none().0, name.to_glib_none().0)) + from_glib_none(gst_sys::gst_pad_new_from_template(templ.to_glib_none().0, name.to_glib_none().0)) } } } @@ -69,11 +67,11 @@ pub trait PadExt: 'static { fn check_reconfigure(&self) -> bool; - fn create_stream_id<'a, P: IsA, Q: Into>>(&self, parent: &P, stream_id: Q) -> Option; + fn create_stream_id>(&self, parent: &P, stream_id: Option<&str>) -> Option; - //fn create_stream_id_printf<'a, P: IsA, Q: Into>>(&self, parent: &P, stream_id: Q, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Option; + //fn create_stream_id_printf>(&self, parent: &P, stream_id: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Option; - //fn create_stream_id_printf_valist<'a, P: IsA, Q: Into>>(&self, parent: &P, stream_id: Q, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option; + //fn create_stream_id_printf_valist>(&self, parent: &P, stream_id: Option<&str>, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option; fn forward bool>(&self, forward: P) -> bool; @@ -117,7 +115,7 @@ pub trait PadExt: 'static { //fn iterate_internal_links(&self) -> /*Ignored*/Option; - //fn iterate_internal_links_default<'a, P: IsA + 'a, Q: Into>>(&self, parent: Q) -> /*Ignored*/Option; + //fn iterate_internal_links_default>(&self, parent: Option<&P>) -> /*Ignored*/Option; #[cfg(any(feature = "v1_10", feature = "dox"))] fn link_maybe_ghosting>(&self, sink: &P) -> Result<(), glib::error::BoolError>; @@ -133,11 +131,11 @@ pub trait PadExt: 'static { fn peer_query_accept_caps(&self, caps: &Caps) -> bool; - fn peer_query_caps<'a, P: Into>>(&self, filter: P) -> Option; + fn peer_query_caps(&self, filter: Option<&Caps>) -> Option; fn query_accept_caps(&self, caps: &Caps) -> bool; - fn query_caps<'a, P: Into>>(&self, filter: P) -> Option; + fn query_caps(&self, filter: Option<&Caps>) -> Option; fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError>; @@ -171,40 +169,39 @@ pub trait PadExt: 'static { impl> PadExt for O { fn activate_mode(&self, mode: PadMode, active: bool) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_pad_activate_mode(self.as_ref().to_glib_none().0, mode.to_glib(), active.to_glib()), "Failed to activate mode pad") + glib_result_from_gboolean!(gst_sys::gst_pad_activate_mode(self.as_ref().to_glib_none().0, mode.to_glib(), active.to_glib()), "Failed to activate mode pad") } } fn can_link>(&self, sinkpad: &P) -> bool { unsafe { - from_glib(ffi::gst_pad_can_link(self.as_ref().to_glib_none().0, sinkpad.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_pad_can_link(self.as_ref().to_glib_none().0, sinkpad.as_ref().to_glib_none().0)) } } fn check_reconfigure(&self) -> bool { unsafe { - from_glib(ffi::gst_pad_check_reconfigure(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_pad_check_reconfigure(self.as_ref().to_glib_none().0)) } } - fn create_stream_id<'a, P: IsA, Q: Into>>(&self, parent: &P, stream_id: Q) -> Option { - let stream_id = stream_id.into(); + fn create_stream_id>(&self, parent: &P, stream_id: Option<&str>) -> Option { unsafe { - from_glib_full(ffi::gst_pad_create_stream_id(self.as_ref().to_glib_none().0, parent.as_ref().to_glib_none().0, stream_id.to_glib_none().0)) + from_glib_full(gst_sys::gst_pad_create_stream_id(self.as_ref().to_glib_none().0, parent.as_ref().to_glib_none().0, stream_id.to_glib_none().0)) } } - //fn create_stream_id_printf<'a, P: IsA, Q: Into>>(&self, parent: &P, stream_id: Q, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Option { - // unsafe { TODO: call ffi::gst_pad_create_stream_id_printf() } + //fn create_stream_id_printf>(&self, parent: &P, stream_id: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Option { + // unsafe { TODO: call gst_sys:gst_pad_create_stream_id_printf() } //} - //fn create_stream_id_printf_valist<'a, P: IsA, Q: Into>>(&self, parent: &P, stream_id: Q, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option { - // unsafe { TODO: call ffi::gst_pad_create_stream_id_printf_valist() } + //fn create_stream_id_printf_valist>(&self, parent: &P, stream_id: Option<&str>, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option { + // unsafe { TODO: call gst_sys:gst_pad_create_stream_id_printf_valist() } //} fn forward bool>(&self, forward: P) -> bool { let forward_data: P = forward; - unsafe extern "C" fn forward_func bool>(pad: *mut ffi::GstPad, user_data: glib_ffi::gpointer) -> glib_ffi::gboolean { + unsafe extern "C" fn forward_func bool>(pad: *mut gst_sys::GstPad, user_data: glib_sys::gpointer) -> glib_sys::gboolean { let pad = from_glib_borrow(pad); let callback: *mut P = user_data as *const _ as usize as *mut P; let res = (*callback)(&pad); @@ -213,222 +210,220 @@ impl> PadExt for O { let forward = Some(forward_func::

as _); let super_callback0: &P = &forward_data; unsafe { - from_glib(ffi::gst_pad_forward(self.as_ref().to_glib_none().0, forward, super_callback0 as *const _ as usize as *mut _)) + from_glib(gst_sys::gst_pad_forward(self.as_ref().to_glib_none().0, forward, super_callback0 as *const _ as usize as *mut _)) } } fn get_allowed_caps(&self) -> Option { unsafe { - from_glib_full(ffi::gst_pad_get_allowed_caps(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_pad_get_allowed_caps(self.as_ref().to_glib_none().0)) } } fn get_current_caps(&self) -> Option { unsafe { - from_glib_full(ffi::gst_pad_get_current_caps(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_pad_get_current_caps(self.as_ref().to_glib_none().0)) } } fn get_direction(&self) -> PadDirection { unsafe { - from_glib(ffi::gst_pad_get_direction(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_pad_get_direction(self.as_ref().to_glib_none().0)) } } //fn get_element_private(&self) -> /*Unimplemented*/Option { - // unsafe { TODO: call ffi::gst_pad_get_element_private() } + // unsafe { TODO: call gst_sys:gst_pad_get_element_private() } //} fn get_offset(&self) -> i64 { unsafe { - ffi::gst_pad_get_offset(self.as_ref().to_glib_none().0) + gst_sys::gst_pad_get_offset(self.as_ref().to_glib_none().0) } } fn get_pad_template(&self) -> Option { unsafe { - from_glib_full(ffi::gst_pad_get_pad_template(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_pad_get_pad_template(self.as_ref().to_glib_none().0)) } } fn get_pad_template_caps(&self) -> Option { unsafe { - from_glib_full(ffi::gst_pad_get_pad_template_caps(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_pad_get_pad_template_caps(self.as_ref().to_glib_none().0)) } } fn get_parent_element(&self) -> Option { unsafe { - from_glib_full(ffi::gst_pad_get_parent_element(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_pad_get_parent_element(self.as_ref().to_glib_none().0)) } } fn get_peer(&self) -> Option { unsafe { - from_glib_full(ffi::gst_pad_get_peer(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_pad_get_peer(self.as_ref().to_glib_none().0)) } } fn get_sticky_event(&self, event_type: EventType, idx: u32) -> Option { unsafe { - from_glib_full(ffi::gst_pad_get_sticky_event(self.as_ref().to_glib_none().0, event_type.to_glib(), idx)) + from_glib_full(gst_sys::gst_pad_get_sticky_event(self.as_ref().to_glib_none().0, event_type.to_glib(), idx)) } } #[cfg(any(feature = "v1_10", feature = "dox"))] fn get_stream(&self) -> Option { unsafe { - from_glib_full(ffi::gst_pad_get_stream(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_pad_get_stream(self.as_ref().to_glib_none().0)) } } fn get_stream_id(&self) -> Option { unsafe { - from_glib_full(ffi::gst_pad_get_stream_id(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_pad_get_stream_id(self.as_ref().to_glib_none().0)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] fn get_task_state(&self) -> TaskState { unsafe { - from_glib(ffi::gst_pad_get_task_state(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_pad_get_task_state(self.as_ref().to_glib_none().0)) } } fn has_current_caps(&self) -> bool { unsafe { - from_glib(ffi::gst_pad_has_current_caps(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_pad_has_current_caps(self.as_ref().to_glib_none().0)) } } fn is_active(&self) -> bool { unsafe { - from_glib(ffi::gst_pad_is_active(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_pad_is_active(self.as_ref().to_glib_none().0)) } } fn is_blocked(&self) -> bool { unsafe { - from_glib(ffi::gst_pad_is_blocked(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_pad_is_blocked(self.as_ref().to_glib_none().0)) } } fn is_blocking(&self) -> bool { unsafe { - from_glib(ffi::gst_pad_is_blocking(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_pad_is_blocking(self.as_ref().to_glib_none().0)) } } fn is_linked(&self) -> bool { unsafe { - from_glib(ffi::gst_pad_is_linked(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_pad_is_linked(self.as_ref().to_glib_none().0)) } } //fn iterate_internal_links(&self) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_pad_iterate_internal_links() } + // unsafe { TODO: call gst_sys:gst_pad_iterate_internal_links() } //} - //fn iterate_internal_links_default<'a, P: IsA + 'a, Q: Into>>(&self, parent: Q) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_pad_iterate_internal_links_default() } + //fn iterate_internal_links_default>(&self, parent: Option<&P>) -> /*Ignored*/Option { + // unsafe { TODO: call gst_sys:gst_pad_iterate_internal_links_default() } //} #[cfg(any(feature = "v1_10", feature = "dox"))] fn link_maybe_ghosting>(&self, sink: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_pad_link_maybe_ghosting(self.as_ref().to_glib_none().0, sink.as_ref().to_glib_none().0), "Failed to link pads, possibly ghosting") + glib_result_from_gboolean!(gst_sys::gst_pad_link_maybe_ghosting(self.as_ref().to_glib_none().0, sink.as_ref().to_glib_none().0), "Failed to link pads, possibly ghosting") } } #[cfg(any(feature = "v1_10", feature = "dox"))] fn link_maybe_ghosting_full>(&self, sink: &P, flags: PadLinkCheck) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_pad_link_maybe_ghosting_full(self.as_ref().to_glib_none().0, sink.as_ref().to_glib_none().0, flags.to_glib()), "Failed to link pads, possibly ghosting") + glib_result_from_gboolean!(gst_sys::gst_pad_link_maybe_ghosting_full(self.as_ref().to_glib_none().0, sink.as_ref().to_glib_none().0, flags.to_glib()), "Failed to link pads, possibly ghosting") } } fn mark_reconfigure(&self) { unsafe { - ffi::gst_pad_mark_reconfigure(self.as_ref().to_glib_none().0); + gst_sys::gst_pad_mark_reconfigure(self.as_ref().to_glib_none().0); } } fn needs_reconfigure(&self) -> bool { unsafe { - from_glib(ffi::gst_pad_needs_reconfigure(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_pad_needs_reconfigure(self.as_ref().to_glib_none().0)) } } fn pause_task(&self) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_pad_pause_task(self.as_ref().to_glib_none().0), "Failed to pause pad task") + glib_result_from_gboolean!(gst_sys::gst_pad_pause_task(self.as_ref().to_glib_none().0), "Failed to pause pad task") } } fn peer_query_accept_caps(&self, caps: &Caps) -> bool { unsafe { - from_glib(ffi::gst_pad_peer_query_accept_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0)) + from_glib(gst_sys::gst_pad_peer_query_accept_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0)) } } - fn peer_query_caps<'a, P: Into>>(&self, filter: P) -> Option { - let filter = filter.into(); + fn peer_query_caps(&self, filter: Option<&Caps>) -> Option { unsafe { - from_glib_full(ffi::gst_pad_peer_query_caps(self.as_ref().to_glib_none().0, filter.to_glib_none().0)) + from_glib_full(gst_sys::gst_pad_peer_query_caps(self.as_ref().to_glib_none().0, filter.to_glib_none().0)) } } fn query_accept_caps(&self, caps: &Caps) -> bool { unsafe { - from_glib(ffi::gst_pad_query_accept_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0)) + from_glib(gst_sys::gst_pad_query_accept_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0)) } } - fn query_caps<'a, P: Into>>(&self, filter: P) -> Option { - let filter = filter.into(); + fn query_caps(&self, filter: Option<&Caps>) -> Option { unsafe { - from_glib_full(ffi::gst_pad_query_caps(self.as_ref().to_glib_none().0, filter.to_glib_none().0)) + from_glib_full(gst_sys::gst_pad_query_caps(self.as_ref().to_glib_none().0, filter.to_glib_none().0)) } } fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_pad_set_active(self.as_ref().to_glib_none().0, active.to_glib()), "Failed to activate pad") + glib_result_from_gboolean!(gst_sys::gst_pad_set_active(self.as_ref().to_glib_none().0, active.to_glib()), "Failed to activate pad") } } //fn set_element_private(&self, priv_: /*Unimplemented*/Option) { - // unsafe { TODO: call ffi::gst_pad_set_element_private() } + // unsafe { TODO: call gst_sys:gst_pad_set_element_private() } //} fn set_offset(&self, offset: i64) { unsafe { - ffi::gst_pad_set_offset(self.as_ref().to_glib_none().0, offset); + gst_sys::gst_pad_set_offset(self.as_ref().to_glib_none().0, offset); } } fn stop_task(&self) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_pad_stop_task(self.as_ref().to_glib_none().0), "Failed to stop pad task") + glib_result_from_gboolean!(gst_sys::gst_pad_stop_task(self.as_ref().to_glib_none().0), "Failed to stop pad task") } } fn unlink>(&self, sinkpad: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_pad_unlink(self.as_ref().to_glib_none().0, sinkpad.as_ref().to_glib_none().0), "Failed to unlink pad") + glib_result_from_gboolean!(gst_sys::gst_pad_unlink(self.as_ref().to_glib_none().0, sinkpad.as_ref().to_glib_none().0), "Failed to unlink pad") } } fn use_fixed_caps(&self) { unsafe { - ffi::gst_pad_use_fixed_caps(self.as_ref().to_glib_none().0); + gst_sys::gst_pad_use_fixed_caps(self.as_ref().to_glib_none().0); } } fn get_property_caps(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"caps\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"caps\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -436,14 +431,14 @@ impl> PadExt for O { fn get_property_template(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"template\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"template\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } fn set_property_template(&self, template: Option<&PadTemplate>) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"template\0".as_ptr() as *const _, Value::from(template).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"template\0".as_ptr() as *const _, Value::from(template).to_glib_none().0); } } @@ -488,31 +483,31 @@ impl> PadExt for O { } } -unsafe extern "C" fn linked_trampoline(this: *mut ffi::GstPad, peer: *mut ffi::GstPad, f: glib_ffi::gpointer) +unsafe extern "C" fn linked_trampoline(this: *mut gst_sys::GstPad, peer: *mut gst_sys::GstPad, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Pad::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(peer)) } -unsafe extern "C" fn unlinked_trampoline(this: *mut ffi::GstPad, peer: *mut ffi::GstPad, f: glib_ffi::gpointer) +unsafe extern "C" fn unlinked_trampoline(this: *mut gst_sys::GstPad, peer: *mut gst_sys::GstPad, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Pad::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(peer)) } -unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstPad, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_caps_trampoline(this: *mut gst_sys::GstPad, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Pad::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_offset_trampoline(this: *mut ffi::GstPad, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_offset_trampoline(this: *mut gst_sys::GstPad, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Pad::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_template_trampoline(this: *mut ffi::GstPad, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_template_trampoline(this: *mut gst_sys::GstPad, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Pad::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer/src/auto/pad_template.rs b/gstreamer/src/auto/pad_template.rs index f2a4d1b1b..b3aa9f3fb 100644 --- a/gstreamer/src/auto/pad_template.rs +++ b/gstreamer/src/auto/pad_template.rs @@ -7,7 +7,6 @@ use Object; use Pad; use PadDirection; use PadPresence; -use ffi; #[cfg(any(feature = "v1_14", feature = "dox"))] use glib; use glib::GString; @@ -18,16 +17,17 @@ use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct PadTemplate(Object) @extends Object; + pub struct PadTemplate(Object) @extends Object; match fn { - get_type => || ffi::gst_pad_template_get_type(), + get_type => || gst_sys::gst_pad_template_get_type(), } } @@ -35,7 +35,7 @@ impl PadTemplate { pub fn new(name_template: &str, direction: PadDirection, presence: PadPresence, caps: &Caps) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::gst_pad_template_new(name_template.to_glib_none().0, direction.to_glib(), presence.to_glib(), caps.to_glib_none().0)) + from_glib_none(gst_sys::gst_pad_template_new(name_template.to_glib_none().0, direction.to_glib(), presence.to_glib(), caps.to_glib_none().0)) } } @@ -43,26 +43,26 @@ impl PadTemplate { pub fn new_with_gtype(name_template: &str, direction: PadDirection, presence: PadPresence, caps: &Caps, pad_type: glib::types::Type) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::gst_pad_template_new_with_gtype(name_template.to_glib_none().0, direction.to_glib(), presence.to_glib(), caps.to_glib_none().0, pad_type.to_glib())) + from_glib_none(gst_sys::gst_pad_template_new_with_gtype(name_template.to_glib_none().0, direction.to_glib(), presence.to_glib(), caps.to_glib_none().0, pad_type.to_glib())) } } pub fn get_caps(&self) -> Option { unsafe { - from_glib_full(ffi::gst_pad_template_get_caps(self.to_glib_none().0)) + from_glib_full(gst_sys::gst_pad_template_get_caps(self.to_glib_none().0)) } } pub fn pad_created>(&self, pad: &P) { unsafe { - ffi::gst_pad_template_pad_created(self.to_glib_none().0, pad.as_ref().to_glib_none().0); + gst_sys::gst_pad_template_pad_created(self.to_glib_none().0, pad.as_ref().to_glib_none().0); } } pub fn get_property_direction(&self) -> PadDirection { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"direction\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"direction\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -71,7 +71,7 @@ impl PadTemplate { pub fn get_property_gtype(&self) -> glib::types::Type { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"gtype\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"gtype\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -79,7 +79,7 @@ impl PadTemplate { pub fn get_property_name_template(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"name-template\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"name-template\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -87,7 +87,7 @@ impl PadTemplate { pub fn get_property_presence(&self) -> PadPresence { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"presence\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"presence\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } @@ -104,7 +104,7 @@ impl PadTemplate { unsafe impl Send for PadTemplate {} unsafe impl Sync for PadTemplate {} -unsafe extern "C" fn pad_created_trampoline(this: *mut ffi::GstPadTemplate, pad: *mut ffi::GstPad, f: glib_ffi::gpointer) { +unsafe extern "C" fn pad_created_trampoline(this: *mut gst_sys::GstPadTemplate, pad: *mut gst_sys::GstPad, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), &from_glib_borrow(pad)) } diff --git a/gstreamer/src/auto/pipeline.rs b/gstreamer/src/auto/pipeline.rs index c7e28d714..f5e0a0919 100644 --- a/gstreamer/src/auto/pipeline.rs +++ b/gstreamer/src/auto/pipeline.rs @@ -8,30 +8,29 @@ use Clock; use ClockTime; use Element; use Object; -use ffi; use glib::object::Cast; use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Pipeline(Object) @extends Bin, Element, Object, @implements ChildProxy; + pub struct Pipeline(Object) @extends Bin, Element, Object, @implements ChildProxy; match fn { - get_type => || ffi::gst_pipeline_get_type(), + get_type => || gst_sys::gst_pipeline_get_type(), } } impl Pipeline { - pub fn new<'a, P: Into>>(name: P) -> Pipeline { + pub fn new(name: Option<&str>) -> Pipeline { assert_initialized_main_thread!(); - let name = name.into(); unsafe { - Element::from_glib_none(ffi::gst_pipeline_new(name.to_glib_none().0)).unsafe_cast() + Element::from_glib_none(gst_sys::gst_pipeline_new(name.to_glib_none().0)).unsafe_cast() } } } @@ -58,7 +57,7 @@ pub trait PipelineExt: 'static { fn set_latency(&self, latency: ClockTime); - fn use_clock<'a, P: IsA + 'a, Q: Into>>(&self, clock: Q); + fn use_clock>(&self, clock: Option<&P>); fn connect_property_auto_flush_bus_notify(&self, f: F) -> SignalHandlerId; @@ -70,56 +69,55 @@ pub trait PipelineExt: 'static { impl> PipelineExt for O { fn auto_clock(&self) { unsafe { - ffi::gst_pipeline_auto_clock(self.as_ref().to_glib_none().0); + gst_sys::gst_pipeline_auto_clock(self.as_ref().to_glib_none().0); } } fn get_auto_flush_bus(&self) -> bool { unsafe { - from_glib(ffi::gst_pipeline_get_auto_flush_bus(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_pipeline_get_auto_flush_bus(self.as_ref().to_glib_none().0)) } } fn get_delay(&self) -> ClockTime { unsafe { - from_glib(ffi::gst_pipeline_get_delay(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_pipeline_get_delay(self.as_ref().to_glib_none().0)) } } fn get_latency(&self) -> ClockTime { unsafe { - from_glib(ffi::gst_pipeline_get_latency(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_pipeline_get_latency(self.as_ref().to_glib_none().0)) } } fn get_pipeline_clock(&self) -> Option { unsafe { - from_glib_full(ffi::gst_pipeline_get_pipeline_clock(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_pipeline_get_pipeline_clock(self.as_ref().to_glib_none().0)) } } fn set_auto_flush_bus(&self, auto_flush: bool) { unsafe { - ffi::gst_pipeline_set_auto_flush_bus(self.as_ref().to_glib_none().0, auto_flush.to_glib()); + gst_sys::gst_pipeline_set_auto_flush_bus(self.as_ref().to_glib_none().0, auto_flush.to_glib()); } } fn set_delay(&self, delay: ClockTime) { unsafe { - ffi::gst_pipeline_set_delay(self.as_ref().to_glib_none().0, delay.to_glib()); + gst_sys::gst_pipeline_set_delay(self.as_ref().to_glib_none().0, delay.to_glib()); } } fn set_latency(&self, latency: ClockTime) { unsafe { - ffi::gst_pipeline_set_latency(self.as_ref().to_glib_none().0, latency.to_glib()); + gst_sys::gst_pipeline_set_latency(self.as_ref().to_glib_none().0, latency.to_glib()); } } - fn use_clock<'a, P: IsA + 'a, Q: Into>>(&self, clock: Q) { - let clock = clock.into(); + fn use_clock>(&self, clock: Option<&P>) { unsafe { - ffi::gst_pipeline_use_clock(self.as_ref().to_glib_none().0, clock.map(|p| p.as_ref()).to_glib_none().0); + gst_sys::gst_pipeline_use_clock(self.as_ref().to_glib_none().0, clock.map(|p| p.as_ref()).to_glib_none().0); } } @@ -148,19 +146,19 @@ impl> PipelineExt for O { } } -unsafe extern "C" fn notify_auto_flush_bus_trampoline(this: *mut ffi::GstPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_auto_flush_bus_trampoline(this: *mut gst_sys::GstPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_delay_trampoline(this: *mut ffi::GstPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_delay_trampoline(this: *mut gst_sys::GstPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) } -unsafe extern "C" fn notify_latency_trampoline(this: *mut ffi::GstPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_latency_trampoline(this: *mut gst_sys::GstPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&Pipeline::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer/src/auto/plugin.rs b/gstreamer/src/auto/plugin.rs index 15e7689c4..716e6bd10 100644 --- a/gstreamer/src/auto/plugin.rs +++ b/gstreamer/src/auto/plugin.rs @@ -5,100 +5,97 @@ use Error; use Object; use PluginDependencyFlags; -use ffi; use glib::GString; use glib::translate::*; +use gst_sys; use std; use std::ptr; glib_wrapper! { - pub struct Plugin(Object) @extends Object; + pub struct Plugin(Object) @extends Object; match fn { - get_type => || ffi::gst_plugin_get_type(), + get_type => || gst_sys::gst_plugin_get_type(), } } impl Plugin { pub fn add_dependency(&self, env_vars: &[&str], paths: &[&str], names: &[&str], flags: PluginDependencyFlags) { unsafe { - ffi::gst_plugin_add_dependency(self.to_glib_none().0, env_vars.to_glib_none().0, paths.to_glib_none().0, names.to_glib_none().0, flags.to_glib()); + gst_sys::gst_plugin_add_dependency(self.to_glib_none().0, env_vars.to_glib_none().0, paths.to_glib_none().0, names.to_glib_none().0, flags.to_glib()); } } - pub fn add_dependency_simple<'a, 'b, 'c, P: Into>, Q: Into>, R: Into>>(&self, env_vars: P, paths: Q, names: R, flags: PluginDependencyFlags) { - let env_vars = env_vars.into(); - let paths = paths.into(); - let names = names.into(); + pub fn add_dependency_simple(&self, env_vars: Option<&str>, paths: Option<&str>, names: Option<&str>, flags: PluginDependencyFlags) { unsafe { - ffi::gst_plugin_add_dependency_simple(self.to_glib_none().0, env_vars.to_glib_none().0, paths.to_glib_none().0, names.to_glib_none().0, flags.to_glib()); + gst_sys::gst_plugin_add_dependency_simple(self.to_glib_none().0, env_vars.to_glib_none().0, paths.to_glib_none().0, names.to_glib_none().0, flags.to_glib()); } } pub fn get_description(&self) -> GString { unsafe { - from_glib_none(ffi::gst_plugin_get_description(self.to_glib_none().0)) + from_glib_none(gst_sys::gst_plugin_get_description(self.to_glib_none().0)) } } pub fn get_filename(&self) -> Option { unsafe { - from_glib_none(ffi::gst_plugin_get_filename(self.to_glib_none().0)) + from_glib_none(gst_sys::gst_plugin_get_filename(self.to_glib_none().0)) } } pub fn get_license(&self) -> GString { unsafe { - from_glib_none(ffi::gst_plugin_get_license(self.to_glib_none().0)) + from_glib_none(gst_sys::gst_plugin_get_license(self.to_glib_none().0)) } } pub fn get_origin(&self) -> GString { unsafe { - from_glib_none(ffi::gst_plugin_get_origin(self.to_glib_none().0)) + from_glib_none(gst_sys::gst_plugin_get_origin(self.to_glib_none().0)) } } pub fn get_package(&self) -> GString { unsafe { - from_glib_none(ffi::gst_plugin_get_package(self.to_glib_none().0)) + from_glib_none(gst_sys::gst_plugin_get_package(self.to_glib_none().0)) } } pub fn get_release_date_string(&self) -> Option { unsafe { - from_glib_none(ffi::gst_plugin_get_release_date_string(self.to_glib_none().0)) + from_glib_none(gst_sys::gst_plugin_get_release_date_string(self.to_glib_none().0)) } } pub fn get_source(&self) -> GString { unsafe { - from_glib_none(ffi::gst_plugin_get_source(self.to_glib_none().0)) + from_glib_none(gst_sys::gst_plugin_get_source(self.to_glib_none().0)) } } pub fn get_version(&self) -> GString { unsafe { - from_glib_none(ffi::gst_plugin_get_version(self.to_glib_none().0)) + from_glib_none(gst_sys::gst_plugin_get_version(self.to_glib_none().0)) } } pub fn is_loaded(&self) -> bool { unsafe { - from_glib(ffi::gst_plugin_is_loaded(self.to_glib_none().0)) + from_glib(gst_sys::gst_plugin_is_loaded(self.to_glib_none().0)) } } pub fn load(&self) -> Option { unsafe { - from_glib_full(ffi::gst_plugin_load(self.to_glib_none().0)) + from_glib_full(gst_sys::gst_plugin_load(self.to_glib_none().0)) } } pub fn load_by_name(name: &str) -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_plugin_load_by_name(name.to_glib_none().0)) + from_glib_full(gst_sys::gst_plugin_load_by_name(name.to_glib_none().0)) } } @@ -106,7 +103,7 @@ impl Plugin { assert_initialized_main_thread!(); unsafe { let mut error = ptr::null_mut(); - let ret = ffi::gst_plugin_load_file(filename.as_ref().to_glib_none().0, &mut error); + let ret = gst_sys::gst_plugin_load_file(filename.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } diff --git a/gstreamer/src/auto/plugin_feature.rs b/gstreamer/src/auto/plugin_feature.rs index ae2c67bde..d407c4265 100644 --- a/gstreamer/src/auto/plugin_feature.rs +++ b/gstreamer/src/auto/plugin_feature.rs @@ -4,16 +4,16 @@ use Object; use Plugin; -use ffi; use glib::GString; use glib::object::IsA; use glib::translate::*; +use gst_sys; glib_wrapper! { - pub struct PluginFeature(Object) @extends Object; + pub struct PluginFeature(Object) @extends Object; match fn { - get_type => || ffi::gst_plugin_feature_get_type(), + get_type => || gst_sys::gst_plugin_feature_get_type(), } } @@ -39,37 +39,37 @@ pub trait PluginFeatureExt: 'static { impl> PluginFeatureExt for O { fn check_version(&self, min_major: u32, min_minor: u32, min_micro: u32) -> bool { unsafe { - from_glib(ffi::gst_plugin_feature_check_version(self.as_ref().to_glib_none().0, min_major, min_minor, min_micro)) + from_glib(gst_sys::gst_plugin_feature_check_version(self.as_ref().to_glib_none().0, min_major, min_minor, min_micro)) } } fn get_plugin(&self) -> Option { unsafe { - from_glib_full(ffi::gst_plugin_feature_get_plugin(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_plugin_feature_get_plugin(self.as_ref().to_glib_none().0)) } } fn get_plugin_name(&self) -> Option { unsafe { - from_glib_none(ffi::gst_plugin_feature_get_plugin_name(self.as_ref().to_glib_none().0)) + from_glib_none(gst_sys::gst_plugin_feature_get_plugin_name(self.as_ref().to_glib_none().0)) } } fn get_rank(&self) -> u32 { unsafe { - ffi::gst_plugin_feature_get_rank(self.as_ref().to_glib_none().0) + gst_sys::gst_plugin_feature_get_rank(self.as_ref().to_glib_none().0) } } fn load(&self) -> Option { unsafe { - from_glib_full(ffi::gst_plugin_feature_load(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_plugin_feature_load(self.as_ref().to_glib_none().0)) } } fn set_rank(&self, rank: u32) { unsafe { - ffi::gst_plugin_feature_set_rank(self.as_ref().to_glib_none().0, rank); + gst_sys::gst_plugin_feature_set_rank(self.as_ref().to_glib_none().0, rank); } } } diff --git a/gstreamer/src/auto/preset.rs b/gstreamer/src/auto/preset.rs index 7685dfedf..6af6dbdcf 100644 --- a/gstreamer/src/auto/preset.rs +++ b/gstreamer/src/auto/preset.rs @@ -2,19 +2,19 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use ffi; use glib; use glib::GString; use glib::object::IsA; use glib::translate::*; +use gst_sys; use std; use std::ptr; glib_wrapper! { - pub struct Preset(Interface); + pub struct Preset(Interface); match fn { - get_type => || ffi::gst_preset_get_type(), + get_type => || gst_sys::gst_preset_get_type(), } } @@ -22,14 +22,14 @@ impl Preset { pub fn get_app_dir() -> Option { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::gst_preset_get_app_dir()) + from_glib_none(gst_sys::gst_preset_get_app_dir()) } } pub fn set_app_dir>(app_dir: P) -> Result<(), glib::error::BoolError> { assert_initialized_main_thread!(); unsafe { - glib_result_from_gboolean!(ffi::gst_preset_set_app_dir(app_dir.as_ref().to_glib_none().0), "Failed to set app preset directory") + glib_result_from_gboolean!(gst_sys::gst_preset_set_app_dir(app_dir.as_ref().to_glib_none().0), "Failed to set app preset directory") } } } @@ -56,64 +56,63 @@ pub trait PresetExt: 'static { fn save_preset(&self, name: &str) -> Result<(), glib::error::BoolError>; - fn set_meta<'a, P: Into>>(&self, name: &str, tag: &str, value: P) -> Result<(), glib::error::BoolError>; + fn set_meta(&self, name: &str, tag: &str, value: Option<&str>) -> Result<(), glib::error::BoolError>; } impl> PresetExt for O { fn delete_preset(&self, name: &str) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_preset_delete_preset(self.as_ref().to_glib_none().0, name.to_glib_none().0), "Failed to delete preset") + glib_result_from_gboolean!(gst_sys::gst_preset_delete_preset(self.as_ref().to_glib_none().0, name.to_glib_none().0), "Failed to delete preset") } } fn get_meta(&self, name: &str, tag: &str) -> Option { unsafe { let mut value = ptr::null_mut(); - let ret = from_glib(ffi::gst_preset_get_meta(self.as_ref().to_glib_none().0, name.to_glib_none().0, tag.to_glib_none().0, &mut value)); + let ret = from_glib(gst_sys::gst_preset_get_meta(self.as_ref().to_glib_none().0, name.to_glib_none().0, tag.to_glib_none().0, &mut value)); if ret { Some(from_glib_full(value)) } else { None } } } fn get_preset_names(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_preset_get_preset_names(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_preset_get_preset_names(self.as_ref().to_glib_none().0)) } } fn get_property_names(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_preset_get_property_names(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_preset_get_property_names(self.as_ref().to_glib_none().0)) } } fn is_editable(&self) -> bool { unsafe { - from_glib(ffi::gst_preset_is_editable(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_preset_is_editable(self.as_ref().to_glib_none().0)) } } fn load_preset(&self, name: &str) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_preset_load_preset(self.as_ref().to_glib_none().0, name.to_glib_none().0), "Failed to load preset") + glib_result_from_gboolean!(gst_sys::gst_preset_load_preset(self.as_ref().to_glib_none().0, name.to_glib_none().0), "Failed to load preset") } } fn rename_preset(&self, old_name: &str, new_name: &str) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_preset_rename_preset(self.as_ref().to_glib_none().0, old_name.to_glib_none().0, new_name.to_glib_none().0), "Failed to rename preset") + glib_result_from_gboolean!(gst_sys::gst_preset_rename_preset(self.as_ref().to_glib_none().0, old_name.to_glib_none().0, new_name.to_glib_none().0), "Failed to rename preset") } } fn save_preset(&self, name: &str) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_preset_save_preset(self.as_ref().to_glib_none().0, name.to_glib_none().0), "Failed to save preset") + glib_result_from_gboolean!(gst_sys::gst_preset_save_preset(self.as_ref().to_glib_none().0, name.to_glib_none().0), "Failed to save preset") } } - fn set_meta<'a, P: Into>>(&self, name: &str, tag: &str, value: P) -> Result<(), glib::error::BoolError> { - let value = value.into(); + fn set_meta(&self, name: &str, tag: &str, value: Option<&str>) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_preset_set_meta(self.as_ref().to_glib_none().0, name.to_glib_none().0, tag.to_glib_none().0, value.to_glib_none().0), "Failed to set preset meta") + glib_result_from_gboolean!(gst_sys::gst_preset_set_meta(self.as_ref().to_glib_none().0, name.to_glib_none().0, tag.to_glib_none().0, value.to_glib_none().0), "Failed to set preset meta") } } } diff --git a/gstreamer/src/auto/proxy_pad.rs b/gstreamer/src/auto/proxy_pad.rs index dddf81568..a3dbc5990 100644 --- a/gstreamer/src/auto/proxy_pad.rs +++ b/gstreamer/src/auto/proxy_pad.rs @@ -4,21 +4,21 @@ use Object; use Pad; -use ffi; use glib::object::IsA; use glib::translate::*; +use gst_sys; glib_wrapper! { - pub struct ProxyPad(Object) @extends Pad, Object; + pub struct ProxyPad(Object) @extends Pad, Object; match fn { - get_type => || ffi::gst_proxy_pad_get_type(), + get_type => || gst_sys::gst_proxy_pad_get_type(), } } impl ProxyPad { - //pub fn iterate_internal_links_default<'a, P: IsA, Q: IsA + 'a, R: Into>>(pad: &P, parent: R) -> /*Ignored*/Option { - // unsafe { TODO: call ffi::gst_proxy_pad_iterate_internal_links_default() } + //pub fn iterate_internal_links_default, Q: IsA>(pad: &P, parent: Option<&Q>) -> /*Ignored*/Option { + // unsafe { TODO: call gst_sys:gst_proxy_pad_iterate_internal_links_default() } //} } @@ -34,7 +34,7 @@ pub trait ProxyPadExt: 'static { impl> ProxyPadExt for O { fn get_internal(&self) -> Option { unsafe { - from_glib_full(ffi::gst_proxy_pad_get_internal(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_proxy_pad_get_internal(self.as_ref().to_glib_none().0)) } } } diff --git a/gstreamer/src/auto/registry.rs b/gstreamer/src/auto/registry.rs index bed090680..b9ab64ad4 100644 --- a/gstreamer/src/auto/registry.rs +++ b/gstreamer/src/auto/registry.rs @@ -5,48 +5,48 @@ use Object; use Plugin; use PluginFeature; -use ffi; use glib; use glib::object::IsA; use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; +use glib_sys; +use gst_sys; use std; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Registry(Object) @extends Object; + pub struct Registry(Object) @extends Object; match fn { - get_type => || ffi::gst_registry_get_type(), + get_type => || gst_sys::gst_registry_get_type(), } } impl Registry { pub fn add_feature>(&self, feature: &P) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_registry_add_feature(self.to_glib_none().0, feature.as_ref().to_glib_none().0), "Failed to add feature") + glib_result_from_gboolean!(gst_sys::gst_registry_add_feature(self.to_glib_none().0, feature.as_ref().to_glib_none().0), "Failed to add feature") } } pub fn add_plugin(&self, plugin: &Plugin) -> Result<(), glib::error::BoolError> { unsafe { - glib_result_from_gboolean!(ffi::gst_registry_add_plugin(self.to_glib_none().0, plugin.to_glib_none().0), "Failed to add plugin") + glib_result_from_gboolean!(gst_sys::gst_registry_add_plugin(self.to_glib_none().0, plugin.to_glib_none().0), "Failed to add plugin") } } pub fn check_feature_version(&self, feature_name: &str, min_major: u32, min_minor: u32, min_micro: u32) -> bool { unsafe { - from_glib(ffi::gst_registry_check_feature_version(self.to_glib_none().0, feature_name.to_glib_none().0, min_major, min_minor, min_micro)) + from_glib(gst_sys::gst_registry_check_feature_version(self.to_glib_none().0, feature_name.to_glib_none().0, min_major, min_minor, min_micro)) } } pub fn feature_filter bool>(&self, filter: P, first: bool) -> Vec { let filter_data: P = filter; - unsafe extern "C" fn filter_func bool>(feature: *mut ffi::GstPluginFeature, user_data: glib_ffi::gpointer) -> glib_ffi::gboolean { + unsafe extern "C" fn filter_func bool>(feature: *mut gst_sys::GstPluginFeature, user_data: glib_sys::gpointer) -> glib_sys::gboolean { let feature = from_glib_borrow(feature); let callback: *mut P = user_data as *const _ as usize as *mut P; let res = (*callback)(&feature); @@ -55,61 +55,61 @@ impl Registry { let filter = Some(filter_func::

as _); let super_callback0: &P = &filter_data; unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_registry_feature_filter(self.to_glib_none().0, filter, first.to_glib(), super_callback0 as *const _ as usize as *mut _)) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_registry_feature_filter(self.to_glib_none().0, filter, first.to_glib(), super_callback0 as *const _ as usize as *mut _)) } } pub fn find_feature(&self, name: &str, type_: glib::types::Type) -> Option { unsafe { - from_glib_full(ffi::gst_registry_find_feature(self.to_glib_none().0, name.to_glib_none().0, type_.to_glib())) + from_glib_full(gst_sys::gst_registry_find_feature(self.to_glib_none().0, name.to_glib_none().0, type_.to_glib())) } } pub fn find_plugin(&self, name: &str) -> Option { unsafe { - from_glib_full(ffi::gst_registry_find_plugin(self.to_glib_none().0, name.to_glib_none().0)) + from_glib_full(gst_sys::gst_registry_find_plugin(self.to_glib_none().0, name.to_glib_none().0)) } } pub fn get_feature_list(&self, type_: glib::types::Type) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_registry_get_feature_list(self.to_glib_none().0, type_.to_glib())) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_registry_get_feature_list(self.to_glib_none().0, type_.to_glib())) } } pub fn get_feature_list_by_plugin(&self, name: &str) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_registry_get_feature_list_by_plugin(self.to_glib_none().0, name.to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_registry_get_feature_list_by_plugin(self.to_glib_none().0, name.to_glib_none().0)) } } pub fn get_feature_list_cookie(&self) -> u32 { unsafe { - ffi::gst_registry_get_feature_list_cookie(self.to_glib_none().0) + gst_sys::gst_registry_get_feature_list_cookie(self.to_glib_none().0) } } pub fn get_plugin_list(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_registry_get_plugin_list(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_registry_get_plugin_list(self.to_glib_none().0)) } } pub fn lookup(&self, filename: &str) -> Option { unsafe { - from_glib_full(ffi::gst_registry_lookup(self.to_glib_none().0, filename.to_glib_none().0)) + from_glib_full(gst_sys::gst_registry_lookup(self.to_glib_none().0, filename.to_glib_none().0)) } } pub fn lookup_feature(&self, name: &str) -> Option { unsafe { - from_glib_full(ffi::gst_registry_lookup_feature(self.to_glib_none().0, name.to_glib_none().0)) + from_glib_full(gst_sys::gst_registry_lookup_feature(self.to_glib_none().0, name.to_glib_none().0)) } } pub fn plugin_filter bool>(&self, filter: P, first: bool) -> Vec { let filter_data: P = filter; - unsafe extern "C" fn filter_func bool>(plugin: *mut ffi::GstPlugin, user_data: glib_ffi::gpointer) -> glib_ffi::gboolean { + unsafe extern "C" fn filter_func bool>(plugin: *mut gst_sys::GstPlugin, user_data: glib_sys::gpointer) -> glib_sys::gboolean { let plugin = from_glib_borrow(plugin); let callback: *mut P = user_data as *const _ as usize as *mut P; let res = (*callback)(&plugin); @@ -118,32 +118,32 @@ impl Registry { let filter = Some(filter_func::

as _); let super_callback0: &P = &filter_data; unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_registry_plugin_filter(self.to_glib_none().0, filter, first.to_glib(), super_callback0 as *const _ as usize as *mut _)) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_registry_plugin_filter(self.to_glib_none().0, filter, first.to_glib(), super_callback0 as *const _ as usize as *mut _)) } } pub fn remove_feature>(&self, feature: &P) { unsafe { - ffi::gst_registry_remove_feature(self.to_glib_none().0, feature.as_ref().to_glib_none().0); + gst_sys::gst_registry_remove_feature(self.to_glib_none().0, feature.as_ref().to_glib_none().0); } } pub fn remove_plugin(&self, plugin: &Plugin) { unsafe { - ffi::gst_registry_remove_plugin(self.to_glib_none().0, plugin.to_glib_none().0); + gst_sys::gst_registry_remove_plugin(self.to_glib_none().0, plugin.to_glib_none().0); } } pub fn scan_path>(&self, path: P) -> bool { unsafe { - from_glib(ffi::gst_registry_scan_path(self.to_glib_none().0, path.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_registry_scan_path(self.to_glib_none().0, path.as_ref().to_glib_none().0)) } } pub fn get() -> Registry { assert_initialized_main_thread!(); unsafe { - from_glib_none(ffi::gst_registry_get()) + from_glib_none(gst_sys::gst_registry_get()) } } @@ -167,12 +167,12 @@ impl Registry { unsafe impl Send for Registry {} unsafe impl Sync for Registry {} -unsafe extern "C" fn feature_added_trampoline(this: *mut ffi::GstRegistry, feature: *mut ffi::GstPluginFeature, f: glib_ffi::gpointer) { +unsafe extern "C" fn feature_added_trampoline(this: *mut gst_sys::GstRegistry, feature: *mut gst_sys::GstPluginFeature, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), &from_glib_borrow(feature)) } -unsafe extern "C" fn plugin_added_trampoline(this: *mut ffi::GstRegistry, plugin: *mut ffi::GstPlugin, f: glib_ffi::gpointer) { +unsafe extern "C" fn plugin_added_trampoline(this: *mut gst_sys::GstRegistry, plugin: *mut gst_sys::GstPlugin, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), &from_glib_borrow(plugin)) } diff --git a/gstreamer/src/auto/stream.rs b/gstreamer/src/auto/stream.rs index 227947e7b..fa6499e29 100644 --- a/gstreamer/src/auto/stream.rs +++ b/gstreamer/src/auto/stream.rs @@ -7,7 +7,6 @@ use Object; use StreamFlags; use StreamType; use TagList; -use ffi; use glib::GString; use glib::StaticType; use glib::Value; @@ -15,16 +14,17 @@ use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct Stream(Object) @extends Object; + pub struct Stream(Object) @extends Object; match fn { - get_type => || ffi::gst_stream_get_type(), + get_type => || gst_sys::gst_stream_get_type(), } } @@ -32,100 +32,98 @@ impl Stream { #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn get_caps(&self) -> Option { unsafe { - from_glib_full(ffi::gst_stream_get_caps(self.to_glib_none().0)) + from_glib_full(gst_sys::gst_stream_get_caps(self.to_glib_none().0)) } } #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn get_stream_flags(&self) -> StreamFlags { unsafe { - from_glib(ffi::gst_stream_get_stream_flags(self.to_glib_none().0)) + from_glib(gst_sys::gst_stream_get_stream_flags(self.to_glib_none().0)) } } #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn get_stream_id(&self) -> Option { unsafe { - from_glib_none(ffi::gst_stream_get_stream_id(self.to_glib_none().0)) + from_glib_none(gst_sys::gst_stream_get_stream_id(self.to_glib_none().0)) } } #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn get_stream_type(&self) -> StreamType { unsafe { - from_glib(ffi::gst_stream_get_stream_type(self.to_glib_none().0)) + from_glib(gst_sys::gst_stream_get_stream_type(self.to_glib_none().0)) } } #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn get_tags(&self) -> Option { unsafe { - from_glib_full(ffi::gst_stream_get_tags(self.to_glib_none().0)) + from_glib_full(gst_sys::gst_stream_get_tags(self.to_glib_none().0)) } } #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn set_caps<'a, P: Into>>(&self, caps: P) { - let caps = caps.into(); + pub fn set_caps(&self, caps: Option<&Caps>) { unsafe { - ffi::gst_stream_set_caps(self.to_glib_none().0, caps.to_glib_none().0); + gst_sys::gst_stream_set_caps(self.to_glib_none().0, caps.to_glib_none().0); } } #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn set_stream_flags(&self, flags: StreamFlags) { unsafe { - ffi::gst_stream_set_stream_flags(self.to_glib_none().0, flags.to_glib()); + gst_sys::gst_stream_set_stream_flags(self.to_glib_none().0, flags.to_glib()); } } #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn set_stream_type(&self, stream_type: StreamType) { unsafe { - ffi::gst_stream_set_stream_type(self.to_glib_none().0, stream_type.to_glib()); + gst_sys::gst_stream_set_stream_type(self.to_glib_none().0, stream_type.to_glib()); } } #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn set_tags<'a, P: Into>>(&self, tags: P) { - let tags = tags.into(); + pub fn set_tags(&self, tags: Option<&TagList>) { unsafe { - ffi::gst_stream_set_tags(self.to_glib_none().0, tags.to_glib_none().0); + gst_sys::gst_stream_set_tags(self.to_glib_none().0, tags.to_glib_none().0); } } pub fn get_property_caps(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"caps\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"caps\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } pub fn set_property_caps(&self, caps: Option<&Caps>) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"caps\0".as_ptr() as *const _, Value::from(caps).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"caps\0".as_ptr() as *const _, Value::from(caps).to_glib_none().0); } } pub fn get_property_stream_flags(&self) -> StreamFlags { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"stream-flags\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"stream-flags\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_stream_flags(&self, stream_flags: StreamFlags) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"stream-flags\0".as_ptr() as *const _, Value::from(&stream_flags).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"stream-flags\0".as_ptr() as *const _, Value::from(&stream_flags).to_glib_none().0); } } pub fn get_property_stream_id(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"stream-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"stream-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } @@ -133,28 +131,28 @@ impl Stream { pub fn get_property_stream_type(&self) -> StreamType { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"stream-type\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"stream-type\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } pub fn set_property_stream_type(&self, stream_type: StreamType) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"stream-type\0".as_ptr() as *const _, Value::from(&stream_type).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"stream-type\0".as_ptr() as *const _, Value::from(&stream_type).to_glib_none().0); } } pub fn get_property_tags(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"tags\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"tags\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } pub fn set_property_tags(&self, tags: Option<&TagList>) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"tags\0".as_ptr() as *const _, Value::from(tags).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"tags\0".as_ptr() as *const _, Value::from(tags).to_glib_none().0); } } @@ -194,22 +192,22 @@ impl Stream { unsafe impl Send for Stream {} unsafe impl Sync for Stream {} -unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_caps_trampoline(this: *mut gst_sys::GstStream, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_stream_flags_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_stream_flags_trampoline(this: *mut gst_sys::GstStream, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_stream_type_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_stream_type_trampoline(this: *mut gst_sys::GstStream, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } -unsafe extern "C" fn notify_tags_trampoline(this: *mut ffi::GstStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_tags_trampoline(this: *mut gst_sys::GstStream, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer/src/auto/stream_collection.rs b/gstreamer/src/auto/stream_collection.rs index d5be2c470..0d01384ce 100644 --- a/gstreamer/src/auto/stream_collection.rs +++ b/gstreamer/src/auto/stream_collection.rs @@ -5,7 +5,6 @@ use Object; #[cfg(any(feature = "v1_10", feature = "dox"))] use Stream; -use ffi; use glib::GString; use glib::StaticType; use glib::Value; @@ -13,16 +12,17 @@ use glib::object::ObjectType; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct StreamCollection(Object) @extends Object; + pub struct StreamCollection(Object) @extends Object; match fn { - get_type => || ffi::gst_stream_collection_get_type(), + get_type => || gst_sys::gst_stream_collection_get_type(), } } @@ -30,36 +30,35 @@ impl StreamCollection { #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn get_size(&self) -> u32 { unsafe { - ffi::gst_stream_collection_get_size(self.to_glib_none().0) + gst_sys::gst_stream_collection_get_size(self.to_glib_none().0) } } #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn get_stream(&self, index: u32) -> Option { unsafe { - from_glib_none(ffi::gst_stream_collection_get_stream(self.to_glib_none().0, index)) + from_glib_none(gst_sys::gst_stream_collection_get_stream(self.to_glib_none().0, index)) } } #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn get_upstream_id(&self) -> Option { unsafe { - from_glib_none(ffi::gst_stream_collection_get_upstream_id(self.to_glib_none().0)) + from_glib_none(gst_sys::gst_stream_collection_get_upstream_id(self.to_glib_none().0)) } } pub fn get_property_upstream_id(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"upstream-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"upstream-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get() } } - pub fn set_property_upstream_id<'a, P: Into>>(&self, upstream_id: P) { - let upstream_id = upstream_id.into(); + pub fn set_property_upstream_id(&self, upstream_id: Option<&str>) { unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"upstream-id\0".as_ptr() as *const _, Value::from(upstream_id).to_glib_none().0); + gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"upstream-id\0".as_ptr() as *const _, Value::from(upstream_id).to_glib_none().0); } } @@ -79,7 +78,7 @@ impl StreamCollection { unsafe impl Send for StreamCollection {} unsafe impl Sync for StreamCollection {} -unsafe extern "C" fn notify_upstream_id_trampoline(this: *mut ffi::GstStreamCollection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { +unsafe extern "C" fn notify_upstream_id_trampoline(this: *mut gst_sys::GstStreamCollection, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } diff --git a/gstreamer/src/auto/system_clock.rs b/gstreamer/src/auto/system_clock.rs index b654668ec..1c2cee3c0 100644 --- a/gstreamer/src/auto/system_clock.rs +++ b/gstreamer/src/auto/system_clock.rs @@ -5,7 +5,6 @@ use Clock; use ClockType; use Object; -use ffi; use glib::StaticType; use glib::Value; use glib::object::Cast; @@ -13,16 +12,17 @@ use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; -use glib_ffi; -use gobject_ffi; +use glib_sys; +use gobject_sys; +use gst_sys; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { - pub struct SystemClock(Object) @extends Clock, Object; + pub struct SystemClock(Object) @extends Clock, Object; match fn { - get_type => || ffi::gst_system_clock_get_type(), + get_type => || gst_sys::gst_system_clock_get_type(), } } @@ -30,15 +30,14 @@ impl SystemClock { pub fn obtain() -> Clock { assert_initialized_main_thread!(); unsafe { - from_glib_full(ffi::gst_system_clock_obtain()) + from_glib_full(gst_sys::gst_system_clock_obtain()) } } - pub fn set_default<'a, P: IsA + 'a, Q: Into>>(new_clock: Q) { + pub fn set_default>(new_clock: Option<&P>) { assert_initialized_main_thread!(); - let new_clock = new_clock.into(); unsafe { - ffi::gst_system_clock_set_default(new_clock.map(|p| p.as_ref()).to_glib_none().0); + gst_sys::gst_system_clock_set_default(new_clock.map(|p| p.as_ref()).to_glib_none().0); } } } @@ -60,14 +59,14 @@ impl> SystemClockExt for O { fn get_property_clock_type(&self) -> ClockType { unsafe { let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"clock-type\0".as_ptr() as *const _, value.to_glib_none_mut().0); + gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"clock-type\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_clock_type(&self, clock_type: ClockType) { unsafe { - gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"clock-type\0".as_ptr() as *const _, Value::from(&clock_type).to_glib_none().0); + gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"clock-type\0".as_ptr() as *const _, Value::from(&clock_type).to_glib_none().0); } } @@ -80,7 +79,7 @@ impl> SystemClockExt for O { } } -unsafe extern "C" fn notify_clock_type_trampoline(this: *mut ffi::GstSystemClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) +unsafe extern "C" fn notify_clock_type_trampoline(this: *mut gst_sys::GstSystemClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) where P: IsA { let f: &F = &*(f as *const F); f(&SystemClock::from_glib_borrow(this).unsafe_cast()) diff --git a/gstreamer/src/auto/tag_setter.rs b/gstreamer/src/auto/tag_setter.rs index 8a1365687..1efd6979a 100644 --- a/gstreamer/src/auto/tag_setter.rs +++ b/gstreamer/src/auto/tag_setter.rs @@ -6,15 +6,15 @@ use Element; use Object; use TagList; use TagMergeMode; -use ffi; use glib::object::IsA; use glib::translate::*; +use gst_sys; glib_wrapper! { - pub struct TagSetter(Interface) @requires Element, Object; + pub struct TagSetter(Interface) @requires Element, Object; match fn { - get_type => || ffi::gst_tag_setter_get_type(), + get_type => || gst_sys::gst_tag_setter_get_type(), } } @@ -47,52 +47,52 @@ pub trait TagSetterExt: 'static { impl> TagSetterExt for O { //fn add_tag_valist(&self, mode: TagMergeMode, tag: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { - // unsafe { TODO: call ffi::gst_tag_setter_add_tag_valist() } + // unsafe { TODO: call gst_sys:gst_tag_setter_add_tag_valist() } //} //fn add_tag_valist_values(&self, mode: TagMergeMode, tag: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { - // unsafe { TODO: call ffi::gst_tag_setter_add_tag_valist_values() } + // unsafe { TODO: call gst_sys:gst_tag_setter_add_tag_valist_values() } //} //fn add_tag_value(&self, mode: TagMergeMode, tag: &str, value: /*Ignored*/&glib::Value) { - // unsafe { TODO: call ffi::gst_tag_setter_add_tag_value() } + // unsafe { TODO: call gst_sys:gst_tag_setter_add_tag_value() } //} //fn add_tag_values(&self, mode: TagMergeMode, tag: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { - // unsafe { TODO: call ffi::gst_tag_setter_add_tag_values() } + // unsafe { TODO: call gst_sys:gst_tag_setter_add_tag_values() } //} //fn add_tags(&self, mode: TagMergeMode, tag: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { - // unsafe { TODO: call ffi::gst_tag_setter_add_tags() } + // unsafe { TODO: call gst_sys:gst_tag_setter_add_tags() } //} fn get_tag_list(&self) -> Option { unsafe { - from_glib_none(ffi::gst_tag_setter_get_tag_list(self.as_ref().to_glib_none().0)) + from_glib_none(gst_sys::gst_tag_setter_get_tag_list(self.as_ref().to_glib_none().0)) } } fn get_tag_merge_mode(&self) -> TagMergeMode { unsafe { - from_glib(ffi::gst_tag_setter_get_tag_merge_mode(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_tag_setter_get_tag_merge_mode(self.as_ref().to_glib_none().0)) } } fn merge_tags(&self, list: &TagList, mode: TagMergeMode) { unsafe { - ffi::gst_tag_setter_merge_tags(self.as_ref().to_glib_none().0, list.to_glib_none().0, mode.to_glib()); + gst_sys::gst_tag_setter_merge_tags(self.as_ref().to_glib_none().0, list.to_glib_none().0, mode.to_glib()); } } fn reset_tags(&self) { unsafe { - ffi::gst_tag_setter_reset_tags(self.as_ref().to_glib_none().0); + gst_sys::gst_tag_setter_reset_tags(self.as_ref().to_glib_none().0); } } fn set_tag_merge_mode(&self, mode: TagMergeMode) { unsafe { - ffi::gst_tag_setter_set_tag_merge_mode(self.as_ref().to_glib_none().0, mode.to_glib()); + gst_sys::gst_tag_setter_set_tag_merge_mode(self.as_ref().to_glib_none().0, mode.to_glib()); } } } diff --git a/gstreamer/src/auto/toc_setter.rs b/gstreamer/src/auto/toc_setter.rs index f36ef8555..de81b5579 100644 --- a/gstreamer/src/auto/toc_setter.rs +++ b/gstreamer/src/auto/toc_setter.rs @@ -5,15 +5,15 @@ use Element; use Object; use Toc; -use ffi; use glib::object::IsA; use glib::translate::*; +use gst_sys; glib_wrapper! { - pub struct TocSetter(Interface) @requires Element, Object; + pub struct TocSetter(Interface) @requires Element, Object; match fn { - get_type => || ffi::gst_toc_setter_get_type(), + get_type => || gst_sys::gst_toc_setter_get_type(), } } @@ -27,26 +27,25 @@ pub trait TocSetterExt: 'static { fn reset(&self); - fn set_toc<'a, P: Into>>(&self, toc: P); + fn set_toc(&self, toc: Option<&Toc>); } impl> TocSetterExt for O { fn get_toc(&self) -> Option { unsafe { - from_glib_full(ffi::gst_toc_setter_get_toc(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_toc_setter_get_toc(self.as_ref().to_glib_none().0)) } } fn reset(&self) { unsafe { - ffi::gst_toc_setter_reset(self.as_ref().to_glib_none().0); + gst_sys::gst_toc_setter_reset(self.as_ref().to_glib_none().0); } } - fn set_toc<'a, P: Into>>(&self, toc: P) { - let toc = toc.into(); + fn set_toc(&self, toc: Option<&Toc>) { unsafe { - ffi::gst_toc_setter_set_toc(self.as_ref().to_glib_none().0, toc.to_glib_none().0); + gst_sys::gst_toc_setter_set_toc(self.as_ref().to_glib_none().0, toc.to_glib_none().0); } } } diff --git a/gstreamer/src/auto/type_find_factory.rs b/gstreamer/src/auto/type_find_factory.rs index e43276b21..4eeedc412 100644 --- a/gstreamer/src/auto/type_find_factory.rs +++ b/gstreamer/src/auto/type_find_factory.rs @@ -5,45 +5,45 @@ use Caps; use Object; use PluginFeature; -use ffi; use glib::GString; use glib::translate::*; +use gst_sys; glib_wrapper! { - pub struct TypeFindFactory(Object) @extends PluginFeature, Object; + pub struct TypeFindFactory(Object) @extends PluginFeature, Object; match fn { - get_type => || ffi::gst_type_find_factory_get_type(), + get_type => || gst_sys::gst_type_find_factory_get_type(), } } impl TypeFindFactory { //pub fn call_function(&self, find: /*Ignored*/&mut TypeFind) { - // unsafe { TODO: call ffi::gst_type_find_factory_call_function() } + // unsafe { TODO: call gst_sys:gst_type_find_factory_call_function() } //} pub fn get_caps(&self) -> Option { unsafe { - from_glib_none(ffi::gst_type_find_factory_get_caps(self.to_glib_none().0)) + from_glib_none(gst_sys::gst_type_find_factory_get_caps(self.to_glib_none().0)) } } pub fn get_extensions(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_type_find_factory_get_extensions(self.to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_sys::gst_type_find_factory_get_extensions(self.to_glib_none().0)) } } pub fn has_function(&self) -> bool { unsafe { - from_glib(ffi::gst_type_find_factory_has_function(self.to_glib_none().0)) + from_glib(gst_sys::gst_type_find_factory_has_function(self.to_glib_none().0)) } } pub fn get_list() -> Vec { assert_initialized_main_thread!(); unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gst_type_find_factory_get_list()) + FromGlibPtrContainer::from_glib_full(gst_sys::gst_type_find_factory_get_list()) } } } diff --git a/gstreamer/src/auto/uri_handler.rs b/gstreamer/src/auto/uri_handler.rs index dd4f73ad7..15604f8f3 100644 --- a/gstreamer/src/auto/uri_handler.rs +++ b/gstreamer/src/auto/uri_handler.rs @@ -4,17 +4,17 @@ use Error; use URIType; -use ffi; use glib::GString; use glib::object::IsA; use glib::translate::*; +use gst_sys; use std::ptr; glib_wrapper! { - pub struct URIHandler(Interface); + pub struct URIHandler(Interface); match fn { - get_type => || ffi::gst_uri_handler_get_type(), + get_type => || gst_sys::gst_uri_handler_get_type(), } } @@ -36,26 +36,26 @@ pub trait URIHandlerExt: 'static { impl> URIHandlerExt for O { fn get_protocols(&self) -> Vec { unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gst_uri_handler_get_protocols(self.as_ref().to_glib_none().0)) + FromGlibPtrContainer::from_glib_none(gst_sys::gst_uri_handler_get_protocols(self.as_ref().to_glib_none().0)) } } fn get_uri(&self) -> Option { unsafe { - from_glib_full(ffi::gst_uri_handler_get_uri(self.as_ref().to_glib_none().0)) + from_glib_full(gst_sys::gst_uri_handler_get_uri(self.as_ref().to_glib_none().0)) } } fn get_uri_type(&self) -> URIType { unsafe { - from_glib(ffi::gst_uri_handler_get_uri_type(self.as_ref().to_glib_none().0)) + from_glib(gst_sys::gst_uri_handler_get_uri_type(self.as_ref().to_glib_none().0)) } } fn set_uri(&self, uri: &str) -> Result<(), Error> { unsafe { let mut error = ptr::null_mut(); - let _ = ffi::gst_uri_handler_set_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0, &mut error); + let _ = gst_sys::gst_uri_handler_set_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } diff --git a/gstreamer/src/auto/versions.txt b/gstreamer/src/auto/versions.txt index b9131200d..a9e0ccc5d 100644 --- a/gstreamer/src/auto/versions.txt +++ b/gstreamer/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3) +Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) from gir-files (https://github.com/gtk-rs/gir-files @ ???)