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 {}