forked from mirrors/gstreamer-rs
ges: Update bindings to 1.16.0
This commit is contained in:
parent
6071c68ab6
commit
0c0c056770
5 changed files with 363 additions and 114 deletions
File diff suppressed because it is too large
Load diff
|
@ -410,16 +410,16 @@ where P: IsA<Timeline> {
|
|||
f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(layer))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn snapping_ended_trampoline<P, F: Fn(&P, &TrackElement, &TrackElement, u64) + 'static>(this: *mut ges_sys::GESTimeline, object: *mut ges_sys::GESTrackElement, p0: *mut ges_sys::GESTrackElement, p1: u64, f: glib_sys::gpointer)
|
||||
unsafe extern "C" fn snapping_ended_trampoline<P, F: Fn(&P, &TrackElement, &TrackElement, u64) + 'static>(this: *mut ges_sys::GESTimeline, obj1: *mut ges_sys::GESTrackElement, obj2: *mut ges_sys::GESTrackElement, position: u64, f: glib_sys::gpointer)
|
||||
where P: IsA<Timeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object), &from_glib_borrow(p0), p1)
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(obj1), &from_glib_borrow(obj2), position)
|
||||
}
|
||||
|
||||
unsafe extern "C" fn snapping_started_trampoline<P, F: Fn(&P, &TrackElement, &TrackElement, u64) + 'static>(this: *mut ges_sys::GESTimeline, object: *mut ges_sys::GESTrackElement, p0: *mut ges_sys::GESTrackElement, p1: u64, f: glib_sys::gpointer)
|
||||
unsafe extern "C" fn snapping_started_trampoline<P, F: Fn(&P, &TrackElement, &TrackElement, u64) + 'static>(this: *mut ges_sys::GESTimeline, obj1: *mut ges_sys::GESTrackElement, obj2: *mut ges_sys::GESTrackElement, position: u64, f: glib_sys::gpointer)
|
||||
where P: IsA<Timeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object), &from_glib_borrow(p0), p1)
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(obj1), &from_glib_borrow(obj2), position)
|
||||
}
|
||||
|
||||
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)
|
||||
|
|
|
@ -48,6 +48,8 @@ pub trait TimelineElementExt: 'static {
|
|||
|
||||
fn get_inpoint(&self) -> gst::ClockTime;
|
||||
|
||||
fn get_layer_priority(&self) -> u32;
|
||||
|
||||
fn get_max_duration(&self) -> gst::ClockTime;
|
||||
|
||||
fn get_name(&self) -> Option<GString>;
|
||||
|
@ -88,19 +90,19 @@ pub trait TimelineElementExt: 'static {
|
|||
|
||||
//fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported);
|
||||
|
||||
fn set_duration(&self, duration: gst::ClockTime);
|
||||
fn set_duration(&self, duration: gst::ClockTime) -> bool;
|
||||
|
||||
fn set_inpoint(&self, inpoint: gst::ClockTime);
|
||||
fn set_inpoint(&self, inpoint: gst::ClockTime) -> bool;
|
||||
|
||||
fn set_max_duration(&self, maxduration: gst::ClockTime);
|
||||
fn set_max_duration(&self, maxduration: gst::ClockTime) -> bool;
|
||||
|
||||
fn set_name(&self, name: Option<&str>) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
fn set_parent<P: IsA<TimelineElement>>(&self, parent: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
fn set_priority(&self, priority: u32);
|
||||
fn set_priority(&self, priority: u32) -> bool;
|
||||
|
||||
fn set_start(&self, start: gst::ClockTime);
|
||||
fn set_start(&self, start: gst::ClockTime) -> bool;
|
||||
|
||||
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
|
@ -174,6 +176,12 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_layer_priority(&self) -> u32 {
|
||||
unsafe {
|
||||
ges_sys::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(self.as_ref().to_glib_none().0))
|
||||
|
@ -280,21 +288,21 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
// unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property_valist() }
|
||||
//}
|
||||
|
||||
fn set_duration(&self, duration: gst::ClockTime) {
|
||||
fn set_duration(&self, duration: gst::ClockTime) -> bool {
|
||||
unsafe {
|
||||
ges_sys::ges_timeline_element_set_duration(self.as_ref().to_glib_none().0, duration.to_glib());
|
||||
from_glib(ges_sys::ges_timeline_element_set_duration(self.as_ref().to_glib_none().0, duration.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
fn set_inpoint(&self, inpoint: gst::ClockTime) {
|
||||
fn set_inpoint(&self, inpoint: gst::ClockTime) -> bool {
|
||||
unsafe {
|
||||
ges_sys::ges_timeline_element_set_inpoint(self.as_ref().to_glib_none().0, inpoint.to_glib());
|
||||
from_glib(ges_sys::ges_timeline_element_set_inpoint(self.as_ref().to_glib_none().0, inpoint.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
fn set_max_duration(&self, maxduration: gst::ClockTime) {
|
||||
fn set_max_duration(&self, maxduration: gst::ClockTime) -> bool {
|
||||
unsafe {
|
||||
ges_sys::ges_timeline_element_set_max_duration(self.as_ref().to_glib_none().0, maxduration.to_glib());
|
||||
from_glib(ges_sys::ges_timeline_element_set_max_duration(self.as_ref().to_glib_none().0, maxduration.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -310,15 +318,15 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn set_priority(&self, priority: u32) {
|
||||
fn set_priority(&self, priority: u32) -> bool {
|
||||
unsafe {
|
||||
ges_sys::ges_timeline_element_set_priority(self.as_ref().to_glib_none().0, priority);
|
||||
from_glib(ges_sys::ges_timeline_element_set_priority(self.as_ref().to_glib_none().0, priority))
|
||||
}
|
||||
}
|
||||
|
||||
fn set_start(&self, start: gst::ClockTime) {
|
||||
fn set_start(&self, start: gst::ClockTime) -> bool {
|
||||
unsafe {
|
||||
ges_sys::ges_timeline_element_set_start(self.as_ref().to_glib_none().0, start.to_glib());
|
||||
from_glib(ges_sys::ges_timeline_element_set_start(self.as_ref().to_glib_none().0, start.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,16 +29,20 @@ glib_wrapper! {
|
|||
}
|
||||
|
||||
impl UriClipAsset {
|
||||
//pub fn finish(res: /*Ignored*/&gio::AsyncResult) -> Result<UriClipAsset, Error> {
|
||||
// unsafe { TODO: call ges_sys:ges_uri_clip_asset_finish() }
|
||||
//}
|
||||
|
||||
//pub fn new<P: IsA<gio::Cancellable>, Q: FnOnce(Result<(), Error>) + 'static>(uri: &str, cancellable: Option<&P>, callback: Q) {
|
||||
// unsafe { TODO: call ges_sys:ges_uri_clip_asset_new() }
|
||||
//}
|
||||
|
||||
pub fn request_sync(uri: &str) -> Result<Option<UriClipAsset>, Error> {
|
||||
pub fn request_sync(uri: &str) -> Result<UriClipAsset, 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);
|
||||
if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) }
|
||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cf0b0e)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
|
|
Loading…
Reference in a new issue