gstreamer-rs/gstreamer-gl/src/auto/gl_memory_allocator.rs

37 lines
1.2 KiB
Rust
Raw Normal View History

2021-01-29 21:12:00 +00:00
// 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::GLBaseMemoryAllocator;
use crate::GLContext;
use glib::object::IsA;
use glib::translate::*;
glib::wrapper! {
#[doc(alias = "GstGLMemoryAllocator")]
2021-01-29 21:12:00 +00:00
pub struct GLMemoryAllocator(Object<ffi::GstGLMemoryAllocator, ffi::GstGLMemoryAllocatorClass>) @extends GLBaseMemoryAllocator, gst::Allocator, gst::Object;
match fn {
type_ => || ffi::gst_gl_memory_allocator_get_type(),
2021-01-29 21:12:00 +00:00
}
}
impl GLMemoryAllocator {
2021-11-16 14:02:58 +00:00
pub const NONE: Option<&'static GLMemoryAllocator> = None;
2021-01-29 21:12:00 +00:00
#[doc(alias = "gst_gl_memory_allocator_get_default")]
#[doc(alias = "get_default")]
pub fn default(context: &impl IsA<GLContext>) -> Option<GLMemoryAllocator> {
2021-01-29 21:12:00 +00:00
skip_assert_initialized!();
unsafe {
from_glib_full(ffi::gst_gl_memory_allocator_get_default(
context.as_ref().to_glib_none().0,
))
}
}
}
unsafe impl Send for GLMemoryAllocator {}
unsafe impl Sync for GLMemoryAllocator {}