util/frame: add Video::kind
This commit is contained in:
parent
5ab02b8649
commit
37cbaa5660
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user