gstreamer-rs/gstreamer-base/src/auto/functions.rs

46 lines
2.1 KiB
Rust
Raw Normal View History

2018-04-23 17:34:22 +00:00
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
2017-12-18 08:05:42 +00:00
// DO NOT EDIT
use glib::{prelude::*, translate::*};
2017-12-18 08:05:42 +00:00
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_type_find_helper")]
pub fn type_find_helper(src: &impl IsA<gst::Pad>, size: u64) -> Result<gst::Caps, glib::BoolError> {
2017-12-18 08:05:42 +00:00
assert_initialized_main_thread!();
unsafe {
2020-11-21 17:59:12 +00:00
Option::<_>::from_glib_full(ffi::gst_type_find_helper(
src.as_ref().to_glib_none().0,
size,
))
2020-12-17 22:34:53 +00:00
.ok_or_else(|| glib::bool_error!("Could not find type"))
2017-12-18 08:05:42 +00:00
}
}
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_type_find_helper_for_extension")]
pub fn type_find_helper_for_extension(
obj: Option<&impl IsA<gst::Object>>,
extension: &str,
) -> Result<gst::Caps, glib::BoolError> {
2017-12-18 08:05:42 +00:00
assert_initialized_main_thread!();
unsafe {
2020-11-21 17:59:12 +00:00
Option::<_>::from_glib_full(ffi::gst_type_find_helper_for_extension(
obj.map(|p| p.as_ref()).to_glib_none().0,
extension.to_glib_none().0,
))
2020-12-17 22:34:53 +00:00
.ok_or_else(|| glib::bool_error!("Could not find type"))
2017-12-18 08:05:42 +00:00
}
}
2020-12-08 13:00:17 +00:00
//#[doc(alias = "gst_type_find_helper_get_range")]
//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) {
2020-11-21 17:59:12 +00:00
// unsafe { TODO: call ffi:gst_type_find_helper_get_range() }
2017-12-18 08:05:42 +00:00
//}
//#[cfg(feature = "v1_14_3")]
//#[cfg_attr(docsrs, doc(cfg(feature = "v1_14_3")))]
2020-12-08 13:00:17 +00:00
//#[doc(alias = "gst_type_find_helper_get_range_full")]
//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) {
2020-11-21 17:59:12 +00:00
// unsafe { TODO: call ffi:gst_type_find_helper_get_range_full() }
//}