util/frame: add Video::kind

This commit is contained in:
meh 2015-05-12 19:26:28 +02:00
parent 5ab02b8649
commit 37cbaa5660

View File

@ -10,6 +10,7 @@ use ffi::*;
use ::{Dictionary, ColorSpace, ColorRange};
use ::util::pixel_format::PixelFormat;
use ::util::sample_format::SampleFormat;
use ::picture;
pub struct Packet {
pub duration: isize,
@ -245,6 +246,12 @@ impl Video {
}
}
pub fn kind(&self) -> picture::Type {
unsafe {
picture::Type::from((*self.ptr).pict_type)
}
}
pub fn width(&self) -> usize {
unsafe {
(*self.0.ptr).width as usize