forked from mirrors/gstreamer-rs
gstreamer: Implement Default
trait for AllocationParams
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1337>
This commit is contained in:
parent
de87e6061e
commit
08ce9f5b2f
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