forked from mirrors/gstreamer-rs
Regenerate everything with new version of gir
This commit is contained in:
parent
fa988fe73d
commit
5c93e134a7
160 changed files with 678 additions and 1056 deletions
|
@ -8,6 +8,7 @@ work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -8,6 +8,7 @@ work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -8,6 +8,7 @@ work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -8,6 +8,7 @@ work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -8,6 +8,7 @@ work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -7,6 +7,7 @@ target_path = "gstreamer-editing-services"
|
||||||
work_mode = "normal"
|
work_mode = "normal"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
@ -169,4 +170,4 @@ trait_name = "GESTrackExt"
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "remove_element"
|
name = "remove_element"
|
||||||
[object.function.return]
|
[object.function.return]
|
||||||
bool_return_is_error = "Failed to remove element"
|
bool_return_is_error = "Failed to remove element"
|
||||||
|
|
|
@ -8,6 +8,7 @@ work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -8,6 +8,7 @@ work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -8,6 +8,7 @@ work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -8,6 +8,7 @@ work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -9,6 +9,7 @@ concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
doc_target_path = "docs/gstreamer-rtsp/docs.md"
|
doc_target_path = "docs/gstreamer-rtsp/docs.md"
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -9,6 +9,7 @@ concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
doc_target_path = "docs/gstreamer-rtsp-server/docs.md"
|
doc_target_path = "docs/gstreamer-rtsp-server/docs.md"
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -9,6 +9,7 @@ concurrency = "send"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
doc_target_path = "docs/gstreamer-sdp/docs.md"
|
doc_target_path = "docs/gstreamer-sdp/docs.md"
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -8,6 +8,7 @@ work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -8,6 +8,7 @@ work_mode = "normal"
|
||||||
concurrency = "send+sync"
|
concurrency = "send+sync"
|
||||||
generate_safety_asserts = true
|
generate_safety_asserts = true
|
||||||
single_version_file = true
|
single_version_file = true
|
||||||
|
generate_display_trait = false
|
||||||
|
|
||||||
external_libraries = [
|
external_libraries = [
|
||||||
"GLib",
|
"GLib",
|
||||||
|
|
|
@ -6,7 +6,7 @@ use ffi;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
|
@ -15,9 +15,7 @@ use gst_base;
|
||||||
use gst_base_ffi;
|
use gst_base_ffi;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct AppSink(Object<ffi::GstAppSink, ffi::GstAppSinkClass>): [
|
pub struct AppSink(Object<ffi::GstAppSink, ffi::GstAppSinkClass>): [
|
||||||
|
@ -148,21 +146,21 @@ impl AppSink {
|
||||||
pub fn get_property_buffer_list(&self) -> bool {
|
pub fn get_property_buffer_list(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "buffer-list".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"buffer-list\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_buffer_list(&self, buffer_list: bool) {
|
pub fn set_property_buffer_list(&self, buffer_list: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "buffer-list".to_glib_none().0, Value::from(&buffer_list).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"buffer-list\0".as_ptr() as *const _, Value::from(&buffer_list).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_eos(&self) -> bool {
|
pub fn get_property_eos(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "eos".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"eos\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -170,7 +168,7 @@ impl AppSink {
|
||||||
pub fn connect_eos<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_eos<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "eos",
|
connect_raw(self.to_glib_none().0, b"eos\0".as_ptr() as *const _,
|
||||||
transmute(eos_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(eos_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -178,7 +176,7 @@ impl AppSink {
|
||||||
pub fn connect_new_preroll<F: Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_new_preroll<F: Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "new-preroll",
|
connect_raw(self.to_glib_none().0, b"new-preroll\0".as_ptr() as *const _,
|
||||||
transmute(new_preroll_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(new_preroll_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,7 +184,7 @@ impl AppSink {
|
||||||
pub fn connect_new_sample<F: Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_new_sample<F: Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "new-sample",
|
connect_raw(self.to_glib_none().0, b"new-sample\0".as_ptr() as *const _,
|
||||||
transmute(new_sample_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(new_sample_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,7 +192,7 @@ impl AppSink {
|
||||||
pub fn connect_property_buffer_list_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_buffer_list_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::buffer-list",
|
connect_raw(self.to_glib_none().0, b"notify::buffer-list\0".as_ptr() as *const _,
|
||||||
transmute(notify_buffer_list_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_buffer_list_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,7 +200,7 @@ impl AppSink {
|
||||||
pub fn connect_property_caps_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_caps_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::caps",
|
connect_raw(self.to_glib_none().0, b"notify::caps\0".as_ptr() as *const _,
|
||||||
transmute(notify_caps_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_caps_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -210,7 +208,7 @@ impl AppSink {
|
||||||
pub fn connect_property_drop_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_drop_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::drop",
|
connect_raw(self.to_glib_none().0, b"notify::drop\0".as_ptr() as *const _,
|
||||||
transmute(notify_drop_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_drop_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,7 +216,7 @@ impl AppSink {
|
||||||
pub fn connect_property_emit_signals_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_emit_signals_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::emit-signals",
|
connect_raw(self.to_glib_none().0, b"notify::emit-signals\0".as_ptr() as *const _,
|
||||||
transmute(notify_emit_signals_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_emit_signals_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -226,7 +224,7 @@ impl AppSink {
|
||||||
pub fn connect_property_eos_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_eos_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::eos",
|
connect_raw(self.to_glib_none().0, b"notify::eos\0".as_ptr() as *const _,
|
||||||
transmute(notify_eos_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_eos_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -234,7 +232,7 @@ impl AppSink {
|
||||||
pub fn connect_property_max_buffers_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_max_buffers_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::max-buffers",
|
connect_raw(self.to_glib_none().0, b"notify::max-buffers\0".as_ptr() as *const _,
|
||||||
transmute(notify_max_buffers_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_max_buffers_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -242,7 +240,7 @@ impl AppSink {
|
||||||
pub fn connect_property_wait_on_eos_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_wait_on_eos_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSink) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::wait-on-eos",
|
connect_raw(self.to_glib_none().0, b"notify::wait-on-eos\0".as_ptr() as *const _,
|
||||||
transmute(notify_wait_on_eos_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_wait_on_eos_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ use ffi;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
|
@ -17,9 +17,7 @@ use gst_base_ffi;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use libc;
|
use libc;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct AppSrc(Object<ffi::GstAppSrc, ffi::GstAppSrcClass>): [
|
pub struct AppSrc(Object<ffi::GstAppSrc, ffi::GstAppSrcClass>): [
|
||||||
|
@ -136,105 +134,105 @@ impl AppSrc {
|
||||||
pub fn get_property_block(&self) -> bool {
|
pub fn get_property_block(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "block".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"block\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_block(&self, block: bool) {
|
pub fn set_property_block(&self, block: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "block".to_glib_none().0, Value::from(&block).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"block\0".as_ptr() as *const _, Value::from(&block).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_duration(&self) -> u64 {
|
pub fn get_property_duration(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "duration".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_duration(&self, duration: u64) {
|
pub fn set_property_duration(&self, duration: u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "duration".to_glib_none().0, Value::from(&duration).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_format(&self) -> gst::Format {
|
pub fn get_property_format(&self) -> gst::Format {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Format as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Format as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "format".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"format\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_format(&self, format: gst::Format) {
|
pub fn set_property_format(&self, format: gst::Format) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "format".to_glib_none().0, Value::from(&format).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"format\0".as_ptr() as *const _, Value::from(&format).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_is_live(&self) -> bool {
|
pub fn get_property_is_live(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "is-live".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"is-live\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_is_live(&self, is_live: bool) {
|
pub fn set_property_is_live(&self, is_live: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "is-live".to_glib_none().0, Value::from(&is_live).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"is-live\0".as_ptr() as *const _, Value::from(&is_live).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_max_latency(&self) -> i64 {
|
pub fn get_property_max_latency(&self) -> i64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<i64 as StaticType>::static_type());
|
let mut value = Value::from_type(<i64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "max-latency".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"max-latency\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_max_latency(&self, max_latency: i64) {
|
pub fn set_property_max_latency(&self, max_latency: i64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "max-latency".to_glib_none().0, Value::from(&max_latency).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"max-latency\0".as_ptr() as *const _, Value::from(&max_latency).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_min_latency(&self) -> i64 {
|
pub fn get_property_min_latency(&self) -> i64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<i64 as StaticType>::static_type());
|
let mut value = Value::from_type(<i64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "min-latency".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"min-latency\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_min_latency(&self, min_latency: i64) {
|
pub fn set_property_min_latency(&self, min_latency: i64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "min-latency".to_glib_none().0, Value::from(&min_latency).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"min-latency\0".as_ptr() as *const _, Value::from(&min_latency).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_min_percent(&self) -> u32 {
|
pub fn get_property_min_percent(&self) -> u32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "min-percent".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"min-percent\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_min_percent(&self, min_percent: u32) {
|
pub fn set_property_min_percent(&self, min_percent: u32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "min-percent".to_glib_none().0, Value::from(&min_percent).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"min-percent\0".as_ptr() as *const _, Value::from(&min_percent).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn connect_enough_data<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_enough_data<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "enough-data",
|
connect_raw(self.to_glib_none().0, b"enough-data\0".as_ptr() as *const _,
|
||||||
transmute(enough_data_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(enough_data_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -242,7 +240,7 @@ impl AppSrc {
|
||||||
pub fn connect_need_data<F: Fn(&AppSrc, u32) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_need_data<F: Fn(&AppSrc, u32) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc, u32) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc, u32) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "need-data",
|
connect_raw(self.to_glib_none().0, b"need-data\0".as_ptr() as *const _,
|
||||||
transmute(need_data_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(need_data_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -250,7 +248,7 @@ impl AppSrc {
|
||||||
pub fn connect_seek_data<F: Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_seek_data<F: Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "seek-data",
|
connect_raw(self.to_glib_none().0, b"seek-data\0".as_ptr() as *const _,
|
||||||
transmute(seek_data_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(seek_data_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -258,7 +256,7 @@ impl AppSrc {
|
||||||
pub fn connect_property_block_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_block_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::block",
|
connect_raw(self.to_glib_none().0, b"notify::block\0".as_ptr() as *const _,
|
||||||
transmute(notify_block_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_block_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -266,7 +264,7 @@ impl AppSrc {
|
||||||
pub fn connect_property_caps_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_caps_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::caps",
|
connect_raw(self.to_glib_none().0, b"notify::caps\0".as_ptr() as *const _,
|
||||||
transmute(notify_caps_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_caps_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -274,7 +272,7 @@ impl AppSrc {
|
||||||
pub fn connect_property_current_level_bytes_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_current_level_bytes_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::current-level-bytes",
|
connect_raw(self.to_glib_none().0, b"notify::current-level-bytes\0".as_ptr() as *const _,
|
||||||
transmute(notify_current_level_bytes_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_current_level_bytes_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -282,7 +280,7 @@ impl AppSrc {
|
||||||
pub fn connect_property_duration_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_duration_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::duration",
|
connect_raw(self.to_glib_none().0, b"notify::duration\0".as_ptr() as *const _,
|
||||||
transmute(notify_duration_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_duration_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -290,7 +288,7 @@ impl AppSrc {
|
||||||
pub fn connect_property_emit_signals_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_emit_signals_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::emit-signals",
|
connect_raw(self.to_glib_none().0, b"notify::emit-signals\0".as_ptr() as *const _,
|
||||||
transmute(notify_emit_signals_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_emit_signals_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -298,7 +296,7 @@ impl AppSrc {
|
||||||
pub fn connect_property_format_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_format_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::format",
|
connect_raw(self.to_glib_none().0, b"notify::format\0".as_ptr() as *const _,
|
||||||
transmute(notify_format_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_format_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -306,7 +304,7 @@ impl AppSrc {
|
||||||
pub fn connect_property_is_live_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_is_live_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::is-live",
|
connect_raw(self.to_glib_none().0, b"notify::is-live\0".as_ptr() as *const _,
|
||||||
transmute(notify_is_live_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_is_live_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -314,7 +312,7 @@ impl AppSrc {
|
||||||
pub fn connect_property_max_bytes_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_max_bytes_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::max-bytes",
|
connect_raw(self.to_glib_none().0, b"notify::max-bytes\0".as_ptr() as *const _,
|
||||||
transmute(notify_max_bytes_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_max_bytes_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -322,7 +320,7 @@ impl AppSrc {
|
||||||
pub fn connect_property_max_latency_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_max_latency_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::max-latency",
|
connect_raw(self.to_glib_none().0, b"notify::max-latency\0".as_ptr() as *const _,
|
||||||
transmute(notify_max_latency_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_max_latency_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -330,7 +328,7 @@ impl AppSrc {
|
||||||
pub fn connect_property_min_latency_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_min_latency_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::min-latency",
|
connect_raw(self.to_glib_none().0, b"notify::min-latency\0".as_ptr() as *const _,
|
||||||
transmute(notify_min_latency_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_min_latency_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -338,7 +336,7 @@ impl AppSrc {
|
||||||
pub fn connect_property_min_percent_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_min_percent_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::min-percent",
|
connect_raw(self.to_glib_none().0, b"notify::min-percent\0".as_ptr() as *const _,
|
||||||
transmute(notify_min_percent_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_min_percent_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -346,7 +344,7 @@ impl AppSrc {
|
||||||
pub fn connect_property_size_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_size_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::size",
|
connect_raw(self.to_glib_none().0, b"notify::size\0".as_ptr() as *const _,
|
||||||
transmute(notify_size_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_size_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -354,7 +352,7 @@ impl AppSrc {
|
||||||
pub fn connect_property_stream_type_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_stream_type_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::stream-type",
|
connect_raw(self.to_glib_none().0, b"notify::stream-type\0".as_ptr() as *const _,
|
||||||
transmute(notify_stream_type_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_stream_type_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ b5ea065)
|
Generated by gir (https://github.com/gtk-rs/gir @ 811e711)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
|
|
|
@ -3,13 +3,10 @@
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use ffi;
|
use ffi;
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
use gst;
|
use gst;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
|
|
|
@ -4,18 +4,14 @@
|
||||||
|
|
||||||
use StreamVolumeFormat;
|
use StreamVolumeFormat;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct StreamVolume(Object<ffi::GstStreamVolume, ffi::GstStreamVolumeInterface>);
|
pub struct StreamVolume(Object<ffi::GstStreamVolume, ffi::GstStreamVolumeInterface>);
|
||||||
|
@ -37,7 +33,7 @@ impl StreamVolume {
|
||||||
unsafe impl Send for StreamVolume {}
|
unsafe impl Send for StreamVolume {}
|
||||||
unsafe impl Sync for StreamVolume {}
|
unsafe impl Sync for StreamVolume {}
|
||||||
|
|
||||||
pub trait StreamVolumeExt {
|
pub trait StreamVolumeExt: 'static {
|
||||||
fn get_mute(&self) -> bool;
|
fn get_mute(&self) -> bool;
|
||||||
|
|
||||||
fn get_volume(&self, format: StreamVolumeFormat) -> f64;
|
fn get_volume(&self, format: StreamVolumeFormat) -> f64;
|
||||||
|
@ -51,7 +47,7 @@ pub trait StreamVolumeExt {
|
||||||
fn connect_property_volume_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_volume_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<StreamVolume> + IsA<glib::object::Object>> StreamVolumeExt for O {
|
impl<O: IsA<StreamVolume>> StreamVolumeExt for O {
|
||||||
fn get_mute(&self) -> bool {
|
fn get_mute(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(ffi::gst_stream_volume_get_mute(self.to_glib_none().0))
|
from_glib(ffi::gst_stream_volume_get_mute(self.to_glib_none().0))
|
||||||
|
@ -79,7 +75,7 @@ impl<O: IsA<StreamVolume> + IsA<glib::object::Object>> StreamVolumeExt for O {
|
||||||
fn connect_property_mute_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_mute_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::mute",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::mute\0".as_ptr() as *const _,
|
||||||
transmute(notify_mute_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_mute_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,7 +83,7 @@ impl<O: IsA<StreamVolume> + IsA<glib::object::Object>> StreamVolumeExt for O {
|
||||||
fn connect_property_volume_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_volume_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::volume",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::volume\0".as_ptr() as *const _,
|
||||||
transmute(notify_volume_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_volume_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ b5ea065)
|
Generated by gir (https://github.com/gtk-rs/gir @ 811e711)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
|
|
|
@ -6,11 +6,8 @@ use ffi;
|
||||||
use glib;
|
use glib;
|
||||||
use glib::ObjectExt;
|
use glib::ObjectExt;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct Adapter(Object<ffi::GstAdapter, ffi::GstAdapterClass>);
|
pub struct Adapter(Object<ffi::GstAdapter, ffi::GstAdapterClass>);
|
||||||
|
|
|
@ -4,22 +4,19 @@
|
||||||
|
|
||||||
use AggregatorClass;
|
use AggregatorClass;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct Aggregator(Object<ffi::GstAggregator, ffi::GstAggregatorClass, AggregatorClass>): [
|
pub struct Aggregator(Object<ffi::GstAggregator, ffi::GstAggregatorClass, AggregatorClass>): [
|
||||||
|
@ -35,7 +32,7 @@ glib_wrapper! {
|
||||||
unsafe impl Send for Aggregator {}
|
unsafe impl Send for Aggregator {}
|
||||||
unsafe impl Sync for Aggregator {}
|
unsafe impl Sync for Aggregator {}
|
||||||
|
|
||||||
pub trait AggregatorExt {
|
pub trait AggregatorExt: 'static {
|
||||||
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams);
|
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams);
|
||||||
|
|
||||||
|
@ -61,7 +58,7 @@ pub trait AggregatorExt {
|
||||||
fn connect_property_start_time_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_start_time_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Aggregator> + IsA<glib::object::Object>> AggregatorExt for O {
|
impl<O: IsA<Aggregator>> AggregatorExt for O {
|
||||||
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
|
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
|
||||||
// unsafe { TODO: call ffi::gst_aggregator_get_allocator() }
|
// unsafe { TODO: call ffi::gst_aggregator_get_allocator() }
|
||||||
|
@ -98,14 +95,14 @@ impl<O: IsA<Aggregator> + IsA<glib::object::Object>> AggregatorExt for O {
|
||||||
fn get_property_start_time(&self) -> u64 {
|
fn get_property_start_time(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "start-time".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start-time\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_start_time(&self, start_time: u64) {
|
fn set_property_start_time(&self, start_time: u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "start-time".to_glib_none().0, Value::from(&start_time).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start-time\0".as_ptr() as *const _, Value::from(&start_time).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +110,7 @@ impl<O: IsA<Aggregator> + IsA<glib::object::Object>> AggregatorExt for O {
|
||||||
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::latency",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::latency\0".as_ptr() as *const _,
|
||||||
transmute(notify_latency_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_latency_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,7 +118,7 @@ impl<O: IsA<Aggregator> + IsA<glib::object::Object>> AggregatorExt for O {
|
||||||
fn connect_property_start_time_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_start_time_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::start-time",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::start-time\0".as_ptr() as *const _,
|
||||||
transmute(notify_start_time_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_start_time_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,12 +6,8 @@ use AggregatorPadClass;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct AggregatorPad(Object<ffi::GstAggregatorPad, ffi::GstAggregatorPadClass, AggregatorPadClass>): [
|
pub struct AggregatorPad(Object<ffi::GstAggregatorPad, ffi::GstAggregatorPadClass, AggregatorPadClass>): [
|
||||||
|
@ -27,7 +23,7 @@ glib_wrapper! {
|
||||||
unsafe impl Send for AggregatorPad {}
|
unsafe impl Send for AggregatorPad {}
|
||||||
unsafe impl Sync for AggregatorPad {}
|
unsafe impl Sync for AggregatorPad {}
|
||||||
|
|
||||||
pub trait AggregatorPadExt {
|
pub trait AggregatorPadExt: 'static {
|
||||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn drop_buffer(&self) -> bool;
|
fn drop_buffer(&self) -> bool;
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,12 @@
|
||||||
|
|
||||||
use BaseSinkClass;
|
use BaseSinkClass;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
|
@ -19,7 +18,6 @@ use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct BaseSink(Object<ffi::GstBaseSink, ffi::GstBaseSinkClass, BaseSinkClass>): [
|
pub struct BaseSink(Object<ffi::GstBaseSink, ffi::GstBaseSinkClass, BaseSinkClass>): [
|
||||||
|
@ -35,7 +33,7 @@ glib_wrapper! {
|
||||||
unsafe impl Send for BaseSink {}
|
unsafe impl Send for BaseSink {}
|
||||||
unsafe impl Sync for BaseSink {}
|
unsafe impl Sync for BaseSink {}
|
||||||
|
|
||||||
pub trait BaseSinkExt {
|
pub trait BaseSinkExt: 'static {
|
||||||
//fn do_preroll(&self, obj: /*Ignored*/&gst::MiniObject) -> gst::FlowReturn;
|
//fn do_preroll(&self, obj: /*Ignored*/&gst::MiniObject) -> gst::FlowReturn;
|
||||||
|
|
||||||
fn get_blocksize(&self) -> u32;
|
fn get_blocksize(&self) -> u32;
|
||||||
|
@ -131,7 +129,7 @@ pub trait BaseSinkExt {
|
||||||
fn connect_property_ts_offset_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_ts_offset_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<BaseSink> + IsA<glib::object::Object>> BaseSinkExt for O {
|
impl<O: IsA<BaseSink>> BaseSinkExt for O {
|
||||||
//fn do_preroll(&self, obj: /*Ignored*/&gst::MiniObject) -> gst::FlowReturn {
|
//fn do_preroll(&self, obj: /*Ignored*/&gst::MiniObject) -> gst::FlowReturn {
|
||||||
// unsafe { TODO: call ffi::gst_base_sink_do_preroll() }
|
// unsafe { TODO: call ffi::gst_base_sink_do_preroll() }
|
||||||
//}
|
//}
|
||||||
|
@ -318,49 +316,49 @@ impl<O: IsA<BaseSink> + IsA<glib::object::Object>> BaseSinkExt for O {
|
||||||
fn get_property_async(&self) -> bool {
|
fn get_property_async(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "async".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"async\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_async(&self, async: bool) {
|
fn set_property_async(&self, async: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "async".to_glib_none().0, Value::from(&async).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"async\0".as_ptr() as *const _, Value::from(&async).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property_enable_last_sample(&self) -> bool {
|
fn get_property_enable_last_sample(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "enable-last-sample".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"enable-last-sample\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_enable_last_sample(&self, enable_last_sample: bool) {
|
fn set_property_enable_last_sample(&self, enable_last_sample: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "enable-last-sample".to_glib_none().0, Value::from(&enable_last_sample).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"enable-last-sample\0".as_ptr() as *const _, Value::from(&enable_last_sample).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property_qos(&self) -> bool {
|
fn get_property_qos(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "qos".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_qos(&self, qos: bool) {
|
fn set_property_qos(&self, qos: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "qos".to_glib_none().0, Value::from(&qos).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, Value::from(&qos).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_property_async_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_async_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::async",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::async\0".as_ptr() as *const _,
|
||||||
transmute(notify_async_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_async_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -368,7 +366,7 @@ impl<O: IsA<BaseSink> + IsA<glib::object::Object>> BaseSinkExt for O {
|
||||||
fn connect_property_blocksize_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_blocksize_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::blocksize",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::blocksize\0".as_ptr() as *const _,
|
||||||
transmute(notify_blocksize_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_blocksize_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -376,7 +374,7 @@ impl<O: IsA<BaseSink> + IsA<glib::object::Object>> BaseSinkExt for O {
|
||||||
fn connect_property_enable_last_sample_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_enable_last_sample_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::enable-last-sample",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::enable-last-sample\0".as_ptr() as *const _,
|
||||||
transmute(notify_enable_last_sample_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_enable_last_sample_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -384,7 +382,7 @@ impl<O: IsA<BaseSink> + IsA<glib::object::Object>> BaseSinkExt for O {
|
||||||
fn connect_property_last_sample_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_last_sample_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::last-sample",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::last-sample\0".as_ptr() as *const _,
|
||||||
transmute(notify_last_sample_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_last_sample_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -392,7 +390,7 @@ impl<O: IsA<BaseSink> + IsA<glib::object::Object>> BaseSinkExt for O {
|
||||||
fn connect_property_max_bitrate_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_max_bitrate_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::max-bitrate",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::max-bitrate\0".as_ptr() as *const _,
|
||||||
transmute(notify_max_bitrate_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_max_bitrate_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -400,7 +398,7 @@ impl<O: IsA<BaseSink> + IsA<glib::object::Object>> BaseSinkExt for O {
|
||||||
fn connect_property_max_lateness_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_max_lateness_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::max-lateness",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::max-lateness\0".as_ptr() as *const _,
|
||||||
transmute(notify_max_lateness_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_max_lateness_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -408,7 +406,7 @@ impl<O: IsA<BaseSink> + IsA<glib::object::Object>> BaseSinkExt for O {
|
||||||
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::qos",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::qos\0".as_ptr() as *const _,
|
||||||
transmute(notify_qos_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_qos_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -416,7 +414,7 @@ impl<O: IsA<BaseSink> + IsA<glib::object::Object>> BaseSinkExt for O {
|
||||||
fn connect_property_render_delay_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_render_delay_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::render-delay",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::render-delay\0".as_ptr() as *const _,
|
||||||
transmute(notify_render_delay_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_render_delay_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -424,7 +422,7 @@ impl<O: IsA<BaseSink> + IsA<glib::object::Object>> BaseSinkExt for O {
|
||||||
fn connect_property_sync_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_sync_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::sync",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::sync\0".as_ptr() as *const _,
|
||||||
transmute(notify_sync_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_sync_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -432,7 +430,7 @@ impl<O: IsA<BaseSink> + IsA<glib::object::Object>> BaseSinkExt for O {
|
||||||
fn connect_property_throttle_time_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_throttle_time_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::throttle-time",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::throttle-time\0".as_ptr() as *const _,
|
||||||
transmute(notify_throttle_time_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_throttle_time_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -440,7 +438,7 @@ impl<O: IsA<BaseSink> + IsA<glib::object::Object>> BaseSinkExt for O {
|
||||||
fn connect_property_ts_offset_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_ts_offset_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::ts-offset",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::ts-offset\0".as_ptr() as *const _,
|
||||||
transmute(notify_ts_offset_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_ts_offset_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,13 +4,12 @@
|
||||||
|
|
||||||
use BaseSrcClass;
|
use BaseSrcClass;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
|
@ -19,7 +18,6 @@ use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct BaseSrc(Object<ffi::GstBaseSrc, ffi::GstBaseSrcClass, BaseSrcClass>): [
|
pub struct BaseSrc(Object<ffi::GstBaseSrc, ffi::GstBaseSrcClass, BaseSrcClass>): [
|
||||||
|
@ -35,7 +33,7 @@ glib_wrapper! {
|
||||||
unsafe impl Send for BaseSrc {}
|
unsafe impl Send for BaseSrc {}
|
||||||
unsafe impl Sync for BaseSrc {}
|
unsafe impl Sync for BaseSrc {}
|
||||||
|
|
||||||
pub trait BaseSrcExt {
|
pub trait BaseSrcExt: 'static {
|
||||||
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams);
|
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams);
|
||||||
|
|
||||||
fn get_blocksize(&self) -> u32;
|
fn get_blocksize(&self) -> u32;
|
||||||
|
@ -91,7 +89,7 @@ pub trait BaseSrcExt {
|
||||||
fn connect_property_typefind_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_typefind_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<BaseSrc> + IsA<glib::object::Object>> BaseSrcExt for O {
|
impl<O: IsA<BaseSrc>> BaseSrcExt for O {
|
||||||
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
|
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
|
||||||
// unsafe { TODO: call ffi::gst_base_src_get_allocator() }
|
// unsafe { TODO: call ffi::gst_base_src_get_allocator() }
|
||||||
//}
|
//}
|
||||||
|
@ -211,35 +209,35 @@ impl<O: IsA<BaseSrc> + IsA<glib::object::Object>> BaseSrcExt for O {
|
||||||
fn get_property_num_buffers(&self) -> i32 {
|
fn get_property_num_buffers(&self) -> i32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "num-buffers".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"num-buffers\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_num_buffers(&self, num_buffers: i32) {
|
fn set_property_num_buffers(&self, num_buffers: i32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "num-buffers".to_glib_none().0, Value::from(&num_buffers).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"num-buffers\0".as_ptr() as *const _, Value::from(&num_buffers).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property_typefind(&self) -> bool {
|
fn get_property_typefind(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "typefind".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"typefind\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_typefind(&self, typefind: bool) {
|
fn set_property_typefind(&self, typefind: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "typefind".to_glib_none().0, Value::from(&typefind).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"typefind\0".as_ptr() as *const _, Value::from(&typefind).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_property_blocksize_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_blocksize_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::blocksize",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::blocksize\0".as_ptr() as *const _,
|
||||||
transmute(notify_blocksize_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_blocksize_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -247,7 +245,7 @@ impl<O: IsA<BaseSrc> + IsA<glib::object::Object>> BaseSrcExt for O {
|
||||||
fn connect_property_do_timestamp_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_do_timestamp_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::do-timestamp",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::do-timestamp\0".as_ptr() as *const _,
|
||||||
transmute(notify_do_timestamp_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_do_timestamp_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -255,7 +253,7 @@ impl<O: IsA<BaseSrc> + IsA<glib::object::Object>> BaseSrcExt for O {
|
||||||
fn connect_property_num_buffers_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_num_buffers_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::num-buffers",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::num-buffers\0".as_ptr() as *const _,
|
||||||
transmute(notify_num_buffers_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_num_buffers_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -263,7 +261,7 @@ impl<O: IsA<BaseSrc> + IsA<glib::object::Object>> BaseSrcExt for O {
|
||||||
fn connect_property_typefind_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_typefind_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::typefind",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::typefind\0".as_ptr() as *const _,
|
||||||
transmute(notify_typefind_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_typefind_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,22 +4,19 @@
|
||||||
|
|
||||||
use BaseTransformClass;
|
use BaseTransformClass;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct BaseTransform(Object<ffi::GstBaseTransform, ffi::GstBaseTransformClass, BaseTransformClass>): [
|
pub struct BaseTransform(Object<ffi::GstBaseTransform, ffi::GstBaseTransformClass, BaseTransformClass>): [
|
||||||
|
@ -35,7 +32,7 @@ glib_wrapper! {
|
||||||
unsafe impl Send for BaseTransform {}
|
unsafe impl Send for BaseTransform {}
|
||||||
unsafe impl Sync for BaseTransform {}
|
unsafe impl Sync for BaseTransform {}
|
||||||
|
|
||||||
pub trait BaseTransformExt {
|
pub trait BaseTransformExt: 'static {
|
||||||
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams);
|
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams);
|
||||||
|
|
||||||
fn get_buffer_pool(&self) -> Option<gst::BufferPool>;
|
fn get_buffer_pool(&self) -> Option<gst::BufferPool>;
|
||||||
|
@ -71,7 +68,7 @@ pub trait BaseTransformExt {
|
||||||
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<BaseTransform> + IsA<glib::object::Object>> BaseTransformExt for O {
|
impl<O: IsA<BaseTransform>> BaseTransformExt for O {
|
||||||
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
|
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
|
||||||
// unsafe { TODO: call ffi::gst_base_transform_get_allocator() }
|
// unsafe { TODO: call ffi::gst_base_transform_get_allocator() }
|
||||||
//}
|
//}
|
||||||
|
@ -157,21 +154,21 @@ impl<O: IsA<BaseTransform> + IsA<glib::object::Object>> BaseTransformExt for O {
|
||||||
fn get_property_qos(&self) -> bool {
|
fn get_property_qos(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "qos".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_qos(&self, qos: bool) {
|
fn set_property_qos(&self, qos: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "qos".to_glib_none().0, Value::from(&qos).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, Value::from(&qos).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::qos",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::qos\0".as_ptr() as *const _,
|
||||||
transmute(notify_qos_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_qos_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,8 @@
|
||||||
use BaseSrc;
|
use BaseSrc;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct PushSrc(Object<ffi::GstPushSrc, ffi::GstPushSrcClass>): [
|
pub struct PushSrc(Object<ffi::GstPushSrc, ffi::GstPushSrcClass>): [
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ b5ea065)
|
Generated by gir (https://github.com/gtk-rs/gir @ 811e711)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
|
|
|
@ -9,11 +9,8 @@
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct FlowCombiner(Shared<ffi::GstFlowCombiner>);
|
pub struct FlowCombiner(Shared<ffi::GstFlowCombiner>);
|
||||||
|
|
|
@ -7,16 +7,14 @@ use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct TestClock(Object<ffi::GstTestClock, ffi::GstTestClockClass>): [
|
pub struct TestClock(Object<ffi::GstTestClock, ffi::GstTestClockClass>): [
|
||||||
|
@ -107,21 +105,21 @@ impl TestClock {
|
||||||
pub fn get_property_clock_type(&self) -> gst::ClockType {
|
pub fn get_property_clock_type(&self) -> gst::ClockType {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::ClockType as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::ClockType as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "clock-type".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"clock-type\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_clock_type(&self, clock_type: gst::ClockType) {
|
pub fn set_property_clock_type(&self, clock_type: gst::ClockType) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "clock-type".to_glib_none().0, Value::from(&clock_type).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"clock-type\0".as_ptr() as *const _, Value::from(&clock_type).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_start_time(&self) -> u64 {
|
pub fn get_property_start_time(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "start-time".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"start-time\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,7 +131,7 @@ impl TestClock {
|
||||||
pub fn connect_property_clock_type_notify<F: Fn(&TestClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_clock_type_notify<F: Fn(&TestClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&TestClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&TestClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::clock-type",
|
connect_raw(self.to_glib_none().0, b"notify::clock-type\0".as_ptr() as *const _,
|
||||||
transmute(notify_clock_type_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_clock_type_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ b5ea065)
|
Generated by gir (https://github.com/gtk-rs/gir @ 811e711)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
|
|
|
@ -14,12 +14,11 @@ use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
|
@ -92,7 +91,7 @@ impl Asset {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait AssetExt {
|
pub trait AssetExt: 'static {
|
||||||
fn extract(&self) -> Result<Option<Extractable>, Error>;
|
fn extract(&self) -> Result<Option<Extractable>, Error>;
|
||||||
|
|
||||||
fn get_error(&self) -> Option<Error>;
|
fn get_error(&self) -> Option<Error>;
|
||||||
|
@ -111,14 +110,14 @@ pub trait AssetExt {
|
||||||
|
|
||||||
fn unproxy<P: IsA<Asset>>(&self, proxy: &P) -> bool;
|
fn unproxy<P: IsA<Asset>>(&self, proxy: &P) -> bool;
|
||||||
|
|
||||||
fn set_property_proxy_target<P: IsA<Asset> + IsA<glib::object::Object> + glib::value::SetValueOptional>(&self, proxy_target: Option<&P>);
|
fn set_property_proxy_target<P: IsA<Asset> + glib::value::SetValueOptional>(&self, proxy_target: Option<&P>);
|
||||||
|
|
||||||
fn connect_property_proxy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_proxy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
|
|
||||||
fn connect_property_proxy_target_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_proxy_target_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Asset> + IsA<glib::object::Object>> AssetExt for O {
|
impl<O: IsA<Asset>> AssetExt for O {
|
||||||
fn extract(&self) -> Result<Option<Extractable>, Error> {
|
fn extract(&self) -> Result<Option<Extractable>, Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
|
@ -177,16 +176,16 @@ impl<O: IsA<Asset> + IsA<glib::object::Object>> AssetExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_proxy_target<P: IsA<Asset> + IsA<glib::object::Object> + glib::value::SetValueOptional>(&self, proxy_target: Option<&P>) {
|
fn set_property_proxy_target<P: IsA<Asset> + glib::value::SetValueOptional>(&self, proxy_target: Option<&P>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "proxy-target".to_glib_none().0, Value::from(proxy_target).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"proxy-target\0".as_ptr() as *const _, Value::from(proxy_target).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_property_proxy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_proxy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::proxy",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::proxy\0".as_ptr() as *const _,
|
||||||
transmute(notify_proxy_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_proxy_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,7 +193,7 @@ impl<O: IsA<Asset> + IsA<glib::object::Object>> AssetExt for O {
|
||||||
fn connect_property_proxy_target_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_proxy_target_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::proxy-target",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::proxy-target\0".as_ptr() as *const _,
|
||||||
transmute(notify_proxy_target_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_proxy_target_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,6 @@ use TimelineElement;
|
||||||
use TrackElement;
|
use TrackElement;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct BaseEffect(Object<ffi::GESBaseEffect, ffi::GESBaseEffectClass>): TrackElement, TimelineElement, Extractable;
|
pub struct BaseEffect(Object<ffi::GESBaseEffect, ffi::GESBaseEffectClass>): TrackElement, TimelineElement, Extractable;
|
||||||
|
|
|
@ -16,14 +16,11 @@ use glib;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct Clip(Object<ffi::GESClip, ffi::GESClipClass>): Container, TimelineElement, Extractable;
|
pub struct Clip(Object<ffi::GESClip, ffi::GESClipClass>): Container, TimelineElement, Extractable;
|
||||||
|
@ -33,7 +30,7 @@ glib_wrapper! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait ClipExt {
|
pub trait ClipExt: 'static {
|
||||||
fn add_asset<P: IsA<Asset>>(&self, asset: &P) -> Option<TrackElement>;
|
fn add_asset<P: IsA<Asset>>(&self, asset: &P) -> Option<TrackElement>;
|
||||||
|
|
||||||
fn find_track_element<'a, P: IsA<Track> + 'a, Q: Into<Option<&'a P>>>(&self, track: Q, type_: glib::types::Type) -> Option<TrackElement>;
|
fn find_track_element<'a, P: IsA<Track> + 'a, Q: Into<Option<&'a P>>>(&self, track: Q, type_: glib::types::Type) -> Option<TrackElement>;
|
||||||
|
@ -65,7 +62,7 @@ pub trait ClipExt {
|
||||||
fn connect_property_supported_formats_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_supported_formats_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Clip> + IsA<glib::object::Object>> ClipExt for O {
|
impl<O: IsA<Clip>> ClipExt for O {
|
||||||
fn add_asset<P: IsA<Asset>>(&self, asset: &P) -> Option<TrackElement> {
|
fn add_asset<P: IsA<Asset>>(&self, asset: &P) -> Option<TrackElement> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_none(ffi::ges_clip_add_asset(self.to_glib_none().0, asset.to_glib_none().0))
|
from_glib_none(ffi::ges_clip_add_asset(self.to_glib_none().0, asset.to_glib_none().0))
|
||||||
|
@ -151,7 +148,7 @@ impl<O: IsA<Clip> + IsA<glib::object::Object>> ClipExt for O {
|
||||||
fn connect_property_layer_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_layer_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::layer",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::layer\0".as_ptr() as *const _,
|
||||||
transmute(notify_layer_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_layer_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -159,7 +156,7 @@ impl<O: IsA<Clip> + IsA<glib::object::Object>> ClipExt for O {
|
||||||
fn connect_property_supported_formats_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_supported_formats_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::supported-formats",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::supported-formats\0".as_ptr() as *const _,
|
||||||
transmute(notify_supported_formats_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_supported_formats_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,14 +14,12 @@ use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct Container(Object<ffi::GESContainer, ffi::GESContainerClass>): TimelineElement, Extractable;
|
pub struct Container(Object<ffi::GESContainer, ffi::GESContainerClass>): TimelineElement, Extractable;
|
||||||
|
@ -40,7 +38,7 @@ impl Container {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait GESContainerExt {
|
pub trait GESContainerExt: 'static {
|
||||||
fn add<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), glib::error::BoolError>;
|
fn add<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
fn edit(&self, layers: &[Layer], new_layer_priority: i32, mode: EditMode, edge: Edge, position: u64) -> Result<(), glib::error::BoolError>;
|
fn edit(&self, layers: &[Layer], new_layer_priority: i32, mode: EditMode, edge: Edge, position: u64) -> Result<(), glib::error::BoolError>;
|
||||||
|
@ -60,7 +58,7 @@ pub trait GESContainerExt {
|
||||||
fn connect_property_height_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_height_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Container> + IsA<glib::object::Object>> GESContainerExt for O {
|
impl<O: IsA<Container>> GESContainerExt for O {
|
||||||
fn add<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), glib::error::BoolError> {
|
fn add<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), glib::error::BoolError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
glib::error::BoolError::from_glib(ffi::ges_container_add(self.to_glib_none().0, child.to_glib_none().0), "Failed to add element")
|
glib::error::BoolError::from_glib(ffi::ges_container_add(self.to_glib_none().0, child.to_glib_none().0), "Failed to add element")
|
||||||
|
@ -94,7 +92,7 @@ impl<O: IsA<Container> + IsA<glib::object::Object>> GESContainerExt for O {
|
||||||
fn get_property_height(&self) -> u32 {
|
fn get_property_height(&self) -> u32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "height".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"height\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,7 +100,7 @@ impl<O: IsA<Container> + IsA<glib::object::Object>> GESContainerExt for O {
|
||||||
fn connect_child_added<F: Fn(&Self, &TimelineElement) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_child_added<F: Fn(&Self, &TimelineElement) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &TimelineElement) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &TimelineElement) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "child-added",
|
connect_raw(self.to_glib_none().0 as *mut _, b"child-added\0".as_ptr() as *const _,
|
||||||
transmute(child_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(child_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,7 +108,7 @@ impl<O: IsA<Container> + IsA<glib::object::Object>> GESContainerExt for O {
|
||||||
fn connect_child_removed<F: Fn(&Self, &TimelineElement) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_child_removed<F: Fn(&Self, &TimelineElement) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &TimelineElement) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &TimelineElement) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "child-removed",
|
connect_raw(self.to_glib_none().0 as *mut _, b"child-removed\0".as_ptr() as *const _,
|
||||||
transmute(child_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(child_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,7 +116,7 @@ impl<O: IsA<Container> + IsA<glib::object::Object>> GESContainerExt for O {
|
||||||
fn connect_property_height_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_height_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::height",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::height\0".as_ptr() as *const _,
|
||||||
transmute(notify_height_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_height_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,15 +7,11 @@ use Extractable;
|
||||||
use TimelineElement;
|
use TimelineElement;
|
||||||
use TrackElement;
|
use TrackElement;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct Effect(Object<ffi::GESEffect, ffi::GESEffectClass>): BaseEffect, TrackElement, TimelineElement, Extractable;
|
pub struct Effect(Object<ffi::GESEffect, ffi::GESEffectClass>): BaseEffect, TrackElement, TimelineElement, Extractable;
|
||||||
|
@ -34,15 +30,15 @@ impl Effect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait EffectExt {
|
pub trait EffectExt: 'static {
|
||||||
fn get_property_bin_description(&self) -> Option<String>;
|
fn get_property_bin_description(&self) -> Option<String>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Effect> + IsA<glib::object::Object>> EffectExt for O {
|
impl<O: IsA<Effect>> EffectExt for O {
|
||||||
fn get_property_bin_description(&self) -> Option<String> {
|
fn get_property_bin_description(&self) -> Option<String> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<String as StaticType>::static_type());
|
let mut value = Value::from_type(<String as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "bin-description".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"bin-description\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,6 @@ use Asset;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct Extractable(Object<ffi::GESExtractable, ffi::GESExtractableInterface>);
|
pub struct Extractable(Object<ffi::GESExtractable, ffi::GESExtractableInterface>);
|
||||||
|
@ -19,7 +15,7 @@ glib_wrapper! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait ExtractableExt {
|
pub trait ExtractableExt: 'static {
|
||||||
fn get_asset(&self) -> Option<Asset>;
|
fn get_asset(&self) -> Option<Asset>;
|
||||||
|
|
||||||
fn get_id(&self) -> Option<String>;
|
fn get_id(&self) -> Option<String>;
|
||||||
|
|
|
@ -6,20 +6,17 @@ use Container;
|
||||||
use Extractable;
|
use Extractable;
|
||||||
use TimelineElement;
|
use TimelineElement;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct Group(Object<ffi::GESGroup, ffi::GESGroupClass>): Container, TimelineElement, Extractable;
|
pub struct Group(Object<ffi::GESGroup, ffi::GESGroupClass>): Container, TimelineElement, Extractable;
|
||||||
|
@ -44,7 +41,7 @@ impl Default for Group {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait GroupExt {
|
pub trait GroupExt: 'static {
|
||||||
fn get_property_duration(&self) -> u64;
|
fn get_property_duration(&self) -> u64;
|
||||||
|
|
||||||
fn set_property_duration(&self, duration: u64);
|
fn set_property_duration(&self, duration: u64);
|
||||||
|
@ -76,81 +73,81 @@ pub trait GroupExt {
|
||||||
fn connect_property_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Group> + IsA<glib::object::Object>> GroupExt for O {
|
impl<O: IsA<Group>> GroupExt for O {
|
||||||
fn get_property_duration(&self) -> u64 {
|
fn get_property_duration(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "duration".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_duration(&self, duration: u64) {
|
fn set_property_duration(&self, duration: u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "duration".to_glib_none().0, Value::from(&duration).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property_in_point(&self) -> u64 {
|
fn get_property_in_point(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "in-point".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_in_point(&self, in_point: u64) {
|
fn set_property_in_point(&self, in_point: u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "in-point".to_glib_none().0, Value::from(&in_point).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, Value::from(&in_point).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property_max_duration(&self) -> u64 {
|
fn get_property_max_duration(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "max-duration".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"max-duration\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_max_duration(&self, max_duration: u64) {
|
fn set_property_max_duration(&self, max_duration: u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "max-duration".to_glib_none().0, Value::from(&max_duration).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"max-duration\0".as_ptr() as *const _, Value::from(&max_duration).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property_priority(&self) -> u32 {
|
fn get_property_priority(&self) -> u32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "priority".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"priority\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_priority(&self, priority: u32) {
|
fn set_property_priority(&self, priority: u32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "priority".to_glib_none().0, Value::from(&priority).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"priority\0".as_ptr() as *const _, Value::from(&priority).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property_start(&self) -> u64 {
|
fn get_property_start(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "start".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_start(&self, start: u64) {
|
fn set_property_start(&self, start: u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "start".to_glib_none().0, Value::from(&start).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start\0".as_ptr() as *const _, Value::from(&start).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::duration",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::duration\0".as_ptr() as *const _,
|
||||||
transmute(notify_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -158,7 +155,7 @@ impl<O: IsA<Group> + IsA<glib::object::Object>> GroupExt for O {
|
||||||
fn connect_property_in_point_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_in_point_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::in-point",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::in-point\0".as_ptr() as *const _,
|
||||||
transmute(notify_in_point_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_in_point_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -166,7 +163,7 @@ impl<O: IsA<Group> + IsA<glib::object::Object>> GroupExt for O {
|
||||||
fn connect_property_max_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_max_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::max-duration",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::max-duration\0".as_ptr() as *const _,
|
||||||
transmute(notify_max_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_max_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -174,7 +171,7 @@ impl<O: IsA<Group> + IsA<glib::object::Object>> GroupExt for O {
|
||||||
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::priority",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::priority\0".as_ptr() as *const _,
|
||||||
transmute(notify_priority_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_priority_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,7 +179,7 @@ impl<O: IsA<Group> + IsA<glib::object::Object>> GroupExt for O {
|
||||||
fn connect_property_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::start",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::start\0".as_ptr() as *const _,
|
||||||
transmute(notify_start_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_start_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,19 +8,15 @@ use Extractable;
|
||||||
use Timeline;
|
use Timeline;
|
||||||
use TrackType;
|
use TrackType;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct Layer(Object<ffi::GESLayer, ffi::GESLayerClass>): Extractable;
|
pub struct Layer(Object<ffi::GESLayer, ffi::GESLayerClass>): Extractable;
|
||||||
|
@ -45,7 +41,7 @@ impl Default for Layer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait LayerExt {
|
pub trait LayerExt: 'static {
|
||||||
fn add_asset<P: IsA<Asset>>(&self, asset: &P, start: gst::ClockTime, inpoint: gst::ClockTime, duration: gst::ClockTime, track_types: TrackType) -> Option<Clip>;
|
fn add_asset<P: IsA<Asset>>(&self, asset: &P, start: gst::ClockTime, inpoint: gst::ClockTime, duration: gst::ClockTime, track_types: TrackType) -> Option<Clip>;
|
||||||
|
|
||||||
fn add_clip<P: IsA<Clip>>(&self, clip: &P) -> bool;
|
fn add_clip<P: IsA<Clip>>(&self, clip: &P) -> bool;
|
||||||
|
@ -83,7 +79,7 @@ pub trait LayerExt {
|
||||||
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Layer> + IsA<glib::object::Object>> LayerExt for O {
|
impl<O: IsA<Layer>> LayerExt for O {
|
||||||
fn add_asset<P: IsA<Asset>>(&self, asset: &P, start: gst::ClockTime, inpoint: gst::ClockTime, duration: gst::ClockTime, track_types: TrackType) -> Option<Clip> {
|
fn add_asset<P: IsA<Asset>>(&self, asset: &P, start: gst::ClockTime, inpoint: gst::ClockTime, duration: gst::ClockTime, track_types: TrackType) -> Option<Clip> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_none(ffi::ges_layer_add_asset(self.to_glib_none().0, asset.to_glib_none().0, start.to_glib(), inpoint.to_glib(), duration.to_glib(), track_types.to_glib()))
|
from_glib_none(ffi::ges_layer_add_asset(self.to_glib_none().0, asset.to_glib_none().0, start.to_glib(), inpoint.to_glib(), duration.to_glib(), track_types.to_glib()))
|
||||||
|
@ -165,7 +161,7 @@ impl<O: IsA<Layer> + IsA<glib::object::Object>> LayerExt for O {
|
||||||
fn connect_clip_added<F: Fn(&Self, &Clip) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_clip_added<F: Fn(&Self, &Clip) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Clip) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Clip) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "clip-added",
|
connect_raw(self.to_glib_none().0 as *mut _, b"clip-added\0".as_ptr() as *const _,
|
||||||
transmute(clip_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(clip_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -173,7 +169,7 @@ impl<O: IsA<Layer> + IsA<glib::object::Object>> LayerExt for O {
|
||||||
fn connect_clip_removed<F: Fn(&Self, &Clip) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_clip_removed<F: Fn(&Self, &Clip) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Clip) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Clip) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "clip-removed",
|
connect_raw(self.to_glib_none().0 as *mut _, b"clip-removed\0".as_ptr() as *const _,
|
||||||
transmute(clip_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(clip_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,7 +177,7 @@ impl<O: IsA<Layer> + IsA<glib::object::Object>> LayerExt for O {
|
||||||
fn connect_property_auto_transition_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_auto_transition_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::auto-transition",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::auto-transition\0".as_ptr() as *const _,
|
||||||
transmute(notify_auto_transition_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_auto_transition_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,7 +185,7 @@ impl<O: IsA<Layer> + IsA<glib::object::Object>> LayerExt for O {
|
||||||
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::priority",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::priority\0".as_ptr() as *const _,
|
||||||
transmute(notify_priority_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_priority_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
|
@ -20,7 +20,6 @@ use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use gst_pbutils;
|
use gst_pbutils;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
|
@ -51,7 +50,7 @@ impl Default for Pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait GESPipelineExt {
|
pub trait GESPipelineExt: 'static {
|
||||||
fn get_mode(&self) -> PipelineFlags;
|
fn get_mode(&self) -> PipelineFlags;
|
||||||
|
|
||||||
fn get_thumbnail(&self, caps: &gst::Caps) -> Option<gst::Sample>;
|
fn get_thumbnail(&self, caps: &gst::Caps) -> Option<gst::Sample>;
|
||||||
|
@ -76,21 +75,21 @@ pub trait GESPipelineExt {
|
||||||
|
|
||||||
fn get_property_audio_filter(&self) -> Option<gst::Element>;
|
fn get_property_audio_filter(&self) -> Option<gst::Element>;
|
||||||
|
|
||||||
fn set_property_audio_filter<P: IsA<gst::Element> + IsA<glib::object::Object> + glib::value::SetValueOptional>(&self, audio_filter: Option<&P>);
|
fn set_property_audio_filter<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, audio_filter: Option<&P>);
|
||||||
|
|
||||||
fn get_property_audio_sink(&self) -> Option<gst::Element>;
|
fn get_property_audio_sink(&self) -> Option<gst::Element>;
|
||||||
|
|
||||||
fn set_property_audio_sink<P: IsA<gst::Element> + IsA<glib::object::Object> + glib::value::SetValueOptional>(&self, audio_sink: Option<&P>);
|
fn set_property_audio_sink<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, audio_sink: Option<&P>);
|
||||||
|
|
||||||
fn get_property_timeline(&self) -> Option<Timeline>;
|
fn get_property_timeline(&self) -> Option<Timeline>;
|
||||||
|
|
||||||
fn get_property_video_filter(&self) -> Option<gst::Element>;
|
fn get_property_video_filter(&self) -> Option<gst::Element>;
|
||||||
|
|
||||||
fn set_property_video_filter<P: IsA<gst::Element> + IsA<glib::object::Object> + glib::value::SetValueOptional>(&self, video_filter: Option<&P>);
|
fn set_property_video_filter<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, video_filter: Option<&P>);
|
||||||
|
|
||||||
fn get_property_video_sink(&self) -> Option<gst::Element>;
|
fn get_property_video_sink(&self) -> Option<gst::Element>;
|
||||||
|
|
||||||
fn set_property_video_sink<P: IsA<gst::Element> + IsA<glib::object::Object> + glib::value::SetValueOptional>(&self, video_sink: Option<&P>);
|
fn set_property_video_sink<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, video_sink: Option<&P>);
|
||||||
|
|
||||||
fn connect_property_audio_filter_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_audio_filter_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
|
|
||||||
|
@ -105,7 +104,7 @@ pub trait GESPipelineExt {
|
||||||
fn connect_property_video_sink_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_video_sink_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Pipeline> + IsA<glib::object::Object>> GESPipelineExt for O {
|
impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
||||||
fn get_mode(&self) -> PipelineFlags {
|
fn get_mode(&self) -> PipelineFlags {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(ffi::ges_pipeline_get_mode(self.to_glib_none().0))
|
from_glib(ffi::ges_pipeline_get_mode(self.to_glib_none().0))
|
||||||
|
@ -177,35 +176,35 @@ impl<O: IsA<Pipeline> + IsA<glib::object::Object>> GESPipelineExt for O {
|
||||||
fn get_property_audio_filter(&self) -> Option<gst::Element> {
|
fn get_property_audio_filter(&self) -> Option<gst::Element> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "audio-filter".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-filter\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_audio_filter<P: IsA<gst::Element> + IsA<glib::object::Object> + glib::value::SetValueOptional>(&self, audio_filter: Option<&P>) {
|
fn set_property_audio_filter<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, audio_filter: Option<&P>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "audio-filter".to_glib_none().0, Value::from(audio_filter).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-filter\0".as_ptr() as *const _, Value::from(audio_filter).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property_audio_sink(&self) -> Option<gst::Element> {
|
fn get_property_audio_sink(&self) -> Option<gst::Element> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "audio-sink".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_audio_sink<P: IsA<gst::Element> + IsA<glib::object::Object> + glib::value::SetValueOptional>(&self, audio_sink: Option<&P>) {
|
fn set_property_audio_sink<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, audio_sink: Option<&P>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "audio-sink".to_glib_none().0, Value::from(audio_sink).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-sink\0".as_ptr() as *const _, Value::from(audio_sink).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property_timeline(&self) -> Option<Timeline> {
|
fn get_property_timeline(&self) -> Option<Timeline> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<Timeline as StaticType>::static_type());
|
let mut value = Value::from_type(<Timeline as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "timeline".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"timeline\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -213,35 +212,35 @@ impl<O: IsA<Pipeline> + IsA<glib::object::Object>> GESPipelineExt for O {
|
||||||
fn get_property_video_filter(&self) -> Option<gst::Element> {
|
fn get_property_video_filter(&self) -> Option<gst::Element> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "video-filter".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-filter\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_video_filter<P: IsA<gst::Element> + IsA<glib::object::Object> + glib::value::SetValueOptional>(&self, video_filter: Option<&P>) {
|
fn set_property_video_filter<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, video_filter: Option<&P>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "video-filter".to_glib_none().0, Value::from(video_filter).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-filter\0".as_ptr() as *const _, Value::from(video_filter).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property_video_sink(&self) -> Option<gst::Element> {
|
fn get_property_video_sink(&self) -> Option<gst::Element> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "video-sink".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_video_sink<P: IsA<gst::Element> + IsA<glib::object::Object> + glib::value::SetValueOptional>(&self, video_sink: Option<&P>) {
|
fn set_property_video_sink<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, video_sink: Option<&P>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "video-sink".to_glib_none().0, Value::from(video_sink).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-sink\0".as_ptr() as *const _, Value::from(video_sink).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_property_audio_filter_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_audio_filter_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::audio-filter",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::audio-filter\0".as_ptr() as *const _,
|
||||||
transmute(notify_audio_filter_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_audio_filter_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -249,7 +248,7 @@ impl<O: IsA<Pipeline> + IsA<glib::object::Object>> GESPipelineExt for O {
|
||||||
fn connect_property_audio_sink_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_audio_sink_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::audio-sink",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::audio-sink\0".as_ptr() as *const _,
|
||||||
transmute(notify_audio_sink_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_audio_sink_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -257,7 +256,7 @@ impl<O: IsA<Pipeline> + IsA<glib::object::Object>> GESPipelineExt for O {
|
||||||
fn connect_property_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::mode",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::mode\0".as_ptr() as *const _,
|
||||||
transmute(notify_mode_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_mode_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,7 +264,7 @@ impl<O: IsA<Pipeline> + IsA<glib::object::Object>> GESPipelineExt for O {
|
||||||
fn connect_property_timeline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_timeline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::timeline",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::timeline\0".as_ptr() as *const _,
|
||||||
transmute(notify_timeline_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_timeline_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -273,7 +272,7 @@ impl<O: IsA<Pipeline> + IsA<glib::object::Object>> GESPipelineExt for O {
|
||||||
fn connect_property_video_filter_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_video_filter_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::video-filter",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::video-filter\0".as_ptr() as *const _,
|
||||||
transmute(notify_video_filter_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_video_filter_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -281,7 +280,7 @@ impl<O: IsA<Pipeline> + IsA<glib::object::Object>> GESPipelineExt for O {
|
||||||
fn connect_property_video_sink_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_video_sink_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::video-sink",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::video-sink\0".as_ptr() as *const _,
|
||||||
transmute(notify_video_sink_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_video_sink_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,14 +10,12 @@ use glib;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
|
||||||
use gst_pbutils;
|
use gst_pbutils;
|
||||||
use libc;
|
use libc;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
|
@ -40,7 +38,7 @@ impl Project {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait ProjectExt {
|
pub trait ProjectExt: 'static {
|
||||||
fn add_asset<P: IsA<Asset>>(&self, asset: &P) -> bool;
|
fn add_asset<P: IsA<Asset>>(&self, asset: &P) -> bool;
|
||||||
|
|
||||||
fn add_encoding_profile<P: IsA<gst_pbutils::EncodingProfile>>(&self, profile: &P) -> bool;
|
fn add_encoding_profile<P: IsA<gst_pbutils::EncodingProfile>>(&self, profile: &P) -> bool;
|
||||||
|
@ -78,7 +76,7 @@ pub trait ProjectExt {
|
||||||
fn connect_missing_uri<F: Fn(&Self, &Error, &Asset) -> Option<String> + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_missing_uri<F: Fn(&Self, &Error, &Asset) -> Option<String> + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Project> + IsA<glib::object::Object>> ProjectExt for O {
|
impl<O: IsA<Project>> ProjectExt for O {
|
||||||
fn add_asset<P: IsA<Asset>>(&self, asset: &P) -> bool {
|
fn add_asset<P: IsA<Asset>>(&self, asset: &P) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(ffi::ges_project_add_asset(self.to_glib_none().0, asset.to_glib_none().0))
|
from_glib(ffi::ges_project_add_asset(self.to_glib_none().0, asset.to_glib_none().0))
|
||||||
|
@ -166,7 +164,7 @@ impl<O: IsA<Project> + IsA<glib::object::Object>> ProjectExt for O {
|
||||||
fn connect_asset_added<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_asset_added<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Asset) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Asset) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "asset-added",
|
connect_raw(self.to_glib_none().0 as *mut _, b"asset-added\0".as_ptr() as *const _,
|
||||||
transmute(asset_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(asset_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -174,7 +172,7 @@ impl<O: IsA<Project> + IsA<glib::object::Object>> ProjectExt for O {
|
||||||
fn connect_asset_loading<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_asset_loading<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Asset) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Asset) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "asset-loading",
|
connect_raw(self.to_glib_none().0 as *mut _, b"asset-loading\0".as_ptr() as *const _,
|
||||||
transmute(asset_loading_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(asset_loading_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,7 +180,7 @@ impl<O: IsA<Project> + IsA<glib::object::Object>> ProjectExt for O {
|
||||||
fn connect_asset_removed<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_asset_removed<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Asset) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Asset) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "asset-removed",
|
connect_raw(self.to_glib_none().0 as *mut _, b"asset-removed\0".as_ptr() as *const _,
|
||||||
transmute(asset_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(asset_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,7 +188,7 @@ impl<O: IsA<Project> + IsA<glib::object::Object>> ProjectExt for O {
|
||||||
fn connect_error_loading_asset<F: Fn(&Self, &Error, &str, glib::types::Type) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_error_loading_asset<F: Fn(&Self, &Error, &str, glib::types::Type) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Error, &str, glib::types::Type) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Error, &str, glib::types::Type) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "error-loading-asset",
|
connect_raw(self.to_glib_none().0 as *mut _, b"error-loading-asset\0".as_ptr() as *const _,
|
||||||
transmute(error_loading_asset_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(error_loading_asset_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -198,7 +196,7 @@ impl<O: IsA<Project> + IsA<glib::object::Object>> ProjectExt for O {
|
||||||
fn connect_loaded<F: Fn(&Self, &Timeline) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_loaded<F: Fn(&Self, &Timeline) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Timeline) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Timeline) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "loaded",
|
connect_raw(self.to_glib_none().0 as *mut _, b"loaded\0".as_ptr() as *const _,
|
||||||
transmute(loaded_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(loaded_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -206,7 +204,7 @@ impl<O: IsA<Project> + IsA<glib::object::Object>> ProjectExt for O {
|
||||||
fn connect_missing_uri<F: Fn(&Self, &Error, &Asset) -> Option<String> + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_missing_uri<F: Fn(&Self, &Error, &Asset) -> Option<String> + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Error, &Asset) -> Option<String> + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Error, &Asset) -> Option<String> + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "missing-uri",
|
connect_raw(self.to_glib_none().0 as *mut _, b"missing-uri\0".as_ptr() as *const _,
|
||||||
transmute(missing_uri_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(missing_uri_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,14 +15,12 @@ use glib;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
|
@ -69,7 +67,7 @@ impl Default for Timeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait TimelineExt {
|
pub trait TimelineExt: 'static {
|
||||||
fn add_layer(&self, layer: &Layer) -> Result<(), glib::error::BoolError>;
|
fn add_layer(&self, layer: &Layer) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
fn add_track<P: IsA<Track>>(&self, track: &P) -> Result<(), glib::error::BoolError>;
|
fn add_track<P: IsA<Track>>(&self, track: &P) -> Result<(), glib::error::BoolError>;
|
||||||
|
@ -145,7 +143,7 @@ pub trait TimelineExt {
|
||||||
fn connect_property_snapping_distance_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_snapping_distance_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Timeline> + IsA<glib::object::Object>> TimelineExt for O {
|
impl<O: IsA<Timeline>> TimelineExt for O {
|
||||||
fn add_layer(&self, layer: &Layer) -> Result<(), glib::error::BoolError> {
|
fn add_layer(&self, layer: &Layer) -> Result<(), glib::error::BoolError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
glib::error::BoolError::from_glib(ffi::ges_timeline_add_layer(self.to_glib_none().0, layer.to_glib_none().0), "Failed to add layer")
|
glib::error::BoolError::from_glib(ffi::ges_timeline_add_layer(self.to_glib_none().0, layer.to_glib_none().0), "Failed to add layer")
|
||||||
|
@ -299,7 +297,7 @@ impl<O: IsA<Timeline> + IsA<glib::object::Object>> TimelineExt for O {
|
||||||
fn connect_commited<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_commited<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "commited",
|
connect_raw(self.to_glib_none().0 as *mut _, b"commited\0".as_ptr() as *const _,
|
||||||
transmute(commited_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(commited_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -307,7 +305,7 @@ impl<O: IsA<Timeline> + IsA<glib::object::Object>> TimelineExt for O {
|
||||||
fn connect_group_added<F: Fn(&Self, &Group) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_group_added<F: Fn(&Self, &Group) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Group) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Group) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "group-added",
|
connect_raw(self.to_glib_none().0 as *mut _, b"group-added\0".as_ptr() as *const _,
|
||||||
transmute(group_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(group_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -319,7 +317,7 @@ impl<O: IsA<Timeline> + IsA<glib::object::Object>> TimelineExt for O {
|
||||||
fn connect_layer_added<F: Fn(&Self, &Layer) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_layer_added<F: Fn(&Self, &Layer) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Layer) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Layer) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "layer-added",
|
connect_raw(self.to_glib_none().0 as *mut _, b"layer-added\0".as_ptr() as *const _,
|
||||||
transmute(layer_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(layer_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -327,7 +325,7 @@ impl<O: IsA<Timeline> + IsA<glib::object::Object>> TimelineExt for O {
|
||||||
fn connect_layer_removed<F: Fn(&Self, &Layer) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_layer_removed<F: Fn(&Self, &Layer) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Layer) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Layer) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "layer-removed",
|
connect_raw(self.to_glib_none().0 as *mut _, b"layer-removed\0".as_ptr() as *const _,
|
||||||
transmute(layer_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(layer_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -339,7 +337,7 @@ impl<O: IsA<Timeline> + IsA<glib::object::Object>> TimelineExt for O {
|
||||||
fn connect_snapping_ended<F: Fn(&Self, &TrackElement, &TrackElement, u64) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_snapping_ended<F: Fn(&Self, &TrackElement, &TrackElement, u64) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &TrackElement, &TrackElement, u64) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &TrackElement, &TrackElement, u64) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "snapping-ended",
|
connect_raw(self.to_glib_none().0 as *mut _, b"snapping-ended\0".as_ptr() as *const _,
|
||||||
transmute(snapping_ended_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(snapping_ended_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -347,7 +345,7 @@ impl<O: IsA<Timeline> + IsA<glib::object::Object>> TimelineExt for O {
|
||||||
fn connect_snapping_started<F: Fn(&Self, &TrackElement, &TrackElement, u64) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_snapping_started<F: Fn(&Self, &TrackElement, &TrackElement, u64) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &TrackElement, &TrackElement, u64) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &TrackElement, &TrackElement, u64) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "snapping-started",
|
connect_raw(self.to_glib_none().0 as *mut _, b"snapping-started\0".as_ptr() as *const _,
|
||||||
transmute(snapping_started_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(snapping_started_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -355,7 +353,7 @@ impl<O: IsA<Timeline> + IsA<glib::object::Object>> TimelineExt for O {
|
||||||
fn connect_track_added<F: Fn(&Self, &Track) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_track_added<F: Fn(&Self, &Track) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Track) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Track) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "track-added",
|
connect_raw(self.to_glib_none().0 as *mut _, b"track-added\0".as_ptr() as *const _,
|
||||||
transmute(track_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(track_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -363,7 +361,7 @@ impl<O: IsA<Timeline> + IsA<glib::object::Object>> TimelineExt for O {
|
||||||
fn connect_track_removed<F: Fn(&Self, &Track) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_track_removed<F: Fn(&Self, &Track) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &Track) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &Track) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "track-removed",
|
connect_raw(self.to_glib_none().0 as *mut _, b"track-removed\0".as_ptr() as *const _,
|
||||||
transmute(track_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(track_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -371,7 +369,7 @@ impl<O: IsA<Timeline> + IsA<glib::object::Object>> TimelineExt for O {
|
||||||
fn connect_property_auto_transition_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_auto_transition_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::auto-transition",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::auto-transition\0".as_ptr() as *const _,
|
||||||
transmute(notify_auto_transition_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_auto_transition_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -379,7 +377,7 @@ impl<O: IsA<Timeline> + IsA<glib::object::Object>> TimelineExt for O {
|
||||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::duration",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::duration\0".as_ptr() as *const _,
|
||||||
transmute(notify_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -387,7 +385,7 @@ impl<O: IsA<Timeline> + IsA<glib::object::Object>> TimelineExt for O {
|
||||||
fn connect_property_snapping_distance_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_snapping_distance_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::snapping-distance",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::snapping-distance\0".as_ptr() as *const _,
|
||||||
transmute(notify_snapping_distance_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_snapping_distance_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,21 +6,18 @@ use Extractable;
|
||||||
use Timeline;
|
use Timeline;
|
||||||
use TrackType;
|
use TrackType;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct TimelineElement(Object<ffi::GESTimelineElement, ffi::GESTimelineElementClass>): Extractable;
|
pub struct TimelineElement(Object<ffi::GESTimelineElement, ffi::GESTimelineElementClass>): Extractable;
|
||||||
|
@ -30,7 +27,7 @@ glib_wrapper! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait TimelineElementExt {
|
pub trait TimelineElementExt: 'static {
|
||||||
//fn add_child_property<P: IsA</*Ignored*/glib::ParamSpec>, Q: IsA<glib::Object>>(&self, pspec: &P, child: &Q) -> bool;
|
//fn add_child_property<P: IsA</*Ignored*/glib::ParamSpec>, Q: IsA<glib::Object>>(&self, pspec: &P, child: &Q) -> bool;
|
||||||
|
|
||||||
fn copy(&self, deep: bool) -> Option<TimelineElement>;
|
fn copy(&self, deep: bool) -> Option<TimelineElement>;
|
||||||
|
@ -134,7 +131,7 @@ pub trait TimelineElementExt {
|
||||||
fn connect_property_timeline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_timeline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<TimelineElement> + IsA<glib::object::Object>> TimelineElementExt for O {
|
impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
||||||
//fn add_child_property<P: IsA</*Ignored*/glib::ParamSpec>, Q: IsA<glib::Object>>(&self, pspec: &P, child: &Q) -> bool {
|
//fn add_child_property<P: IsA</*Ignored*/glib::ParamSpec>, Q: IsA<glib::Object>>(&self, pspec: &P, child: &Q) -> bool {
|
||||||
// unsafe { TODO: call ffi::ges_timeline_element_add_child_property() }
|
// unsafe { TODO: call ffi::ges_timeline_element_add_child_property() }
|
||||||
//}
|
//}
|
||||||
|
@ -338,28 +335,28 @@ impl<O: IsA<TimelineElement> + IsA<glib::object::Object>> TimelineElementExt for
|
||||||
fn get_property_in_point(&self) -> u64 {
|
fn get_property_in_point(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "in-point".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_in_point(&self, in_point: u64) {
|
fn set_property_in_point(&self, in_point: u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "in-point".to_glib_none().0, Value::from(&in_point).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, Value::from(&in_point).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property_serialize(&self) -> bool {
|
fn get_property_serialize(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "serialize".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"serialize\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_serialize(&self, serialize: bool) {
|
fn set_property_serialize(&self, serialize: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "serialize".to_glib_none().0, Value::from(&serialize).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"serialize\0".as_ptr() as *const _, Value::from(&serialize).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,7 +367,7 @@ impl<O: IsA<TimelineElement> + IsA<glib::object::Object>> TimelineElementExt for
|
||||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::duration",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::duration\0".as_ptr() as *const _,
|
||||||
transmute(notify_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -378,7 +375,7 @@ impl<O: IsA<TimelineElement> + IsA<glib::object::Object>> TimelineElementExt for
|
||||||
fn connect_property_in_point_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_in_point_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::in-point",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::in-point\0".as_ptr() as *const _,
|
||||||
transmute(notify_in_point_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_in_point_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -386,7 +383,7 @@ impl<O: IsA<TimelineElement> + IsA<glib::object::Object>> TimelineElementExt for
|
||||||
fn connect_property_max_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_max_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::max-duration",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::max-duration\0".as_ptr() as *const _,
|
||||||
transmute(notify_max_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_max_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -394,7 +391,7 @@ impl<O: IsA<TimelineElement> + IsA<glib::object::Object>> TimelineElementExt for
|
||||||
fn connect_property_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::name",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::name\0".as_ptr() as *const _,
|
||||||
transmute(notify_name_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_name_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -402,7 +399,7 @@ impl<O: IsA<TimelineElement> + IsA<glib::object::Object>> TimelineElementExt for
|
||||||
fn connect_property_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::parent",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::parent\0".as_ptr() as *const _,
|
||||||
transmute(notify_parent_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_parent_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -410,7 +407,7 @@ impl<O: IsA<TimelineElement> + IsA<glib::object::Object>> TimelineElementExt for
|
||||||
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::priority",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::priority\0".as_ptr() as *const _,
|
||||||
transmute(notify_priority_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_priority_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -418,7 +415,7 @@ impl<O: IsA<TimelineElement> + IsA<glib::object::Object>> TimelineElementExt for
|
||||||
fn connect_property_serialize_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_serialize_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::serialize",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::serialize\0".as_ptr() as *const _,
|
||||||
transmute(notify_serialize_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_serialize_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -426,7 +423,7 @@ impl<O: IsA<TimelineElement> + IsA<glib::object::Object>> TimelineElementExt for
|
||||||
fn connect_property_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::start",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::start\0".as_ptr() as *const _,
|
||||||
transmute(notify_start_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_start_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -434,7 +431,7 @@ impl<O: IsA<TimelineElement> + IsA<glib::object::Object>> TimelineElementExt for
|
||||||
fn connect_property_timeline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_timeline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::timeline",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::timeline\0".as_ptr() as *const _,
|
||||||
transmute(notify_timeline_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_timeline_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,16 +12,14 @@ use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct Track(Object<ffi::GESTrack, ffi::GESTrackClass>): [
|
pub struct Track(Object<ffi::GESTrack, ffi::GESTrackClass>): [
|
||||||
|
@ -43,7 +41,7 @@ impl Track {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait GESTrackExt {
|
pub trait GESTrackExt: 'static {
|
||||||
fn add_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::error::BoolError>;
|
fn add_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
fn commit(&self) -> bool;
|
fn commit(&self) -> bool;
|
||||||
|
@ -87,7 +85,7 @@ pub trait GESTrackExt {
|
||||||
fn connect_property_restriction_caps_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_restriction_caps_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Track> + IsA<glib::object::Object>> GESTrackExt for O {
|
impl<O: IsA<Track>> GESTrackExt for O {
|
||||||
fn add_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::error::BoolError> {
|
fn add_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::error::BoolError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
glib::error::BoolError::from_glib(ffi::ges_track_add_element(self.to_glib_none().0, object.to_glib_none().0), "Failed to add element")
|
glib::error::BoolError::from_glib(ffi::ges_track_add_element(self.to_glib_none().0, object.to_glib_none().0), "Failed to add element")
|
||||||
|
@ -161,7 +159,7 @@ impl<O: IsA<Track> + IsA<glib::object::Object>> GESTrackExt for O {
|
||||||
fn get_property_duration(&self) -> u64 {
|
fn get_property_duration(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "duration".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,7 +167,7 @@ impl<O: IsA<Track> + IsA<glib::object::Object>> GESTrackExt for O {
|
||||||
fn get_property_restriction_caps(&self) -> Option<gst::Caps> {
|
fn get_property_restriction_caps(&self) -> Option<gst::Caps> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Caps as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Caps as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "restriction-caps".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"restriction-caps\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -177,7 +175,7 @@ impl<O: IsA<Track> + IsA<glib::object::Object>> GESTrackExt for O {
|
||||||
fn get_property_track_type(&self) -> TrackType {
|
fn get_property_track_type(&self) -> TrackType {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<TrackType as StaticType>::static_type());
|
let mut value = Value::from_type(<TrackType as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "track-type".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"track-type\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -185,7 +183,7 @@ impl<O: IsA<Track> + IsA<glib::object::Object>> GESTrackExt for O {
|
||||||
fn connect_commited<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_commited<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "commited",
|
connect_raw(self.to_glib_none().0 as *mut _, b"commited\0".as_ptr() as *const _,
|
||||||
transmute(commited_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(commited_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -193,7 +191,7 @@ impl<O: IsA<Track> + IsA<glib::object::Object>> GESTrackExt for O {
|
||||||
fn connect_track_element_added<F: Fn(&Self, &TrackElement) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_track_element_added<F: Fn(&Self, &TrackElement) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &TrackElement) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &TrackElement) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "track-element-added",
|
connect_raw(self.to_glib_none().0 as *mut _, b"track-element-added\0".as_ptr() as *const _,
|
||||||
transmute(track_element_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(track_element_added_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -201,7 +199,7 @@ impl<O: IsA<Track> + IsA<glib::object::Object>> GESTrackExt for O {
|
||||||
fn connect_track_element_removed<F: Fn(&Self, &TrackElement) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_track_element_removed<F: Fn(&Self, &TrackElement) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &TrackElement) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &TrackElement) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "track-element-removed",
|
connect_raw(self.to_glib_none().0 as *mut _, b"track-element-removed\0".as_ptr() as *const _,
|
||||||
transmute(track_element_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(track_element_removed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -209,7 +207,7 @@ impl<O: IsA<Track> + IsA<glib::object::Object>> GESTrackExt for O {
|
||||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::duration",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::duration\0".as_ptr() as *const _,
|
||||||
transmute(notify_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -217,7 +215,7 @@ impl<O: IsA<Track> + IsA<glib::object::Object>> GESTrackExt for O {
|
||||||
fn connect_property_mixing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_mixing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::mixing",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::mixing\0".as_ptr() as *const _,
|
||||||
transmute(notify_mixing_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_mixing_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -225,7 +223,7 @@ impl<O: IsA<Track> + IsA<glib::object::Object>> GESTrackExt for O {
|
||||||
fn connect_property_restriction_caps_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_restriction_caps_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::restriction-caps",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::restriction-caps\0".as_ptr() as *const _,
|
||||||
transmute(notify_restriction_caps_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_restriction_caps_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,21 +10,18 @@ use TimelineElement;
|
||||||
use Track;
|
use Track;
|
||||||
use TrackType;
|
use TrackType;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct TrackElement(Object<ffi::GESTrackElement, ffi::GESTrackElementClass>): TimelineElement, Extractable;
|
pub struct TrackElement(Object<ffi::GESTrackElement, ffi::GESTrackElementClass>): TimelineElement, Extractable;
|
||||||
|
@ -34,7 +31,7 @@ glib_wrapper! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait TrackElementExt {
|
pub trait TrackElementExt: 'static {
|
||||||
fn add_children_props<P: IsA<gst::Element>>(&self, element: &P, wanted_categories: &[&str], blacklist: &[&str], whitelist: &[&str]);
|
fn add_children_props<P: IsA<gst::Element>>(&self, element: &P, wanted_categories: &[&str], blacklist: &[&str], whitelist: &[&str]);
|
||||||
|
|
||||||
fn edit(&self, layers: &[Layer], mode: EditMode, edge: Edge, position: u64) -> bool;
|
fn edit(&self, layers: &[Layer], mode: EditMode, edge: Edge, position: u64) -> bool;
|
||||||
|
@ -78,7 +75,7 @@ pub trait TrackElementExt {
|
||||||
fn connect_property_track_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_track_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<TrackElement> + IsA<glib::object::Object>> TrackElementExt for O {
|
impl<O: IsA<TrackElement>> TrackElementExt for O {
|
||||||
fn add_children_props<P: IsA<gst::Element>>(&self, element: &P, wanted_categories: &[&str], blacklist: &[&str], whitelist: &[&str]) {
|
fn add_children_props<P: IsA<gst::Element>>(&self, element: &P, wanted_categories: &[&str], blacklist: &[&str], whitelist: &[&str]) {
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::ges_track_element_add_children_props(self.to_glib_none().0, element.to_glib_none().0, wanted_categories.to_glib_none().0, blacklist.to_glib_none().0, whitelist.to_glib_none().0);
|
ffi::ges_track_element_add_children_props(self.to_glib_none().0, element.to_glib_none().0, wanted_categories.to_glib_none().0, blacklist.to_glib_none().0, whitelist.to_glib_none().0);
|
||||||
|
@ -164,7 +161,7 @@ impl<O: IsA<TrackElement> + IsA<glib::object::Object>> TrackElementExt for O {
|
||||||
fn get_property_active(&self) -> bool {
|
fn get_property_active(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "active".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"active\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -180,7 +177,7 @@ impl<O: IsA<TrackElement> + IsA<glib::object::Object>> TrackElementExt for O {
|
||||||
fn connect_property_active_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_active_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::active",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::active\0".as_ptr() as *const _,
|
||||||
transmute(notify_active_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_active_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -188,7 +185,7 @@ impl<O: IsA<TrackElement> + IsA<glib::object::Object>> TrackElementExt for O {
|
||||||
fn connect_property_track_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_track_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::track",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::track\0".as_ptr() as *const _,
|
||||||
transmute(notify_track_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_track_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -196,7 +193,7 @@ impl<O: IsA<TrackElement> + IsA<glib::object::Object>> TrackElementExt for O {
|
||||||
fn connect_property_track_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_track_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::track-type",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::track-type\0".as_ptr() as *const _,
|
||||||
transmute(notify_track_type_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_track_type_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,20 +7,17 @@ use Container;
|
||||||
use Extractable;
|
use Extractable;
|
||||||
use TimelineElement;
|
use TimelineElement;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct UriClip(Object<ffi::GESUriClip, ffi::GESUriClipClass>): Clip, Container, TimelineElement, Extractable;
|
pub struct UriClip(Object<ffi::GESUriClip, ffi::GESUriClipClass>): Clip, Container, TimelineElement, Extractable;
|
||||||
|
@ -39,7 +36,7 @@ impl UriClip {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait UriClipExt {
|
pub trait UriClipExt: 'static {
|
||||||
fn get_uri(&self) -> Option<String>;
|
fn get_uri(&self) -> Option<String>;
|
||||||
|
|
||||||
fn is_image(&self) -> bool;
|
fn is_image(&self) -> bool;
|
||||||
|
@ -61,7 +58,7 @@ pub trait UriClipExt {
|
||||||
fn connect_property_supported_formats_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_supported_formats_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<UriClip> + IsA<glib::object::Object>> UriClipExt for O {
|
impl<O: IsA<UriClip>> UriClipExt for O {
|
||||||
fn get_uri(&self) -> Option<String> {
|
fn get_uri(&self) -> Option<String> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_none(ffi::ges_uri_clip_get_uri(self.to_glib_none().0))
|
from_glib_none(ffi::ges_uri_clip_get_uri(self.to_glib_none().0))
|
||||||
|
@ -95,7 +92,7 @@ impl<O: IsA<UriClip> + IsA<glib::object::Object>> UriClipExt for O {
|
||||||
fn get_property_is_image(&self) -> bool {
|
fn get_property_is_image(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "is-image".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"is-image\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,7 +100,7 @@ impl<O: IsA<UriClip> + IsA<glib::object::Object>> UriClipExt for O {
|
||||||
fn get_property_mute(&self) -> bool {
|
fn get_property_mute(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "mute".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"mute\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -111,7 +108,7 @@ impl<O: IsA<UriClip> + IsA<glib::object::Object>> UriClipExt for O {
|
||||||
fn connect_property_is_image_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_is_image_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::is-image",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::is-image\0".as_ptr() as *const _,
|
||||||
transmute(notify_is_image_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_is_image_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -119,7 +116,7 @@ impl<O: IsA<UriClip> + IsA<glib::object::Object>> UriClipExt for O {
|
||||||
fn connect_property_mute_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_mute_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::mute",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::mute\0".as_ptr() as *const _,
|
||||||
transmute(notify_mute_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_mute_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,7 +124,7 @@ impl<O: IsA<UriClip> + IsA<glib::object::Object>> UriClipExt for O {
|
||||||
fn connect_property_supported_formats_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_supported_formats_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::supported-formats",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::supported-formats\0".as_ptr() as *const _,
|
||||||
transmute(notify_supported_formats_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_supported_formats_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,19 +6,17 @@ use Asset;
|
||||||
use Error;
|
use Error;
|
||||||
use UriSourceAsset;
|
use UriSourceAsset;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
use gst_pbutils;
|
use gst_pbutils;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
|
@ -45,7 +43,7 @@ impl UriClipAsset {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait UriClipAssetExt {
|
pub trait UriClipAssetExt: 'static {
|
||||||
fn get_duration(&self) -> gst::ClockTime;
|
fn get_duration(&self) -> gst::ClockTime;
|
||||||
|
|
||||||
fn get_info(&self) -> Option<gst_pbutils::DiscovererInfo>;
|
fn get_info(&self) -> Option<gst_pbutils::DiscovererInfo>;
|
||||||
|
@ -59,7 +57,7 @@ pub trait UriClipAssetExt {
|
||||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<UriClipAsset> + IsA<glib::object::Object>> UriClipAssetExt for O {
|
impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
||||||
fn get_duration(&self) -> gst::ClockTime {
|
fn get_duration(&self) -> gst::ClockTime {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(ffi::ges_uri_clip_asset_get_duration(self.to_glib_none().0))
|
from_glib(ffi::ges_uri_clip_asset_get_duration(self.to_glib_none().0))
|
||||||
|
@ -86,14 +84,14 @@ impl<O: IsA<UriClipAsset> + IsA<glib::object::Object>> UriClipAssetExt for O {
|
||||||
|
|
||||||
fn set_property_duration(&self, duration: u64) {
|
fn set_property_duration(&self, duration: u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "duration".to_glib_none().0, Value::from(&duration).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::duration",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::duration\0".as_ptr() as *const _,
|
||||||
transmute(notify_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_duration_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,7 @@ use UriClipAsset;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst_pbutils;
|
use gst_pbutils;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct UriSourceAsset(Object<ffi::GESUriSourceAsset, ffi::GESUriSourceAssetClass>): Asset;
|
pub struct UriSourceAsset(Object<ffi::GESUriSourceAsset, ffi::GESUriSourceAssetClass>): Asset;
|
||||||
|
@ -21,7 +17,7 @@ glib_wrapper! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait UriSourceAssetExt {
|
pub trait UriSourceAssetExt: 'static {
|
||||||
fn get_filesource_asset(&self) -> Option<UriClipAsset>;
|
fn get_filesource_asset(&self) -> Option<UriClipAsset>;
|
||||||
|
|
||||||
fn get_stream_info(&self) -> Option<gst_pbutils::DiscovererStreamInfo>;
|
fn get_stream_info(&self) -> Option<gst_pbutils::DiscovererStreamInfo>;
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ b5ea065)
|
Generated by gir (https://github.com/gtk-rs/gir @ 811e711)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
|
|
|
@ -4,22 +4,19 @@
|
||||||
|
|
||||||
use GLContext;
|
use GLContext;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct GLBaseFilter(Object<ffi::GstGLBaseFilter, ffi::GstGLBaseFilterClass>): [
|
pub struct GLBaseFilter(Object<ffi::GstGLBaseFilter, ffi::GstGLBaseFilterClass>): [
|
||||||
|
@ -34,17 +31,17 @@ glib_wrapper! {
|
||||||
unsafe impl Send for GLBaseFilter {}
|
unsafe impl Send for GLBaseFilter {}
|
||||||
unsafe impl Sync for GLBaseFilter {}
|
unsafe impl Sync for GLBaseFilter {}
|
||||||
|
|
||||||
pub trait GLBaseFilterExt {
|
pub trait GLBaseFilterExt: 'static {
|
||||||
fn get_property_context(&self) -> Option<GLContext>;
|
fn get_property_context(&self) -> Option<GLContext>;
|
||||||
|
|
||||||
fn connect_property_context_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_context_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<GLBaseFilter> + IsA<glib::object::Object>> GLBaseFilterExt for O {
|
impl<O: IsA<GLBaseFilter>> GLBaseFilterExt for O {
|
||||||
fn get_property_context(&self) -> Option<GLContext> {
|
fn get_property_context(&self) -> Option<GLContext> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<GLContext as StaticType>::static_type());
|
let mut value = Value::from_type(<GLContext as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "context".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"context\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +49,7 @@ impl<O: IsA<GLBaseFilter> + IsA<glib::object::Object>> GLBaseFilterExt for O {
|
||||||
fn connect_property_context_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_context_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::context",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::context\0".as_ptr() as *const _,
|
||||||
transmute(notify_context_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_context_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,8 @@
|
||||||
use GLContext;
|
use GLContext;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct GLColorConvert(Object<ffi::GstGLColorConvert, ffi::GstGLColorConvertClass>): [
|
pub struct GLColorConvert(Object<ffi::GstGLColorConvert, ffi::GstGLColorConvertClass>): [
|
||||||
|
|
|
@ -13,8 +13,6 @@ use ffi;
|
||||||
use glib;
|
use glib;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
@ -59,7 +57,7 @@ impl GLContext {
|
||||||
unsafe impl Send for GLContext {}
|
unsafe impl Send for GLContext {}
|
||||||
unsafe impl Sync for GLContext {}
|
unsafe impl Sync for GLContext {}
|
||||||
|
|
||||||
pub trait GLContextExt {
|
pub trait GLContextExt: 'static {
|
||||||
fn activate(&self, activate: bool) -> Result<(), glib::error::BoolError>;
|
fn activate(&self, activate: bool) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
fn can_share(&self, other_context: &GLContext) -> bool;
|
fn can_share(&self, other_context: &GLContext) -> bool;
|
||||||
|
|
|
@ -12,14 +12,12 @@ use glib;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
|
@ -51,7 +49,7 @@ impl Default for GLDisplay {
|
||||||
unsafe impl Send for GLDisplay {}
|
unsafe impl Send for GLDisplay {}
|
||||||
unsafe impl Sync for GLDisplay {}
|
unsafe impl Sync for GLDisplay {}
|
||||||
|
|
||||||
pub trait GLDisplayExt {
|
pub trait GLDisplayExt: 'static {
|
||||||
fn add_context(&self, context: &GLContext) -> Result<(), glib::error::BoolError>;
|
fn add_context(&self, context: &GLContext) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
fn create_context(&self, other_context: &GLContext) -> Result<GLContext, Error>;
|
fn create_context(&self, other_context: &GLContext) -> Result<GLContext, Error>;
|
||||||
|
@ -71,7 +69,7 @@ pub trait GLDisplayExt {
|
||||||
fn connect_create_context<F: Fn(&Self, &GLContext) -> GLContext + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_create_context<F: Fn(&Self, &GLContext) -> GLContext + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<GLDisplay> + IsA<glib::object::Object>> GLDisplayExt for O {
|
impl<O: IsA<GLDisplay>> GLDisplayExt for O {
|
||||||
fn add_context(&self, context: &GLContext) -> Result<(), glib::error::BoolError> {
|
fn add_context(&self, context: &GLContext) -> Result<(), glib::error::BoolError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
glib::error::BoolError::from_glib(ffi::gst_gl_display_add_context(self.to_glib_none().0, context.to_glib_none().0), "Failed to add OpenGL context")
|
glib::error::BoolError::from_glib(ffi::gst_gl_display_add_context(self.to_glib_none().0, context.to_glib_none().0), "Failed to add OpenGL context")
|
||||||
|
@ -126,7 +124,7 @@ impl<O: IsA<GLDisplay> + IsA<glib::object::Object>> GLDisplayExt for O {
|
||||||
fn connect_create_context<F: Fn(&Self, &GLContext) -> GLContext + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_create_context<F: Fn(&Self, &GLContext) -> GLContext + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &GLContext) -> GLContext + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &GLContext) -> GLContext + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "create-context",
|
connect_raw(self.to_glib_none().0 as *mut _, b"create-context\0".as_ptr() as *const _,
|
||||||
transmute(create_context_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(create_context_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,8 @@
|
||||||
use GLDisplay;
|
use GLDisplay;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct GLDisplayEGL(Object<ffi::GstGLDisplayEGL, ffi::GstGLDisplayEGLClass>): [
|
pub struct GLDisplayEGL(Object<ffi::GstGLDisplayEGL, ffi::GstGLDisplayEGLClass>): [
|
||||||
|
|
|
@ -6,12 +6,9 @@ use GLContext;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct GLFramebuffer(Object<ffi::GstGLFramebuffer, ffi::GstGLFramebufferClass>): [
|
pub struct GLFramebuffer(Object<ffi::GstGLFramebuffer, ffi::GstGLFramebufferClass>): [
|
||||||
|
@ -42,7 +39,7 @@ impl GLFramebuffer {
|
||||||
unsafe impl Send for GLFramebuffer {}
|
unsafe impl Send for GLFramebuffer {}
|
||||||
unsafe impl Sync for GLFramebuffer {}
|
unsafe impl Sync for GLFramebuffer {}
|
||||||
|
|
||||||
pub trait GLFramebufferExt {
|
pub trait GLFramebufferExt: 'static {
|
||||||
//fn attach(&self, attachment_point: u32, mem: /*Ignored*/&mut GLBaseMemory);
|
//fn attach(&self, attachment_point: u32, mem: /*Ignored*/&mut GLBaseMemory);
|
||||||
|
|
||||||
fn bind(&self);
|
fn bind(&self);
|
||||||
|
|
|
@ -5,12 +5,8 @@
|
||||||
use GLContext;
|
use GLContext;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct GLOverlayCompositor(Object<ffi::GstGLOverlayCompositor, ffi::GstGLOverlayCompositorClass>): [
|
pub struct GLOverlayCompositor(Object<ffi::GstGLOverlayCompositor, ffi::GstGLOverlayCompositorClass>): [
|
||||||
|
|
|
@ -9,14 +9,13 @@ use ffi;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
|
@ -250,7 +249,7 @@ impl GLShader {
|
||||||
pub fn get_property_linked(&self) -> bool {
|
pub fn get_property_linked(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "linked".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"linked\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -258,7 +257,7 @@ impl GLShader {
|
||||||
pub fn connect_property_linked_notify<F: Fn(&GLShader) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_linked_notify<F: Fn(&GLShader) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&GLShader) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&GLShader) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::linked",
|
connect_raw(self.to_glib_none().0, b"notify::linked\0".as_ptr() as *const _,
|
||||||
transmute(notify_linked_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_linked_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,11 +5,8 @@
|
||||||
use GLContext;
|
use GLContext;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
|
|
|
@ -8,7 +8,7 @@ use ffi;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
|
@ -16,9 +16,7 @@ use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use gst_video;
|
use gst_video;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct GLViewConvert(Object<ffi::GstGLViewConvert, ffi::GstGLViewConvertClass>): [
|
pub struct GLViewConvert(Object<ffi::GstGLViewConvert, ffi::GstGLViewConvertClass>): [
|
||||||
|
@ -71,77 +69,77 @@ impl GLViewConvert {
|
||||||
pub fn get_property_downmix_mode(&self) -> GLStereoDownmix {
|
pub fn get_property_downmix_mode(&self) -> GLStereoDownmix {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<GLStereoDownmix as StaticType>::static_type());
|
let mut value = Value::from_type(<GLStereoDownmix as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "downmix-mode".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"downmix-mode\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_downmix_mode(&self, downmix_mode: GLStereoDownmix) {
|
pub fn set_property_downmix_mode(&self, downmix_mode: GLStereoDownmix) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "downmix-mode".to_glib_none().0, Value::from(&downmix_mode).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"downmix-mode\0".as_ptr() as *const _, Value::from(&downmix_mode).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_input_flags_override(&self) -> gst_video::VideoMultiviewFlags {
|
pub fn get_property_input_flags_override(&self) -> gst_video::VideoMultiviewFlags {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst_video::VideoMultiviewFlags as StaticType>::static_type());
|
let mut value = Value::from_type(<gst_video::VideoMultiviewFlags as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "input-flags-override".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"input-flags-override\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_input_flags_override(&self, input_flags_override: gst_video::VideoMultiviewFlags) {
|
pub fn set_property_input_flags_override(&self, input_flags_override: gst_video::VideoMultiviewFlags) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "input-flags-override".to_glib_none().0, Value::from(&input_flags_override).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"input-flags-override\0".as_ptr() as *const _, Value::from(&input_flags_override).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_input_mode_override(&self) -> gst_video::VideoMultiviewMode {
|
pub fn get_property_input_mode_override(&self) -> gst_video::VideoMultiviewMode {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst_video::VideoMultiviewMode as StaticType>::static_type());
|
let mut value = Value::from_type(<gst_video::VideoMultiviewMode as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "input-mode-override".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"input-mode-override\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_input_mode_override(&self, input_mode_override: gst_video::VideoMultiviewMode) {
|
pub fn set_property_input_mode_override(&self, input_mode_override: gst_video::VideoMultiviewMode) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "input-mode-override".to_glib_none().0, Value::from(&input_mode_override).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"input-mode-override\0".as_ptr() as *const _, Value::from(&input_mode_override).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_output_flags_override(&self) -> gst_video::VideoMultiviewFlags {
|
pub fn get_property_output_flags_override(&self) -> gst_video::VideoMultiviewFlags {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst_video::VideoMultiviewFlags as StaticType>::static_type());
|
let mut value = Value::from_type(<gst_video::VideoMultiviewFlags as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "output-flags-override".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"output-flags-override\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_output_flags_override(&self, output_flags_override: gst_video::VideoMultiviewFlags) {
|
pub fn set_property_output_flags_override(&self, output_flags_override: gst_video::VideoMultiviewFlags) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "output-flags-override".to_glib_none().0, Value::from(&output_flags_override).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"output-flags-override\0".as_ptr() as *const _, Value::from(&output_flags_override).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_output_mode_override(&self) -> gst_video::VideoMultiviewMode {
|
pub fn get_property_output_mode_override(&self) -> gst_video::VideoMultiviewMode {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst_video::VideoMultiviewMode as StaticType>::static_type());
|
let mut value = Value::from_type(<gst_video::VideoMultiviewMode as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "output-mode-override".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"output-mode-override\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_output_mode_override(&self, output_mode_override: gst_video::VideoMultiviewMode) {
|
pub fn set_property_output_mode_override(&self, output_mode_override: gst_video::VideoMultiviewMode) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "output-mode-override".to_glib_none().0, Value::from(&output_mode_override).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"output-mode-override\0".as_ptr() as *const _, Value::from(&output_mode_override).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn connect_property_downmix_mode_notify<F: Fn(&GLViewConvert) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_downmix_mode_notify<F: Fn(&GLViewConvert) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&GLViewConvert) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&GLViewConvert) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::downmix-mode",
|
connect_raw(self.to_glib_none().0, b"notify::downmix-mode\0".as_ptr() as *const _,
|
||||||
transmute(notify_downmix_mode_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_downmix_mode_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +147,7 @@ impl GLViewConvert {
|
||||||
pub fn connect_property_input_flags_override_notify<F: Fn(&GLViewConvert) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_input_flags_override_notify<F: Fn(&GLViewConvert) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&GLViewConvert) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&GLViewConvert) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::input-flags-override",
|
connect_raw(self.to_glib_none().0, b"notify::input-flags-override\0".as_ptr() as *const _,
|
||||||
transmute(notify_input_flags_override_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_input_flags_override_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,7 +155,7 @@ impl GLViewConvert {
|
||||||
pub fn connect_property_input_mode_override_notify<F: Fn(&GLViewConvert) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_input_mode_override_notify<F: Fn(&GLViewConvert) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&GLViewConvert) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&GLViewConvert) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::input-mode-override",
|
connect_raw(self.to_glib_none().0, b"notify::input-mode-override\0".as_ptr() as *const _,
|
||||||
transmute(notify_input_mode_override_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_input_mode_override_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -165,7 +163,7 @@ impl GLViewConvert {
|
||||||
pub fn connect_property_output_flags_override_notify<F: Fn(&GLViewConvert) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_output_flags_override_notify<F: Fn(&GLViewConvert) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&GLViewConvert) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&GLViewConvert) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::output-flags-override",
|
connect_raw(self.to_glib_none().0, b"notify::output-flags-override\0".as_ptr() as *const _,
|
||||||
transmute(notify_output_flags_override_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_output_flags_override_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -173,7 +171,7 @@ impl GLViewConvert {
|
||||||
pub fn connect_property_output_mode_override_notify<F: Fn(&GLViewConvert) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_output_mode_override_notify<F: Fn(&GLViewConvert) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&GLViewConvert) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&GLViewConvert) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::output-mode-override",
|
connect_raw(self.to_glib_none().0, b"notify::output-mode-override\0".as_ptr() as *const _,
|
||||||
transmute(notify_output_mode_override_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_output_mode_override_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,21 +5,18 @@
|
||||||
use GLContext;
|
use GLContext;
|
||||||
use GLDisplay;
|
use GLDisplay;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use libc;
|
use libc;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct GLWindow(Object<ffi::GstGLWindow, ffi::GstGLWindowClass>): [
|
pub struct GLWindow(Object<ffi::GstGLWindow, ffi::GstGLWindowClass>): [
|
||||||
|
@ -43,7 +40,7 @@ impl GLWindow {
|
||||||
unsafe impl Send for GLWindow {}
|
unsafe impl Send for GLWindow {}
|
||||||
unsafe impl Sync for GLWindow {}
|
unsafe impl Sync for GLWindow {}
|
||||||
|
|
||||||
pub trait GLWindowExt {
|
pub trait GLWindowExt: 'static {
|
||||||
fn draw(&self);
|
fn draw(&self);
|
||||||
|
|
||||||
fn get_context(&self) -> Option<GLContext>;
|
fn get_context(&self) -> Option<GLContext>;
|
||||||
|
@ -75,7 +72,7 @@ pub trait GLWindowExt {
|
||||||
fn connect_mouse_event<F: Fn(&Self, &str, i32, f64, f64) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_mouse_event<F: Fn(&Self, &str, i32, f64, f64) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<GLWindow> + IsA<glib::object::Object>> GLWindowExt for O {
|
impl<O: IsA<GLWindow>> GLWindowExt for O {
|
||||||
fn draw(&self) {
|
fn draw(&self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::gst_gl_window_draw(self.to_glib_none().0);
|
ffi::gst_gl_window_draw(self.to_glib_none().0);
|
||||||
|
@ -160,7 +157,7 @@ impl<O: IsA<GLWindow> + IsA<glib::object::Object>> GLWindowExt for O {
|
||||||
fn connect_key_event<F: Fn(&Self, &str, &str) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_key_event<F: Fn(&Self, &str, &str) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &str, &str) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &str, &str) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "key-event",
|
connect_raw(self.to_glib_none().0 as *mut _, b"key-event\0".as_ptr() as *const _,
|
||||||
transmute(key_event_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(key_event_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -168,7 +165,7 @@ impl<O: IsA<GLWindow> + IsA<glib::object::Object>> GLWindowExt for O {
|
||||||
fn connect_mouse_event<F: Fn(&Self, &str, i32, f64, f64) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_mouse_event<F: Fn(&Self, &str, i32, f64, f64) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &str, i32, f64, f64) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &str, i32, f64, f64) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "mouse-event",
|
connect_raw(self.to_glib_none().0 as *mut _, b"mouse-event\0".as_ptr() as *const _,
|
||||||
transmute(mouse_event_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(mouse_event_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,11 +8,8 @@ use GLSLProfile;
|
||||||
use GLSLVersion;
|
use GLSLVersion;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ b5ea065)
|
Generated by gir (https://github.com/gtk-rs/gir @ 811e711)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
|
|
|
@ -6,16 +6,14 @@ use ffi;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct NetClientClock(Object<ffi::GstNetClientClock, ffi::GstNetClientClockClass>): [
|
pub struct NetClientClock(Object<ffi::GstNetClientClock, ffi::GstNetClientClockClass>): [
|
||||||
|
@ -32,7 +30,7 @@ impl NetClientClock {
|
||||||
pub fn get_property_address(&self) -> Option<String> {
|
pub fn get_property_address(&self) -> Option<String> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<String as StaticType>::static_type());
|
let mut value = Value::from_type(<String as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "address".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,14 +38,14 @@ impl NetClientClock {
|
||||||
pub fn set_property_address<'a, P: Into<Option<&'a str>>>(&self, address: P) {
|
pub fn set_property_address<'a, P: Into<Option<&'a str>>>(&self, address: P) {
|
||||||
let address = address.into();
|
let address = address.into();
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "address".to_glib_none().0, Value::from(address).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"address\0".as_ptr() as *const _, Value::from(address).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_base_time(&self) -> u64 {
|
pub fn get_property_base_time(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "base-time".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"base-time\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,21 +53,21 @@ impl NetClientClock {
|
||||||
pub fn get_property_bus(&self) -> Option<gst::Bus> {
|
pub fn get_property_bus(&self) -> Option<gst::Bus> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Bus as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Bus as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "bus".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"bus\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_bus(&self, bus: Option<&gst::Bus>) {
|
pub fn set_property_bus(&self, bus: Option<&gst::Bus>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "bus".to_glib_none().0, Value::from(bus).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"bus\0".as_ptr() as *const _, Value::from(bus).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_internal_clock(&self) -> Option<gst::Clock> {
|
pub fn get_property_internal_clock(&self) -> Option<gst::Clock> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "internal-clock".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,63 +75,63 @@ impl NetClientClock {
|
||||||
pub fn get_property_minimum_update_interval(&self) -> u64 {
|
pub fn get_property_minimum_update_interval(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "minimum-update-interval".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"minimum-update-interval\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_minimum_update_interval(&self, minimum_update_interval: u64) {
|
pub fn set_property_minimum_update_interval(&self, minimum_update_interval: u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "minimum-update-interval".to_glib_none().0, Value::from(&minimum_update_interval).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"minimum-update-interval\0".as_ptr() as *const _, Value::from(&minimum_update_interval).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_port(&self) -> i32 {
|
pub fn get_property_port(&self) -> i32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "port".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"port\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_port(&self, port: i32) {
|
pub fn set_property_port(&self, port: i32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "port".to_glib_none().0, Value::from(&port).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"port\0".as_ptr() as *const _, Value::from(&port).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_qos_dscp(&self) -> i32 {
|
pub fn get_property_qos_dscp(&self) -> i32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "qos-dscp".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"qos-dscp\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_qos_dscp(&self, qos_dscp: i32) {
|
pub fn set_property_qos_dscp(&self, qos_dscp: i32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "qos-dscp".to_glib_none().0, Value::from(&qos_dscp).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"qos-dscp\0".as_ptr() as *const _, Value::from(&qos_dscp).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_round_trip_limit(&self) -> u64 {
|
pub fn get_property_round_trip_limit(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "round-trip-limit".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"round-trip-limit\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_round_trip_limit(&self, round_trip_limit: u64) {
|
pub fn set_property_round_trip_limit(&self, round_trip_limit: u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "round-trip-limit".to_glib_none().0, Value::from(&round_trip_limit).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"round-trip-limit\0".as_ptr() as *const _, Value::from(&round_trip_limit).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn connect_property_address_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_address_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&NetClientClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&NetClientClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::address",
|
connect_raw(self.to_glib_none().0, b"notify::address\0".as_ptr() as *const _,
|
||||||
transmute(notify_address_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_address_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,7 +139,7 @@ impl NetClientClock {
|
||||||
pub fn connect_property_bus_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_bus_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&NetClientClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&NetClientClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::bus",
|
connect_raw(self.to_glib_none().0, b"notify::bus\0".as_ptr() as *const _,
|
||||||
transmute(notify_bus_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_bus_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +147,7 @@ impl NetClientClock {
|
||||||
pub fn connect_property_internal_clock_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_internal_clock_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&NetClientClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&NetClientClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::internal-clock",
|
connect_raw(self.to_glib_none().0, b"notify::internal-clock\0".as_ptr() as *const _,
|
||||||
transmute(notify_internal_clock_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_internal_clock_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,7 +155,7 @@ impl NetClientClock {
|
||||||
pub fn connect_property_minimum_update_interval_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_minimum_update_interval_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&NetClientClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&NetClientClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::minimum-update-interval",
|
connect_raw(self.to_glib_none().0, b"notify::minimum-update-interval\0".as_ptr() as *const _,
|
||||||
transmute(notify_minimum_update_interval_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_minimum_update_interval_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -165,7 +163,7 @@ impl NetClientClock {
|
||||||
pub fn connect_property_port_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_port_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&NetClientClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&NetClientClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::port",
|
connect_raw(self.to_glib_none().0, b"notify::port\0".as_ptr() as *const _,
|
||||||
transmute(notify_port_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_port_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -173,7 +171,7 @@ impl NetClientClock {
|
||||||
pub fn connect_property_qos_dscp_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_qos_dscp_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&NetClientClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&NetClientClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::qos-dscp",
|
connect_raw(self.to_glib_none().0, b"notify::qos-dscp\0".as_ptr() as *const _,
|
||||||
transmute(notify_qos_dscp_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_qos_dscp_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,7 +179,7 @@ impl NetClientClock {
|
||||||
pub fn connect_property_round_trip_limit_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_round_trip_limit_notify<F: Fn(&NetClientClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&NetClientClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&NetClientClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::round-trip-limit",
|
connect_raw(self.to_glib_none().0, b"notify::round-trip-limit\0".as_ptr() as *const _,
|
||||||
transmute(notify_round_trip_limit_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_round_trip_limit_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,16 +6,14 @@ use ffi;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct NetTimeProvider(Object<ffi::GstNetTimeProvider, ffi::GstNetTimeProviderClass>): [
|
pub struct NetTimeProvider(Object<ffi::GstNetTimeProvider, ffi::GstNetTimeProviderClass>): [
|
||||||
|
@ -31,21 +29,21 @@ impl NetTimeProvider {
|
||||||
pub fn get_property_active(&self) -> bool {
|
pub fn get_property_active(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "active".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"active\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_active(&self, active: bool) {
|
pub fn set_property_active(&self, active: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "active".to_glib_none().0, Value::from(&active).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"active\0".as_ptr() as *const _, Value::from(&active).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_address(&self) -> Option<String> {
|
pub fn get_property_address(&self) -> Option<String> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<String as StaticType>::static_type());
|
let mut value = Value::from_type(<String as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "address".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +51,7 @@ impl NetTimeProvider {
|
||||||
pub fn get_property_clock(&self) -> Option<gst::Clock> {
|
pub fn get_property_clock(&self) -> Option<gst::Clock> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "clock".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"clock\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,7 +59,7 @@ impl NetTimeProvider {
|
||||||
pub fn get_property_port(&self) -> i32 {
|
pub fn get_property_port(&self) -> i32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "port".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"port\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,21 +67,21 @@ impl NetTimeProvider {
|
||||||
pub fn get_property_qos_dscp(&self) -> i32 {
|
pub fn get_property_qos_dscp(&self) -> i32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "qos-dscp".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"qos-dscp\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_qos_dscp(&self, qos_dscp: i32) {
|
pub fn set_property_qos_dscp(&self, qos_dscp: i32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "qos-dscp".to_glib_none().0, Value::from(&qos_dscp).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"qos-dscp\0".as_ptr() as *const _, Value::from(&qos_dscp).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn connect_property_active_notify<F: Fn(&NetTimeProvider) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_active_notify<F: Fn(&NetTimeProvider) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&NetTimeProvider) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&NetTimeProvider) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::active",
|
connect_raw(self.to_glib_none().0, b"notify::active\0".as_ptr() as *const _,
|
||||||
transmute(notify_active_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_active_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,7 +89,7 @@ impl NetTimeProvider {
|
||||||
pub fn connect_property_qos_dscp_notify<F: Fn(&NetTimeProvider) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_qos_dscp_notify<F: Fn(&NetTimeProvider) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&NetTimeProvider) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&NetTimeProvider) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::qos-dscp",
|
connect_raw(self.to_glib_none().0, b"notify::qos-dscp\0".as_ptr() as *const _,
|
||||||
transmute(notify_qos_dscp_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_qos_dscp_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,8 @@
|
||||||
use NetClientClock;
|
use NetClientClock;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct NtpClock(Object<ffi::GstNtpClock, ffi::GstNtpClockClass>): [
|
pub struct NtpClock(Object<ffi::GstNtpClock, ffi::GstNtpClockClass>): [
|
||||||
|
|
|
@ -6,16 +6,14 @@ use ffi;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct PtpClock(Object<ffi::GstPtpClock, ffi::GstPtpClockClass>): [
|
pub struct PtpClock(Object<ffi::GstPtpClock, ffi::GstPtpClockClass>): [
|
||||||
|
@ -32,7 +30,7 @@ impl PtpClock {
|
||||||
pub fn get_property_domain(&self) -> u32 {
|
pub fn get_property_domain(&self) -> u32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "domain".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"domain\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,7 +38,7 @@ impl PtpClock {
|
||||||
pub fn get_property_grandmaster_clock_id(&self) -> u64 {
|
pub fn get_property_grandmaster_clock_id(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "grandmaster-clock-id".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"grandmaster-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +46,7 @@ impl PtpClock {
|
||||||
pub fn get_property_internal_clock(&self) -> Option<gst::Clock> {
|
pub fn get_property_internal_clock(&self) -> Option<gst::Clock> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "internal-clock".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,7 +54,7 @@ impl PtpClock {
|
||||||
pub fn get_property_master_clock_id(&self) -> u64 {
|
pub fn get_property_master_clock_id(&self) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "master-clock-id".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"master-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +62,7 @@ impl PtpClock {
|
||||||
pub fn connect_property_grandmaster_clock_id_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_grandmaster_clock_id_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&PtpClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&PtpClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::grandmaster-clock-id",
|
connect_raw(self.to_glib_none().0, b"notify::grandmaster-clock-id\0".as_ptr() as *const _,
|
||||||
transmute(notify_grandmaster_clock_id_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_grandmaster_clock_id_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +70,7 @@ impl PtpClock {
|
||||||
pub fn connect_property_internal_clock_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_internal_clock_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&PtpClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&PtpClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::internal-clock",
|
connect_raw(self.to_glib_none().0, b"notify::internal-clock\0".as_ptr() as *const _,
|
||||||
transmute(notify_internal_clock_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_internal_clock_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,7 +78,7 @@ impl PtpClock {
|
||||||
pub fn connect_property_master_clock_id_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_master_clock_id_notify<F: Fn(&PtpClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&PtpClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&PtpClock) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::master-clock-id",
|
connect_raw(self.to_glib_none().0, b"notify::master-clock-id\0".as_ptr() as *const _,
|
||||||
transmute(notify_master_clock_id_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_master_clock_id_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ b5ea065)
|
Generated by gir (https://github.com/gtk-rs/gir @ 811e711)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
|
|
|
@ -7,14 +7,12 @@ use Error;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
use glib;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_ffi;
|
use gst_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
|
@ -65,7 +63,7 @@ impl Discoverer {
|
||||||
pub fn connect_discovered<F: Fn(&Discoverer, &DiscovererInfo, &Option<Error>) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_discovered<F: Fn(&Discoverer, &DiscovererInfo, &Option<Error>) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Discoverer, &DiscovererInfo, &Option<Error>) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Discoverer, &DiscovererInfo, &Option<Error>) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "discovered",
|
connect_raw(self.to_glib_none().0, b"discovered\0".as_ptr() as *const _,
|
||||||
transmute(discovered_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(discovered_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +71,7 @@ impl Discoverer {
|
||||||
pub fn connect_finished<F: Fn(&Discoverer) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_finished<F: Fn(&Discoverer) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Discoverer) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Discoverer) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "finished",
|
connect_raw(self.to_glib_none().0, b"finished\0".as_ptr() as *const _,
|
||||||
transmute(finished_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(finished_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,7 +79,7 @@ impl Discoverer {
|
||||||
pub fn connect_source_setup<F: Fn(&Discoverer, &gst::Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_source_setup<F: Fn(&Discoverer, &gst::Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Discoverer, &gst::Element) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Discoverer, &gst::Element) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "source-setup",
|
connect_raw(self.to_glib_none().0, b"source-setup\0".as_ptr() as *const _,
|
||||||
transmute(source_setup_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(source_setup_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +87,7 @@ impl Discoverer {
|
||||||
pub fn connect_starting<F: Fn(&Discoverer) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_starting<F: Fn(&Discoverer) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Discoverer) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Discoverer) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "starting",
|
connect_raw(self.to_glib_none().0, b"starting\0".as_ptr() as *const _,
|
||||||
transmute(starting_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(starting_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
use DiscovererStreamInfo;
|
use DiscovererStreamInfo;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct DiscovererAudioInfo(Object<ffi::GstDiscovererAudioInfo>): DiscovererStreamInfo;
|
pub struct DiscovererAudioInfo(Object<ffi::GstDiscovererAudioInfo>): DiscovererStreamInfo;
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
use DiscovererStreamInfo;
|
use DiscovererStreamInfo;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct DiscovererContainerInfo(Object<ffi::GstDiscovererContainerInfo>): DiscovererStreamInfo;
|
pub struct DiscovererContainerInfo(Object<ffi::GstDiscovererContainerInfo>): DiscovererStreamInfo;
|
||||||
|
|
|
@ -9,11 +9,7 @@ use ffi;
|
||||||
use glib;
|
use glib;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct DiscovererInfo(Object<ffi::GstDiscovererInfo>);
|
pub struct DiscovererInfo(Object<ffi::GstDiscovererInfo>);
|
||||||
|
@ -35,7 +31,7 @@ impl DiscovererInfo {
|
||||||
unsafe impl Send for DiscovererInfo {}
|
unsafe impl Send for DiscovererInfo {}
|
||||||
unsafe impl Sync for DiscovererInfo {}
|
unsafe impl Sync for DiscovererInfo {}
|
||||||
|
|
||||||
pub trait DiscovererInfoExt {
|
pub trait DiscovererInfoExt: 'static {
|
||||||
fn copy(&self) -> DiscovererInfo;
|
fn copy(&self) -> DiscovererInfo;
|
||||||
|
|
||||||
fn get_audio_streams(&self) -> Vec<DiscovererStreamInfo>;
|
fn get_audio_streams(&self) -> Vec<DiscovererStreamInfo>;
|
||||||
|
|
|
@ -5,11 +5,7 @@
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct DiscovererStreamInfo(Object<ffi::GstDiscovererStreamInfo>);
|
pub struct DiscovererStreamInfo(Object<ffi::GstDiscovererStreamInfo>);
|
||||||
|
@ -22,7 +18,7 @@ glib_wrapper! {
|
||||||
unsafe impl Send for DiscovererStreamInfo {}
|
unsafe impl Send for DiscovererStreamInfo {}
|
||||||
unsafe impl Sync for DiscovererStreamInfo {}
|
unsafe impl Sync for DiscovererStreamInfo {}
|
||||||
|
|
||||||
pub trait DiscovererStreamInfoExt {
|
pub trait DiscovererStreamInfoExt: 'static {
|
||||||
fn get_caps(&self) -> Option<gst::Caps>;
|
fn get_caps(&self) -> Option<gst::Caps>;
|
||||||
|
|
||||||
fn get_misc(&self) -> Option<gst::Structure>;
|
fn get_misc(&self) -> Option<gst::Structure>;
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
use DiscovererStreamInfo;
|
use DiscovererStreamInfo;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct DiscovererSubtitleInfo(Object<ffi::GstDiscovererSubtitleInfo>): DiscovererStreamInfo;
|
pub struct DiscovererSubtitleInfo(Object<ffi::GstDiscovererSubtitleInfo>): DiscovererStreamInfo;
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
use DiscovererStreamInfo;
|
use DiscovererStreamInfo;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct DiscovererVideoInfo(Object<ffi::GstDiscovererVideoInfo>): DiscovererStreamInfo;
|
pub struct DiscovererVideoInfo(Object<ffi::GstDiscovererVideoInfo>): DiscovererStreamInfo;
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
use EncodingProfile;
|
use EncodingProfile;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct EncodingAudioProfile(Object<ffi::GstEncodingAudioProfile, ffi::GstEncodingAudioProfileClass>): EncodingProfile;
|
pub struct EncodingAudioProfile(Object<ffi::GstEncodingAudioProfile, ffi::GstEncodingAudioProfileClass>): EncodingProfile;
|
||||||
|
|
|
@ -6,10 +6,6 @@ use EncodingProfile;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct EncodingContainerProfile(Object<ffi::GstEncodingContainerProfile, ffi::GstEncodingContainerProfileClass>): EncodingProfile;
|
pub struct EncodingContainerProfile(Object<ffi::GstEncodingContainerProfile, ffi::GstEncodingContainerProfileClass>): EncodingProfile;
|
||||||
|
@ -22,7 +18,7 @@ glib_wrapper! {
|
||||||
unsafe impl Send for EncodingContainerProfile {}
|
unsafe impl Send for EncodingContainerProfile {}
|
||||||
unsafe impl Sync for EncodingContainerProfile {}
|
unsafe impl Sync for EncodingContainerProfile {}
|
||||||
|
|
||||||
pub trait EncodingContainerProfileExt {
|
pub trait EncodingContainerProfileExt: 'static {
|
||||||
fn contains_profile<P: IsA<EncodingProfile>>(&self, profile: &P) -> bool;
|
fn contains_profile<P: IsA<EncodingProfile>>(&self, profile: &P) -> bool;
|
||||||
|
|
||||||
fn get_profiles(&self) -> Vec<EncodingProfile>;
|
fn get_profiles(&self) -> Vec<EncodingProfile>;
|
||||||
|
|
|
@ -6,11 +6,7 @@ use DiscovererInfo;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct EncodingProfile(Object<ffi::GstEncodingProfile, ffi::GstEncodingProfileClass>);
|
pub struct EncodingProfile(Object<ffi::GstEncodingProfile, ffi::GstEncodingProfileClass>);
|
||||||
|
@ -43,7 +39,7 @@ impl EncodingProfile {
|
||||||
unsafe impl Send for EncodingProfile {}
|
unsafe impl Send for EncodingProfile {}
|
||||||
unsafe impl Sync for EncodingProfile {}
|
unsafe impl Sync for EncodingProfile {}
|
||||||
|
|
||||||
pub trait EncodingProfileExt {
|
pub trait EncodingProfileExt: 'static {
|
||||||
fn copy(&self) -> EncodingProfile;
|
fn copy(&self) -> EncodingProfile;
|
||||||
|
|
||||||
fn get_allow_dynamic_output(&self) -> bool;
|
fn get_allow_dynamic_output(&self) -> bool;
|
||||||
|
|
|
@ -7,10 +7,7 @@ use Error;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std;
|
use std;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
|
@ -53,7 +50,7 @@ impl EncodingTarget {
|
||||||
unsafe impl Send for EncodingTarget {}
|
unsafe impl Send for EncodingTarget {}
|
||||||
unsafe impl Sync for EncodingTarget {}
|
unsafe impl Sync for EncodingTarget {}
|
||||||
|
|
||||||
pub trait EncodingTargetExt {
|
pub trait EncodingTargetExt: 'static {
|
||||||
fn get_category(&self) -> String;
|
fn get_category(&self) -> String;
|
||||||
|
|
||||||
fn get_description(&self) -> String;
|
fn get_description(&self) -> String;
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
use EncodingProfile;
|
use EncodingProfile;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct EncodingVideoProfile(Object<ffi::GstEncodingVideoProfile, ffi::GstEncodingVideoProfileClass>): EncodingProfile;
|
pub struct EncodingVideoProfile(Object<ffi::GstEncodingVideoProfile, ffi::GstEncodingVideoProfileClass>): EncodingProfile;
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ b5ea065)
|
Generated by gir (https://github.com/gtk-rs/gir @ 811e711)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
|
|
|
@ -16,7 +16,7 @@ use glib;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
|
@ -25,9 +25,7 @@ use gst_ffi;
|
||||||
use gst_video;
|
use gst_video;
|
||||||
use libc;
|
use libc;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct Player(Object<ffi::GstPlayer, ffi::GstPlayerClass>): [
|
pub struct Player(Object<ffi::GstPlayer, ffi::GstPlayerClass>): [
|
||||||
|
@ -287,7 +285,7 @@ impl Player {
|
||||||
pub fn get_property_suburi(&self) -> Option<String> {
|
pub fn get_property_suburi(&self) -> Option<String> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<String as StaticType>::static_type());
|
let mut value = Value::from_type(<String as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "suburi".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"suburi\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -295,35 +293,35 @@ impl Player {
|
||||||
pub fn set_property_suburi<'a, P: Into<Option<&'a str>>>(&self, suburi: P) {
|
pub fn set_property_suburi<'a, P: Into<Option<&'a str>>>(&self, suburi: P) {
|
||||||
let suburi = suburi.into();
|
let suburi = suburi.into();
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "suburi".to_glib_none().0, Value::from(suburi).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"suburi\0".as_ptr() as *const _, Value::from(suburi).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_video_multiview_flags(&self) -> gst_video::VideoMultiviewFlags {
|
pub fn get_property_video_multiview_flags(&self) -> gst_video::VideoMultiviewFlags {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst_video::VideoMultiviewFlags as StaticType>::static_type());
|
let mut value = Value::from_type(<gst_video::VideoMultiviewFlags as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "video-multiview-flags".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"video-multiview-flags\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_video_multiview_flags(&self, video_multiview_flags: gst_video::VideoMultiviewFlags) {
|
pub fn set_property_video_multiview_flags(&self, video_multiview_flags: gst_video::VideoMultiviewFlags) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "video-multiview-flags".to_glib_none().0, Value::from(&video_multiview_flags).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"video-multiview-flags\0".as_ptr() as *const _, Value::from(&video_multiview_flags).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_video_multiview_mode(&self) -> gst_video::VideoMultiviewFramePacking {
|
pub fn get_property_video_multiview_mode(&self) -> gst_video::VideoMultiviewFramePacking {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst_video::VideoMultiviewFramePacking as StaticType>::static_type());
|
let mut value = Value::from_type(<gst_video::VideoMultiviewFramePacking as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "video-multiview-mode".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"video-multiview-mode\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_video_multiview_mode(&self, video_multiview_mode: gst_video::VideoMultiviewFramePacking) {
|
pub fn set_property_video_multiview_mode(&self, video_multiview_mode: gst_video::VideoMultiviewFramePacking) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "video-multiview-mode".to_glib_none().0, Value::from(&video_multiview_mode).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"video-multiview-mode\0".as_ptr() as *const _, Value::from(&video_multiview_mode).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,7 +356,7 @@ impl Player {
|
||||||
pub fn connect_buffering<F: Fn(&Player, i32) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_buffering<F: Fn(&Player, i32) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player, i32) + Send + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player, i32) + Send + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "buffering",
|
connect_raw(self.to_glib_none().0, b"buffering\0".as_ptr() as *const _,
|
||||||
transmute(buffering_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(buffering_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -366,7 +364,7 @@ impl Player {
|
||||||
pub fn connect_end_of_stream<F: Fn(&Player) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_end_of_stream<F: Fn(&Player) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "end-of-stream",
|
connect_raw(self.to_glib_none().0, b"end-of-stream\0".as_ptr() as *const _,
|
||||||
transmute(end_of_stream_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(end_of_stream_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -374,7 +372,7 @@ impl Player {
|
||||||
pub fn connect_error<F: Fn(&Player, &Error) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_error<F: Fn(&Player, &Error) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player, &Error) + Send + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player, &Error) + Send + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "error",
|
connect_raw(self.to_glib_none().0, b"error\0".as_ptr() as *const _,
|
||||||
transmute(error_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(error_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -382,7 +380,7 @@ impl Player {
|
||||||
pub fn connect_media_info_updated<F: Fn(&Player, &PlayerMediaInfo) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_media_info_updated<F: Fn(&Player, &PlayerMediaInfo) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player, &PlayerMediaInfo) + Send + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player, &PlayerMediaInfo) + Send + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "media-info-updated",
|
connect_raw(self.to_glib_none().0, b"media-info-updated\0".as_ptr() as *const _,
|
||||||
transmute(media_info_updated_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(media_info_updated_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -390,7 +388,7 @@ impl Player {
|
||||||
pub fn connect_mute_changed<F: Fn(&Player) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_mute_changed<F: Fn(&Player) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "mute-changed",
|
connect_raw(self.to_glib_none().0, b"mute-changed\0".as_ptr() as *const _,
|
||||||
transmute(mute_changed_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(mute_changed_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -398,7 +396,7 @@ impl Player {
|
||||||
pub fn connect_state_changed<F: Fn(&Player, PlayerState) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_state_changed<F: Fn(&Player, PlayerState) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player, PlayerState) + Send + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player, PlayerState) + Send + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "state-changed",
|
connect_raw(self.to_glib_none().0, b"state-changed\0".as_ptr() as *const _,
|
||||||
transmute(state_changed_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(state_changed_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -406,7 +404,7 @@ impl Player {
|
||||||
pub fn connect_uri_loaded<F: Fn(&Player, &str) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_uri_loaded<F: Fn(&Player, &str) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player, &str) + Send + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player, &str) + Send + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "uri-loaded",
|
connect_raw(self.to_glib_none().0, b"uri-loaded\0".as_ptr() as *const _,
|
||||||
transmute(uri_loaded_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(uri_loaded_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -414,7 +412,7 @@ impl Player {
|
||||||
pub fn connect_video_dimensions_changed<F: Fn(&Player, i32, i32) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_video_dimensions_changed<F: Fn(&Player, i32, i32) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player, i32, i32) + Send + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player, i32, i32) + Send + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "video-dimensions-changed",
|
connect_raw(self.to_glib_none().0, b"video-dimensions-changed\0".as_ptr() as *const _,
|
||||||
transmute(video_dimensions_changed_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(video_dimensions_changed_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -422,7 +420,7 @@ impl Player {
|
||||||
pub fn connect_volume_changed<F: Fn(&Player) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_volume_changed<F: Fn(&Player) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "volume-changed",
|
connect_raw(self.to_glib_none().0, b"volume-changed\0".as_ptr() as *const _,
|
||||||
transmute(volume_changed_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(volume_changed_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -430,7 +428,7 @@ impl Player {
|
||||||
pub fn connect_warning<F: Fn(&Player, &Error) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_warning<F: Fn(&Player, &Error) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player, &Error) + Send + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player, &Error) + Send + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "warning",
|
connect_raw(self.to_glib_none().0, b"warning\0".as_ptr() as *const _,
|
||||||
transmute(warning_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(warning_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -438,7 +436,7 @@ impl Player {
|
||||||
pub fn connect_property_audio_video_offset_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_audio_video_offset_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::audio-video-offset",
|
connect_raw(self.to_glib_none().0, b"notify::audio-video-offset\0".as_ptr() as *const _,
|
||||||
transmute(notify_audio_video_offset_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_audio_video_offset_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -446,7 +444,7 @@ impl Player {
|
||||||
pub fn connect_property_current_audio_track_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_current_audio_track_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::current-audio-track",
|
connect_raw(self.to_glib_none().0, b"notify::current-audio-track\0".as_ptr() as *const _,
|
||||||
transmute(notify_current_audio_track_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_current_audio_track_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -454,7 +452,7 @@ impl Player {
|
||||||
pub fn connect_property_current_subtitle_track_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_current_subtitle_track_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::current-subtitle-track",
|
connect_raw(self.to_glib_none().0, b"notify::current-subtitle-track\0".as_ptr() as *const _,
|
||||||
transmute(notify_current_subtitle_track_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_current_subtitle_track_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -462,7 +460,7 @@ impl Player {
|
||||||
pub fn connect_property_current_video_track_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_current_video_track_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::current-video-track",
|
connect_raw(self.to_glib_none().0, b"notify::current-video-track\0".as_ptr() as *const _,
|
||||||
transmute(notify_current_video_track_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_current_video_track_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -470,7 +468,7 @@ impl Player {
|
||||||
pub fn connect_property_duration_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_duration_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::duration",
|
connect_raw(self.to_glib_none().0, b"notify::duration\0".as_ptr() as *const _,
|
||||||
transmute(notify_duration_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_duration_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -478,7 +476,7 @@ impl Player {
|
||||||
pub fn connect_property_media_info_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_media_info_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::media-info",
|
connect_raw(self.to_glib_none().0, b"notify::media-info\0".as_ptr() as *const _,
|
||||||
transmute(notify_media_info_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_media_info_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -486,7 +484,7 @@ impl Player {
|
||||||
pub fn connect_property_mute_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_mute_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::mute",
|
connect_raw(self.to_glib_none().0, b"notify::mute\0".as_ptr() as *const _,
|
||||||
transmute(notify_mute_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_mute_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -494,7 +492,7 @@ impl Player {
|
||||||
pub fn connect_property_pipeline_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_pipeline_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::pipeline",
|
connect_raw(self.to_glib_none().0, b"notify::pipeline\0".as_ptr() as *const _,
|
||||||
transmute(notify_pipeline_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_pipeline_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -502,7 +500,7 @@ impl Player {
|
||||||
pub fn connect_property_position_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_position_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::position",
|
connect_raw(self.to_glib_none().0, b"notify::position\0".as_ptr() as *const _,
|
||||||
transmute(notify_position_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_position_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -510,7 +508,7 @@ impl Player {
|
||||||
pub fn connect_property_rate_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_rate_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::rate",
|
connect_raw(self.to_glib_none().0, b"notify::rate\0".as_ptr() as *const _,
|
||||||
transmute(notify_rate_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_rate_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -518,7 +516,7 @@ impl Player {
|
||||||
pub fn connect_property_suburi_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_suburi_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::suburi",
|
connect_raw(self.to_glib_none().0, b"notify::suburi\0".as_ptr() as *const _,
|
||||||
transmute(notify_suburi_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_suburi_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -526,7 +524,7 @@ impl Player {
|
||||||
pub fn connect_property_uri_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_uri_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::uri",
|
connect_raw(self.to_glib_none().0, b"notify::uri\0".as_ptr() as *const _,
|
||||||
transmute(notify_uri_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_uri_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -534,7 +532,7 @@ impl Player {
|
||||||
pub fn connect_property_video_multiview_flags_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_video_multiview_flags_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::video-multiview-flags",
|
connect_raw(self.to_glib_none().0, b"notify::video-multiview-flags\0".as_ptr() as *const _,
|
||||||
transmute(notify_video_multiview_flags_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_video_multiview_flags_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -542,7 +540,7 @@ impl Player {
|
||||||
pub fn connect_property_video_multiview_mode_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_video_multiview_mode_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::video-multiview-mode",
|
connect_raw(self.to_glib_none().0, b"notify::video-multiview-mode\0".as_ptr() as *const _,
|
||||||
transmute(notify_video_multiview_mode_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_video_multiview_mode_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -550,7 +548,7 @@ impl Player {
|
||||||
pub fn connect_property_volume_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_volume_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Player) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::volume",
|
connect_raw(self.to_glib_none().0, b"notify::volume\0".as_ptr() as *const _,
|
||||||
transmute(notify_volume_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_volume_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
use PlayerStreamInfo;
|
use PlayerStreamInfo;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct PlayerAudioInfo(Object<ffi::GstPlayerAudioInfo, ffi::GstPlayerAudioInfoClass>): PlayerStreamInfo;
|
pub struct PlayerAudioInfo(Object<ffi::GstPlayerAudioInfo, ffi::GstPlayerAudioInfoClass>): PlayerStreamInfo;
|
||||||
|
|
|
@ -8,10 +8,7 @@ use glib;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct PlayerGMainContextSignalDispatcher(Object<ffi::GstPlayerGMainContextSignalDispatcher, ffi::GstPlayerGMainContextSignalDispatcherClass>): PlayerSignalDispatcher;
|
pub struct PlayerGMainContextSignalDispatcher(Object<ffi::GstPlayerGMainContextSignalDispatcher, ffi::GstPlayerGMainContextSignalDispatcherClass>): PlayerSignalDispatcher;
|
||||||
|
@ -25,7 +22,7 @@ impl PlayerGMainContextSignalDispatcher {
|
||||||
pub fn get_property_application_context(&self) -> Option<glib::MainContext> {
|
pub fn get_property_application_context(&self) -> Option<glib::MainContext> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<glib::MainContext as StaticType>::static_type());
|
let mut value = Value::from_type(<glib::MainContext as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "application-context".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"application-context\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,11 +8,7 @@ use PlayerSubtitleInfo;
|
||||||
use PlayerVideoInfo;
|
use PlayerVideoInfo;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct PlayerMediaInfo(Object<ffi::GstPlayerMediaInfo, ffi::GstPlayerMediaInfoClass>);
|
pub struct PlayerMediaInfo(Object<ffi::GstPlayerMediaInfo, ffi::GstPlayerMediaInfoClass>);
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct PlayerSignalDispatcher(Object<ffi::GstPlayerSignalDispatcher, ffi::GstPlayerSignalDispatcherInterface>);
|
pub struct PlayerSignalDispatcher(Object<ffi::GstPlayerSignalDispatcher, ffi::GstPlayerSignalDispatcherInterface>);
|
||||||
|
@ -21,6 +17,6 @@ glib_wrapper! {
|
||||||
unsafe impl Send for PlayerSignalDispatcher {}
|
unsafe impl Send for PlayerSignalDispatcher {}
|
||||||
unsafe impl Sync for PlayerSignalDispatcher {}
|
unsafe impl Sync for PlayerSignalDispatcher {}
|
||||||
|
|
||||||
pub trait PlayerSignalDispatcherExt {}
|
pub trait PlayerSignalDispatcherExt: 'static {}
|
||||||
|
|
||||||
impl<O: IsA<PlayerSignalDispatcher>> PlayerSignalDispatcherExt for O {}
|
impl<O: IsA<PlayerSignalDispatcher>> PlayerSignalDispatcherExt for O {}
|
||||||
|
|
|
@ -5,11 +5,7 @@
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use gst;
|
use gst;
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct PlayerStreamInfo(Object<ffi::GstPlayerStreamInfo, ffi::GstPlayerStreamInfoClass>);
|
pub struct PlayerStreamInfo(Object<ffi::GstPlayerStreamInfo, ffi::GstPlayerStreamInfoClass>);
|
||||||
|
@ -22,7 +18,7 @@ glib_wrapper! {
|
||||||
unsafe impl Send for PlayerStreamInfo {}
|
unsafe impl Send for PlayerStreamInfo {}
|
||||||
unsafe impl Sync for PlayerStreamInfo {}
|
unsafe impl Sync for PlayerStreamInfo {}
|
||||||
|
|
||||||
pub trait PlayerStreamInfoExt {
|
pub trait PlayerStreamInfoExt: 'static {
|
||||||
fn get_caps(&self) -> Option<gst::Caps>;
|
fn get_caps(&self) -> Option<gst::Caps>;
|
||||||
|
|
||||||
fn get_codec(&self) -> Option<String>;
|
fn get_codec(&self) -> Option<String>;
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
use PlayerStreamInfo;
|
use PlayerStreamInfo;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct PlayerSubtitleInfo(Object<ffi::GstPlayerSubtitleInfo, ffi::GstPlayerSubtitleInfoClass>): PlayerStreamInfo;
|
pub struct PlayerSubtitleInfo(Object<ffi::GstPlayerSubtitleInfo, ffi::GstPlayerSubtitleInfoClass>): PlayerStreamInfo;
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
use PlayerStreamInfo;
|
use PlayerStreamInfo;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct PlayerVideoInfo(Object<ffi::GstPlayerVideoInfo, ffi::GstPlayerVideoInfoClass>): PlayerStreamInfo;
|
pub struct PlayerVideoInfo(Object<ffi::GstPlayerVideoInfo, ffi::GstPlayerVideoInfoClass>): PlayerStreamInfo;
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
|
@ -17,7 +17,6 @@ use gst;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct PlayerVideoOverlayVideoRenderer(Object<ffi::GstPlayerVideoOverlayVideoRenderer, ffi::GstPlayerVideoOverlayVideoRendererClass>): PlayerVideoRenderer;
|
pub struct PlayerVideoOverlayVideoRenderer(Object<ffi::GstPlayerVideoOverlayVideoRenderer, ffi::GstPlayerVideoOverlayVideoRendererClass>): PlayerVideoRenderer;
|
||||||
|
@ -62,14 +61,14 @@ impl PlayerVideoOverlayVideoRenderer {
|
||||||
pub fn get_property_video_sink(&self) -> Option<gst::Element> {
|
pub fn get_property_video_sink(&self) -> Option<gst::Element> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "video-sink".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"video-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get()
|
value.get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_property_video_sink<P: IsA<gst::Element> + IsA<glib::object::Object> + glib::value::SetValueOptional>(&self, video_sink: Option<&P>) {
|
pub fn set_property_video_sink<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, video_sink: Option<&P>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "video-sink".to_glib_none().0, Value::from(video_sink).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0, b"video-sink\0".as_ptr() as *const _, Value::from(video_sink).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +83,7 @@ impl PlayerVideoOverlayVideoRenderer {
|
||||||
pub fn connect_property_video_sink_notify<F: Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_video_sink_notify<F: Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::video-sink",
|
connect_raw(self.to_glib_none().0, b"notify::video-sink\0".as_ptr() as *const _,
|
||||||
transmute(notify_video_sink_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_video_sink_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,7 +91,7 @@ impl PlayerVideoOverlayVideoRenderer {
|
||||||
pub fn connect_property_window_handle_notify<F: Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_property_window_handle_notify<F: Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::window-handle",
|
connect_raw(self.to_glib_none().0, b"notify::window-handle\0".as_ptr() as *const _,
|
||||||
transmute(notify_window_handle_trampoline as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_window_handle_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct PlayerVideoRenderer(Object<ffi::GstPlayerVideoRenderer, ffi::GstPlayerVideoRendererInterface>);
|
pub struct PlayerVideoRenderer(Object<ffi::GstPlayerVideoRenderer, ffi::GstPlayerVideoRendererInterface>);
|
||||||
|
@ -21,6 +17,6 @@ glib_wrapper! {
|
||||||
unsafe impl Send for PlayerVideoRenderer {}
|
unsafe impl Send for PlayerVideoRenderer {}
|
||||||
unsafe impl Sync for PlayerVideoRenderer {}
|
unsafe impl Sync for PlayerVideoRenderer {}
|
||||||
|
|
||||||
pub trait PlayerVideoRendererExt {}
|
pub trait PlayerVideoRendererExt: 'static {}
|
||||||
|
|
||||||
impl<O: IsA<PlayerVideoRenderer>> PlayerVideoRendererExt for O {}
|
impl<O: IsA<PlayerVideoRenderer>> PlayerVideoRendererExt for O {}
|
||||||
|
|
|
@ -4,10 +4,6 @@
|
||||||
|
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ b5ea065)
|
Generated by gir (https://github.com/gtk-rs/gir @ 811e711)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
|
|
|
@ -4,10 +4,6 @@
|
||||||
|
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
|
|
|
@ -8,10 +8,6 @@ use ffi;
|
||||||
use glib;
|
use glib;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
|
||||||
use gobject_ffi;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct RTSPAddressPool(Object<ffi::GstRTSPAddressPool, ffi::GstRTSPAddressPoolClass>);
|
pub struct RTSPAddressPool(Object<ffi::GstRTSPAddressPool, ffi::GstRTSPAddressPoolClass>);
|
||||||
|
@ -39,7 +35,7 @@ impl Default for RTSPAddressPool {
|
||||||
unsafe impl Send for RTSPAddressPool {}
|
unsafe impl Send for RTSPAddressPool {}
|
||||||
unsafe impl Sync for RTSPAddressPool {}
|
unsafe impl Sync for RTSPAddressPool {}
|
||||||
|
|
||||||
pub trait RTSPAddressPoolExt {
|
pub trait RTSPAddressPoolExt: 'static {
|
||||||
fn acquire_address(&self, flags: RTSPAddressFlags, n_ports: i32) -> Option<RTSPAddress>;
|
fn acquire_address(&self, flags: RTSPAddressFlags, n_ports: i32) -> Option<RTSPAddress>;
|
||||||
|
|
||||||
fn add_range(&self, min_address: &str, max_address: &str, min_port: u16, max_port: u16, ttl: u8) -> Result<(), glib::error::BoolError>;
|
fn add_range(&self, min_address: &str, max_address: &str, min_port: u16, max_port: u16, ttl: u8) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
|
@ -6,20 +6,16 @@ use RTSPToken;
|
||||||
use ffi;
|
use ffi;
|
||||||
use gio;
|
use gio;
|
||||||
use gio_ffi;
|
use gio_ffi;
|
||||||
use glib;
|
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
|
||||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||||
use gst_rtsp;
|
use gst_rtsp;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct RTSPAuth(Object<ffi::GstRTSPAuth, ffi::GstRTSPAuthClass>);
|
pub struct RTSPAuth(Object<ffi::GstRTSPAuth, ffi::GstRTSPAuthClass>);
|
||||||
|
@ -61,7 +57,7 @@ impl Default for RTSPAuth {
|
||||||
unsafe impl Send for RTSPAuth {}
|
unsafe impl Send for RTSPAuth {}
|
||||||
unsafe impl Sync for RTSPAuth {}
|
unsafe impl Sync for RTSPAuth {}
|
||||||
|
|
||||||
pub trait RTSPAuthExt {
|
pub trait RTSPAuthExt: 'static {
|
||||||
fn add_basic(&self, basic: &str, token: &RTSPToken);
|
fn add_basic(&self, basic: &str, token: &RTSPToken);
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||||
|
@ -95,7 +91,7 @@ pub trait RTSPAuthExt {
|
||||||
fn connect_accept_certificate<F: Fn(&Self, &gio::TlsConnection, &gio::TlsCertificate, gio::TlsCertificateFlags) -> bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_accept_certificate<F: Fn(&Self, &gio::TlsConnection, &gio::TlsCertificate, gio::TlsCertificateFlags) -> bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<RTSPAuth> + IsA<glib::object::Object>> RTSPAuthExt for O {
|
impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
||||||
fn add_basic(&self, basic: &str, token: &RTSPToken) {
|
fn add_basic(&self, basic: &str, token: &RTSPToken) {
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::gst_rtsp_auth_add_basic(self.to_glib_none().0, basic.to_glib_none().0, token.to_glib_none().0);
|
ffi::gst_rtsp_auth_add_basic(self.to_glib_none().0, basic.to_glib_none().0, token.to_glib_none().0);
|
||||||
|
@ -185,7 +181,7 @@ impl<O: IsA<RTSPAuth> + IsA<glib::object::Object>> RTSPAuthExt for O {
|
||||||
fn connect_accept_certificate<F: Fn(&Self, &gio::TlsConnection, &gio::TlsCertificate, gio::TlsCertificateFlags) -> bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_accept_certificate<F: Fn(&Self, &gio::TlsConnection, &gio::TlsCertificate, gio::TlsCertificateFlags) -> bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &gio::TlsConnection, &gio::TlsCertificate, gio::TlsCertificateFlags) -> bool + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &gio::TlsConnection, &gio::TlsCertificate, gio::TlsCertificateFlags) -> bool + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "accept-certificate",
|
connect_raw(self.to_glib_none().0 as *mut _, b"accept-certificate\0".as_ptr() as *const _,
|
||||||
transmute(accept_certificate_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(accept_certificate_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,13 +9,12 @@ use RTSPSession;
|
||||||
use RTSPSessionPool;
|
use RTSPSessionPool;
|
||||||
use RTSPThreadPool;
|
use RTSPThreadPool;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
|
@ -24,9 +23,7 @@ use gst_rtsp;
|
||||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||||
use gst_rtsp_ffi;
|
use gst_rtsp_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct RTSPClient(Object<ffi::GstRTSPClient, ffi::GstRTSPClientClass>);
|
pub struct RTSPClient(Object<ffi::GstRTSPClient, ffi::GstRTSPClientClass>);
|
||||||
|
@ -54,7 +51,7 @@ impl Default for RTSPClient {
|
||||||
unsafe impl Send for RTSPClient {}
|
unsafe impl Send for RTSPClient {}
|
||||||
unsafe impl Sync for RTSPClient {}
|
unsafe impl Sync for RTSPClient {}
|
||||||
|
|
||||||
pub trait RTSPClientExt {
|
pub trait RTSPClientExt: 'static {
|
||||||
fn close(&self);
|
fn close(&self);
|
||||||
|
|
||||||
fn get_auth(&self) -> Option<RTSPAuth>;
|
fn get_auth(&self) -> Option<RTSPAuth>;
|
||||||
|
@ -156,7 +153,7 @@ pub trait RTSPClientExt {
|
||||||
fn connect_property_session_pool_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_session_pool_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
||||||
fn close(&self) {
|
fn close(&self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::gst_rtsp_client_close(self.to_glib_none().0);
|
ffi::gst_rtsp_client_close(self.to_glib_none().0);
|
||||||
|
@ -246,21 +243,21 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn get_property_drop_backlog(&self) -> bool {
|
fn get_property_drop_backlog(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "drop-backlog".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"drop-backlog\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_drop_backlog(&self, drop_backlog: bool) {
|
fn set_property_drop_backlog(&self, drop_backlog: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "drop-backlog".to_glib_none().0, Value::from(&drop_backlog).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"drop-backlog\0".as_ptr() as *const _, Value::from(&drop_backlog).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_announce_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_announce_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "announce-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"announce-request\0".as_ptr() as *const _,
|
||||||
transmute(announce_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(announce_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -272,7 +269,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_closed<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_closed<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "closed",
|
connect_raw(self.to_glib_none().0 as *mut _, b"closed\0".as_ptr() as *const _,
|
||||||
transmute(closed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(closed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -280,7 +277,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_describe_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_describe_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "describe-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"describe-request\0".as_ptr() as *const _,
|
||||||
transmute(describe_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(describe_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -288,7 +285,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_get_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_get_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "get-parameter-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"get-parameter-request\0".as_ptr() as *const _,
|
||||||
transmute(get_parameter_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(get_parameter_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -296,7 +293,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_handle_response<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_handle_response<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "handle-response",
|
connect_raw(self.to_glib_none().0 as *mut _, b"handle-response\0".as_ptr() as *const _,
|
||||||
transmute(handle_response_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(handle_response_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -304,7 +301,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_new_session<F: Fn(&Self, &RTSPSession) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_new_session<F: Fn(&Self, &RTSPSession) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPSession) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPSession) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "new-session",
|
connect_raw(self.to_glib_none().0 as *mut _, b"new-session\0".as_ptr() as *const _,
|
||||||
transmute(new_session_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(new_session_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -312,7 +309,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_options_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_options_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "options-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"options-request\0".as_ptr() as *const _,
|
||||||
transmute(options_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(options_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -320,7 +317,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_pause_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_pause_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "pause-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"pause-request\0".as_ptr() as *const _,
|
||||||
transmute(pause_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(pause_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -328,7 +325,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_play_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_play_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "play-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"play-request\0".as_ptr() as *const _,
|
||||||
transmute(play_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(play_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -337,7 +334,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_pre_announce_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_pre_announce_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "pre-announce-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"pre-announce-request\0".as_ptr() as *const _,
|
||||||
transmute(pre_announce_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(pre_announce_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -346,7 +343,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_pre_describe_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_pre_describe_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "pre-describe-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"pre-describe-request\0".as_ptr() as *const _,
|
||||||
transmute(pre_describe_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(pre_describe_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -355,7 +352,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_pre_get_parameter_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_pre_get_parameter_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "pre-get-parameter-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"pre-get-parameter-request\0".as_ptr() as *const _,
|
||||||
transmute(pre_get_parameter_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(pre_get_parameter_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -364,7 +361,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_pre_options_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_pre_options_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "pre-options-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"pre-options-request\0".as_ptr() as *const _,
|
||||||
transmute(pre_options_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(pre_options_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,7 +370,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_pre_pause_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_pre_pause_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "pre-pause-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"pre-pause-request\0".as_ptr() as *const _,
|
||||||
transmute(pre_pause_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(pre_pause_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -382,7 +379,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_pre_play_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_pre_play_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "pre-play-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"pre-play-request\0".as_ptr() as *const _,
|
||||||
transmute(pre_play_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(pre_play_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -391,7 +388,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_pre_record_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_pre_record_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "pre-record-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"pre-record-request\0".as_ptr() as *const _,
|
||||||
transmute(pre_record_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(pre_record_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -400,7 +397,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_pre_set_parameter_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_pre_set_parameter_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "pre-set-parameter-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"pre-set-parameter-request\0".as_ptr() as *const _,
|
||||||
transmute(pre_set_parameter_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(pre_set_parameter_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -409,7 +406,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_pre_setup_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_pre_setup_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "pre-setup-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"pre-setup-request\0".as_ptr() as *const _,
|
||||||
transmute(pre_setup_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(pre_setup_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -418,7 +415,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_pre_teardown_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_pre_teardown_request<F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "pre-teardown-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"pre-teardown-request\0".as_ptr() as *const _,
|
||||||
transmute(pre_teardown_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(pre_teardown_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -426,7 +423,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_record_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_record_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "record-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"record-request\0".as_ptr() as *const _,
|
||||||
transmute(record_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(record_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -438,7 +435,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_set_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_set_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "set-parameter-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"set-parameter-request\0".as_ptr() as *const _,
|
||||||
transmute(set_parameter_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(set_parameter_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -446,7 +443,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_setup_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_setup_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "setup-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"setup-request\0".as_ptr() as *const _,
|
||||||
transmute(setup_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(setup_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -454,7 +451,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_teardown_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_teardown_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPContext) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "teardown-request",
|
connect_raw(self.to_glib_none().0 as *mut _, b"teardown-request\0".as_ptr() as *const _,
|
||||||
transmute(teardown_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(teardown_request_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -462,7 +459,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_property_drop_backlog_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_drop_backlog_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::drop-backlog",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::drop-backlog\0".as_ptr() as *const _,
|
||||||
transmute(notify_drop_backlog_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_drop_backlog_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -470,7 +467,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_property_mount_points_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_mount_points_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::mount-points",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::mount-points\0".as_ptr() as *const _,
|
||||||
transmute(notify_mount_points_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_mount_points_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -478,7 +475,7 @@ impl<O: IsA<RTSPClient> + IsA<glib::object::Object>> RTSPClientExt for O {
|
||||||
fn connect_property_session_pool_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_session_pool_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::session-pool",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::session-pool\0".as_ptr() as *const _,
|
||||||
transmute(notify_session_pool_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_session_pool_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
|
@ -23,9 +23,7 @@ use gst;
|
||||||
use gst_rtsp;
|
use gst_rtsp;
|
||||||
use libc;
|
use libc;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct RTSPMedia(Object<ffi::GstRTSPMedia, ffi::GstRTSPMediaClass>);
|
pub struct RTSPMedia(Object<ffi::GstRTSPMedia, ffi::GstRTSPMediaClass>);
|
||||||
|
@ -47,7 +45,7 @@ impl RTSPMedia {
|
||||||
unsafe impl Send for RTSPMedia {}
|
unsafe impl Send for RTSPMedia {}
|
||||||
unsafe impl Sync for RTSPMedia {}
|
unsafe impl Sync for RTSPMedia {}
|
||||||
|
|
||||||
pub trait RTSPMediaExt {
|
pub trait RTSPMediaExt: 'static {
|
||||||
fn collect_streams(&self);
|
fn collect_streams(&self);
|
||||||
|
|
||||||
//fn complete_pipeline(&self, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 9, id: 31 }) -> bool;
|
//fn complete_pipeline(&self, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 9, id: 31 }) -> bool;
|
||||||
|
@ -209,7 +207,7 @@ pub trait RTSPMediaExt {
|
||||||
fn connect_property_transport_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_transport_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
|
||||||
fn collect_streams(&self) {
|
fn collect_streams(&self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::gst_rtsp_media_collect_streams(self.to_glib_none().0);
|
ffi::gst_rtsp_media_collect_streams(self.to_glib_none().0);
|
||||||
|
@ -539,7 +537,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn get_property_eos_shutdown(&self) -> bool {
|
fn get_property_eos_shutdown(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "eos-shutdown".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"eos-shutdown\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -547,7 +545,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn get_property_reusable(&self) -> bool {
|
fn get_property_reusable(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "reusable".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"reusable\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -555,7 +553,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn get_property_shared(&self) -> bool {
|
fn get_property_shared(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "shared".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"shared\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -563,21 +561,21 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn get_property_stop_on_disconnect(&self) -> bool {
|
fn get_property_stop_on_disconnect(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "stop-on-disconnect".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"stop-on-disconnect\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_time_provider(&self, time_provider: bool) {
|
fn set_property_time_provider(&self, time_provider: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "time-provider".to_glib_none().0, Value::from(&time_provider).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"time-provider\0".as_ptr() as *const _, Value::from(&time_provider).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_new_state<F: Fn(&Self, i32) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_new_state<F: Fn(&Self, i32) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, i32) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, i32) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "new-state",
|
connect_raw(self.to_glib_none().0 as *mut _, b"new-state\0".as_ptr() as *const _,
|
||||||
transmute(new_state_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(new_state_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -585,7 +583,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_new_stream<F: Fn(&Self, &RTSPStream) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_new_stream<F: Fn(&Self, &RTSPStream) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPStream) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPStream) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "new-stream",
|
connect_raw(self.to_glib_none().0 as *mut _, b"new-stream\0".as_ptr() as *const _,
|
||||||
transmute(new_stream_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(new_stream_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -593,7 +591,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_prepared<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_prepared<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "prepared",
|
connect_raw(self.to_glib_none().0 as *mut _, b"prepared\0".as_ptr() as *const _,
|
||||||
transmute(prepared_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(prepared_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -601,7 +599,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_removed_stream<F: Fn(&Self, &RTSPStream) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_removed_stream<F: Fn(&Self, &RTSPStream) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPStream) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPStream) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "removed-stream",
|
connect_raw(self.to_glib_none().0 as *mut _, b"removed-stream\0".as_ptr() as *const _,
|
||||||
transmute(removed_stream_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(removed_stream_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -609,7 +607,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_target_state<F: Fn(&Self, i32) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_target_state<F: Fn(&Self, i32) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, i32) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, i32) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "target-state",
|
connect_raw(self.to_glib_none().0 as *mut _, b"target-state\0".as_ptr() as *const _,
|
||||||
transmute(target_state_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(target_state_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -617,7 +615,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_unprepared<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_unprepared<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "unprepared",
|
connect_raw(self.to_glib_none().0 as *mut _, b"unprepared\0".as_ptr() as *const _,
|
||||||
transmute(unprepared_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(unprepared_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -625,7 +623,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_property_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::buffer-size",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::buffer-size\0".as_ptr() as *const _,
|
||||||
transmute(notify_buffer_size_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_buffer_size_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -633,7 +631,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_property_clock_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_clock_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::clock",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::clock\0".as_ptr() as *const _,
|
||||||
transmute(notify_clock_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_clock_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -641,7 +639,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_property_eos_shutdown_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_eos_shutdown_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::eos-shutdown",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::eos-shutdown\0".as_ptr() as *const _,
|
||||||
transmute(notify_eos_shutdown_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_eos_shutdown_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -649,7 +647,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::latency",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::latency\0".as_ptr() as *const _,
|
||||||
transmute(notify_latency_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_latency_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -657,7 +655,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::profiles",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::profiles\0".as_ptr() as *const _,
|
||||||
transmute(notify_profiles_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_profiles_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -665,7 +663,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_property_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::protocols",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::protocols\0".as_ptr() as *const _,
|
||||||
transmute(notify_protocols_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_protocols_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -673,7 +671,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_property_reusable_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_reusable_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::reusable",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::reusable\0".as_ptr() as *const _,
|
||||||
transmute(notify_reusable_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_reusable_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -681,7 +679,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_property_shared_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_shared_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::shared",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::shared\0".as_ptr() as *const _,
|
||||||
transmute(notify_shared_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_shared_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -689,7 +687,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_property_stop_on_disconnect_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_stop_on_disconnect_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::stop-on-disconnect",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::stop-on-disconnect\0".as_ptr() as *const _,
|
||||||
transmute(notify_stop_on_disconnect_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_stop_on_disconnect_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -697,7 +695,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_property_suspend_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_suspend_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::suspend-mode",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::suspend-mode\0".as_ptr() as *const _,
|
||||||
transmute(notify_suspend_mode_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_suspend_mode_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -705,7 +703,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_property_time_provider_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_time_provider_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::time-provider",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::time-provider\0".as_ptr() as *const _,
|
||||||
transmute(notify_time_provider_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_time_provider_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -713,7 +711,7 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
fn connect_property_transport_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_transport_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::transport-mode",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::transport-mode\0".as_ptr() as *const _,
|
||||||
transmute(notify_transport_mode_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_transport_mode_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,16 +14,14 @@ use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use gst;
|
use gst;
|
||||||
use gst_rtsp;
|
use gst_rtsp;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct RTSPMediaFactory(Object<ffi::GstRTSPMediaFactory, ffi::GstRTSPMediaFactoryClass>);
|
pub struct RTSPMediaFactory(Object<ffi::GstRTSPMediaFactory, ffi::GstRTSPMediaFactoryClass>);
|
||||||
|
@ -51,7 +49,7 @@ impl Default for RTSPMediaFactory {
|
||||||
unsafe impl Send for RTSPMediaFactory {}
|
unsafe impl Send for RTSPMediaFactory {}
|
||||||
unsafe impl Sync for RTSPMediaFactory {}
|
unsafe impl Sync for RTSPMediaFactory {}
|
||||||
|
|
||||||
pub trait RTSPMediaFactoryExt {
|
pub trait RTSPMediaFactoryExt: 'static {
|
||||||
//fn add_role(&self, role: &str, fieldname: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs);
|
//fn add_role(&self, role: &str, fieldname: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs);
|
||||||
|
|
||||||
fn construct(&self, url: &gst_rtsp::RTSPUrl) -> Option<RTSPMedia>;
|
fn construct(&self, url: &gst_rtsp::RTSPUrl) -> Option<RTSPMedia>;
|
||||||
|
@ -159,7 +157,7 @@ pub trait RTSPMediaFactoryExt {
|
||||||
fn connect_property_transport_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_transport_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt for O {
|
impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
||||||
//fn add_role(&self, role: &str, fieldname: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
|
//fn add_role(&self, role: &str, fieldname: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
|
||||||
// unsafe { TODO: call ffi::gst_rtsp_media_factory_add_role() }
|
// unsafe { TODO: call ffi::gst_rtsp_media_factory_add_role() }
|
||||||
//}
|
//}
|
||||||
|
@ -385,7 +383,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn get_property_eos_shutdown(&self) -> bool {
|
fn get_property_eos_shutdown(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "eos-shutdown".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"eos-shutdown\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -393,7 +391,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn get_property_shared(&self) -> bool {
|
fn get_property_shared(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "shared".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"shared\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -401,7 +399,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn get_property_stop_on_disconnect(&self) -> bool {
|
fn get_property_stop_on_disconnect(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "stop-on-disconnect".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"stop-on-disconnect\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -409,7 +407,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn connect_media_configure<F: Fn(&Self, &RTSPMedia) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_media_configure<F: Fn(&Self, &RTSPMedia) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPMedia) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPMedia) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "media-configure",
|
connect_raw(self.to_glib_none().0 as *mut _, b"media-configure\0".as_ptr() as *const _,
|
||||||
transmute(media_configure_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(media_configure_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -417,7 +415,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn connect_media_constructed<F: Fn(&Self, &RTSPMedia) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_media_constructed<F: Fn(&Self, &RTSPMedia) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self, &RTSPMedia) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self, &RTSPMedia) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "media-constructed",
|
connect_raw(self.to_glib_none().0 as *mut _, b"media-constructed\0".as_ptr() as *const _,
|
||||||
transmute(media_constructed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(media_constructed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -425,7 +423,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn connect_property_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::buffer-size",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::buffer-size\0".as_ptr() as *const _,
|
||||||
transmute(notify_buffer_size_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_buffer_size_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -433,7 +431,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn connect_property_clock_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_clock_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::clock",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::clock\0".as_ptr() as *const _,
|
||||||
transmute(notify_clock_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_clock_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -441,7 +439,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn connect_property_eos_shutdown_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_eos_shutdown_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::eos-shutdown",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::eos-shutdown\0".as_ptr() as *const _,
|
||||||
transmute(notify_eos_shutdown_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_eos_shutdown_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -449,7 +447,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::latency",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::latency\0".as_ptr() as *const _,
|
||||||
transmute(notify_latency_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_latency_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -457,7 +455,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn connect_property_launch_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_launch_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::launch",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::launch\0".as_ptr() as *const _,
|
||||||
transmute(notify_launch_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_launch_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -465,7 +463,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::profiles",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::profiles\0".as_ptr() as *const _,
|
||||||
transmute(notify_profiles_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_profiles_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -473,7 +471,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn connect_property_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::protocols",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::protocols\0".as_ptr() as *const _,
|
||||||
transmute(notify_protocols_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_protocols_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -481,7 +479,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn connect_property_shared_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_shared_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::shared",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::shared\0".as_ptr() as *const _,
|
||||||
transmute(notify_shared_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_shared_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -489,7 +487,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn connect_property_stop_on_disconnect_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_stop_on_disconnect_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::stop-on-disconnect",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::stop-on-disconnect\0".as_ptr() as *const _,
|
||||||
transmute(notify_stop_on_disconnect_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_stop_on_disconnect_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -497,7 +495,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn connect_property_suspend_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_suspend_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::suspend-mode",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::suspend-mode\0".as_ptr() as *const _,
|
||||||
transmute(notify_suspend_mode_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_suspend_mode_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -505,7 +503,7 @@ impl<O: IsA<RTSPMediaFactory> + IsA<glib::object::Object>> RTSPMediaFactoryExt f
|
||||||
fn connect_property_transport_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_transport_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::transport-mode",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::transport-mode\0".as_ptr() as *const _,
|
||||||
transmute(notify_transport_mode_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_transport_mode_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,20 +4,17 @@
|
||||||
|
|
||||||
use RTSPMediaFactory;
|
use RTSPMediaFactory;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Downcast;
|
use glib::object::Downcast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::signal::connect;
|
use glib::signal::connect_raw;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
use gobject_ffi;
|
use gobject_ffi;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem;
|
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct RTSPMediaFactoryURI(Object<ffi::GstRTSPMediaFactoryURI, ffi::GstRTSPMediaFactoryURIClass>): RTSPMediaFactory;
|
pub struct RTSPMediaFactoryURI(Object<ffi::GstRTSPMediaFactoryURI, ffi::GstRTSPMediaFactoryURIClass>): RTSPMediaFactory;
|
||||||
|
@ -45,7 +42,7 @@ impl Default for RTSPMediaFactoryURI {
|
||||||
unsafe impl Send for RTSPMediaFactoryURI {}
|
unsafe impl Send for RTSPMediaFactoryURI {}
|
||||||
unsafe impl Sync for RTSPMediaFactoryURI {}
|
unsafe impl Sync for RTSPMediaFactoryURI {}
|
||||||
|
|
||||||
pub trait RTSPMediaFactoryURIExt {
|
pub trait RTSPMediaFactoryURIExt: 'static {
|
||||||
fn get_uri(&self) -> Option<String>;
|
fn get_uri(&self) -> Option<String>;
|
||||||
|
|
||||||
fn set_uri(&self, uri: &str);
|
fn set_uri(&self, uri: &str);
|
||||||
|
@ -59,7 +56,7 @@ pub trait RTSPMediaFactoryURIExt {
|
||||||
fn connect_property_use_gstpay_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_use_gstpay_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<RTSPMediaFactoryURI> + IsA<glib::object::Object>> RTSPMediaFactoryURIExt for O {
|
impl<O: IsA<RTSPMediaFactoryURI>> RTSPMediaFactoryURIExt for O {
|
||||||
fn get_uri(&self) -> Option<String> {
|
fn get_uri(&self) -> Option<String> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(ffi::gst_rtsp_media_factory_uri_get_uri(self.to_glib_none().0))
|
from_glib_full(ffi::gst_rtsp_media_factory_uri_get_uri(self.to_glib_none().0))
|
||||||
|
@ -75,21 +72,21 @@ impl<O: IsA<RTSPMediaFactoryURI> + IsA<glib::object::Object>> RTSPMediaFactoryUR
|
||||||
fn get_property_use_gstpay(&self) -> bool {
|
fn get_property_use_gstpay(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "use-gstpay".to_glib_none().0, value.to_glib_none_mut().0);
|
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"use-gstpay\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||||
value.get().unwrap()
|
value.get().unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_property_use_gstpay(&self, use_gstpay: bool) {
|
fn set_property_use_gstpay(&self, use_gstpay: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "use-gstpay".to_glib_none().0, Value::from(&use_gstpay).to_glib_none().0);
|
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"use-gstpay\0".as_ptr() as *const _, Value::from(&use_gstpay).to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_property_uri_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_uri_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::uri",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::uri\0".as_ptr() as *const _,
|
||||||
transmute(notify_uri_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_uri_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,7 +94,7 @@ impl<O: IsA<RTSPMediaFactoryURI> + IsA<glib::object::Object>> RTSPMediaFactoryUR
|
||||||
fn connect_property_use_gstpay_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_use_gstpay_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
connect(self.to_glib_none().0, "notify::use-gstpay",
|
connect_raw(self.to_glib_none().0 as *mut _, b"notify::use-gstpay\0".as_ptr() as *const _,
|
||||||
transmute(notify_use_gstpay_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
transmute(notify_use_gstpay_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue