mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-05-23 00:28:59 +00:00
fallbackswitch: update base/aggregator*
This commit is contained in:
parent
7d17f88941
commit
e573f0ba16
3 changed files with 38 additions and 30 deletions
|
@ -21,9 +21,9 @@ pub trait AggregatorExtManual: 'static {
|
|||
fn allocator(&self) -> (Option<gst::Allocator>, gst::AllocationParams);
|
||||
|
||||
fn finish_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||
fn property_min_upstream_latency(&self) -> gst::ClockTime;
|
||||
fn min_upstream_latency(&self) -> gst::ClockTime;
|
||||
|
||||
fn set_property_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime);
|
||||
fn set_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime);
|
||||
|
||||
fn connect_property_min_upstream_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
|
@ -55,7 +55,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
|
|||
ret.into_result()
|
||||
}
|
||||
|
||||
fn property_min_upstream_latency(&self) -> gst::ClockTime {
|
||||
fn min_upstream_latency(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::ClockTime as StaticType>::static_type());
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
|
@ -65,12 +65,12 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
|
|||
);
|
||||
value
|
||||
.get()
|
||||
.expect("AggregatorExtManual::get_property_min_upstream_latency")
|
||||
.expect("AggregatorExtManual::min_upstream_latency")
|
||||
.unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime) {
|
||||
fn set_min_upstream_latency(&self, min_upstream_latency: gst::ClockTime) {
|
||||
unsafe {
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
||||
// DO NOT EDIT
|
||||
|
||||
use super::super::ffi;
|
||||
|
@ -9,7 +10,6 @@ use glib::signal::connect_raw;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
|
@ -27,11 +27,14 @@ unsafe impl Sync for Aggregator {}
|
|||
pub const NONE_AGGREGATOR: Option<&Aggregator> = None;
|
||||
|
||||
pub trait AggregatorExt: 'static {
|
||||
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams);
|
||||
//#[doc(alias = "gst_aggregator_get_allocator")]
|
||||
//fn allocator(&self, allocator: /*Ignored*/Option<gst::Allocator>, params: /*Ignored*/gst::AllocationParams);
|
||||
|
||||
fn get_buffer_pool(&self) -> Option<gst::BufferPool>;
|
||||
#[doc(alias = "gst_aggregator_get_buffer_pool")]
|
||||
fn buffer_pool(&self) -> Option<gst::BufferPool>;
|
||||
|
||||
fn get_latency(&self) -> gst::ClockTime;
|
||||
#[doc(alias = "gst_aggregator_get_latency")]
|
||||
fn latency(&self) -> gst::ClockTime;
|
||||
|
||||
fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime);
|
||||
|
||||
|
@ -39,9 +42,9 @@ pub trait AggregatorExt: 'static {
|
|||
|
||||
fn simple_get_next_time(&self) -> gst::ClockTime;
|
||||
|
||||
fn get_property_start_time(&self) -> u64;
|
||||
fn start_time(&self) -> u64;
|
||||
|
||||
fn set_property_start_time(&self, start_time: u64);
|
||||
fn set_start_time(&self, start_time: u64);
|
||||
|
||||
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
|
@ -57,11 +60,11 @@ pub trait AggregatorExt: 'static {
|
|||
}
|
||||
|
||||
impl<O: IsA<Aggregator>> AggregatorExt for O {
|
||||
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
|
||||
//fn allocator(&self, allocator: /*Ignored*/Option<gst::Allocator>, params: /*Ignored*/gst::AllocationParams) {
|
||||
// unsafe { TODO: call ffi:gst_aggregator_get_allocator() }
|
||||
//}
|
||||
|
||||
fn get_buffer_pool(&self) -> Option<gst::BufferPool> {
|
||||
fn buffer_pool(&self) -> Option<gst::BufferPool> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_aggregator_get_buffer_pool(
|
||||
self.as_ref().to_glib_none().0,
|
||||
|
@ -69,7 +72,7 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_latency(&self) -> gst::ClockTime {
|
||||
fn latency(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_aggregator_get_latency(
|
||||
self.as_ref().to_glib_none().0,
|
||||
|
@ -101,9 +104,9 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_property_start_time(&self) -> u64 {
|
||||
fn start_time(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
let mut value = glib::Value::from_type(<u64 as StaticType>::static_type());
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"start-time\0".as_ptr() as *const _,
|
||||
|
@ -116,12 +119,12 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn set_property_start_time(&self, start_time: u64) {
|
||||
fn set_start_time(&self, start_time: u64) {
|
||||
unsafe {
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"start-time\0".as_ptr() as *const _,
|
||||
Value::from(&start_time).to_glib_none().0,
|
||||
glib::Value::from(&start_time).to_glib_none().0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +148,9 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
|
|||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"notify::latency\0".as_ptr() as *const _,
|
||||
Some(transmute(notify_latency_trampoline::<Self, F> as usize)),
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
notify_latency_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
|
@ -170,7 +175,9 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
|
|||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"notify::start-time\0".as_ptr() as *const _,
|
||||
Some(transmute(notify_start_time_trampoline::<Self, F> as usize)),
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
notify_start_time_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ use glib::signal::connect_raw;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
|
@ -37,9 +36,9 @@ pub trait AggregatorPadExt: 'static {
|
|||
|
||||
fn pop_buffer(&self) -> Option<gst::Buffer>;
|
||||
|
||||
fn get_property_emit_signals(&self) -> bool;
|
||||
fn emits_signals(&self) -> bool;
|
||||
|
||||
fn set_property_emit_signals(&self, emit_signals: bool);
|
||||
fn set_emit_signals(&self, emit_signals: bool);
|
||||
|
||||
fn connect_buffer_consumed<F: Fn(&Self, &gst::Buffer) + Send + Sync + 'static>(
|
||||
&self,
|
||||
|
@ -93,9 +92,9 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_property_emit_signals(&self) -> bool {
|
||||
fn emits_signals(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
let mut value = glib::Value::from_type(<bool as StaticType>::static_type());
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"emit-signals\0".as_ptr() as *const _,
|
||||
|
@ -108,12 +107,12 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn set_property_emit_signals(&self, emit_signals: bool) {
|
||||
fn set_emit_signals(&self, emit_signals: bool) {
|
||||
unsafe {
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"emit-signals\0".as_ptr() as *const _,
|
||||
Value::from(&emit_signals).to_glib_none().0,
|
||||
glib::Value::from(&emit_signals).to_glib_none().0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -143,7 +142,9 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
|
|||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"buffer-consumed\0".as_ptr() as *const _,
|
||||
Some(transmute(buffer_consumed_trampoline::<Self, F> as usize)),
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
buffer_consumed_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
|
@ -168,8 +169,8 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
|
|||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"notify::emit-signals\0".as_ptr() as *const _,
|
||||
Some(transmute(
|
||||
notify_emit_signals_trampoline::<Self, F> as usize,
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
notify_emit_signals_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue