// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use DiscovererInfo; use ffi; use glib; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect; use glib::translate::*; use glib_ffi; use gobject_ffi; use gst; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; use std::ptr; glib_wrapper! { pub struct EncodingProfile(Object); match fn { get_type => || ffi::gst_encoding_profile_get_type(), } } impl EncodingProfile { pub fn find<'a, 'b, P: Into>, Q: Into>>(targetname: &str, profilename: P, category: Q) -> Option { assert_initialized_main_thread!(); let profilename = profilename.into(); let profilename = profilename.to_glib_none(); let category = category.into(); let category = category.to_glib_none(); unsafe { from_glib_full(ffi::gst_encoding_profile_find(targetname.to_glib_none().0, profilename.0, category.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)) } } } unsafe impl Send for EncodingProfile {} unsafe impl Sync for EncodingProfile {} pub trait EncodingProfileExt { fn copy(&self) -> EncodingProfile; fn get_allow_dynamic_output(&self) -> bool; fn get_description(&self) -> Option; fn get_file_extension(&self) -> Option; fn get_format(&self) -> gst::Caps; fn get_input_caps(&self) -> gst::Caps; fn get_name(&self) -> Option; fn get_presence(&self) -> u32; fn get_preset(&self) -> Option; fn get_preset_name(&self) -> Option; fn get_restriction(&self) -> Option; fn get_type_nick(&self) -> Option; fn is_enabled(&self) -> bool; fn get_property_restriction_caps(&self) -> Option; fn set_property_restriction_caps(&self, restriction_caps: Option<&gst::Caps>); fn connect_property_restriction_caps_notify(&self, f: F) -> SignalHandlerId; } impl + IsA> EncodingProfileExt for O { fn copy(&self) -> EncodingProfile { unsafe { from_glib_full(ffi::gst_encoding_profile_copy(self.to_glib_none().0)) } } fn get_allow_dynamic_output(&self) -> bool { unsafe { from_glib(ffi::gst_encoding_profile_get_allow_dynamic_output(self.to_glib_none().0)) } } fn get_description(&self) -> Option { unsafe { from_glib_none(ffi::gst_encoding_profile_get_description(self.to_glib_none().0)) } } fn get_file_extension(&self) -> Option { unsafe { from_glib_none(ffi::gst_encoding_profile_get_file_extension(self.to_glib_none().0)) } } fn get_format(&self) -> gst::Caps { unsafe { from_glib_full(ffi::gst_encoding_profile_get_format(self.to_glib_none().0)) } } fn get_input_caps(&self) -> gst::Caps { unsafe { from_glib_full(ffi::gst_encoding_profile_get_input_caps(self.to_glib_none().0)) } } fn get_name(&self) -> Option { unsafe { from_glib_none(ffi::gst_encoding_profile_get_name(self.to_glib_none().0)) } } fn get_presence(&self) -> u32 { unsafe { ffi::gst_encoding_profile_get_presence(self.to_glib_none().0) } } fn get_preset(&self) -> Option { unsafe { from_glib_none(ffi::gst_encoding_profile_get_preset(self.to_glib_none().0)) } } fn get_preset_name(&self) -> Option { unsafe { from_glib_none(ffi::gst_encoding_profile_get_preset_name(self.to_glib_none().0)) } } fn get_restriction(&self) -> Option { unsafe { from_glib_full(ffi::gst_encoding_profile_get_restriction(self.to_glib_none().0)) } } fn get_type_nick(&self) -> Option { unsafe { from_glib_none(ffi::gst_encoding_profile_get_type_nick(self.to_glib_none().0)) } } fn is_enabled(&self) -> bool { unsafe { from_glib(ffi::gst_encoding_profile_is_enabled(self.to_glib_none().0)) } } 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, "restriction-caps".to_glib_none().0, value.to_glib_none_mut().0); value.get() } } fn set_property_restriction_caps(&self, restriction_caps: Option<&gst::Caps>) { unsafe { gobject_ffi::g_object_set_property(self.to_glib_none().0, "restriction-caps".to_glib_none().0, Value::from(restriction_caps).to_glib_none().0); } } fn connect_property_restriction_caps_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); connect(self.to_glib_none().0, "notify::restriction-caps", transmute(notify_restriction_caps_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } } unsafe extern "C" fn notify_restriction_caps_trampoline

(this: *mut ffi::GstEncodingProfile, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&EncodingProfile::from_glib_borrow(this).downcast_unchecked()) }