gstreamer_allocators/auto/
fd_allocator.rs
1use crate::ffi;
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10 #[doc(alias = "GstFdAllocator")]
16 pub struct FdAllocator(Object<ffi::GstFdAllocator, ffi::GstFdAllocatorClass>) @extends gst::Allocator;
17
18 match fn {
19 type_ => || ffi::gst_fd_allocator_get_type(),
20 }
21}
22
23impl FdAllocator {
24 pub const NONE: Option<&'static FdAllocator> = None;
25
26 #[doc(alias = "gst_fd_allocator_new")]
33 pub fn new() -> FdAllocator {
34 assert_initialized_main_thread!();
35 unsafe { gst::Allocator::from_glib_full(ffi::gst_fd_allocator_new()).unsafe_cast() }
36 }
37}
38
39impl Default for FdAllocator {
40 fn default() -> Self {
41 Self::new()
42 }
43}
44
45unsafe impl Send for FdAllocator {}
46unsafe impl Sync for FdAllocator {}