mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-09-28 23:02:16 +00:00
50 lines
1.3 KiB
Rust
50 lines
1.3 KiB
Rust
|
// 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
|
||
|
|
||
|
use BaseEffect;
|
||
|
use Extractable;
|
||
|
use TimelineElement;
|
||
|
use TrackElement;
|
||
|
use ffi;
|
||
|
use glib;
|
||
|
use glib::StaticType;
|
||
|
use glib::Value;
|
||
|
use glib::object::IsA;
|
||
|
use glib::translate::*;
|
||
|
use glib_ffi;
|
||
|
use gobject_ffi;
|
||
|
use std::mem;
|
||
|
use std::ptr;
|
||
|
|
||
|
glib_wrapper! {
|
||
|
pub struct Effect(Object<ffi::GESEffect, ffi::GESEffectClass>): BaseEffect, TrackElement, TimelineElement, Extractable;
|
||
|
|
||
|
match fn {
|
||
|
get_type => || ffi::ges_effect_get_type(),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl Effect {
|
||
|
pub fn new(bin_description: &str) -> Effect {
|
||
|
assert_initialized_main_thread!();
|
||
|
unsafe {
|
||
|
from_glib_none(ffi::ges_effect_new(bin_description.to_glib_none().0))
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
pub trait EffectExt {
|
||
|
fn get_property_bin_description(&self) -> Option<String>;
|
||
|
}
|
||
|
|
||
|
impl<O: IsA<Effect> + IsA<glib::object::Object>> EffectExt for O {
|
||
|
fn get_property_bin_description(&self) -> Option<String> {
|
||
|
unsafe {
|
||
|
let mut value = Value::from_type(<String as StaticType>::static_type());
|
||
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, "bin-description".to_glib_none().0, value.to_glib_none_mut().0);
|
||
|
value.get()
|
||
|
}
|
||
|
}
|
||
|
}
|