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 | |
6 | use crate::{ffi, GLBaseMemoryAllocator, GLContext}; |
7 | use glib::{prelude::*, translate::*}; |
8 | |
9 | glib::wrapper! { |
10 | #[doc (alias = "GstGLMemoryAllocator" )] |
11 | pub struct GLMemoryAllocator(Object<ffi::GstGLMemoryAllocator, ffi::GstGLMemoryAllocatorClass>) @extends GLBaseMemoryAllocator, gst::Allocator, gst::Object; |
12 | |
13 | match fn { |
14 | type_ => || ffi::gst_gl_memory_allocator_get_type(), |
15 | } |
16 | } |
17 | |
18 | impl GLMemoryAllocator { |
19 | pub const NONE: Option<&'static GLMemoryAllocator> = None; |
20 | |
21 | #[doc (alias = "gst_gl_memory_allocator_get_default" )] |
22 | #[doc (alias = "get_default" )] |
23 | #[allow (clippy::should_implement_trait)] |
24 | pub fn default(context: &impl IsA<GLContext>) -> GLMemoryAllocator { |
25 | skip_assert_initialized!(); |
26 | unsafe { |
27 | from_glib_full(ptr:ffi::gst_gl_memory_allocator_get_default( |
28 | context.as_ref().to_glib_none().0, |
29 | )) |
30 | } |
31 | } |
32 | } |
33 | |
34 | unsafe impl Send for GLMemoryAllocator {} |
35 | unsafe impl Sync for GLMemoryAllocator {} |
36 | |