Skip to main content

gstreamer_allocators/auto/
udmabuf_allocator.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::{DmaBufAllocator, FdAllocator, ffi};
7use glib::translate::*;
8
9glib::wrapper! {
10    #[doc(alias = "GstUdmabufAllocator")]
11    pub struct UdmabufAllocator(Object<ffi::GstUdmabufAllocator, ffi::GstUdmabufAllocatorClass>) @extends DmaBufAllocator, FdAllocator, gst::Allocator;
12
13    match fn {
14        type_ => || ffi::gst_udmabuf_allocator_get_type(),
15    }
16}
17
18impl UdmabufAllocator {
19    #[doc(alias = "gst_udmabuf_allocator_get")]
20    pub fn get() -> Option<gst::Allocator> {
21        assert_initialized_main_thread!();
22        unsafe { from_glib_full(ffi::gst_udmabuf_allocator_get()) }
23    }
24}
25
26unsafe impl Send for UdmabufAllocator {}
27unsafe impl Sync for UdmabufAllocator {}