forked from mirrors/gstreamer-rs
buffer: Allow setting/unsetting buffer flags
As there are extension flags types, we need separate setter/unsetter functions for the flags, or otherwise we would always clear the extension flags types (e.g. GstVideoBufferFlags).
This commit is contained in:
parent
e3282c27f1
commit
007f80ca32
1 changed files with 5 additions and 1 deletions
|
@ -381,7 +381,11 @@ impl BufferRef {
|
|||
}
|
||||
|
||||
pub fn set_flags(&mut self, flags: BufferFlags) {
|
||||
self.0.mini_object.flags = flags.bits();
|
||||
self.0.mini_object.flags |= flags.bits();
|
||||
}
|
||||
|
||||
pub fn unset_flags(&mut self, flags: BufferFlags) {
|
||||
self.0.mini_object.flags &= !flags.bits();
|
||||
}
|
||||
|
||||
pub fn get_meta<T: MetaAPI>(&self) -> Option<MetaRef<T>> {
|
||||
|
|
Loading…
Reference in a new issue