Commit 5c93e134 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Regenerate everything with new version of gir

parent fa988fe7
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -7,6 +7,7 @@ target_path = "gstreamer-editing-services"
work_mode = "normal"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......@@ -169,4 +170,4 @@ trait_name = "GESTrackExt"
[[object.function]]
name = "remove_element"
[object.function.return]
bool_return_is_error = "Failed to remove element"
\ No newline at end of file
bool_return_is_error = "Failed to remove element"
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -9,6 +9,7 @@ concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
doc_target_path = "docs/gstreamer-rtsp/docs.md"
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -9,6 +9,7 @@ concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
doc_target_path = "docs/gstreamer-rtsp-server/docs.md"
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -9,6 +9,7 @@ concurrency = "send"
generate_safety_asserts = true
single_version_file = true
doc_target_path = "docs/gstreamer-sdp/docs.md"
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -8,6 +8,7 @@ work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
......
......@@ -6,7 +6,7 @@ use ffi;
use glib::StaticType;
use glib::Value;
use glib::signal::SignalHandlerId;
use glib::signal::connect;
use glib::signal::connect_raw;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
......@@ -15,9 +15,7 @@ use gst_base;
use gst_base_ffi;
use gst_ffi;
use std::boxed::Box as Box_;
use std::mem;
use std::mem::transmute;
use std::ptr;
glib_wrapper! {
pub struct AppSink(Object<ffi::GstAppSink, ffi::GstAppSinkClass>): [
......@@ -148,21 +146,21 @@ impl AppSink {
pub fn get_property_buffer_list(&self) -> bool {
unsafe {
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()
}
}
pub fn set_property_buffer_list(&self, buffer_list: bool) {
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 {
unsafe {
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()
}
}
......@@ -170,7 +168,7 @@ impl AppSink {
pub fn connect_eos<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
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 _)
}
}
......@@ -178,7 +176,7 @@ impl AppSink {
pub fn connect_new_preroll<F: Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
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 _)
}
}
......@@ -186,7 +184,7 @@ impl AppSink {
pub fn connect_new_sample<F: Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
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 _)
}
}
......@@ -194,7 +192,7 @@ impl AppSink {
pub fn connect_property_buffer_list_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
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 _)
}
}
......@@ -202,7 +200,7 @@ impl AppSink {
pub fn connect_property_caps_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
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 _)
}
}
......@@ -210,7 +208,7 @@ impl AppSink {
pub fn connect_property_drop_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
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 _)
}
}
......@@ -218,7 +216,7 @@ impl AppSink {
pub fn connect_property_emit_signals_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
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 _)
}
}
......@@ -226,7 +224,7 @@ impl AppSink {
pub fn connect_property_eos_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
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 _)
}
}
......@@ -234,7 +232,7 @@ impl AppSink {
pub fn connect_property_max_buffers_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
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 _)
}
}
......@@ -242,7 +240,7 @@ impl AppSink {
pub fn connect_property_wait_on_eos_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
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 _)
}
}
......
This diff is collapsed.
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 @ ???)
......@@ -3,13 +3,10 @@
// DO NOT EDIT
use ffi;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use gst;
use std::mem;
use std::ptr;
glib_wrapper! {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
......
......@@ -4,18 +4,14 @@
use StreamVolumeFormat;
use ffi;
use glib;
use glib::object::Downcast;
use glib::object::IsA;
use glib::signal::SignalHandlerId;
use glib::signal::connect;
use glib::signal::connect_raw;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
use std::boxed::Box as Box_;
use std::mem;
use std::mem::transmute;
use std::ptr;
glib_wrapper! {
pub struct StreamVolume(Object<ffi::GstStreamVolume, ffi::GstStreamVolumeInterface>);
......@@ -37,7 +33,7 @@ impl StreamVolume {
unsafe impl Send for StreamVolume {}
unsafe impl Sync for StreamVolume {}
pub trait StreamVolumeExt {
pub trait StreamVolumeExt: 'static {
fn get_mute(&self) -> bool;
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;
}
impl<O: IsA<StreamVolume> + IsA<glib::object::Object>> StreamVolumeExt for O {
impl<O: IsA<StreamVolume>> StreamVolumeExt for O {
fn get_mute(&self) -> bool {
unsafe {
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 {
unsafe {
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 _)
}
}
......@@ -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 {
unsafe {
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 _)
}
}
......
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 @ ???)
......@@ -6,11 +6,8 @@ use ffi;
use glib;
use glib::ObjectExt;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
use gst;
use std::mem;
use std::ptr;
glib_wrapper! {
pub struct Adapter(Object<ffi::GstAdapter, ffi::GstAdapterClass>);
......
......@@ -4,22 +4,19 @@
use AggregatorClass;
use ffi;
use glib;
use glib::StaticType;
use glib::Value;
use glib::object::Downcast;
use glib::object::IsA;
use glib::signal::SignalHandlerId;
use glib::signal::connect;
use glib::signal::connect_raw;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
use gst;
use gst_ffi;
use std::boxed::Box as Box_;
use std::mem;
use std::mem::transmute;
use std::ptr;
glib_wrapper! {
pub struct Aggregator(Object<ffi::GstAggregator, ffi::GstAggregatorClass, AggregatorClass>): [
......@@ -35,7 +32,7 @@ glib_wrapper! {
unsafe impl Send for Aggregator {}
unsafe impl Sync for Aggregator {}
pub trait AggregatorExt {
pub trait AggregatorExt: 'static {
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//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;
}
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"))]
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
// 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 {
unsafe {
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()
}
}
fn set_property_start_time(&self, start_time: u64) {
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 {
unsafe {
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 _)
}
}
......@@ -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 {
unsafe {
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 _)
}
}
......
......@@ -6,12 +6,8 @@ use AggregatorPadClass;
use ffi;
use glib::object::IsA;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
use gst;
use gst_ffi;
use std::mem;
use std::ptr;
glib_wrapper! {
pub struct AggregatorPad(Object<ffi::GstAggregatorPad, ffi::GstAggregatorPadClass, AggregatorPadClass>): [
......@@ -27,7 +23,7 @@ glib_wrapper! {
unsafe impl Send for AggregatorPad {}
unsafe impl Sync for AggregatorPad {}
pub trait AggregatorPadExt {
pub trait AggregatorPadExt: 'static {
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn drop_buffer(&self) -> bool;
......
This diff is collapsed.
......@@ -4,13 +4,12 @@
use BaseSrcClass;
use ffi;
use glib;
use glib::StaticType;
use glib::Value;
use glib::object::Downcast;
use glib::object::IsA;
use glib::signal::SignalHandlerId;
use glib::signal::connect;
use glib::signal::connect_raw;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
......@@ -19,7 +18,6 @@ use gst_ffi;
use std::boxed::Box as Box_;
use std::mem;
use std::mem::transmute;
use std::ptr;
glib_wrapper! {
pub struct BaseSrc(Object<ffi::GstBaseSrc, ffi::GstBaseSrcClass, BaseSrcClass>): [
......@@ -35,7 +33,7 @@ glib_wrapper! {
unsafe impl Send 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_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;
}
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) {
// 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 {
unsafe {
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()
}
}
fn set_property_num_buffers(&self, num_buffers: i32) {
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 {
unsafe {
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()
}
}
fn set_property_typefind(&self, typefind: bool) {
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 {
unsafe {
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 _)
}
}
......@@ -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 {
unsafe {
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 _)
}
}
......@@ -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 {
unsafe {
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 _)
}
}
......@@ -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 {
unsafe {
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 _)
}
}
......
......@@ -4,22 +4,19 @@
use BaseTransformClass;
use ffi;
use glib;
use glib::StaticType;
use glib::Value;
use glib::object::Downcast;
use glib::object::IsA;
use glib::signal::SignalHandlerId;
use glib::signal::connect;
use glib::signal::connect_raw;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
use gst;
use gst_ffi;
use std::boxed::Box as Box_;
use std::mem;
use std::mem::transmute;
use std::ptr;
glib_wrapper! {
pub struct BaseTransform(Object<ffi::GstBaseTransform, ffi::GstBaseTransformClass, BaseTransformClass>): [
......@@ -35,7 +32,7 @@ glib_wrapper! {
unsafe impl Send 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_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;
}
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) {
// 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 {
unsafe {
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()
}