mirror of
https://github.com/encounter/rust-ffmpeg.git
synced 2026-07-10 21:18:39 -07:00
format/output: add flags() method
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user