gstreamer-rs/gstreamer/src/auto/toc_setter.rs

57 lines
1.5 KiB
Rust
Raw Normal View History

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)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT
2020-11-21 13:46:33 +00:00
use crate::Element;
use crate::Object;
use crate::Toc;
use glib::object::IsA;
use glib::translate::*;
2020-12-17 22:34:53 +00:00
glib::wrapper! {
#[doc(alias = "GstTocSetter")]
2021-03-08 10:25:37 +00:00
pub struct TocSetter(Interface<ffi::GstTocSetter, ffi::GstTocSetterInterface>) @requires Element, Object;
match fn {
type_ => || ffi::gst_toc_setter_get_type(),
}
}
2021-11-03 17:28:46 +00:00
impl TocSetter {
pub const NONE: Option<&'static TocSetter> = None;
}
2019-01-16 11:32:39 +00:00
2021-11-16 14:02:58 +00:00
unsafe impl Send for TocSetter {}
unsafe impl Sync for TocSetter {}
pub trait TocSetterExt: 'static {
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_toc_setter_get_toc")]
#[doc(alias = "get_toc")]
2021-04-11 19:38:18 +00:00
fn toc(&self) -> Option<Toc>;
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_toc_setter_reset")]
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>);
}
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)) }
}
fn reset(&self) {
unsafe {
2020-11-21 13:46:33 +00:00
ffi::gst_toc_setter_reset(self.as_ref().to_glib_none().0);
}
}
2019-03-19 07:40:05 +00:00
fn set_toc(&self, toc: Option<&Toc>) {
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);
}
}
}