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

78 lines
4.3 KiB
Rust

// 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::{GLContext, GLFormat, GLTextureTarget};
use glib::{prelude::*, translate::*};
glib::wrapper! {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct GLVideoAllocationParams(Boxed<ffi::GstGLVideoAllocationParams>);
match fn {
copy => |ptr| glib::gobject_ffi::g_boxed_copy(ffi::gst_gl_video_allocation_params_get_type(), ptr as *mut _) as *mut ffi::GstGLVideoAllocationParams,
free => |ptr| glib::gobject_ffi::g_boxed_free(ffi::gst_gl_video_allocation_params_get_type(), ptr as *mut _),
type_ => || ffi::gst_gl_video_allocation_params_get_type(),
}
}
impl GLVideoAllocationParams {
#[doc(alias = "gst_gl_video_allocation_params_new")]
pub fn new(
context: &impl IsA<GLContext>,
alloc_params: Option<&gst::AllocationParams>,
v_info: &gst_video::VideoInfo,
plane: u32,
valign: Option<&gst_video::VideoAlignment>,
target: GLTextureTarget,
tex_format: GLFormat,
) -> GLVideoAllocationParams {
skip_assert_initialized!();
unsafe {
from_glib_full(ffi::gst_gl_video_allocation_params_new(
context.as_ref().to_glib_none().0,
alloc_params.to_glib_none().0,
v_info.to_glib_none().0,
plane,
valign.to_glib_none().0,
target.into_glib(),
tex_format.into_glib(),
))
}
}
//#[doc(alias = "gst_gl_video_allocation_params_new_wrapped_data")]
//pub fn new_wrapped_data(context: &impl IsA<GLContext>, alloc_params: Option<&gst::AllocationParams>, v_info: &gst_video::VideoInfo, plane: u32, valign: Option<&gst_video::VideoAlignment>, target: GLTextureTarget, tex_format: GLFormat, wrapped_data: /*Unimplemented*/Option<Basic: Pointer>, user_data: /*Unimplemented*/Option<Basic: Pointer>) -> GLVideoAllocationParams {
// unsafe { TODO: call ffi:gst_gl_video_allocation_params_new_wrapped_data() }
//}
//#[doc(alias = "gst_gl_video_allocation_params_new_wrapped_gl_handle")]
//pub fn new_wrapped_gl_handle(context: &impl IsA<GLContext>, alloc_params: Option<&gst::AllocationParams>, v_info: &gst_video::VideoInfo, plane: u32, valign: Option<&gst_video::VideoAlignment>, target: GLTextureTarget, tex_format: GLFormat, gl_handle: /*Unimplemented*/Option<Basic: Pointer>, user_data: /*Unimplemented*/Option<Basic: Pointer>) -> GLVideoAllocationParams {
// unsafe { TODO: call ffi:gst_gl_video_allocation_params_new_wrapped_gl_handle() }
//}
//#[doc(alias = "gst_gl_video_allocation_params_new_wrapped_texture")]
//pub fn new_wrapped_texture(context: &impl IsA<GLContext>, alloc_params: Option<&gst::AllocationParams>, v_info: &gst_video::VideoInfo, plane: u32, valign: Option<&gst_video::VideoAlignment>, target: GLTextureTarget, tex_format: GLFormat, tex_id: u32, user_data: /*Unimplemented*/Option<Basic: Pointer>) -> GLVideoAllocationParams {
// unsafe { TODO: call ffi:gst_gl_video_allocation_params_new_wrapped_texture() }
//}
#[doc(alias = "gst_gl_video_allocation_params_copy_data")]
pub fn copy_data(&self, dest_vid: &mut GLVideoAllocationParams) {
unsafe {
ffi::gst_gl_video_allocation_params_copy_data(
mut_override(self.to_glib_none().0),
dest_vid.to_glib_none_mut().0,
);
}
}
//#[doc(alias = "gst_gl_video_allocation_params_init_full")]
//pub fn init_full<P: Fn(&GLAllocationParams) + Send + Sync + 'static, Q: Fn() + Send + Sync + 'static>(&mut self, struct_size: usize, alloc_flags: u32, copy: P, free: Q, context: &impl IsA<GLContext>, alloc_params: Option<&gst::AllocationParams>, v_info: &gst_video::VideoInfo, plane: u32, valign: Option<&gst_video::VideoAlignment>, target: GLTextureTarget, tex_format: GLFormat, wrapped_data: /*Unimplemented*/Option<Basic: Pointer>, gl_handle: /*Unimplemented*/Option<Basic: Pointer>) -> bool {
// unsafe { TODO: call ffi:gst_gl_video_allocation_params_init_full() }
//}
}
unsafe impl Send for GLVideoAllocationParams {}
unsafe impl Sync for GLVideoAllocationParams {}