codec/context: add set_flags()
method
This commit is contained in:
parent
855f3fd618
commit
79ecba2fad
@ -4,7 +4,7 @@ use libc::c_int;
|
||||
use ffi::*;
|
||||
use ::media;
|
||||
use ::Codec;
|
||||
use super::{Id, Debug, Compliance, threading};
|
||||
use super::{Flags, Id, Debug, Compliance, threading};
|
||||
use super::decoder::Decoder;
|
||||
use super::encoder::Encoder;
|
||||
|
||||
@ -62,6 +62,12 @@ impl Context {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_flags(&mut self, value: Flags) {
|
||||
unsafe {
|
||||
(*self.as_mut_ptr()).flags = value.bits() as c_int;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn id(&self) -> Id {
|
||||
unsafe {
|
||||
Id::from((*self.as_ptr()).codec_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user