format/output: add flags() method

This commit is contained in:
lummax 2015-09-14 08:27:24 +02:00 committed by meh
parent 46f198033f
commit 855f3fd618

View File

@ -6,6 +6,7 @@ use std::str::from_utf8_unchecked;
use ffi::*;
use {codec, media};
use super::Flags;
pub struct Output {
ptr: *mut AVOutputFormat,
@ -72,4 +73,10 @@ impl Output {
codec::Id::from(av_guess_codec(self.as_ptr(), ptr::null(), path.as_ptr(), ptr::null(), kind.into()))
}
}
pub fn flags(&self) -> Flags {
unsafe {
Flags::from_bits_truncate((*self.as_ptr()).flags)
}
}
}