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 ::{Dictionary, ColorSpace, ColorRange};
|
||||||
use ::util::pixel_format::PixelFormat;
|
use ::util::pixel_format::PixelFormat;
|
||||||
use ::util::sample_format::SampleFormat;
|
use ::util::sample_format::SampleFormat;
|
||||||
|
use ::picture;
|
||||||
|
|
||||||
pub struct Packet {
|
pub struct Packet {
|
||||||
pub duration: isize,
|
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 {
|
pub fn width(&self) -> usize {
|
||||||
unsafe {
|
unsafe {
|
||||||
(*self.0.ptr).width as usize
|
(*self.0.ptr).width as usize
|
||||||
|
Loading…
x
Reference in New Issue
Block a user