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:
Sebastian Dröge 2019-07-16 11:44:40 +03:00
parent e3282c27f1
commit 007f80ca32

View file

@ -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>> {