mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-05 09:10:22 +00:00
ges: Regenerate
This commit is contained in:
parent
0c17f32eee
commit
96782e8a8e
21 changed files with 747 additions and 884 deletions
|
@ -3,6 +3,6 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
#[allow(unused_imports)]
|
||||
use auto::*;
|
||||
use crate::auto::*;
|
||||
|
||||
pub type FrameNumber = i64;
|
||||
|
|
|
@ -2,29 +2,22 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use gio;
|
||||
use gio_sys;
|
||||
use glib;
|
||||
use crate::Extractable;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::pin::Pin;
|
||||
use std::ptr;
|
||||
use Extractable;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Asset(Object<ges_sys::GESAsset, ges_sys::GESAssetClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct Asset(Object<ffi::GESAsset, ffi::GESAssetClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_asset_get_type(),
|
||||
get_type => || ffi::ges_asset_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +25,7 @@ impl Asset {
|
|||
pub fn needs_reload(extractable_type: glib::types::Type, id: Option<&str>) -> bool {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_asset_needs_reload(
|
||||
from_glib(ffi::ges_asset_needs_reload(
|
||||
extractable_type.to_glib(),
|
||||
id.to_glib_none().0,
|
||||
))
|
||||
|
@ -46,11 +39,8 @@ impl Asset {
|
|||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ges_sys::ges_asset_request(
|
||||
extractable_type.to_glib(),
|
||||
id.to_glib_none().0,
|
||||
&mut error,
|
||||
);
|
||||
let ret =
|
||||
ffi::ges_asset_request(extractable_type.to_glib(), id.to_glib_none().0, &mut error);
|
||||
if error.is_null() {
|
||||
Ok(from_glib_full(ret))
|
||||
} else {
|
||||
|
@ -73,12 +63,12 @@ impl Asset {
|
|||
unsafe extern "C" fn request_async_trampoline<
|
||||
Q: FnOnce(Result<Asset, glib::Error>) + Send + 'static,
|
||||
>(
|
||||
_source_object: *mut gobject_sys::GObject,
|
||||
res: *mut gio_sys::GAsyncResult,
|
||||
user_data: glib_sys::gpointer,
|
||||
_source_object: *mut glib::gobject_ffi::GObject,
|
||||
res: *mut gio::ffi::GAsyncResult,
|
||||
user_data: glib::ffi::gpointer,
|
||||
) {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ges_sys::ges_asset_request_finish(res, &mut error);
|
||||
let ret = ffi::ges_asset_request_finish(res, &mut error);
|
||||
let result = if error.is_null() {
|
||||
Ok(from_glib_full(ret))
|
||||
} else {
|
||||
|
@ -89,7 +79,7 @@ impl Asset {
|
|||
}
|
||||
let callback = request_async_trampoline::<Q>;
|
||||
unsafe {
|
||||
ges_sys::ges_asset_request_async(
|
||||
ffi::ges_asset_request_async(
|
||||
extractable_type.to_glib(),
|
||||
id.to_glib_none().0,
|
||||
cancellable.map(|p| p.as_ref()).to_glib_none().0,
|
||||
|
@ -130,7 +120,7 @@ pub trait AssetExt: 'static {
|
|||
|
||||
fn get_extractable_type(&self) -> glib::types::Type;
|
||||
|
||||
fn get_id(&self) -> Option<GString>;
|
||||
fn get_id(&self) -> Option<glib::GString>;
|
||||
|
||||
fn get_proxy(&self) -> Option<Asset>;
|
||||
|
||||
|
@ -152,7 +142,7 @@ impl<O: IsA<Asset>> AssetExt for O {
|
|||
fn extract(&self) -> Result<Extractable, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ges_sys::ges_asset_extract(self.as_ref().to_glib_none().0, &mut error);
|
||||
let ret = ffi::ges_asset_extract(self.as_ref().to_glib_none().0, &mut error);
|
||||
if error.is_null() {
|
||||
Ok(from_glib_none(ret))
|
||||
} else {
|
||||
|
@ -162,28 +152,28 @@ impl<O: IsA<Asset>> AssetExt for O {
|
|||
}
|
||||
|
||||
fn get_error(&self) -> Option<glib::Error> {
|
||||
unsafe { from_glib_none(ges_sys::ges_asset_get_error(self.as_ref().to_glib_none().0)) }
|
||||
unsafe { from_glib_none(ffi::ges_asset_get_error(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn get_extractable_type(&self) -> glib::types::Type {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_asset_get_extractable_type(
|
||||
from_glib(ffi::ges_asset_get_extractable_type(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_id(&self) -> Option<GString> {
|
||||
unsafe { from_glib_none(ges_sys::ges_asset_get_id(self.as_ref().to_glib_none().0)) }
|
||||
fn get_id(&self) -> Option<glib::GString> {
|
||||
unsafe { from_glib_none(ffi::ges_asset_get_id(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn get_proxy(&self) -> Option<Asset> {
|
||||
unsafe { from_glib_none(ges_sys::ges_asset_get_proxy(self.as_ref().to_glib_none().0)) }
|
||||
unsafe { from_glib_none(ffi::ges_asset_get_proxy(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn get_proxy_target(&self) -> Option<Asset> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_asset_get_proxy_target(
|
||||
from_glib_none(ffi::ges_asset_get_proxy_target(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -191,7 +181,7 @@ impl<O: IsA<Asset>> AssetExt for O {
|
|||
|
||||
fn list_proxies(&self) -> Vec<Asset> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ges_sys::ges_asset_list_proxies(
|
||||
FromGlibPtrContainer::from_glib_none(ffi::ges_asset_list_proxies(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -199,8 +189,8 @@ impl<O: IsA<Asset>> AssetExt for O {
|
|||
|
||||
fn set_proxy<P: IsA<Asset>>(&self, proxy: Option<&P>) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_asset_set_proxy(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_asset_set_proxy(
|
||||
self.as_ref().to_glib_none().0,
|
||||
proxy.map(|p| p.as_ref()).to_glib_none().0
|
||||
),
|
||||
|
@ -211,8 +201,8 @@ impl<O: IsA<Asset>> AssetExt for O {
|
|||
|
||||
fn unproxy<P: IsA<Asset>>(&self, proxy: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_asset_unproxy(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_asset_unproxy(
|
||||
self.as_ref().to_glib_none().0,
|
||||
proxy.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -223,9 +213,9 @@ impl<O: IsA<Asset>> AssetExt for O {
|
|||
|
||||
fn connect_property_proxy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_proxy_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESAsset,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESAsset,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Asset>,
|
||||
{
|
||||
|
@ -250,9 +240,9 @@ impl<O: IsA<Asset>> AssetExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_proxy_target_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESAsset,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESAsset,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Asset>,
|
||||
{
|
||||
|
|
|
@ -2,18 +2,17 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use crate::Extractable;
|
||||
use crate::TimelineElement;
|
||||
use crate::TrackElement;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use Extractable;
|
||||
use TimelineElement;
|
||||
use TrackElement;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct BaseEffect(Object<ges_sys::GESBaseEffect, ges_sys::GESBaseEffectClass>) @extends TrackElement, TimelineElement, @implements Extractable;
|
||||
glib::glib_wrapper! {
|
||||
pub struct BaseEffect(Object<ffi::GESBaseEffect, ffi::GESBaseEffectClass>) @extends TrackElement, TimelineElement, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_base_effect_get_type(),
|
||||
get_type => || ffi::ges_base_effect_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +37,7 @@ impl<O: IsA<BaseEffect>> BaseEffectExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn is_time_effect(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_base_effect_is_time_effect(
|
||||
from_glib(ffi::ges_base_effect_is_time_effect(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -48,7 +47,7 @@ impl<O: IsA<BaseEffect>> BaseEffectExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn register_time_property(&self, child_property_name: &str) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_base_effect_register_time_property(
|
||||
from_glib(ffi::ges_base_effect_register_time_property(
|
||||
self.as_ref().to_glib_none().0,
|
||||
child_property_name.to_glib_none().0,
|
||||
))
|
||||
|
@ -58,6 +57,6 @@ impl<O: IsA<BaseEffect>> BaseEffectExt for O {
|
|||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
//fn set_time_translation_funcs(&self, source_to_sink_func: /*Unimplemented*/Fn(&BaseEffect, gst::ClockTime, /*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 3, id: 11 }) -> gst::ClockTime, sink_to_source_func: /*Unimplemented*/Fn(&BaseEffect, gst::ClockTime, /*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 3, id: 11 }) -> gst::ClockTime, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) -> bool {
|
||||
// unsafe { TODO: call ges_sys:ges_base_effect_set_time_translation_funcs() }
|
||||
// unsafe { TODO: call ffi:ges_base_effect_set_time_translation_funcs() }
|
||||
//}
|
||||
}
|
||||
|
|
|
@ -2,40 +2,34 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use crate::Asset;
|
||||
use crate::BaseEffect;
|
||||
use crate::Container;
|
||||
use crate::Extractable;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use crate::FrameNumber;
|
||||
use crate::Layer;
|
||||
use crate::TimelineElement;
|
||||
use crate::Track;
|
||||
use crate::TrackElement;
|
||||
use crate::TrackType;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib_sys;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use gst;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use std::ptr;
|
||||
use Asset;
|
||||
use BaseEffect;
|
||||
use Container;
|
||||
use Extractable;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use FrameNumber;
|
||||
use Layer;
|
||||
use TimelineElement;
|
||||
use Track;
|
||||
use TrackElement;
|
||||
use TrackType;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Clip(Object<ges_sys::GESClip, ges_sys::GESClipClass>) @extends Container, TimelineElement, @implements Extractable;
|
||||
glib::glib_wrapper! {
|
||||
pub struct Clip(Object<ffi::GESClip, ffi::GESClipClass>) @extends Container, TimelineElement, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_clip_get_type(),
|
||||
get_type => || ffi::ges_clip_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,11 +157,11 @@ pub trait ClipExt: 'static {
|
|||
impl<O: IsA<Clip>> ClipExt for O {
|
||||
fn add_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<TrackElement, glib::BoolError> {
|
||||
unsafe {
|
||||
Option::<_>::from_glib_none(ges_sys::ges_clip_add_asset(
|
||||
Option::<_>::from_glib_none(ffi::ges_clip_add_asset(
|
||||
self.as_ref().to_glib_none().0,
|
||||
asset.as_ref().to_glib_none().0,
|
||||
))
|
||||
.ok_or_else(|| glib_bool_error!("Failed to add asset"))
|
||||
.ok_or_else(|| glib::glib_bool_error!("Failed to add asset"))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,7 +174,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
) -> Result<TrackElement, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ges_sys::ges_clip_add_child_to_track(
|
||||
let ret = ffi::ges_clip_add_child_to_track(
|
||||
self.as_ref().to_glib_none().0,
|
||||
child.as_ref().to_glib_none().0,
|
||||
track.as_ref().to_glib_none().0,
|
||||
|
@ -203,7 +197,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_clip_add_top_effect(
|
||||
let _ = ffi::ges_clip_add_top_effect(
|
||||
self.as_ref().to_glib_none().0,
|
||||
effect.as_ref().to_glib_none().0,
|
||||
index,
|
||||
|
@ -223,7 +217,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
type_: glib::types::Type,
|
||||
) -> Option<TrackElement> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_clip_find_track_element(
|
||||
from_glib_full(ffi::ges_clip_find_track_element(
|
||||
self.as_ref().to_glib_none().0,
|
||||
track.map(|p| p.as_ref()).to_glib_none().0,
|
||||
type_.to_glib(),
|
||||
|
@ -238,7 +232,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
type_: glib::types::Type,
|
||||
) -> Vec<TrackElement> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_clip_find_track_elements(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_clip_find_track_elements(
|
||||
self.as_ref().to_glib_none().0,
|
||||
track.map(|p| p.as_ref()).to_glib_none().0,
|
||||
track_type.to_glib(),
|
||||
|
@ -251,7 +245,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn get_duration_limit(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_clip_get_duration_limit(
|
||||
from_glib(ffi::ges_clip_get_duration_limit(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -266,7 +260,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
) -> Result<gst::ClockTime, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ges_sys::ges_clip_get_internal_time_from_timeline_time(
|
||||
let ret = ffi::ges_clip_get_internal_time_from_timeline_time(
|
||||
self.as_ref().to_glib_none().0,
|
||||
child.as_ref().to_glib_none().0,
|
||||
timeline_time.to_glib(),
|
||||
|
@ -281,12 +275,12 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
}
|
||||
|
||||
fn get_layer(&self) -> Option<Layer> {
|
||||
unsafe { from_glib_full(ges_sys::ges_clip_get_layer(self.as_ref().to_glib_none().0)) }
|
||||
unsafe { from_glib_full(ffi::ges_clip_get_layer(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn get_supported_formats(&self) -> TrackType {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_clip_get_supported_formats(
|
||||
from_glib(ffi::ges_clip_get_supported_formats(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -301,7 +295,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
) -> Result<gst::ClockTime, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ges_sys::ges_clip_get_timeline_time_from_internal_time(
|
||||
let ret = ffi::ges_clip_get_timeline_time_from_internal_time(
|
||||
self.as_ref().to_glib_none().0,
|
||||
child.as_ref().to_glib_none().0,
|
||||
internal_time.to_glib(),
|
||||
|
@ -323,7 +317,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
) -> Result<gst::ClockTime, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ges_sys::ges_clip_get_timeline_time_from_source_frame(
|
||||
let ret = ffi::ges_clip_get_timeline_time_from_source_frame(
|
||||
self.as_ref().to_glib_none().0,
|
||||
frame_number,
|
||||
&mut error,
|
||||
|
@ -338,7 +332,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
|
||||
fn get_top_effect_index<P: IsA<BaseEffect>>(&self, effect: &P) -> i32 {
|
||||
unsafe {
|
||||
ges_sys::ges_clip_get_top_effect_index(
|
||||
ffi::ges_clip_get_top_effect_index(
|
||||
self.as_ref().to_glib_none().0,
|
||||
effect.as_ref().to_glib_none().0,
|
||||
)
|
||||
|
@ -347,7 +341,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
|
||||
fn get_top_effect_position<P: IsA<BaseEffect>>(&self, effect: &P) -> i32 {
|
||||
unsafe {
|
||||
ges_sys::ges_clip_get_top_effect_position(
|
||||
ffi::ges_clip_get_top_effect_position(
|
||||
self.as_ref().to_glib_none().0,
|
||||
effect.as_ref().to_glib_none().0,
|
||||
)
|
||||
|
@ -356,7 +350,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
|
||||
fn get_top_effects(&self) -> Vec<TrackElement> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_clip_get_top_effects(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_clip_get_top_effects(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -364,8 +358,8 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
|
||||
fn move_to_layer<P: IsA<Layer>>(&self, layer: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_clip_move_to_layer(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_clip_move_to_layer(
|
||||
self.as_ref().to_glib_none().0,
|
||||
layer.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -379,7 +373,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
fn move_to_layer_full<P: IsA<Layer>>(&self, layer: &P) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_clip_move_to_layer_full(
|
||||
let _ = ffi::ges_clip_move_to_layer_full(
|
||||
self.as_ref().to_glib_none().0,
|
||||
layer.as_ref().to_glib_none().0,
|
||||
&mut error,
|
||||
|
@ -397,7 +391,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
fn remove_top_effect<P: IsA<BaseEffect>>(&self, effect: &P) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_clip_remove_top_effect(
|
||||
let _ = ffi::ges_clip_remove_top_effect(
|
||||
self.as_ref().to_glib_none().0,
|
||||
effect.as_ref().to_glib_none().0,
|
||||
&mut error,
|
||||
|
@ -412,7 +406,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
|
||||
fn set_supported_formats(&self, supportedformats: TrackType) {
|
||||
unsafe {
|
||||
ges_sys::ges_clip_set_supported_formats(
|
||||
ffi::ges_clip_set_supported_formats(
|
||||
self.as_ref().to_glib_none().0,
|
||||
supportedformats.to_glib(),
|
||||
);
|
||||
|
@ -425,8 +419,8 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
newindex: u32,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_clip_set_top_effect_index(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_clip_set_top_effect_index(
|
||||
self.as_ref().to_glib_none().0,
|
||||
effect.as_ref().to_glib_none().0,
|
||||
newindex
|
||||
|
@ -445,7 +439,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_clip_set_top_effect_index_full(
|
||||
let _ = ffi::ges_clip_set_top_effect_index_full(
|
||||
self.as_ref().to_glib_none().0,
|
||||
effect.as_ref().to_glib_none().0,
|
||||
newindex,
|
||||
|
@ -465,8 +459,8 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
newpriority: u32,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_clip_set_top_effect_priority(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_clip_set_top_effect_priority(
|
||||
self.as_ref().to_glib_none().0,
|
||||
effect.as_ref().to_glib_none().0,
|
||||
newpriority
|
||||
|
@ -478,11 +472,11 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
|
||||
fn split(&self, position: u64) -> Result<Clip, glib::BoolError> {
|
||||
unsafe {
|
||||
Option::<_>::from_glib_none(ges_sys::ges_clip_split(
|
||||
Option::<_>::from_glib_none(ffi::ges_clip_split(
|
||||
self.as_ref().to_glib_none().0,
|
||||
position,
|
||||
))
|
||||
.ok_or_else(|| glib_bool_error!("Failed to split clip"))
|
||||
.ok_or_else(|| glib::glib_bool_error!("Failed to split clip"))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -492,7 +486,7 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret =
|
||||
ges_sys::ges_clip_split_full(self.as_ref().to_glib_none().0, position, &mut error);
|
||||
ffi::ges_clip_split_full(self.as_ref().to_glib_none().0, position, &mut error);
|
||||
if error.is_null() {
|
||||
Ok(from_glib_none(ret))
|
||||
} else {
|
||||
|
@ -508,9 +502,9 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_duration_limit_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESClip,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESClip,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Clip>,
|
||||
{
|
||||
|
@ -532,9 +526,9 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
|
||||
fn connect_property_layer_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_layer_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESClip,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESClip,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Clip>,
|
||||
{
|
||||
|
@ -559,9 +553,9 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_supported_formats_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESClip,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESClip,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Clip>,
|
||||
{
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use crate::Edge;
|
||||
use crate::EditMode;
|
||||
use crate::Extractable;
|
||||
use crate::Layer;
|
||||
use crate::TimelineElement;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
|
@ -11,28 +14,21 @@ use glib::signal::SignalHandlerId;
|
|||
use glib::translate::*;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use Edge;
|
||||
use EditMode;
|
||||
use Extractable;
|
||||
use Layer;
|
||||
use TimelineElement;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Container(Object<ges_sys::GESContainer, ges_sys::GESContainerClass>) @extends TimelineElement, @implements Extractable;
|
||||
glib::glib_wrapper! {
|
||||
pub struct Container(Object<ffi::GESContainer, ffi::GESContainerClass>) @extends TimelineElement, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_container_get_type(),
|
||||
get_type => || ffi::ges_container_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl Container {
|
||||
pub fn group(containers: &[Container]) -> Option<Container> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_none(ges_sys::ges_container_group(containers.to_glib_none().0)) }
|
||||
unsafe { from_glib_none(ffi::ges_container_group(containers.to_glib_none().0)) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,8 +71,8 @@ pub trait GESContainerExt: 'static {
|
|||
impl<O: IsA<Container>> GESContainerExt for O {
|
||||
fn add<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_container_add(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_container_add(
|
||||
self.as_ref().to_glib_none().0,
|
||||
child.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -94,8 +90,8 @@ impl<O: IsA<Container>> GESContainerExt for O {
|
|||
position: u64,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_container_edit(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_container_edit(
|
||||
self.as_ref().to_glib_none().0,
|
||||
layers.to_glib_none().0,
|
||||
new_layer_priority,
|
||||
|
@ -110,7 +106,7 @@ impl<O: IsA<Container>> GESContainerExt for O {
|
|||
|
||||
fn get_children(&self, recursive: bool) -> Vec<TimelineElement> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_container_get_children(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_container_get_children(
|
||||
self.as_ref().to_glib_none().0,
|
||||
recursive.to_glib(),
|
||||
))
|
||||
|
@ -119,8 +115,8 @@ impl<O: IsA<Container>> GESContainerExt for O {
|
|||
|
||||
fn remove<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_container_remove(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_container_remove(
|
||||
self.as_ref().to_glib_none().0,
|
||||
child.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -131,7 +127,7 @@ impl<O: IsA<Container>> GESContainerExt for O {
|
|||
|
||||
fn ungroup(&self, recursive: bool) -> Vec<Container> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_container_ungroup(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_container_ungroup(
|
||||
self.as_ref().to_glib_full(),
|
||||
recursive.to_glib(),
|
||||
))
|
||||
|
@ -141,8 +137,8 @@ impl<O: IsA<Container>> GESContainerExt for O {
|
|||
fn get_property_height(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"height\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -158,9 +154,9 @@ impl<O: IsA<Container>> GESContainerExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn child_added_trampoline<P, F: Fn(&P, &TimelineElement) + 'static>(
|
||||
this: *mut ges_sys::GESContainer,
|
||||
element: *mut ges_sys::GESTimelineElement,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESContainer,
|
||||
element: *mut ffi::GESTimelineElement,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Container>,
|
||||
{
|
||||
|
@ -188,9 +184,9 @@ impl<O: IsA<Container>> GESContainerExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn child_removed_trampoline<P, F: Fn(&P, &TimelineElement) + 'static>(
|
||||
this: *mut ges_sys::GESContainer,
|
||||
element: *mut ges_sys::GESTimelineElement,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESContainer,
|
||||
element: *mut ffi::GESTimelineElement,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Container>,
|
||||
{
|
||||
|
@ -215,9 +211,9 @@ impl<O: IsA<Container>> GESContainerExt for O {
|
|||
|
||||
fn connect_property_height_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_height_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESContainer,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESContainer,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Container>,
|
||||
{
|
||||
|
|
|
@ -2,24 +2,20 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use crate::BaseEffect;
|
||||
use crate::Extractable;
|
||||
use crate::TimelineElement;
|
||||
use crate::TrackElement;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use gobject_sys;
|
||||
use BaseEffect;
|
||||
use Extractable;
|
||||
use TimelineElement;
|
||||
use TrackElement;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Effect(Object<ges_sys::GESEffect, ges_sys::GESEffectClass>) @extends BaseEffect, TrackElement, TimelineElement, @implements Extractable;
|
||||
glib::glib_wrapper! {
|
||||
pub struct Effect(Object<ffi::GESEffect, ffi::GESEffectClass>) @extends BaseEffect, TrackElement, TimelineElement, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_effect_get_type(),
|
||||
get_type => || ffi::ges_effect_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,8 +23,8 @@ impl Effect {
|
|||
pub fn new(bin_description: &str) -> Result<Effect, glib::BoolError> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
Option::<_>::from_glib_none(ges_sys::ges_effect_new(bin_description.to_glib_none().0))
|
||||
.ok_or_else(|| glib_bool_error!("Failed to create effect from description"))
|
||||
Option::<_>::from_glib_none(ffi::ges_effect_new(bin_description.to_glib_none().0))
|
||||
.ok_or_else(|| glib::glib_bool_error!("Failed to create effect from description"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,15 +32,15 @@ impl Effect {
|
|||
pub const NONE_EFFECT: Option<&Effect> = None;
|
||||
|
||||
pub trait EffectExt: 'static {
|
||||
fn get_property_bin_description(&self) -> Option<GString>;
|
||||
fn get_property_bin_description(&self) -> Option<glib::GString>;
|
||||
}
|
||||
|
||||
impl<O: IsA<Effect>> EffectExt for O {
|
||||
fn get_property_bin_description(&self) -> Option<GString> {
|
||||
fn get_property_bin_description(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
let mut value = 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,
|
||||
);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib::translate::*;
|
||||
use glib::value::FromValue;
|
||||
use glib::value::FromValueOptional;
|
||||
|
@ -10,7 +9,6 @@ use glib::value::SetValue;
|
|||
use glib::value::Value;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
use gobject_sys;
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
||||
#[non_exhaustive]
|
||||
|
@ -24,21 +22,21 @@ pub enum Edge {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for Edge {
|
||||
type GlibType = ges_sys::GESEdge;
|
||||
type GlibType = ffi::GESEdge;
|
||||
|
||||
fn to_glib(&self) -> ges_sys::GESEdge {
|
||||
fn to_glib(&self) -> ffi::GESEdge {
|
||||
match *self {
|
||||
Edge::Start => ges_sys::GES_EDGE_START,
|
||||
Edge::End => ges_sys::GES_EDGE_END,
|
||||
Edge::None => ges_sys::GES_EDGE_NONE,
|
||||
Edge::Start => ffi::GES_EDGE_START,
|
||||
Edge::End => ffi::GES_EDGE_END,
|
||||
Edge::None => ffi::GES_EDGE_NONE,
|
||||
Edge::__Unknown(value) => value,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ges_sys::GESEdge> for Edge {
|
||||
fn from_glib(value: ges_sys::GESEdge) -> Self {
|
||||
impl FromGlib<ffi::GESEdge> for Edge {
|
||||
fn from_glib(value: ffi::GESEdge) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => Edge::Start,
|
||||
|
@ -51,7 +49,7 @@ impl FromGlib<ges_sys::GESEdge> for Edge {
|
|||
|
||||
impl StaticType for Edge {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ges_sys::ges_edge_get_type()) }
|
||||
unsafe { from_glib(ffi::ges_edge_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,13 +61,13 @@ impl<'a> FromValueOptional<'a> for Edge {
|
|||
|
||||
impl<'a> FromValue<'a> for Edge {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for Edge {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,23 +85,23 @@ pub enum EditMode {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for EditMode {
|
||||
type GlibType = ges_sys::GESEditMode;
|
||||
type GlibType = ffi::GESEditMode;
|
||||
|
||||
fn to_glib(&self) -> ges_sys::GESEditMode {
|
||||
fn to_glib(&self) -> ffi::GESEditMode {
|
||||
match *self {
|
||||
EditMode::Normal => ges_sys::GES_EDIT_MODE_NORMAL,
|
||||
EditMode::Ripple => ges_sys::GES_EDIT_MODE_RIPPLE,
|
||||
EditMode::Roll => ges_sys::GES_EDIT_MODE_ROLL,
|
||||
EditMode::Trim => ges_sys::GES_EDIT_MODE_TRIM,
|
||||
EditMode::Slide => ges_sys::GES_EDIT_MODE_SLIDE,
|
||||
EditMode::Normal => ffi::GES_EDIT_MODE_NORMAL,
|
||||
EditMode::Ripple => ffi::GES_EDIT_MODE_RIPPLE,
|
||||
EditMode::Roll => ffi::GES_EDIT_MODE_ROLL,
|
||||
EditMode::Trim => ffi::GES_EDIT_MODE_TRIM,
|
||||
EditMode::Slide => ffi::GES_EDIT_MODE_SLIDE,
|
||||
EditMode::__Unknown(value) => value,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ges_sys::GESEditMode> for EditMode {
|
||||
fn from_glib(value: ges_sys::GESEditMode) -> Self {
|
||||
impl FromGlib<ffi::GESEditMode> for EditMode {
|
||||
fn from_glib(value: ffi::GESEditMode) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => EditMode::Normal,
|
||||
|
@ -118,7 +116,7 @@ impl FromGlib<ges_sys::GESEditMode> for EditMode {
|
|||
|
||||
impl StaticType for EditMode {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ges_sys::ges_edit_mode_get_type()) }
|
||||
unsafe { from_glib(ffi::ges_edit_mode_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -130,12 +128,12 @@ impl<'a> FromValueOptional<'a> for EditMode {
|
|||
|
||||
impl<'a> FromValue<'a> for EditMode {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for EditMode {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,18 +2,15 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use crate::Asset;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use Asset;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Extractable(Interface<ges_sys::GESExtractable>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct Extractable(Interface<ffi::GESExtractable>);
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_extractable_get_type(),
|
||||
get_type => || ffi::ges_extractable_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,7 +19,7 @@ pub const NONE_EXTRACTABLE: Option<&Extractable> = None;
|
|||
pub trait ExtractableExt: 'static {
|
||||
fn get_asset(&self) -> Option<Asset>;
|
||||
|
||||
fn get_id(&self) -> Option<GString>;
|
||||
fn get_id(&self) -> Option<glib::GString>;
|
||||
|
||||
fn set_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<(), glib::error::BoolError>;
|
||||
}
|
||||
|
@ -30,24 +27,20 @@ pub trait ExtractableExt: 'static {
|
|||
impl<O: IsA<Extractable>> ExtractableExt for O {
|
||||
fn get_asset(&self) -> Option<Asset> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_extractable_get_asset(
|
||||
from_glib_none(ffi::ges_extractable_get_asset(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_id(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_extractable_get_id(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
fn get_id(&self) -> Option<glib::GString> {
|
||||
unsafe { from_glib_full(ffi::ges_extractable_get_id(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn set_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_extractable_set_asset(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_extractable_set_asset(
|
||||
self.as_ref().to_glib_none().0,
|
||||
asset.as_ref().to_glib_none().0
|
||||
),
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use bitflags::bitflags;
|
||||
use glib::translate::*;
|
||||
use glib::value::FromValue;
|
||||
use glib::value::FromValueOptional;
|
||||
|
@ -10,7 +10,6 @@ use glib::value::SetValue;
|
|||
use glib::value::Value;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
use gobject_sys;
|
||||
|
||||
bitflags! {
|
||||
pub struct PipelineFlags: u32 {
|
||||
|
@ -24,16 +23,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for PipelineFlags {
|
||||
type GlibType = ges_sys::GESPipelineFlags;
|
||||
type GlibType = ffi::GESPipelineFlags;
|
||||
|
||||
fn to_glib(&self) -> ges_sys::GESPipelineFlags {
|
||||
fn to_glib(&self) -> ffi::GESPipelineFlags {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ges_sys::GESPipelineFlags> for PipelineFlags {
|
||||
fn from_glib(value: ges_sys::GESPipelineFlags) -> PipelineFlags {
|
||||
impl FromGlib<ffi::GESPipelineFlags> for PipelineFlags {
|
||||
fn from_glib(value: ffi::GESPipelineFlags) -> PipelineFlags {
|
||||
skip_assert_initialized!();
|
||||
PipelineFlags::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -41,7 +40,7 @@ impl FromGlib<ges_sys::GESPipelineFlags> for PipelineFlags {
|
|||
|
||||
impl StaticType for PipelineFlags {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ges_sys::ges_pipeline_flags_get_type()) }
|
||||
unsafe { from_glib(ffi::ges_pipeline_flags_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,13 +52,13 @@ impl<'a> FromValueOptional<'a> for PipelineFlags {
|
|||
|
||||
impl<'a> FromValue<'a> for PipelineFlags {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
|
||||
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for PipelineFlags {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,16 +74,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for TrackType {
|
||||
type GlibType = ges_sys::GESTrackType;
|
||||
type GlibType = ffi::GESTrackType;
|
||||
|
||||
fn to_glib(&self) -> ges_sys::GESTrackType {
|
||||
fn to_glib(&self) -> ffi::GESTrackType {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ges_sys::GESTrackType> for TrackType {
|
||||
fn from_glib(value: ges_sys::GESTrackType) -> TrackType {
|
||||
impl FromGlib<ffi::GESTrackType> for TrackType {
|
||||
fn from_glib(value: ffi::GESTrackType) -> TrackType {
|
||||
skip_assert_initialized!();
|
||||
TrackType::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -92,7 +91,7 @@ impl FromGlib<ges_sys::GESTrackType> for TrackType {
|
|||
|
||||
impl StaticType for TrackType {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ges_sys::ges_track_type_get_type()) }
|
||||
unsafe { from_glib(ffi::ges_track_type_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,12 +103,12 @@ impl<'a> FromValueOptional<'a> for TrackType {
|
|||
|
||||
impl<'a> FromValue<'a> for TrackType {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
|
||||
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for TrackType {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use crate::Container;
|
||||
use crate::Extractable;
|
||||
use crate::TimelineElement;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
|
@ -10,26 +12,21 @@ use glib::signal::SignalHandlerId;
|
|||
use glib::translate::*;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use Container;
|
||||
use Extractable;
|
||||
use TimelineElement;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Group(Object<ges_sys::GESGroup, ges_sys::GESGroupClass>) @extends Container, TimelineElement, @implements Extractable;
|
||||
glib::glib_wrapper! {
|
||||
pub struct Group(Object<ffi::GESGroup, ffi::GESGroupClass>) @extends Container, TimelineElement, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_group_get_type(),
|
||||
get_type => || ffi::ges_group_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl Group {
|
||||
pub fn new() -> Group {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_none(ges_sys::ges_group_new()) }
|
||||
unsafe { from_glib_none(ffi::ges_group_new()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,8 +75,8 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
fn get_property_duration(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"duration\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -92,8 +89,8 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
|
||||
fn set_property_duration(&self, duration: u64) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"duration\0".as_ptr() as *const _,
|
||||
Value::from(&duration).to_glib_none().0,
|
||||
);
|
||||
|
@ -103,8 +100,8 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
fn get_property_in_point(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"in-point\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -117,8 +114,8 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
|
||||
fn set_property_in_point(&self, in_point: u64) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"in-point\0".as_ptr() as *const _,
|
||||
Value::from(&in_point).to_glib_none().0,
|
||||
);
|
||||
|
@ -128,8 +125,8 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
fn get_property_max_duration(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"max-duration\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -142,8 +139,8 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
|
||||
fn set_property_max_duration(&self, max_duration: u64) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"max-duration\0".as_ptr() as *const _,
|
||||
Value::from(&max_duration).to_glib_none().0,
|
||||
);
|
||||
|
@ -153,8 +150,8 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
fn get_property_priority(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"priority\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -167,8 +164,8 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
|
||||
fn set_property_priority(&self, priority: u32) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"priority\0".as_ptr() as *const _,
|
||||
Value::from(&priority).to_glib_none().0,
|
||||
);
|
||||
|
@ -178,8 +175,8 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
fn get_property_start(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"start\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -192,8 +189,8 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
|
||||
fn set_property_start(&self, start: u64) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"start\0".as_ptr() as *const _,
|
||||
Value::from(&start).to_glib_none().0,
|
||||
);
|
||||
|
@ -202,9 +199,9 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
|
||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESGroup,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESGroup,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Group>,
|
||||
{
|
||||
|
@ -226,9 +223,9 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
|
||||
fn connect_property_in_point_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_in_point_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESGroup,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESGroup,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Group>,
|
||||
{
|
||||
|
@ -253,9 +250,9 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_max_duration_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESGroup,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESGroup,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Group>,
|
||||
{
|
||||
|
@ -277,9 +274,9 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
|
||||
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_priority_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESGroup,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESGroup,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Group>,
|
||||
{
|
||||
|
@ -301,9 +298,9 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
|
||||
fn connect_property_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_start_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESGroup,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESGroup,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Group>,
|
||||
{
|
||||
|
|
|
@ -2,41 +2,37 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use crate::Asset;
|
||||
use crate::Clip;
|
||||
use crate::Extractable;
|
||||
use crate::Timeline;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use crate::Track;
|
||||
use crate::TrackType;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib_sys;
|
||||
use gst;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use std::ptr;
|
||||
use Asset;
|
||||
use Clip;
|
||||
use Extractable;
|
||||
use Timeline;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use Track;
|
||||
use TrackType;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Layer(Object<ges_sys::GESLayer, ges_sys::GESLayerClass>) @implements Extractable;
|
||||
glib::glib_wrapper! {
|
||||
pub struct Layer(Object<ffi::GESLayer, ffi::GESLayerClass>) @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_layer_get_type(),
|
||||
get_type => || ffi::ges_layer_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl Layer {
|
||||
pub fn new() -> Layer {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_none(ges_sys::ges_layer_new()) }
|
||||
unsafe { from_glib_none(ffi::ges_layer_new()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,7 +129,7 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
track_types: TrackType,
|
||||
) -> Result<Clip, glib::BoolError> {
|
||||
unsafe {
|
||||
Option::<_>::from_glib_none(ges_sys::ges_layer_add_asset(
|
||||
Option::<_>::from_glib_none(ffi::ges_layer_add_asset(
|
||||
self.as_ref().to_glib_none().0,
|
||||
asset.as_ref().to_glib_none().0,
|
||||
start.to_glib(),
|
||||
|
@ -141,7 +137,7 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
duration.to_glib(),
|
||||
track_types.to_glib(),
|
||||
))
|
||||
.ok_or_else(|| glib_bool_error!("Failed to add asset"))
|
||||
.ok_or_else(|| glib::glib_bool_error!("Failed to add asset"))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,7 +153,7 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
) -> Result<Clip, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ges_sys::ges_layer_add_asset_full(
|
||||
let ret = ffi::ges_layer_add_asset_full(
|
||||
self.as_ref().to_glib_none().0,
|
||||
asset.as_ref().to_glib_none().0,
|
||||
start.to_glib(),
|
||||
|
@ -176,8 +172,8 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
|
||||
fn add_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_layer_add_clip(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_layer_add_clip(
|
||||
self.as_ref().to_glib_none().0,
|
||||
clip.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -191,7 +187,7 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
fn add_clip_full<P: IsA<Clip>>(&self, clip: &P) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_layer_add_clip_full(
|
||||
let _ = ffi::ges_layer_add_clip_full(
|
||||
self.as_ref().to_glib_none().0,
|
||||
clip.as_ref().to_glib_none().0,
|
||||
&mut error,
|
||||
|
@ -208,7 +204,7 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn get_active_for_track<P: IsA<Track>>(&self, track: &P) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_layer_get_active_for_track(
|
||||
from_glib(ffi::ges_layer_get_active_for_track(
|
||||
self.as_ref().to_glib_none().0,
|
||||
track.as_ref().to_glib_none().0,
|
||||
))
|
||||
|
@ -217,7 +213,7 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
|
||||
fn get_auto_transition(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_layer_get_auto_transition(
|
||||
from_glib(ffi::ges_layer_get_auto_transition(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -225,7 +221,7 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
|
||||
fn get_clips(&self) -> Vec<Clip> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_layer_get_clips(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_layer_get_clips(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -233,7 +229,7 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
|
||||
fn get_clips_in_interval(&self, start: gst::ClockTime, end: gst::ClockTime) -> Vec<Clip> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_layer_get_clips_in_interval(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_layer_get_clips_in_interval(
|
||||
self.as_ref().to_glib_none().0,
|
||||
start.to_glib(),
|
||||
end.to_glib(),
|
||||
|
@ -242,33 +238,25 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
}
|
||||
|
||||
fn get_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_layer_get_duration(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
unsafe { from_glib(ffi::ges_layer_get_duration(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn get_priority(&self) -> u32 {
|
||||
unsafe { ges_sys::ges_layer_get_priority(self.as_ref().to_glib_none().0) }
|
||||
unsafe { ffi::ges_layer_get_priority(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_timeline(&self) -> Option<Timeline> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_layer_get_timeline(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
unsafe { from_glib_none(ffi::ges_layer_get_timeline(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn is_empty(&self) -> bool {
|
||||
unsafe { from_glib(ges_sys::ges_layer_is_empty(self.as_ref().to_glib_none().0)) }
|
||||
unsafe { from_glib(ffi::ges_layer_is_empty(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn remove_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_layer_remove_clip(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_layer_remove_clip(
|
||||
self.as_ref().to_glib_none().0,
|
||||
clip.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -281,7 +269,7 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn set_active_for_tracks(&self, active: bool, tracks: &[Track]) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_layer_set_active_for_tracks(
|
||||
from_glib(ffi::ges_layer_set_active_for_tracks(
|
||||
self.as_ref().to_glib_none().0,
|
||||
active.to_glib(),
|
||||
tracks.to_glib_none().0,
|
||||
|
@ -291,7 +279,7 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
|
||||
fn set_auto_transition(&self, auto_transition: bool) {
|
||||
unsafe {
|
||||
ges_sys::ges_layer_set_auto_transition(
|
||||
ffi::ges_layer_set_auto_transition(
|
||||
self.as_ref().to_glib_none().0,
|
||||
auto_transition.to_glib(),
|
||||
);
|
||||
|
@ -300,13 +288,13 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
|
||||
fn set_priority(&self, priority: u32) {
|
||||
unsafe {
|
||||
ges_sys::ges_layer_set_priority(self.as_ref().to_glib_none().0, priority);
|
||||
ffi::ges_layer_set_priority(self.as_ref().to_glib_none().0, priority);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) {
|
||||
unsafe {
|
||||
ges_sys::ges_layer_set_timeline(
|
||||
ffi::ges_layer_set_timeline(
|
||||
self.as_ref().to_glib_none().0,
|
||||
timeline.as_ref().to_glib_none().0,
|
||||
);
|
||||
|
@ -321,9 +309,9 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
|
||||
fn connect_clip_added<F: Fn(&Self, &Clip) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn clip_added_trampoline<P, F: Fn(&P, &Clip) + 'static>(
|
||||
this: *mut ges_sys::GESLayer,
|
||||
clip: *mut ges_sys::GESClip,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESLayer,
|
||||
clip: *mut ffi::GESClip,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Layer>,
|
||||
{
|
||||
|
@ -348,9 +336,9 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
|
||||
fn connect_clip_removed<F: Fn(&Self, &Clip) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn clip_removed_trampoline<P, F: Fn(&P, &Clip) + 'static>(
|
||||
this: *mut ges_sys::GESLayer,
|
||||
clip: *mut ges_sys::GESClip,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESLayer,
|
||||
clip: *mut ffi::GESClip,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Layer>,
|
||||
{
|
||||
|
@ -378,9 +366,9 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_auto_transition_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESLayer,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESLayer,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Layer>,
|
||||
{
|
||||
|
@ -402,9 +390,9 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
|
||||
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_priority_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESLayer,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESLayer,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Layer>,
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use crate::PipelineFlags;
|
||||
use crate::Timeline;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
|
@ -11,28 +11,22 @@ use glib::signal::SignalHandlerId;
|
|||
use glib::translate::*;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_pbutils;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
use PipelineFlags;
|
||||
use Timeline;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Pipeline(Object<ges_sys::GESPipeline, ges_sys::GESPipelineClass>) @extends gst::Pipeline, gst::Element, gst::Object;
|
||||
glib::glib_wrapper! {
|
||||
pub struct Pipeline(Object<ffi::GESPipeline, ffi::GESPipelineClass>) @extends gst::Pipeline, gst::Element, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_pipeline_get_type(),
|
||||
get_type => || ffi::ges_pipeline_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl Pipeline {
|
||||
pub fn new() -> Pipeline {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_none(ges_sys::ges_pipeline_new()) }
|
||||
unsafe { from_glib_none(ffi::ges_pipeline_new()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,16 +106,12 @@ pub trait GESPipelineExt: 'static {
|
|||
|
||||
impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
||||
fn get_mode(&self) -> PipelineFlags {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_pipeline_get_mode(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
unsafe { from_glib(ffi::ges_pipeline_get_mode(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn get_thumbnail(&self, caps: &gst::Caps) -> Option<gst::Sample> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_pipeline_get_thumbnail(
|
||||
from_glib_full(ffi::ges_pipeline_get_thumbnail(
|
||||
self.as_ref().to_glib_none().0,
|
||||
caps.to_glib_none().0,
|
||||
))
|
||||
|
@ -130,7 +120,7 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn get_thumbnail_rgb24(&self, width: i32, height: i32) -> Option<gst::Sample> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_pipeline_get_thumbnail_rgb24(
|
||||
from_glib_full(ffi::ges_pipeline_get_thumbnail_rgb24(
|
||||
self.as_ref().to_glib_none().0,
|
||||
width,
|
||||
height,
|
||||
|
@ -140,7 +130,7 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn preview_get_audio_sink(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_pipeline_preview_get_audio_sink(
|
||||
from_glib_full(ffi::ges_pipeline_preview_get_audio_sink(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -148,7 +138,7 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn preview_get_video_sink(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_pipeline_preview_get_video_sink(
|
||||
from_glib_full(ffi::ges_pipeline_preview_get_video_sink(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -156,7 +146,7 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn preview_set_audio_sink<P: IsA<gst::Element>>(&self, sink: &P) {
|
||||
unsafe {
|
||||
ges_sys::ges_pipeline_preview_set_audio_sink(
|
||||
ffi::ges_pipeline_preview_set_audio_sink(
|
||||
self.as_ref().to_glib_none().0,
|
||||
sink.as_ref().to_glib_none().0,
|
||||
);
|
||||
|
@ -165,7 +155,7 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn preview_set_video_sink<P: IsA<gst::Element>>(&self, sink: &P) {
|
||||
unsafe {
|
||||
ges_sys::ges_pipeline_preview_set_video_sink(
|
||||
ffi::ges_pipeline_preview_set_video_sink(
|
||||
self.as_ref().to_glib_none().0,
|
||||
sink.as_ref().to_glib_none().0,
|
||||
);
|
||||
|
@ -181,7 +171,7 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_pipeline_save_thumbnail(
|
||||
let _ = ffi::ges_pipeline_save_thumbnail(
|
||||
self.as_ref().to_glib_none().0,
|
||||
width,
|
||||
height,
|
||||
|
@ -199,8 +189,8 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn set_mode(&self, mode: PipelineFlags) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_pipeline_set_mode(self.as_ref().to_glib_none().0, mode.to_glib()),
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_pipeline_set_mode(self.as_ref().to_glib_none().0, mode.to_glib()),
|
||||
"Failed to set mode"
|
||||
)
|
||||
}
|
||||
|
@ -212,8 +202,8 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
profile: &P,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_pipeline_set_render_settings(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_pipeline_set_render_settings(
|
||||
self.as_ref().to_glib_none().0,
|
||||
output_uri.to_glib_none().0,
|
||||
profile.as_ref().to_glib_none().0
|
||||
|
@ -225,8 +215,8 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_pipeline_set_timeline(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_pipeline_set_timeline(
|
||||
self.as_ref().to_glib_none().0,
|
||||
timeline.as_ref().to_glib_full()
|
||||
),
|
||||
|
@ -238,8 +228,8 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
fn get_property_audio_filter(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"audio-filter\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -251,8 +241,8 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn set_property_audio_filter<P: IsA<gst::Element>>(&self, audio_filter: Option<&P>) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"audio-filter\0".as_ptr() as *const _,
|
||||
Value::from(audio_filter).to_glib_none().0,
|
||||
);
|
||||
|
@ -262,8 +252,8 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
fn get_property_audio_sink(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"audio-sink\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -275,8 +265,8 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn set_property_audio_sink<P: IsA<gst::Element>>(&self, audio_sink: Option<&P>) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"audio-sink\0".as_ptr() as *const _,
|
||||
Value::from(audio_sink).to_glib_none().0,
|
||||
);
|
||||
|
@ -286,8 +276,8 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
fn get_property_timeline(&self) -> Option<Timeline> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<Timeline as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"timeline\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -300,8 +290,8 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
fn get_property_video_filter(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"video-filter\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -313,8 +303,8 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn set_property_video_filter<P: IsA<gst::Element>>(&self, video_filter: Option<&P>) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"video-filter\0".as_ptr() as *const _,
|
||||
Value::from(video_filter).to_glib_none().0,
|
||||
);
|
||||
|
@ -324,8 +314,8 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
fn get_property_video_sink(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"video-sink\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -337,8 +327,8 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn set_property_video_sink<P: IsA<gst::Element>>(&self, video_sink: Option<&P>) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"video-sink\0".as_ptr() as *const _,
|
||||
Value::from(video_sink).to_glib_none().0,
|
||||
);
|
||||
|
@ -350,9 +340,9 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_audio_filter_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESPipeline,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESPipeline,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Pipeline>,
|
||||
{
|
||||
|
@ -374,9 +364,9 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn connect_property_audio_sink_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_audio_sink_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESPipeline,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESPipeline,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Pipeline>,
|
||||
{
|
||||
|
@ -398,9 +388,9 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn connect_property_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_mode_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESPipeline,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESPipeline,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Pipeline>,
|
||||
{
|
||||
|
@ -422,9 +412,9 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn connect_property_timeline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_timeline_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESPipeline,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESPipeline,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Pipeline>,
|
||||
{
|
||||
|
@ -449,9 +439,9 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_video_filter_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESPipeline,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESPipeline,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Pipeline>,
|
||||
{
|
||||
|
@ -473,9 +463,9 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
|
||||
fn connect_property_video_sink_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_video_sink_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESPipeline,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESPipeline,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Pipeline>,
|
||||
{
|
||||
|
|
|
@ -2,35 +2,29 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use crate::Asset;
|
||||
use crate::Timeline;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib_sys;
|
||||
use gst_pbutils;
|
||||
use libc;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
use Asset;
|
||||
use Timeline;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Project(Object<ges_sys::GESProject, ges_sys::GESProjectClass>) @extends Asset;
|
||||
glib::glib_wrapper! {
|
||||
pub struct Project(Object<ffi::GESProject, ffi::GESProjectClass>) @extends Asset;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_project_get_type(),
|
||||
get_type => || ffi::ges_project_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl Project {
|
||||
pub fn new(uri: Option<&str>) -> Project {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_full(ges_sys::ges_project_new(uri.to_glib_none().0)) }
|
||||
unsafe { from_glib_full(ffi::ges_project_new(uri.to_glib_none().0)) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +54,7 @@ pub trait ProjectExt: 'static {
|
|||
|
||||
fn get_loading_assets(&self) -> Vec<Asset>;
|
||||
|
||||
fn get_uri(&self) -> Option<GString>;
|
||||
fn get_uri(&self) -> Option<glib::GString>;
|
||||
|
||||
fn list_assets(&self, filter: glib::types::Type) -> Vec<Asset>;
|
||||
|
||||
|
@ -102,7 +96,7 @@ pub trait ProjectExt: 'static {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn connect_loading<F: Fn(&Self, &Timeline) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
fn connect_missing_uri<F: Fn(&Self, &glib::Error, &Asset) -> Option<GString> + 'static>(
|
||||
fn connect_missing_uri<F: Fn(&Self, &glib::Error, &Asset) -> Option<glib::GString> + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
|
@ -111,7 +105,7 @@ pub trait ProjectExt: 'static {
|
|||
impl<O: IsA<Project>> ProjectExt for O {
|
||||
fn add_asset<P: IsA<Asset>>(&self, asset: &P) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_project_add_asset(
|
||||
from_glib(ffi::ges_project_add_asset(
|
||||
self.as_ref().to_glib_none().0,
|
||||
asset.as_ref().to_glib_none().0,
|
||||
))
|
||||
|
@ -123,8 +117,8 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
profile: &P,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_project_add_encoding_profile(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_project_add_encoding_profile(
|
||||
self.as_ref().to_glib_none().0,
|
||||
profile.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -136,12 +130,12 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
//fn add_formatter(&self, formatter: /*Ignored*/&Formatter) {
|
||||
// unsafe { TODO: call ges_sys:ges_project_add_formatter() }
|
||||
// unsafe { TODO: call ffi:ges_project_add_formatter() }
|
||||
//}
|
||||
|
||||
fn create_asset(&self, id: Option<&str>, extractable_type: glib::types::Type) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_project_create_asset(
|
||||
from_glib(ffi::ges_project_create_asset(
|
||||
self.as_ref().to_glib_none().0,
|
||||
id.to_glib_none().0,
|
||||
extractable_type.to_glib(),
|
||||
|
@ -156,7 +150,7 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
) -> Result<Option<Asset>, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ges_sys::ges_project_create_asset_sync(
|
||||
let ret = ffi::ges_project_create_asset_sync(
|
||||
self.as_ref().to_glib_none().0,
|
||||
id.to_glib_none().0,
|
||||
extractable_type.to_glib(),
|
||||
|
@ -172,7 +166,7 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
|
||||
fn get_asset(&self, id: &str, extractable_type: glib::types::Type) -> Option<Asset> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_project_get_asset(
|
||||
from_glib_full(ffi::ges_project_get_asset(
|
||||
self.as_ref().to_glib_none().0,
|
||||
id.to_glib_none().0,
|
||||
extractable_type.to_glib(),
|
||||
|
@ -182,19 +176,19 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
|
||||
fn get_loading_assets(&self) -> Vec<Asset> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_project_get_loading_assets(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_project_get_loading_assets(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_uri(&self) -> Option<GString> {
|
||||
unsafe { from_glib_full(ges_sys::ges_project_get_uri(self.as_ref().to_glib_none().0)) }
|
||||
fn get_uri(&self) -> Option<glib::GString> {
|
||||
unsafe { from_glib_full(ffi::ges_project_get_uri(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn list_assets(&self, filter: glib::types::Type) -> Vec<Asset> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_project_list_assets(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_project_list_assets(
|
||||
self.as_ref().to_glib_none().0,
|
||||
filter.to_glib(),
|
||||
))
|
||||
|
@ -203,7 +197,7 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
|
||||
fn list_encoding_profiles(&self) -> Vec<gst_pbutils::EncodingProfile> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ges_sys::ges_project_list_encoding_profiles(
|
||||
FromGlibPtrContainer::from_glib_none(ffi::ges_project_list_encoding_profiles(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -212,7 +206,7 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
fn load<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_project_load(
|
||||
let _ = ffi::ges_project_load(
|
||||
self.as_ref().to_glib_none().0,
|
||||
timeline.as_ref().to_glib_none().0,
|
||||
&mut error,
|
||||
|
@ -227,8 +221,8 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
|
||||
fn remove_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_project_remove_asset(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_project_remove_asset(
|
||||
self.as_ref().to_glib_none().0,
|
||||
asset.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -246,7 +240,7 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_project_save(
|
||||
let _ = ffi::ges_project_save(
|
||||
self.as_ref().to_glib_none().0,
|
||||
timeline.as_ref().to_glib_none().0,
|
||||
uri.to_glib_none().0,
|
||||
|
@ -264,9 +258,9 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
|
||||
fn connect_asset_added<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn asset_added_trampoline<P, F: Fn(&P, &Asset) + 'static>(
|
||||
this: *mut ges_sys::GESProject,
|
||||
asset: *mut ges_sys::GESAsset,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESProject,
|
||||
asset: *mut ffi::GESAsset,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Project>,
|
||||
{
|
||||
|
@ -291,9 +285,9 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
|
||||
fn connect_asset_loading<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn asset_loading_trampoline<P, F: Fn(&P, &Asset) + 'static>(
|
||||
this: *mut ges_sys::GESProject,
|
||||
asset: *mut ges_sys::GESAsset,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESProject,
|
||||
asset: *mut ffi::GESAsset,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Project>,
|
||||
{
|
||||
|
@ -318,9 +312,9 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
|
||||
fn connect_asset_removed<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn asset_removed_trampoline<P, F: Fn(&P, &Asset) + 'static>(
|
||||
this: *mut ges_sys::GESProject,
|
||||
asset: *mut ges_sys::GESAsset,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESProject,
|
||||
asset: *mut ffi::GESAsset,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Project>,
|
||||
{
|
||||
|
@ -353,10 +347,10 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
P,
|
||||
F: Fn(&P, &Timeline, &glib::Error) + 'static,
|
||||
>(
|
||||
this: *mut ges_sys::GESProject,
|
||||
timeline: *mut ges_sys::GESTimeline,
|
||||
error: *mut glib_sys::GError,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESProject,
|
||||
timeline: *mut ffi::GESTimeline,
|
||||
error: *mut glib::ffi::GError,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Project>,
|
||||
{
|
||||
|
@ -390,11 +384,11 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
P,
|
||||
F: Fn(&P, &glib::Error, &str, glib::types::Type) + 'static,
|
||||
>(
|
||||
this: *mut ges_sys::GESProject,
|
||||
error: *mut glib_sys::GError,
|
||||
this: *mut ffi::GESProject,
|
||||
error: *mut glib::ffi::GError,
|
||||
id: *mut libc::c_char,
|
||||
extractable_type: glib_sys::GType,
|
||||
f: glib_sys::gpointer,
|
||||
extractable_type: glib::ffi::GType,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Project>,
|
||||
{
|
||||
|
@ -402,7 +396,7 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
f(
|
||||
&Project::from_glib_borrow(this).unsafe_cast_ref(),
|
||||
&from_glib_borrow(error),
|
||||
&GString::from_glib_borrow(id),
|
||||
&glib::GString::from_glib_borrow(id),
|
||||
from_glib(extractable_type),
|
||||
)
|
||||
}
|
||||
|
@ -421,9 +415,9 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
|
||||
fn connect_loaded<F: Fn(&Self, &Timeline) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn loaded_trampoline<P, F: Fn(&P, &Timeline) + 'static>(
|
||||
this: *mut ges_sys::GESProject,
|
||||
timeline: *mut ges_sys::GESTimeline,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESProject,
|
||||
timeline: *mut ffi::GESTimeline,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Project>,
|
||||
{
|
||||
|
@ -450,9 +444,9 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn connect_loading<F: Fn(&Self, &Timeline) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn loading_trampoline<P, F: Fn(&P, &Timeline) + 'static>(
|
||||
this: *mut ges_sys::GESProject,
|
||||
timeline: *mut ges_sys::GESTimeline,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESProject,
|
||||
timeline: *mut ffi::GESTimeline,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Project>,
|
||||
{
|
||||
|
@ -475,18 +469,20 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn connect_missing_uri<F: Fn(&Self, &glib::Error, &Asset) -> Option<GString> + 'static>(
|
||||
fn connect_missing_uri<
|
||||
F: Fn(&Self, &glib::Error, &Asset) -> Option<glib::GString> + 'static,
|
||||
>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn missing_uri_trampoline<
|
||||
P,
|
||||
F: Fn(&P, &glib::Error, &Asset) -> Option<GString> + 'static,
|
||||
F: Fn(&P, &glib::Error, &Asset) -> Option<glib::GString> + 'static,
|
||||
>(
|
||||
this: *mut ges_sys::GESProject,
|
||||
error: *mut glib_sys::GError,
|
||||
wrong_asset: *mut ges_sys::GESAsset,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESProject,
|
||||
error: *mut glib::ffi::GError,
|
||||
wrong_asset: *mut ffi::GESAsset,
|
||||
f: glib::ffi::gpointer,
|
||||
) -> *mut libc::c_char
|
||||
where
|
||||
P: IsA<Project>,
|
||||
|
|
|
@ -2,56 +2,52 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use crate::Asset;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use crate::Clip;
|
||||
use crate::Extractable;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use crate::FrameNumber;
|
||||
use crate::Group;
|
||||
use crate::Layer;
|
||||
use crate::TimelineElement;
|
||||
use crate::Track;
|
||||
use crate::TrackElement;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib_sys;
|
||||
use gst;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
use Asset;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use Clip;
|
||||
use Extractable;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use FrameNumber;
|
||||
use Group;
|
||||
use Layer;
|
||||
use TimelineElement;
|
||||
use Track;
|
||||
use TrackElement;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Timeline(Object<ges_sys::GESTimeline, ges_sys::GESTimelineClass>) @extends gst::Element, gst::Object, @implements Extractable;
|
||||
glib::glib_wrapper! {
|
||||
pub struct Timeline(Object<ffi::GESTimeline, ffi::GESTimelineClass>) @extends gst::Element, gst::Object, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_timeline_get_type(),
|
||||
get_type => || ffi::ges_timeline_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl Timeline {
|
||||
pub fn new() -> Timeline {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_none(ges_sys::ges_timeline_new()) }
|
||||
unsafe { from_glib_none(ffi::ges_timeline_new()) }
|
||||
}
|
||||
|
||||
pub fn new_audio_video() -> Timeline {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_none(ges_sys::ges_timeline_new_audio_video()) }
|
||||
unsafe { from_glib_none(ffi::ges_timeline_new_audio_video()) }
|
||||
}
|
||||
|
||||
pub fn from_uri(uri: &str) -> Result<Option<Timeline>, glib::Error> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ges_sys::ges_timeline_new_from_uri(uri.to_glib_none().0, &mut error);
|
||||
let ret = ffi::ges_timeline_new_from_uri(uri.to_glib_none().0, &mut error);
|
||||
if error.is_null() {
|
||||
Ok(from_glib_none(ret))
|
||||
} else {
|
||||
|
@ -192,8 +188,8 @@ pub trait TimelineExt: 'static {
|
|||
impl<O: IsA<Timeline>> TimelineExt for O {
|
||||
fn add_layer<P: IsA<Layer>>(&self, layer: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_timeline_add_layer(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_timeline_add_layer(
|
||||
self.as_ref().to_glib_none().0,
|
||||
layer.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -204,8 +200,8 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn add_track<P: IsA<Track>>(&self, track: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_timeline_add_track(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_timeline_add_track(
|
||||
self.as_ref().to_glib_none().0,
|
||||
track.as_ref().to_glib_full()
|
||||
),
|
||||
|
@ -216,19 +212,19 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn append_layer(&self) -> Layer {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_timeline_append_layer(
|
||||
from_glib_none(ffi::ges_timeline_append_layer(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn commit(&self) -> bool {
|
||||
unsafe { from_glib(ges_sys::ges_timeline_commit(self.as_ref().to_glib_none().0)) }
|
||||
unsafe { from_glib(ffi::ges_timeline_commit(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn commit_sync(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_commit_sync(
|
||||
from_glib(ffi::ges_timeline_commit_sync(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -236,7 +232,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn get_auto_transition(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_get_auto_transition(
|
||||
from_glib(ffi::ges_timeline_get_auto_transition(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -244,7 +240,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn get_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_get_duration(
|
||||
from_glib(ffi::ges_timeline_get_duration(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -252,7 +248,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn get_element(&self, name: &str) -> Option<TimelineElement> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_timeline_get_element(
|
||||
from_glib_full(ffi::ges_timeline_get_element(
|
||||
self.as_ref().to_glib_none().0,
|
||||
name.to_glib_none().0,
|
||||
))
|
||||
|
@ -263,7 +259,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn get_frame_at(&self, timestamp: gst::ClockTime) -> FrameNumber {
|
||||
unsafe {
|
||||
ges_sys::ges_timeline_get_frame_at(self.as_ref().to_glib_none().0, timestamp.to_glib())
|
||||
ffi::ges_timeline_get_frame_at(self.as_ref().to_glib_none().0, timestamp.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -271,7 +267,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn get_frame_time(&self, frame_number: FrameNumber) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_get_frame_time(
|
||||
from_glib(ffi::ges_timeline_get_frame_time(
|
||||
self.as_ref().to_glib_none().0,
|
||||
frame_number,
|
||||
))
|
||||
|
@ -280,7 +276,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn get_groups(&self) -> Vec<Group> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ges_sys::ges_timeline_get_groups(
|
||||
FromGlibPtrContainer::from_glib_none(ffi::ges_timeline_get_groups(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -288,7 +284,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn get_layer(&self, priority: u32) -> Option<Layer> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_timeline_get_layer(
|
||||
from_glib_full(ffi::ges_timeline_get_layer(
|
||||
self.as_ref().to_glib_none().0,
|
||||
priority,
|
||||
))
|
||||
|
@ -297,7 +293,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn get_layers(&self) -> Vec<Layer> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_timeline_get_layers(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_timeline_get_layers(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -305,7 +301,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn get_pad_for_track<P: IsA<Track>>(&self, track: &P) -> Option<gst::Pad> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_timeline_get_pad_for_track(
|
||||
from_glib_none(ffi::ges_timeline_get_pad_for_track(
|
||||
self.as_ref().to_glib_none().0,
|
||||
track.as_ref().to_glib_none().0,
|
||||
))
|
||||
|
@ -314,7 +310,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn get_snapping_distance(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_get_snapping_distance(
|
||||
from_glib(ffi::ges_timeline_get_snapping_distance(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -322,7 +318,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn get_track_for_pad<P: IsA<gst::Pad>>(&self, pad: &P) -> Option<Track> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_timeline_get_track_for_pad(
|
||||
from_glib_none(ffi::ges_timeline_get_track_for_pad(
|
||||
self.as_ref().to_glib_none().0,
|
||||
pad.as_ref().to_glib_none().0,
|
||||
))
|
||||
|
@ -331,24 +327,20 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn get_tracks(&self) -> Vec<Track> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_timeline_get_tracks(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_timeline_get_tracks(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_empty(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_is_empty(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
unsafe { from_glib(ffi::ges_timeline_is_empty(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn load_from_uri(&self, uri: &str) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_timeline_load_from_uri(
|
||||
let _ = ffi::ges_timeline_load_from_uri(
|
||||
self.as_ref().to_glib_none().0,
|
||||
uri.to_glib_none().0,
|
||||
&mut error,
|
||||
|
@ -369,8 +361,8 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
new_layer_priority: u32,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_timeline_move_layer(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_timeline_move_layer(
|
||||
self.as_ref().to_glib_none().0,
|
||||
layer.as_ref().to_glib_none().0,
|
||||
new_layer_priority
|
||||
|
@ -387,7 +379,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
layer_priority: i32,
|
||||
) -> Option<TimelineElement> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_timeline_paste_element(
|
||||
from_glib_full(ffi::ges_timeline_paste_element(
|
||||
self.as_ref().to_glib_none().0,
|
||||
element.as_ref().to_glib_none().0,
|
||||
position.to_glib(),
|
||||
|
@ -398,8 +390,8 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn remove_layer<P: IsA<Layer>>(&self, layer: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_timeline_remove_layer(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_timeline_remove_layer(
|
||||
self.as_ref().to_glib_none().0,
|
||||
layer.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -410,8 +402,8 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn remove_track<P: IsA<Track>>(&self, track: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_timeline_remove_track(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_timeline_remove_track(
|
||||
self.as_ref().to_glib_none().0,
|
||||
track.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -428,7 +420,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_timeline_save_to_uri(
|
||||
let _ = ffi::ges_timeline_save_to_uri(
|
||||
self.as_ref().to_glib_none().0,
|
||||
uri.to_glib_none().0,
|
||||
formatter_asset.map(|p| p.as_ref()).to_glib_none().0,
|
||||
|
@ -445,7 +437,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn set_auto_transition(&self, auto_transition: bool) {
|
||||
unsafe {
|
||||
ges_sys::ges_timeline_set_auto_transition(
|
||||
ffi::ges_timeline_set_auto_transition(
|
||||
self.as_ref().to_glib_none().0,
|
||||
auto_transition.to_glib(),
|
||||
);
|
||||
|
@ -454,7 +446,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn set_snapping_distance(&self, snapping_distance: gst::ClockTime) {
|
||||
unsafe {
|
||||
ges_sys::ges_timeline_set_snapping_distance(
|
||||
ffi::ges_timeline_set_snapping_distance(
|
||||
self.as_ref().to_glib_none().0,
|
||||
snapping_distance.to_glib(),
|
||||
);
|
||||
|
@ -463,8 +455,8 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn connect_commited<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn commited_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTimeline,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimeline,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Timeline>,
|
||||
{
|
||||
|
@ -486,9 +478,9 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn connect_group_added<F: Fn(&Self, &Group) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn group_added_trampoline<P, F: Fn(&P, &Group) + 'static>(
|
||||
this: *mut ges_sys::GESTimeline,
|
||||
group: *mut ges_sys::GESGroup,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimeline,
|
||||
group: *mut ffi::GESGroup,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Timeline>,
|
||||
{
|
||||
|
@ -517,9 +509,9 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn connect_layer_added<F: Fn(&Self, &Layer) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn layer_added_trampoline<P, F: Fn(&P, &Layer) + 'static>(
|
||||
this: *mut ges_sys::GESTimeline,
|
||||
layer: *mut ges_sys::GESLayer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimeline,
|
||||
layer: *mut ffi::GESLayer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Timeline>,
|
||||
{
|
||||
|
@ -544,9 +536,9 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn connect_layer_removed<F: Fn(&Self, &Layer) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn layer_removed_trampoline<P, F: Fn(&P, &Layer) + 'static>(
|
||||
this: *mut ges_sys::GESTimeline,
|
||||
layer: *mut ges_sys::GESLayer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimeline,
|
||||
layer: *mut ffi::GESLayer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Timeline>,
|
||||
{
|
||||
|
@ -579,11 +571,11 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
P,
|
||||
F: Fn(&P, &Clip, &TrackElement) -> Track + 'static,
|
||||
>(
|
||||
this: *mut ges_sys::GESTimeline,
|
||||
clip: *mut ges_sys::GESClip,
|
||||
track_element: *mut ges_sys::GESTrackElement,
|
||||
f: glib_sys::gpointer,
|
||||
) -> *mut ges_sys::GESTrack
|
||||
this: *mut ffi::GESTimeline,
|
||||
clip: *mut ffi::GESClip,
|
||||
track_element: *mut ffi::GESTrackElement,
|
||||
f: glib::ffi::gpointer,
|
||||
) -> *mut ffi::GESTrack
|
||||
where
|
||||
P: IsA<Timeline>,
|
||||
{
|
||||
|
@ -620,11 +612,11 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
P,
|
||||
F: Fn(&P, &TrackElement, &TrackElement, u64) + 'static,
|
||||
>(
|
||||
this: *mut ges_sys::GESTimeline,
|
||||
obj1: *mut ges_sys::GESTrackElement,
|
||||
obj2: *mut ges_sys::GESTrackElement,
|
||||
this: *mut ffi::GESTimeline,
|
||||
obj1: *mut ffi::GESTrackElement,
|
||||
obj2: *mut ffi::GESTrackElement,
|
||||
position: u64,
|
||||
f: glib_sys::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Timeline>,
|
||||
{
|
||||
|
@ -657,11 +649,11 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
P,
|
||||
F: Fn(&P, &TrackElement, &TrackElement, u64) + 'static,
|
||||
>(
|
||||
this: *mut ges_sys::GESTimeline,
|
||||
obj1: *mut ges_sys::GESTrackElement,
|
||||
obj2: *mut ges_sys::GESTrackElement,
|
||||
this: *mut ffi::GESTimeline,
|
||||
obj1: *mut ffi::GESTrackElement,
|
||||
obj2: *mut ffi::GESTrackElement,
|
||||
position: u64,
|
||||
f: glib_sys::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Timeline>,
|
||||
{
|
||||
|
@ -688,9 +680,9 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn connect_track_added<F: Fn(&Self, &Track) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn track_added_trampoline<P, F: Fn(&P, &Track) + 'static>(
|
||||
this: *mut ges_sys::GESTimeline,
|
||||
track: *mut ges_sys::GESTrack,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimeline,
|
||||
track: *mut ffi::GESTrack,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Timeline>,
|
||||
{
|
||||
|
@ -715,9 +707,9 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn connect_track_removed<F: Fn(&Self, &Track) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn track_removed_trampoline<P, F: Fn(&P, &Track) + 'static>(
|
||||
this: *mut ges_sys::GESTimeline,
|
||||
track: *mut ges_sys::GESTrack,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimeline,
|
||||
track: *mut ffi::GESTrack,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Timeline>,
|
||||
{
|
||||
|
@ -745,9 +737,9 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_auto_transition_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTimeline,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimeline,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Timeline>,
|
||||
{
|
||||
|
@ -769,9 +761,9 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
|
||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTimeline,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimeline,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Timeline>,
|
||||
{
|
||||
|
@ -796,9 +788,9 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_snapping_distance_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTimeline,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimeline,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Timeline>,
|
||||
{
|
||||
|
|
|
@ -2,19 +2,25 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use crate::Edge;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use crate::EditMode;
|
||||
use crate::Extractable;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use crate::Layer;
|
||||
use crate::Timeline;
|
||||
use crate::TrackType;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use std::boxed::Box as Box_;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
|
@ -23,24 +29,12 @@ use std::mem::transmute;
|
|||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use std::ptr;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use Edge;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use EditMode;
|
||||
use Extractable;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use Layer;
|
||||
use Timeline;
|
||||
use TrackType;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct TimelineElement(Object<ges_sys::GESTimelineElement, ges_sys::GESTimelineElementClass>) @implements Extractable;
|
||||
glib::glib_wrapper! {
|
||||
pub struct TimelineElement(Object<ffi::GESTimelineElement, ffi::GESTimelineElementClass>) @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_timeline_element_get_type(),
|
||||
get_type => || ffi::ges_timeline_element_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,7 +84,7 @@ pub trait TimelineElementExt: 'static {
|
|||
|
||||
fn get_max_duration(&self) -> gst::ClockTime;
|
||||
|
||||
fn get_name(&self) -> Option<GString>;
|
||||
fn get_name(&self) -> Option<glib::GString>;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
|
@ -197,16 +191,16 @@ pub trait TimelineElementExt: 'static {
|
|||
|
||||
impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
||||
//fn add_child_property<P: IsA<glib::Object>>(&self, pspec: /*Ignored*/&glib::ParamSpec, child: &P) -> bool {
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_add_child_property() }
|
||||
// unsafe { TODO: call ffi:ges_timeline_element_add_child_property() }
|
||||
//}
|
||||
|
||||
fn copy(&self, deep: bool) -> Result<TimelineElement, glib::BoolError> {
|
||||
unsafe {
|
||||
Option::<_>::from_glib_none(ges_sys::ges_timeline_element_copy(
|
||||
Option::<_>::from_glib_none(ffi::ges_timeline_element_copy(
|
||||
self.as_ref().to_glib_none().0,
|
||||
deep.to_glib(),
|
||||
))
|
||||
.ok_or_else(|| glib_bool_error!("Failed to copy timeline element"))
|
||||
.ok_or_else(|| glib::glib_bool_error!("Failed to copy timeline element"))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -221,7 +215,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
position: u64,
|
||||
) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_element_edit(
|
||||
from_glib(ffi::ges_timeline_element_edit(
|
||||
self.as_ref().to_glib_none().0,
|
||||
layers.to_glib_none().0,
|
||||
new_layer_priority,
|
||||
|
@ -243,7 +237,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_timeline_element_edit_full(
|
||||
let _ = ffi::ges_timeline_element_edit_full(
|
||||
self.as_ref().to_glib_none().0,
|
||||
new_layer_priority,
|
||||
mode.to_glib(),
|
||||
|
@ -260,24 +254,24 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
}
|
||||
|
||||
//fn get_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_get_child_properties() }
|
||||
// unsafe { TODO: call ffi:ges_timeline_element_get_child_properties() }
|
||||
//}
|
||||
|
||||
//fn get_child_property(&self, property_name: &str, value: /*Ignored*/glib::Value) -> bool {
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_get_child_property() }
|
||||
// unsafe { TODO: call ffi:ges_timeline_element_get_child_property() }
|
||||
//}
|
||||
|
||||
//fn get_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/glib::Value) {
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_get_child_property_by_pspec() }
|
||||
// unsafe { TODO: call ffi:ges_timeline_element_get_child_property_by_pspec() }
|
||||
//}
|
||||
|
||||
//fn get_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) {
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_get_child_property_valist() }
|
||||
// unsafe { TODO: call ffi:ges_timeline_element_get_child_property_valist() }
|
||||
//}
|
||||
|
||||
fn get_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_element_get_duration(
|
||||
from_glib(ffi::ges_timeline_element_get_duration(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -285,7 +279,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn get_inpoint(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_element_get_inpoint(
|
||||
from_glib(ffi::ges_timeline_element_get_inpoint(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -294,20 +288,20 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn get_layer_priority(&self) -> u32 {
|
||||
unsafe { ges_sys::ges_timeline_element_get_layer_priority(self.as_ref().to_glib_none().0) }
|
||||
unsafe { ffi::ges_timeline_element_get_layer_priority(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_max_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_element_get_max_duration(
|
||||
from_glib(ffi::ges_timeline_element_get_max_duration(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_name(&self) -> Option<GString> {
|
||||
fn get_name(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_timeline_element_get_name(
|
||||
from_glib_full(ffi::ges_timeline_element_get_name(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -319,7 +313,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
unsafe {
|
||||
let mut framerate_n = mem::MaybeUninit::uninit();
|
||||
let mut framerate_d = mem::MaybeUninit::uninit();
|
||||
let ret = from_glib(ges_sys::ges_timeline_element_get_natural_framerate(
|
||||
let ret = from_glib(ffi::ges_timeline_element_get_natural_framerate(
|
||||
self.as_ref().to_glib_none().0,
|
||||
framerate_n.as_mut_ptr(),
|
||||
framerate_d.as_mut_ptr(),
|
||||
|
@ -336,19 +330,19 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn get_parent(&self) -> Option<TimelineElement> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_timeline_element_get_parent(
|
||||
from_glib_full(ffi::ges_timeline_element_get_parent(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_priority(&self) -> u32 {
|
||||
unsafe { ges_sys::ges_timeline_element_get_priority(self.as_ref().to_glib_none().0) }
|
||||
unsafe { ffi::ges_timeline_element_get_priority(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_start(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_element_get_start(
|
||||
from_glib(ffi::ges_timeline_element_get_start(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -356,7 +350,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn get_timeline(&self) -> Option<Timeline> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_timeline_element_get_timeline(
|
||||
from_glib_full(ffi::ges_timeline_element_get_timeline(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -364,7 +358,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn get_toplevel_parent(&self) -> Option<TimelineElement> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_timeline_element_get_toplevel_parent(
|
||||
from_glib_full(ffi::ges_timeline_element_get_toplevel_parent(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -372,41 +366,38 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn get_track_types(&self) -> TrackType {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_element_get_track_types(
|
||||
from_glib(ffi::ges_timeline_element_get_track_types(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
//fn list_children_properties(&self) -> /*Ignored*/Vec<glib::ParamSpec> {
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_list_children_properties() }
|
||||
// unsafe { TODO: call ffi:ges_timeline_element_list_children_properties() }
|
||||
//}
|
||||
|
||||
//fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option<glib::Object> {
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_lookup_child() }
|
||||
// unsafe { TODO: call ffi:ges_timeline_element_lookup_child() }
|
||||
//}
|
||||
|
||||
fn paste(&self, paste_position: gst::ClockTime) -> Result<TimelineElement, glib::BoolError> {
|
||||
unsafe {
|
||||
Option::<_>::from_glib_full(ges_sys::ges_timeline_element_paste(
|
||||
Option::<_>::from_glib_full(ffi::ges_timeline_element_paste(
|
||||
self.as_ref().to_glib_none().0,
|
||||
paste_position.to_glib(),
|
||||
))
|
||||
.ok_or_else(|| glib_bool_error!("Failed to paste timeline element"))
|
||||
.ok_or_else(|| glib::glib_bool_error!("Failed to paste timeline element"))
|
||||
}
|
||||
}
|
||||
|
||||
//fn remove_child_property(&self, pspec: /*Ignored*/&glib::ParamSpec) -> bool {
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_remove_child_property() }
|
||||
// unsafe { TODO: call ffi:ges_timeline_element_remove_child_property() }
|
||||
//}
|
||||
|
||||
fn ripple(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_timeline_element_ripple(
|
||||
self.as_ref().to_glib_none().0,
|
||||
start.to_glib()
|
||||
),
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_timeline_element_ripple(self.as_ref().to_glib_none().0, start.to_glib()),
|
||||
"Failed to ripple"
|
||||
)
|
||||
}
|
||||
|
@ -414,11 +405,8 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn ripple_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_timeline_element_ripple_end(
|
||||
self.as_ref().to_glib_none().0,
|
||||
end.to_glib()
|
||||
),
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_timeline_element_ripple_end(self.as_ref().to_glib_none().0, end.to_glib()),
|
||||
"Failed to ripple"
|
||||
)
|
||||
}
|
||||
|
@ -426,11 +414,8 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn roll_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_timeline_element_roll_end(
|
||||
self.as_ref().to_glib_none().0,
|
||||
end.to_glib()
|
||||
),
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_timeline_element_roll_end(self.as_ref().to_glib_none().0, end.to_glib()),
|
||||
"Failed to roll"
|
||||
)
|
||||
}
|
||||
|
@ -438,8 +423,8 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn roll_start(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_timeline_element_roll_start(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_timeline_element_roll_start(
|
||||
self.as_ref().to_glib_none().0,
|
||||
start.to_glib()
|
||||
),
|
||||
|
@ -449,30 +434,30 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
}
|
||||
|
||||
//fn set_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_set_child_properties() }
|
||||
// unsafe { TODO: call ffi:ges_timeline_element_set_child_properties() }
|
||||
//}
|
||||
|
||||
//fn set_child_property(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> bool {
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property() }
|
||||
// unsafe { TODO: call ffi:ges_timeline_element_set_child_property() }
|
||||
//}
|
||||
|
||||
//fn set_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/&glib::Value) {
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property_by_pspec() }
|
||||
// unsafe { TODO: call ffi:ges_timeline_element_set_child_property_by_pspec() }
|
||||
//}
|
||||
|
||||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
//fn set_child_property_full(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> Result<(), glib::Error> {
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property_full() }
|
||||
// unsafe { TODO: call ffi:ges_timeline_element_set_child_property_full() }
|
||||
//}
|
||||
|
||||
//fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) {
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property_valist() }
|
||||
// unsafe { TODO: call ffi:ges_timeline_element_set_child_property_valist() }
|
||||
//}
|
||||
|
||||
fn set_duration(&self, duration: gst::ClockTime) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_element_set_duration(
|
||||
from_glib(ffi::ges_timeline_element_set_duration(
|
||||
self.as_ref().to_glib_none().0,
|
||||
duration.to_glib(),
|
||||
))
|
||||
|
@ -481,7 +466,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn set_inpoint(&self, inpoint: gst::ClockTime) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_element_set_inpoint(
|
||||
from_glib(ffi::ges_timeline_element_set_inpoint(
|
||||
self.as_ref().to_glib_none().0,
|
||||
inpoint.to_glib(),
|
||||
))
|
||||
|
@ -490,7 +475,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn set_max_duration(&self, maxduration: gst::ClockTime) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_element_set_max_duration(
|
||||
from_glib(ffi::ges_timeline_element_set_max_duration(
|
||||
self.as_ref().to_glib_none().0,
|
||||
maxduration.to_glib(),
|
||||
))
|
||||
|
@ -499,8 +484,8 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn set_name(&self, name: Option<&str>) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_timeline_element_set_name(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_timeline_element_set_name(
|
||||
self.as_ref().to_glib_none().0,
|
||||
name.to_glib_none().0
|
||||
),
|
||||
|
@ -514,8 +499,8 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
parent: &P,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_timeline_element_set_parent(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_timeline_element_set_parent(
|
||||
self.as_ref().to_glib_none().0,
|
||||
parent.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -526,7 +511,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn set_priority(&self, priority: u32) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_element_set_priority(
|
||||
from_glib(ffi::ges_timeline_element_set_priority(
|
||||
self.as_ref().to_glib_none().0,
|
||||
priority,
|
||||
))
|
||||
|
@ -535,7 +520,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn set_start(&self, start: gst::ClockTime) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_element_set_start(
|
||||
from_glib(ffi::ges_timeline_element_set_start(
|
||||
self.as_ref().to_glib_none().0,
|
||||
start.to_glib(),
|
||||
))
|
||||
|
@ -544,8 +529,8 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_timeline_element_set_timeline(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_timeline_element_set_timeline(
|
||||
self.as_ref().to_glib_none().0,
|
||||
timeline.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -556,8 +541,8 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn trim(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_timeline_element_trim(self.as_ref().to_glib_none().0, start.to_glib()),
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_timeline_element_trim(self.as_ref().to_glib_none().0, start.to_glib()),
|
||||
"Failed to trim"
|
||||
)
|
||||
}
|
||||
|
@ -566,8 +551,8 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
fn get_property_in_point(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"in-point\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -580,8 +565,8 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn set_property_in_point(&self, in_point: u64) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"in-point\0".as_ptr() as *const _,
|
||||
Value::from(&in_point).to_glib_none().0,
|
||||
);
|
||||
|
@ -591,8 +576,8 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
fn get_property_serialize(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"serialize\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -605,8 +590,8 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn set_property_serialize(&self, serialize: bool) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"serialize\0".as_ptr() as *const _,
|
||||
Value::from(&serialize).to_glib_none().0,
|
||||
);
|
||||
|
@ -631,9 +616,9 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTimelineElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimelineElement,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<TimelineElement>,
|
||||
{
|
||||
|
@ -655,9 +640,9 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn connect_property_in_point_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_in_point_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTimelineElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimelineElement,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<TimelineElement>,
|
||||
{
|
||||
|
@ -682,9 +667,9 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_max_duration_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTimelineElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimelineElement,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<TimelineElement>,
|
||||
{
|
||||
|
@ -706,9 +691,9 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn connect_property_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_name_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTimelineElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimelineElement,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<TimelineElement>,
|
||||
{
|
||||
|
@ -730,9 +715,9 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn connect_property_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_parent_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTimelineElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimelineElement,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<TimelineElement>,
|
||||
{
|
||||
|
@ -754,9 +739,9 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_priority_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTimelineElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimelineElement,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<TimelineElement>,
|
||||
{
|
||||
|
@ -778,9 +763,9 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn connect_property_serialize_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_serialize_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTimelineElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimelineElement,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<TimelineElement>,
|
||||
{
|
||||
|
@ -802,9 +787,9 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn connect_property_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_start_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTimelineElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimelineElement,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<TimelineElement>,
|
||||
{
|
||||
|
@ -826,9 +811,9 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
|
||||
fn connect_property_timeline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_timeline_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTimelineElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTimelineElement,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<TimelineElement>,
|
||||
{
|
||||
|
|
|
@ -2,42 +2,34 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use crate::Timeline;
|
||||
use crate::TrackElement;
|
||||
use crate::TrackType;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use std::ptr;
|
||||
use Timeline;
|
||||
use TrackElement;
|
||||
use TrackType;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Track(Object<ges_sys::GESTrack, ges_sys::GESTrackClass>) @extends gst::Element, gst::Object;
|
||||
glib::glib_wrapper! {
|
||||
pub struct Track(Object<ffi::GESTrack, ffi::GESTrackClass>) @extends gst::Element, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_track_get_type(),
|
||||
get_type => || ffi::ges_track_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl Track {
|
||||
pub fn new(type_: TrackType, caps: &gst::Caps) -> Track {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_none(ges_sys::ges_track_new(type_.to_glib(), caps.to_glib_full())) }
|
||||
unsafe { from_glib_none(ffi::ges_track_new(type_.to_glib(), caps.to_glib_full())) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,7 +79,7 @@ pub trait GESTrackExt: 'static {
|
|||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn get_property_id(&self) -> Option<GString>;
|
||||
fn get_property_id(&self) -> Option<glib::GString>;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
|
@ -126,8 +118,8 @@ pub trait GESTrackExt: 'static {
|
|||
impl<O: IsA<Track>> GESTrackExt for O {
|
||||
fn add_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_track_add_element(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_track_add_element(
|
||||
self.as_ref().to_glib_none().0,
|
||||
object.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -141,7 +133,7 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
fn add_element_full<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_track_add_element_full(
|
||||
let _ = ffi::ges_track_add_element_full(
|
||||
self.as_ref().to_glib_none().0,
|
||||
object.as_ref().to_glib_none().0,
|
||||
&mut error,
|
||||
|
@ -155,45 +147,37 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
}
|
||||
|
||||
fn commit(&self) -> bool {
|
||||
unsafe { from_glib(ges_sys::ges_track_commit(self.as_ref().to_glib_none().0)) }
|
||||
unsafe { from_glib(ffi::ges_track_commit(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn get_caps(&self) -> Option<gst::Caps> {
|
||||
unsafe { from_glib_none(ges_sys::ges_track_get_caps(self.as_ref().to_glib_none().0)) }
|
||||
unsafe { from_glib_none(ffi::ges_track_get_caps(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn get_elements(&self) -> Vec<TrackElement> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_track_get_elements(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_track_get_elements(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_mixing(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_track_get_mixing(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
unsafe { from_glib(ffi::ges_track_get_mixing(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn get_restriction_caps(&self) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_track_get_restriction_caps(
|
||||
from_glib_full(ffi::ges_track_get_restriction_caps(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_timeline(&self) -> Option<Timeline> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_track_get_timeline(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
unsafe { from_glib_none(ffi::ges_track_get_timeline(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn remove_element<P: IsA<TrackElement>>(
|
||||
|
@ -201,8 +185,8 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
object: &P,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_track_remove_element(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_track_remove_element(
|
||||
self.as_ref().to_glib_none().0,
|
||||
object.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -216,7 +200,7 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
fn remove_element_full<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_track_remove_element_full(
|
||||
let _ = ffi::ges_track_remove_element_full(
|
||||
self.as_ref().to_glib_none().0,
|
||||
object.as_ref().to_glib_none().0,
|
||||
&mut error,
|
||||
|
@ -230,18 +214,18 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
}
|
||||
|
||||
//fn set_create_element_for_gap_func<P: Fn(&Track) -> gst::Element + 'static>(&self, func: P) {
|
||||
// unsafe { TODO: call ges_sys:ges_track_set_create_element_for_gap_func() }
|
||||
// unsafe { TODO: call ffi:ges_track_set_create_element_for_gap_func() }
|
||||
//}
|
||||
|
||||
fn set_mixing(&self, mixing: bool) {
|
||||
unsafe {
|
||||
ges_sys::ges_track_set_mixing(self.as_ref().to_glib_none().0, mixing.to_glib());
|
||||
ffi::ges_track_set_mixing(self.as_ref().to_glib_none().0, mixing.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_restriction_caps(&self, caps: &gst::Caps) {
|
||||
unsafe {
|
||||
ges_sys::ges_track_set_restriction_caps(
|
||||
ffi::ges_track_set_restriction_caps(
|
||||
self.as_ref().to_glib_none().0,
|
||||
caps.to_glib_none().0,
|
||||
);
|
||||
|
@ -250,7 +234,7 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
|
||||
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) {
|
||||
unsafe {
|
||||
ges_sys::ges_track_set_timeline(
|
||||
ffi::ges_track_set_timeline(
|
||||
self.as_ref().to_glib_none().0,
|
||||
timeline.as_ref().to_glib_none().0,
|
||||
);
|
||||
|
@ -259,7 +243,7 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
|
||||
fn update_restriction_caps(&self, caps: &gst::Caps) {
|
||||
unsafe {
|
||||
ges_sys::ges_track_update_restriction_caps(
|
||||
ffi::ges_track_update_restriction_caps(
|
||||
self.as_ref().to_glib_none().0,
|
||||
caps.to_glib_none().0,
|
||||
);
|
||||
|
@ -269,8 +253,8 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
fn get_property_duration(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"duration\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -283,11 +267,11 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn get_property_id(&self) -> Option<GString> {
|
||||
fn get_property_id(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
let mut value = 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"id\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -299,8 +283,8 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn set_property_id(&self, id: Option<&str>) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"id\0".as_ptr() as *const _,
|
||||
Value::from(id).to_glib_none().0,
|
||||
);
|
||||
|
@ -310,8 +294,8 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
fn get_property_restriction_caps(&self) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Caps as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"restriction-caps\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -324,8 +308,8 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
fn get_property_track_type(&self) -> TrackType {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<TrackType as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"track-type\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -338,8 +322,8 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
|
||||
fn connect_commited<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn commited_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTrack,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTrack,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Track>,
|
||||
{
|
||||
|
@ -364,9 +348,9 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn track_element_added_trampoline<P, F: Fn(&P, &TrackElement) + 'static>(
|
||||
this: *mut ges_sys::GESTrack,
|
||||
effect: *mut ges_sys::GESTrackElement,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTrack,
|
||||
effect: *mut ffi::GESTrackElement,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Track>,
|
||||
{
|
||||
|
@ -397,9 +381,9 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
P,
|
||||
F: Fn(&P, &TrackElement) + 'static,
|
||||
>(
|
||||
this: *mut ges_sys::GESTrack,
|
||||
effect: *mut ges_sys::GESTrackElement,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTrack,
|
||||
effect: *mut ffi::GESTrackElement,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Track>,
|
||||
{
|
||||
|
@ -424,9 +408,9 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
|
||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTrack,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTrack,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Track>,
|
||||
{
|
||||
|
@ -450,9 +434,9 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn connect_property_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_id_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTrack,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTrack,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Track>,
|
||||
{
|
||||
|
@ -474,9 +458,9 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
|
||||
fn connect_property_mixing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_mixing_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTrack,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTrack,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Track>,
|
||||
{
|
||||
|
@ -501,9 +485,9 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_restriction_caps_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTrack,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTrack,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<Track>,
|
||||
{
|
||||
|
|
|
@ -2,8 +2,13 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use crate::Edge;
|
||||
use crate::EditMode;
|
||||
use crate::Extractable;
|
||||
use crate::Layer;
|
||||
use crate::TimelineElement;
|
||||
use crate::Track;
|
||||
use crate::TrackType;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
|
@ -11,24 +16,14 @@ use glib::signal::SignalHandlerId;
|
|||
use glib::translate::*;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use Edge;
|
||||
use EditMode;
|
||||
use Extractable;
|
||||
use Layer;
|
||||
use TimelineElement;
|
||||
use Track;
|
||||
use TrackType;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct TrackElement(Object<ges_sys::GESTrackElement, ges_sys::GESTrackElementClass>) @extends TimelineElement, @implements Extractable;
|
||||
glib::glib_wrapper! {
|
||||
pub struct TrackElement(Object<ffi::GESTrackElement, ffi::GESTrackElementClass>) @extends TimelineElement, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_track_element_get_type(),
|
||||
get_type => || ffi::ges_track_element_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,7 +137,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
whitelist: &[&str],
|
||||
) {
|
||||
unsafe {
|
||||
ges_sys::ges_track_element_add_children_props(
|
||||
ffi::ges_track_element_add_children_props(
|
||||
self.as_ref().to_glib_none().0,
|
||||
element.as_ref().to_glib_none().0,
|
||||
wanted_categories.to_glib_none().0,
|
||||
|
@ -156,7 +151,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn clamp_control_source(&self, property_name: &str) {
|
||||
unsafe {
|
||||
ges_sys::ges_track_element_clamp_control_source(
|
||||
ffi::ges_track_element_clamp_control_source(
|
||||
self.as_ref().to_glib_none().0,
|
||||
property_name.to_glib_none().0,
|
||||
);
|
||||
|
@ -171,8 +166,8 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
position: u64,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_track_element_edit(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_track_element_edit(
|
||||
self.as_ref().to_glib_none().0,
|
||||
layers.to_glib_none().0,
|
||||
mode.to_glib(),
|
||||
|
@ -185,26 +180,26 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
}
|
||||
|
||||
//fn get_all_control_bindings(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 6, id: 83 } {
|
||||
// unsafe { TODO: call ges_sys:ges_track_element_get_all_control_bindings() }
|
||||
// unsafe { TODO: call ffi:ges_track_element_get_all_control_bindings() }
|
||||
//}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn get_auto_clamp_control_sources(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_track_element_get_auto_clamp_control_sources(
|
||||
from_glib(ffi::ges_track_element_get_auto_clamp_control_sources(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
//fn get_control_binding(&self, property_name: &str) -> /*Ignored*/Option<gst::ControlBinding> {
|
||||
// unsafe { TODO: call ges_sys:ges_track_element_get_control_binding() }
|
||||
// unsafe { TODO: call ffi:ges_track_element_get_control_binding() }
|
||||
//}
|
||||
|
||||
fn get_element(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_track_element_get_element(
|
||||
from_glib_none(ffi::ges_track_element_get_element(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -212,7 +207,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
|
||||
fn get_gnlobject(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_track_element_get_gnlobject(
|
||||
from_glib_none(ffi::ges_track_element_get_gnlobject(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -220,7 +215,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
|
||||
fn get_nleobject(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_track_element_get_nleobject(
|
||||
from_glib_none(ffi::ges_track_element_get_nleobject(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -228,7 +223,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
|
||||
fn get_track(&self) -> Option<Track> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_track_element_get_track(
|
||||
from_glib_none(ffi::ges_track_element_get_track(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -236,7 +231,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
|
||||
fn get_track_type(&self) -> TrackType {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_track_element_get_track_type(
|
||||
from_glib(ffi::ges_track_element_get_track_type(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -246,7 +241,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn has_internal_source(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_track_element_has_internal_source(
|
||||
from_glib(ffi::ges_track_element_has_internal_source(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -254,7 +249,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
|
||||
fn is_active(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_track_element_is_active(
|
||||
from_glib(ffi::ges_track_element_is_active(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -264,20 +259,20 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn is_core(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_track_element_is_core(
|
||||
from_glib(ffi::ges_track_element_is_core(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
//fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option<gst::Element> {
|
||||
// unsafe { TODO: call ges_sys:ges_track_element_lookup_child() }
|
||||
// unsafe { TODO: call ffi:ges_track_element_lookup_child() }
|
||||
//}
|
||||
|
||||
fn remove_control_binding(&self, property_name: &str) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
ges_sys::ges_track_element_remove_control_binding(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::ges_track_element_remove_control_binding(
|
||||
self.as_ref().to_glib_none().0,
|
||||
property_name.to_glib_none().0
|
||||
),
|
||||
|
@ -288,7 +283,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
|
||||
fn set_active(&self, active: bool) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_track_element_set_active(
|
||||
from_glib(ffi::ges_track_element_set_active(
|
||||
self.as_ref().to_glib_none().0,
|
||||
active.to_glib(),
|
||||
))
|
||||
|
@ -299,7 +294,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn set_auto_clamp_control_sources(&self, auto_clamp: bool) {
|
||||
unsafe {
|
||||
ges_sys::ges_track_element_set_auto_clamp_control_sources(
|
||||
ffi::ges_track_element_set_auto_clamp_control_sources(
|
||||
self.as_ref().to_glib_none().0,
|
||||
auto_clamp.to_glib(),
|
||||
);
|
||||
|
@ -307,14 +302,14 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
}
|
||||
|
||||
//fn set_control_source(&self, source: /*Ignored*/&gst::ControlSource, property_name: &str, binding_type: &str) -> bool {
|
||||
// unsafe { TODO: call ges_sys:ges_track_element_set_control_source() }
|
||||
// unsafe { TODO: call ffi:ges_track_element_set_control_source() }
|
||||
//}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn set_has_internal_source(&self, has_internal_source: bool) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_track_element_set_has_internal_source(
|
||||
from_glib(ffi::ges_track_element_set_has_internal_source(
|
||||
self.as_ref().to_glib_none().0,
|
||||
has_internal_source.to_glib(),
|
||||
))
|
||||
|
@ -323,18 +318,15 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
|
||||
fn set_track_type(&self, type_: TrackType) {
|
||||
unsafe {
|
||||
ges_sys::ges_track_element_set_track_type(
|
||||
self.as_ref().to_glib_none().0,
|
||||
type_.to_glib(),
|
||||
);
|
||||
ffi::ges_track_element_set_track_type(self.as_ref().to_glib_none().0, type_.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_active(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"active\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -350,8 +342,8 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
fn get_property_has_internal_source(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"has-internal-source\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -372,9 +364,9 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
|
||||
fn connect_property_active_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_active_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTrackElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTrackElement,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<TrackElement>,
|
||||
{
|
||||
|
@ -401,9 +393,9 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_auto_clamp_control_sources_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTrackElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTrackElement,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<TrackElement>,
|
||||
{
|
||||
|
@ -430,9 +422,9 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_has_internal_source_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTrackElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTrackElement,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<TrackElement>,
|
||||
{
|
||||
|
@ -454,9 +446,9 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
|
||||
fn connect_property_track_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_track_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTrackElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTrackElement,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<TrackElement>,
|
||||
{
|
||||
|
@ -478,9 +470,9 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
|
||||
fn connect_property_track_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_track_type_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTrackElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESTrackElement,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<TrackElement>,
|
||||
{
|
||||
|
|
|
@ -2,30 +2,25 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use crate::Clip;
|
||||
use crate::Container;
|
||||
use crate::Extractable;
|
||||
use crate::TimelineElement;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use Clip;
|
||||
use Container;
|
||||
use Extractable;
|
||||
use TimelineElement;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct UriClip(Object<ges_sys::GESUriClip, ges_sys::GESUriClipClass>) @extends Clip, Container, TimelineElement, @implements Extractable;
|
||||
glib::glib_wrapper! {
|
||||
pub struct UriClip(Object<ffi::GESUriClip, ffi::GESUriClipClass>) @extends Clip, Container, TimelineElement, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_uri_clip_get_type(),
|
||||
get_type => || ffi::ges_uri_clip_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,8 +28,8 @@ impl UriClip {
|
|||
pub fn new(uri: &str) -> Result<UriClip, glib::BoolError> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
Option::<_>::from_glib_none(ges_sys::ges_uri_clip_new(uri.to_glib_none().0))
|
||||
.ok_or_else(|| glib_bool_error!("Failed to create Uri clip from Uri"))
|
||||
Option::<_>::from_glib_none(ffi::ges_uri_clip_new(uri.to_glib_none().0))
|
||||
.ok_or_else(|| glib::glib_bool_error!("Failed to create Uri clip from Uri"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +37,7 @@ impl UriClip {
|
|||
pub const NONE_URI_CLIP: Option<&UriClip> = None;
|
||||
|
||||
pub trait UriClipExt: 'static {
|
||||
fn get_uri(&self) -> Option<GString>;
|
||||
fn get_uri(&self) -> Option<glib::GString>;
|
||||
|
||||
fn is_image(&self) -> bool;
|
||||
|
||||
|
@ -67,47 +62,35 @@ pub trait UriClipExt: 'static {
|
|||
}
|
||||
|
||||
impl<O: IsA<UriClip>> UriClipExt for O {
|
||||
fn get_uri(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_uri_clip_get_uri(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
fn get_uri(&self) -> Option<glib::GString> {
|
||||
unsafe { from_glib_none(ffi::ges_uri_clip_get_uri(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn is_image(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_uri_clip_is_image(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
unsafe { from_glib(ffi::ges_uri_clip_is_image(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn is_muted(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_uri_clip_is_muted(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
unsafe { from_glib(ffi::ges_uri_clip_is_muted(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
fn set_is_image(&self, is_image: bool) {
|
||||
unsafe {
|
||||
ges_sys::ges_uri_clip_set_is_image(self.as_ref().to_glib_none().0, is_image.to_glib());
|
||||
ffi::ges_uri_clip_set_is_image(self.as_ref().to_glib_none().0, is_image.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_mute(&self, mute: bool) {
|
||||
unsafe {
|
||||
ges_sys::ges_uri_clip_set_mute(self.as_ref().to_glib_none().0, mute.to_glib());
|
||||
ffi::ges_uri_clip_set_mute(self.as_ref().to_glib_none().0, mute.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_is_image(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"is-image\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -121,8 +104,8 @@ impl<O: IsA<UriClip>> UriClipExt for O {
|
|||
fn get_property_mute(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"mute\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -135,9 +118,9 @@ impl<O: IsA<UriClip>> UriClipExt for O {
|
|||
|
||||
fn connect_property_is_image_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_is_image_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESUriClip,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESUriClip,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<UriClip>,
|
||||
{
|
||||
|
@ -159,9 +142,9 @@ impl<O: IsA<UriClip>> UriClipExt for O {
|
|||
|
||||
fn connect_property_mute_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_mute_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESUriClip,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESUriClip,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<UriClip>,
|
||||
{
|
||||
|
@ -186,9 +169,9 @@ impl<O: IsA<UriClip>> UriClipExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_supported_formats_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESUriClip,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESUriClip,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<UriClip>,
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use crate::Asset;
|
||||
use crate::UriSourceAsset;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
|
@ -13,21 +13,15 @@ use glib::translate::*;
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_pbutils;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
use Asset;
|
||||
use UriSourceAsset;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct UriClipAsset(Object<ges_sys::GESUriClipAsset, ges_sys::GESUriClipAssetClass>) @extends Asset;
|
||||
glib::glib_wrapper! {
|
||||
pub struct UriClipAsset(Object<ffi::GESUriClipAsset, ffi::GESUriClipAssetClass>) @extends Asset;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_uri_clip_asset_get_type(),
|
||||
get_type => || ffi::ges_uri_clip_asset_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,18 +29,18 @@ impl UriClipAsset {
|
|||
//#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
//pub fn finish(res: /*Ignored*/&gio::AsyncResult) -> Result<UriClipAsset, glib::Error> {
|
||||
// unsafe { TODO: call ges_sys:ges_uri_clip_asset_finish() }
|
||||
// unsafe { TODO: call ffi:ges_uri_clip_asset_finish() }
|
||||
//}
|
||||
|
||||
//pub fn new<P: IsA<gio::Cancellable>, Q: FnOnce(Result<(), glib::Error>) + 'static>(uri: &str, cancellable: Option<&P>, callback: Q) {
|
||||
// unsafe { TODO: call ges_sys:ges_uri_clip_asset_new() }
|
||||
// unsafe { TODO: call ffi:ges_uri_clip_asset_new() }
|
||||
//}
|
||||
|
||||
pub fn request_sync(uri: &str) -> Result<UriClipAsset, glib::Error> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ges_sys::ges_uri_clip_asset_request_sync(uri.to_glib_none().0, &mut error);
|
||||
let ret = ffi::ges_uri_clip_asset_request_sync(uri.to_glib_none().0, &mut error);
|
||||
if error.is_null() {
|
||||
Ok(from_glib_full(ret))
|
||||
} else {
|
||||
|
@ -92,7 +86,7 @@ pub trait UriClipAssetExt: 'static {
|
|||
impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
||||
fn get_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_uri_clip_asset_get_duration(
|
||||
from_glib(ffi::ges_uri_clip_asset_get_duration(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -100,7 +94,7 @@ impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
|||
|
||||
fn get_info(&self) -> Option<gst_pbutils::DiscovererInfo> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_uri_clip_asset_get_info(const_override(
|
||||
from_glib_none(ffi::ges_uri_clip_asset_get_info(const_override(
|
||||
self.as_ref().to_glib_none().0,
|
||||
)))
|
||||
}
|
||||
|
@ -110,7 +104,7 @@ impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn get_max_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_uri_clip_asset_get_max_duration(
|
||||
from_glib(ffi::ges_uri_clip_asset_get_max_duration(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -118,7 +112,7 @@ impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
|||
|
||||
fn get_stream_assets(&self) -> Vec<UriSourceAsset> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ges_sys::ges_uri_clip_asset_get_stream_assets(
|
||||
FromGlibPtrContainer::from_glib_none(ffi::ges_uri_clip_asset_get_stream_assets(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -128,7 +122,7 @@ impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn is_image(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_uri_clip_asset_is_image(
|
||||
from_glib(ffi::ges_uri_clip_asset_is_image(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -136,8 +130,8 @@ impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
|||
|
||||
fn set_property_duration(&self, duration: u64) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"duration\0".as_ptr() as *const _,
|
||||
Value::from(&duration).to_glib_none().0,
|
||||
);
|
||||
|
@ -149,8 +143,8 @@ impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
|||
fn get_property_is_nested_timeline(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"is-nested-timeline\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -163,9 +157,9 @@ impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
|||
|
||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESUriClipAsset,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESUriClipAsset,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<UriClipAsset>,
|
||||
{
|
||||
|
@ -192,9 +186,9 @@ impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_is_nested_timeline_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESUriClipAsset,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GESUriClipAsset,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<UriClipAsset>,
|
||||
{
|
||||
|
|
|
@ -2,19 +2,16 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use crate::Asset;
|
||||
use crate::UriClipAsset;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use gst_pbutils;
|
||||
use Asset;
|
||||
use UriClipAsset;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct UriSourceAsset(Object<ges_sys::GESUriSourceAsset, ges_sys::GESUriSourceAssetClass>) @extends Asset;
|
||||
glib::glib_wrapper! {
|
||||
pub struct UriSourceAsset(Object<ffi::GESUriSourceAsset, ffi::GESUriSourceAssetClass>) @extends Asset;
|
||||
|
||||
match fn {
|
||||
get_type => || ges_sys::ges_uri_source_asset_get_type(),
|
||||
get_type => || ffi::ges_uri_source_asset_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +22,7 @@ pub trait UriSourceAssetExt: 'static {
|
|||
|
||||
fn get_stream_info(&self) -> Option<gst_pbutils::DiscovererStreamInfo>;
|
||||
|
||||
fn get_stream_uri(&self) -> Option<GString>;
|
||||
fn get_stream_uri(&self) -> Option<glib::GString>;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
|
@ -35,7 +32,7 @@ pub trait UriSourceAssetExt: 'static {
|
|||
impl<O: IsA<UriSourceAsset>> UriSourceAssetExt for O {
|
||||
fn get_filesource_asset(&self) -> Option<UriClipAsset> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_uri_source_asset_get_filesource_asset(
|
||||
from_glib_none(ffi::ges_uri_source_asset_get_filesource_asset(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -43,15 +40,15 @@ impl<O: IsA<UriSourceAsset>> UriSourceAssetExt for O {
|
|||
|
||||
fn get_stream_info(&self) -> Option<gst_pbutils::DiscovererStreamInfo> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_uri_source_asset_get_stream_info(
|
||||
from_glib_none(ffi::ges_uri_source_asset_get_stream_info(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_stream_uri(&self) -> Option<GString> {
|
||||
fn get_stream_uri(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_uri_source_asset_get_stream_uri(
|
||||
from_glib_none(ffi::ges_uri_source_asset_get_stream_uri(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -61,7 +58,7 @@ impl<O: IsA<UriSourceAsset>> UriSourceAssetExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn is_image(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_uri_source_asset_is_image(
|
||||
from_glib(ffi::ges_uri_source_asset_is_image(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 062b3d6)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ b84cead5)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 694b4b8)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 42578da2)
|
||||
|
|
Loading…
Reference in a new issue