gstreamer-rs/gstreamer-editing-services/src/auto/effect.rs
Marijn Suijten 6ec0e3ac4b Update gir and regenerate with extended gir-dirs comments
Gir now prints all directories and their hashes in the version file and
comments; useful now that gstreamer-rs is being generated from both
gir-files/ and gst-gir-files/ submodules.
2021-04-01 15:58:41 +02:00

54 lines
1.7 KiB
Rust

// 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
use crate::BaseEffect;
use crate::Extractable;
use crate::TimelineElement;
use crate::TrackElement;
use glib::object::IsA;
use glib::translate::*;
use glib::StaticType;
glib::wrapper! {
pub struct Effect(Object<ffi::GESEffect, ffi::GESEffectClass>) @extends BaseEffect, TrackElement, TimelineElement, @implements Extractable;
match fn {
get_type => || ffi::ges_effect_get_type(),
}
}
impl Effect {
#[doc(alias = "ges_effect_new")]
pub fn new(bin_description: &str) -> Result<Effect, glib::BoolError> {
assert_initialized_main_thread!();
unsafe {
Option::<_>::from_glib_none(ffi::ges_effect_new(bin_description.to_glib_none().0))
.ok_or_else(|| glib::bool_error!("Failed to create effect from description"))
}
}
}
pub const NONE_EFFECT: Option<&Effect> = None;
pub trait EffectExt: 'static {
fn get_property_bin_description(&self) -> Option<glib::GString>;
}
impl<O: IsA<Effect>> EffectExt for O {
fn get_property_bin_description(&self) -> Option<glib::GString> {
unsafe {
let mut value = glib::Value::from_type(<glib::GString as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"bin-description\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `bin-description` getter")
}
}
}