// This file was generated by gir (b155303) from gir-files (???) // DO NOT EDIT use Element; #[cfg(feature = "v1_4")] use FlowReturn; use Format; use Object; use PadDirection; use PadTemplate; use ffi; use glib; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::connect; use glib::translate::*; use glib_ffi; use gobject_ffi; use libc; use std::boxed::Box as Box_; use std::mem; use std::mem::transmute; glib_wrapper! { pub struct Pad(Object): Object; match fn { get_type => || ffi::gst_pad_get_type(), } } impl Pad { pub fn new<'a, P: Into>>(name: P, direction: PadDirection) -> Pad { let name = name.into(); let name = name.to_glib_none(); unsafe { from_glib_none(ffi::gst_pad_new(name.0, direction.to_glib())) } } //pub fn new_from_static_template(templ: /*Ignored*/&mut StaticPadTemplate, name: &str) -> Pad { // unsafe { TODO: call ffi::gst_pad_new_from_static_template() } //} pub fn new_from_template<'a, P: Into>>(templ: &PadTemplate, name: P) -> Pad { let name = name.into(); let name = name.to_glib_none(); unsafe { from_glib_none(ffi::gst_pad_new_from_template(templ.to_glib_none().0, name.0)) } } //#[cfg(feature = "v1_4")] //pub fn link_get_name(ret: /*Ignored*/PadLinkReturn) -> Option { // unsafe { TODO: call ffi::gst_pad_link_get_name() } //} } pub trait PadExt { //fn activate_mode(&self, mode: /*Ignored*/PadMode, active: bool) -> bool; //fn add_probe>>(&self, mask: /*Ignored*/PadProbeType, callback: /*Unknown conversion*//*Unimplemented*/PadProbeCallback, user_data: P, destroy_data: /*Unknown conversion*//*Unimplemented*/DestroyNotify) -> libc::c_ulong; fn can_link>(&self, sinkpad: &P) -> bool; //fn chain(&self, buffer: /*Ignored*/&mut Buffer) -> FlowReturn; //fn chain_list(&self, list: /*Ignored*/&mut BufferList) -> FlowReturn; 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_printf<'a, P: IsA, Q: Into>>(&self, parent: &P, stream_id: Q, : /*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 event_default<'a, P: IsA + 'a, Q: Into>>(&self, parent: Q, event: /*Ignored*/&mut Event) -> bool; //fn forward>>(&self, forward: /*Unknown conversion*//*Unimplemented*/PadForwardFunction, user_data: P) -> bool; //fn get_allowed_caps(&self) -> /*Ignored*/Option; //fn get_current_caps(&self) -> /*Ignored*/Option; fn get_direction(&self) -> PadDirection; //fn get_element_private(&self) -> /*Unimplemented*/Option; #[cfg(feature = "v1_4")] fn get_last_flow_return(&self) -> FlowReturn; fn get_offset(&self) -> i64; fn get_pad_template(&self) -> Option; //fn get_pad_template_caps(&self) -> /*Ignored*/Option; fn get_parent_element(&self) -> Option; fn get_peer(&self) -> Option; //fn get_range(&self, offset: u64, size: u32, buffer: /*Ignored*/Buffer) -> FlowReturn; //fn get_sticky_event(&self, event_type: /*Ignored*/EventType, idx: u32) -> /*Ignored*/Option; //#[cfg(feature = "v1_10")] //fn get_stream(&self) -> /*Ignored*/Option; #[cfg(feature = "v1_2")] fn get_stream_id(&self) -> Option; //#[cfg(feature = "v1_12")] //fn get_task_state(&self) -> /*Ignored*/TaskState; fn has_current_caps(&self) -> bool; fn is_active(&self) -> bool; fn is_blocked(&self) -> bool; fn is_blocking(&self) -> bool; fn is_linked(&self) -> bool; //fn iterate_internal_links(&self) -> /*Ignored*/Option; //fn iterate_internal_links_default<'a, P: IsA + 'a, Q: Into>>(&self, parent: Q) -> /*Ignored*/Option; //fn link>(&self, sinkpad: &P) -> /*Ignored*/PadLinkReturn; //fn link_full>(&self, sinkpad: &P, flags: /*Ignored*/PadLinkCheck) -> /*Ignored*/PadLinkReturn; #[cfg(feature = "v1_10")] fn link_maybe_ghosting>(&self, sink: &P) -> Result<(), glib::error::BoolError>; //#[cfg(feature = "v1_10")] //fn link_maybe_ghosting_full>(&self, sink: &P, flags: /*Ignored*/PadLinkCheck) -> bool; fn mark_reconfigure(&self); fn needs_reconfigure(&self) -> bool; fn pause_task(&self) -> Result<(), glib::error::BoolError>; //fn peer_query(&self, query: /*Ignored*/&mut Query) -> bool; //fn peer_query_accept_caps(&self, caps: /*Ignored*/&mut Caps) -> bool; //fn peer_query_caps<'a, P: Into>>(&self, filter: P) -> /*Ignored*/Option; fn peer_query_convert(&self, src_format: Format, src_val: i64, dest_format: Format) -> Option; fn peer_query_duration(&self, format: Format) -> Option; fn peer_query_position(&self, format: Format) -> Option; //fn proxy_query_accept_caps(&self, query: /*Ignored*/&mut Query) -> bool; //fn proxy_query_caps(&self, query: /*Ignored*/&mut Query) -> bool; //fn pull_range(&self, offset: u64, size: u32, buffer: /*Ignored*/Buffer) -> FlowReturn; //fn push(&self, buffer: /*Ignored*/&mut Buffer) -> FlowReturn; //fn push_event(&self, event: /*Ignored*/&mut Event) -> bool; //fn push_list(&self, list: /*Ignored*/&mut BufferList) -> FlowReturn; //fn query(&self, query: /*Ignored*/&mut Query) -> bool; //fn query_accept_caps(&self, caps: /*Ignored*/&mut Caps) -> bool; //fn query_caps<'a, P: Into>>(&self, filter: P) -> /*Ignored*/Option; fn query_convert(&self, src_format: Format, src_val: i64, dest_format: Format) -> Option; //fn query_default<'a, P: IsA + 'a, Q: Into>>(&self, parent: Q, query: /*Ignored*/&mut Query) -> bool; fn query_duration(&self, format: Format) -> Option; fn query_position(&self, format: Format) -> Option; fn remove_probe(&self, id: libc::c_ulong); //fn send_event(&self, event: /*Ignored*/&mut Event) -> bool; //fn set_activate_function_full>>(&self, activate: /*Unknown conversion*//*Unimplemented*/PadActivateFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); //fn set_activatemode_function_full>>(&self, activatemode: /*Unknown conversion*//*Unimplemented*/PadActivateModeFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError>; //fn set_chain_function_full>>(&self, chain: /*Unknown conversion*//*Unimplemented*/PadChainFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); //fn set_chain_list_function_full>>(&self, chainlist: /*Unknown conversion*//*Unimplemented*/PadChainListFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); //fn set_element_private>>(&self, priv_: P); //#[cfg(feature = "v1_8")] //fn set_event_full_function_full>>(&self, event: /*Unknown conversion*//*Unimplemented*/PadEventFullFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); //fn set_event_function_full>>(&self, event: /*Unknown conversion*//*Unimplemented*/PadEventFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); //fn set_getrange_function_full>>(&self, get: /*Unknown conversion*//*Unimplemented*/PadGetRangeFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); //fn set_iterate_internal_links_function_full>>(&self, iterintlink: /*Unknown conversion*//*Unimplemented*/PadIterIntLinkFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); //fn set_link_function_full>>(&self, link: /*Unknown conversion*//*Unimplemented*/PadLinkFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); fn set_offset(&self, offset: i64); //fn set_query_function_full>>(&self, query: /*Unknown conversion*//*Unimplemented*/PadQueryFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); //fn set_unlink_function_full>>(&self, unlink: /*Unknown conversion*//*Unimplemented*/PadUnlinkFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify); //fn start_task>>(&self, func: /*Unknown conversion*//*Unimplemented*/TaskFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) -> bool; //fn sticky_events_foreach>>(&self, foreach_func: /*Unknown conversion*//*Unimplemented*/PadStickyEventsForeachFunction, user_data: P); fn stop_task(&self) -> Result<(), glib::error::BoolError>; //#[cfg(feature = "v1_2")] //fn store_sticky_event(&self, event: /*Ignored*/&mut Event) -> FlowReturn; fn unlink>(&self, sinkpad: &P) -> Result<(), glib::error::BoolError>; fn use_fixed_caps(&self); //fn get_property_caps(&self) -> /*Ignored*/Option; fn get_property_template(&self) -> Option; fn set_property_template(&self, template: Option<&PadTemplate>); fn connect_linked(&self, f: F) -> u64; fn connect_unlinked(&self, f: F) -> u64; } impl + IsA> PadExt for O { //fn activate_mode(&self, mode: /*Ignored*/PadMode, active: bool) -> bool { // unsafe { TODO: call ffi::gst_pad_activate_mode() } //} //fn add_probe>>(&self, mask: /*Ignored*/PadProbeType, callback: /*Unknown conversion*//*Unimplemented*/PadProbeCallback, user_data: P, destroy_data: /*Unknown conversion*//*Unimplemented*/DestroyNotify) -> libc::c_ulong { // unsafe { TODO: call ffi::gst_pad_add_probe() } //} fn can_link>(&self, sinkpad: &P) -> bool { unsafe { from_glib(ffi::gst_pad_can_link(self.to_glib_none().0, sinkpad.to_glib_none().0)) } } //fn chain(&self, buffer: /*Ignored*/&mut Buffer) -> FlowReturn { // unsafe { TODO: call ffi::gst_pad_chain() } //} //fn chain_list(&self, list: /*Ignored*/&mut BufferList) -> FlowReturn { // unsafe { TODO: call ffi::gst_pad_chain_list() } //} fn check_reconfigure(&self) -> bool { unsafe { from_glib(ffi::gst_pad_check_reconfigure(self.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(); let stream_id = stream_id.to_glib_none(); unsafe { from_glib_full(ffi::gst_pad_create_stream_id(self.to_glib_none().0, parent.to_glib_none().0, stream_id.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_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 event_default<'a, P: IsA + 'a, Q: Into>>(&self, parent: Q, event: /*Ignored*/&mut Event) -> bool { // unsafe { TODO: call ffi::gst_pad_event_default() } //} //fn forward>>(&self, forward: /*Unknown conversion*//*Unimplemented*/PadForwardFunction, user_data: P) -> bool { // unsafe { TODO: call ffi::gst_pad_forward() } //} //fn get_allowed_caps(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi::gst_pad_get_allowed_caps() } //} //fn get_current_caps(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi::gst_pad_get_current_caps() } //} fn get_direction(&self) -> PadDirection { unsafe { from_glib(ffi::gst_pad_get_direction(self.to_glib_none().0)) } } //fn get_element_private(&self) -> /*Unimplemented*/Option { // unsafe { TODO: call ffi::gst_pad_get_element_private() } //} #[cfg(feature = "v1_4")] fn get_last_flow_return(&self) -> FlowReturn { unsafe { from_glib(ffi::gst_pad_get_last_flow_return(self.to_glib_none().0)) } } fn get_offset(&self) -> i64 { unsafe { ffi::gst_pad_get_offset(self.to_glib_none().0) } } fn get_pad_template(&self) -> Option { unsafe { from_glib_full(ffi::gst_pad_get_pad_template(self.to_glib_none().0)) } } //fn get_pad_template_caps(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi::gst_pad_get_pad_template_caps() } //} fn get_parent_element(&self) -> Option { unsafe { from_glib_full(ffi::gst_pad_get_parent_element(self.to_glib_none().0)) } } fn get_peer(&self) -> Option { unsafe { from_glib_full(ffi::gst_pad_get_peer(self.to_glib_none().0)) } } //fn get_range(&self, offset: u64, size: u32, buffer: /*Ignored*/Buffer) -> FlowReturn { // unsafe { TODO: call ffi::gst_pad_get_range() } //} //fn get_sticky_event(&self, event_type: /*Ignored*/EventType, idx: u32) -> /*Ignored*/Option { // unsafe { TODO: call ffi::gst_pad_get_sticky_event() } //} //#[cfg(feature = "v1_10")] //fn get_stream(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi::gst_pad_get_stream() } //} #[cfg(feature = "v1_2")] fn get_stream_id(&self) -> Option { unsafe { from_glib_full(ffi::gst_pad_get_stream_id(self.to_glib_none().0)) } } //#[cfg(feature = "v1_12")] //fn get_task_state(&self) -> /*Ignored*/TaskState { // unsafe { TODO: call ffi::gst_pad_get_task_state() } //} fn has_current_caps(&self) -> bool { unsafe { from_glib(ffi::gst_pad_has_current_caps(self.to_glib_none().0)) } } fn is_active(&self) -> bool { unsafe { from_glib(ffi::gst_pad_is_active(self.to_glib_none().0)) } } fn is_blocked(&self) -> bool { unsafe { from_glib(ffi::gst_pad_is_blocked(self.to_glib_none().0)) } } fn is_blocking(&self) -> bool { unsafe { from_glib(ffi::gst_pad_is_blocking(self.to_glib_none().0)) } } fn is_linked(&self) -> bool { unsafe { from_glib(ffi::gst_pad_is_linked(self.to_glib_none().0)) } } //fn iterate_internal_links(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi::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 link>(&self, sinkpad: &P) -> /*Ignored*/PadLinkReturn { // unsafe { TODO: call ffi::gst_pad_link() } //} //fn link_full>(&self, sinkpad: &P, flags: /*Ignored*/PadLinkCheck) -> /*Ignored*/PadLinkReturn { // unsafe { TODO: call ffi::gst_pad_link_full() } //} #[cfg(feature = "v1_10")] fn link_maybe_ghosting>(&self, sink: &P) -> Result<(), glib::error::BoolError> { unsafe { glib::error::BoolError::from_glib(ffi::gst_pad_link_maybe_ghosting(self.to_glib_none().0, sink.to_glib_none().0), "Failed to link pad, possibly ghosting") } } //#[cfg(feature = "v1_10")] //fn link_maybe_ghosting_full>(&self, sink: &P, flags: /*Ignored*/PadLinkCheck) -> bool { // unsafe { TODO: call ffi::gst_pad_link_maybe_ghosting_full() } //} fn mark_reconfigure(&self) { unsafe { ffi::gst_pad_mark_reconfigure(self.to_glib_none().0); } } fn needs_reconfigure(&self) -> bool { unsafe { from_glib(ffi::gst_pad_needs_reconfigure(self.to_glib_none().0)) } } fn pause_task(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::error::BoolError::from_glib(ffi::gst_pad_pause_task(self.to_glib_none().0), "Failed to pause pad task") } } //fn peer_query(&self, query: /*Ignored*/&mut Query) -> bool { // unsafe { TODO: call ffi::gst_pad_peer_query() } //} //fn peer_query_accept_caps(&self, caps: /*Ignored*/&mut Caps) -> bool { // unsafe { TODO: call ffi::gst_pad_peer_query_accept_caps() } //} //fn peer_query_caps<'a, P: Into>>(&self, filter: P) -> /*Ignored*/Option { // unsafe { TODO: call ffi::gst_pad_peer_query_caps() } //} fn peer_query_convert(&self, src_format: Format, src_val: i64, dest_format: Format) -> Option { unsafe { let mut dest_val = mem::uninitialized(); let ret = from_glib(ffi::gst_pad_peer_query_convert(self.to_glib_none().0, src_format.to_glib(), src_val, dest_format.to_glib(), &mut dest_val)); if ret { Some(dest_val) } else { None } } } fn peer_query_duration(&self, format: Format) -> Option { unsafe { let mut duration = mem::uninitialized(); let ret = from_glib(ffi::gst_pad_peer_query_duration(self.to_glib_none().0, format.to_glib(), &mut duration)); if ret { Some(duration) } else { None } } } fn peer_query_position(&self, format: Format) -> Option { unsafe { let mut cur = mem::uninitialized(); let ret = from_glib(ffi::gst_pad_peer_query_position(self.to_glib_none().0, format.to_glib(), &mut cur)); if ret { Some(cur) } else { None } } } //fn proxy_query_accept_caps(&self, query: /*Ignored*/&mut Query) -> bool { // unsafe { TODO: call ffi::gst_pad_proxy_query_accept_caps() } //} //fn proxy_query_caps(&self, query: /*Ignored*/&mut Query) -> bool { // unsafe { TODO: call ffi::gst_pad_proxy_query_caps() } //} //fn pull_range(&self, offset: u64, size: u32, buffer: /*Ignored*/Buffer) -> FlowReturn { // unsafe { TODO: call ffi::gst_pad_pull_range() } //} //fn push(&self, buffer: /*Ignored*/&mut Buffer) -> FlowReturn { // unsafe { TODO: call ffi::gst_pad_push() } //} //fn push_event(&self, event: /*Ignored*/&mut Event) -> bool { // unsafe { TODO: call ffi::gst_pad_push_event() } //} //fn push_list(&self, list: /*Ignored*/&mut BufferList) -> FlowReturn { // unsafe { TODO: call ffi::gst_pad_push_list() } //} //fn query(&self, query: /*Ignored*/&mut Query) -> bool { // unsafe { TODO: call ffi::gst_pad_query() } //} //fn query_accept_caps(&self, caps: /*Ignored*/&mut Caps) -> bool { // unsafe { TODO: call ffi::gst_pad_query_accept_caps() } //} //fn query_caps<'a, P: Into>>(&self, filter: P) -> /*Ignored*/Option { // unsafe { TODO: call ffi::gst_pad_query_caps() } //} fn query_convert(&self, src_format: Format, src_val: i64, dest_format: Format) -> Option { unsafe { let mut dest_val = mem::uninitialized(); let ret = from_glib(ffi::gst_pad_query_convert(self.to_glib_none().0, src_format.to_glib(), src_val, dest_format.to_glib(), &mut dest_val)); if ret { Some(dest_val) } else { None } } } //fn query_default<'a, P: IsA + 'a, Q: Into>>(&self, parent: Q, query: /*Ignored*/&mut Query) -> bool { // unsafe { TODO: call ffi::gst_pad_query_default() } //} fn query_duration(&self, format: Format) -> Option { unsafe { let mut duration = mem::uninitialized(); let ret = from_glib(ffi::gst_pad_query_duration(self.to_glib_none().0, format.to_glib(), &mut duration)); if ret { Some(duration) } else { None } } } fn query_position(&self, format: Format) -> Option { unsafe { let mut cur = mem::uninitialized(); let ret = from_glib(ffi::gst_pad_query_position(self.to_glib_none().0, format.to_glib(), &mut cur)); if ret { Some(cur) } else { None } } } fn remove_probe(&self, id: libc::c_ulong) { unsafe { ffi::gst_pad_remove_probe(self.to_glib_none().0, id); } } //fn send_event(&self, event: /*Ignored*/&mut Event) -> bool { // unsafe { TODO: call ffi::gst_pad_send_event() } //} //fn set_activate_function_full>>(&self, activate: /*Unknown conversion*//*Unimplemented*/PadActivateFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { // unsafe { TODO: call ffi::gst_pad_set_activate_function_full() } //} //fn set_activatemode_function_full>>(&self, activatemode: /*Unknown conversion*//*Unimplemented*/PadActivateModeFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { // unsafe { TODO: call ffi::gst_pad_set_activatemode_function_full() } //} fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> { unsafe { glib::error::BoolError::from_glib(ffi::gst_pad_set_active(self.to_glib_none().0, active.to_glib()), "Failed to activate pad") } } //fn set_chain_function_full>>(&self, chain: /*Unknown conversion*//*Unimplemented*/PadChainFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { // unsafe { TODO: call ffi::gst_pad_set_chain_function_full() } //} //fn set_chain_list_function_full>>(&self, chainlist: /*Unknown conversion*//*Unimplemented*/PadChainListFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { // unsafe { TODO: call ffi::gst_pad_set_chain_list_function_full() } //} //fn set_element_private>>(&self, priv_: P) { // unsafe { TODO: call ffi::gst_pad_set_element_private() } //} //#[cfg(feature = "v1_8")] //fn set_event_full_function_full>>(&self, event: /*Unknown conversion*//*Unimplemented*/PadEventFullFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { // unsafe { TODO: call ffi::gst_pad_set_event_full_function_full() } //} //fn set_event_function_full>>(&self, event: /*Unknown conversion*//*Unimplemented*/PadEventFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { // unsafe { TODO: call ffi::gst_pad_set_event_function_full() } //} //fn set_getrange_function_full>>(&self, get: /*Unknown conversion*//*Unimplemented*/PadGetRangeFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { // unsafe { TODO: call ffi::gst_pad_set_getrange_function_full() } //} //fn set_iterate_internal_links_function_full>>(&self, iterintlink: /*Unknown conversion*//*Unimplemented*/PadIterIntLinkFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { // unsafe { TODO: call ffi::gst_pad_set_iterate_internal_links_function_full() } //} //fn set_link_function_full>>(&self, link: /*Unknown conversion*//*Unimplemented*/PadLinkFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { // unsafe { TODO: call ffi::gst_pad_set_link_function_full() } //} fn set_offset(&self, offset: i64) { unsafe { ffi::gst_pad_set_offset(self.to_glib_none().0, offset); } } //fn set_query_function_full>>(&self, query: /*Unknown conversion*//*Unimplemented*/PadQueryFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { // unsafe { TODO: call ffi::gst_pad_set_query_function_full() } //} //fn set_unlink_function_full>>(&self, unlink: /*Unknown conversion*//*Unimplemented*/PadUnlinkFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) { // unsafe { TODO: call ffi::gst_pad_set_unlink_function_full() } //} //fn start_task>>(&self, func: /*Unknown conversion*//*Unimplemented*/TaskFunction, user_data: P, notify: /*Unknown conversion*//*Unimplemented*/DestroyNotify) -> bool { // unsafe { TODO: call ffi::gst_pad_start_task() } //} //fn sticky_events_foreach>>(&self, foreach_func: /*Unknown conversion*//*Unimplemented*/PadStickyEventsForeachFunction, user_data: P) { // unsafe { TODO: call ffi::gst_pad_sticky_events_foreach() } //} fn stop_task(&self) -> Result<(), glib::error::BoolError> { unsafe { glib::error::BoolError::from_glib(ffi::gst_pad_stop_task(self.to_glib_none().0), "Failed to stop pad task") } } //#[cfg(feature = "v1_2")] //fn store_sticky_event(&self, event: /*Ignored*/&mut Event) -> FlowReturn { // unsafe { TODO: call ffi::gst_pad_store_sticky_event() } //} fn unlink>(&self, sinkpad: &P) -> Result<(), glib::error::BoolError> { unsafe { glib::error::BoolError::from_glib(ffi::gst_pad_unlink(self.to_glib_none().0, sinkpad.to_glib_none().0), "Failed to unlink pad") } } fn use_fixed_caps(&self) { unsafe { ffi::gst_pad_use_fixed_caps(self.to_glib_none().0); } } //fn get_property_caps(&self) -> /*Ignored*/Option { // let mut value = Value::from(None::<&/*Ignored*/Caps>); // unsafe { // gobject_ffi::g_object_get_property(self.to_glib_none().0, "caps".to_glib_none().0, value.to_glib_none_mut().0); // } // value.get() //} fn get_property_template(&self) -> Option { let mut value = Value::from(None::<&PadTemplate>); unsafe { gobject_ffi::g_object_get_property(self.to_glib_none().0, "template".to_glib_none().0, 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, "template".to_glib_none().0, Value::from(template).to_glib_none().0); } } fn connect_linked(&self, f: F) -> u64 { unsafe { let f: Box_> = Box_::new(Box_::new(f)); connect(self.to_glib_none().0, "linked", transmute(linked_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } fn connect_unlinked(&self, f: F) -> u64 { unsafe { let f: Box_> = Box_::new(Box_::new(f)); connect(self.to_glib_none().0, "unlinked", transmute(unlinked_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } } unsafe extern "C" fn linked_trampoline

(this: *mut ffi::GstPad, peer: *mut ffi::GstPad, f: glib_ffi::gpointer) where P: IsA { callback_guard!(); let f: &Box_ = transmute(f); f(&Pad::from_glib_none(this).downcast_unchecked(), &from_glib_none(peer)) } unsafe extern "C" fn unlinked_trampoline

(this: *mut ffi::GstPad, peer: *mut ffi::GstPad, f: glib_ffi::gpointer) where P: IsA { callback_guard!(); let f: &Box_ = transmute(f); f(&Pad::from_glib_none(this).downcast_unchecked(), &from_glib_none(peer)) }