From 5ab02b86499fd0f1cd56cb7bb7a297bb87dce7cd Mon Sep 17 00:00:00 2001 From: meh Date: Tue, 12 May 2015 19:26:12 +0200 Subject: [PATCH] util/frame: add setters for Video::height and Video::width --- src/util/frame/mod.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/util/frame/mod.rs b/src/util/frame/mod.rs index 289c797..224529a 100644 --- a/src/util/frame/mod.rs +++ b/src/util/frame/mod.rs @@ -251,12 +251,24 @@ impl Video { } } + pub fn set_width(&mut self, value: usize) { + unsafe { + (*self.0.ptr).width = value as c_int; + } + } + pub fn height(&self) -> usize { unsafe { (*self.0.ptr).height as usize } } + pub fn set_height(&mut self, value: usize) { + unsafe { + (*self.0.ptr).height = value as c_int; + } + } + pub fn color_space(&self) -> ColorSpace { unsafe { ColorSpace::from(av_frame_get_colorspace(self.0.ptr))