1 | // Take a look at the license at the top of the repository in the LICENSE file. |
2 | |
3 | use std::mem; |
4 | |
5 | use glib::translate::IntoGlib; |
6 | |
7 | impl crate::VideoColorMatrix { |
8 | #[doc (alias = "get_kr_kb" )] |
9 | pub fn kr_kb(&self) -> Result<(f64, f64), glib::BoolError> { |
10 | assert_initialized_main_thread!(); |
11 | unsafe { |
12 | let mut kr: MaybeUninit = mem::MaybeUninit::uninit(); |
13 | let mut kb: MaybeUninit = mem::MaybeUninit::uninit(); |
14 | glib::result_from_gboolean!( |
15 | ffi::gst_video_color_matrix_get_Kr_Kb( |
16 | self.into_glib(), |
17 | kr.as_mut_ptr(), |
18 | kb.as_mut_ptr(), |
19 | ), |
20 | " {:?} is not a YUV matrix" , |
21 | self |
22 | )?; |
23 | let kr: f64 = kr.assume_init(); |
24 | let kb: f64 = kb.assume_init(); |
25 | Ok((kr, kb)) |
26 | } |
27 | } |
28 | } |
29 | |