mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-05-29 05:38:16 +00:00
1ec4560b62
Two functions were manually implemented but not marked as such, leaving unneeded "TODO call ffi:xxx" markers in the codebase. Also improve the aliases on the manual implementations. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1336>
42 lines
1.3 KiB
Rust
42 lines
1.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 glib::{prelude::*, translate::*};
|
|
|
|
glib::wrapper! {
|
|
#[doc(alias = "GstGLDisplayEGL")]
|
|
pub struct GLDisplayEGL(Object<ffi::GstGLDisplayEGL, ffi::GstGLDisplayEGLClass>) @extends gst_gl::GLDisplay, gst::Object;
|
|
|
|
match fn {
|
|
type_ => || ffi::gst_gl_display_egl_get_type(),
|
|
}
|
|
}
|
|
|
|
impl GLDisplayEGL {
|
|
pub const NONE: Option<&'static GLDisplayEGL> = None;
|
|
|
|
#[doc(alias = "gst_gl_display_egl_new")]
|
|
pub fn new() -> Result<GLDisplayEGL, glib::BoolError> {
|
|
assert_initialized_main_thread!();
|
|
unsafe {
|
|
Option::<_>::from_glib_full(ffi::gst_gl_display_egl_new())
|
|
.ok_or_else(|| glib::bool_error!("Failed to create EGL display"))
|
|
}
|
|
}
|
|
|
|
#[doc(alias = "gst_gl_display_egl_from_gl_display")]
|
|
pub fn from_gl_display(display: &impl IsA<gst_gl::GLDisplay>) -> Option<GLDisplayEGL> {
|
|
assert_initialized_main_thread!();
|
|
unsafe {
|
|
from_glib_full(ffi::gst_gl_display_egl_from_gl_display(
|
|
display.as_ref().to_glib_none().0,
|
|
))
|
|
}
|
|
}
|
|
}
|
|
|
|
unsafe impl Send for GLDisplayEGL {}
|
|
unsafe impl Sync for GLDisplayEGL {}
|