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
6use crate::{ffi, GLContext, GLFormat, GLTextureTarget};
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
11 pub struct GLVideoAllocationParams(Boxed<ffi::GstGLVideoAllocationParams>);
12
13 match fn {
14 copy => |ptr| glib::gobject_ffi::g_boxed_copy(ffi::gst_gl_video_allocation_params_get_type(), ptr as *mut _) as *mut ffi::GstGLVideoAllocationParams,
15 free => |ptr| glib::gobject_ffi::g_boxed_free(ffi::gst_gl_video_allocation_params_get_type(), ptr as *mut _),
16 type_ => || ffi::gst_gl_video_allocation_params_get_type(),
17 }
18}
19
20impl GLVideoAllocationParams {
21 #[doc(alias = "gst_gl_video_allocation_params_new")]
22 pub fn new(
23 context: &impl IsA<GLContext>,
24 alloc_params: Option<&gst::AllocationParams>,
25 v_info: &gst_video::VideoInfo,
26 plane: u32,
27 valign: Option<&gst_video::VideoAlignment>,
28 target: GLTextureTarget,
29 tex_format: GLFormat,
30 ) -> GLVideoAllocationParams {
31 skip_assert_initialized!();
32 unsafe {
33 from_glib_full(ffi::gst_gl_video_allocation_params_new(
34 context.as_ref().to_glib_none().0,
35 alloc_params.to_glib_none().0,
36 v_info.to_glib_none().0,
37 plane,
38 valign.to_glib_none().0,
39 target.into_glib(),
40 tex_format.into_glib(),
41 ))
42 }
43 }
44
45 //#[doc(alias = "gst_gl_video_allocation_params_new_wrapped_data")]
46 //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 {
47 // unsafe { TODO: call ffi:gst_gl_video_allocation_params_new_wrapped_data() }
48 //}
49
50 //#[doc(alias = "gst_gl_video_allocation_params_new_wrapped_gl_handle")]
51 //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 {
52 // unsafe { TODO: call ffi:gst_gl_video_allocation_params_new_wrapped_gl_handle() }
53 //}
54
55 //#[doc(alias = "gst_gl_video_allocation_params_new_wrapped_texture")]
56 //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 {
57 // unsafe { TODO: call ffi:gst_gl_video_allocation_params_new_wrapped_texture() }
58 //}
59
60 #[doc(alias = "gst_gl_video_allocation_params_copy_data")]
61 pub fn copy_data(&self, dest_vid: &mut GLVideoAllocationParams) {
62 unsafe {
63 ffi::gst_gl_video_allocation_params_copy_data(
64 mut_override(self.to_glib_none().0),
65 dest_vid.to_glib_none_mut().0,
66 );
67 }
68 }
69
70 //#[doc(alias = "gst_gl_video_allocation_params_init_full")]
71 //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 {
72 // unsafe { TODO: call ffi:gst_gl_video_allocation_params_init_full() }
73 //}
74}
75
76unsafe impl Send for GLVideoAllocationParams {}
77unsafe impl Sync for GLVideoAllocationParams {}
78