util/frame: add setters for Video::height and Video::width
This commit is contained in:
parent
d0d706ea73
commit
5ab02b8649
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user