1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use std::mem;
4
5use glib::translate::*;
6
7use crate::AudioStreamAlign;
8
9impl AudioStreamAlign {
10 #[doc(alias = "gst_audio_stream_align_process")]
11 pub fn process(
12 &mut self,
13 discont: bool,
14 timestamp: gst::ClockTime,
15 n_samples: u32,
16 ) -> (bool, gst::ClockTime, gst::ClockTime, u64) {
17 unsafe {
18 let mut out_timestamp = mem::MaybeUninit::uninit();
19 let mut out_duration = mem::MaybeUninit::uninit();
20 let mut out_sample_position = mem::MaybeUninit::uninit();
21 let ret = from_glib(ffi::gst_audio_stream_align_process(
22 self.to_glib_none_mut().0,
23 discont.into_glib(),
24 timestamp.into_glib(),
25 n_samples,
26 out_timestamp.as_mut_ptr(),
27 out_duration.as_mut_ptr(),
28 out_sample_position.as_mut_ptr(),
29 ));
30 (
31 ret,
32 try_from_glib(out_timestamp.assume_init()).expect("undefined out_timestamp"),
33 try_from_glib(out_duration.assume_init()).expect("undefined out_duration"),
34 out_sample_position.assume_init(),
35 )
36 }
37 }
38}
39