// 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 crate::ClockTime; use crate::Object; use glib::object::IsA; use glib::translate::*; use std::mem; glib::wrapper! { pub struct ControlSource(Object) @extends Object; match fn { get_type => || ffi::gst_control_source_get_type(), } } unsafe impl Send for ControlSource {} unsafe impl Sync for ControlSource {} pub const NONE_CONTROL_SOURCE: Option<&ControlSource> = None; pub trait ControlSourceExt: 'static { #[doc(alias = "gst_control_source_get_value")] fn get_value(&self, timestamp: ClockTime) -> Option; } impl> ControlSourceExt for O { fn get_value(&self, timestamp: ClockTime) -> Option { unsafe { let mut value = mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gst_control_source_get_value( self.as_ref().to_glib_none().0, timestamp.to_glib(), value.as_mut_ptr(), )); let value = value.assume_init(); if ret { Some(value) } else { None } } } }