// 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::{VideoBufferPool, ffi};
use glib::{prelude::*, translate::*};

glib::wrapper! {
    #[doc(alias = "GstVideoDmabufPool")]
    pub struct VideoDmabufPool(Object<ffi::GstVideoDmabufPool, ffi::GstVideoDmabufPoolClass>) @extends VideoBufferPool, gst::BufferPool, gst::Object;

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

impl VideoDmabufPool {
    #[doc(alias = "gst_video_dmabuf_pool_new")]
    pub fn new() -> Option<VideoDmabufPool> {
        assert_initialized_main_thread!();
        unsafe {
            Option::<gst::BufferPool>::from_glib_full(ffi::gst_video_dmabuf_pool_new())
                .map(|o| o.unsafe_cast())
        }
    }
}

unsafe impl Send for VideoDmabufPool {}
unsafe impl Sync for VideoDmabufPool {}
