gstreamer-rs/gstreamer/src/auto/toc_setter.rs
2019-04-15 18:38:05 +03:00

52 lines
1.2 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 Element;
use Object;
use Toc;
use glib::object::IsA;
use glib::translate::*;
use gst_sys;
glib_wrapper! {
pub struct TocSetter(Interface<gst_sys::GstTocSetter>) @requires Element, Object;
match fn {
get_type => || gst_sys::gst_toc_setter_get_type(),
}
}
unsafe impl Send for TocSetter {}
unsafe impl Sync for TocSetter {}
pub const NONE_TOC_SETTER: Option<&TocSetter> = None;
pub trait TocSetterExt: 'static {
fn get_toc(&self) -> Option<Toc>;
fn reset(&self);
fn set_toc(&self, toc: Option<&Toc>);
}
impl<O: IsA<TocSetter>> TocSetterExt for O {
fn get_toc(&self) -> Option<Toc> {
unsafe {
from_glib_full(gst_sys::gst_toc_setter_get_toc(self.as_ref().to_glib_none().0))
}
}
fn reset(&self) {
unsafe {
gst_sys::gst_toc_setter_reset(self.as_ref().to_glib_none().0);
}
}
fn set_toc(&self, toc: Option<&Toc>) {
unsafe {
gst_sys::gst_toc_setter_set_toc(self.as_ref().to_glib_none().0, toc.to_glib_none().0);
}
}
}