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

52 lines
1.3 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)
// 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-11-21 13:46:33 +00:00
glib::glib_wrapper! {
pub struct TocSetter(Interface<ffi::GstTocSetter>) @requires Element, Object;
match fn {
2020-11-21 13:46:33 +00:00
get_type => || ffi::gst_toc_setter_get_type(),
}
}
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;
pub trait TocSetterExt: 'static {
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_toc_setter_get_toc")]
fn get_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 {
fn get_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);
}
}
}