mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-15 14:02:32 +00:00
55 lines
1.7 KiB
Rust
55 lines
1.7 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::{GLDisplay, GLSLProfile, GLSLVersion};
|
|
use glib::{prelude::*, translate::*};
|
|
use std::mem;
|
|
|
|
#[doc(alias = "gst_gl_check_extension")]
|
|
pub fn gl_check_extension(name: &str, ext: &str) -> bool {
|
|
assert_initialized_main_thread!();
|
|
unsafe {
|
|
from_glib(ffi::gst_gl_check_extension(
|
|
name.to_glib_none().0,
|
|
ext.to_glib_none().0,
|
|
))
|
|
}
|
|
}
|
|
|
|
#[doc(alias = "gst_gl_element_propagate_display_context")]
|
|
pub fn gl_element_propagate_display_context(
|
|
element: &impl IsA<gst::Element>,
|
|
display: &impl IsA<GLDisplay>,
|
|
) {
|
|
skip_assert_initialized!();
|
|
unsafe {
|
|
ffi::gst_gl_element_propagate_display_context(
|
|
element.as_ref().to_glib_none().0,
|
|
display.as_ref().to_glib_none().0,
|
|
);
|
|
}
|
|
}
|
|
|
|
#[doc(alias = "gst_glsl_string_get_version_profile")]
|
|
pub fn glsl_string_get_version_profile(s: &str) -> Option<(GLSLVersion, GLSLProfile)> {
|
|
assert_initialized_main_thread!();
|
|
unsafe {
|
|
let mut version = mem::MaybeUninit::uninit();
|
|
let mut profile = mem::MaybeUninit::uninit();
|
|
let ret = from_glib(ffi::gst_glsl_string_get_version_profile(
|
|
s.to_glib_none().0,
|
|
version.as_mut_ptr(),
|
|
profile.as_mut_ptr(),
|
|
));
|
|
if ret {
|
|
Some((
|
|
from_glib(version.assume_init()),
|
|
from_glib(profile.assume_init()),
|
|
))
|
|
} else {
|
|
None
|
|
}
|
|
}
|
|
}
|