mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-22 16:16:37 +00:00
gstreamer: Implement Default
trait for AllocationParams
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1328>
This commit is contained in:
parent
a41dc25eba
commit
414019af21
1 changed files with 10 additions and 0 deletions
|
@ -14,6 +14,16 @@ pub struct AllocationParams(ffi::GstAllocationParams);
|
|||
unsafe impl Send for AllocationParams {}
|
||||
unsafe impl Sync for AllocationParams {}
|
||||
|
||||
impl Default for AllocationParams {
|
||||
fn default() -> Self {
|
||||
unsafe {
|
||||
let mut params = mem::MaybeUninit::uninit();
|
||||
ffi::gst_allocation_params_init(params.as_mut_ptr());
|
||||
AllocationParams(params.assume_init())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl AllocationParams {
|
||||
#[doc(alias = "get_flags")]
|
||||
#[inline]
|
||||
|
|
Loading…
Reference in a new issue