2018-11-27 21:52:42 +00:00
|
|
|
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
|
|
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
2021-04-01 13:58:41 +00:00
|
|
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
2018-11-27 21:52:42 +00:00
|
|
|
// DO NOT EDIT
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
use glib::{prelude::*, translate::*};
|
2018-11-27 21:52:42 +00:00
|
|
|
|
2020-12-17 22:34:53 +00:00
|
|
|
glib::wrapper! {
|
2021-06-02 07:47:51 +00:00
|
|
|
#[doc(alias = "GstGLDisplayEGL")]
|
2020-11-28 10:10:30 +00:00
|
|
|
pub struct GLDisplayEGL(Object<ffi::GstGLDisplayEGL, ffi::GstGLDisplayEGLClass>) @extends gst_gl::GLDisplay, gst::Object;
|
2018-11-27 21:52:42 +00:00
|
|
|
|
|
|
|
match fn {
|
2021-04-19 19:55:01 +00:00
|
|
|
type_ => || ffi::gst_gl_display_egl_get_type(),
|
2018-11-27 21:52:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl GLDisplayEGL {
|
2021-11-16 14:02:58 +00:00
|
|
|
pub const NONE: Option<&'static GLDisplayEGL> = None;
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_gl_display_egl_new")]
|
2022-10-18 15:16:11 +00:00
|
|
|
pub fn new() -> Result<GLDisplayEGL, glib::BoolError> {
|
2018-11-27 21:52:42 +00:00
|
|
|
assert_initialized_main_thread!();
|
2022-10-18 15:16:11 +00:00
|
|
|
unsafe {
|
|
|
|
Option::<_>::from_glib_full(ffi::gst_gl_display_egl_new())
|
|
|
|
.ok_or_else(|| glib::bool_error!("Failed to create EGL display"))
|
|
|
|
}
|
2018-11-27 21:52:42 +00:00
|
|
|
}
|
|
|
|
|
2023-11-10 14:34:37 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "gst_gl_display_egl_new_surfaceless")]
|
|
|
|
pub fn new_surfaceless() -> Result<GLDisplayEGL, glib::BoolError> {
|
|
|
|
assert_initialized_main_thread!();
|
|
|
|
unsafe {
|
|
|
|
Option::<_>::from_glib_full(ffi::gst_gl_display_egl_new_surfaceless())
|
|
|
|
.ok_or_else(|| glib::bool_error!("Failed to create surfaceless EGL display"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_gl_display_egl_from_gl_display")]
|
2021-05-23 19:22:45 +00:00
|
|
|
pub fn from_gl_display(display: &impl IsA<gst_gl::GLDisplay>) -> Option<GLDisplayEGL> {
|
2020-11-28 10:10:30 +00:00
|
|
|
assert_initialized_main_thread!();
|
2020-08-11 07:49:37 +00:00
|
|
|
unsafe {
|
2020-11-22 10:20:20 +00:00
|
|
|
from_glib_full(ffi::gst_gl_display_egl_from_gl_display(
|
2020-08-11 07:49:37 +00:00
|
|
|
display.as_ref().to_glib_none().0,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
2018-11-27 21:52:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
unsafe impl Send for GLDisplayEGL {}
|
|
|
|
unsafe impl Sync for GLDisplayEGL {}
|