From faa1311fcdb13b9b3aafa40d37db3996bd9ee8b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 15 Mar 2022 15:31:31 +0200 Subject: [PATCH] video: Add `VideoFormatInfo::has_subtiles()` --- gstreamer-video/src/video_format_info.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gstreamer-video/src/video_format_info.rs b/gstreamer-video/src/video_format_info.rs index cc7bb26ce..997337d53 100644 --- a/gstreamer-video/src/video_format_info.rs +++ b/gstreamer-video/src/video_format_info.rs @@ -107,6 +107,12 @@ impl VideoFormatInfo { self.0.flags & ffi::GST_VIDEO_FORMAT_FLAG_PALETTE != 0 } + #[cfg(any(feature = "v1_22", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] + pub fn has_subtiles(&self) -> bool { + self.0.flags & ffi::GST_VIDEO_FORMAT_FLAG_SUBTILES != 0 + } + pub fn is_complex(&self) -> bool { self.0.flags & ffi::GST_VIDEO_FORMAT_FLAG_COMPLEX != 0 }