1 | // This file was generated by gir (https://github.com/gtk-rs/gir) |
2 | // from gir-files (https://github.com/gtk-rs/gir-files) |
3 | // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) |
4 | // DO NOT EDIT |
5 | |
6 | use glib::{prelude::*, translate::*}; |
7 | |
8 | #[doc (alias = "gst_type_find_helper" )] |
9 | pub fn type_find_helper(src: &impl IsA<gst::Pad>, size: u64) -> Result<gst::Caps, glib::BoolError> { |
10 | assert_initialized_main_thread!(); |
11 | unsafe { |
12 | Option::<_>::from_glib_full(ffi::gst_type_find_helper( |
13 | src.as_ref().to_glib_none().0, |
14 | size, |
15 | )) |
16 | .ok_or_else(|| glib::bool_error!("Could not find type" )) |
17 | } |
18 | } |
19 | |
20 | #[doc (alias = "gst_type_find_helper_for_extension" )] |
21 | pub fn type_find_helper_for_extension( |
22 | obj: Option<&impl IsA<gst::Object>>, |
23 | extension: &str, |
24 | ) -> Result<gst::Caps, glib::BoolError> { |
25 | assert_initialized_main_thread!(); |
26 | unsafe { |
27 | Option::<_>::from_glib_full(ffi::gst_type_find_helper_for_extension( |
28 | obj.map(|p| p.as_ref()).to_glib_none().0, |
29 | extension.to_glib_none().0, |
30 | )) |
31 | .ok_or_else(|| glib::bool_error!("Could not find type" )) |
32 | } |
33 | } |
34 | |
35 | //#[doc(alias = "gst_type_find_helper_get_range")] |
36 | //pub fn type_find_helper_get_range<P: FnMut(&gst::Object, Option<&gst::Object>, u64, u32) -> Result<gst::FlowSuccess, gst::FlowError>>(obj: &impl IsA<gst::Object>, parent: Option<&impl IsA<gst::Object>>, func: P, size: u64, extension: Option<&str>) -> (Option<gst::Caps>, gst::TypeFindProbability) { |
37 | // unsafe { TODO: call ffi:gst_type_find_helper_get_range() } |
38 | //} |
39 | |
40 | //#[cfg(feature = "v1_14_3")] |
41 | //#[cfg_attr(docsrs, doc(cfg(feature = "v1_14_3")))] |
42 | //#[doc(alias = "gst_type_find_helper_get_range_full")] |
43 | //pub fn type_find_helper_get_range_full<P: FnMut(&gst::Object, Option<&gst::Object>, u64, u32) -> Result<gst::FlowSuccess, gst::FlowError>>(obj: &impl IsA<gst::Object>, parent: Option<&impl IsA<gst::Object>>, func: P, size: u64, extension: Option<&str>) -> (Result<gst::FlowSuccess, gst::FlowError>, gst::Caps, gst::TypeFindProbability) { |
44 | // unsafe { TODO: call ffi:gst_type_find_helper_get_range_full() } |
45 | //} |
46 | |