From b62e2f154da581535b1a5895e1ce9c71394d3c2c Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Sat, 26 Jan 2019 18:42:53 -0500 Subject: [PATCH] Add getters to VideColorimetry. --- gstreamer-video/src/video_info.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gstreamer-video/src/video_info.rs b/gstreamer-video/src/video_info.rs index 2e71cb53b..d42acf943 100644 --- a/gstreamer-video/src/video_info.rs +++ b/gstreamer-video/src/video_info.rs @@ -128,6 +128,22 @@ impl VideoColorimetry { } } } + + pub fn range(&self) -> ::VideoColorRange { + from_glib(self.0.range) + } + + pub fn matrix(&self) -> ::VideoColorMatrix { + from_glib(self.0.matrix) + } + + pub fn transfer(&self) -> ::VideoTransferFunction { + from_glib(self.0.transfer) + } + + pub fn primaries(&self) -> ::VideoColorPrimaries { + from_glib(self.0.primaries) + } } impl Clone for VideoColorimetry {