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, GLDisplay, GLSLProfile, GLSLVersion};
7use glib::{prelude::*, translate::*};
8
9#[doc(alias = "gst_gl_check_extension")]
10pub fn gl_check_extension(name: &str, ext: &str) -> bool {
11 assert_initialized_main_thread!();
12 unsafe {
13 from_glib(val:ffi::gst_gl_check_extension(
14 name.to_glib_none().0,
15 ext.to_glib_none().0,
16 ))
17 }
18}
19
20//#[cfg(feature = "v1_26")]
21//#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
22//#[doc(alias = "gst_gl_dma_buf_transform_drm_formats_to_gst_formats")]
23//pub fn gl_dma_buf_transform_drm_formats_to_gst_formats(context: &impl IsA<GLContext>, src: &glib::Value, flags: /*Ignored*/GLDrmFormatFlags, dst: /*Unimplemented*/glib::Value) -> bool {
24// unsafe { TODO: call ffi:gst_gl_dma_buf_transform_drm_formats_to_gst_formats() }
25//}
26
27//#[cfg(feature = "v1_26")]
28//#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
29//#[doc(alias = "gst_gl_dma_buf_transform_gst_formats_to_drm_formats")]
30//pub fn gl_dma_buf_transform_gst_formats_to_drm_formats(context: &impl IsA<GLContext>, src: &glib::Value, flags: /*Ignored*/GLDrmFormatFlags, dst: /*Unimplemented*/glib::Value) -> bool {
31// unsafe { TODO: call ffi:gst_gl_dma_buf_transform_gst_formats_to_drm_formats() }
32//}
33
34#[doc(alias = "gst_gl_element_propagate_display_context")]
35pub fn gl_element_propagate_display_context(
36 element: &impl IsA<gst::Element>,
37 display: &impl IsA<GLDisplay>,
38) {
39 skip_assert_initialized!();
40 unsafe {
41 ffi::gst_gl_element_propagate_display_context(
42 element.as_ref().to_glib_none().0,
43 display.as_ref().to_glib_none().0,
44 );
45 }
46}
47
48//#[cfg(feature = "v1_24")]
49//#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
50//#[doc(alias = "gst_gl_swizzle_invert")]
51//pub fn gl_swizzle_invert(swizzle: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 14 }; 4, inversion: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 14 }; 4) {
52// unsafe { TODO: call ffi:gst_gl_swizzle_invert() }
53//}
54
55//#[cfg(feature = "v1_24")]
56//#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
57//#[doc(alias = "gst_gl_video_format_swizzle")]
58//pub fn gl_video_format_swizzle(video_format: /*Ignored*/gst_video::VideoFormat, swizzle: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 14 }; 4) -> bool {
59// unsafe { TODO: call ffi:gst_gl_video_format_swizzle() }
60//}
61
62#[doc(alias = "gst_glsl_string_get_version_profile")]
63pub fn glsl_string_get_version_profile(s: &str) -> Option<(GLSLVersion, GLSLProfile)> {
64 assert_initialized_main_thread!();
65 unsafe {
66 let mut version: MaybeUninit<{unknown}> = std::mem::MaybeUninit::uninit();
67 let mut profile: MaybeUninit<{unknown}> = std::mem::MaybeUninit::uninit();
68 let ret: bool = from_glib(val:ffi::gst_glsl_string_get_version_profile(
69 s.to_glib_none().0,
70 version.as_mut_ptr(),
71 profile.as_mut_ptr(),
72 ));
73 if ret {
74 Some((
75 from_glib(val:version.assume_init()),
76 from_glib(val:profile.assume_init()),
77 ))
78 } else {
79 None
80 }
81 }
82}
83