mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 19:11:06 +00:00
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
9c0f1d0103
commit
058d792548
1 changed files with 5 additions and 1 deletions
|
@ -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>> {
|
||||
|
|
Loading…
Reference in a new issue