mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-04-04 23:29:39 +00:00
allocator: Add setters to AllocationParams
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1667>
This commit is contained in:
parent
035ebe032b
commit
d6770a8a00
1 changed files with 20 additions and 0 deletions
|
@ -49,6 +49,26 @@ impl AllocationParams {
|
|||
self.0.padding
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_flags(&mut self, flags: MemoryFlags) {
|
||||
self.0.flags = flags.into_glib();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_align(&mut self, align: usize) {
|
||||
self.0.align = align;
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_prefix(&mut self, prefix: usize) {
|
||||
self.0.prefix = prefix;
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_padding(&mut self, padding: usize) {
|
||||
self.0.padding = padding;
|
||||
}
|
||||
|
||||
pub fn new(flags: MemoryFlags, align: usize, prefix: usize, padding: usize) -> Self {
|
||||
assert_initialized_main_thread!();
|
||||
let params = unsafe {
|
||||
|
|
Loading…
Reference in a new issue