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)
|
2021-04-01 13:58:41 +00:00
|
|
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
2017-08-08 20:37:48 +00:00
|
|
|
// DO NOT EDIT
|
|
|
|
|
2020-11-21 13:46:33 +00:00
|
|
|
use crate::Element;
|
|
|
|
use crate::Object;
|
|
|
|
use crate::Toc;
|
2017-08-08 20:37:48 +00:00
|
|
|
use glib::object::IsA;
|
|
|
|
use glib::translate::*;
|
|
|
|
|
2020-12-17 22:34:53 +00:00
|
|
|
glib::wrapper! {
|
2021-06-02 07:47:51 +00:00
|
|
|
#[doc(alias = "GstTocSetter")]
|
2021-03-08 10:25:37 +00:00
|
|
|
pub struct TocSetter(Interface<ffi::GstTocSetter, ffi::GstTocSetterInterface>) @requires Element, Object;
|
2017-08-08 20:37:48 +00:00
|
|
|
|
|
|
|
match fn {
|
2021-04-19 19:55:01 +00:00
|
|
|
type_ => || ffi::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 {
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_toc_setter_get_toc")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_toc")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn toc(&self) -> Option<Toc>;
|
2017-08-08 20:37:48 +00:00
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_toc_setter_reset")]
|
2017-08-08 20:37:48 +00:00
|
|
|
fn reset(&self);
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_toc_setter_set_toc")]
|
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 {
|
2021-04-11 19:38:18 +00:00
|
|
|
fn toc(&self) -> Option<Toc> {
|
2020-11-21 13:46:33 +00:00
|
|
|
unsafe { from_glib_full(ffi::gst_toc_setter_get_toc(self.as_ref().to_glib_none().0)) }
|
2017-08-08 20:37:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn reset(&self) {
|
|
|
|
unsafe {
|
2020-11-21 13:46:33 +00:00
|
|
|
ffi::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 {
|
2020-11-21 13:46:33 +00:00
|
|
|
ffi::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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|