forked from mirrors/gstreamer-rs
51 lines
1.3 KiB
Rust
51 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)
|
||
|
// DO NOT EDIT
|
||
|
|
||
|
use GLContext;
|
||
|
use ffi;
|
||
|
use glib::translate::*;
|
||
|
use gst;
|
||
|
use gst_ffi;
|
||
|
|
||
|
glib_wrapper! {
|
||
|
pub struct GLOverlayCompositor(Object<ffi::GstGLOverlayCompositor, ffi::GstGLOverlayCompositorClass>): [
|
||
|
gst::Object => gst_ffi::GstObject,
|
||
|
];
|
||
|
|
||
|
match fn {
|
||
|
get_type => || ffi::gst_gl_overlay_compositor_get_type(),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl GLOverlayCompositor {
|
||
|
pub fn new(context: &GLContext) -> GLOverlayCompositor {
|
||
|
skip_assert_initialized!();
|
||
|
unsafe {
|
||
|
from_glib_none(ffi::gst_gl_overlay_compositor_new(context.to_glib_none().0))
|
||
|
}
|
||
|
}
|
||
|
|
||
|
pub fn draw_overlays(&self) {
|
||
|
unsafe {
|
||
|
ffi::gst_gl_overlay_compositor_draw_overlays(self.to_glib_none().0);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
pub fn free_overlays(&self) {
|
||
|
unsafe {
|
||
|
ffi::gst_gl_overlay_compositor_free_overlays(self.to_glib_none().0);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
pub fn add_caps(caps: &gst::Caps) -> Option<gst::Caps> {
|
||
|
assert_initialized_main_thread!();
|
||
|
unsafe {
|
||
|
from_glib_full(ffi::gst_gl_overlay_compositor_add_caps(caps.to_glib_none().0))
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
unsafe impl Send for GLOverlayCompositor {}
|
||
|
unsafe impl Sync for GLOverlayCompositor {}
|