2018-04-23 17:34:22 +00:00
|
|
|
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
|
|
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
2017-08-08 20:37:48 +00:00
|
|
|
// DO NOT EDIT
|
|
|
|
|
|
|
|
use Element;
|
|
|
|
use Object;
|
|
|
|
use Toc;
|
|
|
|
use glib::object::IsA;
|
|
|
|
use glib::translate::*;
|
2019-03-19 07:40:05 +00:00
|
|
|
use gst_sys;
|
2017-08-08 20:37:48 +00:00
|
|
|
|
|
|
|
glib_wrapper! {
|
2019-03-19 07:40:05 +00:00
|
|
|
pub struct TocSetter(Interface<gst_sys::GstTocSetter>) @requires Element, Object;
|
2017-08-08 20:37:48 +00:00
|
|
|
|
|
|
|
match fn {
|
2019-03-19 07:40:05 +00:00
|
|
|
get_type => || gst_sys::gst_toc_setter_get_type(),
|
2017-08-08 20:37:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
unsafe impl Send for TocSetter {}
|
|
|
|
unsafe impl Sync for TocSetter {}
|
|
|
|
|
2019-01-16 11:32:39 +00:00
|
|
|
pub const NONE_TOC_SETTER: Option<&TocSetter> = None;
|
|
|
|
|
2018-12-08 09:05:20 +00:00
|
|
|
pub trait TocSetterExt: 'static {
|
2017-08-08 20:37:48 +00:00
|
|
|
fn get_toc(&self) -> Option<Toc>;
|
|
|
|
|
|
|
|
fn reset(&self);
|
|
|
|
|
2019-03-19 07:40:05 +00:00
|
|
|
fn set_toc(&self, toc: Option<&Toc>);
|
2017-08-08 20:37:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl<O: IsA<TocSetter>> TocSetterExt for O {
|
|
|
|
fn get_toc(&self) -> Option<Toc> {
|
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
from_glib_full(gst_sys::gst_toc_setter_get_toc(self.as_ref().to_glib_none().0))
|
2017-08-08 20:37:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn reset(&self) {
|
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
gst_sys::gst_toc_setter_reset(self.as_ref().to_glib_none().0);
|
2017-08-08 20:37:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-19 07:40:05 +00:00
|
|
|
fn set_toc(&self, toc: Option<&Toc>) {
|
2017-08-08 20:37:48 +00:00
|
|
|
unsafe {
|
2019-03-19 07:40:05 +00:00
|
|
|
gst_sys::gst_toc_setter_set_toc(self.as_ref().to_glib_none().0, toc.to_glib_none().0);
|
2017-08-08 20:37:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|