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 9c0f1d0103
commit 058d792548

View file

@ -374,7 +374,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>> {