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 crate::ffi; |
7 | use glib::{prelude::*, translate::*}; |
8 | |
9 | #[doc (alias = "gst_type_find_helper" )] |
10 | pub fn type_find_helper(src: &impl IsA<gst::Pad>, size: u64) -> Result<gst::Caps, glib::BoolError> { |
11 | assert_initialized_main_thread!(); |
12 | unsafe { |
13 | Option::<_>::from_glib_full(ffi::gst_type_find_helper( |
14 | src.as_ref().to_glib_none().0, |
15 | size, |
16 | )) |
17 | .ok_or_else(|| glib::bool_error!("Could not find type" )) |
18 | } |
19 | } |
20 | |
21 | #[doc (alias = "gst_type_find_helper_for_extension" )] |
22 | pub fn type_find_helper_for_extension( |
23 | obj: Option<&impl IsA<gst::Object>>, |
24 | extension: &str, |
25 | ) -> Result<gst::Caps, glib::BoolError> { |
26 | assert_initialized_main_thread!(); |
27 | unsafe { |
28 | Option::<_>::from_glib_full(ffi::gst_type_find_helper_for_extension( |
29 | obj.map(|p| p.as_ref()).to_glib_none().0, |
30 | extension.to_glib_none().0, |
31 | )) |
32 | .ok_or_else(|| glib::bool_error!("Could not find type" )) |
33 | } |
34 | } |
35 | |
36 | //#[doc(alias = "gst_type_find_helper_get_range")] |
37 | //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) { |
38 | // unsafe { TODO: call ffi:gst_type_find_helper_get_range() } |
39 | //} |
40 | |
41 | //#[cfg(feature = "v1_14_3")] |
42 | //#[cfg_attr(docsrs, doc(cfg(feature = "v1_14_3")))] |
43 | //#[doc(alias = "gst_type_find_helper_get_range_full")] |
44 | //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) { |
45 | // unsafe { TODO: call ffi:gst_type_find_helper_get_range_full() } |
46 | //} |
47 | |