From e7843d68d01325d96e5dd1b28f26a25caeff0e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 21 Nov 2020 20:05:57 +0200 Subject: [PATCH] gstreamer-app: Regenerate --- gstreamer-app/src/auto/app_sink.rs | 122 +++++++---------- gstreamer-app/src/auto/app_src.rs | 204 +++++++++++++--------------- gstreamer-app/src/auto/enums.rs | 22 ++- gstreamer-app/src/auto/versions.txt | 4 +- 4 files changed, 159 insertions(+), 193 deletions(-) diff --git a/gstreamer-app/src/auto/app_sink.rs b/gstreamer-app/src/auto/app_sink.rs index 865fb47cc..774229e9a 100644 --- a/gstreamer-app/src/auto/app_sink.rs +++ b/gstreamer-app/src/auto/app_sink.rs @@ -2,26 +2,20 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use glib; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::StaticType; use glib::Value; -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; +glib::glib_wrapper! { + pub struct AppSink(Object) @extends gst_base::BaseSink, gst::Element, gst::Object, @implements gst::URIHandler; match fn { - get_type => || gst_app_sys::gst_app_sink_get_type(), + get_type => || ffi::gst_app_sink_get_type(), } } @@ -30,59 +24,47 @@ impl AppSink { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn get_buffer_list_support(&self) -> bool { unsafe { - from_glib(gst_app_sys::gst_app_sink_get_buffer_list_support( + from_glib(ffi::gst_app_sink_get_buffer_list_support( self.to_glib_none().0, )) } } pub fn get_caps(&self) -> Option { - unsafe { from_glib_full(gst_app_sys::gst_app_sink_get_caps(self.to_glib_none().0)) } + unsafe { from_glib_full(ffi::gst_app_sink_get_caps(self.to_glib_none().0)) } } pub fn get_drop(&self) -> bool { - unsafe { from_glib(gst_app_sys::gst_app_sink_get_drop(self.to_glib_none().0)) } + unsafe { from_glib(ffi::gst_app_sink_get_drop(self.to_glib_none().0)) } } pub fn get_emit_signals(&self) -> bool { - unsafe { - from_glib(gst_app_sys::gst_app_sink_get_emit_signals( - self.to_glib_none().0, - )) - } + unsafe { from_glib(ffi::gst_app_sink_get_emit_signals(self.to_glib_none().0)) } } pub fn get_max_buffers(&self) -> u32 { - unsafe { gst_app_sys::gst_app_sink_get_max_buffers(self.to_glib_none().0) } + unsafe { ffi::gst_app_sink_get_max_buffers(self.to_glib_none().0) } } pub fn get_wait_on_eos(&self) -> bool { - unsafe { - from_glib(gst_app_sys::gst_app_sink_get_wait_on_eos( - self.to_glib_none().0, - )) - } + unsafe { from_glib(ffi::gst_app_sink_get_wait_on_eos(self.to_glib_none().0)) } } pub fn is_eos(&self) -> bool { - unsafe { from_glib(gst_app_sys::gst_app_sink_is_eos(self.to_glib_none().0)) } + unsafe { from_glib(ffi::gst_app_sink_is_eos(self.to_glib_none().0)) } } pub fn pull_preroll(&self) -> Result { unsafe { - Option::<_>::from_glib_full(gst_app_sys::gst_app_sink_pull_preroll( - self.to_glib_none().0, - )) - .ok_or_else(|| glib_bool_error!("Failed to pull preroll sample")) + Option::<_>::from_glib_full(ffi::gst_app_sink_pull_preroll(self.to_glib_none().0)) + .ok_or_else(|| glib::glib_bool_error!("Failed to pull preroll sample")) } } pub fn pull_sample(&self) -> Result { unsafe { - Option::<_>::from_glib_full(gst_app_sys::gst_app_sink_pull_sample( - self.to_glib_none().0, - )) - .ok_or_else(|| glib_bool_error!("Failed to pull sample")) + Option::<_>::from_glib_full(ffi::gst_app_sink_pull_sample(self.to_glib_none().0)) + .ok_or_else(|| glib::glib_bool_error!("Failed to pull sample")) } } @@ -90,7 +72,7 @@ impl AppSink { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] pub fn set_buffer_list_support(&self, enable_lists: bool) { unsafe { - gst_app_sys::gst_app_sink_set_buffer_list_support( + ffi::gst_app_sink_set_buffer_list_support( self.to_glib_none().0, enable_lists.to_glib(), ); @@ -98,36 +80,36 @@ impl AppSink { } //pub fn set_callbacks(&self, callbacks: /*Ignored*/&mut AppSinkCallbacks, user_data: /*Unimplemented*/Option) { - // unsafe { TODO: call gst_app_sys:gst_app_sink_set_callbacks() } + // unsafe { TODO: call ffi:gst_app_sink_set_callbacks() } //} pub fn set_caps(&self, caps: Option<&gst::Caps>) { unsafe { - gst_app_sys::gst_app_sink_set_caps(self.to_glib_none().0, caps.to_glib_none().0); + ffi::gst_app_sink_set_caps(self.to_glib_none().0, caps.to_glib_none().0); } } pub fn set_drop(&self, drop: bool) { unsafe { - gst_app_sys::gst_app_sink_set_drop(self.to_glib_none().0, drop.to_glib()); + ffi::gst_app_sink_set_drop(self.to_glib_none().0, drop.to_glib()); } } pub fn set_emit_signals(&self, emit: bool) { unsafe { - gst_app_sys::gst_app_sink_set_emit_signals(self.to_glib_none().0, emit.to_glib()); + ffi::gst_app_sink_set_emit_signals(self.to_glib_none().0, emit.to_glib()); } } pub fn set_max_buffers(&self, max: u32) { unsafe { - gst_app_sys::gst_app_sink_set_max_buffers(self.to_glib_none().0, max); + ffi::gst_app_sink_set_max_buffers(self.to_glib_none().0, max); } } pub fn set_wait_on_eos(&self, wait: bool) { unsafe { - gst_app_sys::gst_app_sink_set_wait_on_eos(self.to_glib_none().0, wait.to_glib()); + ffi::gst_app_sink_set_wait_on_eos(self.to_glib_none().0, wait.to_glib()); } } @@ -135,7 +117,7 @@ impl AppSink { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn try_pull_preroll(&self, timeout: gst::ClockTime) -> Option { unsafe { - from_glib_full(gst_app_sys::gst_app_sink_try_pull_preroll( + from_glib_full(ffi::gst_app_sink_try_pull_preroll( self.to_glib_none().0, timeout.to_glib(), )) @@ -146,7 +128,7 @@ impl AppSink { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn try_pull_sample(&self, timeout: gst::ClockTime) -> Option { unsafe { - from_glib_full(gst_app_sys::gst_app_sink_try_pull_sample( + from_glib_full(ffi::gst_app_sink_try_pull_sample( self.to_glib_none().0, timeout.to_glib(), )) @@ -156,8 +138,8 @@ impl AppSink { pub fn get_property_buffer_list(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"buffer-list\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -170,8 +152,8 @@ impl AppSink { pub fn set_property_buffer_list(&self, buffer_list: bool) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"buffer-list\0".as_ptr() as *const _, Value::from(&buffer_list).to_glib_none().0, ); @@ -181,8 +163,8 @@ impl AppSink { pub fn get_property_eos(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"eos\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -195,8 +177,8 @@ impl AppSink { pub fn connect_eos(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn eos_trampoline( - this: *mut gst_app_sys::GstAppSink, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSink, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -221,9 +203,9 @@ impl AppSink { unsafe extern "C" fn notify_buffer_list_trampoline< F: Fn(&AppSink) + Send + Sync + 'static, >( - this: *mut gst_app_sys::GstAppSink, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSink, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -246,9 +228,9 @@ impl AppSink { f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_caps_trampoline( - this: *mut gst_app_sys::GstAppSink, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSink, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -271,9 +253,9 @@ impl AppSink { f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_drop_trampoline( - this: *mut gst_app_sys::GstAppSink, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSink, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -298,9 +280,9 @@ impl AppSink { unsafe extern "C" fn notify_emit_signals_trampoline< F: Fn(&AppSink) + Send + Sync + 'static, >( - this: *mut gst_app_sys::GstAppSink, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSink, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -323,9 +305,9 @@ impl AppSink { f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_eos_trampoline( - this: *mut gst_app_sys::GstAppSink, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSink, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -350,9 +332,9 @@ impl AppSink { unsafe extern "C" fn notify_max_buffers_trampoline< F: Fn(&AppSink) + Send + Sync + 'static, >( - this: *mut gst_app_sys::GstAppSink, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSink, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -377,9 +359,9 @@ impl AppSink { unsafe extern "C" fn notify_wait_on_eos_trampoline< F: Fn(&AppSink) + Send + Sync + 'static, >( - this: *mut gst_app_sys::GstAppSink, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSink, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::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 b0bafa83a..9563857d5 100644 --- a/gstreamer-app/src/auto/app_src.rs +++ b/gstreamer-app/src/auto/app_src.rs @@ -2,76 +2,62 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +use crate::AppStreamType; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::StaticType; use glib::Value; -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; -use AppStreamType; -glib_wrapper! { - pub struct AppSrc(Object) @extends gst_base::BaseSrc, gst::Element, gst::Object, @implements gst::URIHandler; +glib::glib_wrapper! { + pub struct AppSrc(Object) @extends gst_base::BaseSrc, gst::Element, gst::Object, @implements gst::URIHandler; match fn { - get_type => || gst_app_sys::gst_app_src_get_type(), + get_type => || ffi::gst_app_src_get_type(), } } impl AppSrc { pub fn get_caps(&self) -> Option { - unsafe { from_glib_full(gst_app_sys::gst_app_src_get_caps(self.to_glib_none().0)) } + unsafe { from_glib_full(ffi::gst_app_src_get_caps(self.to_glib_none().0)) } } pub fn get_current_level_bytes(&self) -> u64 { - unsafe { gst_app_sys::gst_app_src_get_current_level_bytes(self.to_glib_none().0) } + unsafe { ffi::gst_app_src_get_current_level_bytes(self.to_glib_none().0) } } #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn get_duration(&self) -> gst::ClockTime { - unsafe { from_glib(gst_app_sys::gst_app_src_get_duration(self.to_glib_none().0)) } + unsafe { from_glib(ffi::gst_app_src_get_duration(self.to_glib_none().0)) } } pub fn get_emit_signals(&self) -> bool { - unsafe { - from_glib(gst_app_sys::gst_app_src_get_emit_signals( - self.to_glib_none().0, - )) - } + unsafe { from_glib(ffi::gst_app_src_get_emit_signals(self.to_glib_none().0)) } } pub fn get_max_bytes(&self) -> u64 { - unsafe { gst_app_sys::gst_app_src_get_max_bytes(self.to_glib_none().0) } + unsafe { ffi::gst_app_src_get_max_bytes(self.to_glib_none().0) } } pub fn get_size(&self) -> i64 { - unsafe { gst_app_sys::gst_app_src_get_size(self.to_glib_none().0) } + unsafe { ffi::gst_app_src_get_size(self.to_glib_none().0) } } pub fn get_stream_type(&self) -> AppStreamType { - unsafe { - from_glib(gst_app_sys::gst_app_src_get_stream_type( - self.to_glib_none().0, - )) - } + unsafe { from_glib(ffi::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 gst_app_sys:gst_app_src_set_callbacks() } + // unsafe { TODO: call ffi:gst_app_src_set_callbacks() } //} pub fn set_caps(&self, caps: Option<&gst::Caps>) { unsafe { - gst_app_sys::gst_app_src_set_caps(self.to_glib_none().0, caps.to_glib_none().0); + ffi::gst_app_src_set_caps(self.to_glib_none().0, caps.to_glib_none().0); } } @@ -79,39 +65,39 @@ impl AppSrc { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn set_duration(&self, duration: gst::ClockTime) { unsafe { - gst_app_sys::gst_app_src_set_duration(self.to_glib_none().0, duration.to_glib()); + ffi::gst_app_src_set_duration(self.to_glib_none().0, duration.to_glib()); } } pub fn set_emit_signals(&self, emit: bool) { unsafe { - gst_app_sys::gst_app_src_set_emit_signals(self.to_glib_none().0, emit.to_glib()); + ffi::gst_app_src_set_emit_signals(self.to_glib_none().0, emit.to_glib()); } } pub fn set_max_bytes(&self, max: u64) { unsafe { - gst_app_sys::gst_app_src_set_max_bytes(self.to_glib_none().0, max); + ffi::gst_app_src_set_max_bytes(self.to_glib_none().0, max); } } pub fn set_size(&self, size: i64) { unsafe { - gst_app_sys::gst_app_src_set_size(self.to_glib_none().0, size); + ffi::gst_app_src_set_size(self.to_glib_none().0, size); } } pub fn set_stream_type(&self, type_: AppStreamType) { unsafe { - gst_app_sys::gst_app_src_set_stream_type(self.to_glib_none().0, type_.to_glib()); + ffi::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_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"block\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -124,8 +110,8 @@ impl AppSrc { pub fn set_property_block(&self, block: bool) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"block\0".as_ptr() as *const _, Value::from(&block).to_glib_none().0, ); @@ -135,8 +121,8 @@ impl AppSrc { pub fn get_property_format(&self) -> gst::Format { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"format\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -149,8 +135,8 @@ impl AppSrc { pub fn set_property_format(&self, format: gst::Format) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"format\0".as_ptr() as *const _, Value::from(&format).to_glib_none().0, ); @@ -162,8 +148,8 @@ impl AppSrc { pub fn get_property_handle_segment_change(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"handle-segment-change\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -178,8 +164,8 @@ impl AppSrc { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] pub fn set_property_handle_segment_change(&self, handle_segment_change: bool) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"handle-segment-change\0".as_ptr() as *const _, Value::from(&handle_segment_change).to_glib_none().0, ); @@ -189,8 +175,8 @@ impl AppSrc { pub fn get_property_is_live(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"is-live\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -203,8 +189,8 @@ impl AppSrc { pub fn set_property_is_live(&self, is_live: bool) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"is-live\0".as_ptr() as *const _, Value::from(&is_live).to_glib_none().0, ); @@ -214,8 +200,8 @@ impl AppSrc { pub fn get_property_max_latency(&self) -> i64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"max-latency\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -228,8 +214,8 @@ impl AppSrc { pub fn set_property_max_latency(&self, max_latency: i64) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"max-latency\0".as_ptr() as *const _, Value::from(&max_latency).to_glib_none().0, ); @@ -239,8 +225,8 @@ impl AppSrc { pub fn get_property_min_latency(&self) -> i64 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"min-latency\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -253,8 +239,8 @@ impl AppSrc { pub fn set_property_min_latency(&self, min_latency: i64) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"min-latency\0".as_ptr() as *const _, Value::from(&min_latency).to_glib_none().0, ); @@ -264,8 +250,8 @@ impl AppSrc { pub fn get_property_min_percent(&self) -> u32 { unsafe { let mut value = Value::from_type(::static_type()); - gobject_sys::g_object_get_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_get_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"min-percent\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); @@ -278,8 +264,8 @@ impl AppSrc { pub fn set_property_min_percent(&self, min_percent: u32) { unsafe { - gobject_sys::g_object_set_property( - self.as_ptr() as *mut gobject_sys::GObject, + glib::gobject_ffi::g_object_set_property( + self.as_ptr() as *mut glib::gobject_ffi::GObject, b"min-percent\0".as_ptr() as *const _, Value::from(&min_percent).to_glib_none().0, ); @@ -291,8 +277,8 @@ impl AppSrc { f: F, ) -> SignalHandlerId { unsafe extern "C" fn enough_data_trampoline( - this: *mut gst_app_sys::GstAppSrc, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -315,9 +301,9 @@ impl AppSrc { f: F, ) -> SignalHandlerId { unsafe extern "C" fn need_data_trampoline( - this: *mut gst_app_sys::GstAppSrc, + this: *mut ffi::GstAppSrc, object: libc::c_uint, - f: glib_sys::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), object) @@ -342,10 +328,10 @@ impl AppSrc { unsafe extern "C" fn seek_data_trampoline< F: Fn(&AppSrc, u64) -> bool + Send + Sync + 'static, >( - this: *mut gst_app_sys::GstAppSrc, + this: *mut ffi::GstAppSrc, object: u64, - f: glib_sys::gpointer, - ) -> glib_sys::gboolean { + f: glib::ffi::gpointer, + ) -> glib::ffi::gboolean { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), object).to_glib() } @@ -367,9 +353,9 @@ impl AppSrc { f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_block_trampoline( - this: *mut gst_app_sys::GstAppSrc, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -392,9 +378,9 @@ impl AppSrc { f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_caps_trampoline( - this: *mut gst_app_sys::GstAppSrc, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -419,9 +405,9 @@ impl AppSrc { unsafe extern "C" fn notify_current_level_bytes_trampoline< F: Fn(&AppSrc) + Send + Sync + 'static, >( - this: *mut gst_app_sys::GstAppSrc, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -446,9 +432,9 @@ impl AppSrc { f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_duration_trampoline( - this: *mut gst_app_sys::GstAppSrc, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -473,9 +459,9 @@ impl AppSrc { unsafe extern "C" fn notify_emit_signals_trampoline< F: Fn(&AppSrc) + Send + Sync + 'static, >( - this: *mut gst_app_sys::GstAppSrc, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -498,9 +484,9 @@ impl AppSrc { f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_format_trampoline( - this: *mut gst_app_sys::GstAppSrc, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -527,9 +513,9 @@ impl AppSrc { unsafe extern "C" fn notify_handle_segment_change_trampoline< F: Fn(&AppSrc) + Send + Sync + 'static, >( - this: *mut gst_app_sys::GstAppSrc, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -552,9 +538,9 @@ impl AppSrc { f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_is_live_trampoline( - this: *mut gst_app_sys::GstAppSrc, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -577,9 +563,9 @@ impl AppSrc { f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_max_bytes_trampoline( - this: *mut gst_app_sys::GstAppSrc, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -604,9 +590,9 @@ impl AppSrc { unsafe extern "C" fn notify_max_latency_trampoline< F: Fn(&AppSrc) + Send + Sync + 'static, >( - this: *mut gst_app_sys::GstAppSrc, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -631,9 +617,9 @@ impl AppSrc { unsafe extern "C" fn notify_min_latency_trampoline< F: Fn(&AppSrc) + Send + Sync + 'static, >( - this: *mut gst_app_sys::GstAppSrc, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -658,9 +644,9 @@ impl AppSrc { unsafe extern "C" fn notify_min_percent_trampoline< F: Fn(&AppSrc) + Send + Sync + 'static, >( - this: *mut gst_app_sys::GstAppSrc, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -683,9 +669,9 @@ impl AppSrc { f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_size_trampoline( - this: *mut gst_app_sys::GstAppSrc, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) @@ -710,9 +696,9 @@ impl AppSrc { unsafe extern "C" fn notify_stream_type_trampoline< F: Fn(&AppSrc) + Send + Sync + 'static, >( - this: *mut gst_app_sys::GstAppSrc, - _param_spec: glib_sys::gpointer, - f: glib_sys::gpointer, + this: *mut ffi::GstAppSrc, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::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 68912ceb0..6737ed471 100644 --- a/gstreamer-app/src/auto/enums.rs +++ b/gstreamer-app/src/auto/enums.rs @@ -9,8 +9,6 @@ use glib::value::SetValue; use glib::value::Value; use glib::StaticType; use glib::Type; -use gobject_sys; -use gst_app_sys; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -24,21 +22,21 @@ pub enum AppStreamType { #[doc(hidden)] impl ToGlib for AppStreamType { - type GlibType = gst_app_sys::GstAppStreamType; + type GlibType = ffi::GstAppStreamType; - fn to_glib(&self) -> gst_app_sys::GstAppStreamType { + fn to_glib(&self) -> ffi::GstAppStreamType { match *self { - 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::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::__Unknown(value) => value, } } } #[doc(hidden)] -impl FromGlib for AppStreamType { - fn from_glib(value: gst_app_sys::GstAppStreamType) -> Self { +impl FromGlib for AppStreamType { + fn from_glib(value: ffi::GstAppStreamType) -> Self { skip_assert_initialized!(); match value { 0 => AppStreamType::Stream, @@ -51,7 +49,7 @@ impl FromGlib for AppStreamType { impl StaticType for AppStreamType { fn static_type() -> Type { - unsafe { from_glib(gst_app_sys::gst_app_stream_type_get_type()) } + unsafe { from_glib(ffi::gst_app_stream_type_get_type()) } } } @@ -63,12 +61,12 @@ impl<'a> FromValueOptional<'a> for AppStreamType { impl<'a> FromValue<'a> for AppStreamType { unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) + from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for AppStreamType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + glib::gobject_ffi::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 bdfc6f381..f7a42b211 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 @ 062b3d6) -from gir-files (https://github.com/gtk-rs/gir-files @ b84cead5) +Generated by gir (https://github.com/gtk-rs/gir @ 694b4b8) +from gir-files (https://github.com/gtk-rs/gir-files @ 58bda97d)