Commit 3b0e6843 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

Regenerate everything with latest GIR

parent ca6c597f
......@@ -54,7 +54,7 @@ unsafe extern "C" fn trampoline_eos(appsink: *mut ffi::GstAppSink, callbacks: gp
let _guard = CallbackGuard::new();
let callbacks = &*(callbacks as *const AppSinkCallbacks);
(callbacks.eos)(&from_glib_none(appsink));
(callbacks.eos)(&from_glib_borrow(appsink));
}
unsafe extern "C" fn trampoline_new_preroll(
......@@ -64,7 +64,7 @@ unsafe extern "C" fn trampoline_new_preroll(
let _guard = CallbackGuard::new();
let callbacks = &*(callbacks as *const AppSinkCallbacks);
(callbacks.new_preroll)(&from_glib_none(appsink)).to_glib()
(callbacks.new_preroll)(&from_glib_borrow(appsink)).to_glib()
}
unsafe extern "C" fn trampoline_new_sample(
......@@ -74,7 +74,7 @@ unsafe extern "C" fn trampoline_new_sample(
let _guard = CallbackGuard::new();
let callbacks = &*(callbacks as *const AppSinkCallbacks);
(callbacks.new_sample)(&from_glib_none(appsink)).to_glib()
(callbacks.new_sample)(&from_glib_borrow(appsink)).to_glib()
}
unsafe extern "C" fn destroy_callbacks(ptr: gpointer) {
......
......@@ -57,14 +57,14 @@ unsafe extern "C" fn trampoline_need_data(
let _guard = CallbackGuard::new();
let callbacks = &*(callbacks as *const AppSrcCallbacks);
(callbacks.need_data)(&from_glib_none(appsrc), length);
(callbacks.need_data)(&from_glib_borrow(appsrc), length);
}
unsafe extern "C" fn trampoline_enough_data(appsrc: *mut ffi::GstAppSrc, callbacks: gpointer) {
let _guard = CallbackGuard::new();
let callbacks = &*(callbacks as *const AppSrcCallbacks);
(callbacks.enough_data)(&from_glib_none(appsrc));
(callbacks.enough_data)(&from_glib_borrow(appsrc));
}
unsafe extern "C" fn trampoline_seek_data(
......@@ -75,7 +75,7 @@ unsafe extern "C" fn trampoline_seek_data(
let _guard = CallbackGuard::new();
let callbacks = &*(callbacks as *const AppSrcCallbacks);
(callbacks.seek_data)(&from_glib_none(appsrc), offset).to_glib()
(callbacks.seek_data)(&from_glib_borrow(appsrc), offset).to_glib()
}
unsafe extern "C" fn destroy_callbacks(ptr: gpointer) {
......
// This file was generated by gir (e43d6c3) from gir-files (???)
// This file was generated by gir (6a48033) from gir-files (???)
// DO NOT EDIT
use ffi;
use glib::Value;
use glib::signal::SignalHandlerId;
use glib::signal::connect;
use glib::translate::*;
use glib_ffi;
......@@ -158,7 +159,7 @@ impl AppSink {
value.get().unwrap()
}
pub fn connect_eos<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
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",
......@@ -166,7 +167,7 @@ impl AppSink {
}
}
pub fn connect_new_preroll<F: Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static>(&self, f: F) -> u64 {
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",
......@@ -174,7 +175,7 @@ impl AppSink {
}
}
pub fn connect_new_sample<F: Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static>(&self, f: F) -> u64 {
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",
......@@ -182,7 +183,7 @@ impl AppSink {
}
}
pub fn connect_property_buffer_list_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
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",
......@@ -190,7 +191,7 @@ impl AppSink {
}
}
pub fn connect_property_caps_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
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",
......@@ -198,7 +199,7 @@ impl AppSink {
}
}
pub fn connect_property_drop_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
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",
......@@ -206,7 +207,7 @@ impl AppSink {
}
}
pub fn connect_property_emit_signals_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
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",
......@@ -214,7 +215,7 @@ impl AppSink {
}
}
pub fn connect_property_eos_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
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",
......@@ -222,7 +223,7 @@ impl AppSink {
}
}
pub fn connect_property_max_buffers_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
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",
......@@ -230,7 +231,7 @@ impl AppSink {
}
}
pub fn connect_property_wait_on_eos_notify<F: Fn(&AppSink) + Send + Sync + 'static>(&self, f: F) -> u64 {
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",
......@@ -245,59 +246,59 @@ unsafe impl Sync for AppSink {}
unsafe extern "C" fn eos_trampoline(this: *mut ffi::GstAppSink, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn new_preroll_trampoline(this: *mut ffi::GstAppSink, f: glib_ffi::gpointer) -> gst_ffi::GstFlowReturn {
callback_guard!();
let f: &&(Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this)).to_glib()
f(&from_glib_borrow(this)).to_glib()
}
unsafe extern "C" fn new_sample_trampoline(this: *mut ffi::GstAppSink, f: glib_ffi::gpointer) -> gst_ffi::GstFlowReturn {
callback_guard!();
let f: &&(Fn(&AppSink) -> gst::FlowReturn + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this)).to_glib()
f(&from_glib_borrow(this)).to_glib()
}
unsafe extern "C" fn notify_buffer_list_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_drop_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_emit_signals_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_eos_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_max_buffers_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_wait_on_eos_trampoline(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSink) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
// This file was generated by gir (e43d6c3) from gir-files (???)
// This file was generated by gir (6a48033) from gir-files (???)
// DO NOT EDIT
use AppStreamType;
use ffi;
use glib::Value;
use glib::signal::SignalHandlerId;
use glib::signal::connect;
use glib::translate::*;
use glib_ffi;
......@@ -246,7 +247,7 @@ impl AppSrc {
}
}
pub fn connect_enough_data<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_enough_data<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "enough-data",
......@@ -254,7 +255,7 @@ impl AppSrc {
}
}
pub fn connect_need_data<F: Fn(&AppSrc, u32) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_need_data<F: Fn(&AppSrc, u32) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc, u32) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "need-data",
......@@ -262,7 +263,7 @@ impl AppSrc {
}
}
pub fn connect_seek_data<F: Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_seek_data<F: Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "seek-data",
......@@ -270,7 +271,7 @@ impl AppSrc {
}
}
pub fn connect_property_block_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_property_block_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::block",
......@@ -278,7 +279,7 @@ impl AppSrc {
}
}
pub fn connect_property_caps_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_property_caps_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::caps",
......@@ -286,7 +287,7 @@ impl AppSrc {
}
}
pub fn connect_property_current_level_bytes_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_property_current_level_bytes_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::current-level-bytes",
......@@ -294,7 +295,7 @@ impl AppSrc {
}
}
pub fn connect_property_duration_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_property_duration_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::duration",
......@@ -302,7 +303,7 @@ impl AppSrc {
}
}
pub fn connect_property_emit_signals_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_property_emit_signals_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::emit-signals",
......@@ -310,7 +311,7 @@ impl AppSrc {
}
}
pub fn connect_property_format_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_property_format_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::format",
......@@ -318,7 +319,7 @@ impl AppSrc {
}
}
pub fn connect_property_is_live_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_property_is_live_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::is-live",
......@@ -326,7 +327,7 @@ impl AppSrc {
}
}
pub fn connect_property_max_bytes_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_property_max_bytes_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::max-bytes",
......@@ -334,7 +335,7 @@ impl AppSrc {
}
}
pub fn connect_property_max_latency_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_property_max_latency_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::max-latency",
......@@ -342,7 +343,7 @@ impl AppSrc {
}
}
pub fn connect_property_min_latency_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_property_min_latency_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::min-latency",
......@@ -350,7 +351,7 @@ impl AppSrc {
}
}
pub fn connect_property_min_percent_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_property_min_percent_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::min-percent",
......@@ -358,7 +359,7 @@ impl AppSrc {
}
}
pub fn connect_property_size_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_property_size_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::size",
......@@ -366,7 +367,7 @@ impl AppSrc {
}
}
pub fn connect_property_stream_type_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> u64 {
pub fn connect_property_stream_type_notify<F: Fn(&AppSrc) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&AppSrc) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "notify::stream-type",
......@@ -381,95 +382,95 @@ unsafe impl Sync for AppSrc {}
unsafe extern "C" fn enough_data_trampoline(this: *mut ffi::GstAppSrc, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn need_data_trampoline(this: *mut ffi::GstAppSrc, length: libc::c_uint, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc, u32) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this), length)
f(&from_glib_borrow(this), length)
}
unsafe extern "C" fn seek_data_trampoline(this: *mut ffi::GstAppSrc, offset: u64, f: glib_ffi::gpointer) -> glib_ffi::gboolean {
callback_guard!();
let f: &&(Fn(&AppSrc, u64) -> bool + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this), offset).to_glib()
f(&from_glib_borrow(this), offset).to_glib()
}
unsafe extern "C" fn notify_block_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_caps_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_current_level_bytes_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_duration_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_emit_signals_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_format_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_is_live_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_max_bytes_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_max_latency_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_min_latency_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_min_percent_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_size_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_stream_type_trampoline(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!();
let f: &&(Fn(&AppSrc) + Send + Sync + 'static) = transmute(f);
f(&from_glib_none(this))
f(&from_glib_borrow(this))
}
// This file was generated by gir (e43d6c3) from gir-files (???)
// This file was generated by gir (6a48033) from gir-files (???)
// DO NOT EDIT
use ffi;
......
// This file was generated by gir (e43d6c3) from gir-files (???)
// This file was generated by gir (6a48033) from gir-files (???)
// DO NOT EDIT
use ffi;
......
// This file was generated by gir (e43d6c3) from gir-files (???)
// This file was generated by gir (6a48033) from gir-files (???)
// DO NOT EDIT
mod app_sink;
......
// This file was generated by gir (e43d6c3) from gir-files (???)
// This file was generated by gir (6a48033) from gir-files (???)
// DO NOT EDIT
use ffi;
......
// This file was generated by gir (e43d6c3) from gir-files (???)
// This file was generated by gir (6a48033) from gir-files (???)
// DO NOT EDIT
use ffi;
......
// This file was generated by gir (e43d6c3) from gir-files (???)
// This file was generated by gir (6a48033) from gir-files (???)
// DO NOT EDIT
mod stream_volume;
......
// This file was generated by gir (e43d6c3) from gir-files (???)
// This file was generated by gir (6a48033) from gir-files (???)
// DO NOT EDIT
use StreamVolumeFormat;
......@@ -6,6 +6,7 @@ use ffi;
use glib;
use glib::object::Downcast;
use glib::object::IsA;
use glib::signal::SignalHandlerId;
use glib::signal::connect;
use glib::translate::*;
use glib_ffi;
......@@ -44,9 +45,9 @@ pub trait StreamVolumeExt {
fn set_volume(&self, format: StreamVolumeFormat, val: f64);
fn connect_property_mute_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> u64;
fn connect_property_mute_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) -> u64;
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 {
......@@ -74,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) -> u64 {
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",
......@@ -82,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) -> u64 {
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",
......@@ -95,12 +96,12 @@ unsafe extern "C" fn notify_mute_trampoline<P>(this: *mut ffi::GstStreamVolume,
where P: IsA<StreamVolume> {
callback_guard!();
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);