video: Add VideoFormatInfo::extrapolate_stride()

This commit is contained in:
Sebastian Dröge 2022-03-15 15:34:30 +02:00
parent faa1311fcd
commit 3fbe37a2ec

View file

@ -311,6 +311,19 @@ impl VideoFormatInfo {
}
(offset, scale)
}
#[cfg(any(feature = "v1_22", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))]
#[doc(alias = "gst_video_format_info_extrapolate_stride")]
pub fn extrapolate_stride(&self, plane: u32, stride: u32) -> u32 {
unsafe {
ffi::gst_video_format_info_extrapolate_stride(
self.to_glib_none().0,
plane as i32,
stride as i32,
) as u32
}
}
}
unsafe impl Sync for VideoFormatInfo {}