gstreamer-allocators 0.25.0

Rust bindings for GStreamer Allocators library
Documentation
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT

use crate::{DmaBufAllocator, FdAllocator, ffi};
use glib::translate::*;

glib::wrapper! {
    #[doc(alias = "GstUdmabufAllocator")]
    pub struct UdmabufAllocator(Object<ffi::GstUdmabufAllocator, ffi::GstUdmabufAllocatorClass>) @extends DmaBufAllocator, FdAllocator, gst::Allocator;

    match fn {
        type_ => || ffi::gst_udmabuf_allocator_get_type(),
    }
}

impl UdmabufAllocator {
    #[doc(alias = "gst_udmabuf_allocator_get")]
    pub fn get() -> Option<gst::Allocator> {
        assert_initialized_main_thread!();
        unsafe { from_glib_full(ffi::gst_udmabuf_allocator_get()) }
    }
}

unsafe impl Send for UdmabufAllocator {}
unsafe impl Sync for UdmabufAllocator {}