gstreamer-rs/gstreamer-gl/src/auto/gl_overlay_compositor.rs

49 lines
1.4 KiB
Rust
Raw Normal View History

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)
// DO NOT EDIT
use GLContext;
2019-01-16 11:32:39 +00:00
use glib::object::IsA;
2018-11-27 21:52:42 +00:00
use glib::translate::*;
use gst;
2019-03-19 07:40:05 +00:00
use gst_gl_sys;
2018-11-27 21:52:42 +00:00
glib_wrapper! {
2019-03-19 07:40:05 +00:00
pub struct GLOverlayCompositor(Object<gst_gl_sys::GstGLOverlayCompositor, gst_gl_sys::GstGLOverlayCompositorClass, GLOverlayCompositorClass>) @extends gst::Object;
2018-11-27 21:52:42 +00:00
match fn {
2019-03-19 07:40:05 +00:00
get_type => || gst_gl_sys::gst_gl_overlay_compositor_get_type(),
2018-11-27 21:52:42 +00:00
}
}
impl GLOverlayCompositor {
2019-01-16 11:32:39 +00:00
pub fn new<P: IsA<GLContext>>(context: &P) -> GLOverlayCompositor {
2018-11-27 21:52:42 +00:00
skip_assert_initialized!();
unsafe {
2019-03-19 07:40:05 +00:00
from_glib_none(gst_gl_sys::gst_gl_overlay_compositor_new(context.as_ref().to_glib_none().0))
2018-11-27 21:52:42 +00:00
}
}
pub fn draw_overlays(&self) {
unsafe {
2019-03-19 07:40:05 +00:00
gst_gl_sys::gst_gl_overlay_compositor_draw_overlays(self.to_glib_none().0);
2018-11-27 21:52:42 +00:00
}
}
pub fn free_overlays(&self) {
unsafe {
2019-03-19 07:40:05 +00:00
gst_gl_sys::gst_gl_overlay_compositor_free_overlays(self.to_glib_none().0);
2018-11-27 21:52:42 +00:00
}
}
pub fn add_caps(caps: &gst::Caps) -> Option<gst::Caps> {
assert_initialized_main_thread!();
unsafe {
2019-03-19 07:40:05 +00:00
from_glib_full(gst_gl_sys::gst_gl_overlay_compositor_add_caps(caps.to_glib_none().0))
2018-11-27 21:52:42 +00:00
}
}
}
unsafe impl Send for GLOverlayCompositor {}
unsafe impl Sync for GLOverlayCompositor {}